/*
Theme Name: JollyGrant Guide
Theme URI: https://jollygrant.in/
Author: JollyGrant.in
Description: Fast, mobile-first local guide theme for Jolly Grant (Dehradun): airport, Himalayan Hospital, travel and stay guides. Built for Core Web Vitals, clean SEO markup and policy-friendly ad placement.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jg
Tags: blog, news, one-column, custom-menu, featured-images, translation-ready
*/

/* ---------- Tokens ---------- */
:root{
  --bg:#fbfaf7;
  --surface:#ffffff;
  --ink:#16201c;
  --ink-2:#3f4a45;
  --muted:#6b7570;
  --line:#e6e3dc;
  --brand:#1f5fbf;
  --brand-2:#174a96;
  --brand-tint:#e9f1fd;
  --accent:#e08a1e;
  --accent-tint:#fdf1e1;
  --radius:14px;
  --radius-sm:10px;
  --shadow:0 1px 2px rgba(16,32,28,.04),0 8px 24px rgba(16,32,28,.06);
  --wrap:1180px;
  --read:720px;
  --f-display:"Fraunces",Georgia,"Times New Roman",serif;
  --f-body:"Plus Jakarta Sans",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
}

/* ---------- Base ---------- */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth;scroll-padding-top:84px}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{transition:none!important;animation:none!important}}
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--f-body);font-size:17px;line-height:1.7;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}
img,svg,video,iframe{max-width:100%;height:auto;display:block}
a{color:var(--brand);text-decoration-thickness:1px;text-underline-offset:3px}
a:hover{color:var(--brand-2)}
h1,h2,h3,h4{font-family:var(--f-display);color:var(--ink);line-height:1.2;font-weight:600;letter-spacing:-.01em;margin:1.6em 0 .55em}
h1{font-size:clamp(1.9rem,4.6vw,2.9rem);margin-top:0}
h2{font-size:clamp(1.45rem,3vw,1.9rem)}
h3{font-size:clamp(1.15rem,2.2vw,1.35rem)}
p{margin:0 0 1.15em}
.screen-reader-text{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap}
.skip-link:focus{position:fixed;top:8px;left:8px;width:auto;height:auto;clip:auto;z-index:999;background:var(--ink);color:#fff;padding:10px 14px;border-radius:8px}
:focus-visible{outline:3px solid var(--accent);outline-offset:2px;border-radius:4px}
.wrap{max-width:var(--wrap);margin:0 auto;padding:0 16px}
@media (min-width:768px){.wrap{padding:0 24px}}

/* ---------- Header ---------- */
.site-header{position:sticky;top:0;z-index:50;background:rgba(251,250,247,.92);backdrop-filter:saturate(1.4) blur(10px);-webkit-backdrop-filter:saturate(1.4) blur(10px);border-bottom:1px solid var(--line)}
.header-inner{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:64px}
.logo{display:flex;flex-direction:column;text-decoration:none;line-height:1}
.logo-word{font-family:var(--f-display);font-weight:700;font-size:1.55rem;letter-spacing:-.02em;color:var(--ink)}
.logo-word b{color:var(--brand);font-weight:700}
.logo-word i{font-style:normal;color:var(--accent)}
.logo-tag{font-size:.66rem;letter-spacing:.16em;text-transform:uppercase;color:var(--muted);margin-top:4px;font-weight:600}
.nav-toggle{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border:1px solid var(--line);background:var(--surface);border-radius:12px;cursor:pointer;color:var(--ink)}
.nav-toggle svg{width:22px;height:22px}
.primary-nav{display:none;position:absolute;left:0;right:0;top:100%;background:var(--surface);border-bottom:1px solid var(--line);box-shadow:var(--shadow)}
.primary-nav.is-open{display:block}
.primary-nav ul{list-style:none;margin:0;padding:8px 16px 16px}
.primary-nav li a{display:block;padding:12px 4px;font-weight:600;color:var(--ink);text-decoration:none;border-bottom:1px solid var(--line)}
.primary-nav li:last-child a{border-bottom:0}
.primary-nav .current-menu-item>a,.primary-nav a:hover{color:var(--brand)}
.primary-nav .sub-menu{padding:0 0 0 14px}
@media (min-width:960px){
  .nav-toggle{display:none}
  .primary-nav{display:block;position:static;background:none;border:0;box-shadow:none}
  .primary-nav ul{display:flex;gap:4px;padding:0}
  .primary-nav li{position:relative}
  .primary-nav li a{border:0;padding:10px 14px;border-radius:10px;font-size:.95rem}
  .primary-nav li a:hover{background:var(--brand-tint)}
  .primary-nav .sub-menu{display:none;position:absolute;top:100%;left:0;min-width:220px;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);padding:6px;flex-direction:column}
  .primary-nav li:hover>.sub-menu,.primary-nav li:focus-within>.sub-menu{display:flex}
}

/* ---------- Hero ---------- */
.hero{padding:40px 0 28px;background:
  radial-gradient(1200px 300px at 10% -10%,var(--brand-tint),transparent 60%),
  radial-gradient(800px 260px at 100% 0,var(--accent-tint),transparent 60%)}
.hero .eyebrow{display:inline-block;font-size:.75rem;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--brand);background:var(--surface);border:1px solid var(--line);padding:6px 10px;border-radius:999px;margin-bottom:14px}
.hero h1{max-width:18ch}
.hero p.lead{font-size:1.1rem;color:var(--ink-2);max-width:60ch}
.quick-links{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:22px}
@media (min-width:768px){.quick-links{grid-template-columns:repeat(4,1fr);gap:14px}}
.quick-links a{display:flex;flex-direction:column;gap:4px;padding:14px 16px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);text-decoration:none;color:var(--ink);box-shadow:var(--shadow);transition:transform .15s ease,border-color .15s ease}
.quick-links a:hover{transform:translateY(-2px);border-color:var(--brand)}
.quick-links strong{font-family:var(--f-display);font-size:1.05rem}
.quick-links span{font-size:.85rem;color:var(--muted);line-height:1.4}

/* ---------- Layout ---------- */
.site-main{padding:28px 0 56px}
.section-title{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:8px 0 18px}
.section-title h2{margin:0;font-size:1.5rem}
.grid{display:grid;gap:18px;grid-template-columns:1fr}
@media (min-width:640px){.grid{grid-template-columns:repeat(2,1fr)}}
@media (min-width:1024px){.grid{grid-template-columns:repeat(3,1fr);gap:24px}}

/* ---------- Cards ---------- */
.card{display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);transition:transform .15s ease,box-shadow .15s ease}
.card:hover{transform:translateY(-2px)}
.card-media{aspect-ratio:16/9;background:linear-gradient(135deg,var(--brand) 0%,var(--brand-2) 55%,#13284d 100%);position:relative;display:block;overflow:hidden}
.card-media img{width:100%;height:100%;object-fit:cover}
.card-media .ph{position:absolute;inset:0;display:flex;align-items:flex-end;padding:16px;color:#fff;font-family:var(--f-display);font-size:1.25rem;font-weight:600}
.card-media .ph::before{content:"";position:absolute;right:-30px;bottom:-40px;width:220px;height:160px;background:linear-gradient(160deg,transparent 45%,rgba(255,255,255,.09) 46%,rgba(255,255,255,.09) 60%,transparent 61%),linear-gradient(200deg,transparent 45%,rgba(255,255,255,.06) 46%,rgba(255,255,255,.06) 62%,transparent 63%)}
.card-body{padding:16px 18px 18px;display:flex;flex-direction:column;gap:8px;flex:1}
.card-cat{font-size:.72rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--accent);text-decoration:none}
.card-title{font-family:var(--f-display);font-size:1.2rem;line-height:1.3;margin:0}
.card-title a{color:var(--ink);text-decoration:none}
.card-title a:hover{color:var(--brand)}
.card-excerpt{color:var(--ink-2);font-size:.95rem;margin:0;line-height:1.6}
.card-meta{margin-top:auto;font-size:.8rem;color:var(--muted)}

/* ---------- Article ---------- */
.article-wrap{display:grid;grid-template-columns:1fr;gap:40px}
@media (min-width:1080px){.article-wrap{grid-template-columns:minmax(0,var(--read)) 300px;justify-content:center}}
.breadcrumbs{font-size:.85rem;color:var(--muted);margin-bottom:14px}
.breadcrumbs a{color:var(--muted);text-decoration:none}
.breadcrumbs a:hover{color:var(--brand)}
.entry-header .card-cat{display:inline-block;margin-bottom:10px}
.entry-meta{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:.88rem;color:var(--muted);margin:10px 0 22px;padding-bottom:18px;border-bottom:1px solid var(--line)}
.entry-meta strong{color:var(--ink-2);font-weight:600}
.entry-thumb{border-radius:var(--radius);overflow:hidden;margin:0 0 24px}
.entry-content{font-size:1.06rem}
.entry-content>*:first-child{margin-top:0}
.entry-content ul,.entry-content ol{padding-left:1.3em;margin:0 0 1.2em}
.entry-content li{margin:.3em 0}
.entry-content blockquote{margin:1.6em 0;padding:14px 20px;border-left:4px solid var(--accent);background:var(--accent-tint);border-radius:0 var(--radius-sm) var(--radius-sm) 0}
.entry-content table{width:100%;border-collapse:collapse;margin:1.4em 0;font-size:.95rem;display:block;overflow-x:auto}
.entry-content th,.entry-content td{border:1px solid var(--line);padding:10px 12px;text-align:left;vertical-align:top}
.entry-content th{background:var(--brand-tint);font-weight:700}
.entry-content figure{margin:1.6em 0}
.entry-content figcaption{font-size:.85rem;color:var(--muted);margin-top:6px}
.entry-content .wp-block-table{overflow-x:auto}
.note,.entry-content .note{background:var(--brand-tint);border:1px solid #cddcf5;border-radius:var(--radius-sm);padding:14px 16px;margin:1.4em 0;font-size:.97rem}
.key-facts{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:18px 20px;margin:0 0 1.6em;box-shadow:var(--shadow)}
.key-facts h2{margin-top:0;font-size:1.2rem}
.key-facts ul{margin:0}

/* TOC */
.toc{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:4px 18px;margin:0 0 28px}
.toc summary{cursor:pointer;font-weight:700;padding:12px 0;list-style:none;display:flex;justify-content:space-between}
.toc summary::-webkit-details-marker{display:none}
.toc summary::after{content:"▾";color:var(--brand);font-size:1rem;line-height:1;transition:transform .2s}
.toc[open] summary::after{transform:rotate(180deg)}
.toc ol{margin:0 0 14px;padding-left:1.2em;font-size:.95rem}
.toc li{margin:.35em 0}
.toc a{text-decoration:none}

/* FAQ (Yoast FAQ block + plain) */
.schema-faq,.faq{margin:1.6em 0}
.schema-faq-section,.faq-item{border:1px solid var(--line);border-radius:var(--radius-sm);padding:14px 16px;margin:0 0 10px;background:var(--surface)}
.schema-faq-question{display:block;font-weight:700;font-size:1.02rem;margin-bottom:6px;color:var(--ink)}
.schema-faq-answer{margin:0;color:var(--ink-2)}

/* Ads: clearly labelled, never disguised as content or navigation */
.ad-slot{margin:28px 0;text-align:center;min-height:0}
.ad-slot::before{content:"Advertisement";display:block;font-size:.68rem;letter-spacing:.14em;text-transform:uppercase;color:var(--muted);margin-bottom:6px}
.ad-slot:empty{display:none}

/* Author box */
.author-box{display:flex;gap:14px;align-items:flex-start;margin:36px 0 0;padding:18px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface)}
.author-box .avatar{border-radius:50%;flex:0 0 56px}
.author-box h3{margin:0 0 4px;font-size:1.05rem}
.author-box p{margin:0;font-size:.93rem;color:var(--ink-2)}
.updated-note{font-size:.88rem;color:var(--muted);margin-top:22px}

/* Sidebar */
.sidebar{display:flex;flex-direction:column;gap:20px}
@media (min-width:1080px){.sidebar .sticky{position:sticky;top:88px}}
.widget{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:18px}
.widget-title{font-family:var(--f-display);font-size:1.1rem;margin:0 0 10px}
.widget ul{list-style:none;padding:0;margin:0}
.widget li{padding:8px 0;border-bottom:1px solid var(--line);font-size:.95rem;line-height:1.45}
.widget li:last-child{border-bottom:0}
.widget li a{text-decoration:none;color:var(--ink)}
.widget li a:hover{color:var(--brand)}

/* Related */
.related{margin-top:48px}
.related h2{font-size:1.4rem}

/* Search form */
.search-form{display:flex;gap:8px}
.search-form input[type=search]{flex:1;min-width:0;padding:12px 14px;border:1px solid var(--line);border-radius:12px;font:inherit;background:var(--surface)}
.btn,.search-form button{display:inline-flex;align-items:center;justify-content:center;padding:12px 18px;border:0;border-radius:12px;background:var(--brand);color:#fff;font:inherit;font-weight:700;cursor:pointer;text-decoration:none}
.btn:hover,.search-form button:hover{background:var(--brand-2);color:#fff}

/* Pagination */
.pagination{margin:36px 0 0}
.pagination .nav-links{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.pagination .page-numbers{display:inline-flex;min-width:44px;height:44px;align-items:center;justify-content:center;padding:0 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);text-decoration:none;color:var(--ink);font-weight:600}
.pagination .current{background:var(--brand);border-color:var(--brand);color:#fff}

/* Archive header */
.archive-header{padding:28px 0 6px}
.archive-header p{color:var(--ink-2);max-width:65ch}

/* Comments */
.comments-area{margin-top:40px}
.comment-list{list-style:none;padding:0}
.comment-body{border:1px solid var(--line);border-radius:var(--radius-sm);padding:14px;margin-bottom:12px;background:var(--surface)}
.comment-form input,.comment-form textarea{width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:10px;font:inherit}
.comment-form .submit{background:var(--brand);color:#fff;border:0;border-radius:12px;padding:12px 18px;font-weight:700;cursor:pointer}

/* Footer */
.site-footer{background:#0d1a33;color:#c8d3e6;padding:44px 0 24px;font-size:.93rem}
.site-footer a{color:#e6edf8;text-decoration:none}
.site-footer a:hover{color:#fff;text-decoration:underline}
.footer-grid{display:grid;gap:28px;grid-template-columns:1fr}
@media (min-width:768px){.footer-grid{grid-template-columns:1.4fr 1fr 1fr}}
.site-footer .logo-word{color:#fff}
.site-footer .logo-word b{color:#9cc2ff}
.site-footer .logo-tag{color:#9aabc8}
.site-footer h3{color:#fff;font-family:var(--f-body);font-size:.8rem;letter-spacing:.14em;text-transform:uppercase;margin:0 0 12px}
.site-footer ul{list-style:none;margin:0;padding:0}
.site-footer li{margin:0 0 8px}
.footer-bottom{border-top:1px solid rgba(255,255,255,.1);margin-top:32px;padding-top:18px;display:flex;flex-wrap:wrap;gap:10px;justify-content:space-between;font-size:.84rem;color:#9aabc8}

/* WP core alignment */
.alignwide{max-width:var(--wrap)}
.aligncenter{margin-left:auto;margin-right:auto}
.wp-caption-text{font-size:.85rem;color:var(--muted)}

/* Promote your business form */
.promo{margin:40px 0 0;padding:24px 20px;border-radius:var(--radius);background:linear-gradient(160deg,var(--brand-tint),#fff 70%);border:1px solid #cddcf5}
.promo-kicker{display:inline-block;font-size:.72rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--accent)}
.promo h2{margin:.3em 0 .4em;font-size:clamp(1.3rem,3vw,1.6rem)}
.promo-head p{color:var(--ink-2);margin-bottom:18px}
.promo-form{display:flex;flex-direction:column;gap:14px}
.promo-form label{display:flex;flex-direction:column;gap:6px;font-size:.92rem;font-weight:600;color:var(--ink)}
.promo-form input[type=text],.promo-form input[type=tel],.promo-form input[type=email],.promo-form select,.promo-form textarea{width:100%;padding:12px 14px;border:1px solid var(--line);border-radius:12px;font:inherit;font-weight:400;background:#fff;color:var(--ink)}
.promo-form input:focus,.promo-form select:focus,.promo-form textarea:focus{border-color:var(--brand);outline:none;box-shadow:0 0 0 3px rgba(31,95,191,.15)}
.f-row{display:grid;gap:14px;grid-template-columns:1fr}
@media (min-width:640px){.f-row{grid-template-columns:1fr 1fr}}
.promo-form fieldset{border:1px solid var(--line);border-radius:12px;padding:12px 14px;margin:0;background:#fff}
.promo-form legend{font-size:.92rem;font-weight:600;padding:0 6px}
.promo-form .chk{flex-direction:row;align-items:center;gap:10px;font-weight:400;padding:4px 0}
.promo-form .chk input{width:18px;height:18px;accent-color:var(--brand)}
.promo-form .btn{align-self:flex-start;padding:14px 22px}
.promo-note{font-size:.82rem;color:var(--muted);margin:0}
.promo-msg{padding:12px 14px;border-radius:10px;font-weight:600}
.promo-msg.ok{background:#e7f6ec;color:#17643a}
.promo-msg.err{background:#fdecec;color:#9b1c1c}
.hp{position:absolute!important;left:-9999px;width:1px;height:1px;overflow:hidden}
