/* --- RESET Y BASE (Copiado de index.html para consistencia) --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: #000;
    color: #fff;
    font-family: 'Inter', sans-serif;
    overflow: hidden;
}

/* --- FONDO INTERACTIVO (El Globo - Reutilizado) --- */
#globeViz {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    transform: translateX(25%);
    opacity: 0.3;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

@media (max-width: 768px) {
    #globeViz {
        transform: translateX(0);
        opacity: 0.2;
    }
}

#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
}

/* --- CAPA DE CONTENIDO (Full Viewport - Sin Scroll) --- */
.content-overlay {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.9) 100%);
    overflow: hidden;
    pointer-events: none;
}

/* Permite interacción en elementos clicables */
header,
.normativa-container {
    pointer-events: auto;
}

/* --- HEADER (Idéntico a index.html) --- */
header {
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 4px;
    color: #fff;
    text-transform: uppercase;
    transition: color 0.3s, border-bottom 0.3s;
    padding-bottom: 5px;
    border-bottom: 1px solid transparent;
}

.logo a:hover .logo-text {
    color: #0066ff;
    border-bottom: 1px solid #0066ff;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 40px;
}

nav a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: color 0.3s, border-bottom 0.3s;
    padding-bottom: 5px;
    border-bottom: 1px solid transparent;
}

nav a:hover,
nav a.active {
    color: #0066ff;
    border-bottom: 1px solid #0066ff;
}

/* --- CONTENIDO PRINCIPAL NORMATIVA (Ajustado para una pantalla) --- */
.normativa-container {
    padding: 30px 50px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 25px;
    border-left: 5px solid #0066ff;
    padding-left: 20px;
    flex-shrink: 0;
}

.page-title span {
    font-weight: 700;
    color: #fff;
}

.normativa-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    flex: 1;
    align-content: center;
}

.normativa-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    backdrop-filter: blur(3px);
    display: flex;
    flex-direction: column;
}

.normativa-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 102, 255, 0.2);
    border-color: #0066ff;
}

.normativa-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #0066ff;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.normativa-card p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    margin-bottom: 15px;
    font-size: 0.85rem;
    flex: 1;
}

.normativa-link {
    display: inline-flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.3s;
    margin-top: auto;
}

.normativa-link:hover {
    color: #0066ff;
}

.normativa-link::after {
    content: '→';
    margin-left: 8px;
    transition: transform 0.3s;
}

.normativa-link:hover::after {
    transform: translateX(5px);
}

/* --- MODAL LEY MARCO DE CIBERSEGURIDAD --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-container {
    position: relative;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(0, 102, 255, 0.3);
    border-radius: 12px;
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 102, 255, 0.3);
    backdrop-filter: blur(20px);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    font-size: 32px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0;
    font-family: 'Inter', sans-serif;
    z-index: 10;
}

.modal-close:hover {
    color: #0066ff;
    border-color: #0066ff;
    background: rgba(0, 102, 255, 0.1);
    transform: rotate(90deg);
}

.modal-content {
    overflow-y: auto;
    padding-right: 10px;
    flex: 1;
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(0, 102, 255, 0.5);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 102, 255, 0.7);
}

.modal-title {
    font-size: 2rem;
    font-weight: 700;
    color: #0066ff;
    margin-bottom: 25px;
    border-left: 5px solid #0066ff;
    padding-left: 20px;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
}

.modal-text {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
}

.modal-text p {
    margin-bottom: 20px;
    text-align: justify;
}

.modal-text p:last-child {
    margin-bottom: 0;
}

/* --- RESPONSIVE --- */
@media (max-width: 1200px) {
    .normativa-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body {
        overflow-y: auto;
    }

    .content-overlay {
        height: auto;
        max-height: none;
        overflow: visible;
    }

    header {
        padding: 20px;
        flex-direction: column;
        gap: 20px;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        width: 100%;
    }

    nav a {
        font-size: 14px;
        padding: 10px 0;
        display: block;
        width: 100%;
        text-align: center;
    }

    .normativa-container {
        padding: 30px 20px;
    }

    .page-title {
        font-size: 2rem;
    }

    .normativa-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .normativa-card {
        padding: 25px;
    }

    .modal-container {
        width: 95%;
        padding: 30px 20px;
        max-height: 90vh;
    }

    .modal-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    .modal-text {
        font-size: 0.9rem;
    }

    .modal-close {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
        font-size: 28px;
    }
}