/*
Theme Name: C'È
Theme URI: http://localhost:8080
Author: C'È Network
Description: Tema personalizzato per la piattaforma televisiva C'È.
Version: 1.0
*/

* { box-sizing: border-box; }

body {
    margin: 0;
    background: #0b1019;
    color: #f5f7fa;
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 6%;
    background: #111b2a;
}

.logo {
    font-size: 38px;
    font-weight: 900;
    letter-spacing: -3px;
}

.logo span { color: #34d4c4; }

.site-header nav {
    display: flex;
    gap: 28px;
    font-size: 15px;
}

.ce-catalogo {
    padding: 55px 7%;
    min-height: 75vh;
}

.ce-catalogo h1 {
    font-size: clamp(36px, 5vw, 58px);
    margin: 0 0 12px;
}

.ce-catalogo > p {
    color: #b7c7d7;
    margin-bottom: 35px;
}

.ce-griglia {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.ce-scheda {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 155px;
    padding: 22px;
    border-radius: 12px;
    background: linear-gradient(135deg, #24465c, #142438);
    transition: transform .2s, background .2s;
}

.ce-scheda:hover {
    transform: scale(1.03);
    background: #315773;
}

.ce-play {
    font-size: 25px;
    color: #53daca;
}

.ce-scheda strong {
    font-size: 20px;
}

.hero-home {
    position: relative;
    overflow: hidden;
}

.hero-home::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 75% 25%, rgba(78,217,202,0.12), transparent 22%),
        radial-gradient(circle at 85% 75%, rgba(255,255,255,0.05), transparent 18%);
    pointer-events: none;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 22px;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    color: var(--text);
    font-weight: 800;
    transition: transform .2s ease, background .2s ease;
}

.secondary-button:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.10);
}

.home-section {
    margin-bottom: 58px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.section-heading h2 {
    margin: 0;
}

.section-link {
    color: var(--accent);
    font-weight: 700;
    font-size: 14px;
}

.ce-tag {
    display: inline-block;
    align-self: flex-start;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(78,217,202,0.12);
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.ce-meta {
    color: var(--muted);
    font-size: 14px;
}

.ce-scheda-territorio {
    min-height: 210px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)),
        linear-gradient(135deg, #19344a 0%, #102130 60%, #0a1520 100%);
}

.ce-scheda-programma {
    min-height: 210px;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.quick-box {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 150px;
    padding: 22px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #13273a, #0d1a27);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: transform .18s ease, border-color .18s ease;
}

.quick-box:hover {
    transform: translateY(-4px);
    border-color: rgba(78,217,202,0.35);
}

.quick-label {
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.quick-box strong {
    font-size: 24px;
    line-height: 1.15;
    letter-spacing: -0.5px;
}

@media (max-width: 900px) {
    .quick-grid {
        grid-template-columns: 1fr;
    }
}

/* Banner cinematografico C'È */
.hero-home {
    max-width: none;
    min-height: 540px;
    padding: 90px max(7%, calc((100% - 1264px)/2));
    background-color: #14283d;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.hero-home .hero-content {
    position: relative;
    z-index: 1;
}

.hero-home h1 {
    font-size: clamp(48px, 7vw, 86px);
    max-width: 780px;
}

.hero-home p {
    max-width: 550px;
    color: #e1e8f0;
}

@media (max-width: 700px) {
    .hero-home {
        min-height: 440px;
        padding: 65px 6%;
    }
}

/* C'È - Carosello principale */
.ce-carousel {
    position: relative;
    background: #101b29;
    overflow: hidden;
}

.ce-slide {
    position: relative;
    min-height: 540px;
    padding: 95px 7% 105px;
    display: flex;
    align-items: center;
    isolation: isolate;
}

.ce-slide[hidden] {
    display: none !important;
}

.ce-slide-image {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-size: cover;
    background-position: center;
}

.ce-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg,
        #091018 0%,
        rgba(9,16,24,.92) 32%,
        rgba(9,16,24,.22) 100%);
}

.ce-slide-content {
    max-width: 750px;
}

.ce-slide h1 {
    font-size: clamp(42px, 7vw, 82px);
    line-height: 1.05;
    margin: 15px 0 22px;
}

.ce-slide p {
    max-width: 540px;
    font-size: 19px;
    color: #e0e7ef;
}

.ce-carousel-controls {
    position: absolute;
    bottom: 22px;
    left: 7%;
    right: 7%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ce-prev, .ce-next {
    width: 45px;
    height: 45px;
    border: 1px solid #ffffff55;
    border-radius: 50%;
    color: white;
    background: #0008;
    font-size: 30px;
    cursor: pointer;
}

.ce-carousel-dots {
    display: flex;
    gap: 10px;
}

.ce-carousel-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 20px;
    background: #ffffff77;
    cursor: pointer;
}

.ce-carousel-dots button[aria-current="true"] {
    width: 30px;
    background: #4ed9ca;
}

@media (max-width: 700px) {
    .ce-slide {
        min-height: 440px;
        padding: 65px 6% 100px;
    }
}

/* Logo del programma sovrapposto al banner */
.ce-program-logo {
    display: block;
    width: auto;
    max-width: min(560px, 85vw);
    max-height: 220px;
    object-fit: contain;
    object-position: left center;
    margin: 15px 0 25px;
}

@media (max-width: 700px) {
    .ce-program-logo {
        max-width: 90%;
        max-height: 150px;
    }
}

/* Intestazione responsive C'È */
.site-header {
    position: relative;
    z-index: 100;
    padding: 0 6%;
    background: #111b2a;
}

.ce-header-inner {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.site-header .logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    font-size: 34px;
    font-weight: 900;
}

.ce-site-logo {
    display: block;
    width: auto;
    max-width: 155px;
    max-height: 60px;
    object-fit: contain;
}

.site-header nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.site-header nav a {
    font-weight: 600;
    padding: 12px 4px;
}

.site-header nav a:hover {
    color: #4ed9ca;
}

.ce-menu-toggle {
    display: none;
    border: 1px solid #ffffff44;
    border-radius: 8px;
    padding: 9px 14px;
    background: transparent;
    color: white;
    font-size: 25px;
    cursor: pointer;
}

.ce-skip-link {
    position: absolute;
    top: -100px;
    left: 12px;
    z-index: 1000;
    background: white;
    color: black;
    padding: 12px;
}

.ce-skip-link:focus {
    top: 12px;
}

.site-header a:focus-visible,
.site-header button:focus-visible {
    outline: 3px solid #4ed9ca;
    outline-offset: 4px;
}

@media (max-width: 700px) {
    .ce-header-inner {
        min-height: 70px;
    }

    .ce-site-logo {
        max-width: 120px;
        max-height: 48px;
    }

    .ce-menu-toggle {
        display: block;
    }

    .site-header nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        padding: 15px 6% 25px;
        background: #111b2a;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        box-shadow: 0 15px 25px #0005;
    }

    .site-header nav.is-open {
        display: flex;
    }

    .site-header nav a {
        padding: 15px;
        border-radius: 8px;
    }
}

/* Dimensioni ufficiali logo C'È */
.site-header .ce-site-logo {
    max-width: 200px;
    max-height: 75px;
    width: auto;
    height: auto;
}

@media (max-width: 700px) {
    .site-header .ce-site-logo {
        max-width: 145px;
        max-height: 55px;
    }
}

/* Dimensione definitiva del logo nell'intestazione */
.site-header .ce-site-logo {
    width: auto;
    height: 52px;
    max-width: 180px;
    max-height: 52px;
    object-fit: contain;
}

@media (max-width: 700px) {
    .site-header .ce-site-logo {
        height: 42px;
        max-height: 42px;
        max-width: 145px;
    }
}

/* C'E - Carosello responsive */

.ce-slide-image {
    background-size: cover;
    background-position: center top;
}

.ce-slide-content {
    position: relative;
    z-index: 2;
}

.ce-program-logo {
    display: block;
    width: auto;
    height: auto;
    max-width: min(100%, 520px);
    max-height: 170px;
    object-fit: contain;
    object-position: left center;
}

.ce-slide .primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 13px 24px;
    border-radius: 8px;
    background: #ffffff;
    color: #101820;
    font-size: 15px;
    font-weight: 700;
}

/* Smartphone */
@media (max-width: 600px) {

    .ce-slide {
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        align-items: stretch;
        min-height: 0;
        padding: 0;
        overflow: hidden;
    }

    .ce-slide-image {
        position: relative;
        inset: auto;
        z-index: 0;
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        background-size: cover;
        background-position: center top;
        flex-shrink: 0;
    }

    .ce-slide::before {
        display: none;
    }

    .ce-slide-content {
        width: 100%;
        max-width: none;
        padding: 24px 6% 35px;
        background: #101b29;
    }

    .ce-slide .eyebrow {
        font-size: 11px;
        margin-bottom: 18px;
    }

    .ce-program-logo {
        width: auto;
        max-width: 100%;
        max-height: 105px;
        margin: 0 0 20px;
    }

    .ce-slide h1 {
        font-size: clamp(29px, 8vw, 40px);
        margin-bottom: 20px;
    }

    .ce-slide p {
        font-size: 15px;
        line-height: 1.5;
        margin-bottom: 22px;
    }

    .ce-slide .primary-button {
        width: 100%;
        min-height: 48px;
        text-align: center;
    }

    .section-heading {
        align-items: flex-start;
        gap: 12px;
    }

    .section-heading h2 {
        font-size: 21px;
        line-height: 1.2;
        min-width: 0;
    }

    .section-link {
        flex-shrink: 0;
        white-space: nowrap;
        font-size: 12px;
        padding-top: 5px;
    }

    .ce-carousel-controls {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        padding: 0 6% 16px;
        background: #101b29;
    }
}

/* C'E - Allineamento definitivo sezioni home */

body.home .content {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 40px 6% 70px;
}

body.home .section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

body.home .section-heading h2 {
    margin: 0;
    min-width: 0;
    font-size: clamp(22px, 2.5vw, 32px);
}

body.home .section-link {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 14px;
}

body.home .ce-griglia,
body.home .quick-grid {
    width: 100%;
}

@media (max-width: 700px) {
    body.home .content {
        padding: 28px 18px 50px;
    }

    body.home .section-heading h2 {
        font-size: 20px;
    }

    body.home .section-link {
        font-size: 12px;
    }
}

/* Banner mobile: mostra l'immagine completa */
@media (max-width: 600px) {
    .ce-slide-image {
        background-size: contain;
        background-position: center center;
        background-color: #0c1623;
    }
}

/* Correzione banner mobile: una sola immagine */
@media (max-width: 600px) {
    .ce-slide-image {
        background-repeat: no-repeat !important;
        background-size: contain !important;
        background-position: center center !important;
    }
}

/* Evidenziazione navigazione telecomando */
body.tv-navigation-active a:focus,
body.tv-navigation-active button:focus {
    outline: 4px solid #4ed9ca;
    outline-offset: 4px;
    box-shadow: 0 0 20px rgba(78,217,202,.5);
}

.ce-scheda:focus-visible,
.quick-box:focus-visible,
.primary-button:focus-visible {
    outline: 4px solid #4ed9ca;
    outline-offset: 4px;
}

/* C'E - Pagine territorio e schede canale */

.ce-territorio-page {
    width: 100%;
    max-width: 1600px;
    min-height: 65vh;
    margin: 0 auto;
    padding: 55px 7% 80px;
}

.ce-page-heading {
    margin-bottom: 55px;
}

.ce-page-eyebrow {
    color: #4ed9ca;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.ce-page-heading h1 {
    margin: 15px 0;
    font-size: clamp(38px, 5vw, 66px);
}

.ce-page-heading > p:last-child {
    color: #b7c7d7;
    font-size: 17px;
}

.ce-territorio-canali h2 {
    margin-bottom: 24px;
}

.ce-channel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
    gap: 22px;
}

.ce-channel-card {
    display: block;
    overflow: hidden;
    border-radius: 14px;
    background: #142235;
    border: 2px solid transparent;
    transition: transform .2s ease, border-color .2s ease;
}

.ce-channel-card:hover,
.ce-channel-card:focus-visible,
body.tv-navigation-active .ce-channel-card:focus {
    transform: translateY(-4px);
    border-color: #4ed9ca;
    outline: none;
    box-shadow: 0 0 22px rgba(78,217,202,.25);
}

.ce-channel-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
}

.ce-channel-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #24465c, #101b29);
}

.ce-channel-placeholder span {
    color: white;
    font-size: 58px;
    font-weight: 900;
    letter-spacing: -3px;
}

.ce-channel-info {
    padding: 20px;
}

.ce-channel-label {
    color: #4ed9ca;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
}

.ce-channel-info h3 {
    margin: 10px 0 18px;
    font-size: 23px;
}

.ce-channel-action {
    color: #c2d4e4;
    font-size: 14px;
}

@media (max-width: 700px) {
    .ce-territorio-page {
        padding: 35px 18px 55px;
    }

    .ce-page-heading {
        margin-bottom: 35px;
    }
}

/* Marchio automatico C'È + territorio */
.ce-territory-brand {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
}

.ce-territory-brand .ce-territory-logo {
    display: block;
    width: auto;
    height: 58px;
    max-width: 180px;
    object-fit: contain;
}

@media (max-width: 600px) {
    .ce-territory-brand {
        gap: 10px;
    }

    .ce-territory-brand .ce-territory-logo {
        height: 38px;
        max-width: 125px;
    }
}

/* Logo ufficiale nelle schede dei canali */
.ce-channel-placeholder .ce-channel-brand-logo {
    display: block;
    width: auto;
    height: auto;
    max-width: 60%;
    max-height: 85px;
    object-fit: contain;
}

/* C'È - Schede automatiche dei programmi */

.ce-program-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fill,
        minmax(min(100%, 280px), 1fr)
    );
    gap: 24px;
    margin-top: 25px;
}

.ce-program-card {
    display: block;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 14px;
    background: #142235;
    transition: transform .2s ease, border-color .2s ease;
}

.ce-program-card:hover,
.ce-program-card:focus-visible,
body.tv-navigation-active .ce-program-card:focus {
    transform: translateY(-4px);
    border-color: #4ed9ca;
    outline: none;
    box-shadow: 0 0 22px rgba(78,217,202,.25);
}

.ce-program-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0d1826;
}

.ce-program-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ce-program-placeholder {
    font-size: 46px;
    font-weight: 900;
}

.ce-program-info {
    padding: 20px;
}

.ce-program-info h3 {
    margin: 0 0 14px;
    font-size: 21px;
}

.ce-program-info span {
    color: #b7c7d7;
    font-size: 14px;
}

/* C'È - Pagina automatica dei programmi */

.ce-program-page {
    min-height: 65vh;
}

.ce-program-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    min-height: 440px;
    padding: 65px 7%;
    overflow: hidden;
    background: #101b29;
}

.ce-program-hero-image {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.ce-program-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(
        90deg,
        #091018 0%,
        rgba(9,16,24,.9) 35%,
        rgba(9,16,24,.15) 100%
    );
}

.ce-program-hero-content {
    max-width: 650px;
}

.ce-program-page-logo {
    display: block;
    width: auto;
    height: auto;
    max-width: min(100%, 500px);
    max-height: 170px;
    object-fit: contain;
    object-position: left center;
    margin: 22px 0;
}

.ce-program-hero h1 {
    font-size: clamp(38px, 5vw, 70px);
}

.ce-program-description {
    max-width: 560px;
    color: #e0e7ef;
    font-size: 17px;
    line-height: 1.6;
}

.ce-program-channel {
    margin-top: 25px;
    color: #b7c7d7;
}

.ce-program-channel a {
    color: #4ed9ca;
    font-weight: 700;
}

.ce-program-seasons {
    max-width: 1600px;
    margin: 0 auto;
    padding: 45px 7% 80px;
}

.ce-season-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fill,
        minmax(min(100%, 280px), 1fr)
    );
    gap: 22px;
    margin-top: 25px;
}

.ce-season-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    min-height: 175px;
    padding: 22px;
    border: 2px solid transparent;
    border-radius: 14px;
    background: linear-gradient(135deg, #203c52, #101b29);
}

.ce-season-card:hover,
.ce-season-card:focus-visible,
body.tv-navigation-active .ce-season-card:focus {
    border-color: #4ed9ca;
    outline: none;
    box-shadow: 0 0 22px rgba(78,217,202,.25);
}

.ce-season-icon {
    color: #4ed9ca;
    font-size: 25px;
}

.ce-season-card strong {
    font-size: 20px;
}

.ce-season-action {
    color: #b7c7d7;
    font-size: 14px;
}

@media (max-width: 700px) {
    .ce-program-hero {
        min-height: 0;
        padding: 50px 18px;
    }

    .ce-program-hero-image {
        opacity: .25;
    }

    .ce-program-page-logo {
        max-height: 120px;
    }

    .ce-program-seasons {
        padding: 35px 18px 60px;
    }
}

/* C'È — pulsante ricerca */
.ce-search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 8px;
    color: #fff;
    background: transparent;
    border: 1px solid #46566a;
    border-radius: 8px;
    cursor: pointer;
}
.ce-search-toggle:hover,
.ce-search-toggle:focus-visible {
    background: #24364a;
    outline: 2px solid #ffb000;
    outline-offset: 2px;
}

/* C'È - Pannello ricerca */
.ce-search-panel[hidden] { display: none !important; }

.ce-search-panel {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, .94);
    color: white;
    overflow-y: auto;
}

.ce-search-content {
    position: relative;
    width: min(850px, 94%);
    margin: 5vh auto;
    padding: 24px;
}

#ce-search-close {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 26px;
    color: white;
    background: transparent;
    border: 0;
    cursor: pointer;
}

#ce-search-input {
    box-sizing: border-box;
    width: 100%;
    padding: 17px;
    margin: 16px 0 24px;
    font-size: 22px;
    color: white;
    background: #1b2735;
    border: 2px solid #53677e;
    border-radius: 10px;
}

.ce-search-keyboard {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 7px;
}

.ce-search-keyboard button {
    min-height: 48px;
    color: white;
    background: #273747;
    border: 1px solid #53677e;
    border-radius: 7px;
    cursor: pointer;
    font-size: 18px;
}

.ce-search-keyboard button.ce-wide-key {
    grid-column: span 3;
}

.ce-search-keyboard button:focus-visible,
#ce-search-close:focus-visible,
#ce-search-input:focus-visible {
    outline: 3px solid #ffb000;
    outline-offset: 2px;
}

#ce-search-results {
    margin-top: 25px;
    font-size: 18px;
}

@media (max-width: 550px) {
    .ce-search-content { padding: 15px 0; }
    .ce-search-keyboard { gap: 3px; }
    .ce-search-keyboard button {
        min-height: 39px;
        font-size: 14px;
    }
}

/* C'È — ricerca immediata */
.ce-search-submit {
    display: block;
    width: 100%;
    padding: 13px;
    margin: -12px 0 20px;
    color: #fff;
    font: inherit;
    font-weight: bold;
    background: #19465c;
    border: 1px solid #5b93ae;
    border-radius: 8px;
    cursor: pointer;
}
.ce-search-submit:focus-visible,
.ce-search-result:focus-visible {
    outline: 3px solid #ffb000;
}
#ce-search-results h3 {
    margin: 20px 0 8px;
    font-size: 17px;
    color: #99b5ca;
}
.ce-search-result {
    display: block;
    padding: 13px 16px;
    margin: 5px 0;
    border: 1px solid #405469;
    border-radius: 8px;
    background: #1e2d3c;
    color: #fff;
    text-decoration: none;
}
.ce-search-result:hover,
.ce-search-result:focus-visible {
    background: #34495d;
}

/* C'È — pulsante Condividi coordinato alla lente */
.ce-share-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 8px;
    color: #fff;
    background: transparent;
    border: 1px solid #46566a;
    border-radius: 8px;
    cursor: pointer;
}

.ce-share-toggle:hover,
.ce-share-toggle:focus-visible {
    background: #24364a;
    outline: 2px solid #ffb000;
    outline-offset: 2px;
}

/* C'È - Condivisione discreta nel player */
#ce-video-share {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 15;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 8px;
    color: rgba(255,255,255,.75);
    background: rgba(0,0,0,.35);
    font-size: 19px;
    cursor: pointer;
}

#ce-video-share:hover,
#ce-video-share:focus-visible {
    color: white;
    background: rgba(0,0,0,.8);
    outline: 2px solid white;
}

@media (hover: hover) and (pointer: fine) {
    #ce-video-share { opacity: .45; }
    #ce-video-share:hover,
    #ce-video-share:focus-visible { opacity: 1; }
}

/* C'È - Pannello condivisione dentro il player */
#ce-share-panel[hidden],
#ce-video-share[hidden] {
    display: none !important;
}

#ce-share-panel {
    position: absolute;
    inset: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    background: rgba(10, 15, 22, .94);
    color: #fff;
}

#ce-share-panel h2 {
    margin: 0 0 18px;
    font-size: clamp(23px, 4vw, 36px);
}

#ce-share-panel button {
    width: min(320px, 90%);
    padding: 14px;
    background: #273747;
    color: white;
    border: 1px solid #53677e;
    border-radius: 8px;
    font: inherit;
    cursor: pointer;
}

#ce-share-panel button:focus-visible {
    outline: 3px solid #ffb000;
}

#ce-share-message {
    min-height: 24px;
    color: #ddd;
}

/* C'È - Destinazioni di condivisione */
#ce-social-menu[hidden] {
    display: none !important;
}

#ce-social-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: min(380px, 95%);
}

#ce-social-menu a {
    padding: 11px 14px;
    color: white;
    background: #34495d;
    border: 1px solid #688097;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
}

#ce-social-menu a:hover,
#ce-social-menu a:focus-visible {
    background: #496780;
    outline: 3px solid #ffb000;
}

/* C'È — icone social */
#ce-social-menu a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

#ce-social-menu svg {
    flex-shrink: 0;
}

/* C'È — marchio televisivo in sovrimpressione */
#ce-video-watermark {
    position: absolute;
    top: 18px;
    right: 65px;
    z-index: 12;
    width: clamp(55px, 7vw, 105px);
    height: auto;
    max-height: 65px;
    object-fit: contain;
    opacity: .65;
    pointer-events: none;
    user-select: none;
}

/* C'È Italia e carosello regioni */
.ce-italia-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    min-height: 160px;
    padding: 28px 36px;
    border-radius: 14px;
    background: linear-gradient(115deg,#102b4c,#205887);
    color: white;
    text-decoration: none;
}
.ce-italia-card strong { font-size: clamp(27px,3vw,42px); }
.ce-italia-label { font-size: 12px; letter-spacing: 2px; opacity: .8; }
.ce-regioni-wrap { display:flex; align-items:center; gap:10px; }
.ce-regioni-track {
    display:flex;
    flex:1;
    min-width:0;
    gap:15px;
    overflow-x:auto;
    scroll-behavior:smooth;
    scrollbar-width:none;
    scroll-snap-type:x mandatory;
}
.ce-regioni-track::-webkit-scrollbar { display:none; }
.ce-regioni-track .ce-regione {
    flex:0 0 calc((100% - 60px) / 5);
    min-width:0;
    scroll-snap-align:start;
}
.ce-regioni-arrow {
    flex:0 0 38px;
    height:54px;
    border:0;
    border-radius:8px;
    background:#203b59;
    color:white;
    font-size:32px;
    cursor:pointer;
}
.ce-regioni-arrow:focus-visible,
.ce-italia-card:focus-visible,
.ce-regione:focus-visible {
    outline:3px solid #fff;
    outline-offset:3px;
}
@media(max-width:900px) {
    .ce-regioni-track .ce-regione { flex-basis:calc((100% - 15px)/2); }
}
@media(max-width:550px) {
    .ce-regioni-track .ce-regione { flex-basis:85%; }
}

/* C'È METEO ITALIA */
.ce-meteo {
    max-width: 1500px;
    margin: auto;
    padding: 32px 4% 55px;
    color: #fff;
}
.ce-meteo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}
.ce-meteo-header h1 {
    margin: 8px 0;
    font-size: clamp(30px, 4vw, 58px);
}
.ce-meteo-header h1 span { color: #64b9ff; }
.ce-meteo-header p { color: #a7bbd0; }
.ce-meteo-eyebrow {
    color: #75b9f5;
    font-size: 12px;
    letter-spacing: 2px;
}
.ce-meteo-live {
    padding: 10px 16px;
    background: #173c60;
    border-radius: 8px;
    color: #a5d9ff;
    font-size: 12px;
}
.ce-meteo-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}
.ce-meteo-tabs button {
    border: 0;
    border-radius: 8px;
    background: #203d5e;
    color: white;
    padding: 13px 28px;
    cursor: pointer;
    font-weight: 700;
}
.ce-meteo-tabs button.active,
.ce-meteo-tabs button:focus-visible {
    background: #2984cf;
    outline: 2px solid #87cfff;
}
.ce-meteo-screen {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(240px, 1fr);
    gap: 18px;
}
.ce-meteo-map {
    position: relative;
    background: linear-gradient(145deg, #183e62, #081e33);
    border: 1px solid #315676;
    border-radius: 14px;
    min-height: 420px;
    overflow: hidden;
}
.ce-meteo-map-label {
    position: absolute;
    top: 18px;
    left: 20px;
    z-index: 1;
    background: #092640c9;
    padding: 10px 15px;
    border-radius: 7px;
    font-weight: 700;
}
.ce-meteo-map-placeholder {
    display: flex;
    height: 100%;
    min-height: 420px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 15px;
}
.ce-meteo-sun {
    font-size: 85px;
    animation: ce-sun-pulse 5s ease-in-out infinite;
}
@keyframes ce-sun-pulse {
    50% { transform: scale(1.13); opacity: .75; }
}
.ce-meteo-map-placeholder strong { font-size: 26px; }
.ce-meteo-map-placeholder p { color: #b4c9dd; }
.ce-meteo-sidebar {
    padding: 24px;
    border-radius: 14px;
    background: #122c47;
}
.ce-meteo-sidebar h2 { margin-top: 0; }
.ce-meteo-info {
    display: flex;
    flex-direction: column;
    gap: 7px;
    border-bottom: 1px solid #36516c;
    padding: 15px 0;
}
.ce-meteo-info span { color: #a5bbd0; font-size: 13px; }
.ce-meteo-info strong { font-size: 17px; }
.ce-meteo-alert {
    margin-top: 18px;
    padding: 18px 22px;
    background: #4d2b31;
    border: 1px solid #a15961;
    border-radius: 10px;
    display: flex;
    gap: 20px;
    align-items: center;
}
.ce-meteo-alert strong { white-space: nowrap; }
.ce-meteo-ticker {
    display: flex;
    align-items: center;
    gap: 0;
    background: #dcae42;
    color: #122238;
    border-radius: 9px;
    overflow: hidden;
    margin-top: 12px;
    min-height: 52px;
}
.ce-meteo-ticker > strong {
    padding: 16px;
    background: #f1c65d;
    white-space: nowrap;
    z-index: 1;
}
.ce-meteo-ticker-window {
    min-width: 0;
    flex: 1;
    overflow: hidden;
}
.ce-meteo-ticker-text {
    white-space: nowrap;
    width: max-content;
    animation: ce-meteo-scroll 28s linear infinite;
}
@keyframes ce-meteo-scroll {
    from { transform: translateX(100vw); }
    to { transform: translateX(-100%); }
}
@media (max-width: 800px) {
    .ce-meteo-screen { grid-template-columns: 1fr; }
    .ce-meteo-header { flex-direction: column; align-items: flex-start; }
    .ce-meteo-alert { flex-direction: column; align-items: flex-start; }
    .ce-meteo-tabs button { padding: 12px 15px; flex: 1; }
}

/* C'È METEO - CITTÀ ITALIANE */
.ce-meteo-cities { margin-top: 28px; }
.ce-meteo-cities h2 { margin-bottom: 18px; }
.ce-meteo-city-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.ce-meteo-city {
    padding: 22px;
    background: linear-gradient(145deg,#183c5e,#10263e);
    border: 1px solid #305575;
    border-radius: 12px;
}
.ce-meteo-city h3 { margin: 0 0 16px; font-size: 18px; }
.ce-city-temp {
    font-size: 32px;
    font-weight: 700;
    color: #8bd1ff;
}
.ce-city-condition {
    margin: 12px 0 0;
    color: #b7c9d9;
    font-size: 13px;
}
@media(max-width:900px) {
    .ce-meteo-city-grid { grid-template-columns: repeat(2,1fr); }
}
@media(max-width:500px) {
    .ce-meteo-city-grid { grid-template-columns: 1fr; }
}
