/* =========================================================
   SINUÉS
   Hoja de estilos principal
   ========================================================= */


/* =========================================================
   1. VARIABLES
   ========================================================= */

:root {

    --color-bg: #f7f6f2;
    --color-bg-soft: #eeece5;

    --color-dark: #20221f;
    --color-dark-soft: #30332e;

    --color-text: #292b27;
    --color-text-soft: #696c65;

    --color-white: #ffffff;

    --color-sand: #ddd6c7;

    --color-border: rgba(32, 34, 31, 0.15);

    --container-width: 1200px;
    --container-padding: 32px;

    --section-padding: 120px;

    --font-body:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    --font-heading:
        Georgia,
        "Times New Roman",
        serif;

}


/* =========================================================
   2. RESET
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;

    background: var(--color-bg);
    color: var(--color-text);

    font-family: var(--font-body);
    line-height: 1.6;

    -webkit-font-smoothing: antialiased;

}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

::selection {
    background: var(--color-dark);
    color: var(--color-white);
}


/* =========================================================
   3. CONTAINER
   ========================================================= */

.container {
    width: min(
        calc(100% - (var(--container-padding) * 2)),
        var(--container-width)
    );

    margin-inline: auto;
}


/* =========================================================
   4. TYPOGRAPHY
   ========================================================= */

h1,
h2,
h3 {
    margin-top: 0;

    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.05;
}

h1 {
    font-size: clamp(4rem, 9vw, 8rem);
}

h2 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
}

h3 {
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
}

p {
    margin-top: 0;
    margin-bottom: 1.25rem;
}


/* =========================================================
   5. EYEBROW
   ========================================================= */

.eyebrow {
    margin-bottom: 20px;

    font-size: 0.72rem;
    font-weight: 600;

    letter-spacing: 0.16em;
    text-transform: uppercase;
}


/* =========================================================
   6. SECTIONS
   ========================================================= */

.section {
    padding-block: var(--section-padding);
}

.section--dark {
    background: var(--color-dark);
    color: var(--color-white);
}

.section--sand {
    background: var(--color-sand);
}


/* =========================================================
   7. SECTION HEADINGS
   ========================================================= */

.section-heading {
    margin-bottom: 64px;
}

.section-heading h2 {
    max-width: 750px;
    margin-bottom: 0;
}

.section-heading--light {
    color: var(--color-white);
}

.section-heading--split {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 40px;
}


/* =========================================================
   8. TEXT LINKS
   ========================================================= */

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding-bottom: 4px;

    border-bottom: 1px solid currentColor;

    font-size: 0.9rem;
    font-weight: 600;

    transition: opacity 180ms ease;
}

.text-link:hover {
    opacity: 0.55;
}


/* =========================================================
   9. BUTTONS
   ========================================================= */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 50px;

    padding-inline: 28px;

    border: 1px solid transparent;

    font-size: 0.78rem;
    font-weight: 600;

    letter-spacing: 0.05em;
    text-transform: uppercase;

    transition:
        background-color 180ms ease,
        color 180ms ease,
        border-color 180ms ease;
}

.button--dark {
    background: var(--color-dark);
    color: var(--color-white);
}

.button--dark:hover {
    background: var(--color-dark-soft);
}

.button--light {
    border-color: rgba(255, 255, 255, 0.7);
    color: var(--color-white);
}

.button--light:hover {
    background: var(--color-white);
    color: var(--color-dark);
}


/* =========================================================
   10. HEADER
   ========================================================= */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10000;
    background: rgba(32, 34, 31, 0.96);
    color: var(--color-white);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 90px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}


/* Logo */

.site-logo {
    display: flex;
    flex-direction: column;
}

.site-logo__name {
    margin: 0;

    font-family: var(--font-heading);
    font-size: 1.7rem;
    line-height: 1;
}

.site-logo__location {
    margin-top: 5px;

    font-size: 0.62rem;
    font-weight: 600;

    letter-spacing: 0.14em;
    text-transform: uppercase;

    opacity: 0.75;
}


/* Navegación */

.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.main-nav a {
    position: relative;

    font-size: 0.75rem;
    font-weight: 600;

    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.main-nav a::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: -7px;

    width: 100%;
    height: 1px;

    background: currentColor;

    transform: scaleX(0);
    transform-origin: right;

    transition: transform 200ms ease;
}

.main-nav a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.header-neighbor {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 38px;
    padding: 0 18px;

    border: 1px solid rgba(255, 255, 255, 0.7);

    font-size: 0.68rem;
    font-weight: 600;

    letter-spacing: 0.08em;
    text-transform: uppercase;

    transition:
        background-color 180ms ease,
        color 180ms ease;
}

.header-neighbor:hover {
    background: var(--color-white);
    color: var(--color-dark);
}

/* =========================================================
   11. MOBILE MENU
   ========================================================= */

.menu-toggle {
    display: none;

    width: 44px;
    height: 44px;

    padding: 0;

    border: 0;
    background: transparent;

    color: inherit;

    cursor: pointer;
}

.menu-toggle span {
    display: block;

    width: 24px;
    height: 1px;

    margin: 6px auto;

    background: currentColor;
}


/* =========================================================
   12. HERO
   ========================================================= */

.hero {
    position: relative;

    min-height: calc(100vh - 70px);

    display: flex;
    align-items: center;

    overflow: hidden;

    background-color: #555;

    background-image:
        url("../img/sinues-hero.jpg");

    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}


/* Capa sobre la fotografía */

.hero__overlay {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.58) 0%,
            rgba(0, 0, 0, 0.30) 55%,
            rgba(0, 0, 0, 0.08) 100%
        );
}


/* Contenido */

.hero__content {
    position: relative;
    z-index: 1;

    width: min(
        calc(100% - (var(--container-padding) * 2)),
        var(--container-width)
    );

    margin-inline: auto;

    padding-top: 80px;

    color: var(--color-white);
}

.hero__content h1 {
    margin-bottom: 20px;
}

.hero__claim {
    margin-bottom: 36px;

    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2.6rem);
    line-height: 1.15;
}


/* Información inferior */

.hero__bottom {
    position: absolute;
    z-index: 1;

    right: 0;
    bottom: 0;
    left: 0;

    width: min(
        calc(100% - (var(--container-padding) * 2)),
        var(--container-width)
    );

    margin-inline: auto;

    padding-block: 20px;

    display: flex;
    justify-content: space-between;

    border-top: 1px solid rgba(255, 255, 255, 0.35);

    color: var(--color-white);

    font-size: 0.7rem;
    font-weight: 600;

    letter-spacing: 0.12em;
    text-transform: uppercase;
}


/* =========================================================
   13. INTRO
   ========================================================= */

.intro {
    background: var(--color-bg);
}

.intro__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 100px;
}

.intro h2 {
    max-width: 600px;
}

.intro__text {
    max-width: 520px;

    padding-top: 45px;

    color: var(--color-text-soft);
}

.intro__text p {
    font-size: 1.05rem;
}


/* =========================================================
   14. DISCOVER / IMAGE CARDS
   ========================================================= */

.cards {
    display: grid;

    gap: 24px;
}

.cards--three {
    grid-template-columns: repeat(3, 1fr);
}

.image-card {
    position: relative;

    min-height: 520px;

    display: flex;
    align-items: flex-end;

    overflow: hidden;

    color: var(--color-white);
}

.image-card__image {
    position: absolute;
    inset: 0;

    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;

    transition: transform 500ms ease;
}


/* Fotografías */

.image-card__image--village {
    background-image:
        url("../img/sinues-pueblo.jpg");
}

.image-card__image--mountain {
    background-image:
        url("../img/sinues-montana.jpg");
}

.image-card__image--tradition {
    background-image:
        url("../img/sinues-tradiciones.jpg");
}


/* Zoom */

.image-card:hover .image-card__image {
    transform: scale(1.04);
}


/* Degradado */

.image-card::after {
    content: "";

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            transparent 35%,
            rgba(0, 0, 0, 0.78) 100%
        );

    pointer-events: none;
}


/* Contenido */

.image-card__content {
    position: relative;
    z-index: 1;

    width: 100%;

    padding: 32px;
}

.image-card__content > span {
    display: block;

    margin-bottom: 20px;

    font-size: 0.7rem;
    letter-spacing: 0.15em;
}

.image-card__content h3 {
    margin-bottom: 8px;
}

.image-card__content p {
    margin-bottom: 0;

    opacity: 0.8;
}


/* =========================================================
   15. MEMORY
   ========================================================= */

.memory__grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;

    align-items: center;

    gap: 100px;
}

.memory__image {
    aspect-ratio: 4 / 5;

    overflow: hidden;
}

.memory__image-inner {
    width: 100%;
    height: 100%;

    background-image:
        url("../img/sinues-memoria.jpg");

    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.memory__content {
    max-width: 520px;
}

.memory__content p {
    color: var(--color-text-soft);
}


/* =========================================================
   16. TORREÓN / EXPOSICIÓN
   ========================================================= */

.torreon {
    background: var(--color-bg);
}

.torreon__grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;

    align-items: center;

    gap: 100px;
}

.torreon__content {
    max-width: 520px;
}

.torreon__content h2 {
    margin-bottom: 24px;
}

.torreon__lead {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    line-height: 1.3;
}

.torreon__content > p:not(.eyebrow):not(.torreon__lead) {
    color: var(--color-text-soft);
}

.torreon__image {
    aspect-ratio: 4 / 5;

    overflow: hidden;
}

.torreon__image-inner {
    width: 100%;
    height: 100%;

    background-image:
        url("../img/sinues-torreon.jpg");

    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;

    transition: transform 500ms ease;
}


/* =========================================================
   17. PALOTIAU
   ========================================================= */

.palotiau {
    position: relative;

    min-height: 700px;

    display: flex;
    align-items: center;

    overflow: hidden;

    background: var(--color-dark);
    color: var(--color-white);
}

.palotiau__image {
    position: absolute;
    inset: 0;

    background-image:
        url("../img/sinues-palotiau.jpg");

    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;

    opacity: 0.65;
}

.palotiau::after {
    content: "";

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.68),
            rgba(0, 0, 0, 0.15)
        );
}

.palotiau__content {
    position: relative;
    z-index: 1;

    width: min(
        calc(100% - (var(--container-padding) * 2)),
        var(--container-width)
    );

    margin-inline: auto;
}

.palotiau__content h2 {
    margin-bottom: 20px;
}

.palotiau__lead {
    max-width: 500px;

    font-family: var(--font-heading);
    font-size: 1.6rem;
}


/* =========================================================
   18. NATURE
   ========================================================= */

.nature__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);

    border-top: 1px solid var(--color-border);
}

.nature-card {
    min-height: 300px;

    padding: 40px;

    border-right: 1px solid var(--color-border);

    transition:
        background-color 200ms ease,
        padding-left 200ms ease;
}

.nature-card:last-child {
    border-right: 0;
}

.nature-card:hover {
    background: var(--color-bg-soft);
    padding-left: 38px;
}

.nature-card__number {
    margin-bottom: 70px;

    font-size: 0.7rem;
    font-weight: 600;

    letter-spacing: 0.15em;
}

.nature-card h3 {
    margin-bottom: 12px;
}

.nature-card p {
    max-width: 300px;

    color: var(--color-text-soft);
}

.nature-card > span {
    font-size: 0.8rem;
    font-weight: 600;
}


/* =========================================================
   19. AGENDA
   ========================================================= */

.agenda__item {
    display: grid;

    grid-template-columns:
        90px
        minmax(0, 1fr)
        140px;

    gap: 25px;

    align-items: center;
}



.agenda__item .image-lightbox {
    display: block;

    width: 140px;
    height: 180px;

    overflow: hidden;

    cursor: zoom-in;
}

.agenda__date {
    display: flex;
    flex-direction: column;

    line-height: 1;
}

.agenda__date span {
    font-size: 0.7rem;
    font-weight: 600;

    letter-spacing: 0.1em;
}

.agenda__date strong {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 400;
}

.agenda__item p {
    margin-bottom: 4px;

    font-family: var(--font-heading);
    font-size: 1.4rem;
}

.agenda__item div > span {
    color: var(--color-text-soft);

    font-size: 0.8rem;
}

.agenda__item .image-lightbox img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform 0.25s ease,
        opacity 0.25s ease;
}


.agenda__item .image-lightbox:hover img {
    transform: scale(1.03);

    opacity: 0.85;
}


/* =========================================================
   20. PORTAL VECINO
   ========================================================= */

.neighbors {
    background: var(--color-sand);
}

.neighbors__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 100px;
}

.neighbors__content {
    max-width: 520px;
}

.neighbors__content h2 {
    margin-bottom: 24px;
}

.neighbors__content > p:not(.eyebrow) {
    margin-bottom: 32px;

    color: var(--color-text-soft);
}

.neighbors__info {
    padding: 32px;

    border-top: 1px solid rgba(32, 34, 31, 0.3);
    border-bottom: 1px solid rgba(32, 34, 31, 0.3);
}

.neighbors__number {
    margin-bottom: 50px;

    font-size: 0.7rem;
    font-weight: 600;

    letter-spacing: 0.15em;
}

.neighbors__info h3 {
    margin-bottom: 12px;
}

.neighbors__info p {
    max-width: 420px;

    color: var(--color-text-soft);
}


/* =========================================================
   21. FINAL CTA
   ========================================================= */

.final-cta {
    position: relative;

    min-height: 650px;

    display: flex;
    align-items: center;

    overflow: hidden;

    background: var(--color-dark);
    color: var(--color-white);
}

.final-cta__image {
    position: absolute;
    inset: 0;

    background-image:
        url("../img/sinues-final.jpg");

    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;

    opacity: 0.6;
}

.final-cta::after {
    content: "";

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.58),
            rgba(0, 0, 0, 0.12)
        );
}

.final-cta__content {
    position: relative;
    z-index: 1;

    width: min(
        calc(100% - (var(--container-padding) * 2)),
        var(--container-width)
    );

    margin-inline: auto;
}

.final-cta h2 {
    max-width: 750px;
}


/* =========================================================
   22. FOOTER
   ========================================================= */

.site-footer {
    padding-top: 80px;
    padding-bottom: 30px;

    background: var(--color-dark);
    color: var(--color-white);
}

.site-footer__main {
    display: grid;
    grid-template-columns: 1fr 2fr;

    gap: 100px;

    padding-bottom: 80px;
}

.site-footer__brand > p:last-child {
    margin-top: 20px;

    color: rgba(255, 255, 255, 0.6);
}

.site-footer__nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 40px;
}

.site-footer__title {
    margin-bottom: 20px;

    font-size: 0.7rem;
    font-weight: 600;

    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.site-footer__nav a {
    display: block;

    margin-bottom: 9px;

    color: rgba(255, 255, 255, 0.65);

    font-size: 0.85rem;

    transition: color 180ms ease;
}

.site-footer__nav a:hover {
    color: var(--color-white);
}

.site-footer__bottom {
    display: flex;
    justify-content: space-between;

    padding-top: 20px;

    border-top: 1px solid rgba(255, 255, 255, 0.2);

    color: rgba(255, 255, 255, 0.45);

    font-size: 0.7rem;
}

.site-footer__links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
}

.site-footer__links a {
    color: inherit;
    text-decoration: none;
    padding: 0 0.8rem;
    transition: opacity 0.2s ease;
}

.site-footer__links a:hover {
    opacity: 0.7;
}


/* Separadores entre enlaces */

.site-footer__links a + a {
    border-left: 1px solid rgba(255, 255, 255, 0.25);
}


/* Móvil */

@media (max-width: 768px) {

    .site-footer__links {
        flex-direction: column;
        gap: 0.6rem;
    }

    .site-footer__links a {
        padding: 0;
    }

    .site-footer__links a + a {
        border-left: none;
    }

}

/* =========================================================
   23. TABLET
   ========================================================= */

@media (max-width: 900px) {

    :root {
        --container-padding: 24px;
        --section-padding: 90px;
    }


    /* Header */

    .main-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }


    /* Intro */

    .intro__grid {
        grid-template-columns: 1fr;

        gap: 20px;
    }

    .intro__text {
        padding-top: 0;
    }


    /* Discover */

    .cards--three {
        grid-template-columns: 1fr;
    }

    .image-card {
        min-height: 450px;
    }


    /* Memory */

    .memory__grid {
        grid-template-columns: 1fr;

        gap: 50px;
    }


    /* Torreón */

    .torreon__grid {
        grid-template-columns: 1fr;

        gap: 50px;
    }

    .torreon__image {
        max-width: 650px;
    }


    /* Nature */

    .nature__grid {
        grid-template-columns: 1fr;
    }

    .nature-card {
        min-height: auto;

        border-right: 0;
        border-bottom: 1px solid var(--color-border);
    }

    .nature-card:last-child {
        border-bottom: 0;
    }

    .nature-card__number {
        margin-bottom: 35px;
    }


    /* Portal vecino */

    .neighbors__grid {
        grid-template-columns: 1fr;

        gap: 60px;
    }


    /* Footer */

    .site-footer__main {
        grid-template-columns: 1fr;

        gap: 60px;
    }

}


/* =========================================================
   24. MOBILE
   ========================================================= */

@media (max-width: 600px) {

    :root {
        --container-padding: 20px;
        --section-padding: 70px;
    }


    /* Typography */

    h1 {
        font-size: clamp(3.5rem, 18vw, 5.5rem);
    }

    h2 {
        font-size: clamp(2.3rem, 11vw, 3.5rem);
    }


    /* Header */

    .site-header__inner {
        min-height: 75px;
    }


    /* Hero */

    .hero {
        min-height: 100svh;

        background-position: 60% center;
    }

    .hero__content {
        padding-top: 50px;
    }

    .hero__claim {
        font-size: 1.5rem;
    }

    .hero__bottom {
        font-size: 0.6rem;
    }


    /* Section headings */

    .section-heading {
        margin-bottom: 45px;
    }

    .section-heading--split {
        align-items: flex-start;

        flex-direction: column;

        gap: 20px;
    }


    /* Cards */

    .image-card {
        min-height: 400px;
    }


    /* Memory */

    .memory__image {
        aspect-ratio: 4 / 5;
    }


    /* Torreón */

    .torreon__image {
        aspect-ratio: 4 / 5;
    }


    /* Portal vecino */

    .neighbors__info {
        padding: 24px;
    }


    /* Agenda */

    .agenda__item {
        grid-template-columns: 70px 1fr;

        gap: 20px;
    }

    .agenda__arrow {
        display: none;
    }


    /* Footer */

    .site-footer__nav {
        grid-template-columns: 1fr 1fr;

        gap: 40px 20px;
    }

    .site-footer__bottom {
        flex-direction: column;

        gap: 8px;
    }

}

/* =========================================================
   PORTAL VECINO
   ========================================================= */

/* ============================================================
   PÁGINA DE LOGIN
============================================================ */

.login-page {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 2rem 1.25rem;

    box-sizing: border-box;
}


.login-box {
    width: 100%;
    max-width: 460px;

    box-sizing: border-box;
}

body:has(.login-page) {
    padding-top: 0;
}


/* ============================================================
   AJUSTE PARA ESCRITORIO
============================================================ */

@media (min-width: 769px) {

    .login-page {
        min-height: calc(100vh - 90px);
    }

}


/* ============================================================
   MÓVIL
============================================================ */

@media (max-width: 768px) {

    .login-page {
        min-height: calc(100vh - 75px);

        padding: 1.5rem 1rem;
    }

}

/* ---------- FORMULARIOS ---------- */

.form-field {
    margin-bottom: 22px;
}

.form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid #d5d0c7;
    background: #fff;
    color: #222;
    font-family: inherit;
    font-size: 1rem;
    border-radius: 0;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #333;
}


/* ---------- ERROR LOGIN ---------- */

.login-error {
    margin-bottom: 25px;
    padding: 14px 16px;
    background: #f8e7e5;
    color: #8a2d25;
    border-left: 4px solid #8a2d25;
}


/* ---------- BOTÓN PRINCIPAL ---------- */

.login-box .button {
    display: inline-block;
    width: 100%;
    padding: 14px 24px;
    border: none;
    text-align: center;
    text-decoration: none;
    cursor: pointer;

    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;

    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

.login-box .button--dark {
    background: #222;
    color: #fff;
}

.login-box .button--dark:hover {
    background: #444;
    color: #fff;
    transform: translateY(-2px);
}


/* ---------- VOLVER ---------- */

.login-back {
    display: inline-block;
    margin-top: 30px;

    color: #444;
    font-size: 0.9rem;
    text-decoration: none;

    border-bottom: 1px solid #aaa;
    padding-bottom: 3px;
}

.login-back:hover {
    color: #000;
    border-color: #000;
}


/* =========================================================
   CABECERA DEL PORTAL
   ========================================================= */

.site-header .container {
    gap: 25px;
}


.site-header__right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.site-header__user {
    color: #ddd;
    font-size: 0.9rem;
}

.site-header__user small {
    color: #aaa;
}


/* Botón salir */



/* =========================================================
   TARJETAS DEL PORTAL
   ========================================================= */

.portal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;

    margin-top: 45px;
}

.portal-card {
    display: block;

    padding: 35px;

    background: #f3f0e9;
    border: 1px solid #ded9d0;

    color: #222;
    text-decoration: none;

    transition:
        transform 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease;
}

.portal-card:hover {
    transform: translateY(-4px);

    background: #e9e5dc;
    border-color: #c8c1b6;

    color: #222;
}


.portal-card__number {
    display: block;

    margin-bottom: 25px;

    color: #777;

    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}


.portal-card h2 {
    margin: 0 0 12px;

    color: #222;
    font-size: 1.5rem;
}


.portal-card p {
    margin: 0;

    color: #666;
    line-height: 1.6;
}


/* Tarjeta de administración */

.portal-card--admin {
    background: #222;
    border-color: #222;
    color: #fff;
}

.portal-card--admin:hover {
    background: #333;
    border-color: #333;
    color: #fff;
}

.portal-card--admin h2 {
    color: #fff;
}

.portal-card--admin p {
    color: #ccc;
}

.portal-card--admin .portal-card__number {
    color: #aaa;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 700px) {

    .login-box {
        padding: 35px 25px;
    }

    .portal-grid {
        grid-template-columns: 1fr;
    }

    .portal-card {
        padding: 28px;
    }

}

/* ============================================================
   WEBCAMS — CONTROL ÚNICO Y VISOR RESPONSIVE
============================================================ */

.webcam-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    margin-left: auto;
    margin-right: 12px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.30);
    border-radius: 50%;
    background: transparent;
    color: var(--color-white);
    cursor: pointer;
    transition: background-color 180ms ease, border-color 180ms ease;
}

.webcam-toggle:hover {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.60);
}

.webcam-toggle:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.webcam-toggle__icon {
    position: absolute;
    width: 24px;
    height: 24px;
    display: block;
    transition: opacity 180ms ease, transform 180ms ease;
}

.webcam-toggle__icon--camera {
    opacity: 1;
    transform: scale(1);
}

.webcam-toggle__icon--close {
    opacity: 0;
    transform: scale(0.70);
}

.webcam-toggle[aria-expanded="true"] .webcam-toggle__icon--camera {
    opacity: 0;
    transform: scale(0.70);
}

.webcam-toggle[aria-expanded="true"] .webcam-toggle__icon--close {
    opacity: 1;
    transform: scale(1);
}

.webcam-viewer {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 24px 30px;
    background: rgba(0, 0, 0, 0.90);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 180ms ease, visibility 180ms ease;
}

.webcam-viewer.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.webcam-viewer__inner {
    width: min(1400px, 100%);
    max-height: calc(100vh - 110px);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: center;
}

.webcam-viewer__item {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--color-white);
}

.webcam-viewer__item span {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.webcam-viewer__item a {
    display: block;
    min-width: 0;
}

.webcam-viewer__item img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: calc(100vh - 180px);
    object-fit: contain;
    background: #111;
    border-radius: 4px;
}

.webcam-viewer__close {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--color-white);
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
}

.webcam-viewer__close:hover {
    opacity: 0.70;
}

@media (max-width: 768px) {

    .webcam-toggle {
        margin-right: 4px;
    }

    .webcam-viewer {
        align-items: flex-start;
        overflow-y: auto;
        padding: 70px 0 20px;
    }

    .webcam-viewer__inner {
        width: 100%;
        grid-template-columns: 1fr;
        gap: 18px;
        max-height: none;
    }

    .webcam-viewer__item span {
        padding-inline: 12px;
    }

    .webcam-viewer__item img {
        width: 100%;
        max-width: none;
        max-height: none;
        border-radius: 0;
    }

    .webcam-viewer__close {
        top: 14px;
        right: 12px;
    }
}

.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(32, 34, 31, 0.92);
    color: var(--color-white);
    font-size: 21px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 180ms ease, visibility 180ms ease, transform 180ms ease;
    z-index: 10001;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
}

/* ============================================================
   RESPONSIVE HEADER / HERO
   ============================================================ */

@media (max-width: 768px) {

    body {
        padding-top: 75px;
    }

    .site-header__inner {
        min-height: 75px;
    }

    .hero {
        min-height: calc(100svh - 75px);
    }

    .back-to-top {
        right: 16px;
        bottom: 16px;
        width: 42px;
        height: 42px;
        font-size: 19px;
    }
}

@media (min-width: 769px) {

    body {
        padding-top: 90px;
    }

    .hero {
        min-height: calc(100vh - 90px);
    }
}

/* ============================================================
   IMÁGENES DE LA AGENDA
============================================================ */

.agenda__item > div:nth-child(2) {
    min-width: 0;
}

.agenda__image {
    width: 110px;
    height: 75px;

    float: right;

    margin-left: 25px;
    margin-bottom: 10px;

    object-fit: cover;
}


.agenda__description {
    display: block;

    max-width: 650px;

    margin-top: 8px;

    color: var(--color-text-soft);
    font-size: 0.85rem;
}


.agenda__empty {
    padding-block: 30px;

    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);

    color: var(--color-text-soft);
}


.agenda__empty p {
    margin-bottom: 0;
}


@media (max-width: 768px) {

    .agenda__image {
        width: 90px;
        height: 65px;

        margin-left: 15px;
    }

}

/* ============================================================
   VISOR DE IMÁGENES
============================================================ */

.image-lightbox {
    display: inline-block;
    cursor: zoom-in;
}


.admin-image-current {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 15px;
}


.admin-current-image {
    display: block;

    max-width: 180px;
    max-height: 220px;

    object-fit: contain;
}


.image-lightbox-overlay {
    position: fixed;

    inset: 0;

    z-index: 20000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px;

    background: rgba(0, 0, 0, 0.88);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;
}


.image-lightbox-overlay.is-open {
    opacity: 1;
    visibility: visible;
}


.image-lightbox-overlay img {
    display: block;

    max-width: 95vw;
    max-height: 90vh;

    width: auto;
    height: auto;

    object-fit: contain;
}


.image-lightbox-close {
    position: absolute;

    top: 20px;
    right: 25px;

    width: 45px;
    height: 45px;

    border: 0;
    border-radius: 50%;

    background: transparent;
    color: white;

    font-size: 35px;
    line-height: 1;

    cursor: pointer;
}


.image-lightbox-close:hover {
    opacity: 0.7;
}


/* ============================================================
   IMAGEN EN EL LISTADO ADMIN
============================================================ */

.admin-event__image {
    display: block;

    width: 70px;
    height: 70px;

    object-fit: cover;

    margin-bottom: 10px;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}


.admin-event__image:hover {
    opacity: 0.8;
    transform: scale(1.03);
}


/* ============================================================
   MÓVIL
============================================================ */

@media (max-width: 768px) {

    .admin-image-current {
        display: block;
    }


    .admin-current-image {
        max-width: 150px;
        margin-bottom: 10px;
    }


    .image-lightbox-overlay {
        padding: 15px;
    }


    .image-lightbox-close {
        top: 10px;
        right: 12px;
    }

}

/* ============================================================
PÁGINA DE AGENDA
============================================================ */

.agenda-page {
padding-bottom: 80px;
}

.agenda-intro {
padding: 80px 0 60px;
}

.agenda-intro h1 {
margin-bottom: 20px;
}

.agenda-intro__text {
max-width: 650px;
font-size: 1.1rem;
line-height: 1.7;
}


/* ============================================================
SECCIONES
============================================================ */

.agenda-section {
padding: 50px 0;
}

.agenda-section__heading {
margin-bottom: 35px;
}

.agenda-section__heading h2 {
margin-bottom: 15px;
}

.agenda-section__heading > p:last-child {
max-width: 650px;
}

/* ============================================================
PRÓXIMOS EVENTOS
============================================================ */

.agenda-list {
display: flex;
flex-direction: column;
gap: 20px;
}

.agenda-event {
display: grid;

grid-template-columns:
    80px
    minmax(0, 1fr)
    180px;

gap: 30px;

align-items: start;

padding: 30px 0;

border-top: 1px solid rgba(0, 0, 0, 0.12);

}

.agenda-event:last-child {
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.agenda-event__date {
display: flex;
flex-direction: column;
align-items: flex-start;


line-height: 1;


}

.agenda-event__day {
font-size: 3rem;
font-weight: 600;
}

.agenda-event__month {
margin-top: 7px;


font-size: 0.8rem;
font-weight: 700;
letter-spacing: 0.12em;


}

.agenda-event__content h3 {
margin: 0 0 8px;
}

.agenda-event__meta {
margin: 0 0 15px;


font-size: 0.9rem;
opacity: 0.7;


}

.agenda-event__description {
max-width: 650px;


line-height: 1.65;


}

.agenda-event__image {
display: block;


width: 180px;
height: 220px;

overflow: hidden;


}

.agenda-event__image img {
width: 100%;
height: 100%;


object-fit: cover;

transition:
    transform 0.25s ease,
    opacity 0.25s ease;


}

.agenda-event__image:hover img {
transform: scale(1.03);
opacity: 0.85;
}

/* ============================================================
SIN EVENTOS
============================================================ */

.agenda-empty {
padding: 35px;


border: 1px solid rgba(0, 0, 0, 0.12);


}

.agenda-empty p {
margin: 0;
}

.agenda-empty p + p {
margin-top: 8px;
opacity: 0.65;
}

/* ============================================================
ARCHIVO
============================================================ */

.agenda-archive {
margin-top: 30px;


background: rgba(0, 0, 0, 0.025);


}

.agenda-year {
margin-top: 55px;
}

.agenda-year__title {
margin-bottom: 20px;


font-size: 2rem;


}

.agenda-archive-list {
border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.agenda-archive-event {
display: grid;


grid-template-columns:
    100px
    minmax(0, 1fr)
    130px;

gap: 25px;

align-items: start;

padding: 22px 0;

border-bottom: 1px solid rgba(0, 0, 0, 0.12);


}

.agenda-archive-event__date {
font-size: 0.85rem;
font-weight: 600;


opacity: 0.65;


}

.agenda-archive-event__content h4 {
margin: 0 0 5px;


font-size: 1.1rem;


}

.agenda-archive-event__content p {
margin: 0;


font-size: 0.9rem;
opacity: 0.7;


}

.agenda-archive-event__description {
margin-top: 10px !important;


line-height: 1.6;

opacity: 0.8 !important;


}

.agenda-archive-event__image {
display: block;


width: 130px;
height: 160px;

overflow: hidden;


}

.agenda-archive-event__image img {
width: 100%;
height: 100%;


object-fit: cover;

transition:
    transform 0.25s ease,
    opacity 0.25s ease;


}

.agenda-archive-event__image:hover img {
transform: scale(1.03);
opacity: 0.85;
}

/* ============================================================
MÓVIL
============================================================ */

@media (max-width: 768px) {


.agenda-intro {
    padding: 50px 0 35px;
}


.agenda-section {
    padding: 35px 0;
}


.agenda-event {
    grid-template-columns:
        55px
        minmax(0, 1fr);

    gap: 18px;
}


.agenda-event__day {
    font-size: 2.2rem;
}


.agenda-event__image {
    grid-column: 2;

    width: 100%;
    max-width: 220px;

    height: 260px;

    margin-top: 5px;
}


.agenda-archive-event {
    grid-template-columns:
        75px
        minmax(0, 1fr);
}


.agenda-archive-event__image {
    grid-column: 2;

    width: 120px;
    height: 150px;

    margin-top: 10px;
}


.agenda-archive {
    margin-top: 10px;
}


.image-lightbox-overlay {
    padding: 15px;
}


.image-lightbox-overlay img {
    max-width: 96vw;
    max-height: 85vh;
}


.image-lightbox-close {
    top: 10px;
    right: 12px;
}

}
/* ============================================================
   ENLACES DE INTERÉS — FOOTER
============================================================ */

.site-footer__links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.site-footer__links a {
    position: relative;
    padding: 0 18px;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.site-footer__links a:hover {
    opacity: 0.70;
}

.site-footer__links a + a {
    border-left: 1px solid rgba(255, 255, 255, 0.25);
}

@media (max-width: 768px) {

    .site-footer__links {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-top: 20px;
    }

    .site-footer__links a {
        display: block;
        padding: 12px 16px;
        text-align: center;
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 6px;
    }

    .site-footer__links a + a {
        border-left: 1px solid rgba(255, 255, 255, 0.18);
    }
}
/* ============================================================
   VISOR CARTOGRÁFICO
============================================================ */

.carto-intro {
padding: 80px 0 60px;
}

.carto-map-section {
    width: 100%;
    padding: 20px 0 80px;
}

.carto-map-frame {
    width: calc(100% - 120px);
    max-width: 1200px;
    margin: 0 auto;
}

#map {
    width: 100%;
    height: 600px;
    border-radius: 8px;
    overflow: hidden;
}
.carto__grid {
    display: grid;
    grid-template-columns: 1 fr 1fr;
    border-top: 1px solid var(--color-border);
}
.carto__grid__first {
    grid-column: 1 / 3;
}

/* ============================================================
   TABLET
============================================================ */

@media (max-width: 1000px) {

    .carto-map-frame {
        width: calc(100% - 60px);
    }

}


/* ============================================================
   MÓVIL
============================================================ */

@media (max-width: 768px) {

    .carto-map-section {
        padding: 10px 0 50px;
    }

    .carto-map-frame {
        width: calc(100% - 30px);
    }

    #map {
        height: 500px;
        border-radius: 6px;
    }

}