/* =========================================
   MEBAL
   Museo Ecológico Virtual de la Ballena Azul
   Hoja de estilos completa
   ========================================= */

/* -----------------------------------------
   Variables generales
   ----------------------------------------- */
:root {
    --color-primary: #004d7a;
    --color-primary-dark: #003957;
    --color-secondary: #0077be;
    --color-secondary-light: #e5f6fb;
    --color-accent: #20c997;

    --color-bg: #ffffff;
    --color-bg-alt: #f4f9fb;
    --color-surface: #ffffff;

    --color-text: #202b33;
    --color-text-light: #5b6871;
    --color-border: #dce8ee;

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;

    --shadow: 0 4px 14px rgba(0, 43, 70, 0.08);
    --shadow-hover: 0 10px 24px rgba(0, 43, 70, 0.16);

    --container-width: 1140px;
}

/* -----------------------------------------
   Reset y elementos globales
   ----------------------------------------- */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

a {
    color: var(--color-secondary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

h1,
h2,
h3,
h4 {
    margin-top: 0;
    color: var(--color-primary);
    line-height: 1.2;
}

h1 {
    font-size: clamp(1.75rem, 4vw, 2.45rem);
}

h2 {
    font-size: clamp(1.4rem, 3vw, 1.95rem);
}

h3 {
    font-size: 1.15rem;
}

p {
    margin-top: 0;
}

ul,
ol {
    padding-left: 1.25rem;
}

/* -----------------------------------------
   Header: logo + botones + dropdowns
   ----------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #00577f 0%, #00456b 100%);
    box-shadow: 0 3px 15px rgba(0, 43, 70, 0.25);
}

.header-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: min(var(--container-width), calc(100% - 2rem));
    min-height: 66px;
    margin: 0 auto;
}

/* Marca */
.brand {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 0.55rem;
    color: #ffffff;
    text-decoration: none;
}

.brand:hover {
    color: #ffffff;
    text-decoration: none;
}

.brand-logo {
    display: block;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    max-width: 38px;
    max-height: 38px;
    object-fit: contain;
}

.brand-name {
    max-width: 170px;
    color: #ffffff;
    font-size: 0.83rem;
    font-weight: 750;
    letter-spacing: 0.15px;
    line-height: 1.12;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
}

/* Botón hamburguesa */
.menu-toggle {
    display: none;
    width: 42px;
    height: 40px;
    padding: 7px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.12);
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.22);
}

.menu-toggle span {
    display: block;
    width: 23px;
    height: 2px;
    margin: 4px auto;
    border-radius: 4px;
    background: #ffffff;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle.is-open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Navegación */
.main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
    margin-left: auto;
}

/* Botones superiores */
.nav-button,
.nav-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 37px;
    padding: 0.5rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.09);
    box-shadow: 0 2px 5px rgba(0, 30, 50, 0.1);
    color: #ffffff;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.nav-home {
    background: rgba(255, 255, 255, 0.18);
}

.nav-button:hover,
.nav-home:hover,
.nav-button:focus-visible,
.nav-home:focus-visible,
.nav-dropdown.open > .dropdown-toggle {
    border-color: rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.26);
    box-shadow: 0 5px 12px rgba(0, 32, 55, 0.22);
    color: #ffffff;
    text-decoration: none;
    outline: none;
    transform: translateY(-2px);
}

.nav-button:active,
.nav-home:active {
    transform: translateY(0);
}

/* Flecha dropdown */
.dropdown-toggle .arrow {
    display: inline-block;
    margin-left: 0.38rem;
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.nav-dropdown.open .dropdown-toggle .arrow {
    transform: rotate(180deg);
}

/* Dropdowns */
.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.55rem);
    left: 0;
    z-index: 1100;
    min-width: 215px;
    padding: 0.45rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(0, 45, 75, 0.22);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease,
        transform 0.2s ease;
}

.nav-dropdown:hover > .dropdown-menu,
.nav-dropdown.open > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    min-height: 38px;
    margin-bottom: 0.2rem;
    padding: 0.58rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #f8fcfe;
    color: #17445c;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
    transition:
        background 0.18s ease,
        color 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}

.dropdown-menu a:last-child {
    margin-bottom: 0;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus-visible {
    border-color: #b8dce9;
    background: #e5f6fb;
    color: #006e9d;
    text-decoration: none;
    outline: none;
    transform: translateX(3px);
}

/* Idiomas */
.language-buttons {
    display: flex;
    align-items: center;
    gap: 0.28rem;
    margin-left: 0.32rem;
    padding-left: 0.55rem;
    border-left: 1px solid rgba(255, 255, 255, 0.32);
}

.language-buttons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 33px;
    min-height: 31px;
    padding: 0.25rem 0.42rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-decoration: none;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.language-buttons a:hover,
.language-buttons a:focus-visible {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    text-decoration: none;
    outline: none;
    transform: translateY(-1px);
}

.language-buttons a.active {
    border-color: #ffffff;
    background: #ffffff;
    color: var(--color-primary);
}

/* Header para ancho intermedio */
@media (max-width: 1120px) {
    .brand-name {
        display: none;
    }

    .nav-button,
    .nav-home {
        padding-right: 0.52rem;
        padding-left: 0.52rem;
        font-size: 0.77rem;
    }
}

/* Header móvil */
@media (max-width: 850px) {
    .header-container {
        min-height: 62px;
        flex-wrap: wrap;
    }

    .menu-toggle {
        display: block;
        order: 1;
    }

    .brand {
        order: 2;
        margin-right: auto;
    }

    .brand-logo {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
        max-width: 34px;
        max-height: 34px;
    }

    .brand-name {
        display: inline;
        max-width: 160px;
        font-size: 0.75rem;
    }

    .main-nav {
        display: none;
        flex-direction: column;
        align-items: stretch;
        order: 3;
        width: 100%;
        gap: 0.4rem;
        margin: 0.35rem 0 0.7rem;
        padding: 0.7rem;
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: var(--radius);
        background: rgba(0, 37, 62, 0.45);
    }

    .main-nav.is-open {
        display: flex;
    }

    .nav-home,
    .nav-button {
        width: 100%;
        min-height: 43px;
        justify-content: space-between;
        padding: 0.72rem 0.85rem;
        font-size: 0.92rem;
        text-align: left;
    }

    .nav-dropdown {
        width: 100%;
    }

    .dropdown-menu {
        position: static;
        display: none;
        width: 100%;
        min-width: 0;
        margin-top: 0.35rem;
        padding: 0.35rem;
        border: 0;
        border-radius: 9px;
        background: rgba(255, 255, 255, 0.1);
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .nav-dropdown.open > .dropdown-menu {
        display: block;
    }

    .dropdown-menu a {
        min-height: 42px;
        margin-bottom: 0.28rem;
        padding: 0.68rem 0.85rem 0.68rem 1.15rem;
        border-color: rgba(255, 255, 255, 0.12);
        background: rgba(255, 255, 255, 0.1);
        color: #ffffff;
        font-size: 0.88rem;
    }

    .dropdown-menu a:hover,
    .dropdown-menu a:focus-visible {
        border-color: rgba(255, 255, 255, 0.28);
        background: rgba(255, 255, 255, 0.22);
        color: #ffffff;
        transform: translateX(3px);
    }

    .language-buttons {
        justify-content: center;
        width: 100%;
        margin: 0.45rem 0 0;
        padding: 0.65rem 0 0;
        border-top: 1px solid rgba(255, 255, 255, 0.3);
        border-left: 0;
    }
}

/* -----------------------------------------
   Contenido principal
   ----------------------------------------- */
main {
    width: min(var(--container-width), calc(100% - 2rem));
    min-height: 55vh;
    margin: 1.5rem auto 2rem;
}

.page-content {
    color: var(--color-text);
    white-space: pre-wrap;
}

/* -----------------------------------------
   Hero de la página de Inicio
   ----------------------------------------- */
.hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 2.5rem;
    padding: clamp(2.7rem, 7vw, 5.2rem) 1.25rem;
    border-radius: var(--radius-lg);
    background:
        linear-gradient(115deg, rgba(0, 57, 91, 0.86), rgba(0, 119, 190, 0.53)),
        url("../images/hero-loreto.jpg") center / cover no-repeat;
    color: #ffffff;
    text-align: center;
    box-shadow: var(--shadow);
}

.hero-content {
    max-width: 860px;
    margin: 0 auto;
}

.hero h1 {
    margin-bottom: 0.8rem;
    color: #ffffff;
    font-size: clamp(2rem, 4vw, 3.1rem);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.hero p {
    max-width: 760px;
    margin: 0 auto 1.45rem;
    color: #effaff;
    font-size: clamp(1rem, 2vw, 1.16rem);
}

.hero-kicker,
.section-kicker {
    margin-bottom: 0.55rem;
    color: var(--color-secondary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.9px;
    line-height: 1.2;
    text-transform: uppercase;
}

.hero-kicker {
    color: #c8f2ff;
}

.hero-subtitle {
    max-width: 760px;
}

/* Botones genéricos */
.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.72rem 1.18rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-decoration: none;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

.btn:hover {
    box-shadow: var(--shadow-hover);
    text-decoration: none;
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--color-secondary);
    color: #ffffff;
}

.btn-primary:hover {
    color: #ffffff;
    filter: brightness(1.07);
}

.btn-secondary {
    background: var(--color-accent);
    color: #063c3d;
}

.btn-secondary:hover {
    color: #063c3d;
    filter: brightness(1.04);
}

.btn-outline {
    margin-top: 0.35rem;
    border-color: var(--color-secondary);
    background: transparent;
    color: var(--color-secondary);
}

.btn-outline:hover {
    background: var(--color-secondary);
    color: #ffffff;
}

/* -----------------------------------------
   Inicio: encabezado de secciones
   ----------------------------------------- */
.highlights {
    margin-bottom: 2.4rem;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-heading h2 {
    margin-bottom: 0;
}

.text-link {
    flex-shrink: 0;
    color: var(--color-secondary);
    font-size: 0.9rem;
    font-weight: 750;
}

/* -----------------------------------------
   Inicio: tarjetas de navegación con fotos
   ----------------------------------------- */
.highlight-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.highlight-card {
    display: block;
    min-height: 150px;
    padding: 1.2rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    box-shadow: var(--shadow);
    color: inherit;
    text-decoration: none;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.highlight-card:hover {
    border-color: #aad4e5;
    box-shadow: var(--shadow-hover);
    text-decoration: none;
    transform: translateY(-4px);
}

.highlight-card h3 {
    margin-bottom: 0.55rem;
    color: var(--color-primary);
}

.highlight-card p {
    margin-bottom: 0;
    color: var(--color-text-light);
    font-size: 0.96rem;
}

/* Variante de tarjetas con fotografía */
.highlight-card.highlight-card-image {
    min-height: 0;
    overflow: hidden;
    padding: 0;
}

.highlight-card-image > img {
    width: 100%;
    height: 205px;
    background: #e8f4f8;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.highlight-card-image:hover > img {
    transform: scale(1.06);
}

.highlight-card-body {
    padding: 1.05rem 1.1rem 1.15rem;
}

.highlight-card-body h3 {
    margin-top: 0.4rem;
}

.highlight-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: var(--color-secondary-light);
    color: #006e9d;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.25px;
}

.card-action {
    display: inline-block;
    margin-top: 1rem;
    color: var(--color-secondary);
    font-size: 0.88rem;
    font-weight: 800;
}

/* -----------------------------------------
   Inicio: bloque informativo Loreto
   ----------------------------------------- */
.intro,
.intro-home {
    margin-top: 2.4rem;
    padding: clamp(1.4rem, 4vw, 2.4rem);
    border: 1px solid #d3e8ef;
    border-radius: var(--radius-lg);
    background: linear-gradient(
        135deg,
        rgba(239, 250, 252, 0.95),
        rgba(228, 245, 250, 0.95)
    );
}

.intro-home-content {
    max-width: 900px;
}

.intro-home h2 {
    max-width: 720px;
}

.intro-home p:not(.section-kicker),
.intro p {
    max-width: 900px;
    color: var(--color-text-light);
}

/* -----------------------------------------
   Inicio: Especie del día
   ----------------------------------------- */
.species-of-the-day {
    display: grid;
    grid-template-columns: 1fr;
    overflow: hidden;
    margin-top: 2.5rem;
    border: 1px solid #cde7ee;
    border-radius: var(--radius-lg);
    background: #f3fbfc;
    box-shadow: var(--shadow);
}

.species-of-the-day-image-wrap {
    min-height: 240px;
}

.species-of-the-day-image {
    width: 100%;
    height: 100%;
    min-height: 240px;
    background: #ddecf2;
    object-fit: cover;
}

.species-of-the-day-content {
    padding: 1.4rem;
}

.species-of-the-day-content h2 {
    margin-bottom: 0.35rem;
}

.species-of-the-day-scientific {
    margin-bottom: 1rem;
    color: var(--color-text-light);
}

/* -----------------------------------------
   Páginas internas: imagen de portada
   ----------------------------------------- */
.page-hero {
    position: relative;
    min-height: 360px;
    overflow: hidden;
    margin: 0 0 2rem;
    border-radius: var(--radius-lg);
    background: #0b4e72;
    box-shadow: var(--shadow);
}

.page-hero-image {
    width: 100%;
    height: 360px;
    object-fit: cover;
    object-position: center;
}

.page-hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    background: linear-gradient(
        180deg,
        rgba(0, 41, 65, 0.05) 15%,
        rgba(0, 44, 70, 0.82) 100%
    );
}

.page-hero-content {
    width: 100%;
    padding: 1.5rem;
    color: #ffffff;
}

.page-hero-content h1 {
    margin-bottom: 0.45rem;
    color: #ffffff;
    font-size: clamp(2rem, 4vw, 3rem);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.page-hero-content p {
    max-width: 760px;
    margin: 0;
    color: #eefaff;
    font-size: 1.05rem;
}

.page-article {
    max-width: 980px;
    margin: 0 auto;
}

/* -----------------------------------------
   Ecosistema: especies con fotos
   ----------------------------------------- */
.ecosystem-species {
    margin-top: 2.5rem;
}

.ecosystem-species > h2 {
    margin-bottom: 1.25rem;
}

.ecosystem-species > h3 {
    margin-top: 2rem;
    margin-bottom: 0.85rem;
    font-size: 1.2rem;
}

.species-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.1rem;
}

.species-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 0;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    box-shadow: var(--shadow);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.species-card:hover {
    border-color: #aad4e5;
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.species-card.emblematic {
    border-color: var(--color-secondary);
    background: #f0f9fc;
}

.species-card-image {
    width: 100%;
    height: 215px;
    background: #e8f4f8;
    object-fit: cover;
}

.species-card-content {
    padding: 1.1rem;
}

.species-card-content h4 {
    margin-bottom: 0.55rem;
}

.species-card-content p:last-child {
    margin-bottom: 0;
}

.scientific-name {
    color: #697882;
    font-size: 0.9rem;
    font-style: italic;
    font-weight: 400;
}

.species-role,
.species-status {
    margin-top: 0.85rem;
    padding-top: 0.8rem;
    border-top: 1px solid #e5edf1;
    color: var(--color-text-light);
    font-size: 0.92rem;
}

.species-role strong,
.species-status strong {
    color: var(--color-primary);
}

/* -----------------------------------------
   Formularios
   ----------------------------------------- */
input,
textarea,
select {
    width: 100%;
    max-width: 100%;
    padding: 0.68rem 0.75rem;
    border: 1px solid #cbdce5;
    border-radius: 8px;
    background: #ffffff;
    color: var(--color-text);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--color-secondary);
    outline: 3px solid rgba(0, 119, 190, 0.16);
}

form button[type="submit"] {
    display: inline-flex;
    width: auto;
    min-height: 42px;
    padding: 0.72rem 1.15rem;
    border: 0;
    border-radius: 8px;
    background: var(--color-secondary);
    color: #ffffff;
    font-weight: 700;
    transition: transform 0.2s ease, filter 0.2s ease;
}

form button[type="submit"]:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
}

/* -----------------------------------------
   Página no encontrada
   ----------------------------------------- */
.not-found {
    max-width: 720px;
    margin: 4rem auto;
    padding: 2rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-bg-alt);
    text-align: center;
}

/* -----------------------------------------
   Mapa Leaflet
   ----------------------------------------- */
.map-section {
    margin-top: 2rem;
}

#map {
    width: 100%;
    height: min(65vh, 550px);
    min-height: 370px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* -----------------------------------------
   Footer
   ----------------------------------------- */
footer {
    margin-top: 3rem;
    padding: 2.8rem 1rem 1rem;
    border-top: 1px solid #e0edf2;
    background: linear-gradient(180deg, #f5fafc 0%, #eaf4f7 100%);
}

.footer-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.8rem;
    width: min(var(--container-width), calc(100% - 2rem));
    margin: 0 auto;
}

.footer-section h4 {
    margin-bottom: 0.7rem;
    color: var(--color-primary);
}

.footer-section p {
    color: var(--color-text-light);
}

.footer-section ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.42rem;
}

.footer-section a {
    color: var(--color-text-light);
    text-decoration: none;
}

.footer-section a:hover {
    color: var(--color-secondary);
    text-decoration: underline;
}

.footer-bottom {
    width: min(var(--container-width), calc(100% - 2rem));
    margin: 2rem auto 0;
    padding-top: 1rem;
    border-top: 1px solid #d9e7ed;
    color: var(--color-text-light);
    font-size: 0.9rem;
    text-align: center;
}

/* -----------------------------------------
   Utilidades
   ----------------------------------------- */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 1rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

/* -----------------------------------------
   Responsive: tablet
   ----------------------------------------- */
@media (min-width: 720px) {
    .highlight-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .species-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 800px) {
    .species-of-the-day {
        grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.4fr);
    }

    .species-of-the-day-image-wrap,
    .species-of-the-day-image {
        min-height: 100%;
    }
}

@media (min-width: 980px) {
    .footer-container {
        grid-template-columns: 1.5fr repeat(3, 1fr);
    }
}

/* -----------------------------------------
   Responsive: móvil
   ----------------------------------------- */
@media (max-width: 600px) {
    main {
        width: min(100% - 1.25rem, var(--container-width));
        margin-top: 1rem;
    }

    .hero {
        margin-bottom: 1.5rem;
        padding: 2.5rem 1rem;
        border-radius: var(--radius);
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .section-heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .highlight-card-image > img {
        height: 190px;
    }

    .intro,
    .intro-home {
        padding: 1.25rem;
        border-radius: var(--radius);
    }

    .species-of-the-day-content {
        padding: 1.15rem;
    }

    .page-hero {
        min-height: 290px;
        margin-bottom: 1.4rem;
        border-radius: var(--radius);
    }

    .page-hero-image {
        height: 290px;
    }

    .page-hero-content {
        padding: 1.1rem;
    }

    .page-hero-content p {
        font-size: 0.95rem;
    }

    .species-card-image {
        height: 190px;
    }

    #map {
        min-height: 320px;
    }
}
/* =========================================================
   HEADER Y LOGOTIPO MEBAL
   Desktop y celular
   Pegar al final de: /public_html/public/css/style.css
   ========================================================= */

.site-header {
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid rgba(10, 71, 91, 0.12);
    position: relative;
    z-index: 1000;
}

.header-container {
    width: min(100% - 40px, 1280px);
    min-height: 92px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

/* Enlace que contiene el logo */
.brand {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: 220px;
    height: 76px;
    text-decoration: none;
    line-height: 0;
}

/* Imagen del logotipo */
.brand-logo {
    display: block;
    width: 100%;
    max-width: 220px;
    height: 68px;
    object-fit: contain;
    object-position: left center;
}

/* La navegación se mantiene a la derecha en escritorio */
.main-nav {
    margin-left: auto;
}

/* Evita que la imagen se deforme por reglas globales */
.brand img,
.brand-logo {
    max-width: 100%;
    height: auto;
}

/* ---------------------------------------------------------
   Tablet
   --------------------------------------------------------- */
@media (max-width: 1024px) {
    .header-container {
        width: min(100% - 32px, 960px);
        min-height: 82px;
        gap: 18px;
    }

    .brand {
        width: 190px;
        height: 66px;
    }

    .brand-logo {
        max-width: 190px;
        height: 60px;
    }
}

/* ---------------------------------------------------------
   Celular
   --------------------------------------------------------- */
@media (max-width: 767px) {
    .site-header {
        position: sticky;
        top: 0;
    }

    .header-container {
        width: calc(100% - 28px);
        min-height: 68px;
        gap: 12px;
    }

    .brand {
        width: 154px;
        height: 54px;
        min-width: 0;
    }

    .brand-logo {
        width: 154px;
        max-width: 100%;
        height: 50px;
        object-fit: contain;
        object-position: left center;
    }

    .menu-toggle {
        flex: 0 0 auto;
        margin-left: auto;
    }
}

/* Celulares compactos: evita que logo y hamburguesa choquen */
@media (max-width: 380px) {
    .header-container {
        width: calc(100% - 20px);
    }

    .brand {
        width: 132px;
        height: 48px;
    }

    .brand-logo {
        width: 132px;
        height: 45px;
    }
}
/* =========================================================
   CORRECCIÓN: HEADER, LOGO, BOTONES Y NAVEGACIÓN
   Pegar al final de: /public_html/public/css/style.css
   ========================================================= */

/* Variables de color del encabezado */
:root {
    --header-blue: #063f5b;
    --header-blue-dark: #032c40;
    --header-blue-hover: #0b607f;
    --nav-text: #063f5b;
    --nav-border: #b9d5df;
    --nav-active: #d9f1f6;
}

/* Fondo oscuro para que un logo claro/blanco sea visible */
.site-header {
    width: 100%;
    background: linear-gradient(135deg, var(--header-blue-dark), var(--header-blue));
    border-bottom: 3px solid #3db6ce;
    position: relative;
    z-index: 1000;
    box-shadow: 0 3px 14px rgba(0, 33, 48, 0.20);
}

/* Contenedor general */
.header-container {
    width: min(100% - 40px, 1280px);
    min-height: 92px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

/* Área reservada al logotipo */
.brand {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: 220px;
    height: 76px;
    padding: 4px 10px 4px 0;
    text-decoration: none;
    line-height: 0;
}

/* Logo: mantiene proporciones y se ve completo */
.brand-logo {
    display: block;
    width: 100%;
    max-width: 220px;
    max-height: 68px;
    height: auto;
    object-fit: contain;
    object-position: left center;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.28));
}

/* La navegación queda del lado derecho */
.main-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Botones principales: fondo claro, texto oscuro visible */
.main-nav .nav-button,
.main-nav a.nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 13px;
    color: var(--nav-text) !important;
    background-color: #ffffff;
    border: 1px solid var(--nav-border);
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.91rem;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: background-color 0.18s ease, color 0.18s ease,
                border-color 0.18s ease, transform 0.18s ease;
}

/* Flecha del menú desplegable */
.main-nav .nav-button .arrow {
    display: inline-block;
    margin-left: 7px;
    color: var(--nav-text) !important;
    font-size: 0.9em;
}

/* Estados hover, focus y menú activo */
.main-nav .nav-button:hover,
.main-nav .nav-button:focus-visible,
.main-nav .nav-dropdown.open .dropdown-toggle {
    color: #ffffff !important;
    background-color: var(--header-blue-hover);
    border-color: #7be1f3;
    outline: none;
    transform: translateY(-1px);
}

.main-nav .nav-button:hover .arrow,
.main-nav .nav-button:focus-visible .arrow,
.main-nav .nav-dropdown.open .dropdown-toggle .arrow {
    color: #ffffff !important;
}

/* Menús desplegables */
.main-nav .nav-dropdown {
    position: relative;
}

.main-nav .dropdown-menu {
    background: #ffffff;
    border: 1px solid var(--nav-border);
    border-radius: 10px;
    box-shadow: 0 10px 26px rgba(0, 33, 48, 0.24);
    overflow: hidden;
    z-index: 1100;
}

/* Enlaces dentro de los dropdowns */
.main-nav .dropdown-menu a {
    display: block;
    padding: 11px 15px;
    color: #063f5b !important;
    background-color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    line-height: 1.25;
}

.main-nav .dropdown-menu a:hover,
.main-nav .dropdown-menu a:focus-visible {
    color: #032c40 !important;
    background-color: #d9f1f6;
    outline: none;
}

/* Botones ES / EN */
.language-buttons {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 8px;
}

.language-buttons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    min-height: 32px;
    padding: 4px 7px;
    color: #ffffff !important;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 800;
}

.language-buttons a:hover,
.language-buttons a:focus-visible {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.20);
    outline: 2px solid #a8effa;
    outline-offset: 2px;
}

.language-buttons a.active {
    color: var(--nav-text) !important;
    background: #ffffff;
}

/* Botón hamburguesa */
.menu-toggle {
    color: #ffffff;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 8px;
}

.menu-toggle span {
    display: block;
    background-color: #ffffff;
}

/* =========================================================
   TABLET
   ========================================================= */
@media (max-width: 1024px) {
    .header-container {
        width: min(100% - 32px, 960px);
        min-height: 82px;
        gap: 16px;
    }

    .brand {
        width: 190px;
        height: 66px;
    }

    .brand-logo {
        max-width: 190px;
        max-height: 60px;
    }

    .main-nav .nav-button,
    .main-nav a.nav-button {
        padding: 8px 10px;
        font-size: 0.84rem;
    }
}

/* =========================================================
   CELULAR
   ========================================================= */
@media (max-width: 767px) {
    .site-header {
        position: sticky;
        top: 0;
    }

    .header-container {
        width: calc(100% - 28px);
        min-height: 70px;
        gap: 12px;
    }

    .brand {
        width: 155px;
        height: 55px;
        padding: 3px 0;
        min-width: 0;
    }

    .brand-logo {
        width: 155px;
        max-width: 100%;
        max-height: 50px;
        height: auto;
        object-position: left center;
    }

    /* Al abrir el menú, queda debajo del encabezado */
    .main-nav {
        width: 100%;
        margin-left: 0;
        background: #ffffff;
        border-top: 1px solid #b9d5df;
        border-bottom: 3px solid #3db6ce;
        box-shadow: 0 10px 18px rgba(0, 33, 48, 0.20);
    }

    /* Todos los botones son visibles sobre el menú blanco */
    .main-nav .nav-button,
    .main-nav a.nav-button {
        width: 100%;
        min-height: 46px;
        padding: 12px 14px;
        color: #063f5b !important;
        background: #ffffff;
        border: 1px solid #b9d5df;
        border-radius: 8px;
        justify-content: space-between;
        font-size: 0.95rem;
    }

    .main-nav .nav-button .arrow {
        color: #063f5b !important;
    }

    .main-nav .nav-button:hover,
    .main-nav .nav-button:focus-visible,
    .main-nav .nav-dropdown.open .dropdown-toggle {
        color: #ffffff !important;
        background: #0b607f;
        border-color: #0b607f;
        transform: none;
    }

    .main-nav .nav-button:hover .arrow,
    .main-nav .nav-button:focus-visible .arrow,
    .main-nav .nav-dropdown.open .dropdown-toggle .arrow {
        color: #ffffff !important;
    }

    /* Dropdowns dentro del menú móvil */
    .main-nav .dropdown-menu {
        background: #eef9fb;
        border: 1px solid #b9d5df;
        border-radius: 8px;
        box-shadow: none;
    }

    .main-nav .dropdown-menu a {
        color: #063f5b !important;
        background: #eef9fb;
        border-bottom: 1px solid #d6e8ed;
    }

    .main-nav .dropdown-menu a:hover,
    .main-nav .dropdown-menu a:focus-visible {
        color: #032c40 !important;
        background: #d1edf3;
    }

    .language-buttons {
        width: 100%;
        justify-content: center;
        background: #e3f4f7;
        border-color: #b9d5df;
    }

    .language-buttons a {
        color: #063f5b !important;
    }

    .language-buttons a.active {
        color: #ffffff !important;
        background: #063f5b;
    }

    .menu-toggle {
        flex: 0 0 auto;
        width: 44px;
        height: 42px;
        margin-left: auto;
        padding: 8px;
    }
}

/* Celulares pequeños */
@media (max-width: 380px) {
    .header-container {
        width: calc(100% - 20px);
    }

    .brand {
        width: 132px;
        height: 48px;
    }

    .brand-logo {
        width: 132px;
        max-height: 44px;
    }
}
/* =========================================================
   CHATBASE: PÁGINA "PREGÚNTALE AL MUSEO"
   Archivo: /public_html/public/css/style.css
   ========================================================= */

.museum-chat-page {
    width: min(100% - 32px, 1100px);
    margin: 0 auto;
    padding: 42px 0 64px;
}

.museum-chat-intro {
    max-width: 780px;
    margin: 0 auto 28px;
    text-align: center;
}

.museum-chat-eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    padding: 6px 12px;
    color: #063f5b;
    background-color: #dff3f7;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.museum-chat-intro h1 {
    margin: 0 0 14px;
    color: #063f5b;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.12;
}

.museum-chat-intro p {
    margin: 0;
    color: #315968;
    font-size: 1.05rem;
    line-height: 1.65;
}

.museum-chat-frame {
    overflow: hidden;
    min-height: 700px;
    background: #ffffff;
    border: 1px solid #b9d5df;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0, 47, 68, 0.14);
}

.museum-chat-frame iframe {
    display: block;
    width: 100%;
    height: 72vh;
    min-height: 700px;
    border: 0;
    background: #ffffff;
}

.museum-chat-notice {
    max-width: 850px;
    margin: 18px auto 0;
    color: #587682;
    font-size: 0.88rem;
    line-height: 1.55;
    text-align: center;
}

/* Vista móvil */
@media (max-width: 767px) {
    .museum-chat-page {
        width: calc(100% - 24px);
        padding: 28px 0 42px;
    }

    .museum-chat-intro {
        margin-bottom: 20px;
    }

    .museum-chat-intro h1 {
        font-size: 2rem;
    }

    .museum-chat-frame {
        min-height: 620px;
        border-radius: 12px;
    }

    .museum-chat-frame iframe {
        height: 74vh;
        min-height: 620px;
    }

    .museum-chat-notice {
        font-size: 0.84rem;
    }
}
/* =========================================================
   MENÚ MÓVIL: CERRADO POR DEFECTO Y CONTROLADO POR HAMBURGUESA
   Archivo: /public_html/public/css/style.css
   ========================================================= */

/* En escritorio, el menú se mantiene visible. */
@media (min-width: 768px) {
    .menu-toggle {
        display: none;
    }

    .main-nav {
        display: flex !important;
    }
}

/* En celular y tablet móvil */
@media (max-width: 767px) {
    .header-container {
        position: relative;
        flex-wrap: nowrap;
    }

    /* El botón hamburguesa debe mostrarse en móvil */
    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /*
     * El nav está cerrado por defecto.
     * !important es necesario porque reglas anteriores probablemente
     * aplican display:flex a .main-nav.
     */
    .main-nav {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        margin: 0 !important;
        padding: 14px;
        background: #ffffff;
        border-top: 1px solid #b9d5df;
        border-bottom: 3px solid #3db6ce;
        box-shadow: 0 10px 18px rgba(0, 33, 48, 0.20);
        z-index: 1200;
    }

    /*
     * Solo se muestra al pulsar el botón hamburguesa.
     */
    .main-nav.is-open {
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .main-nav .nav-dropdown {
        width: 100%;
    }

    .main-nav .nav-home,
    .main-nav .nav-button,
    .main-nav a.nav-button {
        width: 100%;
    }

    /*
     * Animación visual de hamburguesa a X cuando el menú está abierto.
     */
    .menu-toggle.is-open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle.is-open span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.is-open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .menu-toggle span {
        transition: transform 0.2s ease, opacity 0.2s ease;
    }
}