/* ============================================
   KURD CINEMA - ZNJIRAFILM (COLLECTIONS) PAGE
   ============================================ */

/* Theme Variables */
:root {
    --black: #000000;
    --noir: #0a0608;
    --charcoal: #14101a;
    --slate: #1c1624;
    --steel: #2d2438;
    --silver: #9a8fa8;
    --pearl: #f0eaf5;
    --white: #ffffff;
    --ruby: #e31b54;
    --crimson: #c41040;
    --gold: #f5a623;
    --amber: #ffb347;
    --burgundy: #6b1c3a;
    --royal-purple: #4a1259;
    --deep-violet: #2d1b4e;
    --font-display: 'Bebas Neue', 'Vazirmatn', 'Tajawal', sans-serif;
    --font-body: 'Vazirmatn', 'Tajawal', 'Cairo', 'Noto Sans Arabic', sans-serif;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Theme Colors */
[data-theme="ocean"] { --ruby: #0ea5e9; --crimson: #0284c7; --gold: #38bdf8; --amber: #7dd3fc; --burgundy: #0c4a6e; --royal-purple: #075985; --deep-violet: #0c4a6e; }
[data-theme="emerald"] { --ruby: #10b981; --crimson: #059669; --gold: #34d399; --amber: #6ee7b7; --burgundy: #064e3b; --royal-purple: #047857; --deep-violet: #064e3b; }
[data-theme="purple"] { --ruby: #a855f7; --crimson: #9333ea; --gold: #c084fc; --amber: #d8b4fe; --burgundy: #4c1d95; --royal-purple: #6b21a8; --deep-violet: #4c1d95; }
[data-theme="sunset"] { --ruby: #f97316; --crimson: #ea580c; --gold: #fb923c; --amber: #fdba74; --burgundy: #7c2d12; --royal-purple: #9a3412; --deep-violet: #7c2d12; }
[data-theme="rose"] { --ruby: #ec4899; --crimson: #db2777; --gold: #f472b6; --amber: #f9a8d4; --burgundy: #831843; --royal-purple: #9d174d; --deep-violet: #831843; }
[data-theme="red"] { --ruby: #ef4444; --crimson: #dc2626; --gold: #f87171; --amber: #fca5a5; --burgundy: #7f1d1d; --royal-purple: #991b1b; --deep-violet: #7f1d1d; }
[data-theme="darkred"] { --ruby: #b91c1c; --crimson: #991b1b; --gold: #dc2626; --amber: #ef4444; --burgundy: #450a0a; --royal-purple: #7f1d1d; --deep-violet: #450a0a; }
[data-theme="yellow"] { --ruby: #eab308; --crimson: #ca8a04; --gold: #facc15; --amber: #fde047; --burgundy: #713f12; --royal-purple: #854d0e; --deep-violet: #713f12; }
[data-theme="darkyellow"] { --ruby: #a16207; --crimson: #854d0e; --gold: #ca8a04; --amber: #eab308; --burgundy: #422006; --royal-purple: #713f12; --deep-violet: #422006; }

/* Background Layer */
.bg-layer {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(180deg, var(--noir) 0%, #0f0810 50%, var(--noir) 100%);
}

.bg-layer::after {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 100% 100% at 50% 0%, var(--royal-purple) 0%, transparent 50%),
        radial-gradient(ellipse 80% 60% at 100% 100%, var(--burgundy) 0%, transparent 50%);
    opacity: 0.3;
}

/* Page Hero - Full Cover Under Menu */
.page-hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: flex-end;
    padding: 160px 80px 2px;
    margin-top: 0;
    margin-left: -80px;
    margin-right: -80px;
    overflow: hidden;
}

.page-hero__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease;
}

.page-hero__backdrop.loaded {
    opacity: 0.5;
}

.page-hero__overlay {
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(0deg, var(--noir) 0%, rgba(10,6,8,0.5) 50%, rgba(10,6,8,0.3) 100%),
        linear-gradient(270deg, var(--noir) 0%, transparent 50%);
    z-index: 1;
}

.page-hero__content {
    position: relative;
    z-index: 2;
    padding: 60px 80px;
    margin: 60px 0;
    width: 100%;
}

.page-hero__title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 16px;
}

.page-hero__title span {
    background: linear-gradient(135deg, var(--ruby) 0%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-hero__subtitle {
    font-size: 1.1rem;
    color: var(--silver);
    max-width: 600px;
}

@media (max-width: 768px) {
    .page-hero { 
        min-height: 300px; 
        margin-left: -20px;
        margin-right: -20px;
        padding: 90px 20px 0px;
    }

    .header {
        padding: 30px 16px !important;
    }

    .page-hero__content { padding: 40px 24px; }
}

@media (max-width: 600px) {
    .page-hero__title {
        font-size: 1.8rem;
    }
    .page-hero__subtitle {
        font-size: 0.95rem;
    }
}

/* Main Content */
.main {
    padding: 0 80px 80px;
}

@media (max-width: 768px) {
    .main { padding: 0 20px 60px; }
}

/* Collection Grid */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns on large screens */
    gap: 30px;
}

/* Screens under 1280px: 2 columns */
@media (max-width: 1280px) {
    .collection-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

/* Mobile: 1 column */
@media (max-width: 600px) {
    .collection-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Collection Card */
.collection-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 16/9;
    cursor: pointer;
    transition: all 0.6s var(--ease-out-expo);
    background: var(--charcoal);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.collection-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent 50%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    transition: all 0.5s ease;
    z-index: 3;
}

.collection-card:hover::before {
    background: linear-gradient(135deg, var(--ruby) 0%, var(--gold) 100%);
}

.collection-card::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 28px;
    background: linear-gradient(135deg, var(--ruby), var(--gold));
    opacity: 0;
    z-index: -1;
    filter: blur(25px);
    transition: opacity 0.5s ease;
}

.collection-card:hover::after {
    opacity: 0.35;
}

.collection-card:hover {
    transform: translateY(-8px) rotateX(5deg) rotateY(-3deg);
    box-shadow: 
        0 40px 80px rgba(0,0,0,0.5),
        0 0 40px rgba(227, 27, 84, 0.2);
}

.collection-card__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease-out-expo), opacity 0.5s ease;
    opacity: 0;
}

.collection-card__image.loaded {
    opacity: 1;
}

.collection-card:hover .collection-card__image {
    transform: scale(1.15) translateZ(20px);
    filter: brightness(1.1) saturate(1.2);
}

/* Skeleton loader */
.collection-card__skeleton {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--charcoal) 25%, var(--slate) 50%, var(--charcoal) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.collection-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.2) 100%);
    z-index: 1;
    transition: background 0.5s ease;
}

.collection-card:hover .collection-card__overlay {
    background: linear-gradient(0deg, rgba(0,0,0,0.98) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.3) 100%);
}

.collection-card__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 35px;
    /*padding: 24px;*/
    z-index: 2;
    transform: translateY(20px);
    transition: transform 0.5s var(--ease-out-expo);
}

.collection-card:hover .collection-card__content {
    transform: translateY(0) translateZ(30px);
}

.collection-card__title {
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 12px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.collection-card__stats {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
}

.collection-card__stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--silver);
}

.collection-card__stat i {
    color: var(--gold);
}

.collection-card__stat--rating {
    background: linear-gradient(135deg, var(--gold), var(--amber));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.collection-card__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--ruby) 0%, var(--crimson) 100%);
    border-radius: 50px;
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s var(--ease-out-expo);
    box-shadow: 0 8px 25px rgba(227, 27, 84, 0.4);
}

.collection-card:hover .collection-card__btn {
    opacity: 1;
    transform: translateY(0) translateZ(40px);
}

.collection-card__btn:hover {
    transform: scale(1.1) translateZ(50px);
    box-shadow: 0 15px 40px rgba(227, 27, 84, 0.6);
}

/* Shine effect on hover */
.collection-card__shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.1) 50%, transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 2;
    pointer-events: none;
}

.collection-card:hover .collection-card__shine {
    opacity: 1;
    animation: shineMove 1.5s ease-in-out;
}

@keyframes shineMove {
    0% { transform: translateX(-100%) rotate(25deg); }
    100% { transform: translateX(100%) rotate(25deg); }
}

@media (max-width: 768px) {
    .header {
        padding: 65px 20px !important;
    }
}

@media (max-width: 540px) {
    .header {
        padding: 35px 20px !important;
    }
}
