/* ===== RESET Y CONFIGURACIÓN BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
}

html {
    -webkit-scroll-behavior: smooth;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 10px;
    line-height: 1.5;
    color: #2c3e50;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== CONTENEDOR PRINCIPAL ===== */
.calendar-container {
    max-width: 100%;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: slideInUp 0.6s ease-out;
    -webkit-animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@-webkit-keyframes slideInUp {
    from {
        opacity: 0;
        -webkit-transform: translateY(50px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
    }
}

/* ===== HEADER DEL CALENDARIO ===== */
.calendar-header {
    background: linear-gradient(135deg, #43b5ae 0%, #3a9d97 100%);
    color: white;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.calendar-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="80" r="3" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="70" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    pointer-events: none;
}

.calendar-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        #43b5ae 0%, 
        #e74c3c 25%, 
        #9b59b6 50%, 
        #27ae60 75%, 
        #f39c12 100%);
}

.header-brand {
    display: flex;
    display: -webkit-flex;
    align-items: center;
    -webkit-align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.brand-icon {
    font-size: 2.5rem;
    background: rgba(255,255,255,0.2);
    padding: 15px;
    border-radius: 50%;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: float 6s ease-in-out infinite;
    -webkit-animation: float 6s ease-in-out infinite;
    border: 2px solid rgba(255,255,255,0.2);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@-webkit-keyframes float {
    0%, 100% { -webkit-transform: translateY(0px); }
    50% { -webkit-transform: translateY(-10px); }
}

.brand-info {
    flex: 1;
    -webkit-flex: 1;
}

.brand-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    font-family: 'Georgia', serif;
    letter-spacing: 0.5px;
}

.brand-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 300;
    font-style: italic;
    letter-spacing: 1px;
}

/* ===== NAVEGACIÓN ===== */
.calendar-navigation {
    display: flex;
    display: -webkit-flex;
    justify-content: space-between;
    -webkit-justify-content: space-between;
    align-items: center;
    -webkit-align-items: center;
    position: relative;
    z-index: 2;
}

.desktop-nav {
    display: flex;
    display: -webkit-flex;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    -webkit-flex-direction: column;
    gap: 15px;
    text-align: center;
}

.mobile-month {
    order: 1;
    -webkit-order: 1;
}

.mobile-refresh {
    order: 2;
    -webkit-order: 2;
}

.mobile-navigation {
    order: 3;
    -webkit-order: 3;
    display: flex;
    display: -webkit-flex;
    gap: 10px;
    justify-content: center;
    -webkit-justify-content: center;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 15px;
}

.mobile-navigation .nav-button {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    min-width: auto;
    height: auto;
}

.nav-button {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-width: 50px;
    height: 50px;
    display: flex;
    display: -webkit-flex;
    align-items: center;
    -webkit-align-items: center;
    justify-content: center;
    -webkit-justify-content: center;
    -webkit-appearance: none;
    appearance: none;
}

.nav-button:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-3px) scale(1.1);
    -webkit-transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.nav-button:active {
    transform: translateY(-1px) scale(1.05);
    -webkit-transform: translateY(-1px) scale(1.05);
}

.month-info {
    text-align: center;
    flex: 1;
    -webkit-flex: 1;
    max-width: 300px;
}

.calendar-title {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.refresh-button {
    background: #27ae60;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
    display: inline-flex;
    display: -webkit-inline-flex;
    align-items: center;
    -webkit-align-items: center;
    gap: 5px;
    border: 2px solid transparent;
    -webkit-appearance: none;
    appearance: none;
}

.refresh-button:hover {
    background: #219a52;
    border-color: rgba(255,255,255,0.3);
    transform: translateY(-2px);
    -webkit-transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
}

.refresh-text {
    display: inline;
}

.refreshing .refresh-button {
    animation: spin 1s linear infinite;
    -webkit-animation: spin 1s linear infinite;
}

/* ===== ESTADOS DE CARGA ===== */
.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #43b5ae;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    -webkit-animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

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

.loading-text {
    font-size: 16px;
    margin-top: 15px;
}

.calendar-container.loading .calendar-grid {
    opacity: 0.5;
    pointer-events: none;
}

.error-state {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 30px;
    margin: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.3);
}

.error-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.error-message {
    margin-bottom: 20px;
    opacity: 0.9;
}

.error-button {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}

.error-button:hover {
    background: rgba(255,255,255,0.3);
}

/* ===== GRID DEL CALENDARIO ===== */
.calendar-grid {
    display: grid;
    display: -webkit-grid;
    grid-template-columns: repeat(6, 1fr);
    -webkit-grid-template-columns: repeat(6, 1fr);
    background: #ecf0f1;
    animation: fadeIn 0.5s ease-out;
    -webkit-animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@-webkit-keyframes fadeIn {
    from {
        opacity: 0;
        -webkit-transform: translateY(20px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
    }
}

.calendario-cargado .day-cell {
    animation: fadeInClass 0.4s ease-out;
    -webkit-animation: fadeInClass 0.4s ease-out;
    animation-fill-mode: both;
    -webkit-animation-fill-mode: both;
}

.calendario-cargado .day-cell:nth-child(1) { animation-delay: 0.1s; -webkit-animation-delay: 0.1s; }
.calendario-cargado .day-cell:nth-child(2) { animation-delay: 0.2s; -webkit-animation-delay: 0.2s; }
.calendario-cargado .day-cell:nth-child(3) { animation-delay: 0.3s; -webkit-animation-delay: 0.3s; }

@keyframes fadeInClass {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@-webkit-keyframes fadeInClass {
    from {
        opacity: 0;
        -webkit-transform: translateY(10px) scale(0.9);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0) scale(1);
    }
}

.day-header {
    background: #34495e;
    color: white;
    padding: 15px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-right: 1px solid #2c3e50;
}

.day-header:last-child {
    border-right: none;
}

.day-cell {
    background: white;
    min-height: 120px;
    padding: 10px 8px;
    border: 1px solid #ecf0f1;
    position: relative;
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
    overflow: hidden;
}

.day-cell:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    -webkit-transform: translateY(-2px);
    z-index: 10;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #43b5ae;
}

.day-number {
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 16px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.other-month {
    background: #f8f9fa;
    opacity: 0.6;
}

.other-month .day-number {
    color: #bdc3c7;
}

.today {
    background: linear-gradient(135deg, #43b5ae 0%, #3a9d97 100%);
    color: white;
    border-color: #43b5ae;
    position: relative;
    overflow: hidden;
}

.today .day-number {
    color: white;
    font-weight: 800;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.today::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.today::after {
    content: '✨';
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 12px;
    animation: sparkle 2s ease-in-out infinite;
    -webkit-animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

@-webkit-keyframes sparkle {
    0%, 100% { opacity: 1; -webkit-transform: scale(1); }
    50% { opacity: 0.7; -webkit-transform: scale(1.2); }
}

/* ===== CLASES/EVENTOS ===== */
.clase-item {
    display: block;
    padding: 6px 8px;
    margin: 3px 0;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
    text-decoration: none;
    color: white;
    line-height: 1.3;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    animation: fadeInClass 0.4s ease-out;
    -webkit-animation: fadeInClass 0.4s ease-out;
    animation-fill-mode: both;
    -webkit-animation-fill-mode: both;
}

.clase-item:nth-child(1) { animation-delay: 0.1s; -webkit-animation-delay: 0.1s; }
.clase-item:nth-child(2) { animation-delay: 0.2s; -webkit-animation-delay: 0.2s; }
.clase-item:nth-child(3) { animation-delay: 0.3s; -webkit-animation-delay: 0.3s; }

.clase-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
    -webkit-transition: left 0.5s ease;
}

.clase-item:hover::before {
    left: 100%;
}

.clase-item::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    -webkit-transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: -1;
}

.clase-item:hover::after {
    opacity: 1;
}

.clase-item:hover {
    transform: translateY(-2px) scale(1.02);
    -webkit-transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 20;
}

.clase-titulo {
    font-weight: 600;
    margin-bottom: 2px;
    display: block;
}

.clase-detalles {
    font-size: 10px;
    opacity: 0.9;
    display: flex;
    display: -webkit-flex;
    justify-content: space-between;
    -webkit-justify-content: space-between;
    align-items: center;
    -webkit-align-items: center;
}

.clase-hora {
    font-weight: 500;
}

.clase-plazas {
    background: rgba(255,255,255,0.2);
    padding: 1px 4px;
    border-radius: 8px;
    font-size: 9px;
}

/* ===== TEMÁTICAS DE CLASES ===== */
.clase-costura {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.clase-costura:hover {
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.clase-ganchillo {
    background: linear-gradient(135deg, #43b5ae 0%, #3a9d97 100%);
    box-shadow: 0 4px 15px rgba(67, 181, 174, 0.3);
}

.clase-ganchillo:hover {
    box-shadow: 0 6px 20px rgba(67, 181, 174, 0.4);
}

.clase-bordado {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.3);
}

.clase-bordado:hover {
    box-shadow: 0 6px 20px rgba(155, 89, 182, 0.4);
}

.clase-punto {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.clase-punto:hover {
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.clase-especial {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.clase-especial:hover {
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
}

/* ===== ESTADOS DE DISPONIBILIDAD ===== */
.clase-agotado {
    opacity: 0.8;
    position: relative;
    border: 2px solid #e74c3c;
}

.clase-agotado::after {
    content: 'COMPLETO';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    -webkit-transform: translate(-50%, -50%);
    background: rgba(231, 76, 60, 0.95);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    z-index: 10;
}

.clase-pocas-plazas {
    border: 2px solid #f39c12;
    animation: pulse 2s infinite;
    -webkit-animation: pulse 2s infinite;
    position: relative;
    overflow: hidden;
}

.clase-pocas-plazas::before {
    content: '¡ÚLTIMAS PLAZAS!';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    -webkit-transform: translateX(-50%);
    background: #f39c12;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 10;
}

.clase-pocas-plazas::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(243, 156, 18, 0.3), transparent);
    animation: shimmer 3s infinite;
    -webkit-animation: shimmer 3s infinite;
}

@keyframes pulse {
    0%, 100% { border-color: #f39c12; }
    50% { border-color: #e67e22; }
}

@-webkit-keyframes pulse {
    0%, 100% { border-color: #f39c12; }
    50% { border-color: #e67e22; }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@-webkit-keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.more-classes {
    background: rgba(67, 181, 174, 0.8);
    color: white;
    padding: 2px 4px;
    margin: 1px 0;
    border-radius: 3px;
    font-size: 8px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
}

/* ===== ESTILOS PARA TALLERES DE VARIOS DÍAS ===== */
.clase-item.clase-multidia {
    position: relative;
    border-left: 4px solid #43b5ae !important;
    padding-left: 6px;
    /* Resetear posibles interferencias */
    z-index: auto;
}

.clase-item.clase-multidia::before {
    content: '📅';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
    opacity: 0.8;
    z-index: 10;
    background: none;
    border: none;
    box-shadow: none;
}

.clase-item.clase-multidia.multidia-primer-dia {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    border-bottom-left-radius: 3px;
    border-bottom-right-radius: 3px;
}

.clase-item.clase-multidia.multidia-ultimo-dia {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
}

.clase-item.clase-multidia:not(.multidia-primer-dia):not(.multidia-ultimo-dia) {
    border-radius: 3px;
}

.clase-item.clase-multidia .clase-precio-mini {
    font-size: 8px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    text-align: center;
    margin-top: 2px;
    padding: 1px 3px;
    background: rgba(0,0,0,0.1);
    border-radius: 3px;
}

/* Conectar visualmente los días consecutivos - solo para multiday */
.clase-item.clase-multidia.multidia-primer-dia::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    -webkit-transform: translateX(-50%);
    width: 2px;
    height: 6px;
    background: #43b5ae;
    border-radius: 1px;
    z-index: 1;
}

.clase-item.clase-multidia:not(.multidia-primer-dia):not(.multidia-ultimo-dia)::after {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    -webkit-transform: translateX(-50%);
    width: 2px;
    height: calc(100% + 6px);
    background: #43b5ae;
    border-radius: 1px;
    z-index: 1;
}

.clase-item.clase-multidia.multidia-ultimo-dia::after {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    -webkit-transform: translateX(-50%);
    width: 2px;
    height: 6px;
    background: #43b5ae;
    border-radius: 1px;
    z-index: 1;
}

/* Animación especial para talleres de varios días */
.clase-item.clase-multidia:hover {
    transform: translateY(-2px) scale(1.02);
    -webkit-transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(67, 181, 174, 0.4);
}

.clase-item.clase-multidia.multidia-primer-dia:hover {
    box-shadow: 0 6px 20px rgba(67, 181, 174, 0.4), 0 20px 40px rgba(67, 181, 174, 0.2);
}

/* Asegurar que las clases normales no se vean afectadas */
.clase-item:not(.clase-multidia) {
    border-left: none !important;
    padding-left: 8px !important;
}

.clase-item:not(.clase-multidia)::after {
    display: none !important;
}

/* ===== LEYENDA ===== */
.legend-section {
    padding: 25px;
    background: #f8f9fa;
    border-top: 1px solid #ecf0f1;
}

.legend-title {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
}

.legend-grid {
    display: grid;
    display: -webkit-grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    -webkit-grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    -webkit-gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.legend-item {
    display: flex;
    display: -webkit-flex;
    align-items: center;
    -webkit-align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

.legend-item:hover {
    transform: translateY(-2px) scale(1.02);
    -webkit-transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    background: rgba(255,255,255,0.95);
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    flex-shrink: 0;
    -webkit-flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.legend-color::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    -webkit-transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
}

.legend-item:hover .legend-color::after {
    width: 100%;
    height: 100%;
}

.legend-info {
    flex: 1;
    -webkit-flex: 1;
}

.legend-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2px;
}

.legend-desc {
    font-size: 12px;
    color: #7f8c8d;
    line-height: 1.3;
}

/* ===== FOOTER ===== */
.calendar-footer {
    padding: 20px 25px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    text-align: center;
    position: relative;
}

.calendar-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        #43b5ae 0%, 
        #e74c3c 25%, 
        #9b59b6 50%, 
        #27ae60 75%, 
        #f39c12 100%);
}

.contact-info {
    display: flex;
    display: -webkit-flex;
    justify-content: center;
    -webkit-justify-content: center;
    flex-wrap: wrap;
    -webkit-flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.contact-item {
    display: flex;
    display: -webkit-flex;
    align-items: center;
    -webkit-align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 6px;
}

.contact-item:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
    -webkit-transform: translateY(-2px);
}

.contact-icon {
    font-size: 16px;
}

.contact-link {
    color: #74b9ff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    -webkit-transition: color 0.3s ease;
    position: relative;
}

.contact-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #74b9ff;
    transition: width 0.3s ease;
    -webkit-transition: width 0.3s ease;
}

.contact-link:hover {
    color: #74b9ff;
}

.contact-link:hover::after {
    width: 100%;
}

.last-update {
    font-size: 12px;
    color: #bdc3c7;
    margin-top: 10px;
}

/* ===== MODAL MEJORADO ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    justify-content: center;
    -webkit-justify-content: center;
    align-items: center;
    -webkit-align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    -webkit-overflow-scrolling: touch;
}

.modal-overlay.show {
    display: flex;
    display: -webkit-flex;
    animation: modalFadeIn 0.3s ease-out;
    -webkit-animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@-webkit-keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 95%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease-out;
    -webkit-animation: modalSlideIn 0.3s ease-out;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.2);
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px) scale(0.9);
    }
    to {
        transform: translateY(0) scale(1);
    }
}

@-webkit-keyframes modalSlideIn {
    from {
        -webkit-transform: translateY(-50px) scale(0.9);
    }
    to {
        -webkit-transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: linear-gradient(135deg, #43b5ae 0%, #3a9d97 100%);
    color: white;
    padding: 20px;
    display: flex;
    display: -webkit-flex;
    justify-content: space-between;
    -webkit-justify-content: space-between;
    align-items: center;
    -webkit-align-items: center;
    position: relative;
}

.modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        #43b5ae 0%, 
        #e74c3c 33%, 
        #9b59b6 66%, 
        #27ae60 100%);
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-right: 20px;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.3s ease;
    -webkit-transition: background 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
    width: 40px;
    height: 40px;
    display: flex;
    display: -webkit-flex;
    align-items: center;
    -webkit-align-items: center;
    justify-content: center;
    -webkit-justify-content: center;
}

.modal-close:hover {
    background: rgba(255,255,255,0.2);
}

.modal-body {
    padding: 0;
    overflow-y: auto;
    max-height: calc(90vh - 180px);
    -webkit-overflow-scrolling: touch;
}

/* ===== CONTENIDO DEL MODAL ===== */
.modal-clase-info {
    padding: 25px;
}

.info-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.info-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.info-section h4 {
    color: #2c3e50;
    font-size: 1.1rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.info-section p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.info-grid {
    display: grid;
    display: -webkit-grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    -webkit-grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    -webkit-gap: 15px;
}

.info-item {
    display: flex;
    display: -webkit-flex;
    align-items: flex-start;
    -webkit-align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #43b5ae;
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
}

.info-item:hover {
    background: #f1f3f4;
    transform: translateY(-2px);
    -webkit-transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.info-icon {
    font-size: 20px;
    width: 24px;
    height: 24px;
    display: flex;
    display: -webkit-flex;
    align-items: center;
    -webkit-align-items: center;
    justify-content: center;
    -webkit-justify-content: center;
    flex-shrink: 0;
    -webkit-flex-shrink: 0;
}

.info-content {
    flex: 1;
    -webkit-flex: 1;
}

.info-content strong {
    display: block;
    color: #2c3e50;
    font-size: 14px;
    margin-bottom: 4px;
    font-weight: 600;
}

.info-content span {
    color: #555;
    font-size: 16px;
    font-weight: 500;
}

.info-content small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
}

.info-content .price {
    color: #27ae60;
    font-weight: 700;
    font-size: 18px;
}

.text-success {
    color: #27ae60;
}

.text-danger {
    color: #e74c3c;
}

/* ===== ESTILOS ESPECÍFICOS PARA TALLERES DE VARIOS DÍAS EN MODAL ===== */
.taller-multidia {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #43b5ae;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.taller-multidia h4 {
    color: #43b5ae;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.precio-taller-destacado {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin: 15px 0 25px 0;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.precio-grande {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.precio-descripcion {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 500;
}

.dias-taller p {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

.cronograma-dias {
    display: grid;
    display: -webkit-grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    -webkit-grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    -webkit-gap: 12px;
}

.dia-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
    position: relative;
}

.dia-item.dia-actual {
    border-color: #43b5ae;
    background: #f0fdfc;
    box-shadow: 0 4px 12px rgba(67, 181, 174, 0.2);
}

.dia-item.dia-actual::before {
    content: '← Este día';
    position: absolute;
    top: -10px;
    right: 10px;
    background: #43b5ae;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.dia-numero {
    font-weight: 700;
    color: #43b5ae;
    font-size: 14px;
    margin-bottom: 4px;
}

.dia-fecha {
    font-weight: 600;
    color: #2c3e50;
    font-size: 13px;
    margin-bottom: 4px;
}

.dia-hora {
    color: #666;
    font-size: 12px;
    margin-bottom: 6px;
}

.dia-descripcion {
    color: #555;
    font-size: 11px;
    line-height: 1.4;
    padding-top: 6px;
    border-top: 1px solid #eee;
}

.modal-footer {
    padding: 20px;
    background: #f8f9fa;
    display: flex;
    display: -webkit-flex;
    gap: 15px;
    justify-content: center;
    -webkit-justify-content: center;
    border-top: 1px solid #eee;
}

.modal-button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    display: -webkit-inline-flex;
    align-items: center;
    -webkit-align-items: center;
    gap: 8px;
    -webkit-appearance: none;
    appearance: none;
    min-width: 140px;
    justify-content: center;
    -webkit-justify-content: center;
}

.modal-button-primary {
    background: #27ae60;
    color: white;
}

.modal-button-primary:hover {
    background: #219a52;
    transform: translateY(-2px);
    -webkit-transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.modal-button-secondary {
    background: #43b5ae;
    color: white;
}

.modal-button-secondary:hover {
    background: #3a9d97;
    transform: translateY(-2px);
    -webkit-transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 181, 174, 0.3);
}

/* ===== NOTIFICACIÓN DE CAMBIOS ===== */
.change-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #43b5ae 0%, #3a9d97 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(67, 181, 174, 0.3);
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    transform: translateX(100%);
    -webkit-transform: translateX(100%);
    transition: transform 0.3s ease;
    -webkit-transition: -webkit-transform 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.change-notification.show {
    transform: translateX(0);
    -webkit-transform: translateX(0);
}

.change-notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    border-radius: inherit;
    pointer-events: none;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    body {
        padding: 5px;
    }
    
    .calendar-header {
        padding: 15px;
    }
    
    .header-brand {
        margin-bottom: 15px;
    }
    
    .brand-icon {
        font-size: 1.8rem;
        padding: 8px;
    }
    
    .brand-title {
        font-size: 1.4rem;
    }
    
    .brand-subtitle {
        font-size: 0.9rem;
    }
    
    /* Ocultar navegación desktop, mostrar móvil */
    .desktop-nav {
        display: none !important;
    }
    
    .mobile-nav {
        display: flex !important;
        display: -webkit-flex !important;
    }
    
    .calendar-title {
        font-size: 1.3rem;
        margin-bottom: 0;
    }
    
    .refresh-button {
        padding: 10px 20px;
        font-size: 13px;
        border-radius: 25px;
    }
    
    .refresh-text {
        display: inline;
    }
    
    .calendar-grid {
        grid-template-columns: repeat(6, 1fr);
        -webkit-grid-template-columns: repeat(6, 1fr);
        gap: 1px;
        -webkit-gap: 1px;
    }
    
    .day-header {
        padding: 8px 2px;
        font-size: 10px;
    }
    
    .day-cell {
        min-height: 80px;
        padding: 4px 2px;
    }
    
    .day-number {
        font-size: 12px;
        margin-bottom: 4px;
    }
    
    .clase-item {
        font-size: 9px;
        padding: 3px 4px;
        margin: 1px 0;
    }
    
    .clase-detalles {
        font-size: 8px;
    }
    
    .clase-plazas {
        font-size: 7px;
        padding: 1px 3px;
    }
    
    .legend-grid {
        grid-template-columns: 1fr;
        -webkit-grid-template-columns: 1fr;
    }
    
    .contact-info {
        flex-direction: column;
        -webkit-flex-direction: column;
        gap: 10px;
    }
    
    .modal-content {
        width: 95%;
        max-width: none;
        margin: 10px;
        max-height: 95vh;
    }
    
    .modal-title {
        font-size: 1.2rem;
        margin-right: 10px;
    }
    
    .modal-clase-info {
        padding: 20px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        -webkit-grid-template-columns: 1fr;
    }
    
    .info-item {
        padding: 12px;
    }
    
    .modal-footer {
        flex-direction: column !important;
        -webkit-flex-direction: column !important;
        gap: 12px !important;
        padding: 20px !important;
        background: #f8f9fa !important;
        border-top: 1px solid #eee !important;
        display: flex !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .modal-button {
        min-width: auto !important;
        width: 100% !important;
        padding: 15px 20px !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        border-radius: 8px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        text-decoration: none !important;
        border: none !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        box-sizing: border-box !important;
    }
    
    .modal-button-primary {
        background: #27ae60 !important;
        color: white !important;
        margin-bottom: 8px !important;
    }
    
    .modal-button-primary:hover {
        background: #219a52 !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3) !important;
    }
    
    .modal-button-secondary {
        background: #43b5ae !important;
        color: white !important;
    }
    
    .modal-button-secondary:hover {
        background: #3a9d97 !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 12px rgba(67, 181, 174, 0.3) !important;
    }
    
    .change-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        transform: translateY(-100%);
        -webkit-transform: translateY(-100%);
        text-align: center;
    }
    
    .change-notification.show {
        transform: translateY(0);
        -webkit-transform: translateY(0);
    }
    
    /* ===== ESTILOS PARA TALLERES DE VARIOS DÍAS EN MÓVIL ===== */
    .taller-multidia {
        padding: 15px !important;
        margin-bottom: 20px !important;
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
        border: 2px solid #43b5ae !important;
        border-radius: 12px !important;
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .taller-multidia h4 {
        font-size: 1.1rem !important;
        margin-bottom: 12px !important;
        color: #43b5ae !important;
        display: block !important;
    }
    
    .precio-taller-destacado {
        padding: 15px !important;
        margin: 10px 0 20px 0 !important;
        border-radius: 8px !important;
        background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%) !important;
        color: white !important;
        text-align: center !important;
        box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3) !important;
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .precio-grande {
        font-size: 2rem !important;
        margin-bottom: 8px !important;
        font-weight: 800 !important;
        text-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
        display: block !important;
    }
    
    .precio-descripcion {
        font-size: 0.9rem !important;
        line-height: 1.3 !important;
        opacity: 0.9 !important;
        font-weight: 500 !important;
        display: block !important;
    }
    
    .dias-taller {
        display: block !important;
        width: 100% !important;
    }
    
    .dias-taller p {
        font-size: 1rem !important;
        margin-bottom: 12px !important;
        color: #2c3e50 !important;
        display: block !important;
    }
    
    .cronograma-dias {
        display: grid !important;
        grid-template-columns: 1fr !important;
        -webkit-grid-template-columns: 1fr !important;
        gap: 10px !important;
        -webkit-gap: 10px !important;
        width: 100% !important;
        margin-top: 10px !important;
    }
    
    .dia-item {
        padding: 12px !important;
        border-radius: 6px !important;
        background: white !important;
        border: 2px solid #e9ecef !important;
        transition: all 0.3s ease !important;
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .dia-item.dia-actual {
        border-color: #43b5ae !important;
        background: #f0fdfc !important;
        box-shadow: 0 4px 12px rgba(67, 181, 174, 0.2) !important;
        border-width: 2px !important;
        padding: 11px !important;
    }
    
    .dia-item.dia-actual::before {
        content: '← Este día' !important;
        position: static !important;
        display: block !important;
        text-align: center !important;
        margin-bottom: 8px !important;
        border-radius: 12px !important;
        font-size: 10px !important;
        padding: 4px 8px !important;
        background: #43b5ae !important;
        color: white !important;
        font-weight: 600 !important;
    }
    
    .dia-numero {
        font-size: 13px !important;
        margin-bottom: 6px !important;
        font-weight: 700 !important;
        color: #43b5ae !important;
        display: block !important;
    }
    
    .dia-fecha {
        font-size: 12px !important;
        margin-bottom: 4px !important;
        font-weight: 600 !important;
        color: #2c3e50 !important;
        display: block !important;
    }
    
    .dia-hora {
        font-size: 11px !important;
        margin-bottom: 6px !important;
        color: #666 !important;
        display: block !important;
    }
    
    .dia-descripcion {
        font-size: 10px !important;
        line-height: 1.4 !important;
        padding-top: 6px !important;
        color: #555 !important;
        border-top: 1px solid #eee !important;
        display: block !important;
    }
    
    .clase-precio-mini {
        font-size: 7px;
        padding: 1px 2px;
    }
    
    /* Simplificar conexiones visuales en móvil */
    .clase-item.clase-multidia::after {
        display: none !important;
    }
    
    .clase-item.clase-multidia.multidia-primer-dia::after,
    .clase-item.clase-multidia.multidia-ultimo-dia::after,
    .clase-item.clase-multidia:not(.multidia-primer-dia):not(.multidia-ultimo-dia)::after {
        display: none !important;
    }
    
    /* Asegurar que el modal body tenga scroll en móvil */
    .modal-body {
        max-height: calc(95vh - 160px);
        overflow-y: auto;
    }
    
    /* Mejorar la visualización de la información en móvil */
    .info-section {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
    
    .info-section h4 {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .info-section p {
        font-size: 14px;
        line-height: 1.5;
    }
}

@media (max-width: 480px) {
    .calendar-title {
        font-size: 1.1rem;
    }
    
    .day-cell {
        min-height: 70px;
        padding: 4px 2px;
    }
    
    .day-number {
        font-size: 12px;
        margin-bottom: 4px;
    }
    
    .clase-item {
        font-size: 9px;
        padding: 2px 4px;
    }
    
    .clase-detalles {
        font-size: 8px;
    }
    
    .nav-button {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .modal-clase-info {
        padding: 15px;
    }
    
    .info-item {
        padding: 10px;
    }
    
    .info-content strong {
        font-size: 13px;
    }
    
    .info-content span {
        font-size: 15px;
    }
    
    .calendar-header::after,
    .modal-header::after,
    .calendar-footer::before {
        height: 2px;
    }
    
    .brand-title {
        font-size: 1.2rem;
    }
    
    .brand-subtitle {
        font-size: 0.8rem;
    }
    
    .taller-multidia h4 {
        font-size: 1.1rem;
    }
    
    .dias-taller p {
        font-size: 1rem;
    }
    
    .dia-item {
        padding: 10px;
    }
    
    .precio-taller-destacado {
        padding: 12px;
        margin: 8px 0 15px 0;
    }
    
    .precio-grande {
        font-size: 1.8rem;
    }
    
    .precio-descripcion {
        font-size: 0.8rem;
    }
}

/* ===== SAFARI SPECIFIC FIXES ===== */
@supports (-webkit-touch-callout: none) {
    .calendar-grid {
        display: -webkit-grid;
        -webkit-grid-template-columns: repeat(6, 1fr);
    }
    
    .nav-button, .refresh-button {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
    }
    
    .clase-item {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
    }
}

@media screen and (-webkit-min-device-pixel-ratio: 1) {
    .calendar-container {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

@supports (backdrop-filter: blur(10px)) {
    .nav-button {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

@supports not (backdrop-filter: blur(10px)) {
    .nav-button {
        background: rgba(255,255,255,0.4);
    }
}

/* Grid fallback para Safari más antiguos */
@supports not (display: grid) {
    .calendar-grid {
        display: -webkit-flex;
        display: flex;
        flex-wrap: wrap;
        -webkit-flex-wrap: wrap;
    }
    
    .day-header, .day-cell {
        width: 16.666%;
        -webkit-flex: 0 0 16.666%;
        flex: 0 0 16.666%;
    }
    
    .info-grid {
        display: -webkit-flex;
        display: flex;
        flex-wrap: wrap;
        -webkit-flex-wrap: wrap;
    }
    
    .info-item {
        width: 100%;
        -webkit-flex: 0 0 100%;
        flex: 0 0 100%;
    }
}

/* Fix específicos para iOS Safari */
@media screen and (max-device-width: 767px) and (-webkit-min-device-pixel-ratio: 1) {
    body {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    
    .calendar-container {
        position: relative;
        -webkit-overflow-scrolling: touch;
        overflow-scrolling: touch;
    }
    
    .day-cell {
        -webkit-tap-highlight-color: rgba(67, 181, 174, 0.1);
        tap-highlight-color: rgba(67, 181, 174, 0.1);
    }
    
    button {
        -webkit-appearance: none;
        appearance: none;
        border-radius: inherit;
    }
    
    .modal-body {
        -webkit-overflow-scrolling: touch;
        overflow-scrolling: touch;
    }
}

/* ===== MODO OSCURO ===== */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
        color: #e0e0e0;
    }
    
    .calendar-container {
        background: #2d2d2d;
        color: #e0e0e0;
        border: 1px solid #404040;
    }
    
    .day-cell {
        background: #383838;
        border-color: #404040;
        color: #e0e0e0;
    }
    
    .day-cell:hover {
        background: #404040;
        border-color: #43b5ae;
    }
    
    .day-number {
        color: #e0e0e0;
    }
    
    .other-month {
        background: #2d2d2d;
        opacity: 0.6;
    }
    
    .other-month .day-number {
        color: #777;
    }
    
    .legend-section {
        background: #2d2d2d;
        border-top-color: #404040;
    }
    
    .legend-item {
        background: #383838;
        border: 1px solid #404040;
    }
    
    .legend-name {
        color: #e0e0e0;
    }
    
    .legend-desc {
        color: #aaa;
    }
    
    .legend-title {
        color: #e0e0e0;
    }
    
    .modal-content {
        background: #2d2d2d;
        color: #e0e0e0;
        border: 1px solid #404040;
    }
    
    .modal-body {
        color: #e0e0e0;
    }
    
    .modal-footer {
        background: #383838;
        border-top-color: #404040;
    }
    
    .info-item {
        background: #383838;
        border-left-color: #43b5ae;
    }
    
    .info-item:hover {
        background: #404040;
    }
    
    .info-content strong {
        color: #e0e0e0;
    }
    
    .info-content span {
        color: #ccc;
    }
    
    .error-state {
        background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    }
    
    .loading-state {
        color: #aaa;
    }
    
    .loading-spinner {
        border-color: #404040;
        border-top-color: #43b5ae;
    }
}

/* ===== MODO IMPRESIÓN ===== */
@media print {
    .calendar-container {
        box-shadow: none;
        border: 2px solid #ddd;
    }
    
    .calendar-header {
        background: #f8f9fa !important;
        color: #2c3e50 !important;
    }
    
    .clase-item {
        background: #f8f9fa !important;
        color: #2c3e50 !important;
        border: 1px solid #ddd !important;
    }
    
    .modal-overlay {
        display: none !important;
    }
    
    .refresh-button {
        display: none;
    }
    
    .nav-button {
        display: none;
    }
    
    .mobile-nav {
        display: none !important;
    }
    
    .desktop-nav {
        display: none !important;
    }
    
    .change-notification {
        display: none !important;
    }
    
    .calendar-footer::before,
    .modal-header::after,
    .calendar-header::after {
        display: none !important;
    }
}