:root {
    --primary-color: #00C853;
    /* Vibrant Emerald Green */
    --primary-dark: #009624;
    --secondary-color: #FFD600;
    /* Bright sunny Yellow */
    --accent-color: #FF3D00;
    /* Vivid Red/Orange */
    --background-color: #e0f2f1;
    /* Soft teal tint */
    --card-bg: rgba(255, 255, 255, 0.95);
    /* Glassmorphic base */
    --text-color: #1a237e;
    /* Deep Indigo for text (high contrast) */
    --text-light: #37474f;
    --white: #ffffff;
    --shadow: 0 15px 35px rgba(0, 50, 0, 0.15);
    /* Deeper, colored shadow */
    --radius: 25px;
    --transition: cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Snappy Elastic */
}

body {
    font-family: 'Outfit', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.7;
    background-image:
        radial-gradient(circle at 0% 0%, rgba(255, 214, 0, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 100% 0%, rgba(0, 200, 83, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(255, 61, 0, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 0% 100%, rgba(26, 35, 126, 0.05) 0%, transparent 50%);
    background-attachment: fixed;
}

header {
    background:
        linear-gradient(rgba(0, 200, 83, 0.4), rgba(255, 214, 0, 0.4)),
        /* Green-Yellow tint overlay */
        url('header-bg.jpg') center/cover no-repeat;
    color: var(--white);
    padding: 2rem 1rem;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 0 0 60px 60px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

/* Abstract circles decoration in header - Adjusted to not interfere */
header::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    filter: blur(50px);
}

header::after {
    display: none;
    /* Removed second circle to clean up for images */
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.logo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    background: var(--white);
    padding: 5px;
    object-fit: contain;
    transition: transform 0.4s var(--transition);
    backdrop-filter: blur(5px);
}

.logo:hover {
    transform: scale(1.1) rotate(5deg);
}

.header-text {
    margin: 1.5rem 0;
}

.institution-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.sede-grado {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin: 0.5rem 0 2rem 0;
    color: rgba(255, 255, 255, 0.9);
}

.main-title {
    font-size: 4rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.1;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow: 0 5px 20px rgba(0, 0, 0, 0.8);
}

.hero-button {
    display: inline-block;
    background: #FFD600;
    /* Vibrant Yellow same as --secondary-color */
    color: #1b5e20;
    /* Deep dark green for high contrast */
    padding: 1.2rem 3.5rem;
    border-radius: 15px;
    font-weight: 800;
    font-size: 1.4rem;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: all 0.4s var(--transition);
    margin-top: 2.5rem;
    border: 3px solid #ffffff;
    /* White border to stand out against background image */
    position: relative;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-button:hover {
    transform: translateY(-5px) scale(1.05);
    background-color: #ffffff;
    color: #00C853;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

/* Animation to attract attention */
@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 214, 0, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(255, 214, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 214, 0, 0);
    }
}

.hero-button {
    animation: pulseGlow 2.5s infinite;
}

main {
    max-width: 1200px;
    margin: -4rem auto 4rem auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

section {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: transform 0.4s var(--transition), box-shadow 0.4s ease;
    backdrop-filter: blur(10px);
}

section:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
}

/* Specific Layout */
.info-section {
    grid-column: 1 / -1;
    /* Scale full width */
    border-top: 6px solid var(--secondary-color);
}

.pdf-section {
    border-top: 6px solid var(--primary-color);
}

.video-section {
    border-top: 6px solid var(--accent-color);
}

h2 {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

h2::before {
    content: '';
    display: block;
    width: 8px;
    height: 32px;
    background: linear-gradient(to bottom, var(--secondary-color), var(--accent-color));
    border-radius: 4px;
}

.text-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 1.15rem;
}

.pdf-container,
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05);
}

.pdf-container iframe,
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.caption {
    font-size: 0.95rem;
    color: var(--text-light);
    text-align: center;
    margin-top: 1rem;
    font-weight: 500;
    font-style: italic;
}

footer {
    background: linear-gradient(135deg, #1a237e 0%, #0d47a1 100%);
    color: var(--white);
    text-align: center;
    padding: 4rem 1rem 2rem 1rem;
    margin-top: 3rem;
    border-top-left-radius: 60px;
    border-top-right-radius: 60px;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-content p {
    opacity: 0.8;
    margin: 0;
    font-size: 1.1rem;
}

.top-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 1000;
}

.visit-counter {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.visit-counter:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.3);
}

.lang-button {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: white;
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: 50px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(255, 61, 0, 0.2);
    transition: all 0.3s var(--transition);
    border: 2px solid white;
}

.lang-button:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.counter-label {
    font-size: 1.2rem;
}

.counter-number {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary-dark);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.btn-back {
    display: inline-block;
    background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
    color: #fff;
    text-decoration: none;
    padding: 16px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 10px 20px rgba(255, 61, 0, 0.3);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-back:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(255, 61, 0, 0.4);
    background: linear-gradient(45deg, var(--accent-color), var(--secondary-color));
}

.download-container {
    text-align: center;
    margin-top: 1.5rem;
}

.btn-download {
    display: inline-block;
    background: linear-gradient(45deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 14px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 8px 15px rgba(0, 200, 83, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    font-size: 1.1rem;
}

.btn-download:hover {
    background: linear-gradient(45deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0, 200, 83, 0.4);
}

/* Responsiveness */
/* Responsiveness */
@media (max-width: 768px) {
    header {
        padding: 2rem 1rem 4rem 1rem;
        border-radius: 0 0 30px 30px;
    }

    .logo {
        width: 100px;
        height: 100px;
    }

    .header-text h1 {
        font-size: 2rem;
    }

    .header-text h2 {
        font-size: 1.3rem;
    }

    main {
        margin-top: -2.5rem;
        gap: 1.5rem;
        padding: 0 1rem;
        grid-template-columns: 1fr;
    }

    section {
        padding: 1.5rem;
    }

    .btn-back {
        padding: 12px 25px;
        font-size: 1rem;
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    header {
        padding: 1.5rem 1rem 3.5rem 1rem;
    }

    .logo {
        width: 80px;
        height: 80px;
    }

    .header-text h1 {
        font-size: 1.6rem;
        letter-spacing: 1px;
    }

    .header-text h2 {
        font-size: 1.1rem;
    }

    .header-text p {
        font-size: 1rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    section {
        padding: 1.25rem;
    }

    .footer-content {
        gap: 1rem;
    }

    .btn-back {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
}