/* ==========================================================================
   GEMS - Avenue Metro Curated Movie Collection
   Premium Editorial Experience Styles
   ========================================================================== */

:root {
    --black: #050505;
    --charcoal: #121212;
    --card-bg: #1a1a1a;
    --white: #ffffff;
    --off-white: #e0e0e0;
    --gold: #d4af37;
    --gold-light: #f5d76e;
    --red: #8b0000;
    --soft-gray: #888888;
    
    --font-heading: 'Cinzel', 'Playfair Display', serif; /* Or keep site defaults if preferred */
    --font-body: 'Inter', 'Helvetica Neue', sans-serif;
    
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    --radius-md: 8px;
    --radius-lg: 12px;
    
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 4px 20px rgba(212, 175, 55, 0.15);
}

/* Base Styles */
body.page-gems {
    background-color: var(--black);
    color: var(--white);
    font-family: var(--font-body);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.gems-main {
    padding-top: 60px; /* Offset for global header */
    min-height: 100vh;
}

/* Typography */
.gems-main h1, .gems-main h2, .gems-main h3 {
    font-family: var(--font-heading);
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.text-gold { color: var(--gold); }
.text-red { color: var(--red); }
.text-gray { color: var(--soft-gray); }

/* Hero Section */
.gems-hero {
    width: 100%;
    margin-bottom: var(--spacing-xl);
    position: relative;
}

.gems-hero img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

/* Introduction */
.gems-intro {
    max-width: 800px;
    margin: 0 auto var(--spacing-xl);
    padding: 0 var(--spacing-md);
    text-align: center;
}

.gems-intro p {
    font-size: 1.15rem;
    color: var(--off-white);
    line-height: 1.8;
}

/* Featured Gem Section */
.featured-gem-section {
    max-width: 1200px;
    margin: 0 auto var(--spacing-xl);
    padding: 0 var(--spacing-md);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-family: 'Broadway', var(--font-heading);
    color: var(--gold);
    margin-bottom: var(--spacing-lg);
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding-bottom: var(--spacing-sm);
}

.featured-card {
    display: flex;
    flex-direction: column;
    background-color: var(--charcoal);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-glow);
}

/* Collection Navigation */
.collection-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(5, 5, 5, 0.95);
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--card-bg);
    border-top: 1px solid var(--card-bg);
    margin-bottom: var(--spacing-lg);
}

.nav-list {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    list-style: none;
    padding: 0 var(--spacing-md);
    margin: 0;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none; /* Firefox */
}

.nav-list::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.nav-list a {
    color: var(--soft-gray);
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.nav-list a:hover, .nav-list a.active {
    color: var(--gold);
}

/* Movie Collections Wrapper */
.movie-collections {
    max-width: 1200px;
    margin: 0 auto var(--spacing-xl);
    padding: 0 var(--spacing-md);
}

.collection-group {
    margin-bottom: var(--spacing-xl);
    scroll-margin-top: 140px; /* Offset for sticky nav + header */
}

.collection-group h2 {
    font-size: 2rem;
    color: var(--white);
    margin-bottom: var(--spacing-md);
    border-left: 4px solid var(--red);
    padding-left: 1rem;
}

/* Movie Card (Horizontal Layout) */
.movie-card {
    display: flex;
    flex-direction: column;
    background-color: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.movie-card:hover {
    border-color: rgba(212, 175, 55, 0.5);
    transform: translateY(-5px);
}

.movie-poster-container,
.gem-poster-frame {
    width: clamp(200px, 75vw, 270px);
    aspect-ratio: 2 / 3;
    background-color: #111;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    flex-shrink: 0;
    margin: 0 auto;
}

.movie-poster,
.gem-poster-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.movie-poster.loaded,
.gem-poster-frame img.loaded {
    opacity: 1;
}

.movie-info {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-width: 0;
    width: 100%;
}

.movie-title {
    font-size: 1.8rem;
    color: var(--gold);
    margin: 0 0 0.5rem 0;
}

.movie-meta {
    font-size: 0.9rem;
    color: var(--soft-gray);
    margin-bottom: 1rem;
    display: flex;
    gap: 15px;
}

.movie-description {
    color: var(--off-white);
    margin-bottom: 1.5rem;
    font-size: 1rem;
    max-width: 72ch;
}

.movie-credits {
    margin-bottom: 1.5rem;
}

.movie-credits p {
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
}

.credit-label {
    color: var(--soft-gray);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-right: 8px;
}

.why-gem-box {
    background-color: rgba(212, 175, 55, 0.05);
    border-left: 3px solid var(--gold);
    padding: 1rem;
    margin-top: auto;
}

.why-gem-label {
    display: block;
    color: var(--gold);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.why-gem-text {
    margin: 0;
    font-style: italic;
    color: var(--off-white);
    font-size: 0.95rem;
}

/* Fallback Image Style */
.poster-fallback {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a1a, #050505);
    color: var(--gold);
    font-family: var(--font-heading);
    text-align: center;
    padding: 1rem;
    border: 1px solid rgba(212, 175, 55, 0.1);
}

/* Responsive Breakpoints */

/* Tablet (768px and up) */
@media (min-width: 768px) {
    .movie-card {
        flex-direction: row;
    }
    
    .movie-poster-container,
    .gem-poster-frame {
        width: 220px;
        min-width: 220px;
        border-right: 1px solid rgba(255, 255, 255, 0.05);
        margin: 0;
        border-radius: 0;
    }
    
    .featured-card {
        flex-direction: row;
    }
    
    .featured-card .movie-poster-container,
    .featured-card .gem-poster-frame {
        width: clamp(260px, 28vw, 300px);
        min-width: 260px;
    }
    
    .featured-card .movie-title {
        font-size: 2.5rem;
    }
}

/* Desktop (1024px and up) */
@media (min-width: 1024px) {
    .movie-poster-container,
    .gem-poster-frame {
        width: 240px;
        min-width: 240px;
    }
    
    .featured-card .movie-poster-container,
    .featured-card .gem-poster-frame {
        width: 300px;
        min-width: 300px;
    }
}
/* ==========================================================================
   Editorial Additions (Curator Note & Progressive Loading)
   ========================================================================== */

.why-gem-box {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-sm);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 72ch;
}

.why-gem-label {
    display: block;
    color: var(--gold);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.why-gem-text {
    font-style: italic;
    color: #e0e0e0;
    line-height: 1.5;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin: var(--spacing-xl) 0;
    width: 100%;
}

.btn-load-more {
    background-color: transparent;
    color: var(--gold);
    border: 2px solid var(--gold);
    padding: 12px 30px;
    font-size: 1.1rem;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.btn-load-more:hover, .btn-load-more:focus {
    background-color: var(--gold);
    color: var(--black);
    outline: none;
}
