/*
Theme Name: Cornerstone Tours V2
Theme URI: https://cornerstone-tours.com
Author: Cornerstone Tours
Description: Conversion-focused theme for Cornerstone Tours - small-group walking tours in Washington, DC. Tours custom post type, reviews, booking buttons, and brand settings editable in the Customizer.
Version: 1.5.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: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cornerstone-tours
*/

:root {
	--ct-navy: #1a3354;
	--ct-navy-dark: #12233a;
	--ct-crimson: #791e20;
	--ct-gold: #c9a227;
	--ct-cream: #f8f6f2;
	--ct-ink: #23272e;
	--ct-gray: #5f6672;
	--ct-line: #e5e1d8;
	--ct-radius: 10px;
	--ct-shadow: 0 8px 30px rgba(18, 35, 58, 0.12);
	--ct-font-head: "Playfair Display", Georgia, serif;
	--ct-font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	font-family: var(--ct-font-body);
	font-size: 17px;
	line-height: 1.65;
	color: var(--ct-ink);
	background: var(--ct-cream);
}

img { max-width: 100%; height: auto; }

h1, h2, h3, h4 {
	font-family: var(--ct-font-head);
	color: var(--ct-navy);
	line-height: 1.2;
	margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.35rem; }

a { color: var(--ct-crimson); }
a:hover { color: var(--ct-navy); }

.ct-container {
	max-width: 1160px;
	margin: 0 auto;
	padding: 0 24px;
}

/* ---------- Buttons ---------- */
.ct-btn {
	display: inline-block;
	padding: 14px 30px;
	border-radius: 6px;
	font-weight: 600;
	font-size: 1rem;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.ct-btn:hover { transform: translateY(-2px); box-shadow: var(--ct-shadow); }
.ct-btn-accent { background: var(--ct-crimson); color: #fff; }
.ct-btn-accent:hover { background: #8f2528; color: #fff; }
.ct-btn-navy { background: var(--ct-navy); color: #fff; }
.ct-btn-navy:hover { background: var(--ct-navy-dark); color: #fff; }
.ct-btn-ghost { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.7); }
.ct-btn-ghost:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* ---------- Header ---------- */
.ct-header {
	background: var(--ct-navy);
	position: sticky;
	top: 0;
	z-index: 50;
	box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.ct-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 14px 0;
}
.ct-branding { display: flex; align-items: center; gap: 12px; }
.ct-branding img { max-height: 56px; width: auto; }
.ct-site-title {
	font-family: var(--ct-font-head);
	font-size: 1.25rem;
	font-weight: 700;
	color: #fff;
	text-decoration: none;
	letter-spacing: 0.02em;
	white-space: nowrap;
}
.ct-site-title:hover { color: var(--ct-gold); }
.ct-nav-toggle { display: none; }
.ct-nav ul, .ct-nav-list {
	display: flex;
	gap: 18px;
	list-style: none;
	margin: 0;
	padding: 0;
	align-items: center;
}
.ct-nav a {
	color: #e9edf4;
	text-decoration: none;
	font-weight: 500;
	font-size: 0.9rem;
	white-space: nowrap;
}
.ct-nav a:hover { color: var(--ct-gold); }
.ct-header-cta { white-space: nowrap; padding: 10px 20px; font-size: 0.92rem; }

/* ---------- Hero ---------- */
.ct-hero {
	position: relative;
	overflow: hidden;
	background: linear-gradient(rgba(18,35,58,0.62), rgba(18,35,58,0.72)), var(--ct-hero-img, var(--ct-navy)) center/cover no-repeat;
	color: #fff;
	text-align: center;
	padding: 110px 24px 120px;
}
.ct-hero-slides { position: absolute; inset: 0; z-index: 0; }
.ct-hero-slide {
	position: absolute;
	inset: 0;
	background-position: center;
	background-size: cover;
	opacity: 0;
	transition: opacity 1.8s ease-in-out;
}
.ct-hero-slide.is-active { opacity: 1; }
.ct-hero-slides::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(rgba(18,35,58,0.62), rgba(18,35,58,0.72));
}
.ct-hero > h1, .ct-hero > p, .ct-hero > .ct-hero-actions { position: relative; z-index: 1; }
.ct-hero h1 { color: #fff; max-width: 820px; margin: 0 auto 0.4em; }
.ct-hero p {
	max-width: 640px;
	margin: 0 auto 1.8em;
	font-size: 1.15rem;
	color: #e6eaf1;
}
.ct-hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- Trust bar ---------- */
.ct-trust {
	background: #fff;
	border-bottom: 1px solid var(--ct-line);
	padding: 22px 0;
}
.ct-trust-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 18px;
	text-align: center;
}
.ct-trust-item strong { display: block; color: var(--ct-navy); font-size: 1.02rem; }
.ct-trust-item span { color: var(--ct-gray); font-size: 0.88rem; }
.ct-trust-item .ct-star { color: var(--ct-gold); }

/* ---------- Sections ---------- */
.ct-section { padding: 72px 0; }
.ct-section-alt { background: #fff; }
.ct-section-head { text-align: center; max-width: 680px; margin: 0 auto 44px; }
.ct-section-head p { color: var(--ct-gray); }
.ct-kicker {
	display: inline-block;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-size: 0.78rem;
	font-weight: 700;
	color: var(--ct-crimson);
	margin-bottom: 10px;
}

/* ---------- Tour cards ---------- */
.ct-tour-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 28px;
}
.ct-card {
	background: #fff;
	border-radius: var(--ct-radius);
	overflow: hidden;
	box-shadow: 0 3px 14px rgba(18,35,58,0.08);
	display: flex;
	flex-direction: column;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.ct-card:hover { transform: translateY(-4px); box-shadow: var(--ct-shadow); }
.ct-card-img { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--ct-navy); }
.ct-card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ct-card-badge {
	position: absolute;
	top: 14px;
	left: 14px;
	background: var(--ct-gold);
	color: var(--ct-navy-dark);
	font-size: 0.75rem;
	font-weight: 700;
	padding: 5px 12px;
	border-radius: 999px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}
.ct-card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.ct-card-body h3 { margin-bottom: 8px; }
.ct-card-body h3 a { color: var(--ct-navy); text-decoration: none; }
.ct-card-body h3 a:hover { color: var(--ct-crimson); }
.ct-card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	color: var(--ct-gray);
	font-size: 0.88rem;
	margin-bottom: 12px;
}
.ct-card-excerpt { color: var(--ct-gray); font-size: 0.95rem; flex: 1; }
.ct-card-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 18px;
	gap: 12px;
}
.ct-price { font-weight: 700; color: var(--ct-navy); font-size: 1.05rem; }
.ct-card-foot .ct-btn { padding: 10px 20px; font-size: 0.9rem; }

/* ---------- Single tour ---------- */
.ct-tour-hero {
	position: relative;
	min-height: 380px;
	display: flex;
	align-items: flex-end;
	background: var(--ct-navy) center/cover no-repeat;
}
.ct-tour-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(18,35,58,0.85), rgba(18,35,58,0.15));
}
.ct-tour-hero .ct-container { position: relative; z-index: 1; padding-bottom: 40px; }
.ct-tour-hero h1 { color: #fff; margin: 0; }
.ct-tour-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 48px;
	padding: 56px 0 80px;
}
.ct-tour-content h2 { margin-top: 1.6em; }
.ct-tour-content ul { padding-left: 1.2em; }
.ct-tour-content li { margin-bottom: 0.4em; }
.ct-sidebar-card {
	background: #fff;
	border-radius: var(--ct-radius);
	box-shadow: var(--ct-shadow);
	padding: 28px;
	position: sticky;
	top: 96px;
}
.ct-sidebar-card .ct-price { font-size: 1.6rem; display: block; margin-bottom: 4px; }
.ct-sidebar-card .ct-per { color: var(--ct-gray); font-size: 0.88rem; }
.ct-spec { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--ct-line); font-size: 0.95rem; }
.ct-spec:last-of-type { border-bottom: 0; }
.ct-spec strong { color: var(--ct-navy); min-width: 96px; }
.ct-sidebar-card .ct-btn { display: block; text-align: center; margin-top: 18px; }
.ct-cancel-note { font-size: 0.82rem; color: var(--ct-gray); text-align: center; margin-top: 12px; }
.ct-meeting {
	background: var(--ct-cream);
	border-left: 4px solid var(--ct-gold);
	padding: 16px 18px;
	border-radius: 0 8px 8px 0;
	font-size: 0.92rem;
	margin-top: 22px;
}

/* ---------- TripAdvisor ratings ---------- */
.ct-ta-rating { font-size: 0.92rem; color: var(--ct-gray); }
.ct-ta-rating .ct-star { color: var(--ct-gold); letter-spacing: 1px; }
.ct-ta-rating strong { color: var(--ct-navy); }
.ct-ta-rating a { color: var(--ct-gray); text-decoration: underline; }
.ct-card-rating { margin-bottom: 10px; }
.ct-hero-rating { margin-top: 10px; }
.ct-hero-rating .ct-ta-rating, .ct-hero-rating .ct-ta-rating strong, .ct-hero-rating .ct-ta-rating a { color: #e6eaf1; }
.ct-sidebar-rating { text-align: center; margin: 14px 0 0; }
.ct-sidebar-card .ct-btn + .ct-btn { margin-top: 10px; }

/* ---------- Reviews ---------- */
.ct-review-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 26px;
}
.ct-review {
	background: #fff;
	border-radius: var(--ct-radius);
	padding: 26px 28px;
	box-shadow: 0 3px 14px rgba(18,35,58,0.08);
}
.ct-review .ct-star { color: var(--ct-gold); letter-spacing: 2px; font-size: 1.05rem; }
.ct-review blockquote { margin: 12px 0 14px; font-size: 0.97rem; color: var(--ct-ink); }
.ct-review-name { font-weight: 600; color: var(--ct-navy); font-size: 0.92rem; }
.ct-review-source { color: var(--ct-gray); font-size: 0.82rem; }

/* ---------- CTA band ---------- */
.ct-cta-band {
	background: linear-gradient(120deg, var(--ct-navy), var(--ct-navy-dark));
	color: #fff;
	text-align: center;
	padding: 70px 24px;
}
.ct-cta-band h2 { color: #fff; }
.ct-cta-band p { color: #d8dfe9; max-width: 560px; margin: 0 auto 1.6em; }

/* ---------- Blog ---------- */
.ct-post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }
.ct-post-card { background: #fff; border-radius: var(--ct-radius); overflow: hidden; box-shadow: 0 3px 14px rgba(18,35,58,0.08); }
.ct-post-card .ct-card-img { aspect-ratio: 16 / 9; }
.ct-post-card-body { padding: 22px 24px 26px; }
.ct-post-date { color: var(--ct-gray); font-size: 0.82rem; }
.ct-single-content { max-width: 760px; margin: 0 auto; padding: 56px 24px 80px; }
.ct-single-content .ct-featured { border-radius: var(--ct-radius); margin-bottom: 32px; }

/* ---------- Page ---------- */
.ct-page-header { background: var(--ct-navy); color: #fff; padding: 64px 0; text-align: center; }
.ct-page-header h1 { color: #fff; margin: 0; }
.ct-page-content { max-width: 820px; margin: 0 auto; padding: 56px 24px 80px; }
.ct-page-content details {
	background: #fff;
	border-radius: 8px;
	padding: 16px 20px;
	margin-bottom: 12px;
	box-shadow: 0 2px 8px rgba(18,35,58,0.06);
}
.ct-page-content summary { font-weight: 600; color: var(--ct-navy); cursor: pointer; }

/* ---------- Inquiry form ---------- */
.ct-inquiry-form {
	background: #fff;
	border-radius: var(--ct-radius);
	box-shadow: var(--ct-shadow);
	padding: 34px 36px;
	margin: 24px 0;
}
.ct-inquiry-form .ct-form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
}
.ct-inquiry-form label {
	display: block;
	font-weight: 600;
	color: var(--ct-navy);
	font-size: 0.92rem;
	margin-bottom: 16px;
}
.ct-inquiry-form input, .ct-inquiry-form select, .ct-inquiry-form textarea {
	display: block;
	width: 100%;
	margin-top: 6px;
	padding: 11px 12px;
	border: 1px solid var(--ct-line);
	border-radius: 6px;
	font: inherit;
	font-weight: 400;
	color: var(--ct-ink);
	background: var(--ct-cream);
}
.ct-inquiry-form input:focus, .ct-inquiry-form select:focus, .ct-inquiry-form textarea:focus {
	outline: 2px solid var(--ct-navy);
	background: #fff;
}
.ct-inquiry-form .ct-hp { position: absolute; left: -9999px; height: 0; width: 0; opacity: 0; }
.ct-inquiry-form button { border: 0; cursor: pointer; width: 100%; }
.ct-form-note { font-size: 0.82rem; color: var(--ct-gray); text-align: center; margin: 12px 0 0; }
.ct-form-success, .ct-form-error {
	border-radius: 8px;
	padding: 18px 22px;
	margin: 24px 0;
}
.ct-form-success { background: #eaf5ec; border-left: 4px solid #2e7d32; color: #1e4620; }
.ct-form-error { background: #fdeaea; border-left: 4px solid var(--ct-crimson); color: #5f1a1c; }
@media (max-width: 700px) {
	.ct-inquiry-form .ct-form-row { grid-template-columns: 1fr; gap: 0; }
	.ct-inquiry-form { padding: 24px 20px; }
}

/* ---------- Footer ---------- */
.ct-footer { background: var(--ct-navy-dark); color: #aeb8c8; padding: 56px 0 32px; }
.ct-footer a { color: #d5dce6; text-decoration: none; }
.ct-footer a:hover { color: var(--ct-gold); }
.ct-footer-grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	gap: 40px;
	margin-bottom: 36px;
}
.ct-footer h4 { color: #fff; font-family: var(--ct-font-body); font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.08em; }
.ct-footer ul { list-style: none; margin: 0; padding: 0; }
.ct-footer li { margin-bottom: 8px; font-size: 0.93rem; }
.ct-footer-bottom {
	border-top: 1px solid rgba(255,255,255,0.12);
	padding-top: 22px;
	font-size: 0.82rem;
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.ct-tour-layout { grid-template-columns: 1fr; }
	.ct-sidebar-card { position: static; }
	.ct-footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1240px) {
	.ct-header-inner { flex-wrap: wrap; }
	.ct-nav { order: 3; width: 100%; }
	.ct-nav ul, .ct-nav-list { flex-wrap: wrap; gap: 12px 20px; justify-content: center; padding-top: 10px; }
}
@media (max-width: 760px) {
	.ct-hero { padding: 72px 20px 84px; }
	.ct-header-inner { justify-content: center; row-gap: 4px; }
	.ct-header-cta { padding: 9px 16px; font-size: 0.88rem; }
	.ct-branding img { max-height: 42px; }
}

/* ---------- WordPress core niceties ---------- */
.alignwide { margin-left: -40px; margin-right: -40px; }
.alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: 100vw; }
.wp-block-image img { border-radius: var(--ct-radius); }
.screen-reader-text {
	border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden;
	padding: 0; position: absolute;
}

/* ---- Magpie live review widgets ---- */
.ct-magpie { width: 100%; }
.ct-magpie iframe { display: block; width: 100%; }
.ct-magpie-main { background: #fff; border-radius: 14px; padding: 8px; box-shadow: 0 2px 14px rgba(11,44,74,0.08); }
.ct-live-rating { display: inline-block; }
.ct-live-note { display: block; font-size: 0.8em; color: #6b7280; margin-top: 2px; }
.ct-tour-reviews .ct-section-head p .ct-live-rating { font-size: 1.05rem; }
.ct-live-reviews .ct-review blockquote { margin: 8px 0; }
.ct-footer-partners-head { margin-top: 22px; }
