/*
 * French Tuition theme — main stylesheet
 * Mobile-first. No external font/CDN requests (keeps the site fast and avoids third-party GDPR
 * considerations for font loading), no external images (icons/illustrations are hand-written inline
 * SVG so there's nothing to license or credit). See docs/04-wordpress-setup.md "Customising colours,
 * fonts and logo" for how to change the palette safely via a child theme.
 */

:root {
	/* Palette — warm, approachable, academic. Change these to rebrand the whole site. */
	--color-primary: #2b4c7e;
	--color-primary-dark: #1d3557;
	--color-accent: #d62839;
	--color-accent-dark: #a81f2d;
	--color-cream: #faf6f0;
	--color-cream-deep: #f2ead9;
	--color-text: #22303f;
	--color-text-light: #55606b;
	--color-white: #ffffff;
	--color-border: #e5e1d8;

	/* Type — system font stacks, no web-font download required. */
	--font-heading: Georgia, 'Times New Roman', Times, serif;
	--font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

	--container-width: 1120px;
	--radius: 10px;
	--radius-lg: 20px;
	--radius-full: 999px;

	--shadow-sm: 0 1px 3px rgba(29, 53, 87, 0.08);
	--shadow-md: 0 8px 24px rgba(29, 53, 87, 0.10);
	--shadow-lg: 0 20px 45px rgba(29, 53, 87, 0.16);
}

/* Reset / base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font-body);
	color: var(--color-text);
	background: var(--color-white);
	line-height: 1.65;
	font-size: 17px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--color-primary-dark); line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
ul { padding-left: 1.25em; }

.container {
	width: 100%;
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 0 20px;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--color-primary-dark);
	color: var(--color-white);
	padding: 10px 16px;
	z-index: 1000;
}
.skip-link:focus { left: 10px; top: 10px; }

.screen-reader-text {
	position: absolute;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
}

/* Icons — sized/coloured via currentColor so they inherit whatever text colour they sit inside */
.icon { width: 24px; height: 24px; flex-shrink: 0; }
.icon-sm { width: 18px; height: 18px; }
.icon-lg { width: 32px; height: 32px; }
.icon-xl { width: 48px; height: 48px; }

/* Tricolore accent bar — a small, tasteful "this is a French tutor" signal without being garish.
   The middle stripe uses the cream tone (not pure white) so it stays visible against the white
   page/header background around it — pure white on white would otherwise disappear entirely. */
.tricolore-bar {
	height: 5px;
	background: linear-gradient(to right, #002654 0%, #002654 33.33%, var(--color-cream) 33.33%, var(--color-cream) 66.66%, #ed2939 66.66%, #ed2939 100%);
	box-shadow: 0 1px 3px rgba(29, 53, 87, 0.15);
}

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 15px 30px;
	border-radius: var(--radius-full);
	font-weight: 700;
	font-size: 0.92rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
	box-shadow: var(--shadow-sm);
}
.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--color-primary); color: var(--color-white); }
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-accent { background: var(--color-accent); color: var(--color-white); }
.btn-accent:hover { background: var(--color-accent-dark); }

.cta-buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1.75em; }

/* Cards — shared elevated-surface look used across contact/services/booking */
.card {
	background: var(--color-white);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-md);
	padding: 32px;
}

/* Eyebrow label — small accent-coloured caps tag above a heading */
.eyebrow {
	display: inline-block;
	margin: 0 0 14px;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-accent);
}

/* Header */
.site-header {
	background: var(--color-white);
	border-bottom: 1px solid var(--color-border);
	position: sticky;
	top: 0;
	z-index: 100;
}
.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 20px;
	gap: 16px;
}
.site-branding { display: flex; align-items: center; }
.brand-link { display: flex; align-items: center; gap: 12px; color: inherit; }
.brand-link:hover { text-decoration: none; }
.brand-mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
	color: var(--color-white);
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 1.05rem;
	letter-spacing: 0.02em;
	box-shadow: var(--shadow-sm);
	flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-title { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 700; color: var(--color-primary-dark); }
.brand-tagline { font-size: 0.8rem; color: var(--color-text-light); }

.nav-toggle {
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	background: none;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	cursor: pointer;
}
.nav-toggle__bar { display: block; height: 2px; width: 20px; margin: 0 auto; background: var(--color-primary-dark); }

.site-nav--desktop { display: none; }
.nav-cta { display: none; }

/* Mobile nav overlay */
.mobile-nav {
	position: fixed;
	inset: 0;
	background: var(--color-primary-dark);
	color: var(--color-white);
	transform: translateX(100%);
	transition: transform 0.2s ease;
	z-index: 200;
	overflow-y: auto;
}
body.nav-open .mobile-nav { transform: translateX(0); }
.mobile-nav__menu { display: flex; flex-direction: column; padding: 90px 30px 30px; gap: 8px; }
.mobile-nav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.mobile-nav__list a {
	display: block;
	padding: 14px 0;
	color: var(--color-white);
	font-size: 1.2rem;
	border-bottom: 1px solid rgba(255,255,255,0.15);
}
.mobile-nav__cta { margin-top: 20px; justify-content: center; }
body.nav-open { overflow: hidden; }

/* Full-bleed photo-band hero — used for every page hero, and once more mid-page on Home ("Why
   French?"). A real photo (the page's Featured Image, or a theme-bundled fallback) fills the section;
   the gradient overlay is applied inline in template-parts/hero.php (varies per-photo, so it travels
   with the background-image itself rather than living here as a separate layered element). */
.hero-band {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	background-size: cover;
	background-position: center;
	color: var(--color-white);
	text-align: center;
	padding: 60px 0;
}
.hero-band--hero { min-height: 52vh; }
.hero-band--band { min-height: 280px; padding: 48px 0; }
.hero-band__inner { max-width: 720px; margin: 0 auto; }
.hero-band__heading { color: var(--color-white); }
.hero-band--hero .hero-band__heading { font-size: 2.1rem; }
.hero-band--band .hero-band__heading { font-size: 1.6rem; margin-bottom: 0; }
.hero-band__subheading { font-size: 1.05rem; color: rgba(255, 255, 255, 0.88); }
.eyebrow--on-photo { color: var(--color-white); opacity: 0.85; }

/* On a photo band, a navy "primary" button would nearly disappear into the dark overlay — flip it to
   a solid white pill (this also matches the reference site's own hero CTA treatment). The red accent
   button already has plenty of contrast against the dark overlay, so it's untouched. */
.hero-band .btn-primary { background: var(--color-white); color: var(--color-primary-dark); }
.hero-band .btn-primary:hover { background: var(--color-cream); }

/* Value props */
.value-props { padding: 60px 0; }
.value-props__grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
.value-prop {
	background: var(--color-white);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	padding: 28px;
	box-shadow: var(--shadow-sm);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.value-prop:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.value-prop__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 14px;
	background: var(--color-cream);
	color: var(--color-primary);
	margin-bottom: 16px;
}
.value-prop h2 { font-size: 1.15rem; }

/* Home intro / generic content */
.home-intro { padding: 10px 0 56px; }
.home-intro__content, .generic-page__content { max-width: 780px; margin: 0 auto; }

/* Testimonial quote — styles whatever blockquote the owner adds via the block editor's Quote block */
.home-intro__content blockquote {
	position: relative;
	margin: 2.5em 0;
	padding: 32px 32px 28px 64px;
	background: var(--color-cream);
	border-left: 4px solid var(--color-accent);
	border-radius: var(--radius);
	font-family: var(--font-heading);
	font-size: 1.15rem;
	font-style: italic;
	color: var(--color-primary-dark);
}
.home-intro__content blockquote::before {
	content: "\201C";
	position: absolute;
	top: 8px;
	left: 20px;
	font-family: var(--font-heading);
	font-size: 3.5rem;
	font-style: normal;
	color: var(--color-accent);
	opacity: 0.5;
	line-height: 1;
}
.home-intro__content blockquote p:last-child { margin-bottom: 0; }

/* CTA banner */
.cta-banner {
	background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
	color: var(--color-white);
	padding: 56px 0;
	text-align: center;
}
.cta-banner h2 { color: var(--color-white); }
.cta-banner .btn-accent { margin-top: 10px; }

/* Services page — the exam-board list itself now renders as a photo carousel (see the
   Carousel section below); this just spaces the section housing it. */
.services-list { padding: 44px 0; }

.pricing-section { padding: 20px 0 48px; }
.pricing-table-wrap { overflow-x: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.pricing-table { width: 100%; border-collapse: collapse; min-width: 480px; background: var(--color-white); }
.pricing-table th, .pricing-table td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--color-border); }
.pricing-table thead th { background: var(--color-primary); color: var(--color-white); font-weight: 600; }
.pricing-table tbody tr:last-child td { border-bottom: none; }
.pricing-table tbody tr:hover { background: var(--color-cream); }
.pricing-table__price { font-weight: 700; color: var(--color-accent); white-space: nowrap; }
.pricing-table__disclaimer { font-size: 0.85rem; color: var(--color-text-light); margin-top: 12px; }

.addons-section { padding: 0 0 48px; }
.addons-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.addons-list li { display: flex; align-items: center; gap: 10px; color: var(--color-text); }
.addons-list .icon { color: var(--color-accent); }

/* Contact page */
.contact-section { padding: 44px 0 64px; }
.contact-section__grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
.contact-details-col { align-self: start; }
.contact-details-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.contact-details-list li { display: flex; align-items: flex-start; gap: 14px; }
.contact-details-list .icon {
	color: var(--color-white);
	background: var(--color-primary);
	border-radius: 10px;
	padding: 7px;
	width: 34px;
	height: 34px;
	flex-shrink: 0;
}
.contact-details-list strong { display: block; color: var(--color-primary-dark); }
.contact-details-list span { display: block; }
.contact-details-list a { word-break: break-word; }

/* Contact Form 7 generic styling */
.wpcf7-form p { margin-bottom: 16px; }
.wpcf7-form label { display: block; font-weight: 600; margin-bottom: 6px; }
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	font-family: inherit;
	font-size: 1rem;
	transition: border-color 0.15s ease;
}
.wpcf7-form input:focus, .wpcf7-form textarea:focus { outline: none; border-color: var(--color-primary); }
.wpcf7-form input[type="submit"] {
	background: var(--color-accent);
	color: var(--color-white);
	border: none;
	padding: 13px 26px;
	border-radius: var(--radius-full);
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
	box-shadow: var(--shadow-sm);
}
.wpcf7-form input[type="submit"]:hover { background: var(--color-accent-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Booking page */
.booking-how-it-works { padding: 48px 0; }
.booking-how-it-works__grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
.booking-step { text-align: center; }
.booking-step__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px; height: 56px;
	border-radius: 50%;
	background: var(--color-accent);
	color: var(--color-white);
	margin-bottom: 14px;
	box-shadow: var(--shadow-sm);
}
.booking-widget-section { padding: 0 0 64px; }
.booking-widget-col { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }

/* Footer */
.site-footer { position: relative; background: var(--color-primary-dark); color: rgba(255,255,255,0.85); padding: 56px 0 20px; margin-top: 60px; }
.footer-wave { display: block; width: 100%; height: 60px; color: var(--color-primary-dark); fill: currentColor; margin-bottom: -1px; }
.site-footer a { color: var(--color-white); }
.footer-widgets, .footer-widgets--fallback { display: grid; grid-template-columns: 1fr; gap: 28px; margin-bottom: 34px; }
.footer-widget-title { display: flex; align-items: center; gap: 10px; color: var(--color-white); font-size: 1rem; }
.footer-widget-title .icon { color: var(--color-accent); }
.footer-nav-menu { list-style: none; display: flex; flex-wrap: wrap; gap: 16px; padding: 0; margin: 0 0 20px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 16px; font-size: 0.85rem; }

/* ---------- Tablet / desktop ---------- */
@media (min-width: 768px) {
	body { font-size: 18px; }
	h1 { font-size: 2.6rem; }
	.hero-band--hero .hero-band__heading { font-size: 3rem; }
	.hero-band--band .hero-band__heading { font-size: 2rem; }
	.value-props__grid { grid-template-columns: repeat(3, 1fr); }
	.contact-section__grid { grid-template-columns: 2fr 1fr; }
	.booking-how-it-works__grid { grid-template-columns: repeat(3, 1fr); }
	.footer-widgets, .footer-widgets--fallback { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 992px) {
	.nav-toggle { display: none; }
	.mobile-nav { display: none; }
	.site-nav--desktop {
		display: flex;
		align-items: center;
		gap: 24px;
	}
	.nav-menu { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; }
	.nav-menu a { color: var(--color-text); font-weight: 600; }
	.nav-menu a:hover { color: var(--color-primary); }
	.nav-cta { display: inline-flex; }
}

/* ---------- Responsive pricing table: collapse to stacked cards below tablet width ---------- */
@media (max-width: 640px) {
	.pricing-table-wrap { box-shadow: none; }
	.pricing-table, .pricing-table thead, .pricing-table tbody, .pricing-table tr, .pricing-table td { display: block; width: 100%; }
	.pricing-table thead { display: none; }
	.pricing-table tr {
		background: var(--color-white);
		border-radius: var(--radius-lg);
		box-shadow: var(--shadow-md);
		margin-bottom: 14px;
		padding: 6px 4px;
	}
	/* Stacked label-above-value, not a flex row: a flex row here made long cell values (e.g. the
	   full list of towns in the "Notes" column) overflow past the card edge instead of wrapping —
	   flex items default to min-width:auto, which stops text shrinking below its unwrapped width.
	   Plain block layout wraps normally with no such trap. */
	.pricing-table td {
		display: block;
		padding: 10px 16px;
		border-bottom: 1px solid var(--color-border);
		text-align: left;
	}
	.pricing-table td:last-child { border-bottom: none; }
	.pricing-table td::before {
		content: attr(data-label);
		display: block;
		font-size: 0.75rem;
		font-weight: 600;
		text-transform: uppercase;
		letter-spacing: 0.04em;
		color: var(--color-text-light);
		margin-bottom: 2px;
	}
}

/* ---------- Carousel (Services exam-board cards, Home "Why French?") ---------- */
.carousel { position: relative; margin-top: 28px; }
.carousel__track {
	display: flex;
	gap: 20px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	list-style: none;
	margin: 0;
	padding: 4px 20px 20px;
	scrollbar-width: thin;
	scrollbar-color: var(--color-border) transparent;
}
.carousel__track::-webkit-scrollbar { height: 8px; }
.carousel__track::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: var(--radius-full); }
.carousel__card {
	flex: 0 0 auto;
	width: 260px;
	scroll-snap-align: start;
	background: var(--color-white);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-md);
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.carousel__card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.carousel__card-image { aspect-ratio: 4 / 3; overflow: hidden; background: var(--color-cream); }
.carousel__card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel__card-body { padding: 16px 18px 20px; }
.carousel__card-body h3 { font-size: 1.05rem; margin-bottom: 4px; }
.carousel__card-body p { margin: 0; font-size: 0.9rem; color: var(--color-text-light); }

.carousel__nav {
	display: none;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 40px;
	height: 40px;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--color-white);
	border: 1px solid var(--color-border);
	box-shadow: var(--shadow-sm);
	color: var(--color-primary-dark);
	cursor: pointer;
}
.carousel__nav svg { width: 20px; height: 20px; }
.carousel__nav--prev { left: -8px; }
.carousel__nav--next { right: -8px; }
.carousel__nav:hover { background: var(--color-cream); }

/* Nav arrows only make sense once there's room beside the cards for them not to overlap content —
   below that, touch/trackpad swipe on the carousel track is the way to navigate it. This has to be
   declared after the base `.carousel__nav { display: none }` rule above (not inside the earlier
   768px media query block) so it actually wins the cascade at equal specificity. */
@media (min-width: 768px) {
	.carousel__nav { display: flex; }
}

/* Section intro text under the Home "Why French?" photo-band heading, above the carousel */
.culture-carousel { padding: 0 0 60px; }
.culture-carousel .container { padding-top: 40px; }
.section-intro { max-width: 640px; margin: 0 auto; text-align: center; color: var(--color-text-light); }

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.btn, .value-prop, .carousel__card, .wpcf7-form input[type="submit"] { transition: none; }
}
