/*
Theme Name: Tour de North
Theme URI: https://example.com/tour-de-north
Author: Tour de North
Description: Travel and tour booking theme for Northern Pakistan tours. Includes a Tours manager, destinations, booking inquiries, and a Make My Trip custom request form.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
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: tour-de-north
*/

:root {
	--ink: #0d2a33;
	--pine: #0e5a5a;
	--pine-d: #0a4343;
	--sky: #e9f4f3;
	--sand: #faf6ef;
	--amber: #f2a33a;
	--amber-d: #db8d22;
	--text: #1f2d33;
	--muted: #5b6b72;
	--line: #e3e9ea;
	--white: #fff;
	--wa: #1fa855;
	--radius: 14px;
	--shadow: 0 8px 30px rgba(13, 42, 51, .10);
	--font-head: 'Poppins', system-ui, sans-serif;
	--font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.65;
	color: var(--text);
	background: var(--white);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--pine); text-decoration: none; }
a:hover { color: var(--amber-d); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }

.container { width: min(1180px, 100% - 40px); margin-inline: auto; }
.container.narrow { width: min(820px, 100% - 40px); }
.center { text-align: center; }
.mt { margin-top: 32px; }
.mt-s { margin-top: 12px; }
.tdn-small { font-size: .85rem; color: var(--muted); }
.hide-sm { display: inline; }

/* ---------- Buttons ---------- */
.btn {
	display: inline-block;
	padding: 12px 24px;
	border: 2px solid var(--pine);
	border-radius: 999px;
	background: var(--pine);
	color: #fff;
	font: 600 .95rem/1 var(--font-head);
	cursor: pointer;
	transition: transform .15s, background .2s, color .2s, box-shadow .2s;
	text-align: center;
}
.btn:hover { background: var(--pine-d); border-color: var(--pine-d); color: #fff; transform: translateY(-1px); }
.btn-accent { background: var(--amber); border-color: var(--amber); color: #2b1a00; }
.btn-accent:hover { background: var(--amber-d); border-color: var(--amber-d); color: #2b1a00; }
.btn-outline { background: transparent; color: var(--pine); }
.btn-outline:hover { background: var(--pine); color: #fff; }
.btn-wa { background: var(--wa); border-color: var(--wa); margin-top: 10px; }
.btn-wa:hover { background: #17893f; border-color: #17893f; }
.btn-sm { padding: 9px 18px; font-size: .85rem; }
.btn-lg { padding: 16px 34px; font-size: 1.05rem; }
.btn-block { display: block; width: 100%; }

/* ---------- Top bar ---------- */
.topbar { background: var(--ink); color: #cfe0e2; font-size: .85rem; }
.topbar a { color: #fff; }
.topbar-in { display: flex; gap: 24px; justify-content: flex-end; padding: 8px 0; flex-wrap: wrap; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; transition: box-shadow .2s; }
.site-header.scrolled { box-shadow: 0 4px 20px rgba(13, 42, 51, .12); }
.header-in { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { width: 38px; height: 38px; color: var(--pine); }
.brand-name { font: 700 1.4rem/1 var(--font-head); letter-spacing: -.01em; }
.brand-name em { font-style: normal; color: var(--amber-d); font-weight: 600; }
.brand-light, .brand-light:hover { color: #fff; }
.brand-light .brand-mark { color: #7fd0c8; }
.custom-logo { max-height: 56px; width: auto; }

.primary-nav { display: flex; align-items: center; gap: 22px; }
.primary-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.primary-nav .menu a { display: block; padding: 10px 14px; color: var(--ink); font-weight: 500; border-radius: 8px; }
.primary-nav .menu a:hover,
.primary-nav .menu .current-menu-item > a { color: var(--pine); background: var(--sky); }
.primary-nav .menu li { position: relative; }
.primary-nav .sub-menu { display: none; position: absolute; left: 0; top: 100%; min-width: 220px; background: #fff; box-shadow: var(--shadow); border-radius: 10px; list-style: none; margin: 0; padding: 8px; }
.primary-nav .menu li:hover > .sub-menu { display: block; }

.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; padding: 10px; }
.nav-toggle span { display: block; height: 2px; background: var(--ink); margin: 6px 0; transition: transform .2s, opacity .2s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
	position: relative;
	overflow: hidden;
	color: #fff;
	background: linear-gradient(160deg, #0a3f4a 0%, #0e5a5a 55%, #1d7a6f 100%) center / cover no-repeat;
	padding: clamp(56px, 10vw, 120px) 0 clamp(48px, 8vw, 90px);
}
.hero-art { position: absolute; inset: auto 0 0 0; width: 100%; height: 70%; pointer-events: none; }
.hero-in { position: relative; z-index: 1; }
.hero h1 { color: #fff; max-width: 15em; margin-bottom: .4em; }
.hero-text { font-size: 1.15rem; max-width: 36em; color: #d9ecec; }
.eyebrow { display: inline-block; font: 600 .8rem/1 var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: var(--amber); margin-bottom: 14px; }
.eyebrow.dark { color: var(--amber-d); }

.hero-search {
	display: grid;
	grid-template-columns: 1fr 1fr auto;
	gap: 14px;
	align-items: end;
	background: #fff;
	padding: 18px;
	border-radius: 18px;
	box-shadow: var(--shadow);
	max-width: 760px;
	margin: 32px 0 22px;
}
.hero-search label span,
.filters label span,
.tdn-form label span { display: block; font-size: .78rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .05em; }
.hero-search select { width: 100%; }
.hero-search .btn { padding: 14px 28px; }
.hero-badges { list-style: none; display: flex; gap: 22px; flex-wrap: wrap; padding: 0; margin: 0; color: #d9ecec; font-size: .92rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-alt { background: var(--sand); }
.section-dark { background: var(--ink); color: #cfe0e2; }
.section-head { max-width: 640px; margin: 0 auto 44px; text-align: center; }
.section-head p { color: var(--muted); }
.section-head.light h2 { color: #fff; }

.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Cards ---------- */
.card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 36px rgba(13, 42, 51, .16); }
.card-media { position: relative; display: block; aspect-ratio: 7 / 4.8; overflow: hidden; background: #0e5a5a; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-media img { transform: scale(1.06); }
.ph { position: absolute; inset: 0; background: linear-gradient(150deg, #0a3f4a, #1d7a6f 70%, #3fa38f); }
.ph svg { position: absolute; inset: auto 0 0 0; width: 100%; height: 100%; }
.chip { display: inline-block; background: var(--amber); color: #2b1a00; font: 600 .75rem/1 var(--font-head); padding: 7px 12px; border-radius: 999px; }
.chip-float { position: absolute; left: 14px; top: 14px; }
.card-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.card-title { font-size: 1.12rem; margin-bottom: 8px; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--pine); }
.card-text { color: var(--muted); font-size: .93rem; }
.card-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); margin-bottom: 16px; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.price small { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.price strong { font: 700 1.25rem/1.2 var(--font-head); color: var(--pine); }

/* ---------- Destinations ---------- */
.dest-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 26px; }
.dest-grid .dest { flex: 0 1 calc((100% - 78px) / 4); }
.dest { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 190px; padding: 20px; border-radius: var(--radius); color: #fff; overflow: hidden; transition: transform .2s; }
.dest:hover { transform: translateY(-4px); color: #fff; }
.dest::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(8, 30, 38, .65)); }
.dest > * { position: relative; z-index: 1; }
.dest-name { font: 600 1.2rem/1.2 var(--font-head); }
.dest-count { font-size: .85rem; opacity: .85; }
.dest-1 { background: linear-gradient(140deg, #0e5a5a, #3fa38f); }
.dest-2 { background: linear-gradient(140deg, #234e70, #5b9bd1); }
.dest-3 { background: linear-gradient(140deg, #7a4b1c, #e0a050); }
.dest-4 { background: linear-gradient(140deg, #3b5d2a, #8bbf5c); }
.dest-5 { background: linear-gradient(140deg, #5a2f6b, #b07ac4); }
.dest-6 { background: linear-gradient(140deg, #8c2f39, #e27a7a); }

/* ---------- Features / services ---------- */
.feature { text-align: center; padding: 28px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.feature .ico { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 14px; font-size: 1.8rem; background: var(--sky); border-radius: 50%; }
.feature p { color: var(--muted); font-size: .93rem; margin: 0; }
.services { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.services li { padding: 18px 20px; border: 1px solid rgba(255, 255, 255, .15); border-radius: 12px; font-weight: 500; color: #fff; background: rgba(255, 255, 255, .04); }
.services li::before { content: '\2713'; color: var(--amber); margin-right: 10px; font-weight: 700; }

/* ---------- Rates table ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.rates { width: 100%; border-collapse: collapse; background: #fff; min-width: 560px; }
.rates th { background: var(--pine); color: #fff; text-align: left; padding: 14px 18px; font: 600 .85rem/1 var(--font-head); text-transform: uppercase; letter-spacing: .05em; }
.rates td { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.rates tr:last-child td { border-bottom: 0; }
.rates tbody tr:hover { background: var(--sky); }
.rates td a:not(.btn) { font-weight: 600; color: var(--ink); }

/* ---------- CTA ---------- */
.cta { background: linear-gradient(120deg, var(--pine), #17806f); color: #fff; padding: 56px 0; }
.cta h2 { color: #fff; margin-bottom: .3em; }
.cta p { margin: 0; color: #d9ecec; }
.cta-in { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }

/* ---------- FAQ ---------- */
.faq { border: 1px solid var(--line); border-radius: 12px; padding: 0 20px; margin-bottom: 12px; background: #fff; }
.faq summary { cursor: pointer; font: 600 1rem/1.4 var(--font-head); padding: 18px 0; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--amber-d); font-size: 1.5rem; line-height: 1; }
.faq[open] summary::after { content: '\2212'; }
.faq p { color: var(--muted); padding-bottom: 12px; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { background: linear-gradient(140deg, #0a3f4a, #0e5a5a 60%, #1d7a6f); color: #fff; padding: clamp(40px, 6vw, 72px) 0; }
.page-hero h1 { color: #fff; margin: 0 0 .2em; font-size: clamp(1.8rem, 4vw, 2.8rem); }
.page-hero .lead { color: #d9ecec; max-width: 40em; margin: 0; font-size: 1.05rem; }

/* ---------- Filters ---------- */
.filters { display: flex; gap: 14px; align-items: end; flex-wrap: wrap; background: var(--sky); padding: 18px; border-radius: var(--radius); margin-bottom: 34px; }
.filters label { flex: 1 1 180px; }
.filters select { width: 100%; }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.pagination .page-numbers { padding: 9px 15px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); }
.pagination .current { background: var(--pine); border-color: var(--pine); color: #fff; }
.empty { text-align: center; padding: 50px 20px; background: var(--sand); border-radius: var(--radius); }

/* ---------- Single tour ---------- */
.tour-hero { color: #fff; padding: clamp(60px, 9vw, 120px) 0 clamp(36px, 5vw, 56px); background: linear-gradient(140deg, #0a3f4a, #0e5a5a 60%, #1d7a6f) center / cover no-repeat; }
.tour-hero h1 { color: #fff; margin: 14px 0 8px; max-width: 18em; }
.tour-hero .lead { color: #e3f0f0; max-width: 40em; font-size: 1.1rem; margin: 0; }
.tour-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: start; }
.tour-side { position: sticky; top: 96px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 30px; }
.facts div { background: var(--sky); border-radius: 12px; padding: 14px 16px; }
.facts small { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.facts strong { font-family: var(--font-head); color: var(--ink); }
.entry h2 { margin-top: 1.4em; }
.entry > h2:first-child { margin-top: 0; }
.entry ul, .entry ol { margin-bottom: 1em; }
.tour-main h2 { margin-top: 1.6em; }
.itinerary { list-style: none; padding: 0; margin: 0; counter-reset: day; border-left: 3px solid var(--sky); }
.itinerary li { position: relative; padding: 0 0 24px 28px; }
.itinerary li::before { content: ''; position: absolute; left: -9px; top: 4px; width: 15px; height: 15px; border-radius: 50%; background: var(--amber); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--amber); }
.itinerary strong { display: block; font-family: var(--font-head); color: var(--ink); margin-bottom: 4px; }
.itinerary p { margin: 0; color: var(--muted); }
.inc-exc { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 30px; }
.inc-exc > div { border-radius: var(--radius); padding: 22px; }
.inc { background: #eaf6ef; }
.exc { background: #fdeeee; }
.inc-exc ul { list-style: none; padding: 0; margin: 0; }
.inc-exc li { padding: 5px 0 5px 26px; position: relative; }
.inc li::before { content: '\2713'; position: absolute; left: 0; color: #1a8d4a; font-weight: 700; }
.exc li::before { content: '\2715'; position: absolute; left: 0; color: #c0392b; font-weight: 700; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.gallery img { border-radius: 10px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

.book-box { background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 24px; border: 1px solid var(--line); }
.book-box.flat { box-shadow: none; }
.book-box .price.big { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.book-box .price.big strong { font-size: 1.8rem; }
.book-box .price.big span { color: var(--muted); font-size: .85rem; }
.side-card { background: var(--sky); border-radius: 18px; padding: 24px; }
.steps { padding-left: 1.2em; }
.steps li { margin-bottom: 8px; }
.contact-list { list-style: none; padding: 0; margin: 0 0 16px; }
.contact-list li { padding: 6px 0; }

/* ---------- Forms ---------- */
input[type=text], input[type=tel], input[type=email], input[type=number], input[type=date], select, textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1.5px solid var(--line);
	border-radius: 10px;
	background: #fff;
	font: inherit;
	color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--pine); box-shadow: 0 0 0 3px rgba(14, 90, 90, .15); }
.tdn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.tdn-block { display: block; margin-bottom: 14px; }
.tour-side .tdn-row { grid-template-columns: 1fr; }
.tour-side .tdn-row > span:empty { display: none; }
.tdn-hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.tdn-notice { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: .92rem; font-weight: 500; }
.tdn-notice.ok { background: #e6f6ec; color: #17693a; }
.tdn-notice.bad { background: #fdeaea; color: #a32525; }
.tdn-form .tdn-small { text-align: center; margin: 10px 0 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #b9cdd0; padding-top: 60px; }
.site-footer h4 { color: #fff; margin-bottom: 14px; font-size: 1rem; }
.site-footer a { color: #cfe0e2; }
.site-footer a:hover { color: var(--amber); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; padding-bottom: 44px; }
.flist { list-style: none; padding: 0; margin: 0; }
.flist li { padding: 4px 0; }
.social { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; }
.footer-bar { border-top: 1px solid rgba(255, 255, 255, .1); padding: 18px 0; font-size: .85rem; }

.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: var(--wa); box-shadow: 0 8px 24px rgba(0, 0, 0, .25); transition: transform .2s; }
.wa-float:hover { transform: scale(1.08); }

.post-row { padding: 24px 0; border-bottom: 1px solid var(--line); }
.big-404 { font-size: clamp(5rem, 16vw, 9rem); color: var(--pine); margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.grid-4, .services { grid-template-columns: repeat(2, 1fr); }
	.dest-grid .dest { flex-basis: calc((100% - 26px) / 2); }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.tour-layout { grid-template-columns: 1fr; }
	.tour-side { position: static; }
}

@media (max-width: 860px) {
	.nav-toggle { display: block; }
	.primary-nav {
		position: absolute; left: 0; right: 0; top: 100%;
		flex-direction: column; align-items: stretch; gap: 10px;
		background: #fff; padding: 16px 20px 22px;
		box-shadow: 0 16px 24px rgba(13, 42, 51, .12);
		display: none;
	}
	.primary-nav.open { display: flex; }
	.primary-nav .menu { flex-direction: column; }
	.primary-nav .sub-menu { display: block; position: static; box-shadow: none; padding-left: 14px; }
	.site-header { position: sticky; }
	.hero-search { grid-template-columns: 1fr; }
	.grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
	.grid-3, .grid-4, .services, .footer-grid, .inc-exc, .tdn-row { grid-template-columns: 1fr; }
	.dest-grid .dest { flex-basis: 100%; min-height: 150px; }
	.hide-sm { display: none; }
	.topbar-in { justify-content: center; gap: 16px; }
	.cta-in { text-align: center; justify-content: center; }
	.rates { min-width: 0; }
	.rates thead { display: none; }
	.rates tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
	.rates td { display: flex; justify-content: space-between; border: 0; padding: 6px 18px; }
	.rates td::before { content: attr(data-label); color: var(--muted); font-size: .8rem; text-transform: uppercase; }
	.rates td:last-child::before { content: none; }
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}
