﻿body {
}

.malla {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: 80px repeat(6, auto);
    gap: 12px;
    padding: 20px;
    background: white;
    font-family: Arial, Helvetica, sans-serif;
}

/* ===== CAJA BASE ===== */
.materia {
    display: grid;
    grid-template-columns: 16px 40px 1fr;
    grid-template-rows: 1fr 1fr;
    border: 3px solid #1f6d8c;
    overflow: hidden;
    height: auto;
    min-height: 80px;
    transition: all 0.2s ease-in-out;
}

.area {
    grid-column: 1;
    grid-row: 1 / 3;
    background: #1f6d8c;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 11px;
    font-weight: bold;
    padding: 4px;
    text-align: center;
}

.codigo {
    grid-column: 2;
    grid-row: 1;
    border-right: 3px solid #1f6d8c;
    border-bottom: 3px solid #1f6d8c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.horas {
    grid-column: 2;
    grid-row: 2;
    border-right: 3px solid #1f6d8c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.nombre p {
    font-size: 12px;
    margin-bottom: 0px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.nombre {
    grid-column: 3;
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6px;
    font-weight: 600;
    font-size: 13px;
    overflow: hidden;
}

.correlativa {
    font-size: 11px;
    margin-top: 4px;
    font-weight: bold;
    overflow: hidden;
    word-break: break-word;
}

.header {
    background: transparent;
    border: none;
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
    color: #003366;
}

.side {
    border: 3px solid #1f6d8c;
    background: #dde3e6;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: bold;
}

/* ===== CARD INSCRIPCIÓN ===== */
.inscripcion-card {
    background: white;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

    .inscripcion-card h5 {
        margin: 0;
        font-size: 13px;
        font-weight: 700;
        color: #003366;
    }

.inscripcion-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

    .inscripcion-controls .form-select {
        flex: 1;
        font-size: 13px;
        padding: 4px 8px;
        height: 32px;
    }

    .inscripcion-controls .btn {
        white-space: nowrap;
        font-size: 13px;
        padding: 4px 12px;
        height: 32px;
    }

#mensajeCarrera {
    font-size: 12px;
    min-height: 16px;
}

/* ===== ESTADOS ===== */

/* 🔴 Bloqueada */
.materia.bloqueada {
    border-color: #9e9e9e;
    background: #f5f5f5;
    opacity: 0.70;
    cursor: not-allowed;
}

    .materia.bloqueada .area {
        background: #9e9e9e;
    }

    .materia.bloqueada .codigo,
    .materia.bloqueada .horas {
        background: #f5f5f5;
        border-color: #9e9e9e;
    }

    .materia.bloqueada .nombre p {
        color: #555555;
    }

    .materia.bloqueada .correlativa {
        color: #757575;
    }

/* 🟡 Disponible */
.materia.disponible {
    cursor: pointer;
}

    .materia.disponible .codigo,
    .materia.disponible .horas {
    }

    .materia.disponible .nombre p {
        color: black;
    }

    .materia.disponible .correlativa {
        color: black;
    }

/* 🟢 Aprobada */
.materia.aprobada {
    border-color: #198754;
    background: #e6ffe6;
    cursor: pointer;
}

    .materia.aprobada .area {
        background: #198754;
    }

    .materia.aprobada .codigo,
    .materia.aprobada .horas {
        background: #e6ffe6;
        border-color: #198754;
    }

    .materia.aprobada .nombre p {
        color: #0a3622;
    }

    .materia.aprobada .correlativa {
        color: #198754;
    }

/* ===== HOVER ===== */
.materia.disponible:hover {
    background: #e6ffe6;
    transform: scale(1.05);
    z-index: 2;
    box-shadow: 0 8px 16px rgba(25, 135, 84, 0.3);
}

    .materia.disponible:hover .codigo,
    .materia.disponible:hover .horas {
        background: #e6ffe6;
    }

.materia.aprobada:hover {
    background: white;
    transform: scale(1.05);
    z-index: 2;
    box-shadow: 0 8px 16px #f0eeee;
}

    .materia.aprobada:hover .codigo,
    .materia.aprobada:hover .horas {
        background: white;
    }

.materia.bloqueada:hover {
    transform: none;
    box-shadow: none;
}

.materia:hover .nombre p {
    font-weight: 700;
    margin-bottom: 6px;
}

.nombre div {
    display: flex;
    gap: 6px;
}

.cronograma-hero {
    background: linear-gradient(135deg, #003366 0%, #004080 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

    .cronograma-hero h1 {
        font-family: 'Montserrat', 'Roboto Condensed', sans-serif;
        font-weight: 900;
        font-size: 3rem;
        margin-bottom: 1rem;
        color: white !important;
    }

    .cronograma-hero p {
        font-size: 1.2rem;
        opacity: 0.9;
        max-width: 700px;
        margin: 0 auto;
    }

.botonElegiMateria {
    height: 100%;
    display: flex;
}

/* ===== BOTONES DE CARRERA ===== */
.seleccion-carrera-container {
    padding: 1.2rem 2rem;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

    .seleccion-carrera-container h5 {
        font-weight: 700;
        color: #003366;
        margin-bottom: 0.8rem;
    }

.carreras-botones {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-carrera {
    padding: 8px 20px;
    border: 2px solid #cccccc;
    background: white;
    color: #cccccc;
    font-weight: 600;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-carrera:hover {
        background: #cccccc;
        color: white;
    }

    .btn-carrera.activa {
        background: #003366;
        border-color: #003366;
        color: white;
    }

/* ===== RESPONSIVE MOBILE ===== */
@media (max-width: 768px) {

    .instructivo {

        margin-left: 6px !important;
        margin-right: 6px !important;
    }
    /* Hero más compacto */
    .cronograma-hero {
        padding: 2rem 1rem;
    }

        .cronograma-hero h1 {
            font-size: 1.8rem;
        }

        .cronograma-hero p {
            font-size: 1rem;
        }

    /* Selector de carrera en mobile */
    .seleccion-carrera-container {
        padding: 1rem;
    }

    .carreras-botones {
        gap: 8px;
    }

    .btn-carrera {
        font-size: 13px;
        padding: 6px 14px;
    }

    /* Wrapper ocupa exactamente el viewport */
    .malla-wrapper {
        width: 100vw;
        height: 100vh;
        position: relative;
        overflow: hidden;
        padding: 0;
    }

    .malla {
        display: grid;
        position: absolute;
        top: 50%;
        left: 50%;
        width: 100vh;
        height: 100vw;
        transform: translate(-50%, -50%) rotate(90deg);
        transform-origin: center center;
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: 50px repeat(6, 1fr);
        gap: 6px;
        padding: 8px;
        background: white;
        overflow: hidden;
    }

    /* Contra-rotamos cada tarjeta */
    .materia,
    .header {
        transform: rotate(0deg);
    }

    .materia {
        overflow: hidden;
        height: 100%;
        min-height: unset;
    }

    .nombre p {
        font-size: 9px;
        line-height: 1.1;
        margin-bottom: 0;
        -webkit-line-clamp: 3;
    }

    .nombre {
        font-size: 9px;
        padding: 2px;
        gap: 0;
    }

    .correlativa {
        font-size: 7px;
        margin-top: 1px;
    }

    .codigo {
        font-size: 9px;
    }

    .horas {
        font-size: 8px;
    }

    .area {
        font-size: 7px;
        padding: 2px;
    }

    .header {
        font-size: 13px;
    }
}
/* ===== TABLET (768px – 1100px) ===== */
@media (max-width: 1100px) and (min-width: 769px) {

    /* Hero más compacto */
    .cronograma-hero {
        padding: 2rem 1rem;
    }

        .cronograma-hero h1 {
            font-size: 1.8rem;
        }

        .cronograma-hero p {
            font-size: 1rem;
        }

    /* Selector de carrera en mobile */
    .seleccion-carrera-container {
        padding: 1rem;
    }

    .carreras-botones {
        gap: 8px;
    }

    .btn-carrera {
        font-size: 13px;
        padding: 6px 14px;
    }

    /* Wrapper ocupa exactamente el viewport */
    .malla-wrapper {
        width: 100vw;
        height: 140vh;
        position: relative;
        overflow: hidden;
        padding: 0;
    }

  

    /* Contra-rotamos cada tarjeta */
    .materia,
    .header {
        transform: rotate(0deg);
    }

    .materia {
        overflow: hidden;
        height: 100%;
        min-height: unset;
    }

    .nombre p {
        font-size: 9px;
        line-height: 1.1;
        margin-bottom: 0;
        -webkit-line-clamp: 3;
    }

    .nombre {
        font-size: 9px;
        padding: 2px;
        gap: 0;
    }

    .correlativa {
        font-size: 7px;
        margin-top: 1px;
    }

    .codigo {
        font-size: 9px;
    }

    .horas {
        font-size: 8px;
    }

    .area {
        font-size: 7px;
        padding: 2px;
    }

    .header {
        font-size: 16px;
    }

}

.instructivo {
    max-width: 560px;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 16px auto;
  
}

.instructivo-titulo {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px;
}

.instructivo-subtitulo {
    font-size: 13px;
    color: #6c757d;
    margin: 0 0 16px;
}

.instructivo-refs {
    border-top: 1px solid #dee2e6;
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.instructivo-ref {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.ref-color {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    flex-shrink: 0;
}

.instructivo-footer {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #dee2e6;
    font-size: 13px;
    color: #6c757d;
}

    .instructivo-footer p {
        margin: 0;
    }