/* --- FILOSOFÍA SECTION --- */
.philosophy-section {
    min-height: 150vh;
    background: var(--bg-color);
    position: relative;
    overflow: hidden;
    padding: 100px 5%;
}

.philosophy-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: center;
    min-height: 100vh;
    position: sticky;
    top: 0;
}

/* Lado izquierdo: Perfil */
.philosophy-left {
    display: flex;
    justify-content: flex-end;
    padding-right: 40px;
}

.profile-card {
    background: var(--white);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    position: relative;
    z-index: 2;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.profile-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
}

.profile-image {
    height: 300px;
    overflow: hidden;
    position: relative;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(120%);
    transition: filter 0.5s ease, transform 0.5s ease;
}

.profile-card:hover .profile-image img {
    filter: grayscale(0%) contrast(110%);
    transform: scale(1.05);
}

.profile-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, var(--white), transparent);
}

.profile-info {
    padding: 30px;
}

.profile-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--text-color);
    font-weight: 700;
}

.profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.badge {
    padding: 6px 15px;
    background: rgba(255, 0, 50, 0.1);
    color: var(--accent-red);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(255, 0, 50, 0.2);
    transition: all 0.3s ease;
}

.badge:hover {
    background: rgba(255, 0, 50, 0.2);
    transform: translateY(-2px);
}

.profile-quote {
    font-style: italic;
    color: var(--gray-dark);
    font-size: 1rem;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    line-height: 1.6;
}

/* Lado derecho: Texto reveal - VERSIÓN CORREGIDA */
.philosophy-right {
    padding-left: 40px;
}

.text-reveal-container {
    position: relative;
    width: 100%;
    max-width: 600px;
}

.reveal-text {
    font-size: clamp(3rem, 4vw + 1rem, 5rem);
    line-height: 1.1;
    font-weight: 700;
    margin: 0;
    position: relative;
    overflow: hidden;
}

.reveal-text > span {
    display: block;
    position: relative;
    color: rgba(0, 0, 0, 0.2); /* Color base tenue */
    padding: 20px 0;
    /* Gradiente que se expande horizontalmente */
    background: linear-gradient(
        90deg, 
        var(--accent-red) 0%, 
        var(--accent-red) var(--progress, 0%), 
        rgba(0, 0, 0, 0.2) var(--progress, 0%), 
        rgba(0, 0, 0, 0.2) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 100%;
    background-position: left center;
    background-repeat: no-repeat;
    transition: --progress 0.1s linear;
}

/* Efecto de sombra para profundidad */
.reveal-text > span::after {
    content: attr(data-text);
    position: absolute;
    top: 20px;
    left: 0;
    width: 100%;
    color: transparent;
    background: linear-gradient(
        90deg,
        transparent 0%,
        transparent var(--progress, 0%),
        rgba(0, 0, 0, 0.1) var(--progress, 0%),
        rgba(0, 0, 0, 0.1) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    z-index: -1;
    filter: blur(2px);
    opacity: 0.7;
}

/* Indicador de scroll */
.scroll-indicator {
    position: absolute;
    bottom: -80px;
    right: 0;
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--gray-dark);
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.scroll-indicator:hover {
    opacity: 1;
}

.scroll-line {
    width: 200px;
    height: 2px;
    background: rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}

.scroll-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--accent-red);
    border-radius: 2px;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(255, 0, 50, 0.3);
}

/* Efecto de fondo decorativo para la sección */
.philosophy-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1000px;
    height: 1000px;
    background: radial-gradient(
        circle,
        rgba(255, 0, 50, 0.05) 0%,
        rgba(255, 0, 50, 0.02) 30%,
        transparent 70%
    );
    z-index: 0;
    opacity: 0.5;
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.7;
    }
}

/* Líneas decorativas */
.philosophy-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(90deg, transparent 49%, rgba(255, 0, 50, 0.05) 50%, transparent 51%),
        linear-gradient(90deg, transparent 49%, rgba(255, 0, 50, 0.05) 50%, transparent 51%);
    background-size: 100px 100px, 50px 50px;
    background-position: center center;
    z-index: 0;
    pointer-events: none;
    opacity: 0.3;
}

/* Asegurar que el contenido esté sobre el fondo */
.philosophy-container {
    position: relative;
    z-index: 1;
}

/* Efecto de brillo al pasar el mouse sobre el texto */
.reveal-text:hover > span {
    filter: brightness(1.1);
}

/* Responsive */
@media (max-width: 1024px) {
    .philosophy-container {
        grid-template-columns: 1fr;
        gap: 60px;
        min-height: auto;
        position: relative;
    }
    
    .philosophy-left {
        justify-content: center;
        padding-right: 0;
    }
    
    .philosophy-right {
        padding-left: 0;
        text-align: center;
    }
    
    .reveal-text {
        font-size: clamp(2.5rem, 3vw + 1rem, 4rem);
    }
    
    .scroll-indicator {
        position: relative;
        bottom: 0;
        right: 0;
        justify-content: center;
        margin-top: 60px;
        width: 100%;
    }
    
    .scroll-line {
        width: 150px;
    }
    
    .philosophy-section {
        min-height: 120vh;
        padding: 80px 5%;
    }
}

@media (max-width: 768px) {
    .philosophy-section {
        padding: 60px 5%;
        min-height: 100vh;
    }
    
    .profile-card {
        max-width: 100%;
    }
    
    .philosophy-container {
        gap: 40px;
    }
    
    .profile-title {
        font-size: 1.5rem;
    }
    
    .reveal-text > span {
        font-size: 2.2rem;
        line-height: 1.2;
    }
    
    .scroll-line {
        width: 120px;
    }
    
    .scroll-indicator {
        font-size: 0.8rem;
        gap: 10px;
    }
    
    /* Reducir efectos en móvil para rendimiento */
    .philosophy-section::before,
    .philosophy-section::after {
        opacity: 0.2;
    }
}

/* Animación de entrada para la sección */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.philosophy-container {
    animation: fadeInUp 1s ease-out;
}

/* Efecto de borde sutil para el contenedor de texto */
.text-reveal-container {
    position: relative;
    padding: 30px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.text-reveal-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--accent-red), transparent, var(--accent-red));
    border-radius: 22px;
    z-index: -1;
    opacity: 0.3;
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
}

/* Ajuste para modo oscuro (si lo implementas después) */
@media (prefers-color-scheme: dark) {
    .philosophy-section {
        background: #121212;
    }
    
    .profile-card {
        background: #1e1e1e;
        color: #ffffff;
    }
    
    .profile-image::after {
        background: linear-gradient(to top, #1e1e1e, transparent);
    }
    
    .profile-title {
        color: #ffffff;
    }
    
    .profile-quote {
        color: #cccccc;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .reveal-text > span {
        color: rgba(255, 255, 255, 0.2);
    }
    
    .text-reveal-container {
        background: rgba(30, 30, 30, 0.95);
    }
    
    .scroll-indicator {
        color: #cccccc;
    }
    
    .scroll-line {
        background: rgba(255, 255, 255, 0.1);
    }
}