* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.custom-navbar {
    width: 100%;
    padding: 15px 60px;
    background-color: white;
}

.custom-navbar .container-fluid {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.logo img, .logo svg {
    width: 50px;
    height: 50px;
}

.logo span {
    font-size: 33px;
    font-weight: 900;
    font-family: 'Dancing Script', cursive;
    background: linear-gradient(
        90deg,
        #27ae60 0%,
        #f39c12 50%,
        #e67e22 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.custom-navbar .nav-link {
    color: black;
    font-size: 18px;
    margin-left: 15px;
    font-weight: 500;
}

.custom-navbar .nav-link:hover {
    color: #e74c3c;
}

.navbar-toggler {
    border: none;
    font-size: 25px;
    padding: 8px;
    color: #0d3b3e;
    background: transparent;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.classes-section {
    background-color: #ffffff;
}

.classes-heading {
    font-family: 'Dancing Script', cursive;
    font-size: 3rem;
    font-weight: 700;
    color: #0d3b3e;
    margin-bottom: 1rem;
}

.classes-subtext {
    max-width: 650px;
    color: #6c757d;
    font-size: 1rem;
    line-height: 1.7;
}

/* Card: padding-top badhaya taaki image title/text ke upar overlap na kare.
   Image height 220px hai aur -60px se start hoti hai, isliye image ka
   bottom edge card ke andar ~160px tak jata hai. Isliye padding-top
   kam se kam 180px rakha hai (thoda extra breathing space ke saath). */
.class-card {
    background-color: #fdeceb;
    overflow: visible;
    position: relative;
    padding-top: 180px;
    padding-left: 20px;
    padding-right: 20px;
    margin-top: 60px;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.class-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.class-img-wrap {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    height: 220px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.class-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.class-body {
    padding: 0 10px 30px;
    text-align: center;
}

.class-title {
    font-family: 'Dancing Script', cursive;
    font-size: 1.9rem;
    color: #0d3b3e;
    margin-bottom: 20px;
}

.teacher-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    text-align: left;
}

.teacher-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    flex-shrink: 0;
}

.teacher-name {
    font-weight: 700;
    color: #e08a2b;
    margin: 0;
    font-size: 0.95rem;
}

.teacher-role {
    margin: 0;
    color: #6c757d;
    font-size: 0.85rem;
}

.class-stats {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
}

.stat {
    flex: 1;
    padding-top: 10px;
    border-top: 3px solid;
}

.stat-age {
    border-top-color: #e2604f;
}

.stat-time {
    border-top-color: #1e7a4d;
}

.stat-capacity {
    border-top-color: #e0a72b;
}

.stat-label {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 4px;
    white-space: nowrap;
}

.stat-age .stat-label { color: #e2604f; }
.stat-time .stat-label { color: #1e7a4d; }
.stat-capacity .stat-label { color: #e0a72b; }

.stat-value {
    display: block;
    color: #333;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Row ke cards ke beech vertical gap thoda aur badha diya taaki
   agli row ka image upar wali row ke card se na takraye. */
.classes-section .row {
    row-gap: 40px;
}

@media (max-width: 767px) {
    .classes-heading {
        font-size: 2.2rem;
    }

    .class-img-wrap {
        height: 180px;
    }

    .class-card {
        margin-top: 70px;
        padding-top: 140px;
    }

    .class-stats {
        flex-wrap: wrap;
    }

    .stat {
        flex: 1 1 45%;
        margin-bottom: 10px;
    }

    .stat-label,
    .stat-value {
        white-space: normal;
    }
}