/* HERO SECTION */
.crew-hero {
    position: relative;

    /* THIS is the correct height */
    height: calc(100vh - 70px);

    /* EVEN spacing all sides */
    margin: 0px;

    border-radius: 30px;
    overflow: hidden;
}
/* IMAGE */
.crew-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;

    /* THIS fixes vertical composition slightly */
    object-position: center 40%;
}

/* TEXT - CENTER BOTTOM */
.crew-overlay {
    position: absolute;
    bottom: 40px; /* was too low before */
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
}

/* TITLE */
.crew-overlay h1 {
    font-size: 48px;
    margin-bottom: 10px;
}

/* TEXT */
.crew-overlay p {
    font-size: 16px;
    opacity: 0.9;
}

/* GRID LAYOUT */
.crew-grid {
    padding: 10px;
    padding-top: 30px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* CARD */
.crew-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    width: 275px;
    height: 450px;
}

.crew-card:hover {
    transform: translateY(-5px);
    transition: 0.3s;
}
/* IMAGE */
.crew-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;

    /* DEFAULT BLACK & WHITE */
    filter: grayscale(100%);
    transition: all 0.4s ease;
}

/* HOVER → COLOR */
.crew-card:hover img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* DARK GRADIENT FOR TEXT VISIBILITY */
.crew-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.85) 0%,
        rgba(0,0,0,0.6) 30%,
        rgba(0,0,0,0.2) 60%,
        rgba(0,0,0,0) 100%
    );
    transition: 0.3s ease;
}
.crew-card:hover::after {
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.9),
        rgba(0,0,0,0.4),
        rgba(0,0,0,0)
    );
}
/* TEXT CONTAINER */
.crew-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    color: #fff;
    z-index: 2; /* ensure above overlay */
}

/* NAME */
.crew-info h3 {
    font-size: 15px;
    letter-spacing: 1.2px;
    margin-bottom: 4px;
    font-weight: 500;

    /* TEXT SHADOW = clarity on ANY image */
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

/* ROLE */
.crew-info p {
    font-size: 12px;
    opacity: 0.9;

    text-shadow: 0 2px 6px rgba(0,0,0,0.7);
}
/* ================= RESPONSIVE CREW ================= */

/* ===== TABLET (≤1024px) ===== */
@media (max-width: 1024px) {

    /* HERO */
    .crew-hero {
        height: 60vh;
        border-radius: 20px;
    }

    .crew-overlay h1 {
        font-size: 32px;
    }

    .crew-overlay p {
        font-size: 14px;
    }

    /* GRID */
    .crew-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
        padding: 20px;
    }

    /* CARD FIX */
    .crew-card {
        width: 100%;
        height: auto;
        aspect-ratio: 3 / 5;
    }
}


/* ===== MOBILE (≤768px) ===== */
@media (max-width: 768px) {

    /* HERO */
    .crew-hero {
        height: 50vh;
        border-radius: 16px;
    }

    .crew-overlay {
        bottom: 20px;
        padding: 0 10px;
    }

    .crew-overlay h1 {
        font-size: 24px;
    }

    .crew-overlay p {
        font-size: 13px;
    }

    /* GRID */
    .crew-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
        padding: 16px;
    }

    /* CARD */
    .crew-card {
        aspect-ratio: 3 / 5;
        border-radius: 14px;
    }

    .crew-info {
        bottom: 14px;
        left: 14px;
        right: 14px;
    }

    .crew-info h3 {
        font-size: 13px;
    }

    .crew-info p {
        font-size: 11px;
    }
}


/* ===== SMALL MOBILE (≤480px) ===== */
@media (max-width: 480px) {

    /* ===== HERO ===== */
    .crew-hero {
        height: auto;
        border-radius: 0;
        overflow: hidden;
    }

    .crew-hero img {
        width: 100%;
        display: block;
    }

    /* 🔥 FIX: SAME WIDTH AS IMAGE */
    .crew-overlay {
        width: 100%;              /* 🔥 match image exactly */
        padding: 10px 8px 0;      /* minimal breathing */
        position: relative !important ;
        display: flex;
        flex-direction: column;
        align-items: center;      /* 🔥 real centering */
        margin-top: 20px;         /* 🔥 space from image */
        text-align: center;
    }

    .crew-overlay h1 {
        font-size: 18px;
        margin-bottom: 4px;
        color: black;
    }

    .crew-overlay p {
        font-size: 14px;
        opacity: 1;
        color: black;

        max-width: 240px;   /* 🔥 controlled readable width */
    }

    /* ===== GRID ===== */
    .crew-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 10px 6px;
    }

    /* ===== CARD ===== */
    .crew-card {
        aspect-ratio: 3 / 4;
        border-radius: 10px;
        overflow: hidden;
    }

    .crew-card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* ===== TEXT ===== */
    .crew-info {
        padding: 6px 2px 0;
        text-align: center;   /* 🔥 also fix this */
    }

    .crew-info h3 {
        font-size: 12px;
    }

    .crew-info p {
        font-size: 10px;
        opacity: 0.7;
    }

}