/**
 * School CMS - Frontend Styles
 * A clean, modern, and accessible stylesheet
 */

/* =====================================================
   CSS Variables (Customize these for each school)
   ===================================================== */
:root {
    /* Primary Colors - Elementi Education Teal/Turquoise */
    --primary: #00a19a;
    --primary-dark: #008b85;
    --primary-light: #e0f5f4;

    /* Secondary Colors */
    --secondary: #5a5a5a;
    --secondary-dark: #3d3d3d;
    --secondary-light: #f5f5f5;

    /* Accent Color - Orange/Gold for highlights */
    --accent: #f5a623;

    /* Neutral Colors */
    --white: #ffffff;
    --black: #0f172a;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans TC", sans-serif;
    --font-heading: var(--font-sans);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Layout */
    --container-max: 1200px;
    --container-wide: 1400px;
    --container-narrow: 800px;

    /* Borders */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition: 0.2s ease;
}

/* =====================================================
   Reset & Base Styles
   ===================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    /* Account for fixed header when scrolling to anchors */
    scroll-padding-top: var(--header-height, 120px);
}

/* Ensure sections with IDs have scroll margin for fixed header */
section[id],
[id].section {
    scroll-margin-top: var(--header-height, 120px);
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--white);
}

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

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* =====================================================
   Typography
   ===================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    color: var(--gray-900);
    margin-bottom: var(--space-md);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

/* Responsive typography for mobile */
@media (max-width: 768px) {
    h1 { font-size: 1.875rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.125rem; }
}

p {
    margin-bottom: var(--space-md);
}

.prose {
    max-width: 65ch;
}

.prose p:last-child {
    margin-bottom: 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* =====================================================
   Layout
   ===================================================== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    position: relative;
    z-index: 1;
}

/* Mobile container padding */
@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-md);
    }
}

.container--wide {
    max-width: var(--container-wide);
}

.container--narrow,
.container--medium {
    max-width: var(--container-narrow);
}

/* =====================================================
   Header
   ===================================================== */
:root {
    --header-height: 120px; /* Approximate height of two-row header */
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--header-bg, transparent);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Solid header when scrolled or on pages without slider */
.site-header.solid,
body:not(.has-slider) .site-header {
    background: var(--header-bg-solid, var(--white));
    box-shadow: var(--shadow-sm);
}

/* Header text colors for transparent/initial state */
.site-header:not(.solid) .header-brand a,
.site-header:not(.solid) .nav-item > a,
.site-header:not(.solid) .lang-switcher a {
    color: var(--header-text, var(--white));
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.site-header:not(.solid) .lang-switcher a.active {
    background: rgba(255, 255, 255, 0.2);
    color: var(--header-text, var(--white));
}

.site-header:not(.solid) .mobile-menu-toggle span {
    background: var(--header-text, var(--white));
}

/* Solid state colors */
.site-header.solid .header-brand a,
body:not(.has-slider) .site-header .header-brand a {
    color: var(--header-text-solid, var(--gray-700));
    text-shadow: none;
}

.site-header.solid .nav-item > a,
body:not(.has-slider) .site-header .nav-item > a {
    color: var(--header-text-solid, var(--gray-700));
}

.site-header.solid .lang-switcher a,
body:not(.has-slider) .site-header .lang-switcher a {
    color: var(--header-text-solid, var(--gray-500));
}

.site-header.solid .mobile-menu-toggle span,
body:not(.has-slider) .site-header .mobile-menu-toggle span {
    background: var(--header-text-solid, var(--gray-700));
}

/* Header Top Row - Logo + Org Name + Language */
.header-top {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.site-header.solid .header-top,
body:not(.has-slider) .site-header .header-top {
    border-bottom: 1px solid var(--gray-200);
}

.header-top .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-md);
    padding-bottom: var(--space-md);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.site-logo img {
    height: 70px;
    width: auto;
}

.site-name-image img {
    height: 50px;
    width: auto;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

/* Header Nav Row - Navigation Menu */
.header-nav {
    background: transparent;
    transition: background-color 0.3s ease;
}

/* Solid state nav background */
.site-header.solid .header-nav,
body:not(.has-slider) .site-header .header-nav {
    background: var(--header-bg-solid, var(--white));
}

.header-nav .container {
    display: flex;
    justify-content: center;
}

.header-nav .nav-menu {
    justify-content: center;
}

/* Navigation */
.main-nav {
    display: none;
}

@media (min-width: 992px) {
    .main-nav {
        display: block;
    }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--space-lg);
}

.nav-item > a {
    display: block;
    padding: var(--space-sm) 0;
    color: var(--gray-700);
    font-weight: 500;
    transition: color var(--transition);
}

.nav-item > a:hover,
.nav-item.active > a {
    color: var(--primary);
}

/* Dropdown */
.nav-item.has-dropdown {
    position: relative;
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    list-style: none;
    padding: var(--space-sm) 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition);
}

.nav-item.has-dropdown:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown a {
    display: block;
    padding: var(--space-sm) var(--space-lg);
    color: var(--gray-700);
}

.nav-dropdown a:hover {
    background: var(--gray-50);
    color: var(--primary);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.lang-switcher {
    display: flex;
    gap: var(--space-xs);
}

.lang-switcher a {
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-500);
}

.lang-switcher a:hover,
.lang-switcher a.active {
    color: var(--primary);
    background: var(--primary-light);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 101;
    position: relative;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Hamburger to X animation when menu is open */
body.menu-open .mobile-menu-toggle span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

body.menu-open .mobile-menu-toggle span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

body.menu-open .mobile-menu-toggle span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Ensure toggle uses solid colors when menu is open */
body.menu-open .mobile-menu-toggle span {
    background: var(--header-text-solid, var(--gray-700));
}

@media (min-width: 992px) {
    .mobile-menu-toggle {
        display: none;
    }
}

/* =====================================================
   Buttons
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
}

.btn-white {
    background: var(--white);
    color: var(--primary);
}

.btn-white:hover {
    background: var(--gray-100);
    color: var(--primary-dark);
}

.btn-outline-white {
    background: transparent;
    border-color: var(--white);
    color: var(--white);
}

.btn-outline-white:hover {
    background: var(--white);
    color: var(--primary);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Mobile-friendly button touch targets */
@media (max-width: 768px) {
    .btn {
        min-height: 44px;
        padding: 0.875rem 1.25rem;
    }

    .btn-lg {
        padding: 1rem 1.5rem;
    }
}

/* =====================================================
   Sections
   ===================================================== */
.section {
    padding: var(--space-3xl) 0;
    position: relative;
    overflow: hidden;
}

/* Mobile section padding */
@media (max-width: 768px) {
    .section {
        padding: var(--space-2xl) 0;
    }
}

.section--light {
    background: var(--gray-50);
}

.section--primary {
    background: var(--primary);
    color: var(--white);
}

.section--primary h2,
.section--primary h3 {
    color: var(--white);
}

.section--primary-light {
    background: var(--primary-light);
}

.section--secondary {
    background: var(--secondary);
    color: var(--white);
}

.section--secondary h2,
.section--secondary h3 {
    color: var(--white);
}

.section--accent {
    background: var(--accent);
    color: var(--white);
}

.section--accent h2,
.section--accent h3 {
    color: var(--white);
}

.section--dark {
    background: var(--gray-800);
    color: var(--white);
}

.section--dark h2,
.section--dark h3 {
    color: var(--white);
}

/* For custom dark background colors (auto-detected) */
.section--dark-bg {
    color: var(--white);
}

.section--dark-bg h2,
.section--dark-bg h3,
.section--dark-bg h4 {
    color: var(--white);
}

.section--dark-bg p,
.section--dark-bg .prose {
    color: rgba(255, 255, 255, 0.9);
}

.section--dark-bg a:not(.btn):not(.card__link) {
    color: var(--white);
    text-decoration: underline;
}

/* Custom text color overrides dark-bg link color */
.section--dark-bg.section--custom-text-color a:not(.btn):not(.card__link) {
    color: var(--section-text-color, inherit);
}

/* Custom text color (user-specified via admin) */
.section--custom-text-color {
    color: var(--section-text-color, inherit);
}

.section--custom-text-color h1,
.section--custom-text-color h2,
.section--custom-text-color h3,
.section--custom-text-color h4,
.section--custom-text-color h5,
.section--custom-text-color h6 {
    color: var(--section-text-color, inherit);
}

.section--custom-text-color p,
.section--custom-text-color .prose,
.section--custom-text-color li {
    color: var(--section-text-color, inherit);
}

.section--custom-text-color .section__heading {
    color: var(--section-text-color, inherit);
}

/* Override dark-bg rules when custom text color is set */
.section--custom-text-color.section--dark-bg,
.section--custom-text-color.section--dark-bg h2,
.section--custom-text-color.section--dark-bg h3,
.section--custom-text-color.section--dark-bg h4,
.section--custom-text-color.section--dark-bg p,
.section--custom-text-color.section--dark-bg .prose {
    color: var(--section-text-color, inherit);
}

/* Tabs panel text color when custom is set */
.section--custom-text-color .tabs__panel {
    color: var(--section-text-color, inherit);
}

.section--custom-text-color .tabs__subtitle,
.section--custom-text-color .tabs__address,
.section--custom-text-color .tabs__contact {
    color: var(--section-text-color, inherit);
}

/* Tab buttons with per-field custom colors */
.tabs__button--custom-color:not(.tabs__button--active) {
    color: var(--tab-custom-color, inherit);
}


.section__heading {
    margin-bottom: var(--space-xl);
}

.section__content {
    margin: 0 auto;
}

.section--padding-sm { padding: var(--space-xl) 0; }
.section--padding-md { padding: var(--space-3xl) 0; }
.section--padding-lg { padding: 5rem 0; }

/* =====================================================
   Hero Block
   ===================================================== */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-color: var(--gray-800);
    color: var(--white);
}

.hero--small { min-height: 300px; }
.hero--medium { min-height: 450px; }
.hero--large { min-height: 600px; }
.hero--full { min-height: 100vh; }

.hero--overlay-light::before,
.hero--overlay-medium::before,
.hero--overlay-dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--black);
}

.hero--overlay-light::before { opacity: 0.2; }
.hero--overlay-medium::before { opacity: 0.4; }
.hero--overlay-dark::before { opacity: 0.6; }

.hero__content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: var(--space-xl);
}

.hero--align-left .hero__content { text-align: left; }
.hero--align-right .hero__content { text-align: right; }

.hero__title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--white);
    margin-bottom: var(--space-md);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero__subtitle {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    opacity: 0.9;
    margin-bottom: var(--space-xl);
    max-width: 600px;
}

.hero--align-center .hero__subtitle {
    margin-left: auto;
    margin-right: auto;
}

/* =====================================================
   Cards Block
   ===================================================== */
.cards-grid {
    display: grid;
    gap: var(--space-lg);
}

.cards-grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.cards-grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.cards-grid--4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

@media (min-width: 768px) {
    .cards-grid--2 { grid-template-columns: repeat(2, 1fr); }
    .cards-grid--3 { grid-template-columns: repeat(3, 1fr); }
    .cards-grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

.card--bordered {
    border: 1px solid var(--gray-200);
}

.card--shadow {
    box-shadow: var(--shadow-md);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card--horizontal {
    display: flex;
    align-items: flex-start;
}

.card--horizontal .card__icon {
    flex-shrink: 0;
}

.card__icon {
    font-size: 2.5rem;
    padding: var(--space-lg);
    text-align: center;
}

.card__body {
    padding: var(--space-lg);
}

.card__title {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

.card__text {
    color: var(--gray-600);
    margin-bottom: var(--space-md);
}

.card__link {
    font-weight: 600;
    color: var(--primary);
}

/* Cards should always have dark text (they have white background) */
.section--dark-bg .card,
.section--has-bg-image .card {
    color: var(--gray-800);
}

.section--dark-bg .card__title,
.section--has-bg-image .card__title {
    color: var(--gray-900);
}

.section--dark-bg .card__text,
.section--has-bg-image .card__text {
    color: var(--gray-600);
}

.section--dark-bg .card__link,
.section--has-bg-image .card__link {
    color: var(--primary);
}

/* Section heading stays dark even with background image */
.section-cards.section--dark-bg .section__heading,
.section-cards.section--has-bg-image .section__heading {
    color: var(--gray-900);
}

/* =====================================================
   CTA Block
   ===================================================== */
.cta {
    background-size: cover;
    background-position: center;
}

.cta--primary {
    background-color: var(--primary);
    color: var(--white);
}

.cta--secondary {
    background-color: var(--secondary);
    color: var(--white);
}

.cta--dark {
    background-color: var(--gray-900);
    color: var(--white);
}

.cta--light {
    background-color: var(--gray-100);
    color: var(--gray-900);
}

.cta__heading {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: var(--space-md);
}

.cta--primary .cta__heading,
.cta--secondary .cta__heading,
.cta--dark .cta__heading {
    color: var(--white);
}

.cta__description {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: var(--space-xl);
    max-width: 600px;
}

.cta .container[style*="center"] .cta__description {
    margin-left: auto;
    margin-right: auto;
}

.cta__buttons {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    justify-content: inherit;
}

/* =====================================================
   Footer
   ===================================================== */
.site-footer {
    background: var(--footer-bg-color, var(--gray-900));
    color: var(--footer-text-color, var(--gray-300));
    padding: var(--space-3xl) 0 var(--space-lg);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-logo {
    height: 50px;
    width: auto;
    margin-bottom: var(--space-md);
}

.footer-info p {
    margin-bottom: var(--space-sm);
    font-size: 0.9375rem;
}

.footer-info a {
    color: var(--footer-link-color, var(--gray-300));
}

.footer-info a:hover {
    color: var(--footer-text-color, var(--white));
}

.footer-social {
    display: flex;
    gap: var(--space-md);
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--footer-text-color, var(--gray-300));
    transition: all var(--transition);
}

.footer-social a:hover {
    background: transparent;
    color: var(--footer-link-color, var(--primary));
}

.footer-bottom {
    padding-top: var(--space-lg);
    border-top: 1px solid var(--gray-800);
    text-align: center;
    font-size: 0.875rem;
}

.footer-copyright {
    margin-bottom: var(--space-md);
}

.footer-legal-links {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.footer-legal-btn {
    display: inline-block;
    padding: var(--space-sm) var(--space-lg);
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.875rem;
    transition: all var(--transition);
}

.footer-legal-btn:hover {
    background: var(--primary-dark);
    color: var(--white);
}

.footer-bottom p {
    margin: 0;
}

/* Footer 3-Column Grid Layout */
.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1.5fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-xl);
}

/* Column 1: Brand */
.footer-brand {
    display: flex;
    flex-direction: column;
}

.footer-brand .footer-logo {
    width: 80px;
    height: auto;
    margin-bottom: var(--space-md);
    object-fit: contain;
}

.footer-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: var(--space-sm);
}

.footer-tagline {
    font-size: 0.9375rem;
    color: var(--footer-text-color, var(--gray-400));
    line-height: 1.6;
    margin-bottom: 0;
}

/* Column 2: Quick Links */
.footer-links {
    padding-top: var(--space-xs);
}

.footer-heading {
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-divider {
    width: 40px;
    height: 3px;
    background: var(--primary);
    margin-bottom: var(--space-md);
}

.footer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav li {
    margin-bottom: var(--space-sm);
}

.footer-nav a {
    color: var(--gray-400);
    font-size: 0.9375rem;
    transition: color var(--transition);
}

.footer-nav a:hover {
    color: var(--white);
}

/* Footer buttons style */
.footer-nav--buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-nav--buttons .footer-btn {
    background: transparent;
    border: 1px solid;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: var(--btn-border-radius, 4px);
    transition: all var(--transition);
    text-decoration: none;
}

.footer-nav--buttons .footer-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Column 3: Contact Info */
.footer-contact {
    padding-top: var(--space-xs);
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.footer-contact-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    color: var(--primary);
}

.footer-contact-qr {
    width: 100px;
    height: auto;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
}

.footer-contact-item p {
    margin-bottom: var(--space-xs);
    font-size: 0.9375rem;
    color: var(--footer-text-color, var(--gray-400));
}

.footer-contact-item a {
    color: var(--footer-link-color, var(--gray-300));
}

.footer-contact-item a:hover {
    color: var(--footer-text-color, var(--white));
}

.footer-hours {
    font-size: 0.875rem;
    color: var(--footer-text-color, var(--gray-500));
    margin-bottom: var(--space-md);
    font-style: italic;
    opacity: 0.8;
}

/* Social Icons in Footer */
.footer-social {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--footer-text-color, var(--gray-300));
    transition: all var(--transition);
}

.social-icon:hover {
    background: transparent;
    color: var(--footer-link-color, var(--primary));
}

.social-icon svg {
    width: 18px;
    height: 18px;
}

/* Footer Grid Responsive */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-xl);
    }

    .footer-contact {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
        text-align: center;
    }

    .footer-brand {
        align-items: center;
    }

    .footer-divider {
        margin-left: auto;
        margin-right: auto;
    }

    .footer-contact-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }
}

/* =====================================================
   Mobile Menu (JavaScript toggles .menu-open)
   ===================================================== */
@media (max-width: 991px) {
    .header-nav {
        display: none;
    }

    body.menu-open .header-nav {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--header-bg-solid, var(--white));
        padding: var(--space-lg);
        padding-top: 100px;
        overflow-y: auto;
        z-index: 99;
    }

    body.menu-open .main-nav {
        display: block;
    }

    /* Mobile menu text colors - always use solid colors */
    body.menu-open .nav-item > a,
    body.menu-open .nav-dropdown a {
        color: var(--header-text-solid, var(--gray-700));
        text-shadow: none;
    }

    body.menu-open .nav-item > a:hover,
    body.menu-open .nav-dropdown a:hover {
        color: var(--primary);
    }

    .nav-menu {
        flex-direction: column;
        gap: 0;
    }

    .nav-item > a {
        padding: var(--space-md) 0;
        border-bottom: 1px solid var(--gray-100);
    }

    .nav-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: var(--space-lg);
    }

    .nav-dropdown a {
        padding: var(--space-sm) 0;
        display: block;
    }

    .site-name-image {
        display: none;
    }

    .site-logo img {
        height: 50px;
    }

    /* Mobile header top padding adjustment */
    .header-top .container {
        padding-top: var(--space-sm);
        padding-bottom: var(--space-sm);
    }

    /* Mobile language switcher */
    .lang-switcher {
        gap: var(--space-xs);
    }

    .lang-switcher a {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.8125rem;
    }
}

/* =====================================================
   Utility Classes
   ===================================================== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* =====================================================
   Timeline Block
   ===================================================== */
.section-timeline {
    background: var(--gray-50);
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: var(--space-xl) 0;
}

/* Center line */
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary);
    transform: translateX(-50%);
}

.timeline__item {
    position: relative;
    width: 50%;
    padding: var(--space-lg);
}

.timeline__item--left {
    padding-right: calc(var(--space-xl) + 20px);
    text-align: right;
}

.timeline__item--right {
    margin-left: 50%;
    padding-left: calc(var(--space-xl) + 20px);
}

.timeline__dot {
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border: 3px solid var(--white);
    border-radius: 50%;
    box-shadow: var(--shadow-md);
}

.timeline__item--left .timeline__dot {
    right: -8px;
}

.timeline__item--right .timeline__dot {
    left: -8px;
}

.timeline__content {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
}

.timeline__year {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.875rem;
    margin-bottom: var(--space-sm);
}

.timeline__title {
    font-size: 1.125rem;
    margin-bottom: var(--space-xs);
}

.timeline__description {
    color: var(--gray-600);
    margin-bottom: 0;
    font-size: 0.9375rem;
}

/* Timeline content cards should always have dark text (they have white background) */
.section--dark-bg .timeline__content,
.section--has-bg-image .timeline__content {
    color: var(--gray-800);
}

.section--dark-bg .timeline__title,
.section--has-bg-image .timeline__title {
    color: var(--gray-900);
}

.section--dark-bg .timeline__description,
.section--has-bg-image .timeline__description {
    color: var(--gray-600);
}

/* Timeline with images */
.timeline__content--has-image {
    display: flex;
    flex-direction: column;
}

.timeline__image {
    margin: calc(var(--space-lg) * -1);
    margin-bottom: var(--space-md);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow: hidden;
}

.timeline__image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.timeline__content--has-image .timeline__text {
    padding: 0;
}

/* Mobile timeline */
@media (max-width: 768px) {
    .timeline::before {
        left: 15px;
    }

    .timeline__item,
    .timeline__item--left,
    .timeline__item--right {
        width: 100%;
        margin-left: 0;
        padding-left: calc(var(--space-xl) + 20px);
        padding-right: var(--space-md);
        text-align: left;
    }

    .timeline__item--left .timeline__dot,
    .timeline__item--right .timeline__dot {
        left: 7px;
        right: auto;
    }
}

/* =====================================================
   Feature Block (Image + Text)
   ===================================================== */
.section-feature {
    padding: var(--space-3xl) 0;
    position: relative;
    overflow: hidden;
}

/* Background image layer */
.section__bg-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 0;
    pointer-events: none;
}

.section--has-bg-image .container {
    position: relative;
    z-index: 1;
}

.feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

.feature--image-right .feature__image {
    order: 2;
}

.feature--image-right .feature__content {
    order: 1;
}

/* Center/stacked layout */
.feature--image-center .feature {
    grid-template-columns: 1fr;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.feature--image-center .feature__image {
    max-width: 600px;
    margin: 0 auto;
}

.feature--image-center .feature__content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature--image-center .feature__text {
    max-width: 700px;
}

/* Text-only layout (no image) */
.feature--text-only .feature {
    grid-template-columns: 1fr;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.feature--text-only .feature__content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature--text-only .feature__text {
    max-width: 700px;
}

/* Image-only layout (no text) */
.feature--image-only .feature {
    grid-template-columns: 1fr;
    text-align: center;
}

.feature--image-only .feature__image {
    max-width: 800px;
    margin: 0 auto;
}

/* Text alignment options */
.feature--text-left .feature__content {
    text-align: left;
}

.feature--text-center .feature__content {
    text-align: center;
}

.feature--text-center .feature__content .feature__button {
    margin-left: auto;
    margin-right: auto;
}

.feature--text-right .feature__content {
    text-align: right;
}

.feature--text-right .feature__content .feature__button {
    margin-left: auto;
}

.feature__image img {
    width: 100%;
}

/* Image style variants */
.feature__image--flat img {
    border-radius: 0;
    box-shadow: none;
}

.feature__image--shadow img {
    border-radius: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.feature__image--rounded img {
    border-radius: var(--radius-lg);
    box-shadow: none;
}

.feature__image--rounded-shadow img {
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.feature__title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: var(--space-md);
}

.feature__text {
    margin-bottom: var(--space-lg);
}

.feature__text p {
    color: var(--gray-600);
    font-size: 1.0625rem;
    line-height: 1.7;
}

.section--primary .feature__text p,
.section--overlay .feature__text p {
    color: rgba(255, 255, 255, 0.9);
}

.section--overlay {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.section--overlay .feature__title {
    color: var(--white);
}

@media (max-width: 768px) {
    .feature {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .feature--image-right .feature__image,
    .feature--image-right .feature__content {
        order: unset;
    }
}

/* =====================================================
   Tabs Block
   ===================================================== */
.tabs {
    max-width: 900px;
    margin: 0 auto;
}

.tabs__nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    border-bottom: 2px solid var(--gray-200);
    padding-bottom: var(--space-sm);
}

.tabs__button {
    padding: var(--space-sm) var(--space-lg);
    border: none;
    background: var(--gray-100);
    color: var(--gray-600);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
}

.tabs__button:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.tabs__button--active {
    background: var(--primary);
    color: var(--white);
}

.tabs__button--active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--primary);
}

.tabs__content {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.tabs__panel {
    display: none;
    padding: var(--space-xl);
}

.tabs__panel--active {
    display: block;
}

.tabs__panel-content {
    text-align: center;
}

.tabs__subtitle {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
    color: var(--primary);
}

.tabs__address {
    font-size: 1rem;
    margin-bottom: var(--space-md);
}

.tabs__contact {
    margin-bottom: var(--space-sm);
    color: var(--gray-600);
}

.tabs__contact a {
    color: var(--primary);
}

/* Allow inline styles to override link colors */
.tabs__contact a[style] {
    color: inherit;
}

/* When section has custom text color, links should inherit it */
.section--custom-text-color .tabs__contact a {
    color: inherit;
}

.tabs__map {
    margin-top: var(--space-lg);
}

.tabs__map iframe {
    width: 100%;
    height: 300px;
    border: none;
    border-radius: var(--radius-md);
}

.tabs__image {
    margin-top: var(--space-lg);
}

.tabs__image img {
    max-width: 120px;
    margin: 0 auto;
    border-radius: var(--radius-md);
}

@media (max-width: 600px) {
    .tabs__nav {
        flex-direction: column;
    }

    .tabs__button {
        width: 100%;
        border-radius: var(--radius-md);
    }

    .tabs__button--active::after {
        display: none;
    }
}

/* =====================================================
   Card Image Styles
   ===================================================== */
.card__image {
    margin: calc(var(--space-lg) * -1);
    margin-bottom: var(--space-md);
    height: 160px;
    overflow: hidden;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.card:hover .card__image img {
    transform: scale(1.05);
}

/* Card YouTube Video Thumbnail */
.card__image--youtube {
    position: relative;
    height: auto;
    aspect-ratio: 16 / 9;
}

.card__image--youtube a {
    display: block;
    width: 100%;
    height: 100%;
}

.card__image--youtube img {
    object-fit: contain;
    background: #000;
}

.card__play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.9;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.card__play-button svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.card:hover .card__play-button {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* YouTube-only card: hide empty body and adjust layout */
.card--youtube .card__body:empty {
    display: none;
}

.card--youtube .card__body {
    padding: var(--space-md);
}

/* When card only has YouTube video (no text content) */
.card--video-only {
    padding: 0 !important;
    overflow: hidden;
}

.card--video-only .card__body {
    display: none !important;
}

.card--video-only .card__image,
.card--video-only .card__image--youtube {
    margin: 0 !important;
    border-radius: var(--radius-lg);
}

/* Video card with title overlay */
.card--video-titled {
    padding: 0 !important;
    overflow: hidden;
}

.card--video-titled .card__body {
    display: none !important;
}

.card--video-titled .card__image,
.card--video-titled .card__image--youtube {
    margin: 0 !important;
    border-radius: var(--radius-lg);
}

/* Video title overlay on thumbnail */
.card__video-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 0.75rem 0.75rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.5) 60%, transparent 100%);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.3;
    text-align: left;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

/* =====================================================
   Fullscreen Slider (extends behind header)
   ===================================================== */
.main-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-top: calc(-1 * var(--header-height));
    padding-top: var(--header-height);
}

.main-slider.slider--fullscreen {
    height: 100vh;
    min-height: 600px;
}

.main-slider.slider--default {
    height: calc(70vh + var(--header-height));
    min-height: 500px;
}

.slider-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.slider-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--gray-800);
}

.slider-item.active {
    opacity: 1;
}

/* Dark overlay for better text readability */
.slider-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.1) 30%,
        rgba(0, 0, 0, 0.1) 70%,
        rgba(0, 0, 0, 0.4) 100%);
}

.slider-caption {
    position: absolute;
    bottom: 15%;
    left: 0;
    right: 0;
    z-index: 2;
    color: var(--white);
}

.slider-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--white);
    margin-bottom: var(--space-md);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.slider-subtitle {
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--white);
    opacity: 0.9;
    margin-bottom: var(--space-xl);
    max-width: 600px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Slider Controls */
.slider-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    z-index: 3;
    display: flex;
    justify-content: space-between;
    padding: 0 var(--space-lg);
    pointer-events: none;
}

.slider-control {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.3);
    border: none;
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    pointer-events: auto;
}

.slider-control:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* Slider Indicators */
.slider-indicators {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: var(--space-sm);
}

.slider-indicator {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
}

.slider-indicator:hover,
.slider-indicator.active {
    background: var(--white);
}

/* Slider Height Variants */
.main-slider.slider--small {
    height: calc(300px + var(--header-height));
    min-height: 300px;
}

.main-slider.slider--medium {
    height: calc(450px + var(--header-height));
    min-height: 450px;
}

.main-slider.slider--large {
    height: calc(600px + var(--header-height));
    min-height: 600px;
}

/* Slider Text Horizontal Alignment */
.main-slider.slider--align-left .slider-caption {
    text-align: left;
}

.main-slider.slider--align-left .slider-subtitle {
    margin-left: 0;
    margin-right: auto;
}

.main-slider.slider--align-center .slider-caption {
    text-align: center;
}

.main-slider.slider--align-center .slider-subtitle {
    margin-left: auto;
    margin-right: auto;
}

.main-slider.slider--align-right .slider-caption {
    text-align: right;
}

.main-slider.slider--align-right .slider-subtitle {
    margin-left: auto;
    margin-right: 0;
}

/* Slider Text Vertical Alignment */
.main-slider.slider--valign-top .slider-caption {
    top: calc(var(--header-height) + 10%);
    bottom: auto;
}

.main-slider.slider--valign-middle .slider-caption {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
}

.main-slider.slider--valign-bottom .slider-caption {
    top: auto;
    bottom: 15%;
}

/* Slider Overlay Options */
.main-slider.slider--overlay-none .slider-item::before {
    display: none;
}

.main-slider.slider--overlay-light .slider-item::before {
    background: rgba(255, 255, 255, 0.4);
}

.main-slider.slider--overlay-light .slider-title,
.main-slider.slider--overlay-light .slider-subtitle {
    color: var(--gray-900);
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.5);
}

.main-slider.slider--overlay-light .slider-control {
    background: rgba(0, 0, 0, 0.2);
    color: var(--gray-900);
}

.main-slider.slider--overlay-light .slider-indicator {
    background: rgba(0, 0, 0, 0.3);
}

.main-slider.slider--overlay-light .slider-indicator.active {
    background: var(--gray-900);
}

.main-slider.slider--overlay-dark .slider-item::before {
    background: rgba(0, 0, 0, 0.4);
}

.main-slider.slider--overlay-gradient .slider-item::before {
    background: linear-gradient(to bottom,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.0) 30%,
        rgba(0, 0, 0, 0.2) 70%,
        rgba(0, 0, 0, 0.6) 100%);
}

/* Body padding for fixed header on non-slider pages */
body:not(.has-slider) .site-main {
    padding-top: var(--header-height);
}

/* Mobile slider adjustments */
@media (max-width: 768px) {
    :root {
        --header-height: 80px;
    }

    .main-slider.slider--fullscreen {
        min-height: 500px;
    }

    .slider-caption {
        bottom: 15%;
        padding: 0 var(--space-md);
    }

    .slider-control {
        width: 44px;
        height: 44px;
    }

    /* Hide slider arrows on small mobile, rely on swipe */
    .slider-prev,
    .slider-next {
        display: none;
    }

    /* Show indicators more prominently on mobile */
    .slider-indicators {
        bottom: 5%;
    }

    .slider-indicator {
        width: 10px;
        height: 10px;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .main-slider.slider--fullscreen {
        min-height: 400px;
    }

    .slider-caption {
        bottom: 12%;
    }
}

/* =====================================================
   Print Styles
   ===================================================== */
@media print {
    .site-header,
    .site-footer,
    .mobile-menu-toggle {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }
}

/* =====================================================
   Gallery Block
   ===================================================== */
.section-gallery {
    position: relative;
}

/* Section padding variations (can be used by any block) */
.section.section--padding-none {
    padding: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.section.section--padding-none .section__heading {
    margin-top: var(--space-sm) !important;
    margin-bottom: var(--space-sm) !important;
}

/* When gallery has no heading, remove all top spacing */
.section--padding-none .gallery:first-child,
.section--padding-none .container > .gallery {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.section.section--padding-small {
    padding: var(--space-lg) 0 !important;
}

.section.section--padding-small .section__heading {
    margin-bottom: var(--space-md) !important;
}

.section.section--padding-large {
    padding: var(--space-4xl) 0 !important;
}

.gallery {
    display: grid;
    gap: var(--space-lg);
}

.gallery--cols-1 { grid-template-columns: 1fr; max-width: 800px; margin-left: auto; margin-right: auto; }
.gallery--cols-2 { grid-template-columns: repeat(2, 1fr); }
.gallery--cols-3 { grid-template-columns: repeat(3, 1fr); }
.gallery--cols-4 { grid-template-columns: repeat(4, 1fr); }
.gallery--cols-5 { grid-template-columns: repeat(5, 1fr); }

/* Gallery max-width for images (useful for text/logo images) */
.gallery--max-large .gallery__item img { max-width: 600px; margin-left: auto; margin-right: auto; }
.gallery--max-medium .gallery__item img { max-width: 400px; margin-left: auto; margin-right: auto; }
.gallery--max-small .gallery__item img { max-width: 300px; margin-left: auto; margin-right: auto; }

/* Gallery gap variations */
.gallery.gallery--gap-none { gap: 0; }
.gallery.gallery--gap-small { gap: var(--space-sm); }
.gallery.gallery--gap-medium { gap: var(--space-lg); }
.gallery.gallery--gap-large { gap: var(--space-xl); }

.gallery__item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
}

.gallery__item a {
    display: block;
}

.gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Aspect ratios */
.gallery__item--square {
    aspect-ratio: 1 / 1;
}

.gallery__item--landscape {
    aspect-ratio: 4 / 3;
}

.gallery__item--portrait {
    aspect-ratio: 3 / 4;
}

.gallery__item--original {
    aspect-ratio: unset;
}

.gallery__item--original img {
    height: auto;
    object-fit: contain;
}

/* Hover effects */
.gallery__item--hover-zoom:hover img {
    transform: scale(1.05);
}

.gallery__item--hover-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    pointer-events: none;
}

.gallery__item--hover-overlay:hover::after {
    background: rgba(0, 0, 0, 0.3);
}

/* Gallery responsive */
@media (max-width: 768px) {
    .gallery--cols-4,
    .gallery--cols-5 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .gallery--cols-3,
    .gallery--cols-4,
    .gallery--cols-5 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =====================================================
   Accordion Block
   ===================================================== */
.section-accordion {
    position: relative;
}

.accordion {
    max-width: 800px;
    margin: 0 auto;
}

.accordion__item {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    overflow: hidden;
}

.accordion--minimal .accordion__item {
    border: none;
    border-bottom: 1px solid var(--gray-200);
    border-radius: 0;
}

.accordion__header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    background: var(--gray-50);
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    transition: background-color 0.2s ease;
}

.accordion--minimal .accordion__header {
    background: transparent;
}

.accordion__header:hover {
    background: var(--gray-100);
}

.accordion__icon {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.accordion__item--open .accordion__icon {
    transform: rotate(180deg);
}

.accordion__content {
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion__content[hidden] {
    display: none;
}

.accordion__body {
    padding: var(--space-lg);
    background: var(--white);
}

.accordion__body.prose {
    max-width: none;
}

/* Light text on dark backgrounds */
.section--dark-text .accordion__header,
.section--dark-text .accordion__title {
    color: var(--white);
}

.section--dark-text .accordion__item {
    border-color: rgba(255, 255, 255, 0.2);
}

.section--dark-text .accordion__header {
    background: rgba(255, 255, 255, 0.1);
}

.section--dark-text .accordion__header:hover {
    background: rgba(255, 255, 255, 0.15);
}

.section--dark-text .accordion__body {
    background: rgba(0, 0, 0, 0.2);
}

/* =====================================================
   Timeline Block
   ===================================================== */
.section-timeline {
    position: relative;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-xl) 0;
}

/* Vertical line */
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary);
    transform: translateX(-50%);
}

.timeline__item {
    position: relative;
    width: 50%;
    padding: var(--space-lg);
}

.timeline__item--left {
    padding-right: calc(var(--space-xl) + 20px);
    text-align: right;
}

.timeline__item--right {
    margin-left: 50%;
    padding-left: calc(var(--space-xl) + 20px);
}

.timeline__dot {
    position: absolute;
    top: var(--space-xl);
    width: 16px;
    height: 16px;
    background: var(--primary);
    border: 3px solid var(--white);
    border-radius: 50%;
    box-shadow: 0 0 0 3px var(--primary);
}

.timeline__item--left .timeline__dot {
    right: -8px;
}

.timeline__item--right .timeline__dot {
    left: -8px;
}

.timeline__content {
    background: var(--white);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.timeline__year {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    background: var(--primary);
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
}

.timeline__title {
    font-size: 1.125rem;
    margin-bottom: var(--space-sm);
}

.timeline__description {
    color: var(--gray-600);
    margin-bottom: 0;
}

/* Timeline content cards should always have dark text (they have white background) */
.section--dark-bg .timeline__content {
    color: var(--gray-800);
}

.section--dark-bg .timeline__title {
    color: var(--gray-900);
}

.section--dark-bg .timeline__description {
    color: var(--gray-600);
}

/* Timeline responsive */
@media (max-width: 768px) {
    .timeline::before {
        left: 20px;
    }

    .timeline__item {
        width: 100%;
        padding-left: 60px;
        padding-right: var(--space-md);
        text-align: left;
    }

    .timeline__item--left,
    .timeline__item--right {
        margin-left: 0;
        padding-left: 60px;
    }

    .timeline__dot {
        left: 12px !important;
        right: auto !important;
    }
}

/* =====================================================
   Tabs Block
   ===================================================== */
.section-tabs {
    position: relative;
}

.tabs {
    max-width: 900px;
    margin: 0 auto;
}

.tabs__nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: var(--space-xl);
}

.tabs__button {
    padding: var(--space-md) var(--space-lg);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-600);
    transition: all 0.2s ease;
}

.tabs__button:hover {
    color: var(--primary);
}

.tabs__button--active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tabs__panel {
    display: none;
}

.tabs__panel--active {
    display: block;
}

.tabs__subtitle {
    font-size: 1.25rem;
    margin-bottom: var(--space-md);
}

.tabs__address {
    margin-bottom: var(--space-md);
}

.tabs__contact {
    margin-bottom: var(--space-sm);
}

.tabs__contact a {
    color: var(--primary);
}

/* Allow inline styles to override link colors */
.tabs__contact a[style] {
    color: inherit;
}

/* When section has custom text color, links should inherit it */
.section--custom-text-color .tabs__contact a {
    color: inherit;
}

.tabs__text {
    margin: var(--space-lg) 0;
}

.tabs__map {
    margin-top: var(--space-lg);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.tabs__map iframe {
    width: 100%;
    height: 300px;
    border: 0;
}

.tabs__image {
    margin-top: var(--space-lg);
}

.tabs__image img {
    border-radius: var(--radius-md);
}

/* Tabs responsive */
@media (max-width: 600px) {
    .tabs__nav {
        flex-direction: column;
        border-bottom: none;
    }

    .tabs__button {
        border-bottom: none;
        border-left: 2px solid var(--gray-200);
        text-align: left;
    }

    .tabs__button--active {
        border-left-color: var(--primary);
    }
}

/* =====================================================
   Gallery Video Thumbnails
   ===================================================== */
.gallery__video-thumbnail {
    position: relative;
    width: 100%;
    height: 100%;
}

.gallery__video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery__play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.9;
    transition: transform 0.2s ease, opacity 0.2s ease;
    pointer-events: none;
}

.gallery__item:hover .gallery__play-button {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 1;
}

.gallery__play-button svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Video item specific styles */
.gallery__item--youtube,
.gallery__item--vimeo {
    cursor: pointer;
}

/* =====================================================
   Lightbox (Enhanced for Videos)
   ===================================================== */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    animation: lightbox-fade-in 0.2s ease;
}

@keyframes lightbox-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-overlay img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-video-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.lightbox-close {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    width: 48px;
    height: 48px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-size: 2rem;
    line-height: 1;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-caption {
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    max-width: 80%;
    text-align: center;
}

/* Mobile lightbox adjustments */
@media (max-width: 768px) {
    .lightbox-overlay {
        padding: var(--space-md);
    }

    .lightbox-close {
        top: var(--space-md);
        right: var(--space-md);
        width: 44px;
        height: 44px;
    }

    .lightbox-video-container {
        max-width: 100%;
    }
}
