﻿/* ===== Page sections ===== */
.instructors-header,
.instructors-grid {
    background: #0a0a0a;
}

    /* Header */
    .instructors-header h2 {
        font-weight: 700;
    }

    .instructors-header p {
        color: rgba(255,255,255,.65) !important;
    }

/* ===== Instructor Card (9:16) ===== */
.instr-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    max-height:99%;
    background: #111;
    box-shadow: 0 8px 20px rgba(0,0,0,.35);
    aspect-ratio: 9 / 16; /* proporzione verticale */
    width: 100%;
    transform: translateZ(0);
}



/* fallback per browser senza aspect-ratio */
@supports not (aspect-ratio: 9/16) {
    .instr-card::before {
        content: "";
        display: block;
        padding-top: calc(100% * 16 / 9);
    }
}

/* ===== Background e Overlay ===== */
.instr-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1);
    transition: transform .45s ease, filter .3s ease;
    filter: saturate(1) contrast(1);
}

.instr-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient( to bottom, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.35) 50%, rgba(0,0,0,0.9) 100% );
    pointer-events: none;
}

/* ===== Contenuto: centrato orizzontalmente, in basso verticalmente ===== */
.instr-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    color: #fff;
    text-align: center;
    padding: 1.25rem 0.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

/* Nome */
.instr-name .first {
    display: block;
    font-size: 16px;
    letter-spacing: .2px;
    opacity: .9;
}

.instr-name .last {
    margin: 4px 0 12px 0;
    font-size: 34px;
    line-height: 1.1;
    font-weight: 800;
}

/* Tags */
.instr-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

    .instr-tags span {
        display: inline-block;
        font-size: 12px;
        padding: 4px 8px;
        border-radius: 6px;
        background: rgba(255,255,255,.08);
        color: #eaeaea;
        border: 1px solid rgba(255,255,255,.12);
    }

/* ===== Hover effect ===== */
.instr-card:hover .instr-bg,
.instr-card:focus-within .instr-bg {
    transform: scale(1.07);
    filter: saturate(1.05) contrast(1.05);
}

/* ===== Reveal animation (da instructors.js) ===== */
.js-instr-card {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .35s ease, transform .35s ease;
}

    .js-instr-card.is-visible {
        opacity: 1;
        transform: translateY(0);
    }

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
    .instr-name .last {
        font-size: 28px;
    }
}

@media (max-width: 575.98px) {
    .instr-name .last {
        font-size: 26px;
    }
}
