/* --- 1. IMPORT & MODERN RESET --- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-blue: #3498db;
    --dark-navy: #0d3b66;
    --school-yellow: #f4d35e;
    --text-main: #1a1c1e;     /* High visibility charcoal */
    --text-gray: #4a5568;     /* Accessible gray for body text */
    --white: #ffffff;
    --light-bg: #f8f9fa;
    --shadow-md: 0 10px 25px rgba(0,0,0,0.1);
    --shadow-bold: 0 15px 35px rgba(0,0,0,0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    line-height: 1.8; /* Better readability for language learners */
    color: var(--text-main);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    font-size: 1.1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- 2. TYPOGRAPHY --- */
h1, h2, h3 {
    color: var(--dark-navy);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }

p {
    font-size: 1.15rem;
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

/* --- 4. PROGRAM TABS SYSTEM --- */
.overview-image {
    flex: 1;            /* Adjust this (e.g., 0.8) to make the image column narrower than the text */
    max-width: 500px;   /* Change this value to set the exact maximum width you want */
    height: 400px;      /* Change this value to set the exact height you want */
    border-radius: 20px;/* Adds the rounded corners seen in modern designs */
    overflow: hidden;   /* Essential: clips the image so it doesn't spill out of the rounded corners */
}

.overview-image img {
    width: 100%;        /* Forces image to fill the container width */
    height: 100%;       /* Forces image to fill the container height */
    object-fit: cover;  /* THIS IS THE KEY: It crops the image to fit the size perfectly */
    object-position: center; /* Ensures the middle of the photo is always visible */
}

.programs-section {
    padding: 100px 0;
    background: var(--light-bg);
}

.program-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 0 auto 50px;
    max-width: 700px;
    background: #fff;
    padding: 8px;
    border-radius: 100px;
    box-shadow: var(--shadow-md);
}

.program-tab-btn {
    flex: 1;
    padding: 14px 28px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-weight: 700;
    font-size: 1rem;
    color: var(--dark-navy);
    cursor: pointer;
    border-radius: 100px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Logic for the active tab */
.program-tab-btn.active {
    background-color: var(--primary-blue) !important;
    color: var(--white) !important;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

/* --- 5. PROGRAM CONTENT CARDS --- */
.program-item {
    display: none; /* Controlled by JS */
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.program-card.detailed {
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-bold);
    max-width: 900px;
    margin: 0 auto;
}

.program-header {
    background: var(--dark-navy);
    padding: 40px;
    text-align: center;
}

.program-header h3 {
    color: var(--school-yellow);
    font-size: 2rem;
    margin-bottom: 10px;
}

.program-meta {
    display: flex;
    justify-content: center;
    gap: 25px;
    color: var(--white);
}

.program-content {
    padding: 50px;
}

.program-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.feature {
    display: flex;
    align-items: center;
    gap: 12px;
}

.feature i { color: #2ecc71; }


/* --- 6. TUITION TABLES(Defining basic,standard and advanced) --- */
.table-responsive {
    overflow-x: auto;
    margin: 40px 0;
    border-radius: 12px;
    border: 1px solid #eee;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th {
    background: #f1f4f8;
    padding: 20px;
    text-align: left;
    border-bottom: 3px solid var(--primary-blue);
}

td {
    padding: 18px 20px;
    border-bottom: 1px solid #eee;
}
/* ===== FORCE TABLE WIDTH CONTROL ===== */
.table-container {
    width: 100%;
    max-width: 900px;
    margin: 60px auto;
}

/* THIS IS THE KEY FIX */
.table-container table {
    width: 100%;
    table-layout: fixed;   /* 🔥 prevents stretching */
    border-collapse: collapse;
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-bold);
}

/* FIX COLUMN WIDTH BALANCE */
.table-container th,
.table-container td {
    padding: 16px;
    text-align: center;
    word-wrap: break-word;
}

/* HEADER STYLE */
.table-container th {
    background: var(--dark-navy);
    color: var(--white);
}

/* ROW STYLE */
.table-container tr {
    border-bottom: 1px solid #eee;
}


/* --- 7. CTA SECTION (FIX FOR OVERLAP) --- */
.cta {
    background-color: var(--primary-blue);
    padding: 100px 0;
    text-align: center;
    color: var(--white);
}

.cta-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cta-content h2 {
    color: var(--white);
    margin-bottom: 20px;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 45px; /* Pushes button down to prevent overlap */
    max-width: 600px;
}

.btn-primary.btn-large {
    background-color: var(--school-yellow);
    color: var(--dark-navy);
    padding: 18px 45px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.2rem;
    display: inline-block;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn-primary.btn-large:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    filter: brightness(1.05);
}

/* --- 8. MOBILE ADJUSTMENTS --- */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    .program-tabs { flex-direction: column; border-radius: 20px; }
    .program-tab-btn { border-radius: 15px; }
    .program-content { padding: 30px 20px; }

    /* Let the fixed-layout course table scroll horizontally instead of
       crushing every column's text into a single-word-per-line wrap */
    .table-container table {
        table-layout: auto;
        min-width: 560px;
    }
    .table-container th,
    .table-container td {
        white-space: nowrap;
        padding: 12px 14px;
        font-size: 0.9rem;
    }
}

/* --- 9. NON-STUDENT PROGRAMS FIX --- */

.non-student-programs {
    padding: 100px 0;
    background: var(--white);
}

/* Center section header */
.non-student-programs .section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

.non-student-programs .section-header h2 {
    margin-bottom: 10px;
}

.non-student-programs .section-header p {
    margin: 0 auto;
}

/* Grid Layout */
.program-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* Card Design */
.non-student-programs .program-card {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    text-align: left;
}

/* Hover effect */
.non-student-programs .program-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-bold);
}

/* Title center */
.non-student-programs .program-card h3 {
    text-align: center;
    margin-bottom: 15px;
}

/* Info badges */
.program-info {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.program-info span {
    background: var(--primary-blue);
    color: var(--white);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Paragraph */
.non-student-programs .program-card p {
    text-align: center;
    font-size: 1rem;
}

/* List styling */
.non-student-programs .program-card ul {
    margin-top: 15px;
    padding-left: 0;
    list-style: none;
}

.non-student-programs .program-card ul li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Add icon before list */
.non-student-programs .program-card ul li::before {
    content: "✔";
    color: #2ecc71;
    font-weight: bold;
}

/* --- 10. CLASS SCHEDULE SECTION --- */

.class-schedule {
    padding: 100px 0;
    background: var(--light-bg);
}

/* Center header */
.class-schedule .section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

/* Layout: table + info side by side */
.schedule-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: stretch;
}

/* LEFT: Schedule Table Card */
.schedule-table {
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

/* Header */
.schedule-table .schedule-header {
    background: var(--dark-navy);
    color: var(--white);
    padding: 20px;
    text-align: center;
}

.schedule-table .schedule-header h3 {
    color: var(--school-yellow);
    margin: 0;
}

/* Rows */
.schedule-body {
    padding: 20px;
}

.schedule-row {
    display: flex;
    justify-content: space-between;
    padding: 14px 18px;
    margin-bottom: 10px;
    background: #f9fbfd;
    border-radius: 10px;
    transition: 0.3s;
}

/* Hover */
.schedule-row:hover {
    background: #eef5fb;
}

/* Time + period */
.time-slot {
    font-weight: 600;
    color: var(--dark-navy);
}

.period {
    color: var(--text-gray);
}

/* RIGHT: Info Card */
.schedule-info {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-md);
}

/* Title center */
.schedule-info h3 {
    text-align: center;
    margin-bottom: 20px;
}

/* List */
.schedule-info ul {
    list-style: none;
    padding: 0;
}

.schedule-info ul li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-gray);
    font-size: 1rem;
}

/* Icons */
.schedule-info ul li i {
    color: var(--primary-blue);
    font-size: 1.1rem;
}

/* --- MOBILE FIX --- */
@media (max-width: 768px) {
    .schedule-content {
        grid-template-columns: 1fr;
    }
}

/* --- 11. STUDENT VISA PROGRAMS/ NON-STUDENT VISA/ ADDITIONAL FEES/ (NEW DESIGN) --- */
/* ================= MASTER SECTION ================= */
.tuition-master {
    padding: 100px 0;
    background: var(--light-bg);
}

.fees-block {
    margin-bottom: 70px;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    width: 100%;
}
/* ================= STUDENT CARDS ================= */
.student-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

@media (max-width: 992px) {
    .student-grid {
        grid-template-columns: 1fr;
    }
}

.student-card {
    background: var(--white);
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.student-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-bold);
}

/* Title + Duration */
.student-card h4 {
    text-align: center;
    margin-bottom: 5px;
}

.duration {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 20px;
}

/* ================= TABLE INSIDE CARD ================= */
.tuition-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.tuition-table th:first-child,
.tuition-table td:first-child {
    width: 46%;
}

.tuition-table th:not(:first-child),
.tuition-table td:not(:first-child) {
    width: 27%;
}

/* Header */
.tuition-table thead {
    background: var(--dark-navy);
    color: var(--black);
}

.tuition-table th {
    padding: 10px;
    text-align: center;
    font-size: 0.85rem;
    word-wrap: break-word;
}

/* Body */
.tuition-table td {
    padding: 10px 4px;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}

/* First column (labels) */
.tuition-table td:first-child {
    font-weight: 600;
    color: var(--dark-navy);
}

/* Keep fee amounts centered and on one line. */
.tuition-table td:not(:first-child) {
    text-align: center;
    font-weight: 500;
}

/* Total Row */
.total-row {
    background: #f1f7ff;
    font-weight: 700;
}

.total-row td {
    color: var(--primary-blue);
}

/* ================= SIMPLE TABLE ================= */
.simple-table {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.simple-table .row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.simple-table .head {
    background: var(--dark-navy);
    color: var(--white);
    font-weight: 600;
}

/* ================= ADDITIONAL FEES ================= */
.fee-list {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.fee-list div {
    display: flex;
    justify-content: space-between;
    padding: 12px 5px;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
}

.fee-list div span:last-child {
    font-weight: 600;
    color: var(--dark-navy);
}

/* ================= PAYMENT ================= */
.payment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.payment-card {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: 0.3s;
}

.payment-card:hover {
    transform: translateY(-5px);
}

.payment-card h4 {
    margin-bottom: 15px;
}

.payment-card ul {
    list-style: none;
    padding: 0;
}

.payment-card li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
}

.payment-note {
    display: block;
    margin-top: 4px;
    color: var(--text-gray);
    font-size: 0.82rem;
    font-style: italic;
    font-weight: 400;
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {
    .simple-table .row {
        grid-template-columns: 1fr 1fr;
        row-gap: 5px;
    }

    .program-header { padding: 25px 20px; }
    .program-header h3 { font-size: 1.5rem; }
    .program-content { padding: 30px 20px; }
    .program-meta { flex-wrap: wrap; gap: 12px; }
    .schedule-content { grid-template-columns: 1fr; }
    .table-container th, .table-container td { padding: 10px 8px; font-size: 0.9rem; }

    .tuition-table {
        font-size: 0.78rem;
    }
    .tuition-table th,
    .tuition-table td {
        padding: 8px 6px;
    }
    .tuition-table th:first-child,
    .tuition-table td:first-child {
        width: 42%;
    }
    .tuition-table th:not(:first-child),
    .tuition-table td:not(:first-child) {
        width: 29%;
    }
}

@media (max-width: 400px) {
    .tuition-table {
        font-size: 0.7rem;
    }
    .tuition-table th,
    .tuition-table td {
        padding: 6px 4px;
    }
}

@media (max-width: 480px) {
    .simple-table .row {
        grid-template-columns: 1fr;
        text-align: left;
    }
    .payment-grid, .program-grid, .student-grid, .program-features {
        grid-template-columns: 1fr;
    }
}