/* ==========================================
   RESET E STILI BASE GLOBALI
   ========================================== */
body { 
    font-family: Arial, sans-serif; 
    margin: 0; 
    padding: 0; 
    background-color: #f4f4f9; 
    color: #333; 
}

/* ==========================================
   STILI DELLA HOMEPAGE E RICERCA
   ========================================== */
/* Sezione Hero */
.hero { 
    background: #1a1a1a; 
    color: white; 
    padding: 100px 20px 140px; 
    text-align: center; 
    border-bottom: none !important;
}

/* Barra di Ricerca */
.search-bar { margin-top: 30px; }
.search-bar form { 
    display: flex; 
    justify-content: center; 
    max-width: 700px; 
    margin: 0 auto; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.4); 
    border-radius: 8px; 
    overflow: hidden;
}
.search-bar input { padding: 18px 25px; flex: 1; border: none; font-size: 18px; outline: none; }
.search-bar button { padding: 18px 40px; background: #e50914; color: white; border: none; font-size: 18px; font-weight: bold; cursor: pointer; transition: background 0.2s;}
.search-bar button:hover { background: #b00710; }

/* Sezione CTA (Pitch) */
.cta-section { 
    background: #f4f4f9; 
    padding: 70px 20px; 
    text-align: center; 
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}
.cta-container { max-width: 900px; margin: 0 auto; }
.cta-title { font-size: 32px; color: #1a1a1a; margin-bottom: 20px; font-weight: 800; line-height: 1.3;}
.cta-desc { font-size: 18px; color: #555; line-height: 1.6; margin-bottom: 30px;}
.cta-btn { 
    display: inline-block; 
    padding: 18px 40px; 
    background: #e50914; 
    color: white; 
    text-decoration: none; 
    font-size: 20px; 
    font-weight: bold; 
    border-radius: 5px; 
    transition: background 0.3s, transform 0.2s; 
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
}
.cta-btn:hover { background: #b00710; transform: translateY(-2px);}


/* ==========================================
   SEZIONI GENERALI E TITOLI
   ========================================== */
.home-section { padding: 50px 20px; max-width: 1200px; margin: 0 auto; position: relative; }
.section-title { 
    font-size: 26px; 
    color: #333; 
    margin-bottom: 25px; 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    justify-content: center; 
    font-weight: 800;
}
/* ELIMINAZIONE TOTALE ED ESPLICITA DELLA BARRA ROSSA VERTICALE */
.section-title::before, 
.section-title::after { 
    display: none !important; 
    content: none !important; 
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}
.section-title svg { color: #e50914; }


/* ==========================================
   CLASSI PELLICOLA (FILMSTRIP) INFALLIBILI
   ========================================== */
/* Pellicola in BASSO (Fine di un blocco scuro come la Hero) */
.filmstrip-bottom {
    position: relative;
    padding-bottom: 60px !important; 
}
.filmstrip-bottom::after {
    content: '';
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background-color: #1a1a1a; /* DEVE ESSERE NERA come il blocco */
    background-image: url("data:image/svg+xml,%3Csvg width='50' height='40' viewBox='0 0 50 40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='15' y='10' width='20' height='20' fill='%23ffffff' rx='3'/%3E%3C/svg%3E"); /* I buchi sono BIANCHI */
    background-repeat: repeat-x;
    z-index: 999; 
}

/* Pellicola in ALTO (Inizio di un blocco scuro come i Talenti o il Footer) */
.filmstrip-top {
    position: relative;
    padding-top: 60px !important; 
}
.filmstrip-top::before {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background-color: #1a1a1a; /* DEVE ESSERE NERA come il blocco */
    background-image: url("data:image/svg+xml,%3Csvg width='50' height='40' viewBox='0 0 50 40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='15' y='10' width='20' height='20' fill='%23ffffff' rx='3'/%3E%3C/svg%3E"); /* I buchi sono BIANCHI */
    background-repeat: repeat-x;
    z-index: 999; 
}


/* ==========================================
   GRIGLIE E CARD (Home e Ricerca)
   ========================================== */
.local-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.local-card { background: white; border-radius: 8px; padding: 25px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); text-align: center; border: 1px solid #eee; transition: transform 0.2s; position: relative;}
.local-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.1);}
.local-card h3 { margin: 0 0 10px 0; font-size: 18px; display: flex; align-items: center; justify-content: center; gap: 5px;}
.local-card p { color: #666; font-size: 14px; margin: 5px 0;}
.btn-profile { display: inline-block; margin-top: 15px; padding: 8px 20px; background: #1a1a1a; color: white; text-decoration: none; border-radius: 4px; font-size: 14px; font-weight: bold;}
.btn-profile:hover { background: #e50914; }
.verified-icon { color: #f39c12; font-size: 18px; }

/* FIX LARGHEZZA CARD RICERCA E TMDB */
.grid-results { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }
.result-card, .tmdb-card-link {
    width: calc(25% - 15px); 
    flex: 0 0 calc(25% - 15px); 
    box-sizing: border-box;
    display: flex; 
}
.tmdb-card { width: 100%; display: flex; flex-direction: column; background: #1a1a1a; border-radius: 8px; overflow: hidden; }

/* Sezioni Scure (Casting e Carosello TMDB) */
.dark-section { background: #1a1a1a; padding: 60px 20px 40px; color: white; border: none; }
.dark-section .section-title { color: white; }
.carousel-section { background: #1a1a1a; padding: 60px 20px 40px; color: white; border: none; }
.carousel-section .section-title { color: white; }

/* Casting List */
.casting-list { display: flex; flex-direction: column; gap: 15px; max-width: 800px; margin: 0 auto; }
.casting-item { background: #fff; border-left: 4px solid #f1c40f; padding: 20px; border-radius: 4px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); display: flex; justify-content: space-between; align-items: center;}
.casting-info h4 { margin: 0 0 5px; font-size: 18px; color: #1a1a1a;}
.casting-info small { color: #666; font-size: 13px;}

/* Carosello TMDB Container */
.carousel-container { 
    display: flex; 
    gap: 20px; 
    overflow-x: auto; 
    padding: 20px 0 30px 0;
    scroll-snap-type: x mandatory; 
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #e50914 #333;
    max-width: 1200px;
    margin: 0 auto;
}
.carousel-container::-webkit-scrollbar { height: 8px; }
.carousel-container::-webkit-scrollbar-track { background: #333; border-radius: 4px; }
.carousel-container::-webkit-scrollbar-thumb { background-color: #e50914; border-radius: 4px; }

.star-card { 
    min-width: 220px; 
    scroll-snap-align: start; 
    background: #2a2a2a; 
    border-radius: 8px; 
    overflow: hidden; 
    position: relative;
    text-decoration: none;
    transition: transform 0.3s;
    border: 1px solid #444;
}
.star-card:hover { transform: translateY(-10px); box-shadow: 0 10px 20px rgba(0,0,0,0.5); border-color: #e50914; }
.star-image { width: 100%; height: 300px; object-fit: cover; display: block; background: #111;}
.star-info { padding: 15px; color: white;}
.star-info h3 { margin: 0 0 5px; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.star-info p { margin: 0; font-size: 13px; color: #aaa;}

/* Responsive adjustments per le card di ricerca */
@media (max-width: 900px) { .result-card, .tmdb-card-link { width: calc(33.333% - 14px); flex: 0 0 calc(33.333% - 14px); } }
@media (max-width: 768px) { .result-card, .tmdb-card-link { width: calc(50% - 10px); flex: 0 0 calc(50% - 10px); } }
@media (max-width: 480px) { .result-card, .tmdb-card-link { width: 100%; flex: 0 0 100%; } }

/* BOTTONE IN EVIDENZA NEL MENU */
.btn-menu-highlight {
    background-color: #e50914;
    color: white !important;
    padding: 8px 16px;
    border-radius: 4px;
    text-transform: uppercase;
    font-size: 14px;
    transition: background 0.3s, transform 0.2s;
}
.btn-menu-highlight:hover {
    background-color: #b00710;
    transform: translateY(-2px);
}
.btn-menu-highlight { display: flex; align-items: center; gap: 6px; }
.btn-menu-highlight svg { display: block !important; color: white !important; }