/* =========================
   INSTRUCTORS SECTION
========================= */

.instructors-section {

    width: 100%;

    padding: 120px 80px;

    background: #000000;

    box-sizing: border-box;
}


/* =========================
   TOP AREA
========================= */

.instructors-top {

    width: 100%;

    max-width: 1600px;

    margin: 0 auto 60px auto;

    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    gap: 30px;

    flex-wrap: wrap;
}


/* SUBTEXT */

.instructors-heading p {

    color: rgba(255,255,255,0.75);
    font-size: 17px;
    line-height: 1.7;
    max-width: 650px;
    margin: 20px 0 0 0;

    will-change: transform, opacity;
}


/* TITLE */

.instructors-heading h2 {

    color: #ffffff;

    font-size: 68px;

    line-height: 0.95;

    margin: 0;

    font-weight: 900;

    text-transform: uppercase;

    letter-spacing: -2px;

    will-change: transform, opacity;
}


/* BUTTON */


.instructors-btn {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    padding: 18px 42px;

    background: #ffffff;

    color: #000000;

    text-decoration: none;

    font-size: 16px;
    
    font-weight: 600;

    border-radius: 999px;

    border: none;

    min-width: 160px;

    /* Calm, buttery smooth interactions */
    transition: background 0.3s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;

    will-change: transform, opacity;
}

.instructors-btn:hover {

    background: #f3f3f3;

    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 30px rgba(255, 255, 255, 0.15);
}

.instructors-btn:active {
    transform: translateY(-1px) scale(0.98);
}


/* =========================
   GRID
========================= */

.instructors-grid {

    width: 100%;

    max-width: 1600px;

    margin: 0 auto;

    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 28px;
}


/* =========================
   CARD
========================= */

.instructor-card {

    position: relative;

    display: block;

    text-decoration: none;

    width: 100%;

    height: 560px;

    overflow: hidden;

    background: #111111;

    border-radius: 12px;

    /* Premium shadow */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    will-change: transform, opacity, box-shadow;
}


/* IMAGE */

.instructor-card img {

    width: 100%;

    height: 100%;

    object-fit: cover;

    object-position: center top;

    background: #111111;

    /* Buttery smooth image zooming on card hover */
    transition: transform 1.6s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}


/* IMAGE HOVER */

.instructor-card:hover img {

    transform: scale(1.05);
}


/* =========================
   OVERLAY
========================= */

.instructor-overlay {

    position: absolute;

    inset: 0;

    background: linear-gradient(
        to top,
        rgba(0,0,0,0.92) 8%,
        rgba(0,0,0,0.2) 55%,
        rgba(0,0,0,0.02) 100%
    );

    display: flex;

    align-items: flex-end;

    padding: 34px;

    box-sizing: border-box;

    opacity: 0;

    /* Beautiful ease curve for overlay */
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}


.instructor-card:hover .instructor-overlay {

    opacity: 1;
}


/* TEXT ANIMATION */

.overlay-content {

    transform: translateY(25px);

    /* Beautiful ease curve for text overlay */
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}


.instructor-card:hover .overlay-content {

    transform: translateY(0);
}


/* =========================
   SCROLL REVEAL TRIGGERS
========================= */

/* Default State (Hidden until scrolled) */
.instructors-section.reveal-on-scroll .instructors-heading h2,
.instructors-section.reveal-on-scroll .instructors-heading p,
.instructors-section.reveal-on-scroll .instructors-btn,
.instructors-section.reveal-on-scroll .instructor-card {
    opacity: 0;
}

/* Revealed State (Triggered on Scroll) */
.instructors-section.reveal-on-scroll.is-visible .instructors-heading h2 {
    animation: instructors-fade-in-up 1.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.2s;
}

.instructors-section.reveal-on-scroll.is-visible .instructors-heading p {
    animation: instructors-fade-in-up 1.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.4s;
}

.instructors-section.reveal-on-scroll.is-visible .instructors-btn {
    animation: instructors-fade-in-up 1.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.5s;
}

/* Staggered entry for the two cards */
.instructors-section.reveal-on-scroll.is-visible .instructor-card:nth-of-type(1) {
    animation: instructors-card-pop 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.3s;
}

.instructors-section.reveal-on-scroll.is-visible .instructor-card:nth-of-type(2) {
    animation: instructors-card-pop 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.5s;
}


/* =========================
   KEYFRAME ANIMATIONS
   (Calm & Premium Eases)
========================= */

@keyframes instructors-fade-in-up {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes instructors-card-pop {
    0% {
        opacity: 0;
        transform: scale(0.96) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}


/* NAME */

.overlay-content h3 {

    color: #ffffff;

    font-size: 34px;

    margin: 0 0 12px 0;

    font-weight: 800;

    text-transform: uppercase;

    letter-spacing: -1px;
}


/* DESCRIPTION */

.overlay-content p {

    color: rgba(255,255,255,0.75);

    font-size: 15px;

    line-height: 1.7;

    margin: 0;

    max-width: 380px;
}


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

@media (max-width: 1100px) {

    .instructors-heading h2 {

        font-size: 56px;
    }

    .instructor-card {

        height: 500px;
    }
}


@media (max-width: 900px) {

    .instructors-section {

        padding: 100px 40px;
    }

    .instructors-grid {

        grid-template-columns: 1fr;
        gap: 40px;
    }

    .instructor-card {

        width: 80%;
        margin: 0 auto;
        height: auto;
        aspect-ratio: 4 / 5;
        overflow: visible;
        background: transparent;
    }

    .instructor-card img {
        border-radius: 12px;
        object-fit: cover;
    }

    .instructor-overlay {
        position: static;
        opacity: 1;
        padding: 15px 0 0 0;
        background: transparent;
    }

    .overlay-content {
        transform: none !important;
    }

    .overlay-content h3 {
        font-size: 22px;
        margin-bottom: 5px;
        color: #fff;
    }

    .overlay-content p {
        font-size: 14px;
        line-height: 1.4;
        color: rgba(255,255,255,0.7);
    }
}


@media (max-width: 600px) {

    .instructors-section {

        padding: 50px 24px;
    }

    .instructors-grid {

        grid-template-columns: 1fr;
        gap: 30px;
    }

    .instructors-heading h2 {

        font-size: 32px;

        line-height: 1;

        letter-spacing: -2px;
    }

    .instructors-heading p {

        font-size: 15px;
    }

    .instructor-card {

        width: 85%;
        margin: 0 auto;
        height: auto;
        aspect-ratio: 4 / 5;
        overflow: visible;
        background: transparent;
    }

    .instructor-card img {

        object-fit: cover;
        object-position: right center;
        border-radius: 12px;
    }

    .instructor-overlay {
        position: static;
        opacity: 1;
        padding: 15px 0 0 0;
        background: transparent;
    }

    .overlay-content h3 {

        font-size: 18px;
        margin-bottom: 5px;
        color: #fff;
    }

    .overlay-content p {

        font-size: 13px;
        line-height: 1.4;
        color: rgba(255,255,255,0.7);
    }

    .overlay-content {
        transform: none !important;
    }

    .overlay-content h3 {

        font-size: 18px;
        margin-bottom: 5px;
        color: #fff;
    }

    .overlay-content p {

        font-size: 13px;
        line-height: 1.4;
        color: rgba(255,255,255,0.7);
    }

    .instructors-btn {

        width: 100%;

        padding: 12px 24px;

        font-size: 14px;

        min-width: unset;
    }
}