/* ================= GLOBAL HEADINGS ================= */
h2, h3 {
    color: var(--site-main-color, #1D4E89);
}

/* ================= HERO SLIDER ================= */
#heroSlider {
    position: relative;
    height: max-content;
    overflow: visible;
}

#heroSlider .carousel-item {
    height: 100%;
    position: relative;
    border: 0px !important;
}

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

/* TEXT ANIMATION */
.animate-text {
    opacity: 0;
    transform: translateX(-80px);
    animation: slideInLeft 1s ease-out forwards;
}

.animate-text.delay-1 {
    animation-delay: 0.4s;
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* BUTTON STYLE */
.h-btn-expert, .btn-expert {
    color: #fff;
    background-color: var(--site-main-color, #1f3c88);
    padding: 12px 28px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    transition: all 0.3s;
}

.h-btn-expert:hover, .btn-expert:hover {
    background-color: var(--site-main-color-dark, #1e0a49);
    color: #fff;
}

.btn-expert:disabled, .btn-expert[disabled] {
    background-color: var(--site-main-color, #1f3c88);
    color: #fff;
    opacity: 0.75;
}

/* STATS OVERLAY */
.stats-wrapper {
    position: relative;
    margin-top: -5%;
    width: 100%;
    z-index: 20;
    height: auto;
}

.stats-wrapper .stat-box {
    background: var(--site-main-color-lighter, #eaf3ff);
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    height: 100%;
    transition: transform 0.3s ease;
}

.stats-wrapper .stat-box:hover {
    transform: translateY(-6px);
}

.stats-wrapper .stat-icon {
    font-size: 32px;
    color: var(--site-main-color-dark, #1e0a49);
    margin-bottom: 10px;
}

.stats-wrapper .stat-number {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 3px;
}

.stats-wrapper p {
    font-size: 14px;
    margin: 0;
    color: #555;
}

/* CONTROLS */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: invert(1);
}

/* Modal styling */
.modal-header {
    border-bottom: none;
}

.modal-title {
    font-weight: 600;
}

.form-control {
    padding: 10px 12px;
}

/* READ MORE LINK */
.read-more-link {
    display: inline-block;
    color: var(--site-main-color, #1f3c88);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    margin-top: 10px;
}

.read-more-link:hover {
    color: var(--site-main-color-dark, #1e0a49);
    text-decoration: underline;
    transform: translateX(3px);
}

/* TITLE LINE ELEMENT */
.title-line-wrapper {
    position: relative;
    width: 50%;
    margin: 10px auto 0;
    height: 20px;
}

.title-line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--site-main-color, #1f3c88);
    transform: translateY(-50%);
}

.title-dot {
    position: absolute;
    top: 37%;
    left: 50%;
    width: 10px;
    height: 10px;
    background-color: var(--site-main-color, #1f3c88);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* DOWNLOAD APP SECTION */
.download-app-section {
    background: #fff;
}

.download-img-box {
    height: 100%;
    overflow: hidden;
    border-radius: 12px;
}

.app-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.store-btn {
    height: 55px;
    transition: transform 0.2s ease;
}

.store-btn:hover {
    transform: scale(1.05);
}

/* ================= SCHOOL CAROUSEL ================= */
.school-carousel-wrapper {
    cursor: grab;
    touch-action: pan-y;
    overflow: hidden;
    position: relative;
    width: 100%;
    max-width: 100%;
}

.school-carousel {
    display: flex;
    gap: 20px;
    transition: transform 0.5s ease-in-out;
    user-select: none;
    width: fit-content;
}

.school-carousel.grabbing {
    cursor: grabbing;
}

/* DESKTOP: Show 5 items */
.school-item {
    flex: 0 0 auto;
    width: calc((100% - 80px) / 5); /* 5 items with 20px gap */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 10px;
    border-radius: 6px;
    background: #fff;
    transition: transform 0.3s ease;
}

/* Calculate proper width for desktop */
@media (min-width: 992px) {
    .school-carousel-wrapper {
        max-width: 1200px;
        margin: 0 auto;
    }
    
    .school-item {
        width: 200px; /* Fixed width for desktop */
        min-width: 200px;
    }
}

.school-item:hover {
    transform: scale(1.05);
}

.school-img img {
    pointer-events: none;
    border-radius: 50%;
    object-fit: cover;
}

/* ================= RESPONSIVE ================= */

/* Mobile and Tablet: Show 1 item at a time - FULL WIDTH */
@media (max-width: 991px) {
    .school-carousel-wrapper {
        width: 100%;
        max-width: 100%;
        padding: 0 15px;
        margin: 0;
    }
    
    .school-item {
        width: calc(100vw - 60px); /* Full viewport width minus padding */
        min-width: calc(100vw - 60px);
        max-width: calc(100vw - 60px);
        flex: 0 0 auto;
        margin: 0;
    }
    
    .school-carousel {
        gap: 30px;
    }
    
    .school-item .school-img img {
        width: 80px !important;
        height: 80px !important;
    }
}


.advertise-modal .modal-content {
    border-radius: 16px;
    overflow: visible; /* allow close button to not be clipped */
    border: none;
}

/* Clip the image to rounded corners on the body instead */
.advertise-modal .modal-body {
    border-radius: 16px;
    overflow: hidden;
    padding: 0;
}

.advertise-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Top-right close button */
.advertise-close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    padding: 8px;
}

.advertise-modal .modal-dialog {
    max-width: min(600px, calc(100vw - 1rem));
    width: 100%;
}

.advertise-modal-content {
    width: 60%;
    margin: auto;
    max-width: 100%;
}

/* ================= REVIEW CAROUSEL ================= */
.review-carousel-wrapper {
    cursor: grab;
    touch-action: pan-y;
    overflow: hidden;
}

.review-carousel {
    display: flex;
    gap: 20px;
    transition: transform 0.5s ease-in-out;
    user-select: none;
}

.review-carousel.grabbing {
    cursor: grabbing;
}

.review-item {
    flex: 0 0 45%;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    opacity: 0;
    transform: translateX(50px);
    animation: slideInLeft 0.7s forwards;
}

.review-item:nth-child(1) { animation-delay: 0.2s; }
.review-item:nth-child(2) { animation-delay: 0.4s; }
.review-item:nth-child(3) { animation-delay: 0.6s; }
.review-item:nth-child(4) { animation-delay: 0.8s; }

.review-img img {
    object-fit: cover;
}

/* Media Queries */
@media(max-width:991px){
    .review-item  { flex: 0 0 100%; }
    .review-carousel { gap: 0; }
    .hero-img {
        height: 50vh;
    }
}

@media(max-width:576px){
    .hero-img {
        height: 30vh;
    }
}
/* ================= MEDIA QUERIES ================= */

/* Large tablets */
@media (max-width: 992px) {
    .h-btn-expert {
        padding: 10px 20px;
        font-size: 14px;
    }
    .stats-wrapper {
        margin-top: -15%;
    }
    .school-item {
        flex: 0 0 40%;
    }

    .advertise-modal-content {
        width: 90%;
    }
}

/* Mobile tablets */
@media (max-width: 768px) {
    .h-btn-expert {
        padding: 8px 18px;
        font-size: 13px;
    }
    .stats-wrapper .stat-box {
        padding: 12px 8px;
    }
    .stats-wrapper .stat-number {
        font-size: 18px;
    }
    .stats-wrapper p {
        font-size: 12px;
    }

    .advertise-modal-content {
        width: 95%;
    }

    .hero-img {
        height: 35vh;
    }

    .school-item {
        flex: 0 0 70%;
    }
}

/* Small mobile */
@media (max-width: 576px) {
    .h-btn-expert {
        padding: 6px 16px;
        font-size: 12px;
    }
    .stats-wrapper .stat-number {
        font-size: 16px;
    }
    .stats-wrapper .stat-box {
        padding: 10px 6px;
    }
    .stats-wrapper p {
        font-size: 11px;
    }
    .school-item {
        flex: 0 0 100%;
        margin: 0 auto;
    }
    .school-carousel {
        gap: 12px;
    }

    .advertise-modal-content {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .school-item {
        flex: 0 0 100%;
    }
}
