:root {
    --purple: #7B2FBE;
    --pink: #E91E8C;
    --yellow: #FFD93D;
    --teal: #00BFA5;
    --blue: #2979FF;
    --white: #FFFFFF;
    --bg: #F7F3FF;
    --dark: #1A1A2E;
    --text: #3D3D5C;
    --shadow: 0 8px 32px rgba(123,47,190,0.13);
}

body {
    color: var(--text);
    background: var(--white);
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* HERO */
.cal-hero {
    background: linear-gradient(135deg, var(--dark) 0%, #2D1B69 100%);
    padding: 100px 0 52px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cal-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 50%, rgba(123,47,190,0.35) 0%, transparent 65%);
}

.cal-hero .container {
    position: relative;
    z-index: 2;
    transform: translateY(-40px);
}

.cal-hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,217,61,0.15);
    border: 1px solid rgba(255,217,61,0.35);
    color: var(--yellow);
    padding: 6px 18px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.cal-hero h1 {
    font-family: 'Fredoka One', cursive;
    font-size: clamp(2rem, 5vw, 3rem);
    color: white;
    margin-bottom: 10px;
}

.cal-hero h1 span {
    color: var(--yellow);
}

.cal-hero p {
    color: rgba(255,255,255,0.7);
    font-size: 1.05rem;
    max-width: 520px;
    margin: 0 auto;
}

/* MES */
.month-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 32px 0 24px;
}

.month-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: var(--purple);
    border: 2px solid var(--purple);
    padding: 10px 22px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.month-nav-btn:hover {
    background: var(--purple);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.month-name {
    font-family: 'Fredoka One', cursive;
    font-size: 1.8rem;
    color: var(--dark);
    min-width: 220px;
    text-align: center;
}

/* CALENDARIO */
.cal-card {
    background: white;
    border-radius: 28px;
    padding: 32px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.day-header {
    text-align: center;
    padding: 12px 0;
    font-weight: 800;
    font-size: 0.88rem;
    color: var(--purple);
    background: var(--bg);
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.day-cell {
    aspect-ratio: 1;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.25s;
    position: relative;
    border: 2px solid transparent;
    min-height: 52px;
}

.day-cell.disponible {
    background: linear-gradient(135deg, #00BFA5, #00897B);
    color: white;
    box-shadow: 0 4px 12px rgba(0,191,165,0.25);
}

.day-cell.disponible:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 10px 24px rgba(0,191,165,0.4);
    border-color: white;
}

.day-cell.afterschool {
    background: linear-gradient(135deg, #2979FF, #1565C0);
    color: white;
    box-shadow: 0 4px 12px rgba(41,121,255,0.2);
}

.day-cell.afterschool:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 10px 24px rgba(41,121,255,0.4);
    border-color: white;
}

.day-cell.hoy::after {
    content: '';
    position: absolute;
    bottom: 5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--yellow);
}

.day-cell.empty {
    cursor: default;
}

/* LEYENDA */
.leyenda {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.leyenda-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg);
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
}

.leyenda-dot {
    width: 16px;
    height: 16px;
    border-radius: 6px;
}

.leyenda-dot.avail {
    background: linear-gradient(135deg, #00BFA5, #00897B);
}

.leyenda-dot.as {
    background: linear-gradient(135deg, #2979FF, #1565C0);
}

.leyenda-dot.today {
    background: var(--yellow);
    border: 2px solid var(--purple);
}

/* PLANES */
.planes-section {
    padding: 60px 0;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    color: white;
    padding: 6px 18px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.section-title {
    font-family: 'Fredoka One', cursive;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--dark);
    margin-bottom: 10px;
}

.section-title .hl {
    color: var(--purple);
}

.section-sub {
    color: var(--text);
    font-size: 1rem;
    max-width: 560px;
    line-height: 1.65;
    margin-bottom: 40px;
}

.planes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.plan-card {
    background: white;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.35s;
    border: 2px solid transparent;
}

.plan-card:hover {
    transform: translateY(-10px);
    border-color: var(--purple);
    box-shadow: 0 24px 56px rgba(123,47,190,0.2);
}

.plan-top {
    padding: 30px 24px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.plan-top::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
}

.plan-card:nth-child(1) .plan-top {
    background: linear-gradient(135deg, #7B2FBE, #E91E8C);
}

.plan-card:nth-child(2) .plan-top {
    background: linear-gradient(135deg, #3F51B5, #7B2FBE);
}

.plan-card:nth-child(3) .plan-top {
    background: linear-gradient(135deg, #FF9800, #E91E8C);
}

.plan-icon {
    font-size: 2.2rem;
    margin-bottom: 10px;
    display: block;
    position: relative;
    z-index: 2;
}

.plan-top h3 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.7rem;
    margin-bottom: 4px;
    position: relative;
    z-index: 2;
}

.plan-top p {
    font-size: 0.88rem;
    opacity: 0.88;
    position: relative;
    z-index: 2;
}

.plan-body {
    padding: 24px;
}

.plan-body p {
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.btn-plan-wsp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: #25D366;
    color: white;
    padding: 14px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 900;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.btn-plan-wsp:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37,211,102,0.35);
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 2000;
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.open {
    display: flex;
}

.modal-box {
    background: white;
    border-radius: 28px;
    max-width: 440px;
    width: 100%;
    animation: modalIn 0.35s cubic-bezier(0.34,1.56,0.64,1);
    box-shadow: 0 32px 80px rgba(0,0,0,0.3);
    overflow: hidden;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-head {
    padding: 28px 28px 20px;
    text-align: center;
}

.modal-head.disponible {
    background: linear-gradient(135deg, #00BFA5, #00897B);
}

.modal-head.afterschool {
    background: linear-gradient(135deg, #2979FF, #1565C0);
}

.modal-head-icon {
    font-size: 3rem;
    color: white;
    margin-bottom: 10px;
    display: block;
}

.modal-head h2 {
    font-family: 'Fredoka One', cursive;
    color: white;
    font-size: 1.6rem;
    margin-bottom: 4px;
}

.modal-head p {
    color: rgba(255,255,255,0.85);
    font-size: 0.95rem;
}

.modal-body {
    padding: 24px 28px;
}

.modal-info-box {
    border-radius: 14px;
    padding: 16px 18px;
    border-left: 4px solid;
    margin-bottom: 20px;
    font-size: 0.93rem;
    line-height: 1.6;
}

.modal-info-box.disponible {
    background: #e8faf8;
    border-color: var(--teal);
    color: #005f56;
}

.modal-info-box.afterschool {
    background: #e8f0ff;
    border-color: var(--blue);
    color: #1a3a80;
}

.modal-info-box strong {
    display: block;
    margin-bottom: 4px;
    font-size: 1rem;
}

.modal-foot {
    padding: 0 28px 28px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-m-wsp {
    flex: 1;
    min-width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #25D366;
    color: white;
    padding: 13px 16px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.92rem;
    transition: all 0.3s;
}

.btn-m-wsp:hover {
    background: #128C7E;
}

.btn-m-close {
    flex: 1;
    min-width: 140px;
    background: var(--bg);
    color: var(--text);
    border: 2px solid #e0e0e0;
    padding: 13px 16px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 0.92rem;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    transition: all 0.3s;
}

.btn-m-close:hover {
    background: #f0f0f0;
    border-color: var(--purple);
}

/* ANIMACIONES */
.fade-up {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s ease, transform .7s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-up-d1 { transition-delay: .1s; }
.fade-up-d2 { transition-delay: .2s; }
.fade-up-d3 { transition-delay: .3s; }

/* RESPONSIVE */
@media (max-width: 900px) {
    .planes-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin: 0 auto;
    }
}

@media (max-width: 640px) {
    .cal-card {
        padding: 16px 12px;
    }

    .cal-grid {
        gap: 5px;
    }

    .day-header {
        font-size: 0.75rem;
        padding: 8px 0;
    }

    .day-cell {
        font-size: 0.88rem;
        min-height: 40px;
        border-radius: 10px;
    }

    .month-nav {
        gap: 12px;
        flex-wrap: wrap;
    }

    .month-name {
        font-size: 1.4rem;
        min-width: 160px;
        order: -1;
        width: 100%;
    }

    .month-nav-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
}

@media (max-width: 400px) {
    .day-cell {
        font-size: 0.78rem;
        min-height: 34px;
        border-radius: 8px;
    }

    .cal-grid {
        gap: 4px;
    }
}