/* Sección Historia - Elegante Minimalista Mejorada */
.historia {
    background: var(--bg-dark);
    position: relative;
    overflow: hidden;
}

.historia::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(212, 196, 168, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(201, 169, 110, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.historia-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

/* Header mejorado */
.historia-header {
    text-align: center;
    margin-bottom: 5rem;
    position: relative;
    opacity: 0;
    animation: fadeInUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s both;
}

.section-ornament {
    position: relative;
    height: 30px;
    margin: 0 auto 2rem;
    width: 200px;
}

.section-ornament.top::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-beige), transparent);
}

.section-ornament.top::after {
    content: '❦';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--accent-beige);
    font-size: 1.5rem;
    background: var(--bg-dark);
    padding: 0 1rem;
}

.historia-header h2 {
    font-family: var(--font-script);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: var(--accent-cream);
    font-weight: 400;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

/* Timeline mejorada */
.historia-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.timeline-decoration {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        var(--accent-beige) 10%,
        var(--gold-accent) 50%,
        var(--accent-beige) 90%,
        transparent 100%
    );
    transform: translateX(-50%);
    z-index: 1;
}

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

.historia-item {
    position: relative;
    margin-bottom: 3rem;
    opacity: 0;
    animation: slideInTimeline 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.historia-item:nth-child(odd) {
    text-align: right;
    padding-right: 60px;
}

.historia-item:nth-child(even) {
    text-align: left;
    padding-left: 60px;
}

.timeline-dot {
    position: absolute;
    top: 1rem;
    width: 12px;
    height: 12px;
    background: var(--gold-accent);
    border: 2px solid var(--bg-dark);
    border-radius: 50%;
    z-index: 3;
    box-shadow: 0 0 0 3px var(--accent-beige);
    transition: var(--transition-smooth);
}

.historia-item:nth-child(odd) .timeline-dot {
    right: 54px;
}

.historia-item:nth-child(even) .timeline-dot {
    left: 54px;
}

.historia-item:hover .timeline-dot {
    transform: scale(1.2);
    box-shadow: 0 0 0 3px var(--gold-accent), 0 0 20px rgba(201, 169, 110, 0.3);
}

.historia-paragraph {
    font-family: var(--font-sans);
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    font-weight: 300;
    margin: 0;
    padding: 1.5rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    position: relative;
    transition: var(--transition-smooth);
}

.historia-paragraph:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
    border-color: rgba(212, 196, 168, 0.2);
}

/* Flechas de conexión */
.historia-item:nth-child(odd) .historia-paragraph::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 1.5rem;
    width: 0;
    height: 0;
    border-left: 8px solid var(--bg-card);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.historia-item:nth-child(even) .historia-paragraph::after {
    content: '';
    position: absolute;
    left: -8px;
    top: 1.5rem;
    width: 0;
    height: 0;
    border-right: 8px solid var(--bg-card);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

/* Highlight mejorado */
.historia-highlight {
    display: flex;
    justify-content: center;
    margin-top: 4rem;
    opacity: 0;
    animation: fadeInScale 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1s both;
}

.highlight-card {
    position: relative;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-dark-light) 100%);
    padding: 2.5rem 2rem 2rem;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    transition: var(--transition-smooth);
    overflow: visible;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.highlight-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-beige), var(--gold-accent), var(--accent-beige));
    border-radius: 12px 12px 0 0;
}

.highlight-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-beige);
}

/* Ornamento superior corregido */
.quote-ornament {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 30px;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    border: 1px solid var(--border-subtle);
}

.quote-ornament::before {
    content: '❦ ❦ ❦';
    color: var(--accent-beige);
    font-size: 0.7rem;
    letter-spacing: 6px;
    line-height: 1;
}

/* Quote estructura corregida */
.historia-quote {
    margin: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.quote-marks-container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    position: relative;
    margin-bottom: 1rem;
}

.quote-mark {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--accent-beige);
    line-height: 1;
    opacity: 0.7;
    user-select: none;
}

.quote-mark.opening {
    align-self: flex-start;
    margin-right: auto;
    margin-left: 1rem;
    transform: translateY(-0.5rem);
}

.quote-mark.closing {
    align-self: flex-end;
    margin-left: auto;
    margin-right: 1rem;
    transform: rotate(180deg) translateY(0.5rem);
}

.quote-text {
    font-family: var(--font-script);
    font-size: 1.4rem;
    color: var(--gold-accent);
    font-weight: 400;
    line-height: 1.4;
    margin: 0 2rem;
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    text-align: center;
    min-height: 3rem;
}

/* Decoración de corazones corregida */
.hearts-decoration {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    height: 2rem;
}

.heart {
    color: var(--accent-beige);
    font-size: 1rem;
    opacity: 0.6;
    animation: heartBeat 2s infinite ease-in-out;
    display: inline-block;
    line-height: 1;
}

.heart:nth-child(1) { animation-delay: 0s; }
.heart:nth-child(2) { animation-delay: 0.3s; }
.heart:nth-child(3) { animation-delay: 0.6s; }

/* Animaciones */
@keyframes slideInTimeline {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes heartBeat {
    0%, 70%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    35% {
        opacity: 1;
        transform: scale(1.15);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
   .historia-timeline {
       max-width: 100%;
   }
   
   .timeline-decoration {
       display: none;
   }
   
   .historia-item:nth-child(odd),
   .historia-item:nth-child(even) {
       text-align: center;
       padding-left: 0;
       padding-right: 0;
       margin-bottom: 2rem;
   }
   
   .historia-item:nth-child(odd) .timeline-dot,
   .historia-item:nth-child(even) .timeline-dot {
       display: none;
   }
   
   .historia-item:nth-child(odd) .historia-paragraph::after,
   .historia-item:nth-child(even) .historia-paragraph::after {
       display: none;
   }
   
   .historia-paragraph {
       font-size: 1rem;
       padding: 1.5rem;
       text-align: center;
       margin: 0 auto;
       max-width: 100%;
       border-radius: 12px;
   }
   
   .historia-highlight {
       margin-top: 3rem;
       padding: 0 1rem;
   }
   
   .highlight-card {
       padding: 2rem 1.5rem 1.5rem;
       max-width: 100%;
       margin: 0;
   }
   
   .quote-ornament {
       width: 70px;
       height: 25px;
   }
   
   .quote-ornament::before {
       font-size: 0.6rem;
       letter-spacing: 4px;
   }
   
   .quote-mark {
       font-size: 2rem;
   }
   
   .quote-mark.opening {
       margin-left: 0.5rem;
   }
   
   .quote-mark.closing {
       margin-right: 0.5rem;
   }
   
   .quote-text {
       font-size: 1.2rem;
       margin: 0 1rem;
       min-height: 2.5rem;
   }
   
   .hearts-decoration {
       margin-top: 1rem;
       gap: 0.8rem;
   }
   
   .heart {
       font-size: 0.9rem;
   }
}

@media (max-width: 480px) {
   .historia-header {
       margin-bottom: 3rem;
   }
   
   .section-ornament {
       width: 150px;
   }
   
   .historia-item {
       margin-bottom: 1.5rem;
   }
   
   .historia-paragraph {
       font-size: 0.95rem;
       padding: 1.25rem;
       text-align: center;
       line-height: 1.6;
   }
   
   .highlight-card {
       padding: 1.5rem 1rem 1rem;
       border-radius: 8px;
   }
   
   .quote-ornament {
       width: 60px;
       height: 20px;
       top: -10px;
   }
   
   .quote-ornament::before {
       content: '❦ ❦';
       font-size: 0.5rem;
       letter-spacing: 3px;
   }
   
   .quote-marks-container {
       margin-bottom: 0.5rem;
   }
   
   .quote-mark {
       font-size: 1.5rem;
   }
   
   .quote-mark.opening {
       margin-left: 0.25rem;
       transform: translateY(-0.25rem);
   }
   
   .quote-mark.closing {
       margin-right: 0.25rem;
       transform: rotate(180deg) translateY(0.25rem);
   }
   
   .quote-text {
       font-size: 1rem;
       margin: 0 0.5rem;
       min-height: 2rem;
       line-height: 1.3;
   }
   
   .hearts-decoration {
       margin-top: 0.8rem;
       gap: 0.6rem;
   }
   
   .heart {
       font-size: 0.8rem;
   }
}

@media (max-width: 360px) {
   .historia-paragraph {
       font-size: 0.9rem;
       padding: 1rem;
       text-align: center;
       line-height: 1.5;
   }
   
   .highlight-card {
       padding: 1.25rem 0.75rem 0.75rem;
   }
   
   .quote-text {
       font-size: 0.9rem;
       margin: 0 0.25rem;
   }
   
   .quote-mark {
       font-size: 1.25rem;
   }
}