/*
   Grade de programacao (#programacao) - porte do preview oficial.
   Abas de trilha (mbnf / Woman & Sports / Longevidade) com paleta propria cada.
*/

#programacao.schedule {
    --program-surface: #f8f0e8;
    --program-selected: #ebdbcf;
    --room-accent: #ae7a8a;
    background: var(--program-surface);
    color: var(--wine);
    padding: 90px 6vw 88px;
    transition: background-color .55s ease;
}

#programacao.schedule[data-trilha-selecionada="sports"] {
    --program-surface: #eef0e3;
    --program-selected: #dce2c8;
    --room-accent: #C7CB97;
}

#programacao.schedule[data-trilha-selecionada="longevity"] {
    --program-surface: #f1eaf3;
    --program-selected: #e3d5e9;
    --room-accent: #D1B4E0;
}

#programacao.schedule[data-trilha-selecionada="todas"] {
    --program-surface: #f8f0e8;
    --program-selected: #ebdbcf;
    --room-accent: #754757;
}

/* Cabecalho da secao */
.program-heading {
    margin-bottom: 43px;
}

.program-heading .section-name {
    color: var(--wine);
    font-family: var(--font-primary), Arial, sans-serif;
    font-size: clamp(28px, 2.5vw, 36px);
    font-weight: 400;
    letter-spacing: -.03em;
    line-height: 1.12;
    margin: 0 0 18px;
}

/* Linha fina acima do titulo da secao, no mesmo tom do texto. */
.program-heading .section-name:before {
    content: '';
    display: block;
    width: 36px;
    height: 2px;
    background: currentColor;
    opacity: .65;
    margin-bottom: 14px;
}

.program-heading .section-message {
    font-family: var(--font-primary), Arial, sans-serif;
    font-size: clamp(27px, 2.65vw, 38px);
    font-weight: 300;
    letter-spacing: -.025em;
    line-height: 1.18;
    margin: 0;
    max-width: 650px;
}

.program-heading .section-message em { font-weight: 600; font-size: 1.15em; line-height: 1.16; }

.program-mobile-break { display: none; }

/* Cabecalho de dia dentro da lista (substitui as abas de dia removidas). */
.program-day-heading {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--wine);
    margin: 32px 0 14px;
    padding-top: 20px;
    border-top: 1px solid #54162820;
}

.program-day-heading:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

/* Barra de ferramentas: abas de trilha + CTA */
.program-toolbar {
    position: sticky;
    top: 70px;
    z-index: 12;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    border-bottom: 1px solid #54162820;
    background: var(--program-surface);
    padding: 10px 0;
    margin-bottom: 48px;
}

.program-room-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.program-room-tabs button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 9px 14px;
    border: 1px solid #54162830;
    border-radius: 0 14px 0 0;
    background: transparent;
    color: var(--wine);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
    white-space: nowrap;
    transition: background-color .2s, border-color .2s;
}

.program-room-tabs button:before {
    content: '';
    display: inline-block;
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    border-radius: 100% 0 0 0;
    background: var(--tab-color, #ead7c8);
}

.program-room-tabs button[data-agenda-trilha="sports"] { --tab-color: #c7cb97; --tab-edge: #92965f; }
.program-room-tabs button[data-agenda-trilha="longevity"] { --tab-color: #d1b4e0; --tab-edge: #aa84be; }
.program-room-tabs button.program-todas-trilhas { --tab-color: #541628; --tab-edge: #541628; }

.program-room-tabs button[aria-pressed="true"] {
    border-color: var(--tab-edge, #ae8d78);
    font-weight: 600;
}

@media (hover: hover) {
    .program-room-tabs button:hover {
        background: var(--tab-color, #ead7c8);
        border-color: var(--tab-edge, #ae8d78);
    }
}

.program-toolbar-actions { display: flex; align-items: center; }
.program-registration { font-size: 12px; min-height: 43px; padding: 11px 15px; gap: 20px; white-space: nowrap; }

/* Conteudo: introducao da sala + lista de horarios */
.program-content {
    display: grid;
    grid-template-columns: minmax(170px, .8fr) minmax(0, 2.2fr);
    gap: 7vw;
    align-items: start;
}

.program-content:has(.program-parallel) {
    grid-template-columns: minmax(125px, .55fr) minmax(0, 2.45fr);
    gap: 4vw;
}

.program-room-intro { padding-top: 9px; padding-left: 20px; border-left: 3px solid var(--room-accent); }
.program-room-intro .eyebrow { font-size: 9px; letter-spacing: .1em; color: #a07c6e; margin: 0 0 17px; }
.program-room-intro .eyebrow:before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 100% 0 0 0;
    background: var(--room-accent);
    vertical-align: -2px;
    margin-right: 8px;
}

.program-sala-ativa {
    color: var(--wine);
    font-family: var(--font-primary), Arial, sans-serif;
    font-size: clamp(27px, 2.7vw, 40px);
    font-weight: 300;
    line-height: 1.05;
    letter-spacing: -.04em;
    margin: 0 0 24px;
}

.program-data { display: block; font-size: 12px; font-weight: 400; margin-bottom: 44px; }

.program-time-row {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    padding: 25px 13px 27px;
    border-bottom: 1px solid #54162814;
    transition: background-color .55s ease;
}

.program-time-row:first-of-type { padding-top: 6px; }
.program-time-row:last-of-type { border-bottom: 0; }

/* nth-of-type (nao nth-child): os cabecalhos de dia (.program-day-heading, um <p>) ficam
   intercalados na lista e nao devem quebrar a contagem par/impar das linhas de horario. */
.program-time-row:nth-of-type(even) {
    background: color-mix(in srgb, var(--program-surface) 80%, var(--program-selected) 20%);
    border-radius: 3px;
}

.program-clock { padding-top: 23px; }
.program-clock time { display: block; font-size: 22px; line-height: 1; font-weight: 300; letter-spacing: -.035em; }
.program-clock > span { display: block; margin-top: 9px; font-size: 10px; color: #a4887b; line-height: 1.2; }

.program-session { padding: 0; }
.program-session-kind { display: block; font-size: 10px; color: #a28071; font-weight: 300; line-height: 1.2; margin-bottom: 10px; }

.program-session h3 {
    color: var(--wine);
    font-family: var(--font-primary), Arial, sans-serif;
    font-size: clamp(21px, 2.05vw, 31px);
    font-weight: 300;
    line-height: 1.15;
    letter-spacing: -.035em;
    margin: 0 0 13px;
    max-width: 650px;
}

.program-session-speaker { font-size: 13px; color: #886458; font-weight: 300; margin: 0; line-height: 1.3; }
.program-session-speaker:before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #c8a48d;
    margin-right: 9px;
    vertical-align: middle;
}

/* Horario de cada sessao quando comparando trilhas (cada coluna tem seu proprio horario,
   diferente do relogio unico da visao de trilha unica). */
.program-session-horario { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.program-session-horario time { font-size: 15px; font-weight: 400; letter-spacing: -.02em; color: var(--wine); }
.program-session-horario > span { font-size: 10px; color: #a4887b; }

/* Visao "Todas as salas": uma coluna por trilha, cada uma com seu titulo e suas sessoes do dia. */
.program-parallel { display: grid; grid-template-columns: repeat(var(--colunas, 3), minmax(0, 1fr)); gap: 25px; margin-top: 6px; }
.program-parallel .program-session h3 { font-size: 20px; }

.program-column { display: flex; flex-direction: column; gap: 28px; }

.program-column-heading {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: .02em;
    color: #7d4759;
    margin: 0 0 4px;
    padding-bottom: 12px;
    border-bottom: 1px solid #54162820;
}

.program-column[data-trilha="sports"] .program-column-heading { color: #788059; }
.program-column[data-trilha="longevity"] .program-column-heading { color: #94759e; }

/* Data de cada grupo dentro da coluna - toda coluna comeca com uma (igual as outras), e o
   mbnf (que tem sessoes em mais de um dia) ganha uma segunda antes do proximo grupo. */
.program-column-day {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .03em;
    color: #a07c6e;
    margin: 0;
    padding-top: 12px;
    border-top: 1px solid #54162820;
}

.program-column-heading + .program-column-day {
    padding-top: 0;
    border-top: 0;
}

.program-list-wrap { position: relative; }

.program-expand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
    width: 100%;
    padding: 20px 13px;
    border: 0;
    border-top: 1px solid #54162830;
    border-bottom: 1px solid #54162830;
    background: none;
    color: var(--wine);
    font-size: 14px;
    text-align: left;
    margin-top: 20px;
}

.program-expand[hidden] { display: none; }
.program-expand > span { font-size: 24px; }
.program-expand:hover { background: var(--program-selected); }

@media (max-width: 1000px) {
    .program-content { grid-template-columns: 180px minmax(0, 1fr); gap: 45px; }
    .program-content:has(.program-parallel) { grid-template-columns: 1fr; }
    .program-content:has(.program-parallel) .program-room-intro { display: none; }
    .program-time-row { grid-template-columns: 65px minmax(0, 1fr); gap: 20px; }
    .program-parallel { gap: 18px; }
    .program-parallel .program-session h3 { font-size: 18px; }
}

@media (max-width: 700px) {
    #programacao.schedule { padding: 55px 7vw; }
    .program-heading { display: block; margin-bottom: 25px; }
    .program-heading .section-name { font-size: 25px; line-height: 1.12; letter-spacing: -.025em; margin: 0 0 15px; }
    .program-heading .section-name:before { width: 32px; margin-bottom: 12px; }
    .program-heading .section-message { font-size: clamp(21px, 5.6vw, 34px); line-height: 1.22; max-width: none; }
    .program-heading .section-message em { font-size: 1.22em; line-height: 1.18; }
    .program-mobile-break { display: block; }
    .program-day-heading { margin: 26px 0 12px; padding-top: 16px; }

    .program-toolbar { display: block; top: 62px; margin-bottom: 29px; padding: 10px 0; }
    .program-room-tabs { gap: 6px; }
    .program-room-tabs button { font-size: 11px !important; min-height: 41px; padding: 8px 4px; gap: 4px; flex: 1 1 auto; justify-content: center; }
    .program-toolbar-actions { margin-top: 10px; justify-content: flex-end; display: flex; }
    .program-registration { font-size: 11px; padding: 10px 12px; width: 100%; }

    .program-content { grid-template-columns: 1fr; gap: 20px; }
    .program-room-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; align-items: end; padding-left: 14px; }
    .program-room-intro .eyebrow { grid-column: 1 / -1; margin: 0; }
    .program-sala-ativa { font-size: 28px; margin: 4px 0 12px; }
    .program-data { margin: 0; font-size: 10px; }

    .program-time-row { padding: 22px 10px; grid-template-columns: 60px minmax(0, 1fr); gap: 15px; }
    .program-clock time { font-size: 20px; }
    .program-session h3 { font-size: 23px; }
    .program-session-speaker { font-size: 12px; }
    .program-parallel { grid-template-columns: 1fr; gap: 24px; }
    .program-parallel .program-session h3 { font-size: 21px; }
    .program-content:has(.program-parallel) { gap: 0; }
    .program-column { gap: 20px; }
    .program-column-heading { font-size: 16px; padding-bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    #programacao.schedule,
    .program-room-tabs button,
    .program-time-row {
        transition: none;
    }
}
