/* ==========================================================================
   DESARMADOS · Sistema visual moderno compartido (theme.css)
   Modernización de todas las páginas y modales conservando la línea gráfica.
   Solo CSS: no altera el markup ni los hooks de JS (isotope, parallax,
   magnific popup, Leaflet). Se carga después de main.css para sobreescribir.
   ========================================================================== */

:root {
    --d-accent:      #bd1622;
    --d-accent-dark: #91101a;
    --d-blue:        #1e408f;
    --d-yellow:      #ffec00; /* amarillo de marca: acento del hero, igual que el home */
    --d-ink:         #1a1a1a;
    --d-dark:        #202121;
    --d-text:        #3a3a3a;
    --d-muted:       #8a8a8a;
    --d-line:        #e4e4e4;
    --d-bg:          #ececec;
    --d-card:        #ffffff;
    --d-display:     'Futura-Condensed-Medium', 'Helvetica-Bold', Arial, sans-serif;
    --d-body:        'Helvetica Light', Arial, Helvetica, sans-serif;
    --d-radius:      12px;
    --d-shadow:      0 6px 24px rgba(0,0,0,.08);
    --d-shadow-hover:0 16px 40px rgba(0,0,0,.16);
}

/* ==========================================================================
   0. ACCESIBILIDAD Y BASE
   ========================================================================== */

html { scroll-behavior: smooth; }

/* Foco visible solo para navegación por teclado */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.hamburger:focus-visible {
    outline: 3px solid var(--d-accent);
    outline-offset: 2px;
    border-radius: 3px;
}

/* Texto solo para lectores de pantalla */
.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Respeta la preferencia de menos movimiento del sistema operativo */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   1. HERO / PORTADAS DE PÁGINA  (.cover-page)
   ========================================================================== */

.cover-page {
    height: 460px;
    position: relative;
    overflow: hidden;
}

/* Velo degradado para legibilidad del título sobre la imagen */
.cover-page::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.55) 100%);
    z-index: 10;
    pointer-events: none;
}

.cover-page .dtzi { z-index: 20; }

/* Título del hero: se conserva el carácter (Helvetica Light espaciada) pero
   con un interletrado más contenido, sombra y tamaño responsive */
.stylesMaintitle h1 {
    font-size: 64px;
    letter-spacing: 18px;
    text-shadow: 0 2px 18px rgba(0,0,0,.35);
    margin: 0;
    padding-left: 0;
    text-indent: 0.14em; /* media unidad de letter-spacing: centra el título y su acento */
}

.stylesMaintitle-small h1 { font-size: 46px; letter-spacing: 12px; }

/* Acento bajo el título — rojo de marca, corto y pegado al título */
.cover-page .stylesMaintitle::after {
    content: "";
    display: block;
    width: 44px;
    height: 3px;
    background: var(--d-accent);
    margin: 14px auto 0;
    border-radius: 4px;
}

/* ==========================================================================
   2. TÍTULOS DE SECCIÓN  (.page-maincaption)
   ========================================================================== */

.page-maincaption { margin: 40px 0 34px; }

/* Títulos de sección (no aplica a la intro de Contacto, que es un párrafo) */
.page-maincaption:not(.contact) h2 {
    font-size: 30px;
    letter-spacing: 3px;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    padding-bottom: 14px;
}

.page-maincaption:not(.contact) h2::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--d-accent);
    border-radius: 3px;
}

.page-respuestas h2::after { background: var(--d-blue); }

/* Intro de Contacto: párrafo legible y centrado dentro del ancho del formulario */
.page-maincaption.contact { text-align: center; }
.page-maincaption.contact h2 {
    display: inline-block;
    max-width: 640px;
    text-align: center;
    line-height: 1.5;
    font-family: var(--d-body);
}

/* ==========================================================================
   3. BOTONES COMPARTIDOS  (.searchonmap, .item-pdf a)
   ========================================================================== */

.searchonmap,
.item-pdf a {
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-size: 16px;
    padding: 11px 26px;
    box-shadow: 0 6px 16px rgba(189,22,34,.28);
    transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease;
}

.searchonmap:hover,
.item-pdf a:hover {
    opacity: 1;
    background-color: var(--d-accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(189,22,34,.34);
}

/* ==========================================================================
   4. CONTENEDOR DE CONTENIDO CON SOLAPE  (.themarforbread)
   ========================================================================== */

.themarforbread {
    border-radius: var(--d-radius);
    box-shadow: var(--d-shadow);
    padding: 40px;
    position: relative;
    z-index: 30;
}

/* ==========================================================================
   5. MATERIAL PEDAGÓGICO  (.list-pdf / .item-pdf)
   ========================================================================== */

.list-pdf {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 26px;
}

.item-pdf {
    position: relative;
    background: #fff;
    border: 1px solid var(--d-line);
    border-radius: var(--d-radius);
    padding: 32px 28px 30px;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

/* Franja de acento superior */
.item-pdf::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--d-accent);
}

.item-pdf:hover {
    transform: translateY(-4px);
    box-shadow: var(--d-shadow);
    border-color: rgba(189,22,34,.30);
}

.item-pdf h2 {
    font-size: 22px;
    line-height: 1.2;
    padding-left: 60px;
    min-height: 46px;
    display: flex;
    align-items: center;
    position: relative;
    margin-bottom: 14px;
}

/* Icono PDF en badge rojo redondeado */
.item-pdf h2::before {
    content: "\f1c1"; /* fa-file-pdf-o */
    font-family: 'FontAwesome';
    position: absolute;
    left: 0;
    top: 0;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(189,22,34,.10);
    color: var(--d-accent);
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color .3s ease, color .3s ease;
}

.item-pdf:hover h2::before {
    background: var(--d-accent);
    color: #fff;
}

.item-pdf p { flex: 1 1 auto; margin-bottom: 22px; line-height: 1.65; }

.item-pdf a { align-self: flex-start; width: auto; }

.item-pdf a::after {
    content: "\f08e"; /* fa-external-link */
    font-family: 'FontAwesome';
    margin-left: 8px;
    font-size: 13px;
}

/* ==========================================================================
   6. QUIÉNES SOMOS  (tarjetas de personas)
   ========================================================================== */

.quienes-somos > img { width: 210px; margin-bottom: 8px; }

/* Una persona por fila, en columna */
.quienes-somos ul {
    display: flex;
    flex-direction: column;
    gap: 30px;
    font-size: 16px;
    margin-top: 44px;
}

/* Fila: imagen a un lado, contenido al otro (alterna en even/odd).
   height:auto anula la igualación de alturas del JS (pensada para 3 columnas). */
.quienes-somos ul li {
    width: 100%;
    height: auto !important;
    margin: 0;
    display: grid;
    grid-template-columns: 40% 1fr;
    grid-template-rows: 1fr auto auto 1fr;
    grid-template-areas:
        "img ."
        "img content"
        "img handle"
        "img .";
    background: var(--d-card);
    color: var(--d-text);
    border-radius: var(--d-radius);
    overflow: hidden;
    box-shadow: var(--d-shadow);
    transition: transform .35s ease, box-shadow .35s ease, visibility 0s, opacity .5s linear;
}

/* Filas pares: imagen a la derecha */
.quienes-somos ul li:nth-child(even) {
    grid-template-columns: 1fr 40%;
    grid-template-areas:
        ". img"
        "content img"
        "handle img"
        ". img";
}

.quienes-somos ul li:hover { box-shadow: var(--d-shadow-hover); }

.quienes-somos ul li .image {
    grid-area: img;
    height: 100%;
    min-height: 360px;
    background-size: cover;
    background-position: center;
    transition: transform .5s ease;
    transform: scale(1);
}
.quienes-somos ul li:hover .image { transform: scale(1.06); }

.quienes-somos .quienes-somos-content {
    grid-area: content;
    padding: 0 52px;
    text-align: left;
}

.quienes-somos ul li h3 {
    font-size: 1.55em;
    color: var(--d-ink);
    letter-spacing: .5px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    position: relative;
    text-align: left;
}

/* Acento bajo el nombre, alineado a la izquierda */
.quienes-somos ul li h3::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 44px;
    height: 3px;
    border-radius: 3px;
    background: var(--d-accent);
}

.quienes-somos ul li p {
    color: var(--d-text);
    font-family: var(--d-body);
    font-size: 16px;
    line-height: 1.75;
    letter-spacing: normal;
    text-align: left;
}

.quienes-somos ul li a {
    grid-area: handle;
    position: static;
    width: auto;
    display: inline-flex;
    align-items: center;
    color: var(--d-accent);
    font-family: var(--d-display);
    letter-spacing: 1px;
    padding: 18px 52px 0;
}

.quienes-somos ul li a img {
    max-height: 16px;
    margin-right: 6px;
    filter: brightness(0) saturate(100%) invert(13%) sepia(86%) saturate(4000%) hue-rotate(348deg) brightness(85%) contrast(95%);
}

/* Móvil: una sola columna, imagen arriba y contenido abajo */
@media (max-width: 767px) {
    .quienes-somos ul li,
    .quienes-somos ul li:nth-child(even) {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        grid-template-areas:
            "img"
            "content"
            "handle";
    }
    .quienes-somos ul li .image { min-height: 280px; }
    .quienes-somos .quienes-somos-content { padding: 28px 26px 0; }
    .quienes-somos ul li a { padding: 16px 26px 28px; }
}

/* ==========================================================================
   7. PROTAGONISTAS · grilla (isotope) y overlay
   ========================================================================== */

/* Gap entre tarjetas: el margin lo da el grid-item (isotope lo mide en el outerWidth).
   Antes el espacio lo daba el padding del img, que quitamos para el zoom contenido. */
.grid-item { margin: 8px; }

.gridItem-inner { border-radius: var(--d-radius); overflow: hidden; box-shadow: var(--d-shadow); }

/* La imagen llena el contenedor (sin el marco de 8px) para que el zoom
   quede recortado por el overflow:hidden y no se salga de la tarjeta */
.grid-item img {
    display: block;
    width: 100%;
    height: 250px;
    padding: 0;
    object-fit: cover;
    transition: transform .5s ease, filter .4s ease;
}

/* Solo crece la imagen, nunca la tarjeta. Zoom suave y contenido. */
.grid-item:hover img { transform: scale(1.06); filter: none; }

/* Overlay hover: degradado oscuro limpio (sin inundar de color).
   El color de sección queda como acento fino, no como fondo. */
.overLay {
    left: 0; top: 0; right: 0; bottom: 0;
    background-image: none;
    background-color: transparent;
    background: linear-gradient(to top, rgba(8,8,8,.92) 0%, rgba(8,8,8,.60) 45%, rgba(8,8,8,.34) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    --ov-accent: var(--d-accent);
}

.overLay.blue {
    background-color: transparent; /* anula el azul de main.css; solo cambia el acento */
    --ov-accent: var(--d-blue);
}

/* Icono central: aro blanco translúcido (sobrio) */
.overLay-icon span {
    position: static;
    width: 54px;
    height: 54px;
    border: 2px solid rgba(255,255,255,.9);
    background-color: rgba(255,255,255,.10);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: background-color .25s ease, border-color .25s ease;
}

.grid-item:hover .overLay-icon span {
    background-color: var(--ov-accent);
    border-color: var(--ov-accent);
}

.overLay .dt, .overLay .dtc { display: block; height: auto; width: auto; }
.overLay i { font-size: 22px; line-height: 1; }

/* El triángulo de play se ve corrido a la izquierda (peso óptico):
   lo empujamos ~2px a la derecha para centrarlo en el círculo */
.overLay i.fa-play { transform: translateX(2px); }

.overLay h3 {
    letter-spacing: 1.5px;
    font-size: 16px;
    margin: 0;
    padding: 0 10px;
}

/* Acento fino bajo el nombre, color según sección */
.overLay h3::after {
    content: "";
    display: block;
    width: 32px;
    height: 3px;
    border-radius: 3px;
    background: var(--ov-accent);
    margin: 11px auto 0;
}

.overLay p {
    position: static;
    width: auto;
    padding: 10px 12px 0;
    font-size: 15px;
    letter-spacing: 0.04em;
    font-family: var(--d-display);
    opacity: .9;
}

/* --- Móvil: sin hover, la capa se muestra siempre como pie sobre la imagen.
   Anula el layout relativo de main.css que dejaba un hueco negro bajo la foto. --- */
@media (max-width: 767px) {
    /* Separación de los bordes de la pantalla */
    .wrapperGrid {
        box-sizing: border-box;
        padding-left: 16px;
        padding-right: 16px;
    }
    /* Isotope fija el contenedor a 400px (ancho de escritorio) y se desborda.
       En móvil lo apagamos: una sola columna en flujo normal. Los !important
       ganan sobre los estilos inline que isotope reinyecta cada segundo. */
    .grid {
        width: 100% !important;
        height: auto !important;
    }
    .grid-item {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        width: 100% !important;
        margin: 0 0 16px;
    }
    .grid-item img {
        width: 100%;
        height: 220px;
        padding: 0;
        margin: 0;
        object-fit: cover;
    }
    .grid-item:hover img {
        transform: none; /* en móvil no aplica el zoom */
    }
    .overLay {
        position: absolute;
        opacity: 1;
        left: 0; top: 0; right: 0; bottom: 0;
        margin: 0;
        padding: 0 16px 18px;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
        background: linear-gradient(to top, rgba(8,8,8,.9) 0%, rgba(8,8,8,.28) 55%, rgba(8,8,8,0) 100%);
    }
    .overLay-icon span {
        position: static;
        width: 46px;
        height: 46px;
        margin: 0 0 10px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .overLay i { font-size: 18px; }
    .overLay h3 {
        display: block;
        font-size: 15px;
        letter-spacing: 1.2px;
        padding: 0;
    }
    .overLay p {
        position: static;
        font-size: 14px;
        padding: 8px 0 0;
    }
}

/* ==========================================================================
   8. PORTADA / FRONT-PAGE
   ========================================================================== */

.contentVideo { overflow: hidden; }

/* El banner de "Tu historia" va al ras: con el header flotante ya no hace
   falta el margin-top que lo separaba del header fijo anterior */
.contentVideo.video-tu-historia { margin-top: 0; }

.contentVideo::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.45));
    z-index: 1;
}

/* Video de fondo (archivo subido) reproducido en bucle con su póster */
.contentVideo .bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.contentVideo .maintitle-top,
.contentVideo .styles-playVideo { z-index: 92; }

.titlehomevideo h1 { text-shadow: 0 2px 20px rgba(0,0,0,.45); }

/* Botón de play moderno (glass + triángulo + pulso), igual que el hero del home.
   Sitewide: aplica a "Tu historia" y demás; el home usa su propia copia en home.css. */
.styles-playVideo {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background-image: none;
    background-color: rgba(0,0,0,.35);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255,255,255,.85);
    box-shadow: 0 10px 30px rgba(0,0,0,.4);
    transition: transform .3s ease, background-color .25s ease, border-color .25s ease;
}

/* Triángulo de play en CSS */
.styles-playVideo::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-42%, -50%);
    border-style: solid;
    border-width: 13px 0 13px 22px;
    border-color: transparent transparent transparent #fff;
    transition: border-left-color .25s ease;
}

/* Anillo pulsante */
.styles-playVideo::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.5);
    animation: playPulseTheme 2.4s ease-out infinite;
    pointer-events: none;
}

.styles-playVideo:hover {
    transform: scale(1.08);
    background-color: rgba(0,0,0,.5);
    border-color: var(--d-yellow);
}

.styles-playVideo:hover::before { border-left-color: var(--d-yellow); }

@keyframes playPulseTheme {
    0%   { transform: scale(1);   opacity: .7; }
    70%  { transform: scale(1.4); opacity: 0; }
    100% { transform: scale(1.4); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .styles-playVideo::after { animation: none; opacity: 0; }
    .styles-playVideo:hover { transform: none; }
}

.fooHome h2 { font-size: 30px; letter-spacing: 2px; }

/* ==========================================================================
   9. MODALES  (.innerModal, .titleAndclose, etc.)  protagonista / historia
   ========================================================================== */

.innerModal {
    border-radius: var(--d-radius);
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0,0,0,.45);
    max-width: 640px;
    width: 92%;
}

.titleAndclose {
    background: var(--d-dark);
    padding: 22px 56px 22px 24px;
}

.titleAndclose h1, .titleAndclose h2 {
    font-family: var(--d-display);
    font-size: 22px;
    letter-spacing: .5px;
}

/* Botón de cierre moderno (círculo con ×), sustituye la imagen PNG */
.titleAndclose span {
    width: 34px;
    height: 34px;
    top: 50%;
    transform: translateY(-50%);
    right: 16px;
    background-image: none;
    background-color: rgba(255,255,255,.12);
    border-radius: 50%;
    transition: background-color .25s ease;
}

.titleAndclose span::before {
    content: "\f00d"; /* fa-times */
    font-family: 'FontAwesome';
    color: #fff;
    font-size: 16px;
    line-height: 34px;
    display: block;
    text-align: center;
}

.titleAndclose span:hover { background-color: var(--d-accent); }

.innerBody { padding: 22px 24px 26px; }

.mediaContent iframe,
.mediaContent img { border-radius: 8px; }

.mediaContent audio { margin-top: 6px; }

.searchonmap { box-shadow: 0 6px 16px rgba(189,22,34,.28); }

/* Modal del mapa del conflicto (panel lateral) */
.mapconf .innerModal { border-radius: var(--d-radius); }

/* ==========================================================================
   10. FORMULARIOS  (Contacto / Tu historia)
   ========================================================================== */

.wrapperForm .innerForm {
    width: 100%;
    max-width: 660px;
    background: var(--d-card);
    border-radius: var(--d-radius);
    box-shadow: var(--d-shadow);
    padding: 40px 38px;
}

/* Formulario en 2 columnas en escritorio (nombre/email y lugar/fecha lado a
   lado); mensaje, URL, avisos y botón ocupan toda la fila. */
.frm-contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 18px;
    align-items: start;
}

/* Título, mensaje (textarea), URL de video, avisos y botón ocupan toda la fila.
   Nombre/email (y lugar/fecha en tu-historia) quedan lado a lado. */
.frm-contact h4,
.frm-contact .theMessage,
.frm-contact .fieldForm:has(textarea),
.frm-contact .fieldForm:has(input[name="video"]),
.frm-contact .fieldForm:has(button) {
    grid-column: 1 / -1;
}

/* Inputs ocultos sueltos no deben ocupar una celda del grid */
.frm-contact > input[type="hidden"] { display: none; }

/* La fila interna de Bootstrap (lugar/fecha) no debe romper el grid */
.frm-contact .fieldForm > .row { margin: 0; }
.frm-contact .fieldForm > .row > [class*="col-"] { padding: 0; width: 100%; }

@media (max-width: 767px) {
    .frm-contact { grid-template-columns: 1fr; }
}

.wrapperForm .innerForm h4 {
    font-family: var(--d-display);
    font-size: 26px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--d-ink);
    margin: 0 0 22px;
}

.frm-contact .fieldForm { margin-bottom: 0; }

.frm-contact input[type="text"],
.frm-contact input[type="email"],
.frm-contact input[type="mail"],
.frm-contact textarea {
    width: 100%;
    font-family: var(--d-body);
    font-size: 16px;
    color: var(--d-ink);
    background: #f6f6f6;
    border: 1px solid var(--d-line);
    border-radius: 8px;
    padding: 14px 16px;
    transition: border-color .25s ease, box-shadow .25s ease, background-color .25s ease;
}

.frm-contact textarea { min-height: 140px; resize: vertical; }

.frm-contact input:focus,
.frm-contact textarea:focus {
    outline: none;
    background: #fff;
    border-color: var(--d-accent);
    box-shadow: 0 0 0 3px rgba(189,22,34,.12);
}

.frm-contact input::placeholder,
.frm-contact textarea::placeholder { color: #9a9a9a; }

.frm-contact .fieldForm:has(button) { display: flex; justify-content: center; margin-top: 6px; }

.frm-contact button[type="submit"],
.frm-contact .chang {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    line-height: 1;
    font-family: var(--d-display);
    font-size: 18px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #fff;
    background: var(--d-accent);
    border: 0;
    border-radius: 50px;
    padding: 16px 44px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(189,22,34,.3);
    transition: transform .25s ease, background-color .25s ease, box-shadow .25s ease;
}

.frm-contact button[type="submit"]:hover,
.frm-contact .chang:hover {
    background: var(--d-accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(189,22,34,.38);
}

.frm-contact label.error {
    display: inline-block;
    color: #fff;
    background: var(--d-accent);
    font-family: var(--d-body);
    font-size: 12px;
    line-height: 1.3;
    padding: 4px 12px;
    border-radius: 6px;
    margin-top: 8px;
}

.theMessage:not(:empty) {
    margin: 6px 0 16px;
    padding: 12px 16px;
    border-radius: 8px;
    background: #eef7ee;
    color: #2e7d32;
    font-family: var(--d-body);
}

/* Tu historia: tarjetas de selección (video/audio/imagen/ayuda) */
.innerToggle {
    background: var(--d-card);
    border: 1px solid var(--d-line);
    border-radius: var(--d-radius);
    padding: 22px 12px;
    text-align: center;
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

/* background-color explícito para anular el tinte amarillo de main.css */
.innerToggle:hover {
    transform: translateY(-4px);
    background-color: #fff;
    border-color: rgba(189,22,34,.35);
    box-shadow: var(--d-shadow);
}

.innerToggle.theactive {
    background-color: #fdf3f4; /* rojo muy suave: tarjeta seleccionada */
    border-color: var(--d-accent);
    box-shadow: 0 8px 22px rgba(189,22,34,.18);
}

.innerToggle h3 { font-size: 14px; letter-spacing: .5px; margin-top: 10px; }

/* ==========================================================================
   10b. ENLACES A REDES SOCIALES (Desarmados)
   ========================================================================== */

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--d-dark);
    color: #fff;
    font-size: 16px;
    text-decoration: none;
    transition: background-color .25s ease, transform .25s ease;
}

.social-links a:hover,
.social-links a:focus {
    background: var(--d-accent);
    color: #fff;
    transform: translateY(-2px);
}

/* ==========================================================================
   11. FOOTER de aliados
   ========================================================================== */

.wrapper-footer { background: #161616; padding: 26px 0; }

.wrapper-footer ul { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 30px; }

.wrapper-footer ul li { margin: 0; }

.wrapper-footer ul li img {
    max-height: 46px;
    width: auto;
    filter: grayscale(100%) brightness(1.6);
    opacity: .75;
    transition: filter .3s ease, opacity .3s ease, transform .3s ease;
}

.wrapper-footer ul li:hover img { filter: none; opacity: 1; transform: translateY(-2px); }

/* ==========================================================================
   12. MAPAS (Leaflet) · capa visual moderna
   ========================================================================== */

.leaflet-container {
    font-family: var(--d-body);
    background: #e9e9e9;
}

/* --- Mapa selector en el modal de "Tu historia": máscara redondeada --- */
#map.embed-container {
    border-radius: var(--d-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,.18);
}

/* --- Mapa del conflicto (pantalla completa): vignette para dar profundidad --- */
.frameMap::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 180px rgba(0,0,0,.32);
    z-index: 500; /* sobre los tiles, los controles de Leaflet van más arriba */
}

/* --- Controles (zoom / capas) con estilo glassmorphism --- */
.leaflet-bar,
.leaflet-control-layers {
    border: 0 !important;
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,.20) !important;
    background: rgba(255,255,255,.78) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.leaflet-bar a,
.leaflet-bar a:link {
    background: transparent;
    color: var(--d-dark);
    border: 0;
    border-bottom: 1px solid rgba(0,0,0,.06);
    width: 34px;
    height: 34px;
    line-height: 34px;
    font-size: 18px;
    transition: background-color .2s ease, color .2s ease;
}

.leaflet-bar a:last-child { border-bottom: 0; }

.leaflet-bar a:hover,
.leaflet-bar a:focus {
    background: rgba(189,22,34,.10);
    color: var(--d-accent);
}

.leaflet-control-layers-toggle {
    border-radius: 12px !important;
    background-color: rgba(255,255,255,.85);
}

.leaflet-control-layers-expanded {
    padding: 12px 14px;
    color: var(--d-ink);
    font-size: 14px;
}

.leaflet-touch .leaflet-bar a:first-child { border-top-left-radius: 12px; border-top-right-radius: 12px; }
.leaflet-touch .leaflet-bar a:last-child { border-bottom-left-radius: 12px; border-bottom-right-radius: 12px; }

/* --- Atribución discreta --- */
.leaflet-control-attribution {
    background: rgba(255,255,255,.65) !important;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border-radius: 8px 0 0 0;
    padding: 3px 8px;
    font-size: 11px;
    color: #555;
}

/* --- Popups tipo tarjeta --- */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 12px 34px rgba(0,0,0,.22);
    padding: 6px 8px;
}

.leaflet-popup-content {
    font-family: var(--d-body);
    font-size: 14px;
    line-height: 1.5;
    color: var(--d-text);
}

.leaflet-popup-tip { box-shadow: 0 12px 34px rgba(0,0,0,.22); }

/* --- Marcadores de historia (íconos de año): sombra + hover --- */
.history-marker img {
    filter: drop-shadow(0 5px 7px rgba(0,0,0,.4));
    transform: translate(-50%, -100%);
    transform-origin: bottom center;
    transition: transform .25s ease, filter .25s ease;
    cursor: pointer;
}

.history-marker:hover img {
    transform: translate(-50%, -100%) scale(1.18);
    filter: drop-shadow(0 10px 14px rgba(0,0,0,.5));
}

/* ==========================================================================
   13. RESPONSIVE
   ========================================================================== */

@media (max-width: 1199px) {
    .stylesMaintitle h1 { font-size: 48px; letter-spacing: 12px; }
    .stylesMaintitle-small h1 { font-size: 38px; letter-spacing: 8px; }
}

@media (max-width: 767px) {
    .cover-page { height: 340px; }
    .stylesMaintitle h1 { font-size: 32px; letter-spacing: 6px; padding-left: 0; text-indent: 3px; }
    .stylesMaintitle-small h1 { font-size: 28px; letter-spacing: 5px; }
    .themarforbread { padding: 24px; }
    .list-pdf { grid-template-columns: 1fr; }
    .page-maincaption h2 { font-size: 24px; }
    .fooHome h2 { font-size: 22px; }
    .wrapperForm .innerForm { padding: 26px 20px; }
    .wrapper-footer ul { gap: 20px; }
    .wrapper-footer ul li img { max-height: 36px; }
    .quienes-somos ul li { width: 100%; max-width: 320px; }
}

@media (min-width: 768px) and (max-width: 991px) {
    /* En tablets: 2 por fila */
    .quienes-somos ul li { width: calc((100% - 24px) / 2); }
}


/* ============================================================
   MENU LATERAL MODERNO (sitewide)
   ============================================================ */

.inner-menuAside {
    width: min(340px, 86vw);
    background-color: rgba(12, 12, 11, 0.94);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.45);
    text-align: left;
    transition: right 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.logomenuaside {
    margin: 96px 36px 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logomenuaside img {
    margin: 0;
    max-width: 150px;
}

.listmenu-aside {
    margin: 0 !important;
    padding: 8px 36px !important;
}

.listmenu-aside li a {
    font-family: 'Futura-Condensed-Medium';
    font-size: 18px;
    letter-spacing: 0.08em;
    padding: 17px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.25s ease, transform 0.25s ease;
}

.listmenu-aside li:last-child a {
    border-bottom: none;
}

.listmenu-aside li a:hover,
.listmenu-aside li a:focus-visible {
    color: #ffec00;
    transform: translateX(6px);
}

.listmenu-aside li a:focus-visible {
    outline: 2px solid #ffec00;
    outline-offset: 2px;
}

.listmenu-aside li a.current {
    color: #ffec00 !important;
    position: relative;
}

.listmenu-aside li a.current::before {
    content: "";
    position: absolute;
    left: -36px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background-color: #ffec00;
}

/* Entrada escalonada de los items al abrir */
.item-listmenuaside,
.inner-menuAside .socialnetwork {
    opacity: 0;
    transform: translateX(24px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.menuisOpen .item-listmenuaside,
.menuisOpen .socialnetwork {
    opacity: 1;
    transform: translateX(0);
}

.menuisOpen .item-listmenuaside:nth-child(1) { transition-delay: 0.10s; }
.menuisOpen .item-listmenuaside:nth-child(2) { transition-delay: 0.15s; }
.menuisOpen .item-listmenuaside:nth-child(3) { transition-delay: 0.20s; }
.menuisOpen .item-listmenuaside:nth-child(4) { transition-delay: 0.25s; }
.menuisOpen .item-listmenuaside:nth-child(5) { transition-delay: 0.30s; }
.menuisOpen .item-listmenuaside:nth-child(6) { transition-delay: 0.35s; }
.menuisOpen .item-listmenuaside:nth-child(7) { transition-delay: 0.40s; }
.menuisOpen .item-listmenuaside:nth-child(8) { transition-delay: 0.45s; }
.menuisOpen .item-listmenuaside:nth-child(9) { transition-delay: 0.50s; }
.menuisOpen .socialnetwork { transition-delay: 0.55s; }

/* Redes sociales */
.inner-menuAside .socialnetwork ul {
    padding: 24px 30px;
    text-align: left;
}

.socialnetwork ul li {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    margin: 6px 8px 6px 0;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.socialnetwork ul li:hover {
    background-color: #ffec00;
    border-color: #ffec00;
}

.socialnetwork ul li a {
    color: #fff;
    display: block;
    width: 100%;
    height: 100%;
    line-height: 38px;
    transition: color 0.25s ease;
}

.socialnetwork ul li:hover a {
    color: #000;
}

.socialnetwork ul li a:focus-visible {
    outline: 2px solid #ffec00;
    outline-offset: 3px;
    border-radius: 50%;
}

@media (prefers-reduced-motion: reduce) {
    .inner-menuAside,
    .item-listmenuaside,
    .inner-menuAside .socialnetwork,
    .listmenu-aside li a {
        transition: none;
    }
    .item-listmenuaside,
    .inner-menuAside .socialnetwork {
        opacity: 1;
        transform: none;
    }
    .listmenu-aside li a:hover {
        transform: none;
    }
}

@media (max-width: 1400px) {
    .listmenu-aside li a {
        font-size: 17px;
        padding: 14px 0;
    }
}

@media screen and (max-width: 767px) and (orientation: landscape),
screen and (max-height: 320px) {
    .logomenuaside {
        margin-top: 0;
        padding-top: 20px;
    }
    .mobileMenuhei {
        height: 100%;
        margin-top: 60px;
    }
}

/* Pantallas bajas: el panel hace scroll en vez de recortar items.
   overflow-x hidden evita scrollbar fantasma durante la animación de entrada */
.inner-menuAside {
    overflow-y: auto;
    overflow-x: hidden;
}

@media (max-width: 767px) {
    .logomenuaside {
        margin-top: 76px;
        margin-bottom: 18px;
        padding-bottom: 18px;
    }
}


/* ============================================================
   HEADER INTERNO + BOTÓN MENÚ (sitewide)
   ============================================================ */

.headerNothome {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 70px;
    padding: 0 90px 0 24px;
    background-color: rgba(12, 12, 11, 0.86);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.theLogoheadernothome {
    width: 110px;
}

/* Botón hamburguesa circular glass (el home lo reposiciona en home.css) */
.toggleMenu {
    top: 8px;
    right: 16px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    line-height: 4.0;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.toggleMenu:hover {
    background-color: rgba(0, 0, 0, 0.85);
    border-color: #ffec00;
}


/* ============================================================
   MAPA · MARCADORES PLANOS + HEADER FLOTANTE + TILES
   ============================================================ */

/* Marcador plano: punto de color con anillo blanco y pulso sutil */
.history-marker .marker-dot {
    display: block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: markerPulse 2.4s ease-out infinite;
}

.history-marker:hover .marker-dot {
    transform: scale(1.25);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
    animation-play-state: paused;
}

@keyframes markerPulse {
    0% {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), 0 0 0 0 rgba(0, 0, 0, 0.25);
    }
    70%, 100% {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), 0 0 0 14px rgba(0, 0, 0, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .history-marker .marker-dot {
        animation: none;
    }
}

/* Tiles con un poco más de vida para que los marcadores resalten */
.frameMap .leaflet-tile-pane {
    filter: saturate(1.2) contrast(1.03);
}

/* Header interno flotante: logo en píldora oscura, consistente con el home */
.headerNothome {
    background-color: transparent;
    border-bottom: none;
    min-height: 0;
    padding: 16px 90px 16px 24px;
}

.theLogoheadernothome {
    width: auto;
    display: inline-block;
    background-color: rgba(12, 12, 11, 0.85);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-radius: 14px;
    padding: 12px 18px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.theLogoheadernothome:hover {
    background-color: rgba(12, 12, 11, 0.95);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.theLogoheadernothome a {
    display: block;
}

.theLogoheadernothome img {
    width: 110px;
    display: block;
}

/* Botón menú alineado con la píldora */
.toggleMenu {
    top: 16px;
}

@media (max-width: 767px) {
    .headerNothome {
        padding: 12px 80px 12px 16px;
    }
    .theLogoheadernothome {
        padding: 10px 14px;
    }
    .theLogoheadernothome img {
        width: 95px;
    }
    /* Misma altura y centro que la píldora del logo (47px, centro en 35px) */
    .toggleMenu {
        top: 11px;
        width: 48px;
        height: 48px;
        line-height: 3.4;
    }
}

/* Controles de Leaflet debajo del header flotante */
.frameMap .leaflet-top {
    top: 86px;
}

@media (max-width: 767px) {
    .frameMap .leaflet-top {
        top: 72px;
    }
}


/* ============================================================
   MODAL DEL MAPA · ENTRADA ANIMADA + ACENTO DEL AÑO
   ============================================================ */

.mapconf {
    background-color: rgba(10, 10, 10, 0.6);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    animation: modalBgIn 0.3s ease both;
}

.mapconf .innerModal {
    animation: modalCardIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

/* Acento superior con el color del año (lo inyecta showSingle) */
.mapconf .titleAndclose {
    border-top: 4px solid var(--modal-accent, #ffec00);
}

@keyframes modalBgIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes modalCardIn {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header interno: fondo transparente, el blur generaba una banda borrosa sobre el mapa */
.headerNothome {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

/* Controles del mapa alineados: zoom con el logo, capas con la hamburguesa */
.frameMap .leaflet-left .leaflet-control {
    margin-left: 24px;
}

.frameMap .leaflet-right .leaflet-control {
    margin-right: 25px;
}

@media (max-width: 767px) {
    .frameMap .leaflet-left .leaflet-control {
        margin-left: 16px;
    }
}


/* ============================================================
   TIMELINE · ajustes finos (paso a paso)
   ============================================================ */

/* La barra de color superior se posiciona absoluta: deja de ocupar
   los 10px en el flujo, así el año queda centrado sin ese hueco arriba */
.level-one {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

/* Celda a la misma altura que las flechas (50px), año centrado vertical */
.item-sliderfilter {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.level-three {
    position: relative;
    bottom: auto;
}

/* El bloque de color activo llena toda la altura de la celda */
.level-two {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    height: auto;
}
