/* css/style.css */
/* CSS Variables for Colors - Easy to Switch */
:root {
    --primary: #3f0d0c; /* Dark brown for accents */
    --secondary: #372411; /* Darker brown for text */
    --bg-light: #d8d0c5; /* Beige background */
    --accent1: #dae6dc; /* Light green for highlights */
    --accent2: #efe6c1; /* Light yellow for cards */
    --white: #ffffff;
    --text-light: #4d4d4d;
}

/* To change color scheme, update variables above, e.g., --primary: #dae6dc; */

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    line-height: 1.6;
    color: var(--secondary);
    background-color: var(--bg-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary);
}

.subsection-title {
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
    color: var(--primary);
}

.section-body, p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    text-align: center;
}

/* Header and Nav */
.header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-brand-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-logo {
    height: 2.5rem;
    width: auto;
}

.logo {
    font-size: 1.8rem;
    color: var(--primary);
    margin: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--secondary);
    font-family: 'Montserrat', sans-serif;
    transition: color 0.3s;
}

.nav-menu a:hover, .nav-menu a:focus {
    color: var(--primary);
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section - Modular */
.hero {
    position: relative;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 70px; /* Account for fixed header */
}

.hero::before,
.hero-about::before,
.hero-services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.5) 100%);
    z-index: 1;
}

.hero-content {
    position: absolute;
    z-index: 2;
    text-align: center;
    color: var(--white);
    background: none;
    padding: 4rem 3rem;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    margin: 0 auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.hero-content .btn-primary {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--white);
    margin-top: 2.5rem;
}

.hero-content .btn-primary:hover {
    background: transparent;
    color: var(--white);
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 2rem;
    margin-top: 0;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color:var(--white);
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-about .hero-content,
.hero-services .hero-content {
    background: none;
}

/* Sections - Modular */
.intro, .about-content, .services-overview, .cta, .books, .programs, .services-details {
    padding: 2rem 0;
    margin-bottom: 2rem;
}

/* Center CTA buttons in intro, cta, programs, services-details, and books sections */
.intro a, .cta a, .programs a, .services-details a, .books a {
    display: block;
    text-align: center;
    margin: 2rem auto 0 auto;
    max-width: fit-content;
}

.card {
    background: var(--accent2);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card:hover {
    transform: translateY(-5px);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
    text-align: center;
}

.full-image {
    width: 100%;
    height: auto;
}

@media (max-width: 768px) {
    .full-image {
        width: 80%;
        height: auto;
        display: block;
        margin: 0 auto;
    }
}

.home-card img {
    width: 100%;
    max-height: 206px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.about-card img {
    width: 100%;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.card img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.card img.full-image {
    height: auto !important;
}

.full-width {
    grid-column: 1 / -1;
}

/* Grid - Modular for Services/Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Buttons - Modular */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    transition: background 0.3s;
    margin-top: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover, .btn-primary:focus {
    background: var(--secondary);
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn-secondary {
    background: var(--accent1);
    color: var(--primary);
    border: 2px solid var(--accent1);
}

.btn-secondary:hover, .btn-secondary:focus {
    background: var(--white);
    border-color: var(--primary);
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* About Specific */
.about-content .container {
    text-align: center;
}

.about-content p {
    text-align: center;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.subsection-title {
    text-align: center;
}



/* Footer */
.footer {
    background: var(--primary);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
}

.footer a {
    color: var(--accent2);
    text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .hero {
        height: 70vh;
        text-align: center;
    }

    .hero-content {
        padding: 2rem;
        width: 95%;
    }

    .hero-content .btn-primary {
        margin-top: 2rem;
        background: var(--white);
        color: var(--primary);
        border: 2px solid var(--white);
    }

    .hero-content .btn-primary:hover {
        background: transparent;
        color: var(--white);
    }

    .hero-title {
        font-size: 2.2rem;
        margin-bottom: 1.5rem;
        margin-top: 0;
        color: var(--white);
    }

    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
        color: var(--white);
    }

    /* Apply to about and services hero sections too */
    .hero-about .hero-content,
    .hero-services .hero-content {
        color: var(--white);
        text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    }

    .hero-about .hero-content .btn-primary,
    .hero-services .hero-content .btn-primary {
        background: var(--white);
        color: var(--primary);
        border: 2px solid var(--white);
    }

    .hero-about .hero-content .btn-primary:hover,
    .hero-services .hero-content .btn-primary:hover {
        background: transparent;
        color: var(--white);
    }
}

@media (max-width: 590px) {
    .hero {
        height: 80vh;
    }
}
/* Lazy Loading is handled natively by HTML attribute */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Accessibility - Skip Link */
.skip-link {
    position: absolute;
    left: -9999px;
    z-index: 999;
}

.skip-link:focus {
    left: 6px;
    top: 7px;
    height: auto;
    width: auto;
    display: block;
    font-weight: 700;
    text-decoration: none;
    background: var(--white);
    color: var(--primary);
    padding: 1rem;
    border-radius: 5px;
}

/* Location Section */
.location {
    padding: 2rem 0;
    background: var(--accent2);
}

.location-content {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin-top: 2rem;
}

.location-info, .location-map {
    flex: 1;
}

.location-info h3 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.location-info p, .location-info address {
    margin-bottom: 1rem;
    color: var(--text-light);
    text-align: left;
}

.location-info address {
    font-style: normal;
}

.location-map iframe {
    width: 100%;
    max-width: 600px;
    height: 400px;
    border: 1px solid var(--primary);
    border-radius: 10px;
}
.location a {
    color: var(--primary);
}
@media (max-width: 768px) {
    .location-content {
        flex-direction: column;
        gap: 1。截至rem;
    }

    .location-map iframe {
        height: 300px;
    }
}
