* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    background-color: #171717; 
    color: #d4d4d4;
    font-family: 'Montserrat', sans-serif;
    width: 100%;
    height: 100dvh; 
    overflow: hidden; 
}

body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.header-top {
    width: 100%;
    padding: 2rem;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0; 
}

.btn-aula-fp {
    background-color: #262626;
    color: #38bdf8;
    border: 1px solid #38bdf8;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.btn-aula-fp:hover {
    background-color: #38bdf8;
    color: #171717;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(56, 189, 248, 0.4);
}

.contenido-principal {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 0 1rem;
    flex-grow: 1; 
    min-height: 0; 
    width: 100%;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 45vh; 
    min-height: 120px;
}

.logo-container img {
    max-width: 620px; 
    max-height: 100%; 
    width: 100%; 
    object-fit: contain; 
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.5));
    user-select: none;
    pointer-events: none;
}

.mensaje-espera {
    flex-shrink: 0; 
}

.mensaje-espera h1 {
    font-size: clamp(1.2rem, 3vw, 1.5rem); 
    font-weight: 600;
    color: #f5f5f5;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.mensaje-espera p {
    font-size: clamp(0.85rem, 2vw, 0.95rem); 
    color: #a3a3a3;
    font-weight: 300;
}

.footer {
    width: 100%;
    padding: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: #737373;
    flex-shrink: 0; 
}

.enlaces-legales {
    margin-top: 0.5rem;
}

.enlaces-legales a {
    color: #a3a3a3;
    text-decoration: none;
    transition: color 0.2s;
    margin: 0 0.3rem;
}

.enlaces-legales a:hover {
    color: #38bdf8;
    text-decoration: underline;
}

body.pagina-legal {
    height: auto !important;
    min-height: 100vh !important;
    overflow: auto !important; 
    padding: 3rem 1.5rem;
    justify-content: flex-start; 
}

.legal-container {
    background-color: #262626;
    border: 1px solid #404040;
    border-radius: 8px;
    padding: 2.5rem;
    max-width: 800px;
    width: 100%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    margin: 0 auto;
}

.legal-container h1 {
    color: #f5f5f5;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #3b82f6;
    padding-bottom: 0.5rem;
}

.legal-container p {
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: #d4d4d4;
}

.legal-container a {
    color: #60a5fa;
    text-decoration: none;
}

.legal-container a:hover {
    text-decoration: underline;
}

.btn-volver {
    display: inline-block;
    margin-top: 2rem;
    background-color: #2563eb;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.2s;
    text-decoration: none;
}

.btn-volver:hover {
    background-color: #1d4ed8;
}