/* ============================================================================
   mediaset-italia.css
   Dal Figma "Mediaset Italia"
   ============================================================================ */

/* ── INTRO ────────────────────────────────────────────────────────────────── */
/* Override box-shadow del vecchio style.css su #mainContent .wrapper */
.tg-intro__inner,
.tg-programs__inner {
    box-shadow: none !important;
    padding-top: 0 !important;
}
/* Wrapper del breadcrumb: 60px, stesso valore usato in tutto il sito
   (Markets, Contact, Footage, ecc.) per lo spazio tra header e breadcrumb */
#mainContent > .wrapper {
    box-shadow: none !important;
    padding-top: 70px !important;
}
.tg-intro {
    /* Era 60px 0 (70px totali col breadcrumb): ora 20px in alto, così con i 10px
       del breadcrumb arriva a 30px totali, standard del sito. 60px in basso invariato. */
    padding: 20px 0 60px 0;
}

.tg-intro__inner {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 80px;
    padding-right: 100px;
}

.tg-intro__left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tg-intro__title {
    font-family: 'Geologica', sans-serif;
    font-weight: 700;
    font-size: 36px;
    line-height: 36px;
    color: #2B75F5;
    margin: 0;
}

.tg-intro__subtitle {
    font-family: 'Geologica', sans-serif;
    font-weight: 700;
    font-size: 20px;
    line-height: 24px;
    color: #323E48;
    margin: 0;
}

.tg-intro__description {
    font-family: 'Geologica', sans-serif;
    font-weight: 300;
    font-size: 16px;
    line-height: 24px;
    color: #323E48;
}

.tg-intro__description p {
    margin: 0 0 12px 0;
}

.tg-intro__description strong {
    font-weight: 700;
}

.tg-intro__more-info {
    font-family: 'Geologica', sans-serif;
    font-weight: 300;
    font-size: 16px;
    color: #323E48;
    margin: 0;
}

.tg-intro__more-info a {
    color: #2B75F5;
    text-decoration: none;
}

.tg-intro__more-info a:hover {
    text-decoration: underline;
}

.tg-intro__right {
    flex: 1;
}

.tg-intro__video {
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
}

.tg-intro__video iframe {
    width: 100%;
    display: block;
    aspect-ratio: 16/9;
    border: none;
}

/* ── PROGRAMMING SCHEDULE ─────────────────────────────────────────────────── */
.tg-schedule {
    background-image: url('/wp-content/themes/mediasetdistribution-theme/assets/img/schedule-bg.png');
    background-size: cover;
    background-position: center;
    background-color: #0a1f5c;
    padding: 80px 0;
    width: 100%;
    margin-bottom: 80px;
}

.tg-schedule .wrapper {
    max-width: 100%;
    padding-right: 0;
}

.tg-schedule__inner {
    display: flex;
    flex-direction: column;
    gap: 40px;
    background: transparent !important;
}

.tg-schedule__title {
    font-family: 'Geologica', sans-serif;
    font-weight: 700;
    font-size: 24px;
    line-height: 29px;
    color: #FFFFFF;
    margin: 0;
}

/* Griglia giorni */
.tg-schedule__grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tg-schedule__row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 10px;
}

.tg-schedule__day {
    flex: 0 0 120px;
    background: #FFFFFF;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Geologica', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #0a1f5c;
    padding: 15px 10px;
    text-align: center;
}

.tg-schedule__slots {
    display: flex;
    flex-direction: row;
    gap: 10px;
    flex: 1;
    overflow-x: auto;
    cursor: grab;
    /* Scrollbar nascosta (drag-to-scroll via JS, scroll nativo touch/trackpad invariato) */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tg-schedule__slots::-webkit-scrollbar {
    display: none;
}

.tg-schedule__slots.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
    user-select: none;
}

.tg-schedule__slot {
    flex: 0 0 180px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    padding: 12px 15px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tg-slot__time {
    font-family: 'Geologica', sans-serif;
    font-weight: 300;
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    margin: 0;
}

.tg-slot__name {
    font-family: 'Geologica', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #FFFFFF;
    margin: 0;
}

/* ── PROGRAMS ─────────────────────────────────────────────────────────────── */
.tg-programs {
    padding: 80px 0;
    background: #FFFFFF;
}

.tg-programs__inner {
    padding-right: 100px;
}

.tg-programs__title {
    font-family: 'Geologica', sans-serif;
    font-weight: 700;
    font-size: 24px;
    line-height: 29px;
    color: #323E48;
    margin: 0 0 40px 0;
}

.tg-programs__table {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.tg-programs__header {
    display: flex;
    flex-direction: row;
    gap: 20px;
    padding-bottom: 15px;
}

.tg-programs__header > div {
    font-family: 'Geologica', sans-serif;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    color: #2B75F5;
}

/* Riga principale cliccabile */
.tg-programs__row--main {
    display: flex;
    flex-direction: row;
    gap: 20px;
    border-top: 1px dashed #323E48;
    padding: 15px 0;
    align-items: flex-start;
    cursor: pointer;
}

.tg-programs__row--main:hover .tg-col-tipology {
    color: #2B75F5;
}

/* Riga header dentro il dettaglio espanso */
.tg-programs__row--expanded-header {
    display: flex;
    flex-direction: row;
    gap: 20px;
    border-top: 1px dashed #323E48;
    padding: 15px 0;
    align-items: flex-start;
}

/* Righe dettaglio */
.tg-programs__row--detail {
    display: flex;
    flex-direction: row;
    gap: 20px;
    border-top: 1px dashed #323E48;
    padding: 20px 0;
    align-items: flex-start;
}

/* Sezione dettaglio accordion */
.tg-programs__detail {
    display: none;
    flex-direction: column;
}

.tg-programs__detail.is-open {
    display: flex;
}

/* Testi colonne */
.tg-programs__row--main > div,
.tg-programs__row--expanded-header > div {
    font-family: 'Geologica', sans-serif;
    font-size: 20px;
    line-height: 24px;
    color: #323E48;
}

.tg-col-tipology {
    flex: 0 0 280px;
    font-weight: 700;
}

.tg-col-percent {
    flex: 0 0 100px;
    font-weight: 300;
}

.tg-col-allocation {
    flex: 1;
    font-weight: 300;
}

.tg-col-logos {
    flex: 0 0 250px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* Logo piccolo nella riga principale */
.tg-program__logo--small {
    height: 30px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
}

/* Colonne accordion dettaglio */
.tg-programs__row--expanded-hd {
    display: flex;
    flex-direction: row;
    gap: 20px;
    border-top: 1px dashed #323E48;
    padding: 15px 0;
    align-items: flex-start;
}

.tg-programs__row--expanded-hd > div {
    font-family: 'Geologica', sans-serif;
    font-size: 20px;
    line-height: 24px;
    color: #323E48;
}

.tg-programs__row--detail {
    display: flex;
    flex-direction: row;
    gap: 20px;
    border-top: none;
    padding: 15px 0;
    align-items: flex-start;
}

.tg-col-logo-lg   { flex: 0 0 200px; }
.tg-col-detail-desc { flex: 1; font-family: 'Geologica', sans-serif; font-weight: 300; font-size: 18px; line-height: 22px; color: #323E48; }
.tg-col-detail-share { flex: 0 0 180px; font-family: 'Geologica', sans-serif; font-weight: 300; font-size: 18px; line-height: 22px; color: #323E48; }

.tg-detail__title {
    font-weight: 700;
    font-size: 18px;
    margin-right: 4px;
}

/* Logo grande nel dettaglio */
.tg-program__logo--large {
    max-width: 180px;
    max-height: 70px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Righe dettaglio testi */
.tg-detail__title {
    font-family: 'Geologica', sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 22px;
    color: #323E48;
    margin: 0 0 6px 0;
}

.tg-detail__desc {
    font-family: 'Geologica', sans-serif;
    font-weight: 300;
    font-size: 18px;
    line-height: 22px;
    color: #323E48;
    margin: 0;
}

.tg-detail__share {
    font-family: 'Geologica', sans-serif;
    font-weight: 300;
    font-size: 18px;
    line-height: 22px;
    color: #323E48;
}

.tg-program__logo {
    height: 40px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
}

/* ── RESPONSIVE ───────────────────────────────────────────────────────────── */
@media screen and (max-width: 1200px) {
    .tg-intro__inner,
    .tg-schedule__inner,
    .tg-programs__inner { padding-right: 60px; }
    .tg-intro__right { flex: 0 0 380px; }
}

@media screen and (max-width: 900px) {
    .tg-intro__inner { flex-direction: column; padding-right: 40px; }
    .tg-intro__right { flex: none; width: 100%; }
    .tg-schedule__inner,
    .tg-programs__inner { padding-right: 40px; }
    .tg-schedule__day { flex: 0 0 80px; font-size: 12px; }
    .tg-col-tipology { flex: 0 0 120px; }
    .tg-col-logos { flex: 0 0 150px; }
}

@media screen and (max-width: 600px) {
    .tg-schedule__inner,
    .tg-programs__inner { padding-right: 16px; }
    .tg-programs__row { flex-direction: column; }
    .tg-col-tipology,
    .tg-col-logos { flex: none; }
}