.modal-curriculum-scroll {
    max-height: 280px;
    overflow-y: auto;
    padding-right: 15px;
}

/* Modern minimalist scrollbar for a premium look */
.modal-curriculum-scroll::-webkit-scrollbar {
    width: 6px;
}

.modal-curriculum-scroll::-webkit-scrollbar-track {
    background: #f4f5f7;
    border-radius: 10px;
}

.modal-curriculum-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.modal-curriculum-scroll::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Preventa Ribbon Badge for index.html price tables */
.price-table.is-preventa {
    position: relative;
    overflow: hidden;
}

/* Real HTML Ribbon Badge */
.price-ribbon {
    position: absolute;
    top: 20px;
    right: -55px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 200px;
    height: 42px;
    background-color: #0056B3;
    /* Theme institutional blue */
    color: #ffffff;
    text-align: center;
    transform: rotate(45deg);
    -webkit-transform: rotate(45deg);
    -moz-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    -o-transform: rotate(45deg);
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.price-ribbon span {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.1;
    letter-spacing: 0.5px;
}

.price-ribbon small {
    font-size: 10.5px;
    /* Larger date text */
    font-weight: 800;
    display: block;
    line-height: 1.1;
    margin-top: 2px;
}

/* Equal height pricing tables */
.row.price-tables {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: stretch !important;
}

.row.price-tables>div {
    display: flex !important;
    flex-direction: column !important;
}

.price-table {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    width: 100% !important;
    margin-top: 30px !important;
}

.price-table-rows {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
}

.price-table-row-bottom {
    margin-top: auto !important;
}

/* Premium Modality Selector */
.modality-selector-container {
    display: inline-flex;
    background: rgba(13, 29, 49, 0.05);
    /* very light institutional dark blue */
    padding: 8px;
    border-radius: 40px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 35px;
}

.modality-selector-btn {
    border: none;
    background: transparent;
    padding: 12px 40px;
    font-size: 18px;
    font-weight: 700;
    color: #475056;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.modality-selector-btn.active {
    background: #0056B3;
    /* Theme institutional blue */
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.25);
}

.modality-selector-btn:hover:not(.active) {
    background: rgba(0, 86, 179, 0.08);
    color: #0056B3;
}


/* Bulletproof mobile viewport fix to prevent zoom-out and horizontal scroll */
html,
body {
    overflow-x: hidden !important;
    width: 100% !important;
}

.wrapper {
    overflow: hidden !important;
    width: 100% !important;
}

/* Vertical centering and responsive sizes for navbar */
.navbar-logo {
    max-height: 85px;
    width: auto;
    transition: max-height 0.2s ease-in-out;
}

.shrink .navbar-logo {
    max-height: 60px;
}

/* Force margin-top: 0 on logo across all screens to prevent misalignment */
.header .logo {
    margin-top: 0 !important;
}

/* Desktop navbar vertical centering */
@media (min-width: 992px) {
    .header .header-wrapper {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    .header .logo,
    .header .navigation {
        float: none !important;
    }
}

/* Tablet / Mobile navbar vertical centering and heights */
@media (max-width: 991px) {
    .header {
        padding-top: 10px !important;
        padding-bottom: 10px !important;
        position: fixed !important;
        /* Ensure it stays fixed */
    }

    .header>.container {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .navbar-logo {
        max-height: 52px !important;
    }

    /* Vertically center the menu-toggle icon (now outside .navigation in the DOM) */
    .menu-toggle {
        display: block !important;
        position: absolute !important;
        right: 15px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        -webkit-transform: translateY(-50%) !important;
        margin-top: 0 !important;
        z-index: 100000 !important;
    }

    /* Make header fully opaque on scroll so text doesn't clash underneath */
    .header.shrink {
        background-color: rgba(129, 134, 140, 1) !important;
    }
}

/* Hero Section / Main Slider responsive subtitle styling */
#main-slider .caption-subtitle {
    font-size: 38px !important;
    line-height: 1.4 !important;
}

@media (max-width: 767px) {
    .navbar-logo {
        max-height: 48px !important;
    }

    /* About section image gallery responsive height to prevent vertical stretching */
    #about .thumbnails img {
        height: 70px !important;
    }

    /* Center video container when columns stack on mobile */
    #about .video-container {
        margin: 20px auto 0 auto !important;
    }

    #about .col-sm-5.text-right {
        text-align: center !important;
    }

    /* Add vertical margin between stacked columns in grid listings (e.g. Speakers, Comité) and center them */
    .thumbnails>.col-sm-6 {
        margin-bottom: 40px !important;
        width: 100% !important;
        /* Force full width in flexbox so text and circle center correctly on viewport */
    }

    /* Responsive font size for Hero slider title on mobile */
    #main-slider .caption-subtitle {
        font-size: 22px !important;
    }

    /* Prevent theme buttons from overflowing the viewport width on mobile (like "Conviértete en Patrocinador") */
    .btn-theme {
        font-size: 15px !important;
        padding: 10px 20px !important;
        white-space: normal !important;
        max-width: 100% !important;
        display: inline-block !important;
    }
}

@media (max-width: 480px) {
    #about .thumbnails img {
        height: 50px !important;
    }

    /* Prevent modality pricing selector from overflowing smaller screens (e.g. iPhone SE) */
    .modality-selector-btn {
        padding: 8px 20px !important;
        font-size: 15px !important;
    }
}

/* Custom compact schedule style */
.schedule-timeline {
    position: relative;
    padding: 10px 0;
}

.schedule-item {
    display: flex;
    margin-bottom: 12px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border-left: 5px solid #ff4757;
    /* accent color */
    padding: 15px;
    align-items: flex-start;
}

.schedule-item.special-event {
    border-left-color: #0056B3;
    /* Blue border for visito/expo/clausura */
    background-color: #f8fafc;
}

.schedule-time {
    flex: 0 0 140px;
    font-weight: bold;
    color: #435469;
    font-size: 15px;
    border-right: 1px solid #eee;
    padding-right: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.schedule-info {
    flex: 1;
    padding-left: 15px;
}

.schedule-title {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
    line-height: 1.4;
}

.schedule-speaker {
    margin: 0 0 5px 0;
    font-weight: 600;
    font-size: 13px;
    color: #ff4757;
}

.schedule-desc {
    margin: 0;
    font-size: 13px;
    color: #7f8c8d;
    line-height: 1.4;
}

@media (max-width: 767px) {
    .schedule-item {
        flex-direction: column;
        padding: 12px;
    }

    .schedule-time {
        flex: none;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
        padding-right: 0;
        padding-bottom: 5px;
        margin-bottom: 8px;
    }

    .schedule-info {
        padding-left: 0;
        width: 100%;
    }

    .schedule-title {
        font-size: 15px;
    }

    /* Day Tabs (lv1) side-by-side on mobile */
    .schedule-tabs.lv1 .nav {
        display: flex !important;
        flex-direction: row !important;
        width: 100% !important;
        border: none !important;
    }

    .schedule-tabs.lv1 .nav>li {
        flex: 1 !important;
        float: none !important;
        display: block !important;
        border: none !important;
    }

    .schedule-tabs.lv1 .nav>li>a {
        min-height: 55px !important;
        padding: 8px 4px !important;
        font-size: 11px !important;
        text-align: center !important;
        line-height: 1.3 !important;
        border: none !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }

    /* Active indicator triangle center on mobile */
    .schedule-wrapper .schedule-tabs.lv1 .nav>li.active:before {
        border-top-color: #435469 !important;
        bottom: -7px !important;
        top: auto !important;
        right: 50% !important;
        left: auto !important;
        margin-left: -7px !important;
    }

    /* Sub-tabs (lv2) font size and padding to prevent vertical stretching */
    .schedule-tabs.lv2 .nav {
        display: flex !important;
        flex-direction: row !important;
        width: 100% !important;
    }

    .schedule-tabs.lv2 .nav>li {
        flex: 1 !important;
        float: none !important;
    }

    .schedule-tabs.lv2 .nav>li>a {
        padding: 6px 2px !important;
        font-size: 10px !important;
        line-height: 1.2 !important;
        text-align: center !important;
    }

    .schedule-tabs.lv2 .nav>li>a .date {
        font-size: 9px !important;
    }
}

/* Fix active tab text color and background to match template theme */
.schedule-wrapper .schedule-tabs.lv1 .nav>li.active>a,
.schedule-wrapper .schedule-tabs.lv1 .nav>li.active>a:hover,
.schedule-wrapper .schedule-tabs.lv1 .nav>li.active>a:focus {
    color: #ffffff !important;
    background-color: #435469 !important;
}

/* Ensure the centering triangle of the active tab resolves relative to the list item */
.schedule-wrapper .schedule-tabs.lv1 .nav>li {
    position: relative !important;
}

/* Timeline special card margin alignment on desktop and mobile */
.timeline .special-card {
    margin-left: 110px;
}

/* Add left strip back to regular conference cards */
.timeline .media-body:not(.special-card) {
    border-left: 5px solid #0056B3 !important;
}

/* Remove grey and white borders from speaker circular images */
.timeline .post-media {
    border: none !important;
    background: none !important;
    padding: 0 !important;
    margin-top: 0 !important;
    box-shadow: none !important;
}

.timeline .post-media img {
    border: none !important;
}

/* Align regular cards perfectly with special cards (80px img + 30px margin = 110px) */
.timeline .post-media.pull-left {
    margin-right: 30px !important;
}

@media (max-width: 767px) {
    .timeline .special-card {
        margin-left: 0 !important;
    }

    .timeline .post-media {
        width: 80px !important;
        float: none !important;
        margin: 0 auto 15px auto !important;
    }

    .timeline .post-media.pull-left {
        float: none !important;
        margin: 0 auto 15px auto !important;
    }
}


/* Hero logo sizing */
.hero-logo {
    max-width: 90% !important;
    width: 460px !important;
    height: auto !important;
    margin-bottom: 30px !important;
    display: inline-block !important;
}

@media (max-width: 768px) {
    .hero-logo {
        width: 300px !important;
        margin-bottom: 20px !important;
    }
}