/* ====== RESET ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    font-family: sans-serif;
    font-size: 1rem;
}

/* ====== ENCABEZADO ====== */
header {
    min-height: 5rem;
    background-color: #f3c1a0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
}
header div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
#log {
    height: 5rem;
    width: auto;
    max-width: 5rem;
    object-fit: contain;
}
#titulo {
    color: #805833;
    font-size: 1.2rem;
    text-align: center;
    flex: 1;
}
#btn-deplegar {
    height: 3rem;
    width: auto;
    min-width: 6rem;
    cursor: pointer;
    border: none;
    border-radius: 0.375rem;
    background-color: #68c4ee;
    color: #10835c;
    font-weight: bold;
    transition: background-color 0.3s ease;
    padding: 0.15rem;
}
#btn-deplegar:hover {
    background-color: #e0f2ea;
}
#btn-deplegar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    display: block;
}

/* ====== CONTENIDO ====== */
main {
    background-color: #f9fafb;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 0;
    margin: 0;
    gap: 0rem;
}

/* ====== FORMULARIO DE LOGIN ====== */
#login-form {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    background: #ffffff;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 0.25rem 0.9375rem rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 25rem;
    z-index: 1000;
}
#login-form.visible {
    display: block;
    opacity: 1;
}
#login-form h2 {
    text-align: center;
    color: #007bff;
    margin-bottom: 1.25rem;
}
.form-group {
    position: relative;
    margin-bottom: 1.25rem;
}
#login-form input {
    width: 100%;
    padding: 0.75rem 0.5rem;
    font-size: 1rem;
    border: 2px solid #ccc;
    border-radius: 0.375rem;
    outline: none;
    background: transparent;
}
#login-form input:focus {
    border-color: #007bff;
}
#login-form label {
    position: absolute;
    left: 0.625rem;
    top: 0.75rem;
    background: #ffffff;
    color: #666;
    font-size: 1rem;
    transition: 0.3s ease all;
    pointer-events: none;
    padding: 0 0.25rem;
}
#login-form input:focus + label,
#login-form input:not(:placeholder-shown) + label {
    top: -0.625rem;
    left: 0.5rem;
    font-size: 0.75rem;
    color: #007bff;
}
#btn-login {
    width: 100%;
    background: #007bff;
    color: white;
    border: none;
    padding: 0.625rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
#btn-login:hover {
    background: #0056b3;
}

/* ====== IMAGEN DESVANECIDA ====== */
#img-desbanecido {
    width: 100%;
    aspect-ratio: 100 / 20;
    overflow: hidden;
    position: relative;
    max-height: 20vh;
}

#img-desbanecido img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#img-desbanecido::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to bottom, transparent 0%, rgba(249, 250, 251, 1) 100%);
    pointer-events: none;
}

/* ====== SECCIONES ====== */
.secciones {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 90%;
    margin: 0 auto;
}

.bloque {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ====== MAPA ====== */
#mapa {
    width: 90%;
    max-width: 800px;
    margin: 2rem auto;
    text-align: center;
}

#mapa iframe {
    width: 100%;
    height: 50vh;
    border: 0;
    border-radius: 1rem;
}

/* ====== Títulos separadores (Conócenos / Visítanos) ====== */
.suptitulo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem 0 1rem;
    width: 100%;
}

.suptitulo span {
    font-size: 1.6rem;
    font-weight: bold;
    color: #c45a25; /* color del texto */
    padding: 0 1rem;
    white-space: nowrap;
}

/* líneas a los costados */
.suptitulo::before,
.suptitulo::after {
    content: "";
    flex: 1;
    height: 3px;
    background-color: #f3c1a0; /* color de las líneas */
    border-radius: 2px;
}

/* ====== INFORMACIÓN (Misión, Visión, Historia) ====== */
#informacion {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    line-height: 1.6;
}

#informacion .subtitulo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 1.8rem;
    color: #c45a25;
    border-left: 6px solid #f3c1a0;
    padding-left: .7rem;
}

#informacion .texto {
    font-size: 1.05rem;
    margin-top: .6rem;
    text-align: justify;
    color: #444;
}

#informacion .texto:last-child {
    margin-bottom: 0;
}

/* ====== PIE DE PÁGINA ====== */
footer {
    background-color: #f4a261;
    padding: .5rem 0;
    text-align: center;
}

footer p {
    text-align: left;
    margin: 0 0 1rem 2rem;
    color: dimgrey;
    font-size: 18px;
}

.red-social {
    height: 4rem;
    width: 4rem;
    border-radius: 0.625rem;
    margin: 0;
    display: block;
}

footer a {
    margin: 0 1rem;
    display: inline-block;
}
#botones {
    padding: 0 3rem;
}

/* ====== FONDO BORROSO CUANDO APARECE EL LOGIN ====== */
#blur-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(8px);      /* EL BLUR REAL */
    background: rgba(0, 0, 0, 0.3);  /* Oscurece un poco */
    z-index: 500;                    /* Debajo del formulario */
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
#blur-overlay.visible {
    display: block;
    opacity: 1;
}
/* Bloquea el scroll cuando se muestra el login */
.body-no-scroll {
    overflow: hidden;
    height: 100vh;
}

/* ====== DISEÑO RESPONSIVO DOS COLUMNAS ====== */
@media (min-width: 1650px) {
    .secciones {
        grid-template-columns: 1fr 1fr;
        align-items: start;
        column-gap: 2rem;
    }
}


/* ------------------------------------------------------------
   MENSAJES (EXITO / ERROR)
------------------------------------------------------------ */

.mensaje{
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    
    padding: 16px 22px;
    border-radius: 10px;

    font-weight: 600;
    font-size: 1rem;

    z-index: 9999;

    box-shadow: 0 8px 25px rgba(0,0,0,0.25);

    transition: opacity .4s ease;
}

.mensaje.error{
    background-color: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

.mensaje.exito{
    background-color: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}