.history-section {
    background-color: #243529;
    padding: 100px 0;
    color: #D4C9B0;
    overflow: hidden;
}

.history-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.history-header {
    text-align: center;
    margin-bottom: 60px;
}

.history-main-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    line-height: 1.1;
}

.italic-accent {
    font-style: italic;
    color: #828E65;
}

/* LAYOUT */
.history-content {
    display: flex;
    align-items: stretch; /* Altura de fotos equiparada naturalmente a la del texto */
    gap: 50px; 
}

.history-visuals {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* LA CLAVE: Contenedor toma el 100% */
.image-wrapper.main-img {
    width: 100%;       
    height: 100%;      /* Rellena la sección verticalmente */
    min-height: 500px; /* Evita colapsos si hay poco texto */
    border-radius: 20px;
    overflow: hidden;
    position: relative; /* Contexto de posicionamiento absoluto para el badge */
}

.history-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centra párrafos verticalmente respecto a la foto */
}

/* IMÁGENES */
.main-img img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Evita que la foto se deforme al escalar */
    border-radius: 20px;
    border: 1px solid rgba(130, 142, 101, 0.3);
}

.small-img-overlay {
    position: absolute;
    top: 40px;
    left: -40px; 
    width: 200px;  
    height: 200px;
    z-index: 10;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4); 
}

.small-img-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ELEMENTO FLOTANTE 2019 CORREGIDO Y ANCLADO ARRIBA */
.floating-badge {
    position: absolute;
    top: 25px; 
    right: 25px; 
    bottom: auto; 
    
    background: transparent;
    color: white;
    padding: 12px 18px;
    border-radius: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    z-index: 15; 
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    
    /* Vinculado al nombre correcto de tu @keyframes */
    animation: floatAnim 3s ease-in-out infinite; 
}

.floating-badge .year {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: bold;
    line-height: 1;
}

.floating-badge .label {
    font-size: 0.6rem;
    letter-spacing: 2px;
    font-weight: bold;
    margin-top: 4px;
}

@keyframes floatAnim {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* TEXTOS */
.quote {
    font-style: italic;
    font-size: 1.2rem;
    margin-bottom: 25px;
    opacity: 0.9;
}

.description {
    font-size: 0.9rem;
    line-height: 1.8;
    margin-bottom: 20px;
    opacity: 0.7;
}

/* GRID DE CUADROS */
.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 40px 0;
}

.feature-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 10px;
    display: flex;
    gap: 15px;
    align-items: center;
    border: 1px solid rgba(130, 142, 101, 0.1);
    transition: 0.4s;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: #FFDAB9;
    transform: scale(1.03);
}

.feature-icon {
    font-size: 1.5rem;
    filter: sepia(1) saturate(0.5);
}

.feature-info h4 {
    font-size: 0.95rem;
    color: #D4C9B0;
    margin-bottom: 4px;
}

.feature-info p {
    font-size: 0.75rem;
    opacity: 0.5;
}

/* BOTÓN */
.history-btn {
    display: inline-block;
    padding: 15px 30px;
    border: 1px solid #828E65;
    color: #828E65;
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.8rem;
    letter-spacing: 1px;
    transition: 0.3s;
}

.history-btn:hover {
    background: #828E65;
    color: #243529;
}

.elegant-divider-top {
    width: 60%;
    height: 1px;
    margin: 0 auto 50px auto;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(130, 142, 101, 0.2) 20%,
            rgba(130, 142, 101, 0.8) 50%,
            rgba(130, 142, 101, 0.2) 80%,
            transparent 100%);
    position: relative;
}

.elegant-divider-top::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 4px;
    background-color: #828E65;
    border-radius: 50%;
    opacity: 0.6;
}

/* RESPONSIVO Y REVEAL AL HACER SCROLL */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    .history-content {
        flex-direction: column;
    }
    
    .image-wrapper.main-img {
        min-height: 350px; /* Reducimos la altura en móviles para mejor balance */
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}