/* ===============================
   MOBILE NAV OVERRIDE (FINAL FIX)
   =============================== */

@media (max-width: 768px) {
    /* Force header to stay on top */
    header.site-header {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 9999 !important;
    }
    /* Show hamburger */
    header.site-header .menu-toggle {
        display: block !important;
        z-index: 10000;
    }
    /* FORCE nav hidden state */
    header.site-header nav#navMenu {
        position: fixed !important;
        top: 72px !important;
        left: 0 !important;
        width: 100% !important;
        background: #0e0e0e !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 2rem 0 !important;
        transform: translateY(-120%) !important;
        opacity: 1 !important;
        max-height: none !important;
        overflow: visible !important;
        transition: transform 0.35s ease !important;
    }
    /* FORCE nav open */
    header.site-header nav#navMenu.active {
        transform: translateY(0) !important;
    }
    /* Nav links */
    header.site-header nav#navMenu a {
        padding: 1rem 0 !important;
        font-size: 1rem;
        border-bottom: none !important;
    }
    /* Prevent body scroll when menu open */
    body {
        padding-top: 72px;
    }
}


/* ==================================
   FULL SCREEN MOBILE NAV (OVERRIDE)
   ================================== */

@media (max-width: 768px) {
    /* Header stays on top */
    header.site-header {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 10000 !important;
    }
    /* Hamburger always visible */
    header.site-header .menu-toggle {
        display: block !important;
        z-index: 10001;
    }
    /* FULL SCREEN NAV */
    header.site-header nav#navMenu {
        position: fixed !important;
        inset: 0 !important;
        /* top, right, bottom, left = 0 */
        width: 100vw !important;
        height: 100vh !important;
        background: #0b0b0b !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 2rem !important;
        transform: translateY(-100%) !important;
        transition: transform 0.4s ease !important;
        padding: 0 !important;
    }
    /* OPEN STATE */
    header.site-header nav#navMenu.active {
        transform: translateY(0) !important;
    }
    /* Nav links styling */
    header.site-header nav#navMenu a {
        font-size: 1.2rem !important;
        font-weight: 500;
        letter-spacing: 0.6px;
        padding: 0 !important;
    }
    /* Lock background scroll */
    body {
        overflow-x: hidden;
    }
}


/* ==================================================
   REFERENCE-STYLE FULLSCREEN MOBILE MENU (PREMIUM)
   ================================================== */

@media (max-width: 768px) {
    /* Header stays visible */
    header.site-header {
        position: fixed !important;
        inset: 0 auto auto 0;
        width: 100%;
        z-index: 10000 !important;
        background: rgba(0, 0, 0, 0.85) !important;
        backdrop-filter: blur(10px);
    }
    /* Hamburger / Close icons */
    .menu-toggle {
        position: relative;
        z-index: 10001;
    }
    .menu-toggle .close-icon {
        display: none;
    }
    /* Toggle icon switch */
    nav#navMenu.active~.menu-toggle .menu-icon {
        display: none;
    }
    nav#navMenu.active~.menu-toggle .close-icon {
        display: inline;
    }
    /* Fullscreen menu */
    nav#navMenu {
        position: fixed !important;
        inset: 0 !important;
        height: 100vh !important;
        width: 100vw !important;
        background: linear-gradient( to bottom, #0e0e0e 0%, #000 60%, #0a0a0a 100%) !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 2.5rem !important;
        transform: translateY(-100%) !important;
        transition: transform 0.45s ease !important;
    }
    nav#navMenu.active {
        transform: translateY(0) !important;
    }
    /* Menu items (REFERENCE LOOK) */
    nav#navMenu a {
        font-family: 'Playfair Display', serif;
        font-size: 1.35rem !important;
        font-weight: 600;
        letter-spacing: 1px;
        color: #fff;
        opacity: 0.85;
        transition: all 0.3s ease;
    }
    nav#navMenu a:hover {
        opacity: 1;
        color: #ff3d3d;
    }
    /* Bottom social area */
    nav#navMenu::after {
        content: "Follow for latest updates";
        position: absolute;
        bottom: 70px;
        font-size: 0.75rem;
        opacity: 0.5;
    }
    /* Lock background */
    body {
        overflow-x: hidden;
    }
}


/* =====================================
   NEXT-LEVEL MOBILE MENU ANIMATIONS
   ===================================== */

@media (max-width: 768px) {
    /* ----- ICON ANIMATION ----- */
    .menu-toggle {
        position: relative;
    }
    .menu-toggle .icon {
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
    .menu-toggle .icon-close {
        position: absolute;
        left: 0;
        opacity: 0;
        transform: rotate(-90deg) scale(0.8);
    }
    nav#navMenu.active~.menu-toggle .icon-menu {
        opacity: 0;
        transform: rotate(90deg) scale(0.8);
    }
    nav#navMenu.active~.menu-toggle .icon-close {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
    /* ----- LOGO FADE ----- */
    nav#navMenu.active~.logo {
        opacity: 0.15;
        transition: opacity 0.3s ease;
    }
    /* ----- STAGGERED MENU ITEMS ----- */
    nav#navMenu a {
        opacity: 0;
        transform: translateY(12px);
    }
    nav#navMenu.active a {
        opacity: 1;
        transform: translateY(0);
    }
    nav#navMenu.active a:nth-child(1) {
        transition-delay: 0.08s;
    }
    nav#navMenu.active a:nth-child(2) {
        transition-delay: 0.16s;
    }
    nav#navMenu.active a:nth-child(3) {
        transition-delay: 0.24s;
    }
    nav#navMenu.active a:nth-child(4) {
        transition-delay: 0.32s;
    }
}


/* ===============================
   WHATSAPP FLOATING BUTTON
   (DESKTOP + MOBILE)
   =============================== */

.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background-color: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    z-index: 9999;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}


/* Hover / tap effect */

.whatsapp-float:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 22px rgba(37, 211, 102, 0.6);
}


/* Slightly smaller on very small screens */

@media (max-width: 480px) {
    .whatsapp-float {
        width: 52px;
        height: 52px;
        bottom: 16px;
        right: 16px;
    }
}


/* WhatsApp mobile – slight upward adjustment */

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 32px;
        /* increase this value slightly */
        right: 20px;
        /* keep alignment clean */
    }
}


/* WhatsApp mobile – slight right adjustment */

@media (max-width: 768px) {
    .whatsapp-float {
        right: 17px;
        /* move right a little */
    }
}


/* Cinematic hover */

#films .film-card:hover {
    transform: translateY(-8px) scale(1.01) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.65) !important;
}


/* Clean typography spacing */

#films .film-info {
    padding: 1rem !important;
}

#films .film-info h3 {
    font-size: 1rem !important;
    line-height: 1.4 !important;
}

#films .film-info p {
    font-size: 0.85rem !important;
    line-height: 1.6 !important;
    opacity: 0.75 !important;
}


/* Mobile & tablet responsiveness (override-safe) */

@media (max-width: 768px) {
    #films .films-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.2rem !important;
    }
}

@media (max-width: 480px) {
    #films .films-grid {
        grid-template-columns: 1fr !important;
    }
}


/* ===============================
   FOOTER SOCIAL ICONS – PREMIUM
   =============================== */

.social-links {
    margin-top: 1.4rem;
    display: flex;
    justify-content: center;
    gap: 1.4rem;
}

.social-links a {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.35s ease;
    position: relative;
    overflow: hidden;
}


/* Glow + lift (reference style) */

.social-links a:hover {
    background: #ff5722;
    border-color: #ff5722;
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 10px 25px rgba(255, 87, 34, 0.45);
}


/* Icon smooth zoom */

.social-links a i {
    transition: transform 0.35s ease;
}

.social-links a:hover i {
    transform: scale(1.15);
}


/* Mobile fine-tuning */

@media (max-width: 768px) {
    .social-links a {
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
    }
}


/* =========================================
   MOBILE NAV – SOCIAL ICONS (ONLY MOBILE)
   ========================================= */

.mobile-nav-social {
    display: none;
    /* hidden by default (desktop safe) */
}

@media (max-width: 768px) {
    .mobile-nav-social {
        display: flex;
        gap: 1.4rem;
        margin-top: 3rem;
    }
    .mobile-nav-social a {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.2);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 1rem;
        transition: all 0.35s ease;
    }
    /* Reference-style hover */
    .mobile-nav-social a:hover {
        background: #ff5722;
        border-color: #ff5722;
        transform: translateY(-4px) scale(1.1);
        box-shadow: 0 10px 28px rgba(255, 87, 34, 0.5);
    }
    .mobile-nav-social a i {
        transition: transform 0.35s ease;
    }
    .mobile-nav-social a:hover i {
        transform: scale(1.15);
    }
}


/* =================================================
   MOBILE NAV – SOCIAL (REFERENCE PERFECT)
   ================================================= */

.mobile-nav-social-wrap {
    display: none;
}


/* MOBILE ONLY */

@media (max-width: 768px) {
    .mobile-nav-social-wrap {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-top: 3.5rem;
    }
    /* --- FOLLOW TEXT --- */
    .mobile-social-text {
        font-size: 0.75rem;
        letter-spacing: 0.15em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.55);
        margin-bottom: 1.4rem;
        opacity: 0;
        animation: fadeUp 0.6s ease forwards;
        animation-delay: 0.35s;
    }
    /* --- ICON ROW --- */
    .mobile-nav-social {
        display: flex;
        gap: 1.4rem;
    }
    .mobile-nav-social a {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.18);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 1rem;
        opacity: 0;
        transform: translateY(12px) scale(0.9);
        animation: iconIn 0.45s ease forwards;
    }
    /* STAGGER */
    .mobile-nav-social a:nth-child(1) {
        animation-delay: 0.45s;
    }
    .mobile-nav-social a:nth-child(2) {
        animation-delay: 0.55s;
    }
    .mobile-nav-social a:nth-child(3) {
        animation-delay: 0.65s;
    }
    .mobile-nav-social a:nth-child(4) {
        animation-delay: 0.75s;
    }
    /* DEFAULT HOVER */
    .mobile-nav-social a:hover {
        transform: translateY(-4px) scale(1.08);
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6);
    }
    /* 🔥 REAL INSTAGRAM GRADIENT */
    .mobile-nav-social a[href*="instagram"]:hover {
        background: radial-gradient( circle at 30% 110%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
        border: none;
    }
    /* Facebook */
    .mobile-nav-social a[href*="facebook"]:hover {
        background: #1877f2;
        border-color: #1877f2;
    }
    /* YouTube */
    .mobile-nav-social a[href*="youtube"]:hover {
        background: #ff0000;
        border-color: #ff0000;
    }
    /* X */
    .mobile-nav-social a[href*="twitter"]:hover {
        background: #000;
        border-color: #fff;
    }
}


/* =========================
   KEYFRAMES
   ========================= */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes iconIn {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* =========================================
   MOBILE NAV – EXACT REFERENCE LAYOUT
   ========================================= */

@media (max-width: 768px) {
    /* Fullscreen nav container */
    nav#navMenu {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        /* KEY */
        align-items: center !important;
        gap: 2.2rem !important;
        padding-top: 0 !important;
    }
    /* Menu links */
    nav#navMenu a {
        font-family: 'Playfair Display', serif;
        font-size: 1.35rem !important;
        font-weight: 600;
        letter-spacing: 1px;
        text-align: center;
        opacity: 0.9;
    }
}

@media (max-width: 768px) {
    .mobile-nav-divider {
        width: 60%;
        height: 1px;
        background: rgba(255, 255, 255, 0.15);
        margin: 1.8rem 0 1.4rem;
    }
}

@media (max-width: 768px) {
    .mobile-nav-social-wrap {
        position: static;
        /* IMPORTANT */
        transform: none;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .mobile-social-text {
        font-size: 0.72rem;
        letter-spacing: 0.18em;
        text-transform: uppercase;
        opacity: 0.6;
        margin-top: 0.9rem;
    }
    .mobile-nav-social {
        display: flex;
        gap: 1.4rem;
    }
    .mobile-nav-social a {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.2);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.95rem;
        transition: all 0.35s ease;
    }
}

@media (max-width: 768px) {
    .mobile-nav-social a:hover {
        transform: translateY(-3px) scale(1.08);
        box-shadow: 0 8px 22px rgba(0, 0, 0, 0.6);
    }
    .mobile-nav-social a[href*="instagram"]:hover {
        background: radial-gradient( circle at 30% 110%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
        border: none;
    }
    .mobile-nav-social a[href*="facebook"]:hover {
        background: #1877f2;
    }
    .mobile-nav-social a[href*="youtube"]:hover {
        background: #ff0000;
    }
    .mobile-nav-social a[href*="twitter"]:hover {
        background: #000;
        border-color: #fff;
    }
}


/* =========================================
   HERO SECTION – MOBILE PREMIUM FIX
   ========================================= */


/* REMOVE extra offsets */

.hero::before {
    inset: 0;
}


/* HERO CONTENT */

.hero-content {
    padding: 1.5rem 1.2rem;
    /* controlled inner spacing */
    margin: 0;
    text-align: center;
}


/* TITLE */

.hero h1 {
    font-size: 2rem;
    line-height: 1.25;
    margin-bottom: 0.75rem;
}


/* SUBTITLE */

.hero p {
    font-size: 0.95rem;
    margin-bottom: 1.4rem;
    opacity: 0.85;
}


/* BUTTON GROUP */

.hero-buttons {
    gap: 0.75rem;
}


}

/* =========================================
   HERO SECTION – MOBILE FINAL FIX (NO GAPS)
   ========================================= */
@media (max-width: 768px) {
    /* REMOVE body offset ONLY for hero */
    
    body {
        padding-top: 72px;
        /* keep for rest of site */
    }
    
    .hero {
        min-height: calc(100svh - 72px);
        /* viewport minus header */
        padding: 0 !important;
        margin-top: -72px;
        /* pull hero under header */
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .hero-content {
        padding: 1.5rem 1.2rem;
        margin: 0;
        text-align: center;
    }
    
    .hero::before {
        inset: 0;
    }
}

/* =========================================
   MOBILE HERO – REMOVE BLACK EMPTY SPACE
   ========================================= */
@media (max-width: 768px) {
    .hero {
        min-height: auto !important;
        height: auto !important;
        padding: 0 !important;
        margin: 0 !important;
        display: block !important;
    }
    
    .hero::before {
        inset: 0;
    }
    
    .hero-content {
        padding: 1.5rem 1.2rem;
        margin: 0;
    }
}

/* ===============================
   VIEW DETAILS BUTTON – FILMS ONLY
   =============================== */
#films .view-details-btn {
    display: inline-block;
    margin-top: 0.9rem;
    padding: 0.45rem 1.2rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: transparent;
    transition: all 0.35s ease;
}

/* Hover – premium cinematic feel */
#films .view-details-btn:hover {
    background: #ff5722;
    border-color: #ff5722;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(255, 87, 34, 0.45);
}

/* Mobile touch friendly */
@media (max-width: 768px) {
    #films .view-details-btn {
        padding: 0.5rem 1.3rem;
        font-size: 0.7rem;
    }
}

/* ==================================================
   MOBILE NAV – FORCE SAME STYLE AS HOME PAGE
   (Applies to ALL pages, matches HOME exactly)
   ================================================== */
@media (max-width: 768px) {
    /* Header container same height as home */
    
    .site-header {
        background: rgba(0, 0, 0, 0.92);
        backdrop-filter: blur(6px);
    }
    /* Mobile nav panel */
    
    .site-header nav {
        background: #0e0e0e;
        padding: 0.5rem 0;
    }
    /* Nav links – SAME muted color as home */
    
    .site-header nav a {
        color: rgba(255, 255, 255, 0.75);
        font-size: 0.95rem;
        font-weight: 500;
        letter-spacing: 0.4px;
        padding: 1rem 0;
        transition: color 0.3s ease;
    }
    /* Hover / active */
    
    .site-header nav a:hover {
        color: #ff5722;
    }
}

/* =====================================
   REFERENCE STYLE – COLOR HOVER CARD
   (ONLY FOR SELECTED CARDS)
   ===================================== */
#films .premium-card {
    background: #0b0b0b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}

/* IMAGE stays same */
#films .premium-card img {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* HOVER — EXACT REFERENCE FEEL */
#films .premium-card:hover {
    background: #111111;
    border-color: #ff3d3d;
    box-shadow: 0 0 0 1px rgba(255, 61, 61, 0.6), 0 18px 40px rgba(0, 0, 0, 0.75);
    transform: translateY(-6px);
}

/* Text stays calm (no movement) */
#films .premium-card h3 {
    transition: color 0.3s ease;
}
#films .premium-card:hover h3 {
    color: #ffffff;
}

/* Button stays subtle */
#films .premium-card .view-details-btn {
    transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

/* ===============================
   FULL CARD CLICKABLE
   =============================== */
.film-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.film-link:focus {
    outline: none;
}

/* Cursor feedback */
.film-link .film-card {
    cursor: pointer;
}

/* =========================================
   FILM CARDS – EQUAL HEIGHT & ALIGNMENT
   ========================================= */

/* Make anchor behave like block */
.film-link {
    display: block;
    height: 100%;
}

/* Card takes full height */
#films .film-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Image fixed ratio (same height for all) */
#films .film-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    flex-shrink: 0;
}

/* Info section fills remaining space */
#films .film-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 1.1rem;
}

/* Description grows but stays balanced */
#films .film-info p {
    flex-grow: 1;
}

/* Button always at bottom */
#films .view-details-btn {
    margin-top: auto;
}

/* Desktop grid consistency */
@media (min-width: 1024px) {
    #films .films-grid {
        grid-auto-rows: 1fr;
    }
}

/* Mobile – keep clean alignment */
@media (max-width: 768px) {
    #films .film-card {
        height: 100%;
    }
}

/* =========================================
   VIEW DETAILS BUTTON – PERFECT CENTERING
   ========================================= */
#films .view-details-btn {
    display: inline-flex;
    /* key */
    
    align-items: center;
    /* vertical center */
    
    justify-content: center;
    /* horizontal center */
    
    text-align: center;
    width: 100%;
    max-width: 200px;
    /* premium width */
    
    margin: 1.2rem auto 0;
    /* center button */
    
    padding: 0.6rem 1.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-radius: 999px;
    cursor: pointer;
}

/* ===============================
   FILM DESCRIPTION – 2 LINES ONLY
   =============================== */
#films .film-info p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* number of lines */
    
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
    max-height: 3em;
    /* 2 lines × line-height */
}

/* ===============================
   COMPACT FILM CARD SIZE
   =============================== */
#films .film-card {
    border-radius: 10px;
    overflow: hidden;
}

/* Slightly smaller poster */
#films .film-card img {
    aspect-ratio: 2 / 3;
    max-height: 260px;
    object-fit: cover;
}

/* Tighter content spacing */
#films .film-info {
    padding: 0.9rem;
}
#films .film-info h3 {
    font-size: 0.95rem;
    line-height: 1.3;
    margin-bottom: 0.35rem;
}
#films .film-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}
#films .film-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
#films .film-actions {
    margin-top: auto;
}

/* =========================================
   FILM CARD POSTER – FINAL PERFECT FIX
   ========================================= */

/* Card layout */
#films .film-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #0b0b0b;
    border-radius: 12px;
    overflow: hidden;
}

/* Poster wrapper (key fix) */
#films .film-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    /* Standard movie poster */
    
    object-fit: cover;
    /* Clean cinematic crop */
    
    background: #000;
    flex-shrink: 0;
}

/* Desktop fine-tune */
@media (min-width: 1024px) {
    #films .film-card img {
        max-height: 320px;
        /* balanced height */
    }
}

/* Tablet */
@media (max-width: 1023px) and (min-width: 768px) {
    #films .film-card img {
        max-height: 300px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    #films .film-card img {
        max-height: 280px;
    }
}

/* =========================================
   FILM CARD IMAGE – NO BLACK GAP (FINAL FIX)
   ========================================= */

/* Card must clip image */
#films .film-card {
    padding: 0 !important;
    background: transparent !important;
    overflow: hidden !important;
    border-radius: 12px;
}

/* Image fills card fully */
#films .film-card img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 2 / 3;
    object-fit: cover !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
}

/* =========================================
   OUR FILMS – FINAL SAFE POSTER RULE
   NO CROP • NO GAP • NO SIDE EFFECTS
   ========================================= */
#films .film-card {
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #0b0b0b;
}

/* Image defines its own height */
#films .film-card img {
    display: block;
    width: 100%;
    height: auto;
    /* KEY */
    
    object-fit: unset;
    /* NO crop logic */
}

/* =========================================
   FILM POSTER – NO GAP + NO CROP (DESKTOP ONLY)
   ========================================= */
@media (min-width: 1024px) {
    /* Card container */
    
    #films .film-card {
        padding: 0 !important;
        border-radius: 12px;
        overflow: hidden;
        background: transparent !important;
    }
    /* Poster image */
    
    #films .film-card img {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 2 / 3;
        /* poster ratio */
        object-fit: contain !important;
        /* NO CROPPING */
        background: transparent !important;
        display: block;
    }
}

/* =========================================
   PERFORMANCE BOOST – FILM CARDS ONLY
   (CSS-ONLY, SAFE)
   ========================================= */

/* Prevent unnecessary repaint during load */
#films .film-card img {
    backface-visibility: hidden;
}
#films {
    contain: layout paint;
}

/* =========================================
   VIEW DETAILS BUTTON – LOWER POSITION FIX
   ========================================= */
#films .view-details-btn {
    margin-top: 1rem !important;
    /* pushes button down */
}

/* Ensure content doesn’t collide */
#films .film-info {
    padding-bottom: 1.2rem !important;
}

/* =========================================
   FILMS – BUTTON ALIGNMENT (SAFE & FINAL)
   ========================================= */

/* Lock title space (even if 1 line) */
#films .film-info h3 {
    min-height: 2.6em;
    /* space for 2 lines */
    
    line-height: 1.3;
}

/* Lock description space */
#films .film-info p {
    min-height: 3em;
    /* space for 2 lines */
    
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Button stays at same vertical level */
#films .view-details-btn {
    margin-top: 0.8rem;
}

/* =========================================
   TEMP: HIDE VIEW DETAILS BUTTON (FILMS)
   ========================================= */
#films .view-details-btn {
    display: none !important;
}

/* =========================================
   MOBILE – FILM POSTERS NO CROP (FINAL FIX)
   ========================================= */
@media (max-width: 768px) {
    #films .film-card img {
        height: auto !important;
        /* let image define height */
        max-height: none !important;
        object-fit: contain !important;
        /* show FULL poster */
        background: #000;
        /* clean letterbox if needed */
    }
}

/* ===============================
   FILMS – ZERO LAYOUT SHIFT FIX
   =============================== */
#films .films-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2rem;
}

/* Card */
#films .film-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #0b0b0b;
    border-radius: 12px;
    overflow: hidden;
}

/* Poster – space reserved BEFORE load */
#films .film-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    display: block;
    background: #000;
}

/* Content */
#films .film-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 1rem;
}

/* Title fixed height */
#films .film-info h3 {
    min-height: 2.6em;
    line-height: 1.3;
}

/* Description fixed height */
#films .film-info p {
    min-height: 3em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Button stays aligned */
#films .view-details-btn {
    margin-top: auto;
}

/* Desktop – EXACT 4 per row */
@media (min-width: 1024px) {
    #films .films-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Tablet */
@media (max-width: 1023px) {
    #films .films-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 480px) {
    #films .films-grid {
        grid-template-columns: 1fr;
    }
}

/* =====================================
   OUR FILMS – FINAL NO-SHIFT FIX (ONLY)
   ===================================== */

/* Grid */
#films .films-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

/* Card */
#films .film-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #0b0b0b;
    border-radius: 12px;
    overflow: hidden;
}

/* Poster – space reserved BEFORE load */
#films .film-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    display: block;
    background: #000;
}

/* Content */
#films .film-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 1rem;
}

/* Title space lock */
#films .film-info h3 {
    min-height: 2.6em;
    line-height: 1.3;
}

/* Description space lock */
#films .film-info p {
    min-height: 3em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Button stays aligned */
#films .view-details-btn {
    margin-top: auto;
}

/* Tablet */
@media (max-width: 1023px) {
    #films .films-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 480px) {
    #films .films-grid {
        grid-template-columns: 1fr;
    }
}

/* =====================================
   FILMS – UNIVERSAL MOBILE FIX
   WORKS ON ALL ANDROID + IOS
   ===================================== */

/* Base (mobile first) */
#films .films-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
}
#films .film-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #0b0b0b;
    border-radius: 12px;
    overflow: hidden;
}
#films .film-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    display: block;
    background: #000;
}
#films .film-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 0.9rem;
}

/* Title – exactly 2 lines */
#films .film-info h3 {
    min-height: 2.6em;
    line-height: 1.3;
    font-size: 0.95rem;
}

/* Description – exactly 2 lines */
#films .film-info p {
    min-height: 3em;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
#films .view-details-btn {
    margin-top: auto;
}

/* Small phones (iPhone SE, Galaxy A series) */
@media (max-width: 360px) {
    #films .films-grid {
        grid-template-columns: 1fr;
    }
}

/* Tablets */
@media (min-width: 768px) {
    #films .films-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop */
@media (min-width: 1024px) {
    #films .films-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* =====================================
   OUR FILMS – FINAL NO-SHIFT FIX
   ===================================== */
#films .films-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}
#films .film-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #0b0b0b;
    border-radius: 12px;
    overflow: hidden;
}
#films .film-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    display: block;
    background: #000;
}
#films .film-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 1rem;
}
#films .film-info h3 {
    min-height: 2.6em;
    line-height: 1.3;
}
#films .film-info p {
    min-height: 3em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
#films .view-details-btn {
    margin-top: auto;
}
@media (max-width: 1023px) {
    #films .films-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    #films .films-grid {
        grid-template-columns: 1fr;
    }
}

/* Faster image paint */
img {
    image-rendering: auto;
}

/* ===============================
   FILM IMAGE – FINAL LOAD FIX
   =============================== */
#films .film-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    height: auto;
    object-fit: cover;
    display: block;
    background: #000;
}

/* Speed up initial render */
* {
    animation-duration: 0s !important;
    transition-duration: 0s !important;
}
.loaded * {
    animation-duration: initial !important;
    transition-duration: initial !important;
}