/* Global box-sizing */
* {
    box-sizing: border-box;
}

/* Reset margin and prevent horizontal scroll */
html,
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: #d8c4a4;
    font-family: sans-serif;
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 90%;
    /*max-width: 1200px;*/
    margin: 0 auto;
}

/* NAVIGATION BAR */
nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 30px 20px;
    position: relative;
    /* Ensures navbar is positioned correctly */
    z-index: 1;
    /* Lower than logo, but above other content */
}

.menu {
    display: flex;
    align-items: center;
    /* Ensures vertical alignment */
}

.menu ul.nav-list {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    /* Ensure vertical alignment of items */
    transition: transform 0.3s ease-out;
    /* Transition for transform */
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

.menu ul.nav-list li {
    padding: 0 15px;
    display: flex;
    /* Ensure items within li are flex containers */
    align-items: center;
    /* Vertically align items within li */
}

.menu ul.nav-list li a {
    text-decoration: none;
    color: black;
    font-size: 1.3em;
    transition: color 0.3s ease;
    /* Smooth color transition */
}

.menu a.menu-toggle {
    display: none;
    color: black;
    cursor: pointer;
    text-decoration: none;
    z-index: 11;
}

.menu a.menu-toggle:focus,
.menu a.menu-toggle:hover,
.menu a.menu-toggle:active {
    color: black;
    outline: none;
    text-decoration: none;
}


/* Hero Section */
.hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    background: #d8c4a4;
    padding-left: 2rem;
    padding-right: 2rem;
}

.hero-text {
    flex: 1;
    max-width: 600px;
    color: black;
}

.hero-text h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.hero-text a {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #007BFF;
    color: #fff;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s ease;
}

.hero-text a:hover {
    background: #0056b3;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Container to hold multiple cards */
.card-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
    /* Space between cards */
    justify-content: space-around;
    margin-top: 80px;
    padding-left: 50px;
    padding-right: 50px;
}


/* Individual card styling */
.card {
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid #ddd;
    width: 30%;
    min-width: 250px;
    /* Ensures cards are readable on smaller screens */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
    margin-bottom: 50px;
}

/* Card hover effect */
.card:hover {
    transform: translateY(-5px);
}

/* Card header styling (20% height) */
.card-header {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    flex: 0 0 20%;
    background-color: #c0aa92;
}

/* Icon styling */
.icon {
    font-size: 2rem;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon img {
    width: 40px;
}

/* Title styling */
.title {
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1.2;
}

/* Divider line */
.card-divider {
    height: 1px;
    background-color: #ccc;
    width: 100%;
}

/* Card body styling */
.card-body {
    padding: 15px;
    flex: 1;
    /* Takes up remaining space */
}

/* List styling */
.card-body ul {
    list-style-type: none;
    padding-left: 20px;
}

.card-body li {
    margin-bottom: 8px;
    color: #333;
}

.card-background-color-overridden {
    background-color: #dda15e;
}

.card-list-type-overridden {
    list-style-type: disc;
}

/* Who I teach */
.students-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

.students-card-container {
    width: 40%;
    display: flex;
    flex-direction: row;
    border-radius: 10px;
    border: 1px solid #ccc;
    background-color: #f0f0f0;
    overflow: hidden;
    /* Add overflow: hidden to clip any overflowing content */
}

.students-card-container>div {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.students-image-square {
    border-radius: 10px 0 0 10px;
}

.students-image-square img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.students-text-square {
    border-radius: 0 10px 10px 0;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.students-title-container {
    height: 30%;
    background-color: #dda15e;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    border-top-right-radius: 10px;
}

.students-list-container {
    overflow-y: auto;
    flex: 1;
    width: 100%;
}

.students-list-container ul li {
    margin-bottom: 10px;
}

/* About-me */
.about-me {
    margin-top: 100px;
    background-color: #c0aa92;
}

.about-me,
.who-i-teach h1 {
    text-align: center;
    margin-top: 60px;
    margin-bottom: 60px;
}

.abount-me-container {
    display: flex;
    justify-content: space-around;
    margin: 50px 0;
    padding-top: 60px;
    padding-bottom: 60px;
}

.abount-me-box {
    padding: 20px;
}

.about-me-box img {
    width: 100%;
    height: auto;
}

.about-me-box-title {
    font-size: 2em;
    margin-bottom: 10px;
}
.about-me-bigger-font {
    font-size: 1.2em;
}
.about-me-box img {
    width: 50%;
}

.contact {
    padding-top: 10px;
    padding-bottom: 40px;
    text-align: center;
}

/* Footer */
.footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 1rem;
}

/********************* MAX-WIDTH 1600px ************************/
@media (max-width: 1600px) {
    .students-card-container {
        width: 50%;
        margin-bottom: 40px;
    }
}


/********************* MAX-WIDTH 1100px ************************/
@media (max-width: 1100px) {
    .hero-text h1 {
        margin: 0;
        font-size: 3.5em;
    }

    .hero-text h2 {
        margin: 0;
        padding-top: 0.5em;
        font-size: 1.2em;
    }

    .card {
        width: 45%;
    }

    .students-card-container {
        width: 90%;
    }
}

/***************** MAX-WIDTH 900px ********************/
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        /* Stack hero text and image vertically */
        text-align: center;
        /* Center-align text */
    }

    .hero-text {
        margin-bottom: 1.5rem;
        /* Add spacing below the text */
        max-width: 100%;
        /* Allow text to take full width */
    }

    .hero-image {
        flex: 0 0 auto;
        /* Adjust image sizing */
    }

    .hero-image img {
        width: 100%;
        /* Make image responsive but smaller */
        margin: 0 auto;
        /* Center the image horizontally */
    }
}

/******************* max-width 768px *************************************/
@media (max-width: 768px) {
    .hero {
        padding-left: 0px;
        padding-right: 0px;
    }

    .hero-text h1 {
        margin: 0;
        font-size: 2.5em;
    }

    .hero-text h2 h3 {
        margin: 0;
        padding-top: 0.5em;
        font-size: 1em;
    }

    .menu ul.nav-list {
        position: fixed;
        background-color: #d1b088;
        width: 100%;
        transform: translateY(-100%);
        flex-direction: column;
        padding-top: 40px;
        z-index: 20;
    }

    .menu ul.nav-list.active {
        transform: translateY(0);
    }

    .menu a.menu-toggle {
        display: block;
        position: absolute;
        right: 20px;
        top: 10px;
        font-size: 1.5em;
        border: 3px solid #d1b088;
        border-radius: 5px;
        z-index: 100;
    }

    .menu ul.nav-list li {
        color: white;
        font-size: 1.0em;
        padding-bottom: 0.5em;
    }

    .card-container {
        padding-left: 5px;
        padding-right: 5px;
    }

    .card {
        width: 100%;
        /* Full width for mobile */
    }

    .students-card-container {
        flex-direction: column;
    }

    .students-text-square {
        border-radius: 0 0 10px 10px;
        flex: 1;
    }

    .students-title-container {
        border-top-right-radius: 0;
    }

    .students-list-container {
        padding-bottom: 20px;
        min-height: 220px;
        overflow-y: auto;
        flex: 1;
    }

    .abount-me-container {
        flex-direction: column;
        align-items: center;
    }

    .abount-me-box {
        width: 90%;
        margin-bottom: 20px;
    }

}