/* Neo Blue Design System */
:root {
    --color-rose-950: #082f49;
    /* sky-950 */
    --color-rose-900: #0c4a6e;
    /* sky-900 */
    --color-rose-800: #075985;
    /* sky-800 */
    --color-rose-700: #0369a1;
    /* sky-700 */
    --color-rose-600: #0284c7;
    /* sky-600 */
    --color-rose-50: #f0f9ff;
    /* sky-50 */
    --color-rose-400: #38bdf8;
    /* sky-400 */

    --color-amber-500: #f59e0b;
    --color-amber-400: #fbbf24;
    --color-amber-100: #fef3c7;

    --color-stone-50: #f8fafc;
    /* slate-50 */
    --color-stone-100: #f1f5f9;
    /* slate-100 */
    --color-stone-200: #e2e8f0;
    /* slate-200 */
    --color-stone-400: #94a3b8;
    /* slate-400 */
    --color-stone-500: #64748b;
    /* slate-500 */
    --color-stone-700: #334155;
    /* slate-700 */
    --color-stone-800: #1e293b;
    /* slate-800 */

    --color-white: #ffffff;

    --shadow-card: 0 20px 50px -12px rgba(7, 89, 133, 0.25);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Reset & Base */
.turto-catalog-wrapper * {
    box-sizing: border-box;
}

.turto-catalog-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    font-family: var(--font-main);
    color: var(--color-stone-800);
    padding: 40px 20px;
    background-color: var(--color-stone-50);
}

.turto-catalog-container {
    display: flex;
    gap: 48px;
}

/* Header - Now Full Width */
.turto-catalog-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 48px;
    border-bottom: 1px solid var(--color-stone-200);
    padding-bottom: 32px;
}

@media (min-width: 768px) {
    .turto-catalog-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
    }
}

.turto-catalog-header h2 {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin: 0 0 8px 0;
    color: var(--color-rose-950);
    line-height: 1.1;
}

/* Gradient Text Classes */
.text-gradient-default {
    color: var(--color-rose-950);
}

.text-gradient-gestion {
    background: linear-gradient(to right, var(--color-rose-700), #0ea5e9, var(--color-rose-800));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-derecho {
    background: linear-gradient(to right, var(--color-rose-700), #0284c7, var(--color-rose-900));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.turto-catalog-header .subtitle {
    color: var(--color-stone-500);
    margin: 0;
    font-size: 16px;
}

.header-count {
    text-align: right;
    margin-top: 16px;
}

@media (min-width: 768px) {
    .header-count {
        margin-top: 0;
    }
}

.header-count #turto-course-count {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--color-rose-950);
    line-height: 1;
}

.header-count .count-label {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--color-stone-400);
    font-weight: 700;
    letter-spacing: 0.1em;
}

/* Sidebar */
.turto-sidebar {
    width: 280px;
    flex-shrink: 0;
}



/* Search Box */
.turto-search-box {
    position: relative;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    background: var(--color-white);
    border: 1px solid var(--color-stone-200);
    border-radius: 12px;
    padding: 4px 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    height: 52px;
}


/* Search Box Icon */
.turto-search-box .search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-stone-400);
    width: 20px;
    height: 20px;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Search Box Input */
.turto-search-box input {
    width: 100%;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    font-size: 15px;
    color: var(--color-stone-700);
    outline: none !important;
    height: 100%;
    box-shadow: none !important;
    margin: 0 !important;
    appearance: none !important;
}

.turto-search-box input:focus {
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
}

/* Filter Section Headers */
.turto-filter-section h3 {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--color-stone-400);
    letter-spacing: 0.15em;
    margin-bottom: 16px;
    font-weight: 800;
}

/* Modality Buttons Container */
.turto-modalidad-options {
    background: var(--color-white);
    padding: 6px;
    border-radius: 16px;
    border: 1px solid var(--color-stone-200);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.turto-mod-btn {
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 12px;
    background: var(--color-white);
    /* Force white background */
    cursor: pointer;
    text-align: left;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-stone-500);
    transition: all 0.2s;
}

.turto-mod-btn:hover {
    background: var(--color-stone-50);
    color: var(--color-stone-700);
}

.turto-mod-btn.active {
    background: var(--color-rose-950);
    color: var(--color-white);
    box-shadow: 0 4px 12px rgba(76, 5, 25, 0.2);
}

.turto-mod-btn svg {
    width: 18px;
    height: 18px;
    color: var(--color-stone-400);
    transition: color 0.2s;
}

.turto-mod-btn.active svg {
    color: var(--color-white);
}

/* Specific icon colors when not active */
.turto-mod-btn:not(.active) .icon-live {
    color: var(--color-rose-700);
}

.turto-mod-btn:not(.active) .icon-demand {
    color: var(--color-amber-500);
}

/* Area Checkboxes */
.turto-area-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
    /* Tighter gap */
    max-height: 450px;
    /* Limit height */
    overflow-y: auto;
    /* Enable scroll */
    padding-right: 8px;
    /* Space for scrollbar */
}

/* Custom Scrollbar for Area Options */
.turto-area-options::-webkit-scrollbar {
    width: 6px;
}

.turto-area-options::-webkit-scrollbar-track {
    background: transparent;
}

.turto-area-options::-webkit-scrollbar-thumb {
    background-color: var(--color-stone-200);
    border-radius: 20px;
}

.turto-area-options::-webkit-scrollbar-thumb:hover {
    background-color: var(--color-stone-400);
}

.turto-checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.turto-checkbox-label:hover {
    background: var(--color-white);
}

.turto-checkbox-label input {
    display: none;
}

.turto-checkbox-label .checkmark {
    width: 20px;
    height: 20px;
    border: 1px solid var(--color-stone-200);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: var(--color-white);
}

.turto-checkbox-label:hover .checkmark {
    border-color: var(--color-rose-400);
}

.turto-checkbox-label input:checked+.checkmark {
    background: var(--color-rose-700);
    border-color: var(--color-rose-700);
}

.turto-checkbox-label .checkmark .inner-dot {
    width: 8px;
    height: 8px;
    background: var(--color-white);
    border-radius: 2px;
    display: none;
}

.turto-checkbox-label input:checked+.checkmark .inner-dot {
    display: block;
}

.turto-checkbox-label span.label-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-stone-500);
    transition: color 0.2s;
}

.turto-checkbox-label:hover span.label-text {
    color: var(--color-stone-700);
}

.turto-checkbox-label input:checked~span.label-text {
    color: var(--color-rose-950);
    font-weight: 600;
}

/* Main Content */
.turto-main-content {
    flex-grow: 1;
}

/* Grid */
.turto-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
}

/* Course Card Neo */
.turto-course-card {
    background: var(--color-white);
    border: 1px solid var(--color-stone-200);
    border-radius: 16px;
    /* rounded-2xl */
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    cursor: pointer;
}

.turto-course-card:hover {
    border-color: var(--color-rose-900);
    transform: translateY(-8px);
    box-shadow: var(--shadow-card);
}

/* Card Image */
.card-image-wrapper {
    position: relative;
    height: 192px;
    /* h-48 */
    overflow: hidden;
}

.card-image-overlay {
    position: absolute;
    inset: 0;
    background: rgba(136, 19, 55, 0.1);
    /* bg-rose-900/10 */
    z-index: 10;
    transition: background-color 0.3s;
}

.turto-course-card:hover .card-image-overlay {
    background: transparent;
}

.card-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.7s;
}

.turto-course-card:hover .card-image {
    transform: scale(1.05);
}

/* Status Badge */
.badge-status-container {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 20;
}

.badge-status {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    padding: 4px 12px;
    border-radius: 9999px;
    /* rounded-full */
    font-size: 12px;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--color-rose-900);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.live {
    background: var(--color-rose-600);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.status-dot.recorded {
    background: var(--color-amber-500);
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .5;
    }
}

/* Card Content */
.card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

/* Category Badge */
.badge-category {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid;
}

.badge-category.gold {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
    /* amber-700 */
    border-color: rgba(245, 158, 11, 0.3);
}

.badge-category.burgundy {
    background: rgba(255, 241, 242, 1);
    /* rose-50 approx */
    color: var(--color-rose-900);
    border-color: rgba(136, 19, 55, 0.2);
}

/* Rating */
.rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-stone-500);
}

.rating svg {
    width: 14px;
    height: 14px;
    color: var(--color-amber-500);
    fill: var(--color-amber-500);
}

/* Title & Excerpt */
.card-title {
    font-size: 18px;
    /* text-lg */
    font-weight: 700;
    color: var(--color-rose-950);
    margin: 0 0 12px 0;
    line-height: 1.25;
    transition: color 0.2s;
}

.turto-course-card:hover .card-title {
    color: var(--color-rose-700);
}

.card-excerpt {
    font-size: 14px;
    color: var(--color-stone-500);
    line-height: 1.625;
    /* leading-relaxed */
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer */
.card-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--color-stone-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-box {
    display: flex;
    flex-direction: column;
}

.price-box .label {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--color-stone-400);
    font-weight: 700;
    letter-spacing: 0.05em;
}

.price-box .price {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-rose-900);
}

.btn-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-stone-50);
    border: 1px solid var(--color-stone-200);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-stone-400);
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}

.turto-course-card:hover .btn-arrow {
    background: var(--color-rose-900);
    color: var(--color-amber-100);
    border-color: var(--color-rose-900);
    box-shadow: 0 10px 15px -3px rgba(136, 19, 55, 0.3);
}

.btn-arrow svg {
    width: 20px;
    height: 20px;
}

/* Loader */
#turto-loader {
    text-align: center;
    padding: 40px;
    color: var(--color-stone-500);
    font-weight: 500;
}

/* Mobile Toggle Button */
.turto-mobile-toggle-wrapper {
    display: none;
    margin-bottom: 24px;
}

.turto-mobile-filter-btn {
    width: 100%;
    background: var(--color-white);
    border: 1px solid var(--color-stone-200);
    padding: 16px;
    border-radius: 12px;
    font-weight: 700;
    color: var(--color-rose-950);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    font-size: 16px;
}

.turto-mobile-filter-btn svg {
    width: 20px;
    height: 20px;
}

/* Mobile Sidebar Header */
.turto-sidebar-header-mobile {
    display: none;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-stone-200);
}

.turto-sidebar-header-mobile h3 {
    margin: 0;
    font-size: 18px;
    color: var(--color-rose-950);
}

.turto-close-btn {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: var(--color-stone-400);
    cursor: pointer;
    padding: 0;
}

/* Responsive Sidebar Logic */
@media (max-width: 768px) {
    .turto-catalog-container {
        flex-direction: column;
        padding: 20px;
    }

    .turto-mobile-toggle-wrapper {
        display: block;
    }

    .turto-sidebar {
        width: 100%;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9999;
        display: none;
        /* Hidden by default */
    }

    .turto-sidebar.open {
        display: flex !important;
        flex-direction: column;
        justify-content: flex-end;
    }

    /* MOBILE POPUP - Force solid white background */
    aside.turto-sidebar .turto-sidebar-inner,
    aside#turto-mobile-sidebar .turto-sidebar-inner,
    #turto-mobile-sidebar.turto-sidebar.open .turto-sidebar-inner {
        background: #ffffff !important;
        background-color: #ffffff !important;
        background-image: linear-gradient(#ffffff, #ffffff) !important;
        width: 100%;
        height: 85vh;
        border-radius: 24px 24px 0 0;
        padding: 24px;
        overflow-y: auto;
        position: relative;
        animation: slideUp 0.3s ease-out;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
        z-index: 10000;
    }

    /* Ensure white backgrounds for button containers */
    .turto-sidebar-inner .turto-search-box {
        background: #ffffff !important;
        background-color: #ffffff !important;
    }

    .turto-sidebar-inner .turto-modalidad-options {
        background: #ffffff !important;
        background-color: #ffffff !important;
    }

    .turto-sidebar-inner .turto-mod-btn {
        background: #ffffff !important;
        background-color: #ffffff !important;
    }

    .turto-sidebar-inner .turto-mod-btn.active {
        background: var(--color-rose-950) !important;
        background-color: var(--color-rose-950) !important;
    }

    .turto-sidebar-inner .turto-checkbox-label input:not(:checked)+.checkmark {
        background: #ffffff !important;
        background-color: #ffffff !important;
    }

    .turto-sidebar-inner .turto-checkbox-label input:checked+.checkmark {
        background: var(--color-rose-700) !important;
        background-color: var(--color-rose-700) !important;
        border-color: var(--color-rose-700) !important;
    }

    .turto-sidebar-inner .turto-checkbox-label input:checked+.checkmark .inner-dot {
        display: block !important;
        background: #ffffff !important;
    }

    /* Force white background on filter sections */
    .turto-sidebar-inner .turto-filter-section {
        background: transparent !important;
    }

    .turto-sidebar-inner .turto-sidebar-header-mobile {
        background: transparent !important;
    }

    /* Force 1 Column on Mobile */
    .turto-courses-grid {
        grid-template-columns: 1fr !important;
    }

    /* Mobile Apply Button */
    .turto-mobile-apply-wrapper {
        margin-top: 24px;
        padding-top: 16px;
        border-top: 1px solid var(--color-stone-200);
    }

    .turto-apply-btn {
        width: 100%;
        background: var(--color-rose-950);
        color: var(--color-white);
        padding: 14px;
        border-radius: 12px;
        font-weight: 700;
        border: none;
        cursor: pointer;
        font-size: 16px;
        transition: background 0.2s;
    }

    .turto-apply-btn:hover {
        background: var(--color-rose-900);
    }

    @keyframes slideUp {
        from {
            transform: translateY(100%);
        }

        to {
            transform: translateY(0);
        }
    }
}

/* Card Actions & Cart Button */
.card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-add-cart {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-stone-200);
    /* Gray */
    border: 1px solid var(--color-stone-200);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-stone-700);
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}

.btn-add-cart:hover,
.btn-add-cart:active {
    background: var(--color-stone-700);
    /* Darker Gray */
    background: var(--color-stone-700);
    /* Darker Gray */
    color: var(--color-white);
    border-color: var(--color-stone-700);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-add-cart svg {
    width: 20px;
    height: 20px;
}

/* Redesigned Card Styles - Premium Look */
.card-instructor {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-rose-600);
    /* Blue accent */
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-instructor::before {
    content: '';
    display: block;
    width: 20px;
    height: 2px;
    background: var(--color-rose-600);
    border-radius: 2px;
}

.card-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    /* Added horizontal padding */
    background: var(--color-stone-50);
    /* Light gray background */
    border-radius: 12px;
    /* Rounded capsule look */
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--color-stone-600);
    border: none;
    /* Explicitly removed borders */
    transition: all 0.3s ease;
}

.card-info-row:hover {
    background: var(--color-rose-50);
    /* Light blue on hover */
    transform: translateY(-1px);
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.info-item.right {
    justify-content: flex-end;
}

.info-item.full-width {
    width: 100%;
    justify-content: center;
    color: var(--color-rose-700);
    font-weight: 700;
}

.info-item svg {
    width: 18px;
    height: 18px;
    color: var(--color-rose-600);
    filter: drop-shadow(0 2px 4px rgba(2, 132, 199, 0.2));
}

.card-footer-redesign {
    margin-top: auto;
    padding-top: 8px;
}

.price-row {
    margin-bottom: 16px;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.price-row .price {
    font-size: 28px;
    font-weight: 800;
    color: var(--color-rose-950);
    letter-spacing: -0.03em;
}

.actions-row {
    display: flex;
    gap: 12px;
}

.btn-details {
    flex: 1;
    background: linear-gradient(135deg, var(--color-rose-600), var(--color-rose-700));
    color: var(--color-white);
    border: none;
    border-radius: 12px;
    padding: 12px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.btn-details:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(2, 132, 199, 0.35);
}

.btn-add-cart-square {
    width: 48px;
    height: 48px;
    background: var(--color-white);
    border: 2px solid var(--color-stone-100);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-stone-400);
    transition: all 0.3s;
    flex-shrink: 0;
}

.btn-add-cart-square:hover {
    border-color: var(--color-rose-600);
    color: var(--color-rose-600);
    background: var(--color-rose-50);
    transform: rotate(-5deg);
}

.btn-add-cart-square svg {
    width: 24px;
    height: 24px;
}

/* School Header Layout */
.school-header-layout {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}

.school-icon-inline {
    width: 60px;
    height: 60px;
}

/* --- SCHOOL HEADER BANNER (Consolidated) --- */
.turto-catalog-header.has-banner {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    margin-bottom: 32px;
    display: block;
}

.school-header-banner {
    position: relative;
    width: 100%;
    min-height: 300px;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.school-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.7));
    z-index: 1;
    border-radius: 16px;
}

.school-banner-content {
    position: relative;
    z-index: 2;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 900px;
    text-align: center;
}

.school-banner-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 50px;
    backdrop-filter: blur(4px);
    margin-bottom: 8px;
}

.school-banner-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin: 0;
    color: #fff;
    line-height: 1.1;
}

.school-banner-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    line-height: 1;
}

.banner-count-label {
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0.9;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Responsive Banner */
@media (max-width: 768px) {
    .school-header-banner {
        min-height: 220px;
    }

    .school-banner-title {
        font-size: 2rem;
    }

    .school-banner-content {
        padding: 20px;
    }

    .school-banner-count {
        top: 10px;
        right: 10px;
        padding: 6px 12px;
    }

    .banner-count-number {
        font-size: 1.2rem;
    }
}

/* --- FALLBACK LAYOUT (No Banner) --- */
.school-header-layout {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    width: 100% !important;
    padding: 24px !important;
    border-radius: 16px !important;
    box-sizing: border-box !important;
    justify-content: flex-start !important;
}

.school-header-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left !important;
    align-items: flex-start !important;
}

.school-icon-inline {
    width: 80px;
    height: 80px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 12px;
}

/* Sidebar Controls (Search + Count) */
.turto-sidebar-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.turto-search-box {
    margin-bottom: 0 !important;
    /* Remove bottom margin as it is handled by container gap */
}

.turto-sidebar-count {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    /* Align to right or start? User said 'next to', but in sidebar column layout, right aligned looks like a meta info */
    gap: 8px;
    font-size: 12px;
    color: var(--color-stone-500);
    font-weight: 600;
}

#turto-course-count {
    font-size: 14px;
    font-weight: 800;
    color: var(--color-rose-950);
}


/* Results Header (Count above grid) */
.turto-results-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--color-stone-500);
    font-weight: 600;
    height: 52px;
    /* Match search box height for alignment */
}

#turto-course-count {
    font-size: 16px;
    font-weight: 800;
    color: var(--color-rose-950);
}

/* --- FINAL SIDEBAR REFACTOR (FIXED UI & STICKY) --- */
@media (min-width: 769px) {

    /* 1. Sidebar Container */
    .turto-sidebar {
        /* Layout */
        display: block !important;

        /* Sticky Positioning */
        position: sticky !important;
        top: 80px !important;
        /* Offset for header */
        align-self: flex-start !important;
        /* CRITICAL */

        /* Visuals */
        background: transparent !important;

        /* Reset Constraints */
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
    }

    /* 2. Search Box (Flex Container) */
    .turto-sidebar .turto-search-box {
        /* Flex Layout */
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        /* Space between icon and input */

        /* Sizing & Spacing */
        width: 100% !important;
        padding: 12px 18px !important;
        /* Internal padding */
        margin: 0 0 24px 0 !important;
        /* Standard spacing below */

        /* Visuals */
        background: #fff !important;
        border: 1px solid var(--color-stone-200) !important;
        border-radius: 50px !important;
        /* Rounded container */
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;

        /* Reset positioning */
        position: relative !important;
        top: auto !important;
        z-index: 10 !important;
    }

    /* Search Icon */
    .turto-search-box .search-icon {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: var(--color-stone-400) !important;
        /* Reset absolute positioning if it existed */
        position: static !important;
        transform: none !important;
        width: auto !important;
        height: auto !important;
    }

    .turto-search-box .search-icon svg {
        width: 18px !important;
        height: 18px !important;
    }

    /* Search Input (Clean) */
    #turto-search-input {
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        height: auto !important;
        font-size: 14px !important;
        color: var(--color-stone-800) !important;
        outline: none !important;
        box-shadow: none !important;
    }

    #turto-search-input::placeholder {
        color: var(--color-stone-400) !important;
    }

    /* 3. Filter Sections */
    .turto-filter-section {
        padding: 0 !important;
        /* Clean padding */
        margin-bottom: 24px !important;
        /* Standard spacing */
        background: transparent !important;
        border-radius: 0 !important;
    }

    .turto-filter-section h3 {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 12px !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.05em !important;
        color: var(--color-stone-500) !important;
        margin-bottom: 12px !important;
    }

    .turto-filter-section h3 svg {
        width: 14px;
        height: 14px;
        color: var(--color-rose-600);
    }

    /* Options Spacing */
    .turto-modalidad-options,
    .turto-area-options {
        display: flex;
        flex-direction: column;
        gap: 8px !important;
        /* Consistent gap between items */
    }

    /* Hide Mobile Header on Desktop */
    @media (min-width: 768px) {
        .turto-sidebar-header-mobile {
            display: none !important;
        }
    }
}

/* End Desktop Media Query */

/* ============================================
   MOBILE POPUP FIX - FORCE WHITE BACKGROUND
   ============================================ */
@media (max-width: 768px) {

    /* Maximum specificity to override everything */
    aside.turto-sidebar#turto-mobile-sidebar .turto-sidebar-inner {
        background: white !important;
        background-color: white !important;
        background-image: linear-gradient(to bottom, white, white) !important;
    }

    aside.turto-sidebar#turto-mobile-sidebar.open .turto-sidebar-inner {
        background: white !important;
        background-color: white !important;
        background-image: linear-gradient(to bottom, white, white) !important;
    }

    /* Force white on all internal containers */
    .turto-sidebar#turto-mobile-sidebar .turto-search-box,
    .turto-sidebar#turto-mobile-sidebar .turto-modalidad-options,
    .turto-sidebar#turto-mobile-sidebar .turto-mod-btn:not(.active) {
        background: white !important;
        background-color: white !important;
    }

    /* Checkmark - only force white when NOT checked */
    .turto-sidebar#turto-mobile-sidebar .turto-checkbox-label input:not(:checked)+.checkmark {
        background: white !important;
        background-color: white !important;
    }

    /* Checkmark - force correct color when checked */
    .turto-sidebar#turto-mobile-sidebar .turto-checkbox-label input:checked+.checkmark {
        background: var(--color-rose-700) !important;
        background-color: var(--color-rose-700) !important;
        border-color: var(--color-rose-700) !important;
    }

    /* Show inner dot when checked */
    .turto-sidebar#turto-mobile-sidebar .turto-checkbox-label input:checked+.checkmark .inner-dot {
        display: block !important;
    }
}

/* Hide "Aplicar Filtro" button on Desktop */
@media (min-width: 769px) {
    .turto-mobile-apply-wrapper {
        display: none !important;
    }
}