/* ═══════════════════════════════════════════════════════════════════════════
   Programa — layout, sessões, controlos
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    --prog-navy: #000032;
    --prog-teal: #00af9a;
    --prog-teal-light: #e6f6f4;
    --prog-paralela-bg: #e8f4f7;
    --prog-time-w: 72px;
    --prog-border: #ffffff;
    --prog-lime: #defda1;
    --prog-ocean: #007c87;
}

/* ── Page wrapper ─────────────────────────────────────────────────────────── */

.programa-wrap {
    padding-top: 36px;
    padding-bottom: 64px;
}

.programa-titulo {
    font-size: var(--heading1-font-size-lg) !important;
    color: var(--prog-navy);
    margin-bottom: 56px !important;
}

/* ── Controls row (tabs + search + filter) ───────────────────────────────── */

.programa-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 38px;
    flex-wrap: wrap;
}

/* Tabs */
.programa-tabs {
    display: flex;
    gap: 16px;
}

.prog-tab {
    padding: 5px 18px;
    border: 3px solid var(--prog-navy);
    background: transparent;
    color: var(--prog-navy);
    font-family: inherit;
    font-weight: 700;
    font-size: 20px;
    cursor: pointer;
    border-radius: 1px;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
    font-family: "Space Mono";
    text-transform: lowercase;
}

.prog-tab.is-active {
    background: var(--prog-navy);
    border-color: var(--prog-navy);
    color: #fff;
}

.prog-tab:hover:not(.is-active) {
    background: var(--prog-navy);
    border-color: var(--prog-navy);
    color: var(--prog-lime);
}

/* Actions (search + filter) */
.programa-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-left: auto;
}

/* Search */
.prog-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 0 100%;
    width: 100%;
    margin-top: 6px;
}

.prog-search {
    width: 100%;
    padding: 2px 48px 2px 16px;
    border: 3px solid var(--prog-navy);
    border-radius: 1px;
    font-family: 'Space Mono', monospace;
    font-size: 18px;
    color: var(--prog-navy);
    background: #f9f9f9;
    outline: none;
    font-weight: 700;
}

.prog-search:focus,
.prog-search:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border-color: var(--prog-navy);
}

.prog-search::placeholder {
    color: var(--prog-navy);
    opacity: 1;
}

/* Hide Chrome/Safari clear (x) button */
.prog-search::-webkit-search-cancel-button,
.prog-search::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
}

.prog-search-icon {
    position: absolute;
    right: 16px;
    width: 22px;
    height: 22px;
    color: var(--prog-navy);
    pointer-events: none;
}

/* Filter button */
.prog-filter-wrap {
    position: relative;
}

/* Icon hidden on desktop, shown on mobile */
.prog-filter-icon {
    display: none;
}

.prog-filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: #2e69ff;
    color: #fff;
    border: none;
    border-radius: 1px;
    font-family: inherit;
    font-weight: 700;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    transition: background 0.15s;
    font-family: "Space Mono";
}

.prog-filter-btn:hover {
    background: #000032;
}

.prog-filter-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

/* Filter panel */
.prog-filter-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: #fff;
    border: 3px solid #000032;
    border-radius: 2px;
    padding: 16px 20px;
    min-width: 210px;
    box-shadow: 0 6px 20px rgba(0, 0, 50, 0.1);
    z-index: 200;
}

.prog-filter-panel[hidden] {
    display: none;
}

.prog-filter-group-label {
    font-weight: 700 !important;
    font-size: 11px !important;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #000032;
    margin: 0 0 10px !important;

}

.prog-filter-panel label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    margin: 0 0 8px !important;
    color: var(--prog-navy);
    font-family: 'Space Mono';
    font-weight: 700;
}

.prog-filter-panel label:last-child {
    margin-bottom: 0 !important;
}

/* Custom checkbox */
.prog-filter-check {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 15 15' fill='none'%3E%3Cpath d='M1.5 1H13.5C13.7761 1 14 1.22386 14 1.5V7.5V13.5C14 13.7761 13.7761 14 13.5 14H1.5C1.22386 14 1 13.7761 1 13.5V1.5C1 1.22386 1.22386 1 1.5 1Z' stroke='%23000032' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.prog-filter-check:checked {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='15' viewBox='0 0 16 15' fill='none'%3E%3Cpath d='M11 1H1.5C1.22386 1 1 1.22386 1 1.5V13.5C1 13.7761 1.22386 14 1.5 14H13.5C13.7761 14 14 13.7761 14 13.5V7.5M5 7L6.66923 8.66923C6.85537 8.85537 7.15394 8.86531 7.35204 8.69197L15 2' stroke='%23000032' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.prog-filter-check:not(:checked) {
    width: 15px;
    height: 15px;
}

/* ── Day panels ──────────────────────────────────────────────────────────── */

.prog-day {
    display: none;
}

.prog-day.is-active {
    display: block;
}

.prog-day-heading {
    font-size: clamp(20px, 3.5vw, 37px) !important;
    color: var(--prog-navy) !important;
    border-bottom: 3px solid var(--prog-navy);
    padding-bottom: 16px;
    margin: 0 0 16px !important;
    font-family: 'Space Mono';
}

/* ── Time slot ───────────────────────────────────────────────────────────── */

.prog-slot {
    display: flex;
    gap: 0;
    border-bottom: 6px solid transparent;
    margin: 0 3vw;
}

.prog-time {
    flex: 0 0 var(--prog-time-w);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 14px 16px 18px 0;
    gap: 3px;
}

.prog-time-start {
    font-weight: 700;
    font-size: 17px;
    color: var(--prog-navy);
    white-space: nowrap;
    line-height: 1;
    font-family: 'Space Mono';
}


.prog-slot-sessions {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    border-left: 0px solid transparent;
}

.prog-slot--no-time .prog-slot-sessions {
    padding-left: var(--prog-time-w);
    border-left: none;
}

/* ── Session cards ───────────────────────────────────────────────────────── */

.prog-session {
    padding: 14px 16px;
    border-bottom: 6px solid #ffffff;
}

.prog-session--clickable {
    cursor: pointer;
}

.prog-session:last-child {
    border-bottom: none;
}

/* Outros: simple row */
.prog-session.tipo-1075 {
    padding: 16px 0 16px 16px;
    background: transparent;
}

/* Plenária */
.prog-session.tipo-1073 {
    background: #f8ffeb;
}

/* Paralela */
.prog-session.tipo-1074 {
    background: #d5e9ea;
}

/* Outros */
.prog-session.tipo-1075 {
    box-shadow: inset 0em 0em 0px 3px #d5eafe;
}

/* Hidden (search/filter) */
.prog-session--hidden {
    display: none !important;
}

/* Session header */
.prog-session-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.prog-session-main {
    flex: 1;
    min-width: 0;
}

.prog-session-title {
    font-size: 30px !important;
    font-weight: 700 !important;
    color: var(--prog-navy) !important;
    margin: 0 0 4px !important;
    line-height: 1.3 !important;
}

.prog-session-speakers {
    display: flex;
    flex-wrap: wrap;
    column-gap: 20px;
    color: var(--prog-navy) !important;
    margin: 4px 0 6px !important;
    font-size: var(--paragraph-font-size);
    line-height: 150%;
}

.prog-session-speakers a {
    color: var(--prog-navy) !important;
    text-decoration: none !important;
}

.prog-session-speakers a:hover {
    text-decoration: underline !important;
}

.prog-session-org {
    font-size: 13px !important;
    color: #555;
    margin: 0 0 8px !important;
    line-height: 1.4;
}

/* Room badge */
.sala-badge {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 1px;
    margin-top: 6px;
    line-height: 1.5;
}

.sala-badge--auditorio {
    background: var(--prog-ocean);
    color: var(--prog-lime);
}

.sala-badge--special {
    background: var(--prog-navy);
    color: var(--prog-lime);
}

.sala-badge--sala {
    background: var(--prog-teal);
    color: #fff;
}

/* Toggle button */
.prog-toggle {
    flex-shrink: 0;
    width: 29px;
    height: 31px;
    padding: 0;
    box-sizing: border-box;
    background: transparent;
    color: var(--prog-navy);
    border: 2px solid var(--prog-navy);
    border-radius: 0;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    transition: background 0.15s, color 0.15s;
}

.prog-toggle:hover {
    background: var(--prog-navy);
    border-color: var(--prog-navy);
    color: var(--prog-lime);
}

.prog-toggle-icon {
    display: block;
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    pointer-events: none;
    overflow: visible;
}

.prog-toggle-icon path {
    fill: var(--prog-navy);
    transition: fill 0.15s;
}

.prog-toggle:hover .prog-toggle-icon path {
    fill: var(--prog-lime);
}

.tipo-1074 .prog-toggle-icon path {
    fill: var(--prog-ocean);
}

.tipo-1074 .prog-toggle:hover {
    background: var(--prog-navy);
    border-color: var(--prog-navy);
}

.tipo-1074 .prog-toggle:hover .prog-toggle-icon path {
    fill: var(--prog-lime);
}

.tipo-1074 .prog-toggle {
    color: var(--prog-ocean);
    border-color: var(--prog-ocean);
}

/* Session body (expanded content) */
.prog-session-body {
    padding-top: 14px;
}

.prog-session-body[hidden] {
    display: none;
}

.prog-desc-curta {
    font-size: 17px !important;
    color: #000032;
    margin: 0 0 10px !important;
    line-height: 1.65 !important;
}

.prog-desc-curta p {
    margin: 0 0 10px !important;
}

.prog-desc-curta p:last-child {
    margin-bottom: 0 !important;
}

.prog-oradores-txt {
    font-size: 13px;
    color: #444;
    margin-bottom: 10px;
    line-height: 1.6;
}

.prog-oradores-txt p {
    margin: 0 !important;
}

.prog-saber-mais {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: var(--prog-navy);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.prog-saber-mais:hover {
    color: var(--prog-teal);
}

/* ── Mobile ──────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    :root {
        --prog-time-w: 56px;
    }

    .prog-search-wrap {
        display: none;
        /* shown via filter panel on mobile */
    }

    .prog-filter-label {
        display: none;
    }

    .prog-filter-icon {
        display: block;
    }

    .prog-filter-btn {
        padding: 8px 12px;
    }

    .prog-session-title {
        font-size: 16px !important;
        line-height: 1.4 !important;
    }

    .prog-tab {
        padding: 7px 14px;
        font-size: 13px;
    }

    .prog-time {
        padding: 14px 12px 14px 0;
    }

    .prog-session {
        padding: 12px 12px;
    }
}

@media (max-width: 480px) {
    :root {
        --prog-time-w: 48px;
    }

    .prog-time-start {
        font-size: 14px;
    }

    .prog-time-end {
        font-size: 11px;
    }

    .prog-session-title {
        font-size: 16px !important;
        line-height: 1.4 !important;
    }
}