:root {
    /* === PALETA PRINCIPAL === */
    --amarillo-principal: #9c7412;
    --amarillo-claro: #d6b24c;
    --verde-texto: #2a3f34;
    --verde-profundo: #1f3b2d;
    --blanco: #ffffff;
    --gris-claro: #f7f7f4;
    --sombra-suave: 0 15px 35px rgba(0,0,0,.15);
    --sombra-hover: 0 25px 55px rgba(0,0,0,.22);
}

/* ================= BASE ================= */
html, body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    scroll-behavior: smooth;
    color: var(--verde-texto);
}

/* ================= FONDO ================= */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        linear-gradient(rgba(156,116,18,0.55), rgba(156,116,18,0.55)),
        url("static/altopangue.jpg") center/cover;
    z-index: -1;
}

/* ================= NAVBAR ================= */
.custom-navbar {
    background: rgba(156,116,18,0.92);
    backdrop-filter: blur(10px);
    box-shadow: var(--sombra-suave);
    padding: 16px 0;
}
.navbar-logo { height: 60px; }
.navbar-brand { color: var(--verde-profundo) !important; }
.nav-link {
    font-weight: 600;
    color: var(--verde-profundo) !important;
    transition: opacity .3s ease;
}
.nav-link:hover { opacity: .75; }

/* ================= HERO ================= */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
}
.hero-title {
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 800;
    color: var(--blanco);
    text-shadow: 0 6px 18px rgba(0,0,0,.55);
}
.hero-text {
    color: var(--blanco);
    font-size: 1.15rem;
    max-width: 720px;
    margin: 0 auto;
}
section { scroll-margin-top: 120px; }

/* ================= TARJETAS ================= */
.card {
    background: rgba(255,255,255,.98);
    border-radius: 28px;
    border: none;
    box-shadow: var(--sombra-suave);
    transition: transform .35s ease, box-shadow .35s ease;
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--sombra-hover);
}
.card h2, .card h5 {
    color: var(--amarillo-principal);
    font-weight: 700;
}
.card p { color: #4a5f55; }

/* ================= LISTAS ================= */
.list-group { border-radius: 26px; overflow: hidden; }
.list-group-item { padding: 18px 24px; font-size: .95rem; color: #445c51; }

/* ================= AVISO IMPORTANTE (CONFIGURACIÓN GLOBAL) ================= */
.notice-btn {
    position: fixed;
    top: 200px; /* Posición original arriba */
    right: 20px;
    background: linear-gradient(135deg, var(--amarillo-principal), var(--amarillo-claro));
    color: var(--verde-profundo);
    font-weight: 700;
    border-radius: 50px;
    padding: 12px 24px;
    box-shadow: var(--sombra-suave);
    border: none;
    transition: transform .3s ease, box-shadow .3s ease;
    z-index: 9998;
}
.notice-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--sombra-hover);
}

.notice-card {
    position: fixed;
    top: 150px;
    right: 20px;
    width: 360px;
    background: white;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--sombra-hover);
    display: none;
    z-index: 10000;
}
.notice-header {
    background: linear-gradient(135deg, var(--amarillo-principal), var(--amarillo-claro));
    color: var(--verde-profundo);
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.notice-body {
    padding: 18px;
    font-size: .9rem;
    color: #445c51;
    overflow-y: auto; /* Scroll si es necesario */
}
.notice-logo { width: 70px; }

/* ================= FOOTER ================= */
.footer-custom {
    background: linear-gradient(135deg, var(--amarillo-principal), var(--amarillo-claro));
    color: var(--verde-profundo);
    padding: 32px 0;
    text-align: center;
    border-top-left-radius: 45px;
    border-top-right-radius: 45px;
}
.footer-custom p { margin: 4px 0; font-size: .9rem; }

/* ================= RESPONSIVE (CORREGIDO) ================= */

@media (max-width: 992px) {
    .hero-section { min-height: 80vh; }
    /* Ajuste para tablets */
    .notice-btn { top: 180px; }
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 60vh;
        padding: 4rem 0;
    }
    .hero-title { font-size: clamp(2rem, 10vw, 3rem); }
    .hero-text { font-size: 1rem; padding: 0 1rem; }

    /* --- CORRECCIÓN BOTÓN (Se queda ARRIBA a la derecha) --- */
    .notice-btn {
        top: 130px;  /* Un poco más arriba en celular para que no tape tanto */
        right: 15px;
        position: fixed; /* Aseguramos que se mantenga flotando */
        display: block;
        margin: 0;
        bottom: auto; /* Anulamos cualquier configuración de bottom */
    }

    /* --- CORRECCIÓN TARJETA (Centrada en pantalla) --- */
    /* Esto soluciona que se cierre o se vea mal */
    .notice-card {
        top: 50%;       /* Centrado vertical */
        left: 50%;      /* Centrado horizontal */
        right: auto;    /* Anulamos el right de escritorio */
        transform: translate(-50%, -50%); /* Centrado perfecto */
        width: 90%;     /* Ancho adaptable */
        max-width: 350px;
        max-height: 80vh; /* Para que no se salga de la pantalla */
    }

    .card { padding: 1rem; margin-bottom: 1rem; }
    .card h2 { font-size: 1.5rem; }
    .card h5 { font-size: 1.1rem; }
    .list-group-item { padding: 12px 16px; font-size: 0.9rem; }
    .container { padding-left: 15px; padding-right: 15px; }
}

@media (max-width: 576px) {
    .navbar-logo { height: 40px; }
    .navbar-brand { font-size: 1rem; }
    .hero-title { font-size: clamp(1.5rem, 12vw, 2.5rem); }
    
    /* Ajuste extra para celulares muy pequeños */
    .notice-btn { top: 110px; padding: 10px 15px; font-size: 0.9rem; }
}

/* IMÁGENES */
.img-escuela {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
}
.img-logo-grande {
    width: 100%;
    max-height: 420px;
    object-fit: contain;
    background: #fff;
    padding: 20px;
    border-radius: 24px;
}