/*
Theme Name: TGC (The Global Cinema)
Description: V50 - FINAL FIXED (Header + Hero + Grid + Mobile)
Version: 50.0
*/

:root {
    --bg-body: #ffffff;
    --text-main: #111111;
    --accent: #E50914; 
    --search-btn: #ff7b00;
    --font-head: 'Playfair Display', serif;
    --font-ui: 'Inter', sans-serif;
    --container-width: 1400px;
}

/* GLOBAL RESET */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-ui); background: var(--bg-body); color: var(--text-main); overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; }

/* =========================================
   1. HEADER STYLES (Fixed)
   ========================================= */
.mobile-header { display: none; } 
.desktop-header { position: sticky; top: 0; z-index: 1000; background: #fff; width: 100%; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }

/* Row 1: Logo & Search */
.header-row-1 { 
    display: flex; justify-content: space-between; align-items: center; 
    height: 70px; max-width: var(--container-width); margin: 0 auto; padding: 0 40px; 
    border-bottom: 1px solid #eee;
}
.tgc-logo a { display: flex !important; gap: 5px; font-weight: 900; }
.tgc-logo span { width: 38px; height: 38px; display: flex; justify-content: center; align-items: center; background: #000; color: #fff; border-radius: 8px; border-bottom: 3px solid var(--accent); }

.header-search-bar { flex: 1; max-width: 600px; margin: 0 40px; }
.header-search-bar form { display: flex; width: 100%; background: #f0f0f0; border-radius: 50px; overflow: hidden; }
.h-search-input { flex: 1; border: none; background: transparent; padding: 0 20px; height: 40px; outline: none; }
.h-search-btn { background: var(--search-btn); color: white; padding: 0 25px; font-weight: 700; }

/* Row 2: Navigation */
.nav-wrapper { background: #fff; border-bottom: 1px solid #eee; }
.header-row-2 { 
    display: flex; gap: 20px; height: 50px; align-items: center; 
    font-size: 13px; font-weight: 700; 
    max-width: var(--container-width); margin: 0 auto; padding: 0 40px;
}
.nav-item { height: 100%; display: flex; align-items: center; color: #333; transition: 0.2s; position: relative; }
.nav-item:hover { color: var(--accent); }

/* Mega Menu & Dropdowns */
.has-dropdown:hover .mega-dropdown, 
.has-dropdown:hover .mega-dropdown-dynamic { display: block; }

.mega-dropdown, .mega-dropdown-dynamic { 
    display: none; position: absolute; top: 100%; left: 0; 
    background: #fff; border: 1px solid #ddd; padding: 20px; z-index: 9999; 
    min-width: 250px; border-top: 3px solid var(--accent); 
    box-shadow: 0 10px 20px rgba(0,0,0,0.1); border-radius: 0 0 6px 6px;
}

/* Grids inside Menu */
.country-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.social-grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 15px; }

.country-item, .country-card {
    display: flex; align-items: center; gap: 8px; padding: 6px;
    font-size: 13px; font-weight: 600; color: #444;
}
.country-item:hover, .country-card:hover { background: #f5f5f5; color: var(--accent); }
.dot-point, .dot-yellow { width: 6px; height: 6px; background: #FFD700; border-radius: 50%; }

/* SCROLLBAR HIDE (Magic Fix) */
.industry-scroll-track {
    display: flex; align-items: center; gap: 20px;
    overflow-x: auto; white-space: nowrap; height: 100%; flex: 1;
    -ms-overflow-style: none; scrollbar-width: none;
}
.industry-scroll-track::-webkit-scrollbar { display: none; }


/* =========================================
   2. HERO SECTION (Banner Design)
   ========================================= */
.hero-section {
    padding: 40px;
    background: #f4f4f4;
    border-bottom: 1px solid #ddd;
    margin-bottom: 30px;
}
.hero-card {
    display: flex;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    max-width: var(--container-width);
    margin: 0 auto;
    min-height: 400px;
}
.hero-content {
    flex: 1;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.hero-visual {
    flex: 1;
    background: #000;
    position: relative;
    min-height: 300px;
}
.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}
.hero-label {
    display: block; text-align: center; margin-bottom: 20px;
    font-size: 0.8rem; letter-spacing: 1px; font-weight: 700; color: #888; text-transform: uppercase;
}
.hero-content h1 {
    font-family: var(--font-head);
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 20px;
    color: #000;
}
.btn-primary {
    background: var(--accent); color: #fff; padding: 12px 30px; 
    font-weight: 700; border-radius: 50px; font-size: 1rem;
}
.btn-secondary {
    background: transparent; color: #000; border: 2px solid #ddd; padding: 12px 30px; 
    font-weight: 700; border-radius: 50px; margin-left: 10px; font-size: 1rem;
}


/* =========================================
   3. MOOD & MOVIE GRID (Content Body)
   ========================================= */
.mood-section {
    padding: 0 0 30px 0;
    background: #fff;
    position: sticky; top: 120px; z-index: 900;
}
.mood-scroller {
    display: flex; justify-content: center; gap: 15px; overflow-x: auto; padding: 0 20px;
}
.mood-btn {
    background: #fff; border: 1px solid #ddd; padding: 8px 20px; 
    border-radius: 50px; font-size: 0.9rem; font-weight: 600; color: #555; white-space: nowrap;
}
.mood-btn:hover { border-color: #000; color: #000; }

.feed-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 40px 60px 40px;
}

/* THE MAIN GRID */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 ITEMS PER ROW */
    gap: 30px;
}

.movie-card {
    background: transparent;
    transition: transform 0.2s;
}
.movie-card:hover { transform: translateY(-5px); }

.grid-poster {
    aspect-ratio: 2/3;
    background: #eee;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}
.grid-poster img { width: 100%; height: 100%; object-fit: cover; }


/* =========================================
   4. MOBILE RESPONSIVE FIXES
   ========================================= */
@media (max-width: 1024px) {
    /* Header Switch */
    .desktop-header { display: none !important; }
    .mobile-header { 
        display: flex; justify-content: space-between; align-items: center; 
        padding: 15px 20px; background: #fff; border-bottom: 1px solid #eee;
        position: sticky; top: 0; z-index: 1000;
    }
    .tgc-logo span { width: 32px; height: 32px; font-size: 14px; }
    .mobile-menu-icon { font-size: 24px; cursor: pointer; }
    
    /* Hero Fixes */
    .hero-card { flex-direction: column-reverse; }
    .hero-visual { height: 250px; flex: none; }
    .hero-content { padding: 30px; text-align: center; }
    .hero-content h1 { font-size: 2rem; }
    
    /* Grid Fixes (Tablet: 2 Columns) */
    .movie-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .feed-container { padding: 0 20px 40px 20px; }
}

@media (max-width: 600px) {
    /* Phone Fixes (1 Column) */
    .movie-grid { grid-template-columns: 1fr; }
    
    .mood-scroller { justify-content: flex-start; } /* Scroll start se */
    
    /* Hide Mega Menu on Mobile to prevent overflow */
    .mega-dropdown, .mega-dropdown-dynamic { display: none !important; }
}