/*
Theme Name: Mihoncho Minimal Theme V2
Theme URI: https://mihoncho.com/
Author: OpenAI
Description: Minimal full-width theme with widgetized header and footer for Mihoncho.
Version: 2.2.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: mihoncho-minimal-v2
*/

:root{
  --site-bg:#ffffff;
  --text:#222222;
  --muted:#666666;
  --border:#e5e5e5;
  --max-width:none;
}

*{box-sizing:border-box;}
html{margin:0;padding:0;}
body{
  margin:0;
  padding:0;
  background:var(--site-bg);
  color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Hiragino Kaku Gothic ProN","Hiragino Sans","Yu Gothic",Meiryo,sans-serif;
  line-height:1.7;
}
a{color:inherit;text-decoration:none;}
a:hover{text-decoration:none;}
img{max-width:100%;height:auto;display:block;}

.site{
  width:100%;
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

.site-header,
.site-main,
.site-footer{
  width:100%;
}

.site-header{
  border-bottom:1px solid var(--border);
}

.site-header-inner,
.site-main-inner,
.site-footer-inner{
  width:100%;
  max-width:var(--max-width);
  margin:0;
}

.header-fallback{
  padding:20px 24px;
  display:flex;
  align-items:center;
  gap:14px;
}

.custom-logo-link img,
.header-fallback .site-logo img{
  max-height:48px;
  width:auto;
}

.site-title{
  margin:0;
  font-size:20px;
  font-weight:700;
  line-height:1.2;
}

.site-description{
  margin:4px 0 0;
  color:var(--muted);
  font-size:13px;
  line-height:1.4;
}

.header-widget-area,
.footer-widget-area{
  width:100%;
  padding:0;
}

.header-widget-area .widget,
.footer-widget-area .widget{
  margin:0;
}

.header-widget-area .widget_custom_html,
.footer-widget-area .widget_custom_html{
  width:100%;
}

.header-widget-area .textwidget,
.footer-widget-area .textwidget,
.header-widget-area .custom-html-widget,
.footer-widget-area .custom-html-widget{
  width:100%;
}

.site-main{
  flex:1 0 auto;
}

.site-main-inner{
  padding:0;
}

.content-area,
.site-content,
.entry-content,
.archive-content,
.search-content{
  width:100%;
}

.entry-header,
.entry-content,
.entry-summary,
.archive-header,
.archive-description,
.search-header,
.page-header{
  padding-left:24px;
  padding-right:24px;
}

.entry-header,
.archive-header,
.search-header,
.page-header{
  padding-top:28px;
  padding-bottom:18px;
}

.entry-content,
.entry-summary,
.archive-description{
  padding-bottom:32px;
}

.entry-title,
.page-title,
.archive-title,
.search-title{
  margin:0;
  font-size:32px;
  line-height:1.25;
}

.entry-meta,
.archive-meta,
.search-meta{
  margin-top:8px;
  color:var(--muted);
  font-size:13px;
}

.posts-grid{
  width:100%;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:24px;
  padding:0 24px 40px;
}

.post-card{
  border:1px solid var(--border);
  background:#fff;
}

.post-card-thumb{
  aspect-ratio:4/3;
  overflow:hidden;
  background:#f6f6f6;
}

.post-card-body{padding:16px;}
.post-card-title{margin:0 0 8px;font-size:18px;line-height:1.4;}
.post-card-excerpt{margin:0;color:var(--muted);font-size:14px;line-height:1.7;}

.site-footer{
  border-top:1px solid var(--border);
  margin-top:auto;
}

.footer-fallback{
  padding:20px 24px;
  color:var(--muted);
  font-size:14px;
}

.widget{width:100%;}
.widget_block{margin:0;}

.alignwide,
.alignfull{
  margin-left:0;
  margin-right:0;
  max-width:none;
}

@media (max-width: 1024px){
  .posts-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}

@media (max-width: 767px){
  .header-fallback{padding:16px 16px;}
  .entry-header,
  .entry-content,
  .entry-summary,
  .archive-header,
  .archive-description,
  .search-header,
  .page-header{padding-left:16px;padding-right:16px;}
  .entry-title,
  .page-title,
  .archive-title,
  .search-title{font-size:26px;}
  .posts-grid{grid-template-columns:1fr;gap:16px;padding:0 16px 28px;}
  .footer-fallback{padding:16px;}
}


/* Mihoncho adjustments */
.tax-mihoncho_category .archive-header,
.tax-mihoncho_category .page-header,
.tax-mihoncho_category .entry-header{display:none;}
.page .entry-header .entry-title,
.page .entry-header .entry-meta{display:none;}
.site-header:empty, .site-header-inner:empty{display:none;}
.header-widget-area:empty{display:none;}
