* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    overflow-x: hidden;
}

.oswald {
    font-family: "Oswald", sans-serif;
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
}

.main {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.center-logo-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 50;
    width: auto;
    height: auto;
}

.center-logo-container img {
    width: 100%;
    height: auto;
    max-width: 200px;
    transition: transform 0.3s ease;
}

.center-logo-container img:hover {
    transform: scale(1.1);
}

.section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.section:hover .bg-image {
    transform: scale(1.1);
}

.overlay-dark {
    position: absolute;
    inset: 0;
    background: rgba(4, 44, 76, 0.8);
}

.overlay-light {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
}

.rotated-image {
    transform: rotate(1.1deg);
    display: block;
    margin: 0 auto;
}

h2 {
    position: relative;
    color: #ffffff;
    margin-bottom: 1.5rem;
    font-size: 3rem;
    font-weight: bold;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.section:nth-child(3) h2 {
    color: #04549c;
}

a.btn-l, a.btn-r {
    position: relative;
    display: inline-block;
    padding: 0.75rem 2.5rem;
    border: none;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    will-change: transform;
    transform: translateY(0);
    transition: all 0.3s ease;
}

a.btn-l span, a.btn-r span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

a.btn-l {
    background-color: #ffffff;
    color: #04549c;
}

a.btn-r {
    background-color: #04549c;
    color: #ffffff;
}

a.btn-l:hover {
    transform: translateY(-5px) !important;
    cursor: pointer;
    background-color: #f0f7ff;
}

a.btn-r:hover {
    transform: translateY(-5px) !important;
    cursor: pointer;
    background-color: #0066cc;
}

.title {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 100;
    padding: 1rem;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(0,0,0,0));
}

.title h1 {
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
    font-family: "Oswald", sans-serif;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    padding-top: 1rem;
}

.footer-title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 100;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.5), rgba(0,0,0,0));
}

.footer-title h1 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
    font-family: "Oswald", sans-serif;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    padding-bottom: 1rem;
}

@keyframes glow {
    from {
        text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    }
    to {
        text-shadow: 0 0 10px rgba(255,255,255,0.8),
                    0 0 20px rgba(255,255,255,0.8),
                    0 0 30px rgba(255,255,255,0.8);
    }
}

.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #04549c;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.5s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.page-transition.active {
    transform: translateY(0);
}

.welcome-message {
    margin-bottom: 2rem;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.welcome-message .fundacion {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.welcome-message .colegio {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.welcome-message .sede-text {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.welcome-message p {
    font-size: 1.5rem;
    color: #ffffff;
    font-style: italic;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* Asegurar contraste en temas oscuros */
@media (prefers-color-scheme: dark) {
    .welcome-message .fundacion,
    .welcome-message .colegio,
    .welcome-message .sede-text,
    .welcome-message p {
        color: #f0f0f0;
        text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9);
    }
}

/* Pantallas grandes (1200px y más) */
@media (min-width: 1200px) {
    .welcome-message .fundacion { font-size: 2.5rem; }
    .welcome-message .colegio { font-size: 3rem; }
    .welcome-message .sede-text { font-size: 2rem; }
    .welcome-message p { font-size: 1.5rem; }
}

/* Pantallas medianas (entre 992px y 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .welcome-message .fundacion { font-size: 2.2rem; }
    .welcome-message .colegio { font-size: 2.7rem; }
    .welcome-message .sede-text { font-size: 1.8rem; }
    .welcome-message p { font-size: 1.3rem; }
}

/* Tablets (entre 768px y 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .welcome-message .fundacion { font-size: 2rem; }
    .welcome-message .colegio { font-size: 2.4rem; }
    .welcome-message .sede-text { font-size: 1.6rem; }
    .welcome-message p { font-size: 1.2rem; }
}

/* Tablets pequeñas y móviles grandes (entre 576px y 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .welcome-message .fundacion { font-size: 1.8rem; }
    .welcome-message .colegio { font-size: 2.2rem; }
    .welcome-message .sede-text { font-size: 1.4rem; }
    .welcome-message p { font-size: 1.1rem; }
}

/* Móviles (menos de 576px) */
@media (max-width: 575px) {
    .welcome-message .fundacion { font-size: 1.5rem; }
    .welcome-message .colegio { font-size: 1.8rem; }
    .welcome-message .sede-text { font-size: 1.2rem; }
    .welcome-message p { font-size: 1rem; }
    .welcome-message { padding: 0 1rem; }
}

@media (min-width: 1024px) {
    .main {
        flex-direction: row;
    }

    .center-logo-container img {
        max-width: 250px;
    }

    .title h1 {
        font-size: 3rem;
    }

    .footer-title h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .center-logo-container img {
        max-width: 150px;
    }

    h2 {
        font-size: 1.8rem;
    }

    .title h1 {
        font-size: 1.8rem;
    }

    .footer-title h1 {
        font-size: 1.2rem;
    }
}

#loading-spinner {
    position: relative;
    transform: none;
    left: auto;
    top: auto;
    margin-top: 2rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #ffffff;
    border-top: 5px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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