/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden !important;
}

body {
    font-family: 'Bogart', 'Montserrat', serif;
    background-color: #f5f5f5;
    overflow-x: hidden !important;
}

/* CONSTANTINA HERO STYLES - SOLO AJUSTES MÍNIMOS */

.constantina-hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    background-image: url('/assets/img/Constantina/portada-constantina.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    display: flex;
    align-items: center;
    /* NUEVO: Asegurar ancho completo en móvil */
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

/* Overlay opcional */
.constantina-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

/* Contenedor del contenido */
.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

/* Contenedor del texto */
.text-container {
    max-width: 550px;
    margin-left: 150px;
    padding-right: 50px;
    margin-top:-350px;
}

/* Desktop - subir más el texto */
.hero-content {
    padding-top: 5vh;
}

/* Título principal */
.constantina-main-title {
    font-family: 'Bogart', 'Montserrat', serif;
    font-size: 70px;
    font-weight: 400;
    line-height: 0.85;
    color: white;
    margin-bottom: 30px;
    /*text-transform: uppercase;*/
    letter-spacing: 0.02em;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}

/* Párrafo descriptivo */
.constantina-description {
    font-family: 'Space Grotesk';
    font-size: 20px;
    font-weight: 600;
    line-height: 1.1;
    color: white;
    margin: 0;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.4);
}

/* RESPONSIVE DESIGN */
@media (max-width: 1400px) {
    .constantina-main-title {
        font-size: clamp(40px, 9vw, 60px);
    }
    
    .constantina-description {
        font-size: clamp(18px, 2.5vw, 25px);
    }
    
    .text-container {
        max-width: 400px;
        padding-right: 10px;
        margin-top:-300px;
    }
}

@media (max-width: 1200px) {
    .text-container {
        max-width: 400px;
        padding-right: 10px;
        margin-top: 0;
    }
}

@media (max-width: 991px) {
    .constantina-hero {
        min-height: 550px;
    }
    
    .text-container {
        max-width: 400px;
        padding-right: 10px;
        margin-top:0;
    }
    
    .constantina-description {
        font-size: clamp(16px, 2.2vw, 22px);
    }
}

@media (max-width: 768px) {
    .constantina-hero {
        min-height: 500px;
        align-items: flex-start;
        
    }
    
    .hero-content {
        padding-top: 0;
    }
    
    .text-container {
        max-width: 70%;
        padding-right: 15px;
        padding-left: 10px;
        margin-left: 0px;
        margin-right: 0;
        margin-top:80px;
    }
    
    
    .constantina-description {
        font-size: clamp(14px, 3.5vw, 20px);
        line-height: 1.3;
    }
}

@media (max-width: 600px) {
    /* Cambiar imagen de fondo desde 600px */
    .constantina-hero {
        background-image: url('/assets/img/Constantina/portada-mobile-constantina.jpg');
        min-height: 90vh;
        align-items: flex-start;
        background-position: center center;
        /* NUEVO: Forzar ancho completo y eliminar márgenes */
        width: 100vw;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
    }
    
    .hero-content .row {
        justify-content: end !important;
    }
    
    .text-container {
        max-width: 70%;
        padding: 0 20px 0 0;
        text-align: left;
        margin-left: auto;
        margin-right: 0;
    }
    
    
    .constantina-description {
        font-size: clamp(13px, 3.8vw, 19px);
        line-height: 1.3;
        max-width: 350px;
    }
}

@media (max-width: 480px) {
    /* Cambiar a imagen móvil específica */
    .constantina-hero {
        background-image: url('/assets/img/Constantina/portada-mobile-constantina.jpg');
        /* NUEVO: Mantener la técnica de ancho completo */
        width: 100vw;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
    }
    
    .text-container {
        max-width: 70%;
        padding: 180px 15px 0 0;
    }
    
    .constantina-main-title {
        font-size: clamp(30px, 16vw, 40px);
        margin-bottom: 15px;
        line-height: 0.8;
    }
    
    .constantina-description {
        font-size: clamp(12px, 4.2vw, 17px);
        line-height: 1.25;
        max-width: 300px;
    }
}

@media (max-width: 380px) {
    .text-container {
        padding: 0 12px 0 0;
        max-width: 70%;
    }
    
    .constantina-main-title {
        font-size: clamp(20px, 18vw, 30px);
        margin-bottom: 12px;
    }
    
    .constantina-description {
        font-size: clamp(11px, 4.5vw, 15px);
        max-width: 260px;
        line-height: 1.2;
    }
}



/* CÓDIGO DEL TIMELINE */



/* Contenedor principal */
.timeline-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0px;
    overflow: hidden;
    margin-bottom:-40px;
}

/* Contenedor escalable - Este es el que se escala */
.timeline-scalable {
    transform-origin: top center;
    /* El scale se calculará dinámicamente */
}

/* Wrapper con dimensiones fijas */
.timeline-wrapper {
    position: relative;
    width: 1200px;
    height: 1950px;
}

/* Imagen de fondo */

.timeline-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 1300px;
    height: 1950px;
    object-fit: contain; /* Cambiado de 'fill' a 'contain' para mantener proporción */
}

/* Contenedor para todos los textos */
.timeline-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 1300px;
    height: 1950px;
}

/* Título principal */
.main-title {
    position: absolute;
    top: 39px;
    left: 39px;
    font-family: 'Bogart', 'Montserrat', serif;
    font-size: 40px;
    color: #00699C;
    font-weight: 400;
    line-height: 0.9;
    /*text-transform: uppercase;*/
}

/* Estilos comunes para años */
.year {
    font-family: 'Highrise', 'Montserrat', sans-serif;
    font-size: 60px;
    font-weight: 400;
    color: #00699C;
    margin-bottom: 10px;
}

/* Estilos comunes para textos */
.text {
    font-family: 'Space Grotesk';
    font-size: 15px;
    line-height: 1.1;
    color: #00699C;
    font-weight: 300;
}

/* Contenedores por sección - Posiciones fijas en píxeles */
.section-1880 {
    position: absolute;
    top: 281px;
    left: 325px;
    width: 200px;
}

.section-1961 {
    position: absolute;
    top: 487px;
    right: 276px;
    width: 250px;
}

.section-2012 {
    position: absolute;
    top: 799px;
    right: 383px;
    width: 250px;
}

.section-2014 {
    position: absolute;
    top: 936px;
    left: 29px;
    width: 260px;
}

.section-2014-bus {
    position: absolute;
    top: 1229px;
    left: 423px;
    width: 250px;
}

.section-2014-bus .subtitle {
    font-family: 'Bogart', 'Montserrat', serif;
    font-size: 16px;
    color: #00699C;
    margin-bottom: 10px;
}

.section-2014-bus .subtitle strong {
    font-family: 'Highrise', 'Montserrat', sans-serif;
    font-size: 40px;
    font-weight: 400;
}

.section-2023 {
    position: absolute;
    bottom: 370px;
    left: 39px;
    width: 250px;
}

.section-2025 {
    position: absolute;
    bottom: 370px;
    right: 364px;
    width: 250px;
}

/* Cálculo dinámico del scale basado en el viewport */
@media screen and (max-width: 1340px) {
    .timeline-scalable {
        transform: scale(calc((100vw - 40px) / 1300));
    }
}

/* Fallback para navegadores que no soporten calc en transform */
@media (max-width: 1300px) {
    .timeline-scalable {
        transform: scale(0.95);
    }
}

@media (max-width: 1250px) {
    .timeline-scalable {
        transform: scale(0.92);
    }
}

@media (max-width: 1200px) {
    .timeline-scalable {
        transform: scale(0.88);
    }
}

@media (max-width: 1150px) {
    .timeline-scalable {
        transform: scale(0.85);
    }
}

@media (max-width: 1100px) {
    .timeline-scalable {
        transform: scale(0.81);
    }
}

@media (max-width: 1050px) {
    .timeline-scalable {
        transform: scale(0.77);
    }
}

@media (max-width: 1000px) {
    .timeline-scalable {
        transform: scale(0.74);
    }
}

@media (max-width: 950px) {
    .timeline-scalable {
        transform: scale(0.70);
    }
}

@media (max-width: 900px) {
    .timeline-scalable {
        transform: scale(0.66);
    }
}

@media (max-width: 850px) {
    .timeline-scalable {
        transform: scale(0.63);
    }
}

@media (max-width: 800px) {
    .timeline-scalable {
        transform: scale(0.59);
    }
}

@media (max-width: 750px) {
    .timeline-scalable {
        transform: scale(0.55);
    }
}

@media (max-width: 700px) {
    .timeline-scalable {
        transform: scale(0.52);
    }
}

@media (max-width: 650px) {
    .timeline-scalable {
        transform: scale(0.48);
    }
}

@media (max-width: 600px) {
    .timeline-scalable {
        transform: scale(0.44);
    }
}

@media (max-width: 550px) {
    .timeline-scalable {
        transform: scale(0.40);
    }
}

@media (max-width: 500px) {
    .timeline-scalable {
        transform: scale(0.37);
    }
}

@media (max-width: 450px) {
    .timeline-scalable {
        transform: scale(0.33);
    }
}

@media (max-width: 400px) {
    .timeline-scalable {
        transform: scale(0.29);
    }
}

/* Prevenir desbordamiento */
@media (max-width: 1340px) {
    body {
        overflow-x: hidden;
    }
}






/* ========= CONSTANTINA TIMELINE RESPONSIVE ========= */

/* Ocultar por defecto, mostrar solo en responsive */
.constantina-timeline-responsive {
    display: none !important;
    background-color: #f8f9fa;
    padding: 60px 0;
}

/* Mostrar la sección responsive desde 999px hacia abajo */
@media (max-width: 999px) {
    .constantina-timeline-responsive {
        display: block !important;
    }
    
    /* Ocultar el timeline original */
    .timeline-container {
        display: none !important;
    }
}

/* Título principal */
.timeline-main-title {
    font-family: 'Highrise', 'Montserrat', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 400;
    color: #00699C;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 0;
}

/* Items de timeline */
.timeline-item {
    margin-bottom: 40px;
    align-items: center;
}

/* Contenedor de imagen */
.timeline-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

.timeline-image {
    max-width: 100%;
    height: auto;
}

/* Separador */
.timeline-separator {
    max-width:100%;
    height: auto;
    margin: 20px 0;
}

/* Contenido de texto */
.timeline-content-text {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

/* Años */
.timeline-year {
    font-family: 'Highrise', 'Montserrat', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 400;
    color: #00699C;
    margin-bottom: 15px;
    line-height: 1;
}

/* Año especial para "EL MISMO" */
.timeline-year-special {
    font-family: 'Bogart', 'Montserrat', serif;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 400;
    color: #00699C;
    margin-bottom: 15px;
    line-height: 1.2;
}

.timeline-year-special strong {
    font-family: 'Highrise', 'Montserrat', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 400;
}

/* Descripciones */
.timeline-description {
    font-family: 'Space Grotesk';
    font-size: clamp(12px, 2.5vw, 1.0rem);
    font-weight: 400;
    color: #00699C;
    line-height: 1.2;
    margin: 0;
}

.timeline-description strong {
    font-weight: 600;
    color: #00699C;
}

/* RESPONSIVE DESIGN */

/* Tablet */
@media (max-width: 768px) {
    .constantina-timeline-responsive {
        padding: 40px 0;
    }
    
    .timeline-item {
        margin-bottom: 30px;
       
    }
    
    .timeline-content-text {
        padding: 15px;
    }
    
    .timeline-image-container {
        padding: 10px;
    }
    
    .timeline-separator {
        max-width: 100%;
        margin: 15px 0;
    }
}

/* Móvil */
@media (max-width: 480px) {
    .constantina-timeline-responsive {
        padding: 30px 0;
    }
    
    .timeline-item {
        margin-bottom: 25px;
    }
    
    .timeline-content-text {
        padding: 12px;
    }
    
    .timeline-image-container {
        padding: 8px;
    }
    
    .timeline-main-title {
        margin-bottom: 30px;
    }
    
    .timeline-separator {
        max-width: 100%;
        margin: 12px 0;
    }
}

/* Solo para breakpoints muy pequeños (280-300px) cambiar a columna única */
@media (max-width: 300px) {
    .timeline-item .col-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    .timeline-item {
        flex-direction: column;
    }
    
    .timeline-content-text {
        text-align: center;
        padding: 10px;
    }
    
    .timeline-image-container {
        padding: 5px;
        margin-bottom: 15px;
    }
}



/* Transiciones suaves */
.timeline-image {
    transition: transform 0.3s ease;
}

.timeline-image:hover {
    transform: scale(1.02);
}