/* =========================================
TABLE OF CONTENTS
=========================================
1. FONT DEFINITIONS
2. RESET & BASE STYLES
3. VARIABLES
4. CUSTOM SCROLLBAR
5. TYPOGRAPHY
6. BUTTONS
7. LAYOUT & STRUCTURE
8. NAVIGATION
9. HERO SECTION
10. RATINGS & AVATARS
11. TUTOR IMAGES
12. STATS SECTION
13. ABOUT SECTION
14. HOW IT WORKS SECTION
15. COURSES SECTION
16. CARD STYLES
17. CAROUSEL CONTROLS
18. REVIEWS SECTION
19. NEWSLETTER SECTION
20. FOOTER SECTION
21. ANIMATIONS
22. RESPONSIVE STYLES
========================================= */

/* =========================================
1. FONT DEFINITIONS
========================================= */
@font-face {
    font-family: 'Gilroy';
    src: url('assets/gilroy/Gilroy-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Gilroy';
    src: url('assets/gilroy/Gilroy-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Gilroy';
    src: url('assets/gilroy/Gilroy-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Gilroy';
    src: url('assets/gilroy/Gilroy-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Gilroy';
    src: url('assets/gilroy/Gilroy-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Gilroy';
    src: url('assets/gilroy/Gilroy-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* =========================================
2. RESET & BASE STYLES
========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Gilroy', sans-serif;
}

body {
    background-color: white;
    color: #333;
}

::selection {
    background: #ff6f61c7;
    /* Coral background */
    color: #000000;
    /* Black text */
}

/* =========================================
3. VARIABLES
========================================= */
:root {
    --primary-color: #5a9a6f;
    --secondary-color: #515151;
    --light-gray: #f5f5f5;
    --white: #fff;
}

/* =========================================
4. CUSTOM SCROLLBAR
========================================= */
/* For Webkit browsers (Chrome, Safari) */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--white);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
    border: 2px solid var(--white);
}

::-webkit-scrollbar-thumb:hover {
    background: #4a8a5f;
}

/* For Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--white);
}

/* =========================================
5. TYPOGRAPHY
========================================= */
.primary-color {
    color: var(--primary-color);
}

.secondary-color {
    color: var(--secondary-color);
}

.section-title {
    position: relative;
    font-size: 48px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: -1px;
}

.section-description {
    font-size: 18px;
    color: var(--secondary-color);
    margin-bottom: 20px;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* =========================================
6. BUTTONS
========================================= */
.button {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    line-height: 21px;
    letter-spacing: -0.32px;
    cursor: pointer;
    text-align: center;
    border: none;
    transition: background-color 0.3s, color 0.3s, transform 0.3s;
}

.cta-button {
    background-color: #000;
    color: var(--white);
    box-shadow: 0px 8px 16px rgba(68, 68, 68, 0.1);
}

.secondary-button {
    background-color: var(--white);
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
    white-space: nowrap;
}

.green-button {
    background-color: var(--primary-color);
    color: var(--white);
}

/* =========================================
7. LAYOUT & STRUCTURE
========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
    position: relative;
}

/* =========================================
8. NAVIGATION
========================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5.1%;
    position: absolute;
    width: 100%;
    z-index: 10;
}

.navbar-section {
    display: flex;
    align-items: center;
    gap: 50px;
    color: var(--secondary-color);
    font-size: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
    color: #484848;
    filter: drop-shadow(9px 9px 8px rgba(0, 0, 0, 0.14));
}

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

.nav-links a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 16px;
}

.nav-links span {
    color: var(--white);
}

/* =========================================
9. HERO SECTION
========================================= */
.hero {
    position: relative;
    height: 637px;
    background-color: var(--white);
    padding: 96px 11.3% 6.3% 9.3%;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    right: 0;
    width: 43.1%;
    height: 100%;
    background-color: var(--primary-color);
    z-index: 0;
}

.subtitle {
    font-size: 16px;
    margin-bottom: 20px;
    font-weight: 500;
    color: var(--secondary-color);
    max-width: 50%;
}

.title {
    font-size: 65px;
    white-space: nowrap;
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: 700;
    color: var(--secondary-color);
    letter-spacing: -1.2px;
    max-width: 50%;
}

.title span {
    color: #559268;
}

.description {
    margin-bottom: 30px;
    max-width: 50%;
    color: var(--secondary-color);
    font-size: 19px;
    line-height: 140%;
    font-weight: 500;
}

.button-group {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    max-width: 50%;
}

/* =========================================
10. RATINGS & AVATARS
========================================= */
.ratings {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 50%;
}

.stars {
    margin-right: 18px;
}

.user-avatars {
    display: flex;
}

.user-avatars img,
.plus-9k-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-left: -10px;
}

.user-avatars img {
    object-fit: cover;
}

.plus-9k-avatar {
    border: 1.5px solid var(--white);
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 12px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* =========================================
11. TUTOR IMAGES
========================================= */
.tutor-image {
    height: 93%;
    object-fit: contain;
    position: absolute;
    top: 45px;
    right: 15rem;
    z-index: 1;
}

#starimg {
    height: 40px;
    margin-bottom: -5px;
}

#tutorwhite {
    position: absolute;
    top: 88px;
    right: 13.2rem;
    z-index: 0;
}

/* =========================================
12. STATS SECTION
========================================= */
.stats-section {
    padding: 80px 5%;
    text-align: center;
    background-color: var(--white);
}

.scribble-container {
    width: 120px;
    height: auto;
    margin: 0 auto 5px;
    display: block;
}

.stats-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.stat-item {
    padding: 20px;
    min-width: 200px;
}

.stat-number {
    font-size: 42px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.stat-label {
    font-size: 18px;
    color: var(--secondary-color);
}

/* =========================================
13. ABOUT SECTION
========================================= */
.about-section {
    display: flex;
    padding: 70px 9.3%;
    position: relative;
    overflow: hidden;
}

.about-content {
    flex: 1;
    padding: 40px;
    min-height: 378px;
    height: 59vh;
    margin: 31px;
    max-width: 50%;
    background: rgba(255, 255, 255, 30%);
    backdrop-filter: blur(25px);
    z-index: 3;
    position: relative;
    margin-right: -200px;
}

.about-image-container {
    flex: 1;
    position: relative;
    z-index: 2;
}

.about-image {
    width: 105%;
    height: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

.about-dots {
    position: absolute;
    bottom: -49px;
    left: -70px;
    z-index: 0;
}

.read-more {
    display: inline-flex;
    align-items: center;
    color: var(--secondary-color);
    font-weight: 600;
    text-decoration: none;
    margin-top: 20px;
    transition: color 0.3s;
}

.read-more:hover {
    color: var(--primary-color);
}

.read-more svg {
    margin-left: 10px;
    transition: transform 0.3s;
}

.read-more:hover svg {
    transform: translateX(5px);
}

.read-more:hover svg path {
    stroke: var(--primary-color);
}

/* =========================================
14. HOW IT WORKS SECTION
========================================= */
.how-it-works {
    padding: 80px 9.3%;
    text-align: center;
    background-color: var(--white);
}

.how-title-container {
    position: relative;
}

.how-title {
    font-size: 48px;
    color: var(--secondary-color);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.how-leaf {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 85px;
}

.steps-container {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
    gap: 30px;
}

.step-item {
    flex: 1;
    padding: 10px 30px;
    background-color: var(--white);
    position: relative;
    text-align: left;
    transition: all 0.5s ease;
    overflow: hidden;
}

.step-item.active {
    box-shadow: 0 15px 40px rgba(90, 154, 111, 0.2);
}

/* Step item borders */
.step-item::before,
.step-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
}

.step-item::before {
    background-color: #e5e5e5;
}

.step-item::after {
    background-color: var(--primary-color);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
}

.step-item.active::after {
    opacity: 1;
}

.step-number {
    font-size: 90px;
    font-weight: 900;
    color: #f5f5f5;
    position: absolute;
    top: 0px;
    left: 20px;
    z-index: 0;
}

.step-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 55px 0 17px;
    position: relative;
    z-index: 1;
}

.step-description {
    font-size: 16px;
    color: var(--secondary-color);
    position: relative;
    z-index: 1;
}

.title-decoration {
    position: absolute;
    left: -68px;
    bottom: 19px;
    height: 80px;
    width: 107px;
    transform: rotate(228deg) scaleX(-1);
}

/* =========================================
15. COURSES SECTION
========================================= */
.courses-section {
    position: relative;
    padding: 70px 0;
    overflow: hidden;
}

.courses-background {
    position: absolute;
    top: 31rem;
    left: 0;
    width: 100%;
    height: 45%;
    background-color: #F8F8F8;
    z-index: 0;
}

.carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    padding: 20px 0;
    z-index: 1;
}

.carousel-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.carousel-logo {
    width: 65px;
    display: block;
    margin: 0 auto;
}

.carousel {
    position: relative;
    perspective: 1000px;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-slide {
    min-width: 100%;
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 0 10px;
}

/* =========================================
16. CARD STYLES
========================================= */
.card {
    background: var(--white);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    transform: translateY(0);
    width: 100%;
    max-width: 25rem;
}

.card.active {
    transform: translateY(-10px);
    box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.2);
}

.card-img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    padding: 0 20px;
    object-position: 0px -40px;
}

.card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

.card-rating {
    color: #ffc107;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.card-description {
    color: #777;
    margin-bottom: 20px;
    flex-grow: 1;
}

.card-buttons {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.card-green-button {
    background-color: var(--primary-color);
    color: var(--white);
    flex: 1;
}

/* =========================================
17. CAROUSEL CONTROLS
========================================= */
.carousel-indicators {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 8px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ddd;
    cursor: pointer;
    transition: background-color 0.3s;
}

.indicator.active {
    background-color: var(--primary-color);
}

.progress-container {
    width: 100%;
    height: 4px;
    background-color: #f0f0f0;
    position: absolute;
    bottom: 0;
    left: 0;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    width: 0;
    transition: width 0.1s linear;
}

/* =========================================
18. REVIEWS SECTION
========================================= */
.reviews-section {
    padding: 80px 0;
    background-color: var(--white);
    position: relative;
}

.reviews-header {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 70px;
    text-align: center;
}

.navigation-wrapper {
    position: absolute;
    top: 30px;
    right: 50px;
    display: flex;
    gap: 10px;
}

.reviews-title {
    font-size: 3.3rem;
    color: var(--secondary-color);
    max-width: 57%;
    margin: 0 auto;
    position: relative;
    letter-spacing: -2px;
    display: inline-block;
    /* Added to contain the SVG properly */

}

.reviews-title-svg {
    width: 70px;
    height: 70px;
    position: absolute;
    left: 9px;
    top: -30px;
    transform: none;
    /* Remove the transform */
}

.navigation-buttons {
    display: flex;
    gap: 30px;
}

.nav-button {
    width: 77px;
    height: 77px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background-color: var(--light-gray);
    transition: all 0.3s ease;
}

.nav-button:hover {
    background-color: #e0f0e0;
}

.nav-button:hover .arrow-icon path {
    fill: var(--primary-color);
}

.arrow-icon {
    width: 24px;
    height: 24px;
}

.carousel-wrapper {
    padding: 20px;
    margin: -20px;
    overflow: hidden;
}

.reviews-container {
    display: flex;
    width: 100%;
    gap: 30px;
    transition: transform 0.5s ease;
    flex-wrap: nowrap;
}

.review-card {
    flex: 0 0 calc(33.33% - 20px);
    min-width: 280px;
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.review-card:hover {
    box-shadow: 0px 0px 20px 3px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.review-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #333;
}

.review-text {
    font-size: 1rem;
    line-height: 1.5;
    color: #666;
    margin-bottom: 15px;
}

.review-stars {
    color: #FFD700;
    font-size: 1.2rem;
    letter-spacing: 5px;
    margin-bottom: 10px;
}

.reviewer-name {
    font-size: 1.1rem;
    color: #333;
    margin-top: 15px;
    font-weight: 600;
}

/* =========================================
19. NEWSLETTER SECTION
========================================= */
.newsletter-section {
    padding: 0 5.3%;
    background-color: var(--white);
}

.newsletter-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--primary-color);
    border-radius: 15px;
    padding: 40px 75px;
    color: var(--white);
}

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

.newsletter-text {
    flex: 1;
}

.newsletter-label {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 500;
}

.newsletter-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.1;
}

.newsletter-description {
    font-size: 18px;
    line-height: 1.5;
    max-width: 85%;
    opacity: 0.9;
    margin-bottom: 20px;
}

.newsletter-button {
    background-color: transparent;
    color: var(--white);
    border: 1.5px solid var(--white);
    border-radius: 10px;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* =========================================
20. FOOTER SECTION
========================================= */
.footer-section {
    margin-top: 40px;
}

.footer-container {
    padding: 80px 1% 0 6%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.logo-name {
    margin-bottom: 7px;
    font-size: 22px;
}

.logo-name span {
    color: var(--primary-color);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.footer-intro {
    flex: 1.6;
    min-width: 90px;
    margin-bottom: 30px;
}

.footer-description {
    color: var(--secondary-color);
    font-size: 16px;
    line-height: 1.6;
    margin: 20px 0 32px;
    max-width: 90%;
}

.social-icons {
    display: flex;
    margin-top: 20px;
    gap: 15px;
}

.social-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 35px;
    height: 35px;
    border-radius: 11px;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.social-icon i {
    font-size: 15px;
}

.social-icon:hover {
    background-color: var(--primary-color);
}

.footer-categories,
.footer-about,
.footer-follow {
    flex: 1;
    min-width: 180px;
    padding: 0 15px;
    margin-bottom: 30px;
}

.footer-title {
    font-size: 22px;
    font-weight: 700;
    color: #212121;
    margin-bottom: 43px;
    position: relative;
}

.footer-list {
    list-style: none;
}

.footer-list li {
    margin-bottom: 15px;
}

.footer-list a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.footer-list a:hover {
    color: var(--primary-color);
}

.footer-copyright {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 15px;
    font-size: 14px;
}

/* =========================================
21. ANIMATIONS
========================================= */
[data-aos] {
    transition-duration: 600ms;
}

/* Adjust container widths to prevent overflow */
.reviews-container,
.carousel-container,
.footer-container {
    max-width: 100%;
    box-sizing: border-box;
}

/* =========================================
22. RESPONSIVE STYLES
========================================= */
/* Fix navigation container on mobile */
@media (max-width: 768px) {

    html,
    body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }

    [data-aos] {
        max-width: 100vw;
        /* Prevent elements from extending beyond viewport */
    }

    .navbar {
        width: 100%;
        padding: 20px 5%;
        box-sizing: border-box;
    }

    /* Fix tutor image positioning that might cause overflow */
    .tutor-image,
    #tutorwhite {
        right: 0;
        max-width: 45%;
    }

    /* Fix absolute positioned elements that might extend beyond viewport */
    .about-dots,
    .how-leaf {
        max-width: 30%;
    }
}

/* Larger screens */
@media (max-width: 992px) {
    .reviews-container {
        flex-wrap: nowrap;
    }

    .review-card {
        flex: 0 0 calc(50% - 20px);
        min-width: 250px;
    }

    .reviews-title {
        font-size: 2rem;
        max-width: 90%;
    }
}

/* Tablet and Mobile */
@media (max-width: 768px) {

    /* Navigation */
    .nav-links {
        display: none;
    }

    /* Hero section */
    .hero {
        height: none;
        padding-bottom: 420px;
    }

    .title {
        font-size: 36px;
        max-width: 100%;
    }

    .subtitle,
    .description,
    .button-group,
    .ratings {
        max-width: 100%;
    }

    .tutor-image {
        display: none;
    }

    #tutorwhite {
        display: none;
    }

    /* Stats section */
    .stats-container {
        flex-direction: column;
        align-items: center;
    }

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

    /* About section */
    .about-section {
        flex-direction: column;
        padding: 60px 5%;
    }

    .about-content {
        max-width: 100%;
        margin-right: 0;
        padding: 30px;
        margin-bottom: 40px;
    }

    /* How it works section */
    .steps-container {
        flex-direction: column;
    }

    /* Reviews section */
    .review-card {
        flex: 0 0 100%;
        min-width: 0;
    }

    .navigation-wrapper {
        position: relative;
        right: auto;
        margin-top: 20px;
    }

    .reviews-title {
        display: inline-block;
        margin: 0;
        position: relative;
        padding-top: 35px;
        /* Add space for the icon */
    }

    .reviews-title-svg {
        left: -8px;
        top: -5px;
    }

    .title-decoration {
        bottom: 70px;
        top: -38px;
    }

    .hero-background {
        display: none;
    }
}

/* Small mobile screens */
@media (max-width: 600px) {

    .footer-categories,
    .footer-about,
    .footer-follow {
        padding: 0 0px;
    }

    .carousel-header h1 {
        font-size: 2rem;
    }

    .card-title {
        font-size: 1.2rem;
    }

    .newsletter-container {
        padding: 25px 30px;
    }

    .newsletter-content {
        flex-direction: column;
    }

    .newsletter-title {
        font-size: 32px;
    }

    .newsletter-button {
        margin-top: 20px;
    }

    /* Footer section for small screens */
    .footer-content {
        flex-direction: column;
    }

    .footer-intro,
    .footer-categories,
    .footer-about,
    .footer-follow {
        width: 100%;
        padding-right: 0;
    }
}

/* New responsive styles for course section */
@media (max-width: 767px) {
    .carousel-slide {
        display: grid;
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .card {
        max-width: 100%;
        margin: 0 auto;
    }

    .courses-background {
        top: 22rem;
        /* Adjust background position for mobile */
        height: 60%;
    }

    .card-buttons {
        flex-direction: column;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .carousel-slide {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .courses-background {
        top: 26rem;
        height: 50%;
    }
}

@media (min-width: 992px) {
    .carousel-slide {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

/* =========================================
END OF STYLES
========================================= */