:root {
    --slot-height-desktop: 128px;
    --slot-height-tablet: 128px;
    --slot-height-mobile: 128px;
    --gb-chip-height-desktop: 22px;
    --gb-chip-height-mobile: 20px;
    /* Altura específica para slots vacíos (redondeada para evitar variaciones) */
    --empty-slot-height-desktop: 128px;
    --empty-slot-height-tablet: 128px;
    --empty-slot-height-mobile: 128px;
}

/* Alinear visualmente el chip (1/K/2) con el texto GB */
.class-type {
    display: flex;
    align-items: center; /* centra verticalmente GB y el chip */
    gap: 6px;
}

.gb-text {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.gb-number {
    display: inline-flex; /* centra el carácter dentro del chip */
    align-items: center;
    justify-content: center;
    line-height: 1;
    height: var(--gb-chip-height-desktop);
    width: var(--gb-chip-height-desktop);
    min-width: var(--gb-chip-height-desktop);
    padding: 0; /* sin padding para mantener cuadrado perfecto */
    margin-bottom: 0;
    vertical-align: middle;
    box-sizing: border-box;
}

.gb-number.gb1,
.gb-number.gb2,
.gb-number.gbk {
    padding: 0; /* sin padding para mantener cuadrado perfecto en el chip */
}

@media (max-width: 480px) {
    .gb-number {
        height: var(--gb-chip-height-mobile);
        width: var(--gb-chip-height-mobile);
        min-width: var(--gb-chip-height-mobile);
        padding: 0;
    }
}

.schedule-section {
    padding: 80px 0;
    background: linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)), url('images/Wallpaper calendario/659702e3dfb177561b9d4888.png');
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    overflow-x: hidden;
    width: 100%;
}

.schedule-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
    width: 100%;
    box-sizing: border-box;
}

.schedule-title {
    text-align: center;
    margin-bottom: 10px;
}

.schedule-title h2 {
    font-size: 48px;
    color: #212121;
    margin-bottom: 15px;
}

.schedule-grid {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
    grid-template-columns: repeat(6, 1fr); /* antes: repeat(7, 1fr) */
    align-items: stretch;
}

@media (min-width: 1200px) {
    .schedule-grid {
        grid-template-columns: repeat(6, 1fr); /* ajustado para 6 días */
    }
}

@media (max-width: 991px) {
    .schedule-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Móvil: "masonry" simple con columnas para evitar huecos por alturas distintas */
@media (max-width: 600px) {
  #schedule-section .schedule-grid {
    display: block !important; /* anula grid/flex anteriores */
    column-count: 2;
    column-gap: 15px;
    width: 100% !important;
    margin: 0 !important;
  }
  #schedule-section .schedule-day {
    break-inside: avoid; /* no cortar tarjetas entre columnas */
    margin: 0 0 15px 0 !important; /* espacio vertical entre tarjetas */
    width: 100% !important; /* ocupa el ancho de la columna */
    max-width: none !important;
  }
}

@media (max-width: 1024px) {
    .schedule-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        align-items: start
    }
}

.schedule-day {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

/* Collapsible schedule styles */
.schedule-day.collapsible .day-header {
    cursor: pointer;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.schedule-day.collapsible .toggle-indicator {
    position: absolute;
    right: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.schedule-day.collapsed .time-slot {
    display: none;
}

.schedule-day.expanded .time-slot {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.day-header {
    background: var(--gracie-red);
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: 800;
    font-size: 1.2rem;
    transition: background-color 0.3s ease;
}

.schedule-day.collapsible .day-header:hover {
    background-color: #d41730;
}

/* Uniform card sizing for slots */
/* Ajuste: altura mínima en vez de fija para que crezca con contenido */
.time-slot {
    min-height: var(--slot-height-desktop);
    max-height: var(--slot-height-desktop);
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 6px;
    overflow: hidden;
}

@media (max-width: 991px) {
    .time-slot {
        min-height: var(--slot-height-tablet);
        max-height: var(--slot-height-tablet);
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .time-slot {
        min-height: var(--slot-height-mobile);
        max-height: var(--slot-height-mobile);
        padding: 10px 12px;
    }
}

/* Quitar el clamp para permitir crecimiento con texto */
.class-desc {
    font-weight: 700;
    line-height: 1.2;
    /* antes: ellipsis y -webkit-line-clamp */
    overflow: visible;
    text-overflow: initial;
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    word-break: break-word;
    min-width: 0;
}

.time-slot:last-child {
    border-bottom: none;
}

.time-slot:hover {
    background-color: #f8f8f8;
}

.time {
    font-weight: 800;
    margin-bottom: 2px;
    color: #333;
    line-height: 1.2;
}

/* Ajustes para que "GB 1 Fundamentos" quepa en una sola línea en desktop */
/* Reorganizar: poner la descripción en la línea inferior bajo GB */
.class-type {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex-wrap: wrap; /* antes nowrap */
}

.class-desc {
    font-weight: 700;
    line-height: 1.2;
    overflow: visible;
    text-overflow: initial;
    display: block;
    word-break: break-word;
    min-width: 0;
    width: 100%; /* ocupa toda la línea */
    flex-basis: 100%; /* fuerza salto de línea debajo del chip GB */
    margin-top: 4px;
}

/* En desktop permitimos salto de línea para que quede debajo del GB */
@media (min-width: 992px) {
    .class-desc { white-space: normal; }
}

/* Compactar el badge del número (GB 1/K/2) */
.gb-number {
    display: inline-flex; /* mantener flex para centrar contenido */
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    line-height: 1;
}

.gb-number.gb1,
.gb-number.gb2,
.gb-number.gbk,
.gb-number.women {
    padding: 0; /* mantener cuadrado perfecto */
    margin-bottom: 0; /* evita empuje vertical */
}

/* Evitar partir palabras como "Fundamentos" */
.class-desc {
    word-break: keep-all;
    overflow-wrap: normal;
    hyphens: none;
}

@media (min-width: 992px) {
    /* En desktop mantenemos todo en una línea si cabe */
    .class-desc {
        white-space: nowrap;
    }
}

.class-desc {
    font-weight: 700;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-width: 0;
}

.schedule-legend {
    max-width: 1200px;
    margin: 20px auto 0;
    padding: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    justify-content: flex-start;
    align-items: center;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 1 220px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.legend-text {
    font-size: 0.9rem;
    color: rgb(51, 51, 51);
    font-weight: 700;
}

.gb1 {
    background-color: #1e88e5;
    color: white;
    border-radius: 4px;
    padding: 2px 8px;
    box-shadow: 0 2px 4px rgba(30, 136, 229, 0.3);
    margin-bottom: 6px;
}

.gb2 {
    background-color: #8e24aa;
    color: white;
    border-radius: 4px;
    padding: 2px 8px;
    box-shadow: 0 2px 4px rgba(142, 36, 170, 0.3);
    margin-bottom: 6px;
}

.no-gi {
    background-color: #6a1b9a;
    color: white;
    border-radius: 4px;
    padding: 2px 8px;
    box-shadow: 0 2px 4px rgba(106, 27, 154, 0.3);
    margin-bottom: 6px;
}

.kids {
    background-color: #43a047;
    color: white;
    border-radius: 4px;
    padding: 2px 8px;
    box-shadow: 0 2px 4px rgba(67, 160, 71, 0.3);
    margin-bottom: 6px;
}

.private {
    background-color: #f57c00;
    color: white;
    border-radius: 4px;
    padding: 2px 8px;
    box-shadow: 0 2px 4px rgba(245, 124, 0, 0.3);
    margin-bottom: 6px;
}

.free-training {
    background-color: #26c6da; /* color aclarado para OPEN/WRESTLING */
    color: white;
    border-radius: 4px;
    padding: 2px 8px;
    box-shadow: 0 2px 4px rgba(38, 198, 218, 0.3);
    margin-bottom: 6px;
}

.gbk {
    background-color: #43a047;
    color: white;
    border-radius: 4px;
    padding: 2px 8px;
    box-shadow: 0 2px 4px rgba(67, 160, 71, 0.3);
    margin-bottom: 6px;
}

/* Color distinto para WRESTLING (OPEN) */
.wrestling {
    background-color: #00bfa5;
    color: white;
    border-radius: 4px;
    padding: 2px 8px;
    box-shadow: 0 2px 4px rgba(0, 191, 165, 0.3);
    margin-bottom: 6px;
}

/* Color para WOMEN */
.women {
    background-color: #e91e63;
    color: white;
    border-radius: 4px;
    padding: 2px 8px;
    box-shadow: 0 2px 4px rgba(233, 30, 99, 0.3);
    margin-bottom: 6px;
}

@media (max-width: 1024px) {
    .schedule-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .schedule-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .schedule-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
        width: 100% !important;
        margin: 0 !important;
    }

    .schedule-title h2 {
        font-size: 32px;
        padding: 0 10px;
    }

    .schedule-day {
        margin: 0 10px;
    }
}

.gb-text {
    font-weight: 700;
}

.gb-number {
    font-weight: 700;
}

/* Ocultar contenido pero mantener el alto para slots vacíos */
.time-slot.empty-slot .time,
.time-slot.empty-slot .class-color,
.time-slot.empty-slot .class-type { visibility: hidden; }

/* Altura exacta para slots vacíos (según especificación) */
.time-slot.empty-slot { min-height: var(--slot-height-desktop); max-height: var(--slot-height-desktop); }
@media (max-width: 991px) { .time-slot.empty-slot { min-height: var(--slot-height-tablet); max-height: var(--slot-height-tablet); } }
@media (max-width: 480px) { .time-slot.empty-slot { min-height: var(--slot-height-mobile); max-height: var(--slot-height-mobile); } }

/* Salvaguarda: ocultar visualmente los slots marcados como vacíos por el renderer */
.time-slot.empty-slot { pointer-events: none; }
.time-slot.empty-slot .time,
.time-slot.empty-slot .class-color,
.time-slot.empty-slot .class-type,
.time-slot.empty-slot .class-desc { visibility: hidden !important; }

/* Forzar mínimo de 120px en todos los slots (incluidos vacíos) */
.schedule-grid .time-slot,
.schedule-grid .time-slot.empty-slot { min-height: 128px !important; max-height: 128px !important; }

/* Forzar saltos de línea visibles en descripciones no vacías */
.class-desc { white-space: pre-line !important; }
.schedule-grid,
.schedule-grid .time-slot,
.schedule-grid .time,
.schedule-grid .class-type,
.schedule-grid .gb-text,
.schedule-grid .gb-number,
.schedule-grid .class-desc { line-height: 1.25 !important; }
.schedule-grid .time-slot .class-desc {
  white-space: pre-line;
  display: block;
  overflow: visible;
  text-overflow: initial;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Consistencia entre navegadores: forzar parámetros clave del horario */
.schedule-grid .class-desc {
  display: block !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: unset !important;
}

.schedule-grid .time-slot,
.schedule-grid .time-slot.empty-slot {
  min-height: 128px !important;
  box-sizing: border-box !important;
}

.schedule-grid .time,
.schedule-grid .class-type .gb-text,
.schedule-grid .class-desc {
  line-height: 1.25 !important;
}

/* Garantizar 6 columnas en desktop, 3 en tablet y 2 en móvil */
@media (min-width: 1200px) {
  .schedule-grid { grid-template-columns: repeat(6, 1fr) !important; }
}
@media (min-width: 601px) and (max-width: 1024px) {
  .schedule-grid { grid-template-columns: repeat(3, 1fr) !important; }
}
/* Overrides móviles: asegurar 2 columnas en todo el sitio y específicamente en #schedule-section */
@media (max-width: 600px) {
  .schedule-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
/* Móvil: "masonry" simple con columnas para evitar huecos por alturas distintas */
@media (max-width: 600px) {
  #schedule-section .schedule-grid {
    display: block !important; /* anula grid/flex anteriores */
    column-count: 2;
    column-gap: 15px;
    width: 100% !important;
    margin: 0 !important;
  }
  #schedule-section .schedule-day {
    break-inside: avoid; /* no cortar tarjetas entre columnas */
    margin: 0 0 15px 0 !important; /* espacio vertical entre tarjetas */
    width: 100% !important; /* ocupa el ancho de la columna */
    max-width: none !important;
  }
}
@media (max-width: 480px) {
  #schedule-section .schedule-grid {
    display: block !important;
    column-count: 2; /* mantenemos 2 columnas en móviles pequeños */
    column-gap: 15px;
    width: 100% !important;
    margin: 0 !important;
  }
  #schedule-section .schedule-day {
    break-inside: avoid;
    margin: 0 0 15px 0 !important;
    width: 100% !important;
    max-width: none !important;
  }
}

.schedule-grid .time-slot .class-desc {
  white-space: pre-line;
  display: block;
  overflow: visible;
  text-overflow: initial;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Tipografía y métricas consistentes entre navegadores */
.schedule-grid { font-family: Arial, Helvetica, sans-serif !important; }
.schedule-grid .time-slot { box-sizing: border-box; }
.schedule-grid .time,
.schedule-grid .class-type .gb-text,
.schedule-grid .class-desc { font-size: 14px !important; }
.schedule-grid .gb-number { font-size: 12px !important; }
@media (max-width: 991px) {
  .schedule-grid .time,
  .schedule-grid .class-type .gb-text,
  .schedule-grid .class-desc { font-size: 13px !important; }
  .schedule-grid .gb-number { font-size: 11px !important; }
}
@media (max-width: 480px) {
  .schedule-grid .time,
  .schedule-grid .class-type .gb-text,
  .schedule-grid .class-desc { font-size: 12px !important; }
  .schedule-grid .gb-number { font-size: 10px !important; }
}

@media (max-width: 600px) {
  .schedule-container { padding: 0 16px !important; }
}
@media (max-width: 480px) {
  .schedule-container { padding: 0 16px !important; }
}

.schedule-day {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

/* Collapsible schedule styles */
.schedule-day.collapsible .day-header {
    cursor: pointer;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.schedule-day.collapsible .toggle-indicator {
    position: absolute;
    right: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.schedule-day.collapsed .time-slot {
    display: none;
}

.schedule-day.expanded .time-slot {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.day-header {
    background: var(--gracie-red);
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: 800;
    font-size: 1.2rem;
    transition: background-color 0.3s ease;
}

.schedule-day.collapsible .day-header:hover {
    background-color: #d41730;
}

/* Uniform card sizing for slots */
/* Ajuste: altura mínima en vez de fija para que crezca con contenido */
.time-slot {
    min-height: var(--slot-height-desktop);
    max-height: var(--slot-height-desktop);
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 6px;
    overflow: hidden;
}

@media (max-width: 991px) {
    .time-slot {
        min-height: var(--slot-height-tablet);
        max-height: var(--slot-height-tablet);
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .time-slot {
        min-height: var(--slot-height-mobile);
        max-height: var(--slot-height-mobile);
        padding: 10px 12px;
    }
}

/* Quitar el clamp para permitir crecimiento con texto */
.class-desc {
    font-weight: 700;
    line-height: 1.2;
    /* antes: ellipsis y -webkit-line-clamp */
    overflow: visible;
    text-overflow: initial;
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    word-break: break-word;
    min-width: 0;
}

.time-slot:last-child {
    border-bottom: none;
}

.time-slot:hover {
    background-color: #f8f8f8;
}

.time {
    font-weight: 800;
    margin-bottom: 2px;
    color: #333;
    line-height: 1.2;
}

/* Ajustes para que "GB 1 Fundamentos" quepa en una sola línea en desktop */
/* Reorganizar: poner la descripción en la línea inferior bajo GB */
.class-type {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex-wrap: wrap; /* antes nowrap */
}

.class-desc {
    font-weight: 700;
    line-height: 1.2;
    overflow: visible;
    text-overflow: initial;
    display: block;
    word-break: break-word;
    min-width: 0;
    width: 100%; /* ocupa toda la línea */
    flex-basis: 100%; /* fuerza salto de línea debajo del chip GB */
    margin-top: 4px;
}

/* En desktop permitimos salto de línea para que quede debajo del GB */
@media (min-width: 992px) {
    .class-desc { white-space: normal; }
}

/* Compactar el badge del número (GB 1/K/2) */
.gb-number {
    display: inline-flex; /* mantener flex para centrar contenido */
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    line-height: 1;
}

.gb-number.gb1,
.gb-number.gb2,
.gb-number.gbk,
.gb-number.women {
    padding: 0; /* mantener cuadrado perfecto */
    margin-bottom: 0; /* evita empuje vertical */
}

/* Evitar partir palabras como "Fundamentos" */
.class-desc {
    word-break: keep-all;
    overflow-wrap: normal;
    hyphens: none;
}

@media (min-width: 992px) {
    /* En desktop mantenemos todo en una línea si cabe */
    .class-desc {
        white-space: nowrap;
    }
}

.class-desc {
    font-weight: 700;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-width: 0;
}

.schedule-legend {
    max-width: 1200px;
    margin: 20px auto 0;
    padding: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    justify-content: flex-start;
    align-items: center;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 1 220px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.legend-text {
    font-size: 0.9rem;
    color: rgb(51, 51, 51);
    font-weight: 700;
}

.gb1 {
    background-color: #1e88e5;
    color: white;
    border-radius: 4px;
    padding: 2px 8px;
    box-shadow: 0 2px 4px rgba(30, 136, 229, 0.3);
    margin-bottom: 6px;
}

.gb2 {
    background-color: #8e24aa;
    color: white;
    border-radius: 4px;
    padding: 2px 8px;
    box-shadow: 0 2px 4px rgba(142, 36, 170, 0.3);
    margin-bottom: 6px;
}

.no-gi {
    background-color: #6a1b9a;
    color: white;
    border-radius: 4px;
    padding: 2px 8px;
    box-shadow: 0 2px 4px rgba(106, 27, 154, 0.3);
    margin-bottom: 6px;
}

.kids {
    background-color: #43a047;
    color: white;
    border-radius: 4px;
    padding: 2px 8px;
    box-shadow: 0 2px 4px rgba(67, 160, 71, 0.3);
    margin-bottom: 6px;
}

.private {
    background-color: #f57c00;
    color: white;
    border-radius: 4px;
    padding: 2px 8px;
    box-shadow: 0 2px 4px rgba(245, 124, 0, 0.3);
    margin-bottom: 6px;
}

.free-training {
    background-color: #26c6da; /* color aclarado para OPEN/WRESTLING */
    color: white;
    border-radius: 4px;
    padding: 2px 8px;
    box-shadow: 0 2px 4px rgba(38, 198, 218, 0.3);
    margin-bottom: 6px;
}

.gbk {
    background-color: #43a047;
    color: white;
    border-radius: 4px;
    padding: 2px 8px;
    box-shadow: 0 2px 4px rgba(67, 160, 71, 0.3);
    margin-bottom: 6px;
}

/* Color distinto para WRESTLING (OPEN) */
.wrestling {
    background-color: #00bfa5;
    color: white;
    border-radius: 4px;
    padding: 2px 8px;
    box-shadow: 0 2px 4px rgba(0, 191, 165, 0.3);
    margin-bottom: 6px;
}

/* Color para WOMEN */
.women {
    background-color: #e91e63;
    color: white;
    border-radius: 4px;
    padding: 2px 8px;
    box-shadow: 0 2px 4px rgba(233, 30, 99, 0.3);
    margin-bottom: 6px;
}

@media (max-width: 1024px) {
    .schedule-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .schedule-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .schedule-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
        width: 100% !important;
        margin: 0 !important;
    }

    .schedule-title h2 {
        font-size: 32px;
        padding: 0 10px;
    }

    .schedule-day {
        margin: 0 10px;
    }
}

.gb-text {
    font-weight: 700;
}

.gb-number {
    font-weight: 700;
}

/* Ocultar contenido pero mantener el alto para slots vacíos */
.time-slot.empty-slot .time,
.time-slot.empty-slot .class-color,
.time-slot.empty-slot .class-type { visibility: hidden; }

/* Altura exacta para slots vacíos (según especificación) */
.time-slot.empty-slot { min-height: var(--slot-height-desktop); max-height: var(--slot-height-desktop); }
@media (max-width: 991px) { .time-slot.empty-slot { min-height: var(--slot-height-tablet); max-height: var(--slot-height-tablet); } }
@media (max-width: 480px) { .time-slot.empty-slot { min-height: var(--slot-height-mobile); max-height: var(--slot-height-mobile); } }

/* Salvaguarda: ocultar visualmente los slots marcados como vacíos por el renderer */
.time-slot.empty-slot { pointer-events: none; }
.time-slot.empty-slot .time,
.time-slot.empty-slot .class-color,
.time-slot.empty-slot .class-type,
.time-slot.empty-slot .class-desc { visibility: hidden !important; }

/* Forzar mínimo de 120px en todos los slots (incluidos vacíos) */
.schedule-grid .time-slot,
.schedule-grid .time-slot.empty-slot { min-height: 128px !important; max-height: 128px !important; }

/* Forzar saltos de línea visibles en descripciones no vacías */
.class-desc { white-space: pre-line !important; }
.schedule-grid,
.schedule-grid .time-slot,
.schedule-grid .time,
.schedule-grid .class-type,
.schedule-grid .gb-text,
.schedule-grid .gb-number,
.schedule-grid .class-desc { line-height: 1.25 !important; }
.schedule-grid .time-slot .class-desc {
  white-space: pre-line;
  display: block;
  overflow: visible;
  text-overflow: initial;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Consistencia entre navegadores: forzar parámetros clave del horario */
.schedule-grid .class-desc {
  display: block !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: unset !important;
}

.schedule-grid .time-slot,
.schedule-grid .time-slot.empty-slot {
  min-height: 128px !important;
  box-sizing: border-box !important;
}

.schedule-grid .time,
.schedule-grid .class-type .gb-text,
.schedule-grid .class-desc {
  line-height: 1.25 !important;
}

/* Garantizar 6 columnas en desktop y 3 en tablet (601–1024px) */
@media (min-width: 1200px) {
  .schedule-grid { grid-template-columns: repeat(6, 1fr) !important; }
}
@media (min-width: 601px) and (max-width: 1024px) {
  .schedule-grid { grid-template-columns: repeat(3, 1fr) !important; }
}
.schedule-grid .time-slot .class-desc {
  white-space: pre-line;
  display: block;
  overflow: visible;
  text-overflow: initial;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Tipografía y métricas consistentes entre navegadores */
.schedule-grid { font-family: Arial, Helvetica, sans-serif !important; }
.schedule-grid .time-slot { box-sizing: border-box; }
.schedule-grid .time,
.schedule-grid .class-type .gb-text,
.schedule-grid .class-desc { font-size: 14px !important; }
.schedule-grid .gb-number { font-size: 12px !important; }
@media (max-width: 991px) {
  .schedule-grid .time,
  .schedule-grid .class-type .gb-text,
  .schedule-grid .class-desc { font-size: 13px !important; }
  .schedule-grid .gb-number { font-size: 11px !important; }
}
@media (max-width: 480px) {
  .schedule-grid .time,
  .schedule-grid .class-type .gb-text,
  .schedule-grid .class-desc { font-size: 12px !important; }
  .schedule-grid .gb-number { font-size: 10px !important; }
}

/* Override final: asegurar 2 columnas en móviles <=600px */
@media (max-width: 600px) {
  .schedule-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* Evitar que el lado colapsado se estire cuando el otro se expande (móvil) */
@media (max-width: 600px) {
  #schedule-section .schedule-grid {
    align-items: flex-start !important;
    align-content: flex-start !important;
  }
  #schedule-section .schedule-day {
    align-self: flex-start !important;
  }
}

/* Ajuste adicional para móviles muy pequeños */
@media (max-width: 480px) {
  #schedule-section .schedule-grid {
    align-items: flex-start !important;
  }
  #schedule-section .schedule-day {
    align-self: flex-start !important;
  }
}
