/* Transition Image - Elegante Minimalista - Tema Claro */
.transition-image {
    height: 80vh;
    min-height: 500px;
    max-height: 800px;
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.transition-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end; /* Cambia de 'center' a 'flex-end' */
    justify-content: center;
    padding-bottom: 5vh; /* Añade padding para que no quede completamente abajo */
}

.transition-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    filter: grayscale(0%) brightness(1.1) contrast(1.2);
    transition: var(--transition-smooth);
    z-index: 1;
}

.transition-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Overlay claro para mantener legibilidad del texto */
    background: linear-gradient(
        135deg,
        rgba(254, 254, 254, 0.4) 0%,
        rgba(248, 248, 248, 0.3) 50%,
        rgba(242, 242, 242, 0.5) 100%
    );
    z-index: 2;
}

.transition-content {
    position: relative;
    z-index: 3;
    width: 100%;
    text-align: center;
    opacity: 0;
    animation: fadeInUp 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.5s both;
}

.transition-text {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    /* Fondo claro con transparencia para el texto */
    background: rgba(254, 254, 254, 0.85);
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-card);
}

.transition-text:hover {
    background: rgba(248, 248, 248, 0.9);
    border-color: rgba(139, 115, 85, 0.4);
    transform: translateY(-5px);
    box-shadow: var(--shadow-soft);
}

.transition-title {
    font-family: var(--font-serif);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: var(--text-primary);
    font-weight: 300;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.transition-subtitle {
    font-family: var(--font-script);
    font-size: clamp(1.125rem, 2.5vw, 1.375rem);
    color: var(--accent-beige);
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
    font-style: italic;
}

.transition-ornaments {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.ornament {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--accent-beige);
    border-radius: 50%;
    opacity: 0.7;
    animation: floatOrnament 6s infinite ease-in-out;
    box-shadow: 0 0 5px rgba(139, 115, 85, 0.3);
}

.ornament-1 {
    top: 20%;
    left: 15%;
    animation-delay: 0s;
}

.ornament-2 {
    top: 30%;
    right: 20%;
    animation-delay: 2s;
}

.ornament-3 {
    bottom: 25%;
    left: 25%;
    animation-delay: 4s;
}

@keyframes floatOrnament {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-10px) scale(1.2);
        opacity: 0.9;
    }
}

/* Efecto parallax sutil */
.transition-image:hover .transition-background {
    transform: scale(1.02);
    filter: grayscale(0%) brightness(1.15) contrast(1.3);
}

/* Líneas decorativas en los bordes */
.transition-image::before,
.transition-image::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--accent-beige),
        transparent
    );
    z-index: 4;
}

.transition-image::before {
    top: 50px;
    animation: expandLine 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1s both;
}

.transition-image::after {
    bottom: 50px;
    animation: expandLine 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1.2s both;
}

@keyframes expandLine {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 100px;
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .transition-background {
        background-attachment: scroll;
    }
}

@media (max-width: 768px) {
    .transition-image {
        height: 60vh;
        min-height: 400px;
    }
    
    .transition-text {
        padding: 1.5rem;
        margin: 0 1rem;
    }

    .transition-title {
        font-size: 1.3rem;
    }

    .transition-subtitle {
        font-size: 1.1rem;
    }
    
    .transition-image::before,
    .transition-image::after {
        width: 60px;
    }
    
    .ornament-1 {
        top: 15%;
        left: 10%;
    }
    
    .ornament-2 {
        top: 25%;
        right: 15%;
    }
    
    .ornament-3 {
        bottom: 20%;
        left: 20%;
    }
}

@media (max-width: 480px) {
    .transition-image {
        height: 50vh;
        min-height: 350px;
    }
    
    .transition-text {
        padding: 1rem;
        margin: 0 0.5rem;
    }
    
    .transition-title {
        margin-bottom: 0.5rem;
    }
    
    .transition-image::before,
    .transition-image::after {
        width: 40px;
    }
    
    .transition-image::before {
        top: 30px;
    }
    
    .transition-image::after {
        bottom: 30px;
    }
}

/* Optimización de rendimiento */
@media (prefers-reduced-motion: reduce) {
    .ornament {
        animation: none;
    }
    
    .transition-image::before,
    .transition-image::after {
        animation: none;
        opacity: 1;
        width: 100px;
    }
    
    .transition-background {
        background-attachment: scroll;
    }
}

/* Estados de carga */
.loading .transition-content {
    opacity: 0;
    transform: translateY(40px);
}

.loaded .transition-content {
    opacity: 1;
    transform: translateY(0);
    transition: var(--transition-smooth);
}

/* Mejora de accesibilidad */
@media (prefers-contrast: high) {
    .transition-overlay {
        background: linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.6) 0%,
            rgba(248, 248, 248, 0.5) 50%,
            rgba(255, 255, 255, 0.7) 100%
        );
    }
    
    .transition-text {
        background: rgba(255, 255, 255, 0.95);
        border-color: var(--accent-beige);
    }
}