/*
Theme Name: The Dehradun
Theme URI: https://thedehradun.in/
Author: Aakash Puri
Description: A fast, lightweight travel-guide theme for Dehradun and Uttarakhand. Pine greens, Himalayan ridgelines and marigold accents. Elementor-compatible, AdSense-ready widget areas.
Version: 1.0.5
Requires at least: 6.5
Tested up to: 7.1
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: thedehradun
Tags: blog, travel, two-columns, right-sidebar, custom-menu, featured-images, threaded-comments
*/

:root {
	--pine: #1f3d2b;
	--pine-2: #2d5a3d;
	--moss: #4f7a4a;
	--snow: #f8f6f0;
	--stone: #ece8dd;
	--line: #ddd7c8;
	--ink: #1b2420;
	--muted: #5d6862;
	--marigold: #e08a1e;
	--marigold-dark: #b86d10;
	--river: #2e6f8e;
	--white: #ffffff;
	--radius: 14px;
	--shadow: 0 1px 2px rgba(27, 36, 32, .06), 0 8px 24px rgba(27, 36, 32, .06);
	--wrap: 1180px;
	--read: 740px;
	--serif: "Fraunces", Georgia, "Times New Roman", serif;
	--sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--snow);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 17px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--pine-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--marigold-dark); }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--pine); line-height: 1.2; font-weight: 600; letter-spacing: -.01em; }
:focus-visible { outline: 3px solid var(--marigold); outline-offset: 2px; }
.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; z-index: 999; width: auto; height: auto; clip: auto; background: var(--white); padding: 10px 14px; border-radius: 8px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header { background: var(--pine); color: var(--snow); position: sticky; top: 0; z-index: 50; }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; position: relative; } }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--snow); }
.brand:hover { color: var(--snow); }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-name { font-family: var(--serif); font-size: 23px; font-weight: 600; line-height: 1; display: block; }
.brand-tag { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; opacity: .75; display: block; margin-top: 5px; }
.custom-logo { max-height: 48px; width: auto; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a { display: block; padding: 8px 12px; color: var(--snow); text-decoration: none; font-size: 15px; font-weight: 500; border-radius: 8px; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current-cat > a { background: rgba(255, 255, 255, .1); color: #fff; }
.main-nav .sub-menu { display: none; }
.nav-toggle { display: none; background: none; border: 1px solid rgba(255, 255, 255, .3); color: var(--snow); border-radius: 8px; padding: 8px 12px; font: inherit; font-size: 15px; cursor: pointer; }
.header-search { color: var(--snow); display: inline-flex; padding: 8px; border-radius: 8px; }
.header-search:hover { background: rgba(255, 255, 255, .1); color: #fff; }

@media (max-width: 960px) {
	.nav-toggle { display: inline-block; }
	.main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--pine); padding: 8px 20px 20px; border-top: 1px solid rgba(255, 255, 255, .1); }
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; }
	.main-nav a { padding: 12px; font-size: 16px; }
	.header-inner { position: relative; }
}

/* ---------- Ridgeline signature ---------- */
.ridges { display: block; width: 100%; height: auto; }
.ridges .r1 { fill: #3c6b4b; }
.ridges .r2 { fill: #2d5a3d; }
.ridges .r3 { fill: var(--pine); }
.ridges.to-snow .r3 { fill: var(--snow); }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, var(--pine) 0%, #24472f 100%); color: var(--snow); position: relative; }
.hero-inner { padding: 64px 0 24px; max-width: 760px; }
.eyebrow { display: inline-block; font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; color: #f3c27c; font-weight: 600; margin-bottom: 14px; }
.hero h1 { color: #fff; font-size: clamp(34px, 5.4vw, 58px); margin: 0 0 16px; }
.hero h1 em { font-style: italic; color: #f3c27c; font-weight: 500; }
.hero p { font-size: 19px; opacity: .9; margin: 0 0 28px; max-width: 620px; }
.hero-search { display: flex; background: var(--white); border-radius: 999px; padding: 6px; max-width: 560px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.hero-search input { flex: 1; border: 0; background: transparent; padding: 10px 16px; font: inherit; font-size: 16px; color: var(--ink); min-width: 0; }
.hero-search input:focus { outline: none; }
.hero-search button { border: 0; border-radius: 999px; background: var(--marigold); color: #fff; font: inherit; font-weight: 600; padding: 10px 22px; cursor: pointer; }
.hero-search button:hover { background: var(--marigold-dark); }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head h2 { margin: 0; font-size: clamp(26px, 3vw, 34px); }
.section-head p { margin: 6px 0 0; color: var(--muted); }
.section-head .more { font-weight: 600; text-decoration: none; white-space: nowrap; }

/* Category tiles */
.cat-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.cat-tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 200px; padding: 18px; border-radius: var(--radius); color: #fff; text-decoration: none; overflow: hidden; background: var(--pine-2); box-shadow: var(--shadow); isolation: isolate; }
.cat-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .4s ease; }
.cat-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 40, 28, .05) 30%, rgba(20, 40, 28, .85) 100%); z-index: -1; }
.cat-tile:hover img { transform: scale(1.05); }
.cat-tile:hover { color: #fff; }
.cat-tile strong { font-family: var(--serif); font-size: 21px; font-weight: 600; line-height: 1.2; }
.cat-tile span { font-size: 13.5px; opacity: .85; margin-top: 4px; }
@media (max-width: 960px) { .cat-tiles { grid-template-columns: repeat(2, 1fr); } .cat-tile:first-child { grid-column: span 2; } }
@media (max-width: 480px) { .cat-tile { min-height: 150px; } }

/* Post cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 960px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; border: 1px solid var(--line); }
.card-media { display: block; aspect-ratio: 16 / 10; background: var(--stone); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-size: 20px; margin: 0; }
.card-title a { color: var(--pine); text-decoration: none; }
.card-title a:hover { color: var(--marigold-dark); }
.card-excerpt { color: var(--muted); font-size: 15px; margin: 0; }
.card-meta { margin-top: auto; font-size: 13px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }

.chip { display: inline-block; align-self: flex-start; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--marigold-dark); text-decoration: none; background: #fbf0df; padding: 4px 10px; border-radius: 999px; }
.chip:hover { background: #f6e1c2; color: var(--marigold-dark); }

/* Feature (first post) */
.feature { display: grid; grid-template-columns: 1.35fr 1fr; gap: 0; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); margin-bottom: 28px; }
.feature .card-media { aspect-ratio: auto; min-height: 320px; }
.feature .card-body { padding: 32px; justify-content: center; }
.feature .card-title { font-size: clamp(24px, 3vw, 32px); }
@media (max-width: 800px) { .feature { grid-template-columns: 1fr; } .feature .card-media { min-height: 220px; } .feature .card-body { padding: 22px; } }

/* Promise strip */
.promise { background: var(--stone); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.promise-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding: 36px 0; }
.promise-grid h3 { font-size: 19px; margin: 0 0 6px; }
.promise-grid p { margin: 0; color: var(--muted); font-size: 15px; }
@media (max-width: 760px) { .promise-grid { grid-template-columns: 1fr; gap: 18px; } }

/* ---------- Archive header ---------- */
.archive-hero { background: var(--pine); color: var(--snow); }
.archive-hero .wrap { padding-top: 44px; padding-bottom: 12px; }
.archive-hero h1 { color: #fff; margin: 6px 0 10px; font-size: clamp(30px, 4.4vw, 46px); }
.archive-hero .desc { max-width: 720px; opacity: .88; }
.archive-hero .desc p { margin: 0 0 10px; }

/* ---------- Layout with sidebar ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; padding-top: 40px; padding-bottom: 64px; }
.layout.no-sidebar { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1000px) { .layout { grid-template-columns: minmax(0, 1fr); gap: 36px; } }

/* ---------- Single ---------- */
.breadcrumbs { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.breadcrumbs a { color: var(--muted); }
.entry-header { margin-bottom: 24px; }
.entry-title { font-size: clamp(30px, 4.4vw, 46px); margin: 10px 0 14px; }
.entry-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 14.5px; align-items: center; }
.entry-meta .updated-badge { background: #e6efe7; color: var(--pine-2); font-weight: 600; padding: 3px 10px; border-radius: 999px; font-size: 13px; }
.entry-thumb { margin: 0 0 28px; border-radius: var(--radius); overflow: hidden; }
.entry-thumb img { display: block; width: 100%; }
.entry-content { font-size: 18px; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { font-size: 30px; margin: 1.8em 0 .5em; }
.entry-content h3 { font-size: 23px; margin: 1.6em 0 .4em; }
.entry-content p, .entry-content ul, .entry-content ol { margin: 0 0 1.15em; }
.entry-content li { margin-bottom: .35em; }
.entry-content img { border-radius: 10px; }
.entry-content blockquote { margin: 1.6em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--marigold); font-family: var(--serif); font-size: 21px; color: var(--pine); }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 16px; margin: 0 0 1.4em; background: var(--white); }
.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(--stone); }
.entry-content .wp-block-image figcaption, .entry-content figcaption { font-size: 14px; color: var(--muted); text-align: center; }
.entry-content iframe { width: 100%; border-radius: 10px; }
.entry-content .alignwide { margin-left: -60px; margin-right: -60px; max-width: none; }
@media (max-width: 1000px) { .entry-content .alignwide { margin-left: 0; margin-right: 0; } }
/* Elementor content inside posts */
.entry-content .elementor-section.elementor-section-boxed > .elementor-container { max-width: 100%; }
.entry-content .elementor-widget-text-editor { font-size: 18px; color: var(--ink); }
.entry-content .elementor-heading-title { font-family: var(--serif); color: var(--pine); }

.ad-slot { margin: 28px 0; text-align: center; min-height: 0; }
.ad-slot:empty { display: none; }

.post-tags { margin: 28px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }
.post-tags a { font-size: 13px; background: var(--stone); color: var(--ink); text-decoration: none; padding: 5px 12px; border-radius: 999px; }

.author-box { display: flex; gap: 18px; align-items: flex-start; margin: 40px 0 0; padding: 22px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.author-box img { border-radius: 50%; flex: none; }
.author-box h3 { margin: 0 0 4px; font-size: 19px; }
.author-box p { margin: 0; color: var(--muted); font-size: 15px; }

.related { margin-top: 48px; }
.related h2 { font-size: 26px; margin: 0 0 18px; }
.related .cards { grid-template-columns: repeat(3, 1fr); gap: 18px; }
.related .card-title { font-size: 17px; }
@media (max-width: 700px) { .related .cards { grid-template-columns: 1fr; } }

/* ---------- Sidebar ---------- */
.sidebar .widget { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 24px; }
.sidebar .widget-title, .sidebar .wp-block-heading { font-size: 19px; margin: 0 0 12px; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.sidebar li:last-child { border-bottom: 0; }
.sidebar a { text-decoration: none; color: var(--ink); }
.sidebar a:hover { color: var(--marigold-dark); }
.mini-post { display: flex; gap: 12px; align-items: center; }
.mini-post img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; flex: none; }
.mini-post span { font-size: 14.5px; line-height: 1.4; font-weight: 500; }
.about-widget p { margin: 0 0 10px; font-size: 15px; color: var(--muted); }
.sticky-side { position: sticky; top: 92px; }

/* ---------- Search form ---------- */
.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 15px; background: var(--snow); }
.search-form button, .btn { border: 0; border-radius: 10px; background: var(--pine); color: #fff; font: inherit; font-size: 15px; font-weight: 600; padding: 10px 16px; cursor: pointer; text-decoration: none; display: inline-block; }
.search-form button:hover, .btn:hover { background: var(--pine-2); color: #fff; }

/* ---------- Pagination ---------- */
.pagination { margin-top: 40px; }
.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pagination .page-numbers { min-width: 42px; height: 42px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--white); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 500; }
.pagination .page-numbers.current { background: var(--pine); color: #fff; border-color: var(--pine); }

/* ---------- Comments ---------- */
.comments-area { margin-top: 48px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-body { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; background: var(--white); }
.comment-form .submit { border: 0; border-radius: 10px; background: var(--pine); color: #fff; font: inherit; font-weight: 600; padding: 12px 20px; cursor: pointer; }

/* ---------- Page ---------- */
.page-wrap { max-width: var(--read); margin: 0 auto; padding: 48px 0 72px; }

/* ---------- 404 / empty ---------- */
.empty-state { text-align: center; padding-top: 72px; padding-bottom: 72px; }
.empty-state h1 { font-size: clamp(32px, 5vw, 52px); margin: 0 0 12px; }
.empty-state p { color: var(--muted); }
.empty-state .search-form { max-width: 460px; margin: 24px auto 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--pine); color: rgba(248, 246, 240, .82); margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding: 36px 0 28px; }
.site-footer h3 { color: #fff; font-size: 18px; margin: 0 0 12px; }
.site-footer p { font-size: 15px; margin: 0 0 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; font-size: 15px; }
.site-footer a { color: rgba(248, 246, 240, .9); text-decoration: none; }
.site-footer a:hover { color: #f3c27c; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: 18px 0 26px; font-size: 13.5px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }

/* WP core alignment helpers */
.alignleft { float: left; margin: 0 20px 12px 0; }
.alignright { float: right; margin: 0 0 12px 20px; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.sticky, .bypostauthor, .gallery-caption { }

.site-footer > .ridges { background: var(--snow); margin-bottom: -1px; }
.hero .ridges, .archive-hero .ridges { margin-top: 8px; margin-bottom: -1px; }

@media (max-width: 520px) {
	.cat-tiles { grid-template-columns: 1fr; }
	.cat-tile:first-child { grid-column: auto; }
	.cat-tile { min-height: 140px; }
}
@media (max-width: 420px) {
	.brand-tag { display: none; }
	.brand-name { font-size: 20px; }
	.brand-mark { width: 32px; height: 32px; }
	.header-inner { gap: 10px; }
	.nav-toggle { padding: 6px 10px; }
}
.ridges { min-height: 28px; }
.layout > * { min-width: 0; }
.breadcrumbs { overflow-wrap: anywhere; }
.entry-content input, .entry-content select, .entry-content textarea, .sidebar input, .sidebar select, .sidebar textarea { max-width: 100%; }
.entry-content pre { overflow-x: auto; }
.card-placeholder { position: relative; display: flex; align-items: flex-start; width: 100%; height: 100%; min-height: 160px; background: linear-gradient(160deg, #2d5a3d 0%, #1f3d2b 100%); overflow: hidden; }
.card-placeholder .ridges { position: absolute; left: 0; right: 0; bottom: 0; height: 45%; }
.card-placeholder .ridges .r3 { fill: #16301f; }
.card-placeholder-label { position: relative; margin: 18px 20px; font-family: var(--serif); font-size: 22px; color: #f3c27c; }
