/**
 * Program Congress - Frontend Timeline Styles
 */

:root {
    --pc-surface: #ffffff;
    --pc-surface-soft: #fcfdff;
    --pc-surface-muted: #f6f8fc;
    --pc-border: #e6ebf3;
    --pc-border-strong: #d4dce8;
    --pc-text: #1b2436;
    --pc-text-soft: #6b7688;
    --pc-text-muted: #8b96a8;
    --pc-shadow-soft: 0 6px 20px rgba(17, 24, 39, 0.05);
    --pc-shadow-hover: 0 10px 28px rgba(17, 24, 39, 0.09);
}

/* Tabs */
.congress-tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Header Wrapper - Contains tabs and search */
.congress-header-wrapper {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 22px;
}

/* Horizontal layout for tabs and search */
.congress-header-wrapper.filters-search-layout-horizontal {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.congress-header-wrapper.filters-search-layout-horizontal .congress-tabs {
    flex: 0 0 auto;
}

.congress-header-wrapper.filters-search-layout-horizontal .congress-search-container {
    flex: 0 0 auto;
    margin: 0;
}

/* Room Filter Buttons Container - Separate from header */
.congress-room-filters {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 22px 0;
}

.room-filters-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--pc-text-soft);
    margin: 0;
    flex-shrink: 0;
}

.room-filter-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

@media (min-width: 769px) {
    .room-filter-buttons {
        justify-content: center;
    }
}

.room-filter-btn {
    padding: 10px 18px;
    background: var(--room-filter-color, #2563eb) !important;
    border: none !important;
    border-radius: 999px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff !important;
    transition: all 0.2s ease;
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.12);
}

.room-filter-btn:hover {
    filter: brightness(0.97);
    color: #ffffff !important;
}

.room-filter-btn.active {
    background: var(--room-filter-color, #2563eb) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(17, 24, 39, 0.08);
    opacity: 0.45;
    filter: grayscale(40%);
    text-decoration: line-through;
}

.room-filter-btn.active:hover {
    opacity: 0.6;
    filter: grayscale(20%);
}

/* Hide room columns when filtered out */
.room-column.filtered-out {
    display: none !important;
}

/* Search Container */
.congress-search-container {
    display: flex;
    gap: 12px;
    align-items: center;
}

.congress-search-container .search-input {
    flex: 1;
    min-width: 280px;
    padding: 12px 18px;
    border: 1px solid var(--pc-border);
    border-radius: 999px;
    font-size: 14px;
    color: var(--pc-text);
    transition: all 0.2s ease;
    background: #fff;
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.03);
}

.congress-search-container .search-input:focus {
    outline: none;
    border-color: #c9d5e6;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.congress-search-container .search-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: #1d2433;
    color: white;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 8px 18px rgba(29, 36, 51, 0.16);
}

.congress-search-container .search-button:hover {
    background: #171d2a;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.congress-search-container .search-button .search-icon {
    display: flex;
    align-items: center;
}

.tab-button {
    padding: 10px 18px;
    background: #f5f7fb;
    border: 1px solid var(--pc-border);
    border-radius: 999px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--pc-text-soft);
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

.tab-button:hover {
    color: var(--pc-text);
    background: #eef3f9;
    border-color: var(--pc-border-strong);
}

.tab-button.active {
    color: #fff;
    background: #1d2433;
    border-color: #1d2433;
    box-shadow: 0 8px 18px rgba(29, 36, 51, 0.16);
}

/* Schedule Wrapper */
.schedule-wrapper {
    overflow-x: auto;
    margin: 26px 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

/* Hide content during search processing to avoid visual glitches */
.schedule-grid-container.processing-search {
    opacity: 0;
    pointer-events: none;
}

.schedule-wrapper::-webkit-scrollbar {
    height: 8px;
}

.schedule-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.schedule-wrapper::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.schedule-wrapper::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Schedule Grid Container */
.schedule-grid-container {
    display: grid;
    gap: 12px;
    min-width: min-content;
    align-items: stretch;
    justify-content: start;
    width: fit-content;
}

.schedule-grid-container > * {
    min-height: 0;
    min-width: 0;
}

/* Room Header */
.room-header {
    padding: 14px 16px 13px;
    border: none !important;
    background: var(--room-header-bg, var(--room-accent-color, #2563eb)) !important;
    border-radius: 12px;
    box-shadow: 0 10px 22px rgba(17, 24, 39, 0.12);
    overflow: visible;
    position: relative;
}

@media (min-width: 769px) {
    .room-header {
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

/* Two-grid layout: .schedule-headers-strip is a SIBLING of the
   horizontally-scrolling .schedule-wrapper, not a descendant — so the
   wrapper's overflow-x: auto no longer traps `position: sticky` inside
   its scroll container. The companion JS in frontend.js mirrors the
   wrapper's scrollLeft onto the strip so headers stay aligned with their
   columns while panning horizontally. */
.schedule-pair-container {
    display: flex;
    flex-direction: column;
    margin: 26px 0;
    /* Shared column width inherited by BOTH the headers grid and the content
       grid so the room header always matches its column. These mirror the
       Elementor "Ancho de Columna" responsive defaults; when the user sets a
       custom value, Elementor overrides this on the same element. */
    --column-width: 300px;
}

@media (max-width: 1024px) {
    .schedule-pair-container {
        --column-width: 280px;
    }
}

@media (max-width: 768px) {
    .schedule-pair-container {
        --column-width: 260px;
    }
}

.schedule-headers-strip {
    overflow-x: hidden;
    overflow-y: visible;
    background: transparent;
}

.schedule-headers-grid {
    min-width: min-content;
    width: fit-content;
}

/* Cancel the legacy .schedule-wrapper top/bottom margin when it lives
   inside the pair container — the pair container owns spacing now. */
.schedule-pair-container > .schedule-wrapper {
    margin: 12px 0 0;
}

@media (min-width: 1024px) {
    .schedule-headers-strip {
        position: sticky;
        top: 0;
        z-index: 20;
        /* Solid backdrop so cards don't bleed through as they scroll past
           the now-floating headers. */
        background: #ffffff;
        padding: 6px 0 8px;
    }

    /* WP admin bar: 32px on desktop. The sticky only engages at >=1024px,
       so the narrower (46px) admin bar shown on <=782px viewports never
       coexists with this rule and doesn't need a separate breakpoint. */
    body.admin-bar .schedule-headers-strip {
        top: 32px;
    }
}

.room-header::before {
    content: none;
}

.room-header::after {
    content: none;
}

.room-header.filtered-out,
.room-header.search-hidden {
    display: none !important;
}

.room-header-title {
    width: 100%;
    padding: 0;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--pc-text);
}

.room-title {
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--room-header-text, #ffffff) !important;
    flex: 1;
    text-align: center;
    line-height: 1.2;
    text-wrap: balance;
}

/* Room Column (grid cells) */
.room-column {
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: auto;
}

.room-column .empty-cell {
    visibility: hidden;
    height: 1px;
}

.room-column.search-hidden {
    display: none !important;
}

.room-column.filtered-out {
    display: none !important;
}

/* Timeline layout: events are absolutely positioned by start_time inside each column */
.room-column.timeline-layout {
    display: block;
    position: relative;
    gap: 0;
}

.section-block-wrapper.timeline-positioned {
    position: absolute;
    left: 0;
    right: 0;
    height: auto;
    box-sizing: border-box;
}

.section-block-wrapper.timeline-positioned > .section-block {
    height: auto;
    min-height: 0;
    box-sizing: border-box;
}

.section-block-wrapper.subdivided.timeline-positioned {
    box-sizing: border-box;
}

/* Section Block */
.section-block {
    position: relative;
    padding: 14px 16px 13px;
    background: var(--pc-surface);
    border: 1px solid var(--pc-border);
    border-left: 5px solid #e0e0e0;
    border-radius: 14px;
    box-shadow: var(--pc-shadow-soft);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    left: initial !important;
    right: initial !important;
    height: auto;
}

/* Wrapper for subdivided sections (divided room) */
.section-block-wrapper {
    width: 100%;
    height: auto;
}

.section-block-wrapper.has-duration {
    display: flex;
    flex-direction: column;
}

.section-block-wrapper > .section-block {
    height: 100%;
    min-height: 100%;
}

.section-block-wrapper.subdivided {
    display: block !important;
    padding: 12px;
    background: var(--pc-surface);
    border: 1px solid var(--pc-border);
    border-radius: 14px;
    box-shadow: var(--pc-shadow-soft);
}

.section-block-wrapper.subdivided.has-duration {
    display: flex !important;
    flex-direction: column;
}

.section-block-wrapper.subdivided.has-duration .subdivided-stack {
    flex: 1;
}

.section-block-wrapper.search-hidden {
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

/* Subdivided section styling */
.section-block.subdivided-section {
    flex: none;
    width: 100%;
    min-width: 0;
    margin-bottom: 0;
}

.subdivided-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--pc-border);
}

.subdivided-time {
    font-size: 12px;
    font-weight: 700;
    color: var(--pc-text-soft);
    letter-spacing: 0.01em;
}

.subdivided-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--pc-text-muted);
    text-align: right;
}

.subdivided-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.subdivided-subcard {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.subdivided-subcard-index {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    min-width: 28px;
    border-radius: 10px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 8px 0;
    box-shadow: none;
    background: var(--e-global-color-accent, #2563eb) !important;
    opacity: 1;
}

.section-block-wrapper.subdivided .section-block,
.subdivided-subcard-block {
    margin: 0;
    height: auto;
    min-height: 0;
    flex: 1;
}

.subdivided-subcard-block {
    background: var(--pc-surface);
    border-color: var(--pc-border);
    box-shadow: none;
}

.compact-section-block {
    padding: 12px 14px 11px;
    border-radius: 12px;
}

.compact-section-block .section-content {
    align-items: flex-start;
    gap: 10px;
}

.compact-section-block .section-title {
    font-size: 13px;
    line-height: 1.25;
}

.compact-section-block .section-description {
    font-size: 11px;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive: stack on mobile for subdivided sections */
@media (max-width: 768px) {
    .subdivided-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .subdivided-label {
        text-align: left;
    }

    .subdivided-subcard {
        align-items: flex-start;
    }
}

.section-block:last-child {
    margin-bottom: 0;
}

.section-block.search-hidden {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    flex: none !important;
}

.section-block.has-conferences {
    cursor: pointer;
}

.section-block.has-conferences:hover {
    transform: translateY(-1px);
    border-color: var(--pc-border-strong);
    box-shadow: var(--pc-shadow-hover);
}

.section-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    height: auto;
}

.section-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.section-info {
    flex: 1;
    min-width: 0;
}

.section-time {
    font-size: 12px;
    color: var(--pc-text-soft);
    margin-bottom: 6px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.01em;
}

.section-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--pc-text);
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-transform: uppercase;
}

.section-description {
    font-size: 12px;
    color: var(--pc-text-soft);
    line-height: 1.5;
    margin-top: 7px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.section-description p {
    margin: 8px 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--pc-text-soft);
}

.section-description p:first-child {
    margin-top: 0;
}

.section-description p:last-child {
    margin-bottom: 0;
}

.section-description-wrapper {
    margin-top: 8px;
}

.section-description-wrapper .section-description {
    margin-top: 0;
}

.section-description.is-clamped {
    display: block;
    max-height: 200px;
    overflow: hidden;
    position: relative;
}

.section-description.is-clamped::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(transparent, #ffffff);
    pointer-events: none;
}

.section-description-toggle {
    margin-top: 8px;
    padding: 0;
    background: transparent !important;
    border: none !important;
    color: var(--section-accent-color, var(--e-global-color-accent, #2563eb)) !important;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    box-shadow: none !important;
}

.section-description-toggle:hover {
    opacity: 0.82;
}

.conference-badge {
    display: inline-block;
    min-width: 24px;
    min-height: 24px;
    padding: 0px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    margin-left: 6px;
    vertical-align: middle;
    box-shadow: none;
    text-align: center;
    line-height: 24px;
}

.section-arrow {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: #222326;
    color: #fff;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    font-size: 14px;
    box-shadow: 0 10px 18px rgba(17, 24, 39, 0.12);
}

/* Modal */
.congress-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.congress-modal-content {
    background: #fff;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 12px;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #666;
    line-height: 1;
    z-index: 1;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
}

.modal-close:hover {
    color: #333;
}

/*.modal-close svg {
    width: 20px;
}*/

.modal-header {
    padding: 30px 60px 20px 30px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
    text-transform: uppercase;
}

.modal-section-time {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
}

.modal-section-time .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
}

/* Salón shown under each conference inside the popup, on all screen sizes.
   Rendered as a compact chip painted with the room color (set inline via JS). */
.conference-room {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0 10px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #ffffff;
    background-color: #666;
}

.conference-room .dashicons {
    font-size: 15px;
    width: 15px;
    height: 15px;
    line-height: 15px;
    color: #ffffff;
}

.modal-section-description {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
}

.modal-section-description p {
    margin: 0 0 8px;
}

.modal-section-description p:last-child {
    margin-bottom: 0;
}

.modal-body {
    padding: 30px;
}

/* Conferences List in Modal */
.conferences-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.conference-item {
    padding: 20px;
    background: var(--pc-surface-soft);
    border-left: 4px solid #3498db;
    border-radius: 8px;
    box-shadow: none;
}

.conference-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #666;
    font-weight: 600;
    margin-bottom: 12px;
}

.conference-title {
    margin: 0 0 12px 0;
    font-size: 20px;
    color: #333;
}

.conference-excerpt {
    margin: 0 0 16px 0;
    color: #666;
    line-height: 1.6;
}

.conference-excerpt p {
    margin: 8px 0;
    color: #666;
    line-height: 1.6;
}

.conference-excerpt p:first-child {
    margin-top: 0;
}

.conference-excerpt p:last-child {
    margin-bottom: 0;
}

.conference-speakers {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0;
}

.speaker-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.speaker-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.speaker-icon {
    font-size: 50px;
    color: #ccc;
}

.speaker-info {
    flex: 1;
}

.speaker-info strong {
    display: block;
    font-size: 16px;
    color: #333;
    margin-bottom: 2px;
}

.speaker-info span {
    display: block;
    font-size: 13px;
    color: #666;
}

.conference-axes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.axis-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: #3498db;
    color: #fff;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
}

.axis-tag .dashicons {
    font-size: 14px;
}

/* Loading and Error States */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2271b1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    padding: 20px;
    text-align: center;
    color: #dc3232;
}

.no-sections,
.no-content {
    padding: 20px;
    text-align: center;
    color: #999;
    font-style: italic;
}

/* Conference calendar buttons */
.conference-calendar {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

/* Speaker icon styling */
.dashicons-businessperson {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.add-to-calendar-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.add-to-calendar-btn:hover {
    background: #f5f5f5;
    border-color: #999;
}

.add-to-calendar-btn .dashicons {
    font-size: 16px;
}

.calendar-options {
    margin-top: 10px;
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.calendar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    height: 100%;
}

.calendar-link:hover {
    background: #f0f0f0;
    border-color: #999;
    transform: translateX(4px);
}

.calendar-link .dashicons {
    font-size: 18px;
    color: #666;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
    /* Tabs centrados */
    .congress-tabs {
        justify-content: center;
    }
    
    .tab-button {
        padding: 9px 14px;
        font-size: 13px;
    }
    
    /* Campo de búsqueda 100% ancho */
    .congress-search-container {
        flex-direction: column;
        width: 100%;
    }
    
    .congress-search-container .search-input {
        width: 100%;
        min-width: 100%;
    }
    
    .congress-search-container .search-button {
        width: 100%;
        justify-content: center;
    }
    
    /* Filtros de salones: scroll horizontal estilo app */
    .congress-room-filters {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .room-filters-label {
        width: 100%;
        text-align: left;
        padding-left: 10px;
    }
    
    .room-filter-buttons {
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        padding: 0 10px;
    }
    
    .room-filter-buttons::-webkit-scrollbar {
        height: 4px;
    }
    
    .room-filter-buttons::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 2px;
    }
    
    .room-filter-buttons::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 2px;
    }
    
    .room-filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 10px 18px;
        font-size: 13px;
    }
    
    /* Programa: mantener grid pero con columnas más pequeñas y scroll horizontal */
    .schedule-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0;
        border-radius: 0;
    }
    
    .room-column {
        min-width: 280px;
    }

    .room-header {
        padding: 14px 12px 12px;
        display: flex;
    }

    .section-block {
        padding: 12px;
        border-radius: 8px;
    }

    .section-title {
        font-size: 16px;
    }

    .section-description {
        font-size: 14px;
    }
    
    /* Modal */
    .congress-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .modal-header,
    .modal-body {
        padding: 20px;
    }
    
    .modal-header h2 {
        font-size: 20px;
    }

    /* Force vertical layout on mobile */
    .congress-header-wrapper.filters-search-layout-horizontal {
        flex-direction: column;
        align-items: stretch;
    }
    
    .congress-header-wrapper.filters-search-layout-horizontal .congress-search-container {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .congress-search-container .search-input {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .congress-search-container .search-button {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .room-filter-btn {
        font-size: 12px;
        padding: 8px 16px;
    }
    
    .tab-button {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .room-column {
        min-width: 260px;
    }
}
