/* Make card flex column and full height */
.course-item {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Stretch main content so footer stays at bottom */
.course-item > .text-center {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Highlight boxes uniform height and style */
.highlight-box {
    min-height: 50px;
    /* ensures consistent height */
    display: flex;
    align-items: flex-start;
    background-color: rgb(240, 251, 252);
    border-left: 4px solid var(--secondary);
    border-radius: 5px !important;
    padding: 8px 12px;
    transition: all 0.3s ease;
}

/* Hover effect for highlight box */
.highlight-box:hover {
    background-color: rgb(220, 245, 246);
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Highlight text style */
.highlight-text {
    text-align: justify;
    line-height: 1.4;
    color: #045d57;
    font-weight: 500;

    display: -webkit-box;
    /* required for line-clamp */
    -webkit-line-clamp: 2;
    /* number of lines to show */
    -webkit-box-orient: vertical;
    /* required for line-clamp */
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Star icon in headings (optional) */
.highlight-heading i.fa-star {
    color: var(--primary);
    font-size: 1.1rem;
    vertical-align: middle;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.testimonial-center-layout {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 2rem;
    flex-wrap: wrap;
    position: relative;
}

/* Side cards */
.home-testimonial-card.side-card {
    flex: 0 0 25%;
    transform: scale(0.85);
    opacity: 0.7;
    transition: all 0.3s ease;
}

/* Center card */
.home-testimonial-card.center-card {
    flex: 0 0 40%;
    transform: scale(1);
    opacity: 1;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

/* Common card styling */
.home-testimonial-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    text-align: center;
}

/* Quote marks */
.home-testimonial-card .quote-mark {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
    display: inline-block;
}

/* Review text */
.home-testimonial-card p {
    font-style: italic;
    color: #555;
    margin-bottom: 1rem;
}

/* Hover effect for side cards */
.home-testimonial-card.side-card:hover {
    transform: scale(0.95);
    opacity: 1;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

/* Stars */
.text-warning i {
    margin-right: 2px;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .testimonial-center-layout {
        flex-direction: column;
        align-items: center;
    }

    .home-testimonial-card.side-card,
    .home-testimonial-card.center-card {
        flex: 0 0 80%;
        transform: scale(1);
        opacity: 1;
    }
}

/* tutors css */

/* ── Layout ── */
.carousel-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 32px;
}

.carousel-left {
    flex: 0 0 35%;
    max-width: 35%;
}

.big-title {
    font-size: 80px;
    font-weight: 700;
    line-height: 0.95;
    color: #1a1a2e;
    margin: 0 0 20px;
}

.big-title em {
    font-style: italic;
    color: #c8e6f0;
    -webkit-text-stroke: 1.5px var(--primary);
}

.sub-text {
    font-size: 15px;
    color: #6b7280;
    line-height: 1.7;
    margin-top: 16px;
}

.carousel-right {
    flex: 0 0 55%;
    max-width: 55%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Stack Container ── */
.stack-container {
    position: relative;
    width: 100%;
    height: 400px;
}

.tutor-card {
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.tutor-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Arrow anchor button ── */
.tutor-card .arrow-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(100, 221, 98, 0.4);
    text-decoration: none;
    transition:
        transform 0.2s,
        background 0.2s;
    z-index: 10;
}

.tutor-card .arrow-btn:hover {
    background: var(--secondary);
    transform: scale(1.1);
    color: #fff;
    text-decoration: none;
}

/* ── Stack Positions ── */
.tutor-card.pos-0 {
    transform: translateX(0) scale(1);
    z-index: 4;
    opacity: 1;
    width: 300px;
    height: 380px;
    top: 0;
}

.tutor-card.pos-1 {
    transform: translateX(230px) scale(0.88);
    z-index: 3;
    opacity: 0.85;
    width: 260px;
    height: 330px;
    top: 25px;
}

.tutor-card.pos-2 {
    transform: translateX(420px) scale(0.76);
    z-index: 2;
    opacity: 0.65;
    width: 240px;
    height: 295px;
    top: 42px;
}

.tutor-card.pos-3 {
    transform: translateX(575px) scale(0.64);
    z-index: 1;
    opacity: 0.4;
    width: 220px;
    height: 265px;
    top: 57px;
}

.tutor-card.pos-hidden {
    transform: translateX(680px) scale(0.5);
    z-index: 0;
    opacity: 0;
    pointer-events: none;
}

/* ── Info ── */
.tutor-name {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 10px;
}

.tag {
    font-size: 12px;
    padding: 4px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--primary);
    color: var(--primary);
    background: rgba(7, 155, 209, 0.06);
    font-weight: 500;
}

/* ── Nav ── */
.nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-size: 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: var(--primary);
    color: #fff;
}

/* ── Prevent horizontal overflow ── */
.tutor-section {
    overflow-x: hidden;
}

.carousel-right {
    overflow: hidden;
}

.stack-container {
    overflow: hidden;
}

/* ══════════════════════════════════
                       RESPONSIVE
                    ══════════════════════════════════ */

/* Large tablets */
@media (max-width: 1200px) {
    .big-title {
        font-size: 68px;
    }

    .stack-container {
        height: 360px;
    }

    .tutor-card.pos-0 {
        width: 260px;
        height: 330px;
        top: 0;
        transform: translateX(0) scale(1);
    }

    .tutor-card.pos-1 {
        width: 230px;
        height: 290px;
        top: 25px;
        transform: translateX(195px) scale(0.88);
    }

    .tutor-card.pos-2 {
        width: 210px;
        height: 258px;
        top: 38px;
        transform: translateX(360px) scale(0.76);
    }

    .tutor-card.pos-3 {
        width: 190px;
        height: 230px;
        top: 50px;
        transform: translateX(490px) scale(0.64);
    }
}

/* Tablets — switch to vertical stacked layout */
@media (max-width: 992px) {
    .carousel-wrapper {
        flex-direction: column;
        gap: 40px;
    }

    .carousel-left,
    .carousel-right {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
    }

    .carousel-left {
        text-align: center;
    }

    .sub-text {
        margin: 16px auto 0;
    }

    .big-title {
        font-size: 64px;
    }

    .stack-container {
        height: 340px;
    }

    .tutor-card.pos-0 {
        width: 240px;
        height: 310px;
        top: 0;
        transform: translateX(0) scale(1);
    }

    .tutor-card.pos-1 {
        width: 212px;
        height: 272px;
        top: 18px;
        transform: translateX(180px) scale(0.88);
    }

    .tutor-card.pos-2 {
        width: 194px;
        height: 236px;
        top: 33px;
        transform: translateX(330px) scale(0.76);
    }

    .tutor-card.pos-3 {
        width: 174px;
        height: 210px;
        top: 46px;
        transform: translateX(450px) scale(0.64);
    }
}

/* Large phones */
@media (max-width: 768px) {
    .big-title {
        font-size: 52px;
    }

    .stack-container {
        height: 300px;
    }

    .tutor-card.pos-0 {
        width: 200px;
        height: 265px;
        top: 0;
        transform: translateX(0) scale(1);
    }

    .tutor-card.pos-1 {
        width: 176px;
        height: 233px;
        top: 16px;
        transform: translateX(150px) scale(0.88);
    }

    .tutor-card.pos-2 {
        width: 160px;
        height: 200px;
        top: 30px;
        transform: translateX(275px) scale(0.76);
    }

    .tutor-card.pos-3 {
        width: 144px;
        height: 180px;
        top: 40px;
        transform: translateX(375px) scale(0.64);
    }
}

/* Small phones */
@media (max-width: 576px) {
    .big-title {
        font-size: 44px;
    }

    .stack-container {
        height: 270px;
    }

    /* Only show 2 cards on very small screens to prevent overflow */
    .tutor-card.pos-0 {
        width: 170px;
        height: 230px;
        top: 0;
        transform: translateX(0) scale(1);
    }

    .tutor-card.pos-1 {
        width: 150px;
        height: 202px;
        top: 14px;
        transform: translateX(128px) scale(0.88);
    }

    .tutor-card.pos-2 {
        width: 136px;
        height: 175px;
        top: 26px;
        transform: translateX(235px) scale(0.76);
        opacity: 0.4;
    }

    .tutor-card.pos-3 {
        transform: translateX(999px) scale(0.5);
        opacity: 0;
        pointer-events: none;
    }
}

/* Extra small phones */
@media (max-width: 400px) {
    .big-title {
        font-size: 38px;
    }

    .stack-container {
        height: 250px;
    }

    .tutor-card.pos-0 {
        width: 150px;
        height: 205px;
        top: 0;
        transform: translateX(0) scale(1);
    }

    .tutor-card.pos-1 {
        width: 132px;
        height: 180px;
        top: 12px;
        transform: translateX(112px) scale(0.88);
    }

    .tutor-card.pos-2 {
        width: 120px;
        height: 156px;
        top: 23px;
        transform: translateX(206px) scale(0.76);
        opacity: 0.35;
    }

    .tutor-card.pos-3 {
        transform: translateX(999px) scale(0.5);
        opacity: 0;
        pointer-events: none;
    }
}
/* FAQ Tabs */
.faq-tab {
    padding: 7px 20px; border-radius: 100px;
    border: 1.5px solid #ddd; background: #fff;
    font-size: 14px; font-weight: 500; color: #555;
    cursor: pointer; transition: all .2s;
}
.faq-tab.active { background: var(--dark); border-color: var(--dark); color: #fff; }
.faq-tab:hover:not(.active) { border-color: var(--primary); color: var(--primary); }

/* FAQ Accordion */
.faq-list { display: flex; flex-direction: column; gap: 10px; }

.faq-item {
    border: 1.5px solid #e5e7eb;
    border-radius: 12px; overflow: hidden;
    transition: border-color .25s, box-shadow .25s;
}
.faq-item:hover { border-color: #b3cde8; }
.faq-item.open { border-color: var(--primary); box-shadow: 0 2px 18px rgba(33,102,178,.09); }

.faq-question {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 20px; cursor: pointer;
    background: #fff; user-select: none; transition: background .2s;
}
.faq-item.open .faq-question { background: #f4f8fd; }

.faq-icon-wrap {
    width: 38px; height: 38px; border-radius: 8px;
    border: 1.5px solid #e5e7eb; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; background: var(--light);
    transition: background .2s, border-color .2s;
}
.faq-item.open .faq-icon-wrap { background: var(--primary); border-color: var(--primary); }

.faq-q-text { flex: 1; font-size: 15px; font-weight: 600; color: var(--dark); }

.faq-chevron {
    width: 20px; height: 20px; flex-shrink: 0;
    color: #aaa; transition: transform .28s, color .2s;
}
.faq-item.open .faq-chevron { transform: rotate(180deg); color: var(--primary); }

/* Smooth slide using CSS grid trick */
.faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .3s ease;
}
.faq-item.open .faq-answer { grid-template-rows: 1fr; }
.faq-answer-inner { overflow: hidden; padding: 0 20px 0 74px; }
.faq-item.open .faq-answer-inner { padding-bottom: 18px; }
.faq-answer-inner p { color: #555; font-size: 14.5px; line-height: 1.75; margin: 0; }