﻿:root {
    --sniiv-red: #a02142;
    --sniiv-gold: #b8964a;
    --sniiv-gold1: #a57f2c;
    --sniiv-gold2: #d7b262;
    --sniiv-green: #1e5b4f;
}
@font-face {
    font-family: 'Patria';
    src: url('../../fonts/PATRIA_REGULAR.OTF') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

.titles {
    font-family: 'Patria', sans-serif;
    font-size: 5em;
    font-weight: 700;
    color: white;   
}
.titulo-1secction {
    font-family: 'Patria', sans-serif;   
    text-align: center;
    font-size: 3rem;
    color: #691b32
}

.r1 {
    min-height: 130px;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center; /* CENTRA TODO */

    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    width: 100vw;
    padding: 0 16px; /* padding simétrico */
}

    .r1 p {
        margin: 0;
        color: #611232;
    }

.r1-img {
    height: 80px;
    width: auto;
    margin-left: 24px; /* separación entre texto e imagen */
}
/*1er seccion*/

.grid-1secction {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    gap: 15px
}
.grid-columns {    
    min-height: 350px
}

/*section ¿que es el sniiv?*/
.text1sect {
    text-align: center;
    font-size: 1.6rem;
    padding: 10px
}
/*section ¿quien lo administra?*/

.grid-rowsec1 {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    gap: 20px;
    place-items: center
}

.grid-rowElement {
    height: 80px;
    width: 90%;
    border: 2px solid var(--sniiv-gold1);
    border-radius: 25px;
    background-color: var(--sniiv-gold2);      
    position:relative;
    cursor:pointer;
}

    .grid-rowElement p {
        text-align: center;
        font-size: 19px;
        color: white;
        font-weight: 700;
        padding: 10px
    }
/*tooltip*/
    /* CUADRO */
    .grid-rowElement::after {
        content: attr(data-tooltip);
        position: absolute;
        top: 50%;
        left: 105%; /* aparece a la derecha */
        transform: translateY(-50%);
        min-width: 220px;
        max-width: 320px;
        background-color: var(--sniiv-red);
        color: white;
        padding: 12px 14px;
        border-radius: 8px;
        font-size: 13px;
        line-height: 1.4;
        box-shadow: 0 6px 18px rgba(0,0,0,0.25);
        border: 1px solid #e0e0e0;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s ease, transform 0.25s ease;
        z-index: 30;
    }

    /* Flecha del cuadro */
    .grid-rowElement::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 100%;
        transform: translateY(-50%);
        border-width: 8px;
        border-style: solid;
        border-color: transparent var(--sniiv-red) transparent transparent;        
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s ease;
        z-index: 31;
    }

    /* Mostrar cuadro */
    .grid-rowElement:hover::after,
    .grid-rowElement:hover::before {
        opacity: 1;
        visibility: visible;
        transform: translate(0, -50%);
    }

    /*Que información puedes encontrar*/

.grid-rowsec2 {
    display: grid;
    grid-template-rows: repeat(4, 1fr);
    gap: 10px;
    place-items: center;
}

.grid-rows-content {
    height: 50px;    
    width: 90%;
    display: grid;
    grid-template-columns: 50px 1fr;
    align-items: center;
}
    .grid-rows-content img {
        justify-self: center;
        align-self: center;
    }
    .grid-rows-content p {
        margin: 0;
        font-size:15px;
    }
/*Conoce su historia*/

.title-c1 {
    font-family: 'Patria', sans-serif;    
    font-size: 3rem;
    color: #691b32
}

/*LINE TIME*/

/* CONTENEDOR GENERAL */
.timeline-section {
    position: relative;
    max-width: 980px;
    margin: 40px auto;
    padding: 0 16px;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* WRAPPER */
.timeline {
    position: relative;
    padding: 10px 0 20px;
}

/* LÍNEA CENTRAL */
.timeline-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    border-left: 7px dotted var(--sniiv-gold);
}
    .timeline-line::after {
        content: "";
        position: absolute;
        bottom: -20px;
        left: 50%;
        margin-left: -1px;
        transform: translateX(-50%);
        width: 0;
        height: 0;
        border-left: 25px solid transparent;
        border-right: 25px solid transparent;
        border-top: 30px solid #611232;
    }

/* ITEM */
.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 130px 1fr;
    align-items: center;
    gap: 5px;
    padding: 25px 0;
}
    .timeline-item.both .timeline-content.left {
        grid-column: 1;
        justify-self: end;
        text-align: right;
    }

    .timeline-item.both .timeline-content.right {
        grid-column: 3;
    }

/* AÑO */
.timeline-year {
    grid-column: 2;
    justify-self: center;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    border:5px solid var(--sniiv-gold);
    background-color:white;
    font-size:20px;
    color: var(--sniiv-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

/* CONTENIDO BASE */
.timeline-content {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 10px 22px rgba(0,0,0,.10);
}

    /* IZQUIERDA */
    .timeline-content.left {
        grid-column: 1;
        justify-self: end;
        text-align: right;
    }

    /* DERECHA */
    .timeline-content.right {
        grid-column: 3;
    }

/* FLECHA BASE */
.timeline-arrow {
    position: absolute;
    top: 28px;
    width: 0;
    height: 0;
}

    /* FLECHA IZQUIERDA */
    .timeline-arrow.left {
        right: -12px;
        border-top: 10px solid transparent;
        border-bottom: 10px solid transparent;
        border-left: 12px solid #fff;
    }

    /* FLECHA DERECHA */
    .timeline-arrow.right {
        left: -12px;
        border-top: 10px solid transparent;
        border-bottom: 10px solid transparent;
        border-right: 12px solid #fff;
    }

/* TÍTULO */
.timeline-title {
    margin: 0 0 6px;
    background-color:var(--sniiv-red);
    min-height:25px;
    border-radius:15px;
}

.timeline-title-color {
    color: white; 
    font-size:18px;
    font-weight:700;
    text-align:center;
}

/* DESCRIPCIÓN */
.timeline-description {
    margin: 0;
    font-size: 15px;
    color: #666;
    text-align:justify;
}

/*Imagen SNIIV-Final*/

.full-width-container {
    width: 100vw; /* ocupa todo el ancho de la pantalla */
    min-height: 100px; /* ajusta según necesidad */
    display: flex;
    justify-content: center; /* centra horizontalmente */
    align-items: flex-start; /* imagen en la parte superior */
    padding-top: 20px; /* separación superior */
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}
/* Contenedor full width (ya lo tienes, esto lo refuerza) */
.full-width-container {
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px 16px; /* padding lateral para que no pegue en móvil */
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.top-centered-img {
    width: 450px;
    max-width: 100%; /* clave para responsive */
    height: auto; /* mantiene proporción */
    max-height: 450px;
    display: block;
}

/* Tablet */
@media (max-width: 992px) {
    .top-centered-img {
        width: 360px;
        max-height: 360px;
    }
}

/* Móvil */
@media (max-width: 576px) {
    .full-width-container {
        padding: 12px 12px;
    }

    .top-centered-img {
        width: min(320px, 90vw); /* se ajusta al viewport */
        max-height: none; /* evita que se “aplane” */
    }
}

/* =========================
   RESPONSIVE (solo esto)
   Línea + años a la izquierda, contenido a la derecha
========================= */

@media (max-width: 992px) {
    /* Ajustes generales */
    .titles {
        font-size: 3.2em;
    }

    .r1 {
        padding-left: 24px;
        padding-right: 24px;
    }

    .r1-img {
        height: 64px;
        margin-left: 20px;
    }

    .grid-1secction {
        grid-template-columns: repeat(2, 1fr);
    }

    .text1sect {
        font-size: 1.35rem;
    }

    /* Timeline un poco más compacta */
    .timeline-item {
        grid-template-columns: 1fr 110px 1fr;
    }

    .timeline-year {
        width: 80px;
        height: 80px;
        font-size: 18px;
    }

    .timeline-content {
        max-width: 360px;
    }
}

@media (max-width: 768px) {
    /* Banner */
    .r1 {
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        gap: 12px;
        padding: 18px 16px;
        min-height: auto;
    }

    .titles {
        font-size: 2.2em;
        line-height: 1.1;
    }

    .r1-img {
        height: 56px;
        margin-left: 0;
    }

    /* Grid 1er sección */
    .grid-1secction {
        grid-template-columns: 1fr;
    }

    .grid-columns {
        min-height: auto;
    }

    /* Tooltip: mejor abajo */
    .grid-rowElement {
        width: 100%;
    }

        .grid-rowElement p {
            font-size: 16px;
        }

        .grid-rowElement::after {
            top: calc(100% + 10px);
            left: 0;
            transform: none;
            min-width: 0;
            width: 100%;
            max-width: none;
        }

        .grid-rowElement::before {
            top: 100%;
            left: 24px;
            transform: none;
            border-width: 10px;
            border-color: transparent transparent var(--sniiv-red) transparent;
        }

        .grid-rowElement:hover::after,
        .grid-rowElement:hover::before {
            transform: none;
        }

    /* "Qué información..." */
    .grid-rows-content {
        width: 100%;
        grid-template-columns: 44px 1fr;
    }

        .grid-rows-content p {
            font-size: 14px;
        }

    /* =============================
       TIMELINE (lo que pediste)
       línea + años IZQ / cards DER
    ============================== */

    .timeline-line {
        left: 26px !important;
        transform: none !important;
        border-left: 6px dotted var(--sniiv-gold);
    }

        .timeline-line::after {
            left: 26px !important;
            transform: none !important;
            bottom: -16px;
            border-left: 18px solid transparent;
            border-right: 18px solid transparent;
            border-top: 22px solid #611232;
        }

    .timeline-item {
        display: grid;
        grid-template-columns: 72px minmax(0, 1fr) !important; /* años | contenido */
        column-gap: 14px;
        row-gap: 10px;
        align-items: start;
        padding: 16px 0;
    }

    .timeline-year {
        grid-column: 1 !important;
        justify-self: center !important;
        width: 52px;
        height: 52px;
        font-size: 12px;
        border-width: 3px;
    }

    /* FIX DEFINITIVO: evitar cards comprimidos por reglas más específicas (.both/.left/.right) */
    .timeline-item .timeline-content,
    .timeline-item .timeline-content.left,
    .timeline-item .timeline-content.right,
    .timeline-item.both .timeline-content.left,
    .timeline-item.both .timeline-content.right {
        grid-column: 2 !important;
        justify-self: stretch !important;
        width: 100% !important;
        max-width: none !important;
        text-align: left !important;
        margin: 0 !important;
    }

    .timeline-arrow {
        display: none !important;
    }

    .timeline-title-color {
        font-size: 16px;
    }

    .timeline-description {
        font-size: 14px;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

    /* Imagen final */
    .full-width-container {
        padding-top: 12px;
        min-height: auto;
    }
}
@media (max-width: 768px) {
    .timeline-line::after {
        content: none;
    }
}