:root {
    --color-primary: #2e8b57;
    --color-secondary: #f4c430;
    --color-text-dark: #1a1a1a;
    --color-text-light: #ffffff;
    --color-bg-light: #f8f9fa;
    --color-bg-white: #ffffff;

    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Poppins', sans-serif;

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-dark);
    line-height: 1.6;
    background-color: var(--color-bg-white);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--color-secondary);
    color: var(--color-primary);
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 196, 48, 0.4);
}

header {
    background-color: var(--color-bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    /* Fallback, adjusted by JS */
    z-index: 1000;
    transition: top 0.3s ease;
    /* Smooth transition when bar might change size */
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--color-primary);
}

/* Mobile Header Adjustment for Long Name */
@media (max-width: 480px) {
    .logo a {
        font-size: 1rem;
        /* Reduce font size on mobile */
        white-space: normal;
        /* Allow wrapping if needed */
        line-height: 1.2;
    }

    .logo img {
        height: 30px !important;
        /* Slightly smaller logo */
    }
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
    list-style: none;
}

.nav-links a {
    font-weight: 500;
    color: var(--color-text-dark);
}

.nav-links a:hover {
    color: var(--color-primary);
}

.hero {
    height: 85vh;
    background-image: linear-gradient(rgba(46, 139, 87, 0.4), rgba(46, 139, 87, 0.6)), url('../images/Patio.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    color: var(--color-text-light);
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
    /* Added padding for mobile text safety */
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stages {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-bg-white);
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-lg);
    text-align: center;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--color-secondary);
    margin: var(--spacing-xs) auto 0;
}

.stages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    text-align: center;
    /* Ensure grid items default to center */
}

.stage-card {
    padding: var(--spacing-md);
    transition: transform 0.3s ease;
    display: flex;
    /* Flex to center content vertically/horizontally if needed */
    flex-direction: column;
    align-items: center;
    /* Horizontally center content */
    text-align: center;
    /* Text alignment */
}

.stage-card:hover {
    transform: translateY(-5px);
}

.stage-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary);
    display: inline-block;
    /* Ensure it respects centering */
}

.stage-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xs);
}

.stage-desc {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: var(--spacing-sm);
}

.text-link {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 2px solid transparent;
}

.text-link:hover {
    border-color: var(--color-secondary);
}

form {
    padding: 0 var(--spacing-lg);
    max-width: 600px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    form {
        padding: 0;
    }

    .container {
        padding: 0 2rem;
        /* Increased mobile padding as requested */
    }
}

.news {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-bg-light);
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: var(--spacing-md);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.news-card {
    background: var(--color-bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease;
}

.news-card:hover {
    box-shadow: var(--shadow-md);
}

.news-single-feature {
    transition: transform 0.3s ease;
}

.news-single-feature:hover {
    transform: translateY(-5px);
}

.news-image {
    height: 350px;
    background-color: #ddd;
    background-size: cover;
    background-position: center;
}

@media (max-width: 900px) {
    .news-single-feature {
        flex-direction: column !important;
        gap: 1.5rem !important;
    }

    .news-image {
        width: 100% !important;
        height: 250px !important;
        min-width: auto !important;
    }

    .news-content {
        padding: 0 !important;
        text-align: center;
    }
}

.news-content {
    padding: var(--spacing-md);
}

.news-date {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: var(--spacing-xs);
    display: block;
}

.news-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    color: var(--color-primary);
}

.news-excerpt {
    font-size: 0.95rem;
    color: #555;
}

footer {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    padding: var(--spacing-lg) 0;
    text-align: center;
}

.footer-content p {
    opacity: 0.8;
}

.menu-toggle {
    display: none;
    font-size: 2rem;
    color: var(--color-text-dark);
    cursor: pointer;
    background: none;
    border: none;
}

@media (max-width: 480px) {
    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }

    .device-options {
        grid-template-columns: 1fr;
    }
}

/* Cookie Modal Styles */
.cookie-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10999;
    display: none;
    backdrop-filter: blur(4px);
}

.cookie-banner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    background-color: white;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    padding: 2.5rem;
    z-index: 11000;
    display: none;
    border-radius: 12px;
    border-top: 6px solid var(--color-secondary);
    text-align: center;
}

.cookie-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.cookie-text {
    font-size: 1rem;
    color: #333;
    line-height: 1.6;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
}

.btn-cookie-accept {
    background-color: var(--color-secondary);
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-cookie-accept:hover {
    background-color: #d1b500;
}

.btn-cookie-info {
    background-color: transparent;
    border: 2px solid #ccc;
    color: #555;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-cookie-info:hover {
    border-color: var(--color-text);
    color: var(--color-text);
}

/* Legal Text in Modals */
.legal-text-container {
    max-height: 60vh;
    overflow-y: auto;
    text-align: left;
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #eee;
    margin-top: 1rem;
    font-size: 0.9rem;
    white-space: pre-line;
    /* Respect line breaks from text */
}

/* TokApp Modal Mobile Buttons */
.mobile-app-link {
    display: block;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--color-bg-white);
        flex-direction: column;
        align-items: center;
        padding: var(--spacing-md) 0;
        gap: var(--spacing-sm);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }

    .nav-links.active {
        display: flex;
        animation: slideDown 0.3s ease forwards;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 15px 0;
        width: 100%;
        font-size: 1.1rem;
    }

    h1,
    h2,
    h3 {
        text-align: center;
    }

    .hero h1 {
        font-size: 2.2rem;
        margin-bottom: var(--spacing-md);
        line-height: 1.3;
    }

    .page-hero h1 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-title::after {
        margin-left: auto;
        margin-right: auto;
    }

    .stages-grid,
    .news-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        padding: 0;
    }

    .hero-content {
        width: 100%;
    }

    .hero-content p {
        font-size: 1rem;
        text-align: center;
        margin-bottom: var(--spacing-md) !important;
    }

    .hero .btn {
        width: 100%;
        max-width: 300px;
        display: block;
        margin: 0 auto;
    }

    .logo {
        font-size: 1rem;
    }

    .footer-content {
        padding: 0 var(--spacing-sm);
    }

    footer .logo {
        margin-bottom: var(--spacing-sm) !important;
    }

    .content-block {
        text-align: center;
        /* Center text by default on mobile for better balance */
        padding: 0;
        /* Let container handle padding */
    }

    .content-block p,
    .content-block ul {
        text-align: left;
        /* Keep readable text left-aligned */
        padding: 0 0.5rem;
        /* Add specific small side padding for text readability */
    }

    .content-block h2 {
        display: block;
        text-align: center;
        width: 100%;
    }

    /* Critical fix: Force flex columns to center items on mobile */
    .content-block>div[style*="display: flex"],
    .content-block>div[style*="display: grid"] {
        flex-direction: column;
        grid-template-columns: 1fr !important;
        gap: var(--spacing-md) !important;
        align-items: center !important;
    }

    .content-block img:not(.teacher-img) {
        width: 100% !important;
        max-width: 400px;
        /* Prevent overly massive images on tablets */
        height: auto !important;
        max-height: 300px;
        object-fit: cover;
        margin: 0 auto;
        /* Ensure centering */
    }

    .tokapp-inner {
        padding: 1.5rem !important;
        /* Reduce padding on mobile */
    }

    /* Fix: Center teacher names and roles on mobile */
    .stage-block p,
    .stage-block h3 {
        text-align: center !important;
    }
}

/* Global Helpers and Components */
.announcement-bar-fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
    overflow: hidden;
    height: 40px;
    line-height: 40px;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.logo-img {
    height: 40px;
    margin-right: 10px;
}

.active-nav {
    color: var(--color-primary) !important;
    font-weight: 700 !important;
}

.btn-nav {
    padding: 8px 20px !important;
    font-size: 0.8rem !important;
}

/* News Section Styles */
.news-single-feature {
    display: flex;
    gap: 3rem;
    align-items: center;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.news-image-container {
    height: 350px;
    flex: 1;
    min-width: 300px;
}

.news-image-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.news-content-block {
    flex: 1;
}

.news-date-tag {
    color: var(--color-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.5rem;
}

.news-title-large {
    font-size: 2rem !important;
    margin-bottom: 1rem !important;
    color: var(--color-primary) !important;
    text-align: left !important;
}

.news-excerpt-large {
    font-size: 1.1rem !important;
    line-height: 1.8 !important;
    color: #555 !important;
    margin-bottom: 1.5rem !important;
    text-align: left !important;
}

.news-btn {
    padding: 10px 25px !important;
}

@media (max-width: 768px) {
    .news-single-feature {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .news-image-container {
        width: 100%;
        min-width: auto;
        height: 250px;
    }

    .news-title-large {
        font-size: 1.6rem !important;
        text-align: center !important;
    }

    .news-content-block {
        text-align: center !important;
    }

    .news-excerpt-large {
        text-align: center !important;
    }
}

/* Differentiation Section Hooks */
.section-light {
    padding: 4rem 0;
    background-color: #f9f9f9;
}

.content-centered {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.mb-2 {
    margin-bottom: 2rem;
}

.line-lg {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

.grid-2-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    text-align: center;
}

.card-white {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.icon-xl {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.color-secondary {
    color: var(--color-secondary);
}

.color-primary {
    color: var(--color-primary);
}

.color-text {
    color: var(--color-text);
}

/* Special Education Section Hooks */
.section-white {
    padding: 4rem 0;
    background-color: white;
}

.max-width-1000 {
    max-width: 1000px;
    margin: 0 auto;
}

.flex-col-center-gap {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.max-width-900 {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

/* News Section Section Hooks */
.news-header-center {
    text-align: center;
    margin-bottom: 3rem;
}

.title-xl {
    color: var(--color-primary);
    font-size: 2.5rem;
    font-weight: 700;
}

.underline-secondary {
    width: 60px;
    height: 4px;
    background: var(--color-secondary);
    margin: 1rem auto;
}

.page-hero {
    height: 40vh;
    background-color: var(--color-primary);
    background-image: linear-gradient(rgba(46, 139, 87, 0.7), rgba(46, 139, 87, 0.8)), url('../images/Patio.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.page-hero h1 {
    font-size: 3rem;
    color: var(--color-text-light);
    margin: 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.gallery-item {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: var(--border-radius);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-overlay i {
    color: white;
    font-size: 2.5rem;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xs);
    }
}

.content-section {
    padding: var(--spacing-md) 0;
    margin-bottom: var(--spacing-lg);
}

.content-block {
    margin-bottom: var(--spacing-lg);
}

.content-block h2 {
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-secondary);
    display: inline-block;
    padding-bottom: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
}

.form-group {
    margin-bottom: var(--spacing-sm);
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: var(--font-body);
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(244, 196, 48, 0.2);
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

/* Carousel Styles */
.carousel {
    position: relative;
    max-width: 800px;
    margin: 2rem auto;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.carousel-track-container {
    overflow: hidden;
    height: 400px;
    position: relative;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    cursor: pointer;
    padding: 1rem;
    font-size: 1.5rem;
    transition: background 0.3s;
    z-index: 10;
}

.carousel-button:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-button--left {
    left: 0;
}

.carousel-button--right {
    right: 0;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    padding: 10px 0;
    position: absolute;
    bottom: 10px;
    width: 100%;
    z-index: 10;
}

.carousel-indicator {
    border: none;
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
}

.carousel-indicator.current-slide {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.2);
}

/* Resources Section Styles */
.resources-section {
    margin-top: 2rem;
    width: 100%;
}

.resources-toggle {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    padding: 12px 20px;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-weight: 600;
    color: var(--color-primary);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    font-family: var(--font-heading);
    font-size: 1rem;
}

.resources-toggle:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-color: var(--color-secondary);
}

.resources-list {
    display: none;
    /* Hidden by default */
    background: #fff;
    padding: 1.5rem;
    border: 1px solid #eee;
    margin-top: 0.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    animation: slideDown 0.3s ease;
}

.resources-list ul {
    list-style: none;
    padding: 0;
}

.resources-list li {
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #f5f5f5;
}

.resources-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.resources-list a {
    color: #555;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.resources-list a:hover {
    color: var(--color-primary);
}

.resources-list a i {
    font-size: 1.2rem;
    color: var(--color-secondary);
}


/* Teacher Image Centering Fix */
.teacher-img {
    margin-left: auto;
    margin-right: auto;
    display: block;
    /* Ensure it treats margins correctly */
}

/* Announcement Bar Styles */
.announcement-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    z-index: 9999;
    /* Above everything */
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
}

.announcement-content {
    white-space: nowrap;
    overflow: hidden;
    position: absolute;
    min-width: 100%;
}

.announcement-content p {
    display: inline-block;
    padding-left: 0;
    animation: marquee 40s linear infinite;
    /* Slower speed */
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0;
}

@keyframes marquee {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(-50%, 0);
    }

    /* Move half width since we duplicate text */
}

/* Adjust header to not be covered by fixed announcement */
body {
    padding-top: 40px;
    /* Match announcement height */
}

/* Responsive adjustment for header/nav */
@media (max-width: 768px) {
    .nav-links {
        top: 100%;
        /* Keep nav below header */
    }
}

/* TokApp Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    display: flex;
    /* Shown when active */
}

.modal-content {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    text-align: center;
    max-width: 450px;
    width: 100%;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
}

.close-modal-btn:hover {
    color: #333;
}

.modal-content h3 {
    margin-bottom: 1rem;
    color: var(--color-primary);
    font-size: 1.5rem;
}

.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-buttons .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    font-size: 1.1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}

.modal-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-android {
    background-color: #3DDC84 !important;
    /* Android Green */
    color: white !important;
}

.btn-ios {
    background-color: #000000 !important;
    /* Apple Black */
    color: white !important;
}

@media (min-width: 600px) {
    .modal-buttons {
        flex-direction: row;
    }
}

/* Modal Close Button Styling */
.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #888;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.modal-close:hover {
    color: var(--color-text-dark);
    background-color: #f0f0f0;
    transform: rotate(90deg);
}

/* Featured Blog Card Styles */
/* Teacher Accordion Styles */
.teacher-accordion {
    width: 100%;
    margin-bottom: 0.8rem;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.teacher-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.2rem;
    background: #fdfdfd;
    cursor: pointer;
    transition: background 0.2s ease;
    border-left: 4px solid var(--color-secondary);
}

.teacher-header:hover {
    background: #f4f4f4;
}

.teacher-header.active {
    background: #f0f0f0;
    border-bottom: 1px solid #ebebeb;
}

.teacher-name {
    font-weight: 700;
    color: var(--color-primary);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.teacher-header .arrow-icon {
    color: #888;
    font-size: 1.2rem;
    transition: tranform 0.3s;
}

.teacher-content {
    display: none;
    /* Hidden by default */
    padding: 1rem;
    background: #fff;
    animation: slideDown 0.3s ease;
}

/* Sub-card (Links inside accordion) Styles */
.sub-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #fafafa;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 0.8rem 1rem;
    margin-bottom: 0.8rem;
    text-decoration: none !important;
    transition: all 0.2s ease;
    color: #444;
}

.sub-card:last-child {
    margin-bottom: 0;
}

.sub-card:hover {
    background-color: #fff;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.sub-card.blog-link {
    border-left: 4px solid var(--color-secondary);
}

.sub-card.instagram-link {
    border-left: 4px solid #C13584;
    /* Instagram Color */
}

.sub-card i {
    font-size: 1.4rem;
}

.sub-card.blog-link i {
    color: var(--color-primary);
}

.sub-card.instagram-link i {
    color: #C13584;
}

.sub-card-details {
    display: flex;
    flex-direction: column;
}

.sub-card-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #333;
}

.sub-card-type {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 0.5px;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.6);
}



@keyframes slideInFade {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.whatsapp-float svg {
    display: block;
    width: 60px;
    height: 60px;
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }

    .whatsapp-float svg {
        width: 50px;
        height: 50px;
    }

    .whatsapp-float svg {
        width: 50px;
        height: 50px;
    }
}

/* Responsive Footer Styles */
.footer-contact-info {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.footer-contact-info p {
    margin-bottom: 5px;
}

.footer-contact-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.footer-contact-links a {
    color: white;
    text-decoration: none;
}

.footer-contact-links .separator {
    display: inline;
}

@media (max-width: 600px) {
    .footer-contact-links {
        flex-direction: column;
        gap: 5px;
    }

    .footer-contact-links .separator {
        display: none;
    }

    .footer-contact-info {
        font-size: 0.85rem;
    }
}

/* --- Consolidated Styles from Refactoring --- */

/* Global Helpers and Components */
.announcement-bar-fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
    overflow: hidden;
    height: 40px;
    line-height: 40px;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.logo-img {
    height: 40px;
    margin-right: 10px;
}

.active-nav {
    color: var(--color-primary) !important;
    font-weight: 700 !important;
}

.btn-nav {
    padding: 8px 20px !important;
    font-size: 0.8rem !important;
}

/* Instagram Section Styles */
.instagram-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 3rem;
}

.insta-header-card {
    background: #fff;
    padding: 2.5rem 1.5rem;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 2rem;
    border: 1px solid #efefef;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.insta-header-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: contain;
    background: #fff;
    border: 1px solid #efefef;
}

.insta-header-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.insta-username {
    margin: 0;
    border: none;
    padding: 0;
    font-size: 1.5rem;
    color: #262626;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto;
    font-weight: 700;
}

.insta-display-name {
    color: #666;
    margin: 0.1rem 0 1rem;
    font-size: 1rem;
}

.insta-follow-btn {
    background: #0095f6;
    color: white;
    padding: 8px 25px;
    border-radius: 8px;
    font-weight: 600;
    text-transform: none;
    font-size: 0.95rem;
    line-height: 1;
    width: fit-content;
    transition: background 0.3s ease;
}

.insta-follow-btn:hover {
    background: #1877f2;
    color: white;
}

.instagram-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.insta-item {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    display: block;
}

.insta-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.insta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    pointer-events: none;
}

.insta-item:hover .insta-overlay {
    opacity: 1;
}

.insta-item:hover img {
    transform: scale(1.05);
    filter: brightness(0.8);
}

.insta-view-more {
    margin-top: 3rem;
    border-top: 1px solid #efefef;
    padding-top: 2rem;
    width: 100%;
}

.insta-view-more-link {
    color: #0095f6;
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
}

@media (max-width: 768px) {
    .instagram-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
}

/* News Section Styles */
.news-single-feature {
    display: flex;
    gap: 3rem;
    align-items: center;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.news-image-container {
    height: 350px;
    flex: 1;
    min-width: 300px;
}

.news-image-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.news-content-block {
    flex: 1;
}

.news-date-tag {
    color: var(--color-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.5rem;
}

.news-title-large {
    font-size: 2rem !important;
    margin-bottom: 1rem !important;
    color: var(--color-primary) !important;
    text-align: left !important;
}

.news-excerpt-large {
    font-size: 1.1rem !important;
    line-height: 1.8 !important;
    color: #555 !important;
    margin-bottom: 1.5rem !important;
    text-align: left !important;
}

.news-btn {
    padding: 10px 25px !important;
}

@media (max-width: 768px) {
    .news-single-feature {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .news-image-container {
        width: 100%;
        min-width: auto;
        height: 250px;
    }

    .news-title-large {
        font-size: 1.6rem !important;
        text-align: center !important;
    }

    .news-excerpt-large {
        text-align: center !important;
    }
}

/* Helper Classes */
.text-center {
    text-align: center;
}

.mb-3 {
    margin-bottom: 3rem;
}

.flex-column-center {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.max-width-700 {
    max-width: 700px;
}

.mt-1 {
    margin-top: 1rem;
}

.section-light {
    padding: 4rem 0;
    background-color: #f9f9f9;
}

.content-centered {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.line-lg {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

.grid-2-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    text-align: center;
}

.card-white {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.icon-xl {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.color-secondary {
    color: var(--color-secondary);
}

.color-primary {
    color: var(--color-primary);
}

.color-text {
    color: var(--color-text);
}

/* Special Education Section Hooks */
.section-white {
    padding: 4rem 0;
    background-color: white;
}

.max-width-1000 {
    max-width: 1000px;
    margin: 0 auto;
}

.flex-col-center-gap {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.max-width-900 {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

/* News Section Section Hooks */
.news-header-center {
    text-align: center;
    margin-bottom: 3rem;
}

.title-xl {
    color: var(--color-primary);
    font-size: 2.5rem;
    font-weight: 700;
}

.underline-secondary {
    width: 60px;
    height: 4px;
    background: var(--color-secondary);
    margin: 1rem auto;
}

/* Nosotros Page Styles */
.greeting-block {
    display: flex;
    gap: 3rem;
    align-items: center;
    flex-wrap: wrap;
}

.greeting-image-container {
    flex: 1;
    min-width: 300px;
}

.greeting-img {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    object-position: top;
    object-fit: cover;
}

.greeting-content {
    flex: 2;
    min-width: 300px;
}

.greeting-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

.facilities-block {
    margin-top: 4rem;
}

.details-custom {
    margin-bottom: 1.5rem;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.summary-custom {
    font-weight: 600;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #fafafa;
}

.summary-content {
    display: flex;
    align-items: center;
}

.summary-icon {
    margin-right: 15px;
    font-size: 1.5rem;
}

.details-content {
    padding: 2rem;
    border-top: 1px solid #eee;
}

.facilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.facility-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.teachers-block {
    margin-top: 4rem;
}

.details-teacher {
    margin-bottom: 1rem;
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #eee;
}

.summary-teacher {
    font-weight: 600;
    cursor: pointer;
    color: var(--color-text);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Force left alignment */
    text-align: left;
    /* Ensure text aligns left */
}

.summary-teacher-icon {
    margin-right: 10px;
    font-size: 1.3rem;
}

.teacher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2.5rem;
    text-align: center;
    margin-top: 2rem;
    justify-items: center;
}

.teacher-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.teacher-card img:not(.teacher-img-special-transform),
.teacher-img-wrapper {
    width: 150px !important;
    height: 150px !important;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.2rem;
    display: block;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    box-sizing: border-box !important;
}

.teacher-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    color: var(--color-text-dark);
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.teacher-card p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    line-height: 1.4;
    text-align: center;
}

.teacher-img-primary {
    border: 3px solid var(--color-primary) !important;
}

.teacher-img-secondary {
    border: 3px solid var(--color-secondary) !important;
}

.teacher-img-dark {
    border: 3px solid var(--color-text-dark) !important;
}

.teacher-img-special {
    border: 3px solid #e74c3c !important;
}

.teacher-img-pas {
    border: 3px solid #3498db !important;
}

@media (max-width: 480px) {
    .teacher-grid {
        grid-template-columns: 1fr !important;
        gap: 3rem;
    }

    .teacher-card img:not(.teacher-img-special-transform),
    .teacher-img-wrapper {
        width: 160px !important;
        /* Slightly larger for single column */
        height: 160px !important;
    }
}

/* Special cases */
.teacher-img-wrapper {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 1.2rem;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    background-color: #000;
    /* Fondo negro para evitar huecos blancos */
}

.teacher-img-special-transform {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.3) translate(2%, -15%);
    /* Adjusted for perfect centering */
    transform-origin: center;
}

.teacher-img-dolores {
    transform: scale(1.3) translateY(-8%);
    transform-origin: center;
}

/* Contact Page Styles */
.contact-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    width: 100%;
    margin-bottom: 4rem;
}

.contact-card {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border-top: 4px solid var(--color-primary);
}

.contact-card-secondary {
    border-top-color: var(--color-secondary);
}

.contact-icon {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}

.contact-icon-secondary {
    color: var(--color-secondary);
}

.contact-link {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    word-break: break-all;
}

.contact-phone-whatsapp {
    font-size: 1.2rem;
    font-weight: 600;
}

.contact-phone-link {
    text-decoration: none;
    color: inherit;
    display: block;
    margin-bottom: 10px;
}

.contact-whatsapp-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.whatsapp-icon {
    font-size: 1.5rem;
    color: #25D366;
}

.locations-section {
    width: 100%;
    margin-bottom: 4rem;
}

.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    text-align: center;
    /* Centered text */
}

.location-item {
    display: flex;
    gap: 1rem;
    justify-content: center;
    /* Center flex items */
}

.location-icon {
    font-size: 1.5rem;
    color: var(--color-primary);
    flex-shrink: 0;
}

.location-icon-secondary {
    color: var(--color-secondary);
}

.location-label {
    display: block;
    margin-bottom: 5px;
}

.map-container {
    width: 100%;
    height: 450px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}