/*
Theme Name: Comfort Guide
Theme URI: https://comfortguide.ru/
Author: Comfort Guide
Description: Минималистичная редакционная тема для блога Comfort Guide. Главная, рубрики, записи и оформление редактируются из WordPress.
Version: 1.1.0
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: comfort-guide
*/
:root{--paper:#faf9f6;--ink:#242824;--muted:#626660;--line:#e6e4df;--green:#4f604c;--max:1230px}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--paper);color:var(--ink);font-family:Arial,'Helvetica Neue',sans-serif;-webkit-font-smoothing:antialiased}a{color:inherit;text-decoration:none}button,input{font:inherit}button{cursor:pointer}.shell{width:min(calc(100% - 108px),var(--max));margin:auto}.site-header{background:var(--paper);position:relative;z-index:4}.header-inner{display:flex;align-items:center;justify-content:space-between;min-height:86px;gap:28px}.brand{flex-shrink:0;display:flex;flex-direction:column;gap:2px}.brand span,.footer-brand{font-family:Georgia,'Times New Roman',serif;font-size:30px;letter-spacing:-1.35px;line-height:1}.brand small{font-size:11px;color:#71736f;letter-spacing:.07px}.nav{display:flex;align-items:center;gap:clamp(15px,2vw,32px);margin-left:auto}.nav a{font-size:12px;color:#303430;white-space:nowrap;padding:13px 0;border-bottom:1px solid transparent}.nav a.active{border-bottom-color:transparent}.nav a:hover,.text-link:hover{color:var(--green)}.header-actions{display:flex;gap:9px}.icon-button{background:none;border:0;padding:9px;color:var(--ink);display:grid;place-items:center}.icon-button svg{height:21px;width:21px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}.menu-btn{display:none}.search-panel{border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:#fff}.search-wrap{display:flex;gap:18px;align-items:center;padding-top:18px;padding-bottom:18px}.search-wrap label{font-size:13px;white-space:nowrap}.search-wrap input{flex:1;min-width:0;border:0;border-bottom:1px solid #9a9d97;padding:11px 3px;outline:none;background:transparent}.search-wrap input:focus{border-color:var(--green)}.text-link{display:inline-flex;align-items:center;gap:18px;border:0;background:none;padding:7px 0;color:var(--ink);font-size:14px;white-space:nowrap}.text-link span{font-size:23px;line-height:1}.hero{display:grid;grid-template-columns:44% 56%;min-height:448px}.hero-copy{padding:75px 30px 50px max(54px,calc((100vw - var(--max))/2));display:flex;flex-direction:column;align-items:flex-start;justify-content:center}.hero h1{font-size:clamp(42px,3.25vw,57px);line-height:1.04;letter-spacing:-1.8px;max-width:570px;margin:0 0 28px}.serif,h1,h2,h3,.feature-title,.article-title,.footer-brand{font-family:Georgia,'Times New Roman',serif;font-weight:400}.hero p{max-width:375px;margin:0 0 26px;font-size:16px;line-height:1.55;color:#515651}.primary{display:inline-flex;align-items:center;gap:22px;background:var(--green);color:white;border:0;border-radius:2px;padding:14px 19px;font-size:13px}.primary:hover{background:#354532}.hero-photo{background-image:url('assets/images/hero.jpg');background-position:center;background-size:cover;min-height:448px}.feature{display:grid;grid-template-columns:50% 50%;gap:0;padding-top:40px;padding-bottom:54px;align-items:center}.feature-image{width:100%;height:360px;object-fit:cover;display:block}.feature-copy{padding:28px 0 28px clamp(24px,3.4vw,50px)}.feature-title{font-size:clamp(32px,2.65vw,42px);line-height:1.1;letter-spacing:-1.1px;margin:0 0 22px}.feature-copy p{font-size:16px;line-height:1.58;color:var(--muted);max-width:370px;margin:0 0 22px}.section-head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:26px;gap:20px}.section-head h2{font-size:clamp(34px,3.4vw,48px);letter-spacing:-1.6px;line-height:1;margin:0}.articles-section{padding-bottom:74px}.articles-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:30px}.article-card img{width:100%;aspect-ratio:1.62;object-fit:cover;display:block;margin-bottom:19px}.article-card h3{font-size:clamp(24px,2.1vw,29px);line-height:1.13;letter-spacing:-.45px;margin:0 0 9px}.article-card:hover h3,.featured-link:hover{color:var(--green)}.article-card p{color:var(--muted);line-height:1.5;font-size:14px;margin:0 0 17px}.meta{display:flex;gap:18px;font-size:11px;color:#7b7c76;margin-top:auto}.footer{border-top:1px solid var(--line);padding:28px 0 35px}.footer-inner{display:flex;align-items:start;justify-content:space-between;gap:24px}.footer-brand{font-size:23px}.footer p{font-size:11px;color:#797b75;margin:5px 0 0}.footer-links{display:flex;gap:22px;flex-wrap:wrap;font-size:12px;color:#656861}.footer-links a:hover{text-decoration:underline}.page-title{font-size:clamp(48px,5vw,74px);letter-spacing:-2px;line-height:1.05;margin:0 0 19px}.page-intro{max-width:620px;font-size:17px;line-height:1.6;color:var(--muted);margin:0}.page-head{padding:75px 0 55px;border-bottom:1px solid var(--line);margin-bottom:40px}.filter-bar{display:flex;gap:21px;flex-wrap:wrap;margin-bottom:35px}.filter-bar a{font-size:13px;color:var(--muted);padding-bottom:8px;border-bottom:1px solid transparent}.filter-bar a.active{color:var(--ink);border-color:var(--ink)}.archive{padding-bottom:90px}.article-hero{padding:64px 0 34px;max-width:850px;margin:auto}.breadcrumbs{font-size:12px;color:#858781;margin-bottom:32px}.breadcrumbs a:hover{text-decoration:underline}.article-hero h1{font-size:clamp(43px,5.1vw,72px);line-height:1.05;letter-spacing:-1.9px;margin:0 0 22px}.article-hero .lead{font-size:19px;line-height:1.55;color:#626660;max-width:750px;margin:0 0 22px}.article-cover{width:100%;height:min(52vw,560px);object-fit:cover;display:block}.article-layout{display:grid;grid-template-columns:225px minmax(0,730px);gap:70px;padding-top:65px;padding-bottom:95px;max-width:1120px;margin:auto}.toc{align-self:start;position:sticky;top:22px;border-top:1px solid var(--line);padding-top:20px}.toc strong{display:block;font-weight:400;font-size:13px;margin-bottom:15px}.toc a{display:block;color:#777b73;font-size:13px;line-height:1.5;margin:12px 0}.toc a:hover{color:var(--ink)}.prose{font-size:17px;line-height:1.84;color:#3d423e}.prose h2{font-size:33px;line-height:1.15;color:var(--ink);margin:40px 0 15px}.prose p{margin:0 0 22px}.prose ul{padding-left:25px}.prose li{margin-bottom:10px}.article-tools{display:flex;align-items:center;justify-content:space-between;margin:34px 0;border-top:1px solid var(--line);padding-top:18px}.related{border-top:1px solid var(--line);padding-top:32px;margin-top:50px}.related h2{font-size:32px}.related .articles-grid{grid-template-columns:repeat(2,1fr)}.simple-page{max-width:760px;min-height:60vh;padding-bottom:100px}.simple-page p{line-height:1.75;color:var(--muted);font-size:17px}.empty{padding:70px 0;color:var(--muted)}.skip{position:absolute;left:-10000px;top:0;background:white;padding:14px;z-index:10}.skip:focus{left:10px}a:focus-visible,button:focus-visible,input:focus-visible{outline:2px solid #546d54;outline-offset:4px}@media(max-width:1040px){.shell{width:min(calc(100% - 64px),var(--max))}.header-inner{min-height:76px}.nav{gap:13px}.nav a{font-size:11px}.brand span{font-size:26px}.hero-copy{padding-left:32px}.hero{grid-template-columns:44% 56%}.hero h1{font-size:clamp(38px,4.3vw,46px)}.feature-copy{padding-left:36px}}@media(max-width:790px){.shell{width:calc(100% - 42px)}.header-inner{min-height:70px}.nav{display:none;position:absolute;top:70px;left:0;right:0;background:var(--paper);padding:16px 23px 25px;border-bottom:1px solid var(--line);box-shadow:0 12px 20px #0000000d;flex-direction:column;align-items:stretch;gap:0}.nav.open{display:flex}.nav a{font-size:15px;padding:12px 0}.menu-btn{display:grid}.hero{grid-template-columns:1fr}.hero-copy{padding:44px 21px 37px}.hero-photo{min-height:290px}.hero h1{font-size:clamp(48px,9vw,70px);max-width:560px}.feature{grid-template-columns:1fr;padding-top:34px;padding-bottom:50px}.feature-image{height:340px}.feature-copy{padding:30px 0 0}.feature-title{font-size:42px}.articles-grid{gap:18px}.article-card h3{font-size:23px}.article-layout{grid-template-columns:1fr;gap:26px}.toc{position:static}.toc-links{display:none}.toc.open .toc-links{display:block}.toc strong{cursor:pointer}.page-head{padding-top:48px}.article-hero{padding-top:43px}}@media(max-width:600px){.brand span{font-size:25px}.brand small{font-size:10px}.hero-photo{min-height:248px}.hero-copy{padding-top:38px}.hero h1{font-size:48px;letter-spacing:-1.7px}.hero p{font-size:15px}.feature-image{height:250px}.feature-title{font-size:37px}.feature-copy p{font-size:15px}.articles-grid,.related .articles-grid{grid-template-columns:1fr;gap:38px}.article-card img{aspect-ratio:1.65}.article-card h3{font-size:28px}.section-head h2{font-size:37px}.articles-section{padding-bottom:58px}.footer-inner{flex-direction:column}.footer-links{gap:13px 19px}.search-wrap{flex-wrap:wrap}.search-wrap label{width:100%}.article-hero h1{font-size:42px}.article-hero .lead{font-size:17px}.article-cover{height:280px}.article-layout{padding-top:30px}.prose{font-size:16px}.prose h2{font-size:28px}.page-head{padding-bottom:35px}.page-title{font-size:48px}}

/* Typographic refinements: deliberate two-line desktop headlines, no menu underline */
.nav a,.nav a.active,.nav a:hover{border-bottom-color:transparent;text-decoration:none}
@media(max-width:790px){.desktop-break{display:none}}

/* v1.2 — clean first viewport and unobtrusive search */
@media (min-width: 791px) {
  .hero { min-height: calc(100vh - 86px); min-height: calc(100svh - 86px); }
  .hero-photo { min-height: 0; height: auto; }
  .feature { padding-top: 56px; }
}
/* Search opens above the page instead of displacing the main composition. */
.search-panel { position:absolute; top:100%; left:0; right:0; z-index:6; background:var(--paper); box-shadow:0 12px 24px rgba(20,28,20,.08); }
.search-wrap input { border:0; border-radius:3px; padding:13px 14px; background:#f0efe9; outline:0; box-shadow:none; }
.search-wrap input:focus, .search-wrap input:focus-visible { border:0; outline:0; box-shadow:0 0 0 2px var(--green); background:#fff; }
@media (max-width: 790px) { .hero { min-height:0; } .hero-photo { height:auto; } }

/* v1.3 — deliberate compact mobile editorial layout; desktop untouched */
@media(max-width:790px){
  .hero-copy{padding-top:34px;padding-bottom:32px}
  .feature{padding-top:30px;padding-bottom:34px}
  .feature-copy{padding-top:22px}
  .feature-title{font-size:clamp(29px,5.2vw,36px);line-height:1.12;letter-spacing:-.65px;margin-bottom:15px}
  .feature-copy p{margin-bottom:14px}
  .section-head{margin-bottom:20px}
  .articles-section{padding-bottom:46px}
}
@media(max-width:600px){
  .shell{width:calc(100% - 40px)}
  .hero-copy{padding:34px 20px 32px}
  .hero h1{font-size:clamp(37px,10.7vw,46px);line-height:1.07;letter-spacing:-1.2px;margin-bottom:22px}
  .hero p{font-size:15px;line-height:1.55;margin-bottom:24px}
  .hero-photo{min-height:0;height:auto;aspect-ratio:1.55;background-position:center}
  .feature{padding-top:30px;padding-bottom:38px}
  .feature-image{height:auto;aspect-ratio:1.48;object-fit:cover}
  .feature-copy{padding-top:22px}
  .feature-title{font-size:clamp(28px,7.55vw,33px);line-height:1.11;letter-spacing:-.65px;margin-bottom:16px;overflow-wrap:normal}
  .feature-copy p{font-size:15px;line-height:1.55;margin-bottom:16px}
  .section-head{align-items:center;gap:10px;margin-bottom:18px}
  .section-head h2{font-size:clamp(30px,8.4vw,36px);line-height:1.08;letter-spacing:-.9px;white-space:nowrap}
  .section-head .text-link{font-size:12px;gap:8px}
  .section-head .text-link span{font-size:20px}
  .articles-grid,.related .articles-grid{gap:30px}
  .article-card img{margin-bottom:15px}
  .article-card h3{font-size:clamp(25px,7vw,28px);line-height:1.16}
  .article-card p{margin-bottom:12px}
  .articles-section{padding-bottom:44px}
  .footer{padding-top:25px}
}
@media(max-width:360px){
  .section-head h2{font-size:29px}
  .section-head .text-link{font-size:11px}
  .feature-title{font-size:27px}
}

/* v1.4 — mobile hero-to-feature breathing room; desktop unchanged */
@media(max-width:790px){.feature{padding-top:44px}}
@media(max-width:600px){.feature{padding-top:46px}}

/* WordPress integration */
.site-header{z-index:20}.hero-photo{background-image:none}.hero-photo img{width:100%;height:100%;display:block;object-fit:cover}.hero-copy{min-width:0}.hero h1{overflow-wrap:normal}.site-header .nav a{text-decoration:none;border-bottom:0}.site-header .nav .current-menu-item>a{border:0}.site-header .nav ul{list-style:none;display:flex;align-items:center;gap:clamp(15px,2vw,32px);margin:0;padding:0}.site-header .nav li{margin:0}.featured-link{display:inline-flex;align-items:center;gap:15px}.featured-link:hover{color:var(--green)}.article-card{display:block}.article-card img{background:#eeece7}.article-card h3{overflow-wrap:break-word}.prose img{max-width:100%;height:auto}.prose figure{margin:28px 0}.prose a:not(.primary){text-decoration:underline;text-underline-offset:3px}.wp-block-image img{height:auto}.pagination{display:flex;gap:18px;margin:35px 0}.pagination a,.pagination span{padding:8px}.pagination .current{color:var(--green);font-weight:bold}.search-panel[hidden],.nav:not(.open)[hidden]{display:none!important}.search-wrap form{width:100%;display:flex;align-items:center;gap:18px}.search-wrap input{flex:1}.search-wrap button{font-size:14px}.search-wrap .text-link{background:transparent}.screen-reader-text{position:absolute!important;clip:rect(1px,1px,1px,1px);white-space:nowrap;overflow:hidden;width:1px;height:1px}.page-content{padding-bottom:85px}.page-content .prose{max-width:770px}.page-head{margin-bottom:42px}.article-hero .meta{margin-bottom:0}.article-cover{background:#ebe8e1}.wp-caption{max-width:100%}.page-subtitle{font-size:17px;color:var(--muted)}.no-photo{background:#ece9e3;min-height:200px}.card-image{aspect-ratio:1.62;object-fit:cover;width:100%}.footer-links a{text-decoration:none}.header-inner .nav{display:flex}.hero .hero-photo{overflow:hidden}.header-actions{flex-shrink:0}
@media(max-width:790px){.header-inner .nav{display:none}.header-inner .nav.open{display:flex}.site-header .nav ul{display:flex;flex-direction:column;align-items:stretch;gap:0}.hero-photo{min-height:0}.hero-photo img{aspect-ratio:1.55;height:auto}.search-wrap form{flex-wrap:wrap}.search-wrap label{width:100%}.search-wrap input{min-width:120px}.search-wrap button{flex-shrink:0}}
@media(max-width:600px){.hero-photo img{aspect-ratio:1.55}.feature-title{font-size:clamp(28px,7.5vw,33px)}.hero h1{font-size:clamp(37px,10.7vw,46px)}.hero-copy{padding-top:34px;padding-bottom:32px}}
@media(min-width:791px){.hero{min-height:calc(100svh - 86px)}.hero-photo img{height:100%;min-height:calc(100svh - 86px)}.feature{padding-top:56px}}

.cg-footer-menu{list-style:none;display:flex;gap:22px;flex-wrap:wrap;margin:0;padding:0}.cg-footer-menu li{margin:0}.brand-logo{max-height:54px;width:auto;object-fit:contain}.wp-block-gallery{max-width:100%}

/* Comfort Guide 1.1: editorial layout refinements */
/* Keep photographs in a consistent landscape crop on archives and category pages. */
.archive .article-card img, .archive .article-card .card-image, .archive .article-card .no-photo,
.articles-section .article-card img, .related .article-card img {
  aspect-ratio: 1.62 / 1;
  height: auto;
  max-height: 270px;
  width: 100%;
  object-fit: cover;
}
.archive .article-card img { max-height: 260px; }
/* Give long-form articles a clear comfortable text measure. */
.article-layout { grid-template-columns: minmax(170px,215px) minmax(0,760px); gap: clamp(32px,4vw,58px); max-width:1110px; }
.prose { min-width:0; overflow-wrap:break-word; }
.prose table { width:100%; border-collapse:collapse; }
.prose .wp-block-table { max-width:100%; overflow-x:auto; }
.prose img { max-width:100%; height:auto; }
@media(max-width:790px){
  .article-layout { grid-template-columns:minmax(0,1fr); gap:24px; }
  .article-hero h1 { font-size:clamp(35px,5.2vw,46px); letter-spacing:-1px; line-height:1.12; }
  .page-title { font-size:clamp(39px,6vw,58px); }
  .archive .article-card img, .archive .article-card .no-photo { max-height:290px; }
}
@media(max-width:600px){
  .article-hero { padding-top:30px; padding-bottom:24px; }
  .article-hero h1 { font-size:clamp(31px,8vw,37px); line-height:1.12; letter-spacing:-.7px; overflow-wrap:break-word; }
  .article-hero .lead { font-size:15px; line-height:1.6; }
  .breadcrumbs { margin-bottom:21px; font-size:11px; }
  .article-cover { height:auto; max-height:330px; aspect-ratio:1.5; object-fit:cover; }
  .toc { padding-top:13px; }
  .toc strong { font-size:14px; }
  .prose { font-size:16px; line-height:1.72; }
  .prose h2 { font-size:clamp(24px,6.5vw,28px); line-height:1.2; }
  .prose h3 { font-size:22px; line-height:1.28; }
  .archive .article-card img, .archive .article-card .no-photo { aspect-ratio:1.62; max-height:230px; }
  .articles-grid .article-card h3 { font-size:clamp(23px,6.5vw,27px); }
}
