* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: #222;
    line-height: 1.6;
}


/* Navigation */

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 20px 8%;

    background-color: white;

    position: sticky;
    top: 0;

    z-index: 1000;

    border-bottom: 1px solid #eeeeee;
}
/* ================= LOGO IMAGE ================= */

.logo {
    display: flex;
    align-items: center;
    gap: 10px;

    text-decoration: none;
    color: #111111;
    font-size: 22px;
    font-weight: bold;

}

.logo-image {
    width: 160px;
    height: 65px;

    object-fit: contain;

    display: block;
}

.logo-text {
    display: flex;
    flex-direction: column;

    line-height: 1;
}

.logo-text span {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-text small {
    margin-top: 5px;

    font-size: 8px;
    font-weight: 800;

    letter-spacing: 2.5px;

    color: #777777;
}



.nav-links {
    display: flex;
    gap: 28px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-size: 15px;
}

.nav-links .trial-button {
    background: #111;
    color: white;

    padding: 11px 18px;
    border-radius: 6px;

    font-weight: 600;
}

/* Hide menu button normally */

.menu-button {
    display: none;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #111;
}

/* ================= CONTACT ================= */

.contact {
    padding: 90px 6%;
    background: #f7f8fa;
}

.contact-container {
    max-width: 1150px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 70px;

    align-items: center;
}

/* Left Column */

.contact-info h2 {
    font-size: 32px;
    margin: 0 0 24px;
    color: #111;
}

.contact-description {
    max-width: 380px;
    margin: 0 0 40px;

    color: #555;
    font-size: 16px;
    line-height: 1.8;
}

.contact-item {
    margin-bottom: 30px;
}

.contact-item h3 {
    margin: 0 0 10px;

    color: #111;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.contact-item a {
    color: #222;
    font-size: 15px;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.contact-item a:hover {
    text-decoration: underline;
}

.contact-item p {
    margin: 0;

    color: #333;
    font-size: 15px;
    line-height: 1.8;
}

.contact-form-container {
    width: 100%;
    min-width: 0;
}

/* Form */

.contact-form {
    width: 100%;
    box-sizing: border-box;

    padding: 35px;
    background-color: #fff;
    border-radius: 10px;

    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}


/* Fields */

.form-group {
    min-width: 0;
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 9px;

    font-size: 14px;
    font-weight: 600;
    color: #222;
}

.form-group input,
.form-group select,
.form-group textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;

    padding: 13px 14px;

    border: 1px solid #d5d5d5;
    border-radius: 5px;

    background-color: #fff;
    color: #222;

    font-family: inherit;
    font-size: 15px;
}

.form-group input,
.form-group select {
    min-height: 46px;
}

.form-group textarea {
    min-height: 130px;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #333;
}

/* Grade + Program */

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}




/* Button */

.contact-submit {
    width: 100%;
    padding: 14px;

    border: none;
    border-radius: 5px;

    background: #111;
    color: white;

    font-size: 15px;
    font-weight: 600;

    cursor: pointer;
}

.contact-submit:hover {
    opacity: 0.85;
}



/* Responsive menu — tablet and phone */
@media (max-width: 900px) {
    .navbar {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
        padding: 10px 20px;
        gap: 12px;
        position: sticky;
        top: 0;
    }

    .navbar .logo {
        flex: 0 1 auto;
        min-width: 0;
        max-width: calc(100% - 76px);
    }

    .navbar .logo-image {
        width: 150px;
        height: 65px;
        max-width: 100%;
        object-fit: contain;
    }

    .navbar .menu-button {
        display: flex !important;
        align-items: center;
        justify-content: center;
        flex: 0 0 56px;
        width: 56px;
        min-width: 56px;
        height: 56px;
        padding: 0;
        margin: 0;
        font-size: 42px;
        line-height: 1;
        background: transparent;
        border: none;
        color: #111;
        position: relative;
        z-index: 1001;
    }

    .navbar .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 20px;
        background: white;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
        z-index: 1000;
    }

    .navbar .nav-links.active {
        display: flex;
    }

    .navbar .nav-links > a {
        display: block;
        width: 100%;
        padding: 14px 0;
        text-align: left;
        border-bottom: 1px solid #eee;
    }

    .navbar .nav-links .nav-trial-button,
    .navbar .nav-links .trial-button {
        text-align: center;
        margin-top: 10px;
        padding: 12px;
        white-space: normal;
    }

    .contact {
        padding: 70px 5%;
    }

    .contact-form {
        padding: 25px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}



.nav-links a:hover {
    color: #555;
}




/* Hero */

.hero {
    min-height: 650px;

    background-image: 
        linear-gradient(
            rgba(255, 255, 255, 0.75),
            rgba(255, 255, 255, 0.75)
        ),
        url("images/math-background.jpg");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    display: flex;
    align-items: center;

    position: relative;
}

.hero-content {
    max-width: 850px;
}

.small-title {
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 2px;
}

.hero h1 {
    font-size: 52px;
    line-height: 1.15;

    margin: 20px 0;
}

.hero-text {
    font-size: 20px;
    max-width: 650px;

    margin-bottom: 35px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}





/* Buttons */

button {
    border: none;

    padding: 14px 25px;

    font-size: 16px;

    cursor: pointer;

    border-radius: 5px;

    background-color: #222;
    color: white;
}

button:hover {
    opacity: 0.85;
}

.secondary-button {
    text-decoration: none;

    padding: 13px 24px;

    border: 1px solid #222;

    border-radius: 5px;

    color: #222;
}


/* General Sections */

section {
    padding: 90px 8%;
}

section h2 {
    text-align: center;

    font-size: 36px;

    margin-bottom: 15px;
}

.section-intro {
    text-align: center;

    max-width: 650px;

    margin: 0 auto 50px;

    color: #666;
}


/* Why Us */

.why-us {
    background-color: white;
}

.features {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 25px;

    max-width: 1200px;

    margin: auto;
}

.feature {
    padding: 25px;

    border: 1px solid #eeeeee;

    border-radius: 8px;
}

.feature h3 {
    margin-top: 0;
}


/* Programs */

.programs {
    background-color: #f5f7fa;
}

.program-cards {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 30px;

    max-width: 1100px;

    margin: auto;
}

.program-card {
    background-color: white;

    padding: 35px;

    border-radius: 8px;

    min-height: 300px;
}

.program-card h3 {
    font-size: 25px;
}

.grades {
    font-weight: bold;
}

.program-card a {
    text-decoration: none;

    color: #222;

    font-weight: bold;
}


/* Teachers */

.teachers {
    text-align: center;
}

.teacher-message {
    max-width: 700px;

    margin: 40px auto;

    padding: 40px;

    border: 1px solid #eeeeee;

    border-radius: 8px;
}


/* Trial */

.trial {
    text-align: center;

    background-color: #f5f7fa;
}

.trial-content {
    max-width: 700px;

    margin: auto;
}

.trial p {
    margin-bottom: 30px;
}


/* Contact */

.contact {
    text-align: center;
}

.contact-info {
    margin-top: 30px;
}


/* Footer */

footer {
    padding: 30px;

    text-align: center;

    background-color: #222;

    color: white;
}


/* Mobile */

@media (max-width: 800px) {



    .nav-links {
        gap: 15px;

        flex-wrap: wrap;

        justify-content: center;
    }

    .hero h1 {
        font-size: 38px;
    }

    .hero-buttons {
        flex-direction: column;

        align-items: flex-start;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .program-cards {
        grid-template-columns: 1fr;
    }

}


/* ==================================
   RESPONSIVE DESIGN FOR MOBILE
================================== */

/* Prevent elements from exceeding the screen width */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    overflow-wrap: break-word;
}

img {
    max-width: 100%;
}

/* Navigation trial button */
.nav-trial-button {
    display: inline-block;
    padding: 12px 20px;
    background: #111;
    color: #fff;
    text-decoration: none;
    text-align: center;
    border-radius: 5px;
    white-space: nowrap;
}

.nav-trial-button:hover {
    background: #333;
}

/* Hero buttons */
.hero-buttons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 14px 22px;
    border-radius: 5px;
    text-decoration: none;
    text-align: center;
    font-size: 15px;
}

/* ==================================
   TABLETS AND MOBILE PHONES
================================== */

@media (max-width: 768px) {

    /* Navigation */


    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        box-sizing: border-box;
        padding: 12px 5%;
        background: #fff;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links > a {
        display: block;
        width: 100%;
        padding: 14px 0;
        text-align: left;
        border-bottom: 1px solid #eee;
    }

    .nav-links .nav-trial-button {
        margin-top: 12px;
        padding: 13px;
        text-align: center;
        border-bottom: none;
    }

    /* Hero section */
    .hero {
        min-height: 520px;
        height: auto;
        padding: 70px 6%;
        background-position: center;
    }

    .hero-content {
        width: 100%;
        max-width: 100%;
    }

    .hero h1 {
        font-size: clamp(30px, 6vw, 42px);
        line-height: 1.2;
        overflow-wrap: normal;
    }

    /* Allow the heading to wrap naturally on phones */
    .hero h1 br {
        display: none;
    }

    .hero-text {
        font-size: 16px;
        line-height: 1.7;
    }

    .hero-buttons {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        width: 100%;
        max-width: 320px;
    }

    .hero-buttons a {
        width: 100%;
        box-sizing: border-box;
    }

    /* Programs */
    .programs {
        padding: 60px 5%;
    }

    .programs h2 {
        font-size: 28px;
    }

    .program-cards {
        grid-template-columns: 1fr;
        width: 100%;
        gap: 22px;
    }

    .program-card {
        width: 100%;
        min-width: 0;
        padding: 25px;
    }

    /* Contact section */
    .contact {
        padding: 60px 5%;
    }

    .contact-container {
        grid-template-columns: minmax(0, 1fr);
        gap: 30px;
        width: 100%;
    }

    .contact-info,
    .contact-form-container {
        width: 100%;
        min-width: 0;
    }

    .contact-info h2 {
        font-size: 28px;
    }

    .contact-description {
        max-width: 100%;
        line-height: 1.7;
    }

    .contact-form {
        width: 100%;
        padding: 25px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
        max-width: 100%;
        font-size: 16px;
    }

    /* Footer */
    footer {
        padding: 22px 5%;
        text-align: center;
    }

    footer p {
        font-size: 13px;
        line-height: 1.6;
    }
}

/* ==================================
   SMALL PHONES
================================== */


@media (max-width: 400px) {
    .navbar {
        padding: 8px 12px;
        gap: 8px;
    }

    .navbar .logo-image {
        width: 135px;
        height: 60px;
    }

    .navbar .menu-button {
        flex-basis: 52px;
        width: 52px;
        min-width: 52px;
        height: 52px;
        font-size: 38px;
    }

    .hero {
        padding: 55px 5%;
        min-height: 460px;
    }

    .hero h1 {
        font-size: 30px;
    }

    .program-card {
        padding: 20px;
    }

    .contact-form {
        padding: 18px;
    }

    .contact-item a {
        font-size: 14px;
    }
}
