/* ============================================
   HISTORIA - ESTILOS ESPECÍFICOS
   HELADOS CARRETERO
   ============================================ */

/* ----- HERO ----- */
.historia-hero {
    background: linear-gradient(135deg, #1a3a2e 0%, #2d6a4f 100%);
    padding: 140px 0 80px;
    text-align: center;
    margin-top: 74px;
}

.historia-hero h1 {
    color: #ffffff;
    font-size: 3.5rem;
    margin-bottom: 12px;
}

.historia-hero p {
    color: rgba(255,255,255,0.9);
    font-size: 1.3rem;
}

/* ----- INTRODUCCIÓN ----- */
.historia-intro {
    padding: 80px 0;
    background: #ffffff;
}

.historia-intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.historia-intro-texto h2 {
    font-size: 2.2rem;
    color: #2d6a4f;
    margin-bottom: 16px;
}

.historia-intro-texto p {
    font-size: 1.05rem;
    color: #666666;
    line-height: 1.8;
    margin-bottom: 12px;
}

.historia-intro-texto strong {
    color: #2d6a4f;
}

.historia-intro-imagen img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* ----- LÍNEA DE TIEMPO ----- */
.historia-timeline {
    padding: 60px 0;
    background: #fdf6ed;
}

.timeline-item {
    position: relative;
    padding: 40px 0;
    border-bottom: 2px solid rgba(45, 106, 79, 0.1);
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-badge {
    display: inline-block;
    margin-bottom: 16px;
}

.timeline-ano {
    display: inline-block;
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d6a4f;
    background: #ffffff;
    padding: 4px 24px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.timeline-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.timeline-item.reverse .timeline-content {
    direction: rtl;
}

.timeline-item.reverse .timeline-content > * {
    direction: ltr;
}

.timeline-texto h3 {
    font-size: 1.6rem;
    color: #2d2d2d;
    margin-bottom: 12px;
}

.timeline-texto p {
    font-size: 1rem;
    color: #666666;
    line-height: 1.8;
    margin-bottom: 10px;
}

.timeline-texto blockquote {
    font-style: italic;
    color: #666666;
    padding: 12px 20px;
    border-left: 4px solid #2d6a4f;
    margin: 12px 0;
    background: rgba(255,255,255,0.5);
    border-radius: 0 8px 8px 0;
}

.timeline-texto cite {
    display: block;
    font-style: normal;
    color: #888888;
    font-size: 0.85rem;
}

.timeline-texto i {
    margin-right: 6px;
}

.timeline-imagen img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* ----- GALERÍA DE FOTOS ----- */
.historia-galeria {
    padding: 80px 0;
    background: #ffffff;
}

.galeria-header {
    margin-bottom: 40px;
}

.galeria-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d2d2d;
    text-align: center;
}

.galeria-header .subtitulo {
    font-size: 1.2rem;
    font-weight: 300;
    color: #666666;
    text-align: center;
}

.galeria-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.galeria-item {
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    aspect-ratio: 1 / 1;
}

.galeria-item:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.galeria-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
}

.galeria-item:hover img {
    transform: scale(1.05);
}

/* ----- CITA FINAL ----- */
.historia-cita {
    padding: 80px 0;
    background: #2d6a4f;
    text-align: center;
}

.cita-content {
    max-width: 800px;
    margin: 0 auto;
}

.cita-content blockquote {
    font-size: 1.8rem;
    font-style: italic;
    color: #ffffff;
    line-height: 1.6;
}

.cita-content blockquote::before {
    content: "“";
    font-size: 4rem;
    color: rgba(255,255,255,0.3);
    display: block;
    margin-bottom: -20px;
}

.cita-content cite {
    display: block;
    margin-top: 16px;
    font-style: normal;
    color: rgba(255,255,255,0.7);
    font-size: 1.1rem;
}

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

@media (max-width: 992px) {
    .historia-intro-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .timeline-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .timeline-item.reverse .timeline-content {
        direction: ltr;
    }
    
    .galeria-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .historia-hero {
        padding: 120px 0 50px;
        margin-top: 64px;
    }
    
    .historia-hero h1 {
        font-size: 2.2rem;
    }
    
    .historia-hero p {
        font-size: 1.1rem;
    }
    
    .historia-intro {
        padding: 50px 0;
    }
    
    .historia-intro-texto h2 {
        font-size: 1.8rem;
    }
    
    .historia-intro-texto p {
        font-size: 0.95rem;
    }
    
    .timeline-ano {
        font-size: 1.8rem;
        padding: 2px 18px;
    }
    
    .timeline-texto h3 {
        font-size: 1.3rem;
    }
    
    .timeline-texto p {
        font-size: 0.95rem;
    }
    
    .galeria-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .galeria-header h2 {
        font-size: 2rem;
    }
    
    .historia-cita {
        padding: 50px 0;
    }
    
    .cita-content blockquote {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .galeria-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .historia-intro-texto p {
        font-size: 0.9rem;
    }
    
    .historia-hero h1 {
        font-size: 1.8rem;
    }
}
/* ============================================
   AJUSTE PARA IMÁGENES VERTICALES
   ============================================ */

.timeline-imagen img {
    width: 100%;
    max-height: 350px;  /* Limita la altura máxima */
    object-fit: cover;   /* Recorta la imagen para que encaje bien */
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Si quieres que la imagen se vea completa (sin recortar) */
.timeline-imagen img.vertical {
    max-height: 350px;
    object-fit: contain;  /* Muestra toda la imagen sin recortar */
    background: #fdf6ed;  /* Fondo para los bordes que sobran */
}
/* ============================================
   IMÁGENES VERTICALES
   ============================================ */

.img-vertical {
    max-height: 300px;
    width: auto;
    max-width: 100%;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}