:root {
    --primary-red: #721414;
    --primary-red-hover: #901a1a;
    --cream: #fbf7f0;
    --gold: #d4af37;
    --gold-hover: #e5c148;
    --white: #ffffff;
    --text-dark: #2c2c2c;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow-soft: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--cream);
    background-image: url('assets/bg_v2.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    color: var(--text-dark);
}

.body-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(114, 20, 20, 0.9), rgba(212, 175, 55, 0.4));
    z-index: -1;
    backdrop-filter: blur(5px);
}

.main-container {
    width: 100%;
    max-width: 1000px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    padding: 0 0 3.5rem 0;
    /* Remove top padding for banner */
    position: relative;
    overflow: hidden;
    animation: fadeIn 1s ease-out;
}

/* Remove old top border line */
.main-container::before {
    display: none;
}

.hero-banner {
    position: relative;
    width: 100%;
    height: 600px;
    /* Increased height to show more of the image */
    overflow: hidden;
    border-radius: 30px 30px 0 0;
    /* Rounded top corners only */
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: top center;
    /* Focus on top to show faces/heads properly */
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.5s ease-in-out, transform 6s ease;
    transform: scale(1);
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1.05);
    /* Subtle zoom effect */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 60%, rgba(255, 255, 255, 1) 100%);
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 3.5rem;
    position: relative;
    margin-top: -180px;
    /* Pull header up to overlap banner */
    z-index: 2;
}

.logo-container {
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.school-logo {
    width: 160px;
    /* Slightly larger */
    height: auto;
    max-height: 160px;
    filter: drop-shadow(0 8px 15px rgba(0, 0, 0, 0.2));
    background: transparent;
    /* Removed white background */
    padding: 0;
    border: none;
    /* Removed border */
    border-radius: 0;
    /* Removed circular crop to prevent distortion */
    transition: transform 0.3s ease;
    object-fit: contain;
}

.school-logo:hover {
    transform: scale(1.05);
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

h1 {
    font-family: 'Playfair Display', serif;
    font-size: 4.5rem;
    color: var(--primary-red);
    margin-bottom: 0.5rem;
    /* Create a strong white border/outline effect */
    text-shadow:
        3px 3px 0 #ffffff,
        -3px -3px 0 #ffffff,
        3px -3px 0 #ffffff,
        -3px 3px 0 #ffffff,
        3px 0px 0 #ffffff,
        0px 3px 0 #ffffff,
        -3px 0px 0 #ffffff,
        0px -3px 0 #ffffff,
        0 5px 15px rgba(0, 0, 0, 0.3);
}

h2 {
    font-size: 1.2rem;
    color: var(--text-dark);
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.subtitle {
    color: var(--primary-red);
    font-weight: 600;
    position: relative;
    display: inline-block;
    padding-bottom: 5px;
}

.subtitle2 {
    color: var(--primary-red);
    font-weight: 600;
    position: relative;
    display: inline-block;
    padding-bottom: 5px;
    font-size: 1.8rem !important;
}

.subtitle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--gold);
    border-radius: 2px;
}

.levels-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

@media (max-width: 768px) {
    .levels-container {
        grid-template-columns: 1fr;
    }
}

.level-section {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.level-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.level-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--cream);
}

.level-icon {
    font-size: 2rem;
    margin-right: 1rem;
    background: var(--primary-red);
    color: var(--white);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.level-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--primary-red);
}

.download-list {
    list-style: none;
}

.download-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: 10px;
    border-left: 5px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.download-item.primaria {
    border-left-color: var(--gold);
}

.download-item.secundaria {
    border-left-color: var(--primary-red);
}

.download-item:hover {
    background: #fffdf5;
    transform: translateX(5px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.grade-info {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.download-btn {
    text-decoration: none;
    color: var(--primary-red);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background-color: rgba(114, 20, 20, 0.1);
    transition: all 0.2s ease;
}

.download-item:hover .download-btn {
    background-color: var(--primary-red);
    color: var(--white);
}

footer {
    text-align: center;
    margin-top: 3rem;
    font-size: 0.9rem;
    color: var(--primary-red);
    opacity: 0.8;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--cream);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-red);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-red-hover);
}