/* ========================================
   MOBILE RESPONSIVE STYLES
   Mobile-First Approach
   ======================================== */

/* Base Mobile Styles */
:root {
    --primary-color: #4CAF50;
    --primary-dark: #2e7d32;
    --text-dark: #333;
    --text-light: #666;
    --border-radius: 6px;
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-size: 16px;
    overflow-x: hidden;
}

/* ========================================
   HEADER & NAVIGATION - MOBILE FIRST
   ======================================== */

.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    box-shadow: var(--shadow-sm);
}

.header-container {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 60px;
}

/* Logo */
.logo {
    flex: 1;
    min-width: 0;
}

.logo h1 {
    font-size: 1em;
    margin: 0;
    white-space: nowrap;
    color: #2e7d32;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logo-text {
    display: inline;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logo i {
    font-size: 1.8em;
    flex-shrink: 0;
}

/* Mobile Navigation - Hidden by default */
.main-nav {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    max-height: calc(100vh - 60px);
    background: white;
    z-index: 998;
    box-shadow: var(--shadow-md);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.main-nav.active {
    transform: translateX(0);
}

.nav-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 997;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}


.nav-list > li {
    border-bottom: 1px solid #f0f0f0;
}

.nav-list > li > a {
    display: block;
    padding: 14px 16px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95em;
    transition: var(--transition);
}

.nav-list > li > a:active,
.nav-list > li > a:hover {
    background: #f5f5f5;
    color: var(--primary-color);
}

/* Dropdowns */
.dropdown {
    position: relative;
    width: 100%;
}

.dropdown-menu {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    background: #f9f9f9;
}

.dropdown.active > .dropdown-menu {
    display: flex;
    flex-direction: column;
}

.dropdown-menu li a {
    display: block;
    padding: 10px 16px 10px 32px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9em;
    border-left: 3px solid transparent;
}

.dropdown-menu li a:hover {
    background: #f0f0f0;
    border-left-color: var(--primary-color);
    color: var(--primary-color);
}

.dropdown-toggle {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.dropdown-toggle i {
    transition: transform 0.3s ease;
}

.dropdown.active .dropdown-toggle i {
    transform: rotate(180deg);
}

/* Hamburger Menu */
.hamburger-menu {
    display: flex;
    flex-direction: column;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    gap: 5px;
    z-index: 1001;
    flex-shrink: 0;
    width: auto;
    height: auto;
}

.hamburger-menu span {
    width: 24px;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
    display: block;
    transform-origin: center;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* CTA Button */
.header-cta {
    flex-shrink: 0;
    display: none;
}

.cta-button {
    background: #4CAF50;
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    font-size: 0.75em;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: #2e7d32;
    transform: translateY(-2px);
}

.phone-text {
    display: none;
}

/* ========================================
   HERO SECTION - MOBILE
   ======================================== */

.hero-section {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 16px;
    text-align: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
}

.hero-content {
    max-width: 100%;
    animation: fadeInUp 0.6s ease;
}

.hero-subtitle {
    font-size: 0.9em;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.hero-title {
    font-size: 1.6em;
    margin: 12px 0;
    color: #1a5f7a;
    font-weight: 700;
    line-height: 1.3;
}

.hero-description {
    font-size: 0.9em;
    color: var(--text-light);
    margin: 16px 0;
    line-height: 1.5;
}

.hero-cta {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    margin-top: 12px;
    transition: var(--transition);
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Hero Sections - responsive sizing by viewport */
@media (max-width: 1023px) {
    .sd-page .hero-section-school.hero-section-sd,
    .mts-page .hero-section-school.hero-section-mts,
    .smk-page .hero-section-school.hero-section-smk {
        padding-top: clamp(180px, 24vw, 210px);
    }

    .sd-page .hero-section-school.hero-section-sd .hero-logo {
        width: clamp(120px, 16vw, 138px);
        height: auto;
        max-width: 100%;
    }

    .mts-page .hero-section-school.hero-section-mts .hero-logo {
        width: clamp(120px, 16vw, 138px);
        height: auto;
        max-width: 100%;
    }

    .smk-page .hero-section-school.hero-section-smk .hero-logo {
        width: clamp(132px, 18vw, 156px);
        height: auto;
        max-width: 100%;
    }

    .tk-page .hero-section-school.hero-section-tk {
        padding-top: clamp(180px, 24vw, 210px);
    }

    .tk-page .hero-section-school.hero-section-tk .hero-logo {
        width: clamp(120px, 16vw, 138px);
        height: auto;
        max-width: 100%;
    }
}

@media (max-width: 767px) {
    .sd-page .hero-section-school.hero-section-sd,
    .mts-page .hero-section-school.hero-section-mts,
    .smk-page .hero-section-school.hero-section-smk {
        padding-top: clamp(140px, 36vw, 170px);
    }

    .sd-page .hero-section-school.hero-section-sd .hero-logo {
        width: clamp(92px, 28vw, 112px);
        top: 16px;
        height: auto;
        max-width: 100%;
    }

    .mts-page .hero-section-school.hero-section-mts .hero-logo {
        width: clamp(92px, 28vw, 112px);
        top: 16px;
        height: auto;
        max-width: 100%;
    }

    .smk-page .hero-section-school.hero-section-smk .hero-logo {
        width: clamp(106px, 30vw, 126px);
        top: 16px;
        height: auto;
        max-width: 100%;
    }

    .tk-page .hero-section-school.hero-section-tk {
        padding-top: clamp(140px, 36vw, 170px);
    }

    .tk-page .hero-section-school.hero-section-tk .hero-logo {
        width: clamp(92px, 28vw, 112px);
        top: 16px;
        height: auto;
        max-width: 100%;
    }
}


/* ========================================
   SECTIONS - MOBILE
   ======================================== */

section {
    padding: 30px 16px;
}

section h2 {
    font-size: 1.6em;
    margin: 0 0 20px 0;
    text-align: center;
    color: var(--text-dark);
}

section h3 {
    font-size: 1.3em;
    color: var(--text-dark);
}

/* ========================================
   CARDS & GRIDS - MOBILE
   ======================================== */

.card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card h3 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card p, .card ul {
    margin: 10px 0;
    font-size: 0.9em;
    line-height: 1.6;
    color: var(--text-light);
}

.button {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 10px 16px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9em;
    margin-top: 12px;
    transition: var(--transition);
}

.button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* ========================================
   PROGRAM GRID - MOBILE
   ======================================== */

.program-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.program-card {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
}

.program-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.program-card h3 {
    margin: 12px 0;
    color: var(--text-dark);
}

.program-card p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.9em;
}

.program-card i {
    font-size: 2em;
    color: var(--primary-color);
}

.school-contact-card .school-icon i {
    font-size: 1em;
    color: inherit;
}

.school-contact-card .school-contact-item i {
    font-size: 1em;
    color: var(--primary-dark);
}

/* ========================================
   STATS - MOBILE
   ======================================== */

.stats-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stat-card {
    background: white;
    padding: 16px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    font-size: 2em;
    color: var(--primary-color);
}

.stat-number {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--primary-color);
    margin: 8px 0;
}

.stat-label {
    font-size: 0.85em;
    color: var(--text-light);
}

/* ========================================
   FACILITY GRID - MOBILE
   ======================================== */

.facility-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.facility-item {
    background: white;
    padding: 16px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
}

.facility-item:hover {
    box-shadow: var(--shadow-md);
}

.facility-icon {
    font-size: 2.5em;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.facility-item h4 {
    margin: 10px 0;
    color: var(--text-dark);
}

.facility-item p {
    margin: 0;
    font-size: 0.85em;
    color: var(--text-light);
    line-height: 1.4;
}

/* ========================================
   CONTACT SECTION - MOBILE
   ======================================== */

.contact-cta {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 30px 16px;
    border-radius: var(--border-radius);
    margin: 20px 16px;
}

.contact-title {
    color: white;
    text-align: center;
    font-size: 1.6em;
    margin: 0 0 24px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.map-container {
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 250px;
    box-shadow: var(--shadow-md);
}

/* ========================================
   FOOTER - MOBILE
   ======================================== */

footer {
    background: #1a3a3a;
    color: white;
    padding: 20px 16px;
    text-align: center;
    font-size: 0.9em;
}

footer p {
    margin: 0;
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   TABLET STYLES (768px and up)
   ======================================== */

@media (min-width: 768px) {
    .header-container {
        padding: 15px 30px;
        gap: 20px;
    }

    .logo {
        flex: 0;
    }

    .logo h1 {
        font-size: 1.4em;
        white-space: nowrap;
    }

    .logo-text {
        display: inline;
    }

    /* Hide hamburger on tablet+ */
    .hamburger-menu {
        display: none;
    }

    /* Show nav on tablet+ */
    .main-nav {
        position: static !important;
        background: transparent !important;
        box-shadow: none !important;
        max-height: none !important;
        overflow: visible !important;
        transform: translateX(0) !important;
        width: auto !important;
        height: auto !important;
        z-index: auto !important;
        flex: 1;
        order: 2;
        display: flex;
        justify-content: center;
    }

    .nav-list {
        flex-direction: row;
        gap: 24px;
        width: auto;
        justify-content: center;
    }

    .main-nav .nav-list {
        gap: 24px;
    }

    .nav-list > li {
        border-bottom: none;
        position: relative;
    }

    .dropdown {
        width: auto;
    }

    .nav-list > li > a {
        padding: 8px 0;
        font-size: 0.95em;
    }

    .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        background: white;
        flex-direction: column;
        box-shadow: var(--shadow-md);
        border-radius: var(--border-radius);
        overflow: hidden;
        min-width: 200px;
        display: none;
        margin-top: 10px;
    }


    .header-cta {
        display: flex;
        order: 3;
    }

    .cta-button {
        padding: 10px 16px;
        font-size: 0.95em;
    }

    .phone-text {
        display: inline;
    }

    /* Hero section */
    .hero-section {
        min-height: 400px;
        padding: 50px 30px;
    }

    .hero-title {
        font-size: 2.2em;
    }

    .hero-description {
        font-size: 1em;
        max-width: 600px;
        margin: 20px auto;
    }

    /* Sections */
    section {
        padding: 50px 30px;
    }

    section h2 {
        font-size: 2em;
        margin-bottom: 30px;
    }

    /* Program grid */
    .program-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    /* Stats */
    .stats-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }

    /* Facility grid */
    .facility-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* Contact section */
    .contact-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .map-container {
        height: 350px;
    }
}

/* ========================================
   DESKTOP STYLES (1024px and up)
   ======================================== */

@media (min-width: 1024px) {
    .header-container {
        padding: 18px 56px;
        gap: 32px;
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
    }

    .logo h1 {
        font-size: 1.55em;
    }

    .logo {
        justify-self: start;
    }

    .main-nav {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .nav-list {
        gap: 26px;
        justify-content: center;
        flex-wrap: nowrap;
    }

    .nav-list > li {
        white-space: nowrap;
    }

    .header-cta {
        justify-self: end;
    }

    /* Hero section */
    .hero-section {
        min-height: 500px;
        padding: 80px 60px;
    }

    .hero-title {
        font-size: 2.8em;
    }

    .hero-description {
        font-size: 1.1em;
        max-width: 800px;
    }

    /* Sections */
    section {
        padding: 60px 80px;
    }

    section h2 {
        font-size: 2.4em;
    }

    /* Program grid */
    .program-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }

    /* Facility grid */
    .facility-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }

    /* Contact section */
    .contact-cta {
        margin: 30px 60px;
        padding: 50px 60px;
    }

    .contact-grid {
        gap: 50px;
        align-items: center;
    }

    .map-container {
        height: 400px;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .main-header,
    .header-cta,
    .contact-cta {
        display: none;
    }
}
