/* ============================================
   HISTORIA - ESTILOS MEJORADOS
   HELADOS CARRETERO
   ============================================ */

/* ----- HERO CON EFECTO ----- */
.historia-hero {
    padding: 160px 0 100px;
    text-align: center;
    margin-top: 74px;
    background: linear-gradient(135deg, #1a3a2e 0%, #2d6a4f 50%, #40916c 100%);
    position: relative;
    overflow: hidden;
}

.historia-hero .hero-decoracion {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.historia-hero .deco-icono {
    position: absolute;
    font-size: 3rem;
    opacity: 0.08;
    animation: flotar 6s ease-in-out infinite;
}

.historia-hero .deco-icono:nth-child(1) { top: 10%; left: 5%; font-size: 4rem; }
.historia-hero .deco-icono:nth-child(2) { top: 70%; left: 90%; animation-delay: 1s; font-size: 3.5rem; }
.historia-hero .deco-icono:nth-child(3) { top: 40%; left: 92%; animation-delay: 2s; font-size: 2.5rem; }
.historia-hero .deco-icono:nth-child(4) { top: 85%; left: 8%; animation-delay: 0.5s; font-size: 3rem; }
.historia-hero .deco-icono:nth-child(5) { top: 25%; left: 88%; animation-delay: 1.5s; font-size: 2rem; }

@keyframes flotar {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

.historia-hero .hero-content {
    position: relative;
    z-index: 2;
}

.historia-hero .hero-tag {
    display: inline-block;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    padding: 6px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    margin-bottom: 16px;
}

.historia-hero h1 {
    font-size: 3.8rem;
    color: #ffffff;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 16px;
}

.historia-hero .highlight {
    color: #d8e9e0;
    position: relative;
}

.historia-hero .highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #d8e9e0;
    opacity: 0.3;
    border-radius: 4px;
}

.historia-hero p {
    font-size: 1.3rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 30px;
}

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

.historia-intro::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%232d6a4f' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.historia-intro-content {
    max-width: 850px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.intro-badge {
    display: inline-block;
    background: #fdf6ed;
    color: #2d6a4f;
    padding: 4px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
    border: 1px solid #d8e9e0;
}

.historia-intro-content h2 {
    font-size: 2.5rem;
    color: #2d2d2d;
    margin-bottom: 8px;
}

.historia-intro-content .highlight {
    color: #2d6a4f;
}

.intro-linea {
    width: 60px;
    height: 3px;
    background: #2d6a4f;
    margin: 12px auto 20px;
    border-radius: 4px;
}

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

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

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

.timeline-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-tag {
    display: inline-block;
    background: #2d6a4f;
    color: #ffffff;
    padding: 4px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.timeline-header h2 {
    font-size: 2.5rem;
    color: #2d2d2d;
}

.timeline-header .highlight {
    color: #2d6a4f;
}

.timeline-header p {
    color: #888888;
    font-size: 1.1rem;
}

/* ----- ITEMS DE LA LÍNEA DE TIEMPO ----- */
.timeline-item {
    position: relative;
    padding: 40px 0;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease;
}

.timeline-item.animate {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, #d8e9e0, #d8e9e0, transparent);
    transform: translateX(-50%);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-badge {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.timeline-ano {
    display: inline-block;
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    background: #2d6a4f;
    padding: 8px 24px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(45, 106, 79, 0.3);
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-ano {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(45, 106, 79, 0.4);
}

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

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

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

/* ----- TEXTO DE LA LÍNEA DE TIEMPO ----- */
.timeline-texto {
    padding: 20px 0;
}

.timeline-icono {
    width: 48px;
    height: 48px;
    background: #fdf6ed;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2d6a4f;
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.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 strong {
    color: #2d6a4f;
}

.timeline-cita {
    margin-top: 16px;
    padding: 16px 20px;
    background: #ffffff;
    border-left: 4px solid #2d6a4f;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.timeline-cita blockquote {
    font-style: italic;
    color: #666666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 6px 0;
}

.timeline-cita cite {
    display: block;
    font-style: normal;
    color: #999999;
    font-size: 0.8rem;
}

.timeline-destacado {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 20px;
    background: #2d6a4f;
    color: #ffffff;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

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

/* ----- IMÁGENES ----- */
.timeline-imagen {
    position: relative;
}

.timeline-imagen img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.5s ease;
}

.timeline-item:hover .timeline-imagen img {
    transform: scale(1.02);
    box-shadow: 0 8px 40px rgba(0,0,0,0.12);
}

.timeline-img-label {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.75rem;
    color: #aaaaaa;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ----- CITA FINAL MEJORADA ----- */
.historia-cita-final {
    padding: 80px 0;
    background: #2d6a4f;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.historia-cita-final::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
    animation: girar 30s linear infinite;
}

@keyframes girar {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.cita-final-content {
    max-width: 750px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.cita-final-icono {
    font-size: 3rem;
    color: rgba(255,255,255,0.15);
    margin-bottom: 12px;
}

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

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

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

.cita-final-linea {
    width: 60px;
    height: 2px;
    background: rgba(255,255,255,0.2);
    margin: 20px auto;
}

.cita-final-sub {
    color: rgba(255,255,255,0.6);
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 1px;
}

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

@media (max-width: 992px) {
    .historia-hero h1 { font-size: 2.8rem; }
    
    .timeline-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .timeline-item.reverse .timeline-content {
        direction: ltr;
    }
    
    .timeline-badge {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        text-align: center;
        margin-bottom: 16px;
    }
    
    .timeline-item::before {
        display: none;
    }
    
    .cita-final-content blockquote {
        font-size: 1.4rem;
    }
}

@media (max-width: 768px) {
    .historia-hero {
        padding: 120px 0 60px;
        margin-top: 64px;
    }
    
    .historia-hero h1 {
        font-size: 2.2rem;
    }
    
    .historia-hero p {
        font-size: 1.1rem;
    }
    
    .historia-intro {
        padding: 50px 0;
    }
    
    .historia-intro-content h2 {
        font-size: 1.8rem;
    }
    
    .historia-intro-content p {
        font-size: 0.95rem;
    }
    
    .timeline-header h2 {
        font-size: 1.8rem;
    }
    
    .timeline-ano {
        font-size: 1.4rem;
        padding: 6px 18px;
    }
    
    .timeline-texto h3 {
        font-size: 1.3rem;
    }
    
    .cita-final-content blockquote {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .historia-hero h1 {
        font-size: 1.8rem;
    }
    
    .timeline-ano {
        font-size: 1.2rem;
        padding: 4px 14px;
    }
    
    .timeline-texto h3 {
        font-size: 1.1rem;
    }
    
    .timeline-cita blockquote {
        font-size: 0.85rem;
    }
    
    .cita-final-content blockquote {
        font-size: 1rem;
    }
}