/*
Theme Name: Guidebook
Theme URI: https://gurugram.property/
Description: Shared parent block theme for three independent guide sites (Indian.Airforce, Indian.Navy, Gurugram.Property). Install it, then activate the child theme for the site.
Author: Shubham
Version: 0.1.0
Requires at least: 6.5
Tested up to: 6.9
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: guidebook
Tags: blog, news, block-patterns, full-site-editing, rtl-language-support
*/

/* ---------- Tokens ---------- */
/* WordPress prints preset variables on body, so tokens live there. */
:root { --gb-header-h: 64px; }
body {
	--gb-base: var(--wp--preset--color--base);
	--gb-surface: var(--wp--preset--color--surface);
	--gb-ink: var(--wp--preset--color--ink);
	--gb-heading: var(--wp--preset--color--heading);
	--gb-primary: var(--wp--preset--color--primary);
	--gb-accent: var(--wp--preset--color--accent);
	--gb-soft: var(--wp--preset--color--soft);
	--gb-card: var(--wp--preset--color--card);
	--gb-line: var(--wp--preset--color--line);
	--gb-muted: var(--wp--preset--color--muted);
	--gb-gutter: var(--wp--custom--gutter, 20px);
	--gb-wide: 1180px;
	--gb-article: 1084px;
	--gb-radius: var(--wp--custom--radius, 6px);
	--gb-radius-card: var(--wp--custom--radius-card, 8px);
	--gb-shadow: var(--wp--custom--shadow);
}

/* ---------- Base ---------- */
html { scroll-padding-top: calc(var(--gb-header-h) + 24px); }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img, svg { max-width: 100%; height: auto; }
:where(.wp-site-blocks) > * { margin-block: 0; }
:focus-visible { outline: 2px solid var(--gb-primary); outline-offset: 2px; }
.gb-container { width: min(100% - 2 * var(--gb-gutter), var(--gb-wide)); margin-inline: auto; }
.gb-narrow { max-width: 760px; }
.gb-main { min-height: 50vh; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }

/* Flow-layout gaps are handled per component. */
.gb-header :where(.is-layout-flow) > *,
.gb-footer :where(.is-layout-flow) > *,
.gb-card :where(.is-layout-flow) > *,
.gb-card > * { margin-block-start: 0; margin-block-end: 0; }

/* ---------- Header ---------- */
.gb-header-wrap { position: sticky; top: 0; z-index: 50; }
.admin-bar .gb-header-wrap { top: 32px; }
@media (max-width: 782px) { .admin-bar .gb-header-wrap { top: 0; position: relative; } }
.gb-header { background: var(--gb-heading); color: #fff; }
.gb-header__row { min-height: var(--gb-header-h); gap: 24px; }
.gb-wordmark { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 1.3125rem; letter-spacing: -0.01em; line-height: 1; white-space: nowrap; margin: 0; }
.gb-wordmark a { color: inherit; text-decoration: none; }
.gb-wordmark svg { flex: none; width: 28px; height: 28px; }
.gb-wordmark em { font-style: normal; opacity: .72; font-weight: 600; }
.gb-header .gb-nav { margin-left: auto; }
.gb-header .gb-nav a { color: rgba(255,255,255,.9); text-decoration: none; padding-block: 6px; border-bottom: 2px solid transparent; }
.gb-header .gb-nav a:hover, .gb-header .gb-nav .current-menu-item > a { color: #fff; border-bottom-color: currentColor; }
.gb-header .wp-block-navigation__container { gap: 26px; }
.gb-header .wp-block-navigation__responsive-container-open, .gb-header .wp-block-navigation__responsive-container-close { color: #fff; }
.gb-header .wp-block-navigation__responsive-container.is-menu-open { background: var(--gb-heading) !important; color: #fff !important; padding: 24px var(--gb-gutter); }
.gb-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 18px; font-size: 1.125rem; }
.gb-header .wp-block-search__button { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.28); border-radius: var(--gb-radius); padding: 7px; margin-left: 0; }
.gb-header .wp-block-search__button svg { width: 20px; height: 20px; fill: currentColor; }
.gb-header .wp-block-search__input { border-radius: var(--gb-radius); border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.08); color: #fff; padding: 6px 10px; }
.gb-header .wp-block-search__input::placeholder { color: rgba(255,255,255,.65); }
.gb-header .wp-block-search { margin: 0; }
.gb-topnote { background: color-mix(in srgb, var(--gb-heading) 88%, #000); color: rgba(255,255,255,.78); font-size: .78rem; line-height: 1.4; }
.gb-topnote p { margin: 0; padding: 6px 0; text-align: center; }
@media (max-width: 781px) {
	.gb-header__row { gap: 10px; }
	.gb-header .gb-nav { order: 3; margin-left: 0; }
	.gb-header .wp-block-search { margin-left: auto; }
	.gb-wordmark { font-size: 1.125rem; }
	.gb-wordmark svg { width: 24px; height: 24px; }
}

/* ---------- Footer ---------- */
.gb-footer { background: var(--gb-heading); color: rgba(255,255,255,.78); padding: 56px 0 32px; margin-top: 0; font-size: .9375rem; }
.gb-footer a { color: #fff; }
.gb-footer__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.gb-footer__about p { margin: 14px 0 0; max-width: 46ch; }
.gb-footer__links { display: flex; flex-wrap: wrap; gap: 10px 20px; max-width: 640px; margin: 0; padding: 0; list-style: none; flex-direction: column; }
.gb-footer__title { font-size: .75rem !important; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.55); margin: 0 0 12px !important; font-weight: 600; }
.gb-footer__col > * { margin: 0; }
.gb-footer__links a { text-decoration: none; opacity: .9; }
.gb-footer__links a:hover { text-decoration: underline; opacity: 1; }
.gb-footer__legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.14); display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; font-size: .8125rem; color: rgba(255,255,255,.62); }
.gb-footer__legal p { margin: 0; }
.gb-footer__disclaimer { color: rgba(255,255,255,.86) !important; max-width: 70ch; }
@media (max-width: 781px) {
	.gb-footer__grid { grid-template-columns: 1fr; gap: 24px; }

}

/* ---------- Buttons ---------- */
.wp-block-button__link { transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease; text-decoration: none; }
.wp-block-button.is-style-outline > .wp-block-button__link { background: transparent; color: var(--gb-primary); border: 1.5px solid currentColor; padding: calc(.8em - 1.5px) calc(1.4em - 1.5px); }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--gb-primary); color: #fff; border-color: var(--gb-primary); }
.wp-block-button.gb-btn-accent > .wp-block-button__link { background: var(--gb-accent); color: var(--gb-heading); }
.wp-block-button.gb-btn-accent > .wp-block-button__link:hover { filter: brightness(1.05); transform: translateY(-1px); }
.gb-link-arrow { font-weight: 600; text-decoration: none; }
.gb-link-arrow::after { content: " →"; transition: margin .15s ease; }
.gb-link-arrow:hover::after { margin-left: 4px; }

/* ---------- Section scaffolding ---------- */
.gb-section { padding-block: clamp(40px, 6vw, 72px); }
.gb-section + .gb-section { padding-top: 0; }
.gb-eyebrow { font-size: .8125rem; font-weight: 600; letter-spacing: .04em; color: var(--gb-muted); margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.gb-eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--gb-line); }
.gb-section-title { font-size: var(--wp--preset--font-size--x-large); margin: 0 0 20px; }
.gb-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.gb-section-head .gb-section-title { margin: 0; }
.gb-section-head p { margin: 0; }

/* ---------- Cards (Query Loop) ---------- */
.gb-cards .wp-block-post-template { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }
.gb-cards .wp-block-post-template > li { margin: 0; display: flex; }
.gb-card { background: var(--gb-card); border: 1px solid var(--gb-line); border-radius: var(--gb-radius-card); overflow: hidden; display: flex; flex-direction: column; width: 100%; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; position: relative; }
.gb-card:hover { transform: translateY(-2px); box-shadow: var(--gb-shadow); border-color: color-mix(in srgb, var(--gb-primary) 35%, var(--gb-line)); }
.gb-card__art { aspect-ratio: 16 / 7; background-color: var(--gb-soft); background-size: cover; background-position: center; border-bottom: 1px solid var(--gb-line); }
.gb-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.gb-card__title { font-size: 1.1875rem; line-height: 1.4; margin: 0; }
.gb-card__title a { color: var(--gb-heading); text-decoration: none; }
.gb-card__title a::after { content: ""; position: absolute; inset: 0; }
.gb-card__title a:hover { color: var(--gb-primary); }
.gb-card__excerpt { color: var(--gb-muted); font-size: .9375rem; line-height: 1.65; margin: 0; }
.gb-card__excerpt p { margin: 0; }
.gb-card__excerpt .wp-block-post-excerpt__more-text { display: none; }
.gb-card__date { color: var(--gb-muted); font-size: .8125rem; margin-top: auto; padding-top: 6px; }
.gb-kicker { font-size: .8125rem; font-weight: 600; margin: 0; position: relative; z-index: 1; }
.gb-kicker a { color: var(--gb-primary); text-decoration: none; }
.gb-kicker a:hover { text-decoration: underline; }
.gb-kicker .wp-block-post-terms__separator { color: var(--gb-muted); }

/* ---------- Page and archive heads ---------- */
.gb-page-head { background: var(--gb-soft); border-bottom: 1px solid var(--gb-line); padding: clamp(36px, 6vw, 64px) 0 clamp(28px, 4vw, 44px); margin-bottom: clamp(28px, 4vw, 48px); }
.gb-page-title { margin: 0; font-size: var(--wp--preset--font-size--xx-large); }
.gb-archive-desc { margin-top: 10px; color: var(--gb-muted); max-width: 64ch; }
.gb-archive-desc p { margin: 0; }
.gb-pagination { margin-top: 40px; gap: 6px; font-weight: 600; }
.gb-pagination a, .gb-pagination .page-numbers { padding: 6px 12px; border-radius: var(--gb-radius); text-decoration: none; }
.gb-pagination .current { background: var(--gb-heading); color: #fff; }
.gb-empty { padding: 24px; background: var(--gb-surface); border: 1px dashed var(--gb-line); border-radius: var(--gb-radius-card); }
.gb-archive .gb-cards { padding-bottom: clamp(40px, 6vw, 72px); }
.gb-search-wide { margin-top: 20px; max-width: 560px; }
.gb-search-wide .wp-block-search__input { border: 1px solid var(--gb-line); border-radius: var(--gb-radius); padding: 10px 14px; background: var(--gb-surface); }
.gb-search-wide .wp-block-search__button { border-radius: var(--gb-radius); background: var(--gb-primary); color: #fff; border: 0; }
.gb-404 { text-align: left; padding-bottom: 80px; }
.gb-404__code { font-family: var(--wp--preset--font-family--heading); font-size: 4.5rem; font-weight: 700; line-height: 1; color: var(--gb-primary); margin: 0 0 8px; }
.gb-page-body { padding-bottom: clamp(48px, 7vw, 88px); }

/* ---------- Article ---------- */
.gb-article-head { width: min(100% - 2 * var(--gb-gutter), var(--gb-article)); margin: 0 auto; padding-top: clamp(28px, 5vw, 56px); padding-bottom: 8px; }
.gb-article-head > * { max-width: 820px; }
.gb-article-title { font-size: var(--wp--preset--font-size--xx-large); margin: 12px 0 18px; line-height: 1.25; text-wrap: balance; }
.gb-article-meta { gap: 10px 22px; color: var(--gb-muted); font-size: .875rem; align-items: center; padding-bottom: 22px; border-bottom: 1px solid var(--gb-line); max-width: none !important; }
.gb-article-meta > * { margin: 0 !important; }
.gb-factbox { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.gb-fact { display: inline-flex; align-items: center; gap: 6px; }
.gb-fact svg { flex: none; }
.gb-fact--verified { color: var(--gb-heading); background: var(--gb-soft); padding: 4px 10px 4px 8px; border-radius: 999px; }
.gb-fact--verified svg { color: var(--gb-primary); }
.gb-fact b { font-weight: 600; }
.gb-article-image { width: min(100% - 2 * var(--gb-gutter), var(--gb-article)); margin: 28px auto 0; }
.gb-article-image img { border-radius: var(--gb-radius-card); }
.gb-article-layout { width: min(100% - 2 * var(--gb-gutter), var(--gb-article)); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 32px; padding-bottom: clamp(40px, 6vw, 72px); }
.gb-article-layout > * { margin: 0 !important; }
@media (min-width: 1024px) {
	.gb-article-layout { grid-template-columns: minmax(0, 720px) 300px; justify-content: space-between; gap: 64px; }
}
.gb-article-main { min-width: 0; }
.gb-sticky { position: sticky; top: calc(var(--gb-header-h) + 24px); display: flex; flex-direction: column; gap: 24px; }
.gb-sticky > * { margin: 0 !important; }
.gb-toc { border-left: 2px solid var(--gb-line); padding: 2px 0 2px 18px; }
.gb-toc__title { font-weight: 700; font-size: .875rem; color: var(--gb-heading); margin: 0 0 10px; font-family: var(--wp--preset--font-family--heading); }
.gb-toc__list, .gb-toc-mobile ol { list-style: none; margin: 0; padding: 0; font-size: .875rem; line-height: 1.5; display: flex; flex-direction: column; gap: 8px; }
.gb-toc__list a, .gb-toc-mobile a { color: var(--gb-muted); text-decoration: none; display: block; }
.gb-toc__list a:hover { color: var(--gb-primary); }
.gb-toc__list a.is-current { color: var(--gb-heading); font-weight: 600; box-shadow: -20px 0 0 -18px var(--gb-primary); }
.gb-toc-mobile { display: none; border: 1px solid var(--gb-line); border-radius: var(--gb-radius-card); background: var(--gb-surface); padding: 12px 16px; margin-bottom: 28px; }
.gb-toc-mobile summary { cursor: pointer; font-weight: 600; color: var(--gb-heading); }
.gb-toc-mobile ol { margin-top: 12px; }
@media (max-width: 1023px) {
	.gb-article-aside .gb-toc { display: none; }
	.gb-toc-mobile { display: block; }
}

/* Article text */
.gb-prose { font-size: 1.0625rem; }
.gb-prose > * + * { margin-block-start: 1.1em; }
.gb-prose > :first-child { margin-top: 0; }
.gb-prose h2 { font-size: var(--wp--preset--font-size--x-large); margin-top: 2.1em; margin-bottom: .2em; }
.gb-prose h3 { font-size: var(--wp--preset--font-size--large); margin-top: 1.7em; margin-bottom: .2em; }
.gb-prose h2 + *, .gb-prose h3 + * { margin-top: .5em; }
.gb-prose ul, .gb-prose ol { padding-left: 1.35em; }
.gb-prose li + li { margin-top: .4em; }
.gb-prose li::marker { color: var(--gb-primary); }
.gb-prose strong { color: var(--gb-heading); font-weight: 650; }
.gb-prose blockquote { border-left: 3px solid var(--gb-primary); margin-left: 0; padding: 4px 0 4px 20px; color: var(--gb-heading); }
.gb-prose .wp-block-table { overflow-x: auto; margin-inline: 0; }
.gb-prose table { border-collapse: collapse; width: 100%; font-size: .9375rem; line-height: 1.55; background: var(--gb-surface); }
.gb-prose th, .gb-prose td { border: 1px solid var(--gb-line); padding: 10px 12px; text-align: left; vertical-align: top; }
.gb-prose thead th, .gb-prose tr:first-child th { background: var(--gb-soft); color: var(--gb-heading); font-weight: 650; }
.gb-prose .wp-block-table thead { border-bottom: 0; }
.gb-prose .wp-block-table td, .gb-prose .wp-block-table th { border-color: var(--gb-line); }

/* Editorial block styles */
.is-style-sources { font-size: .875rem; color: var(--gb-muted); border-top: 1px solid var(--gb-line); padding-top: 16px; margin-top: 2.2em !important; }
.is-style-source-tag { font-size: .78rem !important; color: var(--gb-muted); margin-top: 4px !important; display: flex; align-items: center; gap: 6px; }
.is-style-source-tag::before { content: ""; width: 10px; height: 10px; border: 1.5px solid currentColor; border-radius: 50%; flex: none; opacity: .7; }
.wp-block-group.is-style-disclaimer, .gb-disclaimer { background: var(--gb-soft); border: 1px solid var(--gb-line); border-radius: var(--gb-radius-card); padding: 16px 20px; font-size: .875rem; line-height: 1.65; color: var(--gb-ink); }
.wp-block-group.is-style-disclaimer > *, .gb-disclaimer > * { margin: 0; }
.wp-block-group.is-style-callout { background: var(--gb-surface); border: 1px solid var(--gb-line); border-left: 4px solid var(--gb-primary); border-radius: var(--gb-radius); padding: 18px 22px; }
.wp-block-group.is-style-callout > :first-child { margin-top: 0; }
.wp-block-details { border-bottom: 1px solid var(--gb-line); padding: 12px 0; }
.wp-block-details summary { cursor: pointer; font-weight: 600; color: var(--gb-heading); }
.gb-note { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--gb-line); font-size: .875rem; color: var(--gb-muted); }
.gb-note p { margin: 0; }
.gb-tags { margin-top: 20px; font-size: .875rem; }
.gb-tags a { display: inline-block; padding: 3px 10px; border: 1px solid var(--gb-line); border-radius: 999px; text-decoration: none; color: var(--gb-muted); }
.gb-tags .wp-block-post-terms__separator { display: none; }
.gb-related { background: var(--gb-soft); border-top: 1px solid var(--gb-line); padding: clamp(40px, 6vw, 64px) 0; }

/* ---------- Reading progress (sites restyle it) ---------- */
.gb-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100; pointer-events: none; --gb-progress: 0; }
.admin-bar .gb-progress { top: 32px; }
.gb-progress__fill { position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(var(--gb-progress)); background: var(--gb-primary); }
.gb-progress__track, .gb-progress__mark { display: none; }

/* ---------- Trust strip ---------- */
.gb-trust { border-block: 1px solid var(--gb-line); background: var(--gb-surface); }
.gb-trust__row { display: grid; grid-template-columns: repeat(3, 1fr); }
.gb-trust__item { display: flex; align-items: center; gap: 12px; padding: 18px 20px; font-weight: 600; font-size: .9375rem; color: var(--gb-heading); margin: 0; }
.gb-trust__item + .gb-trust__item { border-left: 1px solid var(--gb-line); }
.gb-trust__item svg { flex: none; width: 26px; height: 26px; color: var(--gb-primary); }
@media (max-width: 781px) {
	.gb-trust__row { grid-template-columns: 1fr; }
	.gb-trust__item { padding: 12px 0; }
	.gb-trust__item + .gb-trust__item { border-left: 0; border-top: 1px solid var(--gb-line); }
}

/* ---------- Ad slots (hidden until ads are set up) ---------- */
.gb-ad-slot { display: none; }
.gb-show-ad-slots .gb-ad-slot { display: flex; align-items: center; justify-content: center; min-height: 250px; border: 1.5px dashed color-mix(in srgb, var(--gb-muted) 45%, transparent); border-radius: var(--gb-radius-card); color: var(--gb-muted); font-size: .75rem; letter-spacing: .04em; background: repeating-linear-gradient(45deg, transparent 0 10px, color-mix(in srgb, var(--gb-line) 40%, transparent) 10px 11px); }
.gb-show-ad-slots .gb-ad-slot--wide { min-height: 90px; margin-bottom: 56px; }
.gb-show-ad-slots .gb-ad-slot--inline { min-height: 120px; margin: 32px 0; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Breadcrumbs and site map ---------- */
.gb-crumbs { font-size: .8125rem; color: var(--gb-muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 14px !important; }
.gb-crumbs a { color: var(--gb-muted); text-decoration: none; }
.gb-crumbs a:hover { color: var(--gb-primary); text-decoration: underline; }
.gb-crumbs [aria-current] { color: var(--gb-ink); }
.gb-archive-head .gb-crumbs { margin-bottom: 10px !important; }
.gb-sitemap { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 28px 40px; }
.gb-sitemap__group h2 { font-size: var(--wp--preset--font-size--large); margin: 0 0 10px; padding-bottom: 8px; border-bottom: 2px solid var(--gb-heading); }
.gb-sitemap__group h2 a { color: var(--gb-heading); text-decoration: none; }
.gb-sitemap__group ul { margin: 0; padding-left: 1.1em; }
.gb-sitemap__group li + li { margin-top: 6px; }
.gb-prose .gb-sitemap__group h2 { margin-top: 0; padding-top: 0; border-top: 0; }
.gb-prose .gb-sitemap__group h2::before, .gb-prose .gb-sitemap__group h2::after { display: none; }
