/*
Theme Name: Adagio Dance
Theme URI: https://adagiodancellc.com
Author: T-Tech Solutions
Description: Custom theme for Adagio Dance LLC — a boutique dance studio in Rochester Hills, MI. Pairs with the Adagio Studio Manager plugin for class schedules, parent/teacher portals, and open-slot booking.
Version: 1.4.0
Requires PHP: 7.4
Text Domain: adagio-dance
*/

:root {
	--asm-accent: #c8623f;
	--asm-accent-dark: #9c4b2f;
	--asm-pink: #b3577c;
	--asm-text: #2c2622;
	--asm-text-muted: #6b6058;
	--asm-bg: #fbf8f4;
	--asm-surface: #ffffff;
	--asm-border: #e7ded4;
	--asm-radius: 8px;
	--asm-font-heading: 'Cormorant Garamond', Georgia, serif;
	--asm-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	font-family: var(--asm-font-body);
	color: var(--asm-text);
	background: var(--asm-bg);
	line-height: 1.65;
	font-size: 16px;
}

h1, h2, h3, h4, h5 {
	font-family: var(--asm-font-heading);
	font-weight: 600;
	line-height: 1.25;
	margin: 0 0 0.5em;
	color: var(--asm-text);
}
h1 { font-size: 2.6rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.4rem; }

p { margin: 0 0 1.1em; }
a { color: var(--asm-accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

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

/* Buttons */
.btn {
	display: inline-block;
	padding: 12px 24px;
	border-radius: var(--asm-radius);
	font-weight: 600;
	font-size: 0.95rem;
	cursor: pointer;
	border: 1px solid transparent;
	text-decoration: none;
}
.btn-primary {
	background: var(--asm-accent);
	color: #fff;
	border-color: var(--asm-accent);
}
.btn-primary:hover { background: var(--asm-accent-dark); text-decoration: none; }
.btn-secondary {
	background: transparent;
	color: var(--asm-text);
	border-color: var(--asm-border);
}
.btn-secondary:hover { background: var(--asm-surface); text-decoration: none; }

/* Header */
.site-header {
	background: var(--asm-surface);
	border-bottom: 1px solid var(--asm-border);
	position: sticky;
	top: 0;
	z-index: 50;
}
.site-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 24px;
	max-width: 1140px;
	margin: 0 auto;
}
.site-branding {
	display: flex;
	align-items: center;
	gap: 10px;
}
.site-branding img { max-height: 52px; width: auto; }
.site-title {
	font-family: var(--asm-font-heading);
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--asm-text);
	margin: 0;
	letter-spacing: 0.02em;
}
.site-title a { color: inherit; text-decoration: none; }

.primary-nav ul {
	list-style: none;
	display: flex;
	gap: 24px;
	margin: 0;
	padding: 0;
}
.primary-nav a {
	color: var(--asm-text);
	font-size: 0.95rem;
	font-weight: 500;
}
.primary-nav a:hover { color: var(--asm-accent-dark); text-decoration: none; }

.header-actions { display: flex; align-items: center; gap: 16px; }

.menu-toggle {
	display: none;
	background: none;
	border: none;
	font-size: 1.6rem;
	cursor: pointer;
	color: var(--asm-text);
}

@media (max-width: 860px) {
	.primary-nav {
		display: none;
		width: 100%;
		order: 3;
	}
	.primary-nav.is-open { display: block; }
	.primary-nav ul { flex-direction: column; gap: 0; padding: 12px 0; }
	.primary-nav a { display: block; padding: 10px 0; border-bottom: 1px solid var(--asm-border); }
	.site-header-inner { flex-wrap: wrap; }
	.menu-toggle { display: block; }
}

/* Hero */
.hero {
	position: relative;
	text-align: center;
	padding: 72px 24px 56px;
	background: linear-gradient(180deg, #fdf3ee 0%, var(--asm-bg) 100%);
	overflow: hidden;
}
.hero-content { position: relative; z-index: 2; }
.hero-eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.78rem;
	color: var(--asm-text-muted);
	margin-bottom: 14px;
}
.hero h1 {
	max-width: 720px;
	margin: 0 auto 18px;
	font-size: 2.9rem;
}
.hero-subtext {
	max-width: 560px;
	margin: 0 auto 28px;
	color: var(--asm-text-muted);
	font-size: 1.08rem;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Hero with a rotating photo background (only present once photos are set
   under Appearance → Customize → Adagio Photos; otherwise the plain
   flat-color hero above is all that renders). */
.hero-has-photos {
	min-height: 560px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 96px 24px;
	background: #1a1512;
}
.hero-slides { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	opacity: 0;
	transition: opacity 1.4s ease;
}
.hero-slide.is-active { opacity: 1; }
.hero-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(180deg, rgba(20,15,12,0.55) 0%, rgba(20,15,12,0.72) 100%);
}
.hero-has-photos .hero-eyebrow { color: rgba(255,255,255,0.85); }
.hero-has-photos h1,
.hero-has-photos .hero-subtext { color: #fff; }
.hero-has-photos .hero-subtext { opacity: 0.92; }

/* Who We Are (homepage bio + photo grid) */
.who-section { padding: 64px 24px; background: var(--asm-surface); border-top: 1px solid var(--asm-border); border-bottom: 1px solid var(--asm-border); }
.who-grid-wrap {
	display: grid;
	grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr);
	gap: 48px;
	align-items: center;
}
.who-copy .section-label {
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-size: 0.78rem;
	color: var(--asm-text-muted);
	margin-bottom: 10px;
}
.who-photo-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
}
.who-photo {
	aspect-ratio: 1 / 1;
	border-radius: var(--asm-radius);
	background-size: cover;
	background-position: center;
	background-color: var(--asm-border);
}
@media (max-width: 780px) {
	.who-grid-wrap { grid-template-columns: 1fr; }
}

/* Styles grid */
.styles-section { padding: 56px 24px; text-align: center; }
.section-label,
.styles-section .section-label {
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-size: 0.78rem;
	color: var(--asm-text-muted);
	margin-bottom: 28px;
}
.styles-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
	gap: 20px;
	max-width: 900px;
	margin: 0 auto;
}
.style-item { text-align: center; }
.style-item .style-icon {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: #f6e4dc;
	color: var(--asm-accent-dark);
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 10px;
	font-family: var(--asm-font-heading);
	font-size: 1.4rem;
	font-weight: 700;
}
.style-item span { font-weight: 500; }

/* Generic content sections */
.content-section { padding: 56px 24px; }
.content-section.alt { background: var(--asm-surface); border-top: 1px solid var(--asm-border); border-bottom: 1px solid var(--asm-border); }

.cards-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 20px;
	margin-top: 32px;
}
.card {
	background: var(--asm-surface);
	border: 1px solid var(--asm-border);
	border-radius: 12px;
	padding: 24px;
}

/* Schedule teaser (homepage card + Elementor "Upcoming Classes" widget) */
.schedule-teaser-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.schedule-teaser-row {
	display: flex;
	align-items: baseline;
	gap: 12px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--asm-border);
}
.schedule-teaser-row:last-child { border-bottom: none; padding-bottom: 0; }
.schedule-teaser-day { font-weight: 600; width: 42px; flex-shrink: 0; color: var(--asm-accent-dark); }
.schedule-teaser-name { flex: 1; }
.schedule-teaser-time { color: var(--asm-text-muted); font-size: 0.9rem; white-space: nowrap; }

/* Elementor-built pages: let Elementor's own sections run full width
   instead of being boxed in by the theme's .container max-width. */
.entry-content.elementor-full-width { max-width: none; padding: 0; }

/* Testimonial */
.testimonial { text-align: center; padding: 56px 24px; max-width: 640px; margin: 0 auto; }
.testimonial blockquote {
	font-family: var(--asm-font-heading);
	font-size: 1.5rem;
	font-style: italic;
	margin: 0 0 16px;
	color: var(--asm-text);
}
.testimonial cite { color: var(--asm-text-muted); font-style: normal; font-size: 0.9rem; }

/* CTA band */
.cta-band {
	background: var(--asm-accent);
	color: #fff;
	text-align: center;
	padding: 48px 24px;
}
.cta-band h2 { color: #fff; }
.cta-band .btn-primary { background: #fff; color: var(--asm-accent-dark); border-color: #fff; }
.cta-band .btn-primary:hover { background: #f6e4dc; }

/* Page content (generic pages / posts) */
.page-header { padding: 48px 24px 16px; text-align: center; }
.entry-content { padding: 0 24px 56px; max-width: 820px; margin: 0 auto; }
.entry-content img { border-radius: 8px; }

/* Portal / full-width template (for shortcode-driven pages) */
.portal-template .entry-content { max-width: 960px; }
.portal-template .page-header { padding-bottom: 24px; }

/* Footer */
.site-footer {
	background: #241f1c;
	color: #d8cfc7;
	padding: 48px 24px 24px;
}
.footer-inner {
	max-width: 1140px;
	margin: 0 auto;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 24px;
}
.footer-brand { font-family: var(--asm-font-heading); font-size: 1.3rem; color: #fff; margin-bottom: 8px; }
.site-footer a { color: #f0c9b8; }
.footer-meta {
	max-width: 1140px;
	margin: 32px auto 0;
	padding-top: 20px;
	border-top: 1px solid #3a332e;
	font-size: 0.85rem;
	color: #a89b90;
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
}
.footer-social { display: flex; gap: 14px; }

/* Plugin shortcode areas get a little breathing room + card feel on pages */
.entry-content .asm-schedule,
.entry-content .asm-open-slots,
.entry-content .asm-portal {
	background: var(--asm-surface);
	border: 1px solid var(--asm-border);
	border-radius: 12px;
	padding: 28px;
}

@media (max-width: 600px) {
	.hero h1 { font-size: 2.1rem; }
	h2 { font-size: 1.6rem; }
	.hero-has-photos { min-height: 420px; padding: 64px 20px; }
}

/* Gallery lightbox — click any WordPress Gallery block image to enlarge.
   No plugin required; see assets/js/gallery-lightbox.js. */
.wp-block-gallery figure.wp-block-image { cursor: zoom-in; }
.adagio-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: rgba(15, 12, 10, 0.92);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px;
}
.adagio-lightbox img {
	max-width: 100%;
	max-height: 100%;
	border-radius: 4px;
	box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.adagio-lightbox-close,
.adagio-lightbox-prev,
.adagio-lightbox-next {
	position: absolute;
	background: rgba(255,255,255,0.12);
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 44px;
	height: 44px;
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
.adagio-lightbox-close:hover,
.adagio-lightbox-prev:hover,
.adagio-lightbox-next:hover { background: rgba(255,255,255,0.24); }
.adagio-lightbox-close { top: 20px; right: 20px; }
.adagio-lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.adagio-lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) {
	.adagio-lightbox { padding: 16px; }
	.adagio-lightbox-prev, .adagio-lightbox-next { width: 38px; height: 38px; }
}
