/* ============================================
   STILI DINAMICI DAL PANNELLO ADMIN
============================================ */

/* ===== SFONDO E FONT GENERALI ===== */
body {
    background-color: #f5f5e6 !important;
    font-size: 16px !important;
    font-family: Montserrat, sans-serif !important;
}

.main-content-wrapper {
    background-color: #f5f5e6 !important;
}

/* ===== TITOLI ===== */
h1, h2, h3, h4, .hero h1, .featured-shows h2, .sidebar-card h3, .page-header h1 {
    font-family: 'Montserrat', sans-serif !important;
}

/* ===== HERO ===== */
.hero {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-color: #0f172a;
    min-height: 1100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 60px 20px;
    border-radius: 20px;
    margin: 20px auto;
    max-width: 1200px;
}
.hero h1 {
    font-size: 2.2rem !important;
}
.hero h1, .hero p {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5) !important;
}
.hero::before {
    background: rgba(0,0,0,0.4) !important;
}

/* ===== LINK E COLORI ===== */
a,
.sidebar-card a,
.read-more,
.show-card h3 a,
.bacheca-title,
.news-card h3 a,
.content-left a,
.content-right a {
    color: #ff6600 !important;
}
a:hover,
.sidebar-card a:hover,
.read-more:hover {
    color: #e55a00 !important;
}

/* ===== MENU ===== */
.main-nav {
    background: #000000 !important;
    border-color: #fae600 !important;
}
.main-nav .nav-item,
.main-nav .nav-item a {
    color: #ffffff !important;
}
.main-nav .nav-item {
    font-size: 14px !important;
}

/* ===== CONTAINER PRINCIPALE ===== */
.main-content-wrapper {
    max-width: 1200px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    margin: 0 auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* ===== WIDGET BACHECA ===== */
.widget-bacheca {
    background: #5858ca !important;
    border-radius: 10px !important;
}

/* ===== BORDER RADIUS GENERALE ===== */
.news-card,
.sidebar-card,
.show-card,
.bacheca-text-link,
.widget-bacheca {
    border-radius: 16px !important;
}

/* ===== SFONDI ELEMENTI ===== */
.featured-shows {
    background-color: #f5f5e6 !important;
}
.news-card {
    background-color: #fdf59b !important;
}
.sidebar-card {
    background-color: #b8ffe4 !important;
}
.show-card {
    background-color: #dedede !important;
}
.main-content {
    background-color: #ededed !important;
}

/* ===== BORDI E OMBRE CARD ===== */
.news-card,
.sidebar-card,
.show-card {
    border: 1px solid #fdf59b !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08) !important;
}

/* ================================================================
   WIDGET TOP-BAR - DIMENSIONI FORZATE
   ================================================================ */

/* --- RESET TUTTE LE REGOLE PRECEDENTI --- */
.topbar-widget-banner img,
.widget-img,
.widget-img-small,
.widget-img-medium,
.widget-img-large,
.widget-img-xlarge,
.widget-img-xxlarge,
.widget-img-full {
    max-height: none !important;
    max-width: none !important;
    min-height: auto !important;
    min-width: auto !important;
}

/* --- CONTENITORE --- */
.topbar-widget-banner {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    vertical-align: middle !important;
    margin: 0 5px !important;
}

/* --- TAGLIE IMMAGINI (FORZATE CON !important) --- */
.widget-img-small {
    height: 40px !important;
    width: auto !important;
}
.widget-img-medium {
    height: 60px !important;
    width: auto !important;
}
.widget-img-large {
    height: 80px !important;
    width: auto !important;
}
.widget-img-xlarge {
    height: 100px !important;
    width: auto !important;
}
.widget-img-xxlarge {
    height: 120px !important;
    width: auto !important;
}
.widget-img-full {
    height: 80px !important;
    width: auto !important;
}

/* --- FALLBACK (nessuna taglia selezionata) --- */
.topbar-widget-banner img:not([class*="widget-img-"]) {
    height: 50px !important;
    width: auto !important;
}

/* --- STILE BASE IMMAGINE --- */
.topbar-widget-banner img {
    display: block !important;
    border-radius: 12px !important;
    object-fit: contain !important;
}

/* --- TESTO --- */
.topbar-widget-text {
    font-size: 9px !important;
    color: #ffffff !important;
    margin-top: 2px !important;
    line-height: 1.2 !important;
    max-width: 120px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.topbar-widget-text strong {
    display: block !important;
    font-size: 10px !important;
    color: #ffd700 !important;
    font-weight: 700 !important;
}

/* ================================================================
   WIDGET EVENTO AVANZATO - TOP-BAR (RIDIMENSIONAMENTO PROPORZIONALE)
   ================================================================ */

/* --- RESET --- */
.topbar-evento img {
    max-height: none !important;
    max-width: none !important;
}

/* --- TAGLIE EVENTO (larghezza massima, altezza automatica) --- */
.topbar-evento-small {
    max-width: 80px !important;
    width: 100% !important;
}
.topbar-evento-medium {
    max-width: 110px !important;
    width: 100% !important;
}
.topbar-evento-large {
    max-width: 140px !important;
    width: 100% !important;
}
.topbar-evento-xlarge {
    max-width: 170px !important;
    width: 100% !important;
}
.topbar-evento-xxlarge {
    max-width: 200px !important;
    width: 100% !important;
}

/* --- FALLBACK: se non c'è una taglia selezionata (Default) --- */
.topbar-evento:not([class*="topbar-evento-small"]):not([class*="topbar-evento-medium"]):not([class*="topbar-evento-large"]):not([class*="topbar-evento-xlarge"]):not([class*="topbar-evento-xxlarge"]) {
    max-width: 150px !important;
    width: 100% !important;
}

/* --- STILE BASE EVENTO --- */
.topbar-evento {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    overflow: hidden !important;
    border-radius: 12px !important;
    transition: all 0.3s ease !important;
    background: rgba(0,0,0,0.2) !important;
    height: auto !important;
    flex-shrink: 0 !important;
}

.topbar-evento:hover {
    transform: translateY(-2px) !important;
}

/* --- IMMAGINE: si adatta alla larghezza, altezza automatica --- */
.topbar-evento img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    display: block !important;
    flex-shrink: 0 !important;
}

/* --- TESTO SOTTO L'IMMAGINE --- */
.topbar-evento > div {
    text-align: center !important;
    width: 100% !important;
    padding: 4px 6px !important;
    box-sizing: border-box !important;
    background: rgba(0,0,0,0.75) !important;
    flex-shrink: 0 !important;
}

.topbar-evento > div span {
    display: block !important;
    line-height: 1.2 !important;
}

/* ================================================================
   HOME BACHECA WIDGET
   ================================================================ */

/* --- HOME BACHECA - IMMAGINI --- */
.bacheca-img {
    max-height: 400px !important;
    width: 100% !important;
    object-fit: contain !important;
    display: block !important;
}

/* --- HOME BACHECA - TITOLO --- */
.bacheca-title {
    font-size: 16px !important;
    color: #ff0000 !important;
    font-weight: bold !important;
}

/* --- HOME BACHECA - DESCRIZIONE --- */
.bacheca-desc {
    font-size: 13px !important;
    color: #333333 !important;
}

/* --- HOME BACHECA - SFONDO TESTO --- */
.bacheca-text-link {
    background: #ffdd00 !important;
    border-radius: 12px !important;
    padding: 15px !important;
}

/* ================================================================
   DROPDOWN MENU
   ================================================================ */

.dropdown-menu a {
    color: #fbff00 !important;
}
.dropdown-menu a:hover {
    background: #ff6600 !important;
    color: #ffffff !important;
}

/* ================================================================
   MOBILE PORTRAIT
   ================================================================ */

@media (max-width: 768px) and (orientation: portrait) {
    /* ===== REGOLE ESISTENTI (mantenute) ===== */
    .topbar-widget-banner {
        max-width: none !important;
    }
      /* ===== PULSANTE HAMBURGER - CONTROLLO DINAMICO ===== */
    .hamburger-btn {
        font-size: 30px !important;
        color: #ffd900 !important;
        top: 70px !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        background: transparent !important;
        border: none !important;
        position: fixed !important;
        right: 10px !important;
        z-index: 9999 !important;
        cursor: pointer !important;
        padding: 8px 12px !important;
        line-height: 1 !important;
    }  
    .widget-img-small { height: 30px !important; width: auto !important; }
    .widget-img-medium { height: 35px !important; width: auto !important; }
    .widget-img-large { height: 40px !important; width: auto !important; }
    .widget-img-xlarge { height: 45px !important; width: auto !important; }
    .widget-img-xxlarge { height: 50px !important; width: auto !important; }
    .widget-img-full { height: 40px !important; width: auto !important; }
    
    .topbar-widget-text {
        font-size: 7px !important;
        max-width: 70px !important;
    }
    .topbar-widget-text strong {
        font-size: 8px !important;
    }
    
    .topbar-evento-small { height: 40px !important; max-width: 60px !important; }
    .topbar-evento-medium { height: 45px !important; max-width: 70px !important; }
    .topbar-evento-large { height: 50px !important; max-width: 80px !important; }
    .topbar-evento-xlarge { height: 55px !important; max-width: 90px !important; }
    .topbar-evento-xxlarge { height: 60px !important; max-width: 100px !important; }
    
    .topbar-evento {
        max-width: 140px !important;
    }
    
    .bacheca-img {
        max-height: 120px !important;
    }

    /* ===== FIX WIDGET TOP-BAR MOBILE ===== */
    .topbar-widgets {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: stretch !important;
        gap: 6px !important;
        max-width: 100% !important;
        margin-top: 4px !important;
    }

    .topbar-widget-link {
        display: inline-flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        max-width: 60px !important;
        flex: 0 0 auto !important;
        min-height: 40px !important;
    }

    .topbar-evento {
        max-width: 60px !important;
        width: auto !important;
        height: auto !important;
        border-radius: 8px !important;
        overflow: hidden !important;
    }

    .topbar-evento img {
        width: 100% !important;
        height: auto !important;
        max-height: 25px !important;
        object-fit: contain !important;
        display: block !important;
    }

    .topbar-evento > div {
        padding: 2px 3px !important;
        font-size: 6px !important;
        line-height: 1.2 !important;
        background: rgba(0,0,0,0.7) !important;
        text-align: center !important;
            }

    .topbar-evento > div span {
        font-size: 6px !important;
        display: block !important;
        line-height: 1.2 !important;
    }

    .topbar-widget-banner {
        max-width: 60px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }

    .topbar-widget-banner img {
        max-height: 20px !important;
        max-width: 50px !important;
        height: auto !important;
        width: auto !important;
        display: block !important;
        margin: 0 auto !important;
    }

    .topbar-widget-text {
        font-size: 6px !important;
        max-width: 50px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        margin-top: 2px !important;
            }

    .topbar-widget-text strong {
        font-size: 7px !important;
        display: block !important;
    }

    /* Forza tutte le immagini dei widget a dimensioni ridotte */
    .topbar-widget-banner img,
    .topbar-evento img {
        max-width: 50px !important;
        max-height: 25px !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
    }

    /* ===== TICKER MOBILE ===== */
        .news-ticker .ticker-container {
        min-height: 40px !important;
        height: 40px !important;
    }
    .news-ticker .ticker-label {
        font-size: 10px !important;
    }
    .news-ticker .ticker-item {
        font-size: 10px !important;
    }
    
    /* ===== PLAYER MOBILE ===== */
        #coverContainer {
        width: 50px !important;
        height: 50px !important;
    }
        
    .play-btn, .stop-btn {
        font-size: 9px !important;
        padding: 9px 12px !important;
    }

    /* ===== NASCONDI WIDGET SE RICHIESTO ===== */
    
    /* ===== LAYOUT GENERALE ===== */
    .main-content-wrapper {
        padding-top: 20px !important;
    }
    
    body {
        font-size: 14px !important;
    }

    /* ===== MENU HAMBURGER (DINAMICO) ===== */
    .hamburger-btn {
        font-size: 30px !important;
        color: #ffd900 !important;
        top: 70px !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        background: transparent !important;
        border: none !important;
        position: fixed !important;
        right: 10px !important;
        z-index: 9999 !important;
        cursor: pointer !important;
        padding: 8px 12px !important;
        line-height: 1 !important;
    }
}

/* ================================================================
   MOBILE LANDSCAPE (ORIZZONTALE)
   ================================================================ */

@media (max-width: 768px) and (orientation: landscape) {
    /* ===== RIDUCI I WIDGET ===== */
    .topbar-widgets {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: flex-end !important;
        gap: 2px !important;
        max-width: 55% !important;
        margin-top: 0 !important;
        flex-shrink: 0 !important;
    }

    .topbar-widget-link {
        display: inline-flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        max-width: 50px !important;
        min-width: 35px !important;
        flex: 0 0 auto !important;
        min-height: 40px !important;
        padding: 1px !important;
    }

    .topbar-evento {
        max-width: 50px !important;
        min-width: 35px !important;
        border-radius: 4px !important;
    }

    .topbar-evento img {
        max-height: 25px !important;
        max-width: 40px !important;
    }

    .topbar-evento > div {
        display: none !important;
    }

    .topbar-widget-banner {
        max-width: 50px !important;
        min-width: 35px !important;
    }

    .topbar-widget-banner img {
        max-height: 25px !important;
        max-width: 40px !important;
    }

    .topbar-widget-text {
        display: none !important;
    }

    .topbar-widget-banner img,
    .topbar-evento img {
        max-width: 40px !important;
        max-height: 25px !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
    }

    /* ===== NASCONDI WIDGET SE RICHIESTO IN LANDSCAPE ===== */
    
}