/* ===== MARSAD AL-GHAD THEME CSS ===== */
/* WordPress core resets */
.wp-block-image img { max-width: 100%; height: auto; border-radius: 8px; }
.aligncenter { margin: 0 auto; display: block; }
.alignright { float: left; margin: 0 0 16px 20px; }
.alignleft  { float: right; margin: 0 20px 16px 0; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Article body typography */
.art-body { font-size: 17px; font-weight: 400; line-height: 1.95; color: var(--fg); max-width: 700px; }
.art-body p { margin-bottom: 22px; }
.art-body h2 { font-size: 22px; font-weight: 700; color: var(--fg); margin: 36px 0 16px; }
.art-body h3 { font-size: 18px; font-weight: 600; color: var(--fg); margin: 28px 0 12px; }
.art-body h4 { font-size: 16px; font-weight: 600; color: var(--fg); margin: 20px 0 10px; }
.art-body blockquote { border-right: 4px solid #9C743C; padding: 14px 20px; margin: 28px 0; background: rgba(156,116,60,.06); border-radius: 0 8px 8px 0; font-size: 18px; color: var(--fg); font-style: italic; line-height: 1.8; }
.art-body ul, .art-body ol { padding-right: 22px; margin-bottom: 22px; }
.art-body li { margin-bottom: 8px; line-height: 1.85; }
.art-body a { color: #9C743C; text-decoration: underline; text-underline-offset: 3px; }
.art-body figure { margin: 28px 0; }
.art-body figcaption { font-size: 12.5px; color: var(--fg3); text-align: center; margin-top: 8px; }
.art-body .wp-block-image { margin: 28px 0; }
.art-body .wp-block-image img { border-radius: 10px; width: 100%; }
.art-body .wp-block-quote { border-right: 4px solid #9C743C; padding: 14px 20px; margin: 28px 0; background: rgba(156,116,60,.06); border-radius: 0 8px 8px 0; }
.art-body .wp-block-separator { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
.art-body pre, .art-body code { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px; font-size: 14px; direction: ltr; }
.art-body pre { padding: 16px 20px; overflow-x: auto; }

/* Single article layout */
.single-layout { display: flex; gap: 32px; align-items: flex-start; max-width: var(--max); margin: 0 auto; padding: 28px 24px 60px; }
.single-main { flex: 1; min-width: 0; }
.single-sidebar { width: 280px; flex-shrink: 0; position: sticky; top: 96px; }

/* Reading progress bar (fixed top, above nav) */
/* Sits flush under the fixed header at every breakpoint by reading the
   same --nav-h variable the nav uses, so it can never drift. It also
   rides up with the header when the header hides on scroll. */
.read-progress { position: fixed; top: var(--nav-h); left: 0; right: 0; height: 3px; z-index: 999; background: transparent; pointer-events: none; transition: transform .3s ease; }
.nav.hidden ~ .read-progress { transform: translateY(calc(-1 * var(--nav-h))); }
.read-progress-fill { height: 100%; width: 0%; background: #9C743C; transition: width .1s linear; }

/* Floating share rail — sticky column beside the article, desktop only */
.float-share { width: 44px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; position: sticky; top: 120px; }
.float-share-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--card); border: 1px solid var(--border); display: grid; place-items: center; color: var(--fg2); box-shadow: var(--shadow); transition: all .15s; }
.float-share-btn:hover { border-color: #9C743C; color: #9C743C; }
.float-share-btn.liked { background: #9C743C; color: #fff; border-color: #9C743C; }
.float-like-count { font-size: 12px; color: var(--fg3); text-align: center; margin-top: -2px; }
@media (max-width: 1200px) { .float-share { display: none; } }

/* Byline action row (save / share / copy link) */
.save-btn, .share-btn { display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--fg2); font-size: 12.5px; font-family: var(--font); transition: all .15s; }
.font-size-ctrl { display: flex; align-items: center; gap: 4px; padding: 3px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); }
.fs-btn { display: flex; align-items: center; justify-content: center; width: 30px; height: 28px; border-radius: 6px; color: var(--fg2); font-family: var(--font); font-size: 12px; font-weight: 700; transition: all .15s; }
.fs-btn:hover:not(:disabled) { background: var(--hover); color: #9C743C; }
.fs-btn:disabled { opacity: .35; cursor: default; }
#fsInc { font-size: 14px; }
.save-btn:hover, .share-btn:hover { border-color: #9C743C; color: #9C743C; }
.save-btn.saved { background: #9C743C; color: #fff; border-color: #9C743C; }
@media (max-width: 560px) { .art-byline { flex-wrap: wrap; } .art-share-row { margin-right: 0 !important; width: 100%; justify-content: flex-start; } }
.art-hero { width: 100%; height: 420px; border-radius: 12px; overflow: hidden; position: relative; margin-bottom: 36px; }
.art-hero img { width: 100%; height: 100%; object-fit: cover; }
.art-hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(13,27,46,.5) 0%, transparent 55%); }
.art-meta-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.art-cat-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 20px; font-size: 12.5px; font-weight: 500; background: rgba(156,116,60,.12); color: #9C743C; border: 1px solid rgba(156,116,60,.25); }
.art-date { font-size: 13px; color: var(--fg3); }
.art-read-time { font-size: 13px; color: var(--fg3); display: flex; align-items: center; gap: 5px; }
.art-title { font-size: clamp(24px,4vw,38px); font-weight: 700; color: var(--fg); line-height: 1.45; margin-bottom: 16px; }
.art-dek { font-size: 17px; color: var(--fg2); line-height: 1.85; margin-bottom: 24px; border-right: 3px solid #9C743C; padding-right: 16px; }
.art-byline { display: flex; align-items: center; gap: 12px; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 32px; }
.art-author-avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg,#9C743C,#c8963e); display: grid; place-items: center; font-size: 17px; font-weight: 700; color: #fff; flex-shrink: 0; overflow: hidden; }
.art-author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.art-author-name { font-size: 14px; font-weight: 500; color: var(--fg); }
.art-author-role { font-size: 12px; color: var(--fg3); margin-top: 2px; }
.art-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 36px 0; }
.art-tag { padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border); font-size: 12.5px; color: var(--fg2); background: var(--card); transition: all .15s; }
.art-tag:hover { border-color: #9C743C; color: #9C743C; }
.related-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.related-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; transition: box-shadow .15s; }
.related-card:hover { box-shadow: 0 4px 16px rgba(17,24,39,.1); }
.related-card img { width: 100%; height: 130px; object-fit: cover; }
.related-card-body { padding: 12px; }
.related-card-tag { font-size: 11px; font-weight: 500; color: #9C743C; margin-bottom: 6px; }
.related-card-title { font-size: 13.5px; font-weight: 500; color: var(--fg); line-height: 1.55; }

/* Sidebar cards */
.sb-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 18px; margin-bottom: 18px; }
.sb-card-title { font-size: 14px; font-weight: 600; color: var(--fg); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 7px; }
.sb-card-title::before { content:''; width:3px; height:14px; background:#9C743C; border-radius:2px; }

/* Comments */
.comments-section { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }
.comment-list { list-style: none; padding: 0; }
.comment-body-wrap { display: flex; gap: 12px; margin-bottom: 24px; }
.comment-author-avatar { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; overflow: hidden; background: linear-gradient(135deg,#1D5FA8,#2a7acc); display: grid; place-items: center; font-weight: 700; font-size: 15px; color: #fff; }
.comment-author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-content { flex: 1; }
.comment-author-name { font-size: 13.5px; font-weight: 600; color: var(--fg); }
.comment-date { font-size: 11.5px; color: var(--fg3); margin-right: 8px; }
.comment-text p { font-size: 14px; color: var(--fg2); line-height: 1.75; margin-top: 6px; }
.comment-reply-link { font-size: 12px; color: var(--fg3); cursor: pointer; }
.comment-reply-link:hover { color: #9C743C; }
#respond { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 20px; margin-top: 24px; }
#respond h3 { font-size: 15px; font-weight: 600; color: var(--fg); margin-bottom: 16px; }
#respond textarea, #respond input[type=text], #respond input[type=email], #respond input[type=url] { width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; color: var(--fg); font-family: var(--font); font-size: 14px; outline: none; transition: border-color .15s; box-sizing: border-box; margin-bottom: 10px; }
#respond textarea { min-height: 100px; resize: vertical; }
#respond textarea:focus, #respond input:focus { border-color: #9C743C; }
#respond input[type=submit] { background: #9C743C; color: #fff; border: none; border-radius: 8px; padding: 10px 22px; font-size: 14px; font-weight: 500; font-family: var(--font); cursor: pointer; }
#respond input[type=submit]:hover { opacity: .88; }

/* Archive / category page */
.archive-header { padding: 36px 0 20px; border-bottom: 2px solid #9C743C; margin-bottom: 28px; }
.archive-title { font-size: 30px; font-weight: 700; color: var(--fg); display: flex; align-items: center; gap: 12px; }
.archive-desc { font-size: 14px; color: var(--fg2); margin-top: 8px; }
.archive-layout { display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: start; }
.archive-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
.acard-img img { width: 100%; height: 100%; object-fit: cover; }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 40px 0 20px; }
.page-btn { width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--fg2); font-size: 14px; display: grid; place-items: center; cursor: pointer; transition: all .15s; text-decoration: none; font-family: var(--font); }
.page-btn:hover, .page-btn.current { background: #9C743C; color: #fff; border-color: #9C743C; }

/* Search */
.search-result-item { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 20px; display: flex; gap: 16px; margin-bottom: 16px; transition: box-shadow .15s; }
.search-result-item:hover { box-shadow: 0 4px 16px rgba(17,24,39,.08); }
.search-result-thumb { width: 80px; height: 66px; border-radius: 8px; flex-shrink: 0; overflow: hidden; }
.search-result-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* WooCommerce / membership placeholders */
.woocommerce-notices-wrapper { margin: 16px 0; }

/* Responsive */
@media (max-width: 1060px) { .single-sidebar { display: none; } .single-layout { display: block; padding: 20px; } .related-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) { .archive-layout { grid-template-columns: 1fr; } .archive-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .archive-grid { grid-template-columns: 1fr; } .art-hero { height: 240px; } .related-grid { grid-template-columns: 1fr; } }
@keyframes fadeIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-5px)} 40%{transform:translateX(5px)} 60%{transform:translateX(-3px)} 80%{transform:translateX(3px)} }


/* ===== CORE DESIGN SYSTEM ===== */

:root { --bg: #F6F5EF; --surface: #FAF6EF; --card: #FFFFFF; --border: rgba(17,24,39,.11); --brass: #A5702C; --ember: #BE4520; --fg: #111827; --fg2: #4B5563; --fg3: #8A8F98; --hover: rgba(17,24,39,.04); --inputbg: rgba(17,24,39,.04); --shadow: 0 1px 3px rgba(17,24,39,.06); --onmedia: #F4EFE6; --onmedia-2: rgba(244,239,230,.62); --onmedia-3: rgba(244,239,230,.45); --brass-media: #E0A44F; --max: 1280px; --font: "Tajawal", sans-serif}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0}
body { background: var(--bg); color: var(--fg2); font-family: var(--font); font-size: 14px; font-weight: 300; line-height: 1.7; -webkit-font-smoothing: antialiased}
a { color: inherit; text-decoration: none}
button { cursor: pointer; font: inherit; border: none; background: none} .wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px} .nav { background: var(--surface); border-bottom: 1px solid var(--border); position: fixed; top: 0; left: 0; right: 0; z-index: 1000; transition: transform .3s ease, box-shadow .3s ease}
.nav.hidden { transform: translateY(-100%)}
.nav.scrolled { box-shadow: 0 2px 12px rgba(17,24,39,.08)}
.nav-inner { max-width: var(--max); margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); gap: 20px}
.nav-left { display: flex; align-items: center; gap: 14px}
.nav-icon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--fg2); transition: background .15s, color .15s}
.nav-icon:hover { background: var(--hover); color: var(--fg)}
.nav-signin { display: flex; align-items: center; gap: 8px; background: #9C743C; color: #FFFFFF; font-size: 14.5px; font-weight: 500; padding: 10px 20px; border-radius: 8px; transition: opacity .15s; white-space: nowrap; flex-shrink: 0}
.nav-signin:hover { opacity: .88}
.nav-links { display: flex; align-items: center; gap: 30px; font-size: 15px; font-weight: 400}
.nav-links a { color: var(--fg2); transition: color .15s}
.nav-links a:hover { color: var(--fg)}
.nav-links a:hover { color: var(--fg)}
.nav-links a.on { color: var(--brass); border-bottom: 2px solid var(--brass); padding-bottom: 6px; font-weight: 500}
.brand { display: flex; align-items: flex-end; gap: 14px}
.brand-text { padding-bottom: 6px; text-align: left}
.brand-mark { display: flex; flex-direction: column; align-items: stretch}
.brand-rule { height: 2px; background: var(--brass); margin-top: 0}
.brand-name { font-weight: 700; font-size: 28px; color: var(--fg); line-height: 1.15; letter-spacing: -.01em}
.brand-sub { font-size: 12px; font-weight: 400; color: var(--brass); margin-top: 2px} .hero { margin-top: 24px; display: flex; flex-direction: row; height: 420px; gap: 2px; background: var(--border); overflow: hidden} .hero-featured { flex: 0 0 42%; position: relative; overflow: hidden; border-radius: 10px 0 0 10px; display: flex; flex-direction: column; justify-content: flex-end; padding: 28px 32px; order: 2}
.hero-featured-bg { position: absolute; inset: 0}
.hero-featured-bg::before { content: ''; position: absolute; inset: 0; background: rgba(6,13,24,.22); z-index: 1}
.hero-featured-bg::after { content: ''; position: absolute; inset: 0; z-index: 2; background: linear-gradient(to top, rgba(8,16,28,.94) 0%, rgba(8,16,28,.68) 35%, rgba(8,16,28,.32) 65%, rgba(8,16,28,.08) 100%)}
.feat-bg-fill { position: absolute; inset: 0; background: linear-gradient(135deg, #0a2240 0%, #1a3a5c 100%)} .feat-city { position: absolute; bottom: 0; left: 0; right: 0; width: 100%; opacity: .2}
.featured-body { position: relative; z-index: 3}
.feat-badge { display: inline-block; font-size: 11px; font-weight: 500; padding: 4px 12px; border-radius: 6px; margin-bottom: 14px; background: var(--ember); color: #fff}
.feat-title { font-weight: 700; font-size: clamp(20px, 2.6vw, 34px); line-height: 1.45; color: var(--onmedia); margin-bottom: 10px; max-width: 20ch; text-shadow: 0 2px 12px rgba(0,0,0,.55), 0 1px 2px rgba(0,0,0,.7)}
.feat-dek { font-size: 14px; line-height: 1.85; color: var(--onmedia-2); margin-bottom: 22px; max-width: 44ch; text-shadow: 0 1px 8px rgba(0,0,0,.5)}
.feat-btn { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); color: var(--onmedia); font-size: 13px; padding: 9px 18px; border-radius: 8px; transition: background .15s}
.feat-btn:hover { background: rgba(255,255,255,.2)}
.feat-dots { display: flex; gap: 6px; margin-top: 18px}
.feat-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.25)}
.feat-dot.on { background: var(--onmedia)} .hero-cards { flex: 0 0 calc(58% - 3px); display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px; order: 1; border-radius: 0 10px 10px 0; overflow: hidden}
.hcard { background: var(--card); position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 14px}
.hcard:hover .hcard-title { color: var(--brass-media)}
.hcard-bg { position: absolute; inset: 0; overflow: hidden}
.hcard-bg::before { content: ''; position: absolute; inset: 0; background: rgba(6,13,24,.18); z-index: 1}
.hcard-bg img { display: block}
.hcard-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(6,13,24,.92) 0%, rgba(6,13,24,.72) 30%, rgba(6,13,24,.32) 62%, rgba(6,13,24,.02) 100%); z-index: 2; pointer-events: none}
.hcard-body { position: relative; z-index: 3; box-sizing: border-box; padding: 14px 14px 12px}
.hcard-tag { display: inline-block; font-size: 11px; font-weight: 500; padding: 3px 9px; border-radius: 6px; margin-bottom: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.35)}
.tag-brass { background: var(--brass); color: #0D1B2E}
.tag-teal { background: #1E7A6E; color: #fff}
.tag-purple { background: #5C3D9E; color: #fff}
.tag-blue { background: #1D5FA8; color: #fff}
.tag-ember { background: var(--ember); color: #fff}
.tag-gold { background: #C7902E; color: #0D1B2E}
.tag-slate { background: #3D5568; color: #fff}
.hcard-title { display: block; font-size: 14px; font-weight: 600; color: var(--onmedia); line-height: 1.5; margin-bottom: 5px; transition: color .15s; text-shadow: 0 1px 4px rgba(0,0,0,.7), 0 2px 14px rgba(0,0,0,.5); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden}
.hcard-meta { display: inline-block; font-size: 11px; color: var(--onmedia-2); text-shadow: 0 1px 4px rgba(0,0,0,.6)} .bg1 { background: linear-gradient(135deg, #0f2a46, #1a4a6e)}
.bg2 { background: linear-gradient(135deg, #1a2a18, #2a4a26)}
.bg3 { background: linear-gradient(135deg, #2a1a0f, #4a2a16)}
.bg4 { background: linear-gradient(135deg, #1a1a2e, #2a2a48)}
.bg5 { background: linear-gradient(135deg, #0f1a2a, #1a2a3e)}
.bg6 { background: linear-gradient(135deg, #2a1a2a, #3e263e)}
.bg7 { background: linear-gradient(135deg, #1a2a1a, #263e26)}
.bg8 { background: linear-gradient(135deg, #12202e, #1e3048)}
.bg9 { background: linear-gradient(135deg, #0a1a2a, #142232)} .sec-row { display: grid; grid-template-columns: 1.7fr repeat(6, 1fr); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin: 16px 0}
.sec-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; padding: 18px 10px; border-left: 1px solid var(--border); font-size: 14px; font-weight: 500; color: var(--fg); transition: background .15s, color .15s}
.sec-item:last-child { border-left: none}
.sec-item:hover { background: var(--hover); color: var(--fg)}
.sec-nl { display: flex; flex-direction: column; justify-content: center; gap: 7px; padding: 14px 18px; border-left: 1px solid var(--border); background: rgba(156,116,60,.06)}
.sec-nl-top { display: flex; align-items: center; justify-content: space-between}
.sec-nl-label { font-size: 14px; font-weight: 500; color: var(--fg)}
.sec-nl-sub { font-size: 11.5px; color: var(--fg3)}
.sec-nl-form { display: flex; gap: 6px}
.sec-nl-input { flex: 1; background: var(--inputbg); border: 1px solid var(--border); border-radius: 8px; padding: 7px 11px; color: var(--fg); font-family: var(--font); font-size: 12.5px; outline: none; transition: border-color .15s}
.sec-nl-input::placeholder { color: var(--fg3)}
.sec-nl-input:focus { border-color: var(--brass)}
.sec-nl-btn { background: #9C743C; color: #fff; padding: 7px 12px; border-radius: 8px; display: grid; place-items: center} .nl-logo { height: 80px; width: auto; object-fit: contain; flex: 0 0 auto}
.nav-logo { height: 66px; width: auto; object-fit: contain; display: block}
.footer-logo { width: 160px; height: auto; object-fit: contain; display: block} .below { display: grid; grid-template-columns: 310px 1fr; margin-top: 0}
.articles { padding: 26px 22px 26px 0}
.articles-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px}
.articles-head h2 { font-size: 16px; font-weight: 600; color: var(--fg); display: flex; align-items: center; gap: 8px}
.articles-head h2::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ember); display: inline-block}
.view-all { font-size: 12.5px; color: var(--fg3)}
.view-all:hover { color: var(--brass)}
.cards-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px}
.acard { background: var(--card); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--border); box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s}
.acard:hover { border-color: rgba(165,112,44,.45); box-shadow: 0 4px 14px rgba(17,24,39,.09)}
.acard-img { height: 150px; position: relative; overflow: hidden}
.acard-tag { position: absolute; top: 9px; right: 9px; font-size: 11px; font-weight: 500; padding: 3px 10px; border-radius: 6px; color: #fff}
.acard-body { padding: 13px 13px 14px; flex: 1; display: flex; flex-direction: column}
.acard-title { font-size: 14px; font-weight: 500; color: var(--fg); line-height: 1.55; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden}
.acard:hover .acard-title { color: var(--brass)}
.acard-footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 9px; border-top: 1px solid var(--border)}
.acard-meta { font-size: 11.5px; color: var(--fg3)}
.acard-save { color: var(--fg3); opacity: .6}
.acard-save:hover { opacity: 1; color: var(--brass)} .sidebar { border-left: 1px solid var(--border); padding: 26px 0 26px 22px}
.sb-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px}
.sb-title { font-size: 15px; font-weight: 600; color: var(--fg)}
.sb-more { font-size: 13px; font-weight: 500; color: var(--brass)}
.rank-item { display: flex; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--border)}
.rank-item:last-child { border-bottom: none}
.rank-item:hover .ri-title { color: var(--brass)}
.rank-n { font-size: 20px; font-weight: 700; color: var(--brass); line-height: 1; flex: 0 0 26px; padding-top: 2px}
.ri-title { font-size: 13.5px; font-weight: 400; color: var(--fg); line-height: 1.6; margin-bottom: 3px; transition: color .15s}
.ri-meta { font-size: 12px; color: var(--fg2)}
.ri-thumb { width: 58px; height: 50px; flex: 0 0 58px; border-radius: 10px; overflow: hidden} footer { background: var(--surface); border-top: 1px solid var(--border); border-radius: 12px 12px 0 0; padding: 44px 24px 30px; margin-top: 40px}
.footer-inner { max-width: var(--max); margin: 0 auto}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 38px; padding-bottom: 34px; border-bottom: 1px solid var(--border)}
.footer-brand-name { font-size: 22px; font-weight: 700; color: var(--fg); display: block; margin: 10px 0 9px}
.footer-desc { font-size: 13.5px; color: var(--fg2); font-weight: 400; max-width: 30ch; line-height: 1.75}
.footer-col h5 { font-size: 13.5px; font-weight: 500; color: var(--fg); margin-bottom: 13px}
.footer-col ul { list-style: none}
.footer-col li { margin-bottom: 8px}
.footer-col a { font-size: 13.5px; color: var(--fg2); font-weight: 400; transition: color .15s}
.footer-col a:hover { color: var(--brass)}
.footer-bottom { padding-top: 20px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px}
.footer-copy { font-size: 12.5px; color: var(--fg2); font-weight: 400}
.night-toggle { display: flex; align-items: center; gap: 9px; color: var(--fg2); font-size: 13px; cursor: pointer; transition: color .15s}
.night-toggle:hover { color: var(--fg)}
@media (max-width: 1100px) { .cards-grid { grid-template-columns: repeat(2, 1fr)} .below { grid-template-columns: 1fr} .articles { order: 1; padding: 26px 0} .sidebar { order: 2; border-left: none; border-top: 1px solid var(--border); padding: 26px 0}
}
@media (max-width: 900px) { .hero { margin-top: 24px; flex-direction: column; height: auto} .hero-featured { flex: none; min-height: 280px; order: 1} .hero-cards { flex: none; order: 2; grid-template-columns: repeat(4, 1fr); grid-template-rows: 1fr; height: 160px} .sec-row { grid-template-columns: repeat(3, 1fr)} .sec-item:nth-of-type(n+4) { border-top: 1px solid var(--border)} .sec-nl { display: none} .footer-grid { grid-template-columns: 1fr 1fr}
}

@media (max-width: 600px) { .hero-cards { grid-template-columns: repeat(2, 1fr); grid-template-rows: 1fr 1fr; height: 280px} .cards-grid { grid-template-columns: 1fr} .footer-grid { grid-template-columns: 1fr}
} @keyframes shake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-6px)} 40%{transform:translateX(6px)} 60%{transform:translateX(-4px)} 80%{transform:translateX(4px)}
}

/* ===== STATIC PAGES — about / write / editorial / contact ===== */
.util-hero { background: var(--surface); border-bottom: 1px solid var(--border); padding: 40px 0 32px; }
.util-hero h1 { font-size: 30px; font-weight: 700; color: var(--fg); display: flex; align-items: center; gap: 12px; }
.util-hero p { color: var(--fg2); font-size: 15px; margin-top: 10px; max-width: 56ch; line-height: 1.8; }
.util-body { max-width: 720px; margin: 0 auto; padding: 40px 24px 60px; }
.util-body h2 { font-size: 20px; font-weight: 700; color: var(--fg); margin: 32px 0 12px; }
.util-body h2:first-child { margin-top: 0; }
.util-body p { font-size: 15px; color: var(--fg2); line-height: 1.9; margin-bottom: 16px; }
.util-body ul { padding-right: 20px; color: var(--fg2); font-size: 15px; line-height: 2; margin-bottom: 16px; }
.util-body a { color: #9C743C; text-decoration: underline; text-underline-offset: 3px; }


.form-field { margin-bottom: 16px; }
.form-label { display: block; font-size: 13.5px; font-weight: 500; color: var(--fg2); margin-bottom: 6px; }
.form-input { width: 100%; background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 11px 14px; color: var(--fg); font-family: var(--font); font-size: 14px; outline: none; transition: border-color .15s; box-sizing: border-box; }
.form-input:focus { border-color: #9C743C; box-shadow: 0 0 0 3px rgba(156,116,60,.12); }
.form-input.error { border-color: #BE4520; }
.form-textarea { min-height: 130px; resize: vertical; }
.form-btn { background: #9C743C; color: #fff; border: none; border-radius: 8px; padding: 12px 28px; font-size: 14.5px; font-weight: 600; font-family: var(--font); cursor: pointer; transition: opacity .15s; }
.form-btn:hover { opacity: .88; }
.form-btn:disabled { opacity: .55; cursor: not-allowed; }
.form-success { display: none; margin-top: 16px; background: rgba(30,122,110,.1); border: 1px solid rgba(30,122,110,.3); border-radius: 8px; padding: 14px 18px; color: #1E7A6E; font-size: 14px; line-height: 1.7; }
.form-error-msg { display: none; margin-top: 16px; background: rgba(190,69,32,.1); border: 1px solid rgba(190,69,32,.3); border-radius: 8px; padding: 14px 18px; color: #BE4520; font-size: 14px; }

.contact-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 24px 0 32px; }
.contact-info-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 18px; display: flex; align-items: flex-start; gap: 12px; }
.contact-info-icon { width: 38px; height: 38px; border-radius: 8px; background: rgba(156,116,60,.12); color: #9C743C; display: grid; place-items: center; flex-shrink: 0; }
.contact-info-label { font-size: 13px; color: var(--fg3); margin-bottom: 2px; }
.contact-info-value { font-size: 14px; font-weight: 500; color: var(--fg); }
@media (max-width: 560px) { .contact-info-grid { grid-template-columns: 1fr; } }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE SYSTEM — header, drawer, and layout across all sizes
   Single source of truth: --nav-h drives both nav height AND the
   body padding that compensates for the fixed header, so they can
   never drift out of sync.
   ═══════════════════════════════════════════════════════════════ */

:root { --nav-h: 80px; }
body { padding-top: var(--nav-h); }

/* Never allow horizontal scroll on any device */
html, body { max-width: 100%; overflow-x: hidden; }
img, video, iframe, table { max-width: 100%; }

/* Accessibility: skip link */
.skip-link { position: absolute; right: -9999px; top: 0; z-index: 2000; background: #9C743C; color: #fff; padding: 10px 18px; border-radius: 0 0 8px 0; font-size: 14px; }
.skip-link:focus { right: 0; }

/* Prevent iOS auto-zoom when focusing inputs (needs >=16px) */
input, select, textarea { font-size: 16px; }
@media (min-width: 861px) { input, select, textarea { font-size: 14px; } }

/* ── Hamburger button ── */
.nav-burger { display: none; width: 44px; height: 44px; border-radius: 8px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; background: none; border: none; cursor: pointer; flex-shrink: 0; transition: background .15s; }
.nav-burger:hover { background: var(--hover); }
.burger-bar { display: block; width: 22px; height: 2px; background: var(--fg); border-radius: 2px; transition: transform .28s ease, opacity .2s ease; }
.nav-burger.open .burger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open .burger-bar:nth-child(2) { opacity: 0; }
.nav-burger.open .burger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Slide-in drawer ── */
.mobile-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(86vw, 340px);
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 1600;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: env(safe-area-inset-bottom);
}
.mobile-drawer.open { transform: translateX(0); }

.drawer-overlay {
  position: fixed; inset: 0; background: rgba(6,13,24,.55);
  z-index: 1500; opacity: 0; visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.drawer-overlay.open { opacity: 1; visibility: visible; }

.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.drawer-title { font-size: 15px; font-weight: 600; color: var(--fg); }
.drawer-close { width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; color: var(--fg2); background: none; border: none; cursor: pointer; transition: background .15s, color .15s; }
.drawer-close:hover { background: var(--hover); color: var(--fg); }

.drawer-links { display: flex; flex-direction: column; padding: 8px 0; }
.drawer-links a { display: block; padding: 14px 20px; font-size: 16px; color: var(--fg); border-right: 3px solid transparent; transition: background .15s, border-color .15s, color .15s; }
.drawer-links a:hover, .drawer-links a:focus { background: var(--hover); border-right-color: var(--brass); color: var(--brass); }
.drawer-links a.on { border-right-color: var(--brass); color: var(--brass); font-weight: 500; }
.drawer-secondary a { font-size: 14.5px; color: var(--fg2); padding: 12px 20px; }
.drawer-sep { height: 1px; background: var(--border); margin: 8px 20px; }
.drawer-foot { margin-top: auto; padding: 16px 20px 22px; border-top: 1px solid var(--border); }
.drawer-search { display: flex; align-items: center; gap: 9px; font-size: 14.5px; color: var(--fg2); padding: 11px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); }
.drawer-search:hover { border-color: var(--brass); color: var(--brass); }

/* Lock background scroll while the drawer is open */
body.drawer-open { overflow: hidden; }

/* ═══ BREAKPOINTS ═══════════════════════════════════════════════ */

/* Small laptop / large tablet landscape — tighten the desktop nav */
@media (max-width: 1100px) {
  .nav-links { gap: 18px; font-size: 13.5px; }
  .nav-inner { gap: 14px; padding: 0 20px; }
  .brand-name { font-size: 24px; }
  .nav-logo { height: 56px; }
}

/* iPad portrait/landscape and below — switch to the drawer.
   The seven inline links + brand + sign-in need roughly 953px to sit
   comfortably on one line. Switching at 980px leaves headroom instead
   of cutting it fine, so nothing ever crowds or wraps. */
@media (max-width: 980px) {
  :root { --nav-h: 68px; }
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav-logo { height: 46px; }
  .brand { gap: 10px; align-items: center; }
  .brand-text { padding-bottom: 0; }
  .brand-name { font-size: 20px; }
  .brand-sub { font-size: 11px; }
  .nav-inner { padding: 0 16px; gap: 10px; }
  .nav-left { gap: 6px; }
  .nav-signin { padding: 9px 14px; font-size: 13.5px; }
}

/* Phones — collapse the sign-in label to just the icon so the
   header never wraps or overflows on narrow screens. */
@media (max-width: 560px) {
  :root { --nav-h: 62px; }
  .nav-logo { height: 40px; }
  .brand-name { font-size: 17px; }
  .brand-sub { display: none; }
  .signin-label { display: none; }
  .nav-signin { padding: 0; width: 40px; height: 40px; justify-content: center; border-radius: 50%; }
  .nav-signin svg { width: 17px; height: 17px; }
  .nav-icon { width: 40px; height: 40px; }
  .nav-inner { padding: 0 12px; }
}

/* Very small phones (iPhone SE, 320–360px) */
@media (max-width: 380px) {
  :root { --nav-h: 58px; }
  .nav-logo { height: 34px; }
  .brand-name { font-size: 15px; }
  .brand { gap: 7px; }
  .nav-left { gap: 2px; }
  .nav-inner { padding: 0 10px; }
  .nav-icon, .nav-signin { width: 36px; height: 36px; }
  .nav-burger { width: 40px; }
}

/* ── Content layout across sizes ── */

/* iPad portrait */
@media (max-width: 1024px) {
  .wrap { padding: 0 20px; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .hero { margin-top: 16px; }
  .util-body { padding: 28px 20px 48px; }
  .util-hero { padding: 28px 0 24px; }
  .util-hero h1 { font-size: 24px; }
  .art-title { font-size: clamp(22px, 5vw, 30px); }
  .art-dek { font-size: 15.5px; }
  .art-body { font-size: 16.5px; }
}

@media (max-width: 600px) {
  /* Mobile browsers resize the viewport as their toolbars show/hide,
     which makes a thin fixed bar jitter or sit at the wrong offset.
     It adds little on a small screen, so we simply drop it. */
  .read-progress { display: none; }
  .wrap { padding: 0 14px; }
  .hero { margin-top: 12px; border-radius: 8px; }
  .hero-featured { border-radius: 8px 8px 0 0; padding: 20px 18px; }
  .hero-cards { border-radius: 0 0 8px 8px; }
  .feat-dek { display: none; }
  .sec-row { grid-template-columns: 1fr 1fr; }
  .sec-item:nth-of-type(n+3) { border-top: 1px solid var(--border); }
  .art-hero { height: 200px; border-radius: 8px; }
  .art-body { font-size: 16px; line-height: 1.95; }
  .art-body h2 { font-size: 19px; }
  .footer-grid { gap: 26px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
  .comment-body-wrap { gap: 9px; }
}

@media (max-width: 420px) {
  .hero-featured { min-height: 220px; }
  .hero-cards { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); height: 220px; }
  .sec-row { grid-template-columns: 1fr; }
  .sec-item { border-left: none; }
  .sec-item:nth-of-type(n+2) { border-top: 1px solid var(--border); }
  .hcard-title { font-size: 13.5px; }
}

/* Landscape phones — keep the hero from eating the whole screen */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { height: auto; }
  .hero-featured { min-height: 220px; }
  .mobile-drawer { padding-bottom: 10px; }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .mobile-drawer { transition: none; }
}

/* ===== ALL ARTICLES PAGE ===== */
.articles-page-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 8px; }
.articles-page-grid .acard-img { height: 170px; }
.acard-excerpt { font-size: 13px; color: var(--fg2); line-height: 1.75; margin: 6px 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: 24px 0 20px; }
.filter-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 20px; border: 1px solid var(--border); background: var(--card); color: var(--fg2); font-size: 13.5px; font-family: var(--font); cursor: pointer; transition: all .15s; text-decoration: none; }
.filter-btn:hover { border-color: #9C743C; color: #9C743C; }
.filter-btn.on { background: #9C743C; color: #fff; border-color: #9C743C; }
.filter-count { font-size: 11px; opacity: .7; }
.page-dots { color: var(--fg3); padding: 0 4px; }
.no-articles { text-align: center; padding: 70px 20px; color: var(--fg3); }
.no-articles h2 { font-size: 20px; font-weight: 600; color: var(--fg); margin: 14px 0 8px; }
.no-articles p { font-size: 14.5px; margin-bottom: 6px; }

@media (max-width: 900px) { .articles-page-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; } }
@media (max-width: 560px) { .articles-page-grid { grid-template-columns: 1fr; gap: 16px; } .articles-page-grid .acard-img { height: 190px; } .filter-btn { font-size: 13px; padding: 7px 13px; } }

/* ===== FORM ENHANCEMENTS ===== */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; gap: 0; } }
.char-count { font-size: 12px; color: var(--fg3); margin-top: 5px; }
.form-input.error { border-color: #BE4520; background: rgba(190,69,32,.04); }
.form-input:disabled { opacity: .6; }
select.form-input { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A8F98' stroke-width='2' stroke-linecap='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: left 12px center; background-size: 16px; padding-left: 36px; }
