/**
 * Efectos Profesionales para la Sección About (Sobre Nosotros)
 * Animaciones elegantes, transiciones suaves y efectos modernos
 */

/* ============================================
   CONTENEDOR PRINCIPAL
   ============================================ */

.about {
    position: relative;
    overflow: hidden;
}

/* Partículas de fondo flotantes */
.about::before,
.about::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(25, 119, 204, 0.08), transparent);
    animation: floatParticle 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.about::before {
    width: 400px;
    height: 400px;
    top: 10%;
    left: -100px;
}

.about::after {
    width: 350px;
    height: 350px;
    bottom: 10%;
    right: -100px;
    animation-delay: 10s;
}

@keyframes floatParticle {
    0%, 100% { 
        transform: translate(0, 0) scale(1);
        opacity: 0.5;
    }
    25% { 
        transform: translate(50px, -50px) scale(1.1);
        opacity: 0.7;
    }
    50% { 
        transform: translate(100px, 0) scale(1);
        opacity: 0.5;
    }
    75% { 
        transform: translate(50px, 50px) scale(0.9);
        opacity: 0.6;
    }
}

/* Asegurar que el contenido esté por encima */
.about .container-fluid,
.about .row {
    position: relative;
    z-index: 1;
}

/* ============================================
   VIDEO BOX CON EFECTOS
   ============================================ */

.about .video-box {
    position: relative;
    background-size: cover;
    background-position: center;
    min-height: 500px;
    overflow: hidden;
}

/* Iframe de video con transición suave */
.about-video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.about-video-iframe[style*="display: block"] {
    opacity: 1;
}

/* Reducir opacidad del overlay cuando el video está reproduciéndose */
.about .video-box.video-playing::before {
    opacity: 0.2;
    transition: opacity 0.5s ease;
}

/* Overlay oscuro animado */
.about .video-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(25, 119, 204, 0.6) 50%,
        rgba(0, 0, 0, 0.7) 100%
    );
    background-size: 200% 200%;
    animation: gradientMove 15s ease infinite;
    z-index: 1;
}

@keyframes gradientMove {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Botón de Play con efectos avanzados */
.about .play-btn {
    position: relative;
    z-index: 2;
    width: 94px;
    height: 94px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: playPulse 2s ease-in-out infinite;
    cursor: pointer;
    user-select: none;
}

/* Efecto de pulso continuo */
@keyframes playPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 15px 40px rgba(25, 119, 204, 0.4);
    }
}

/* Anillos expansivos alrededor del botón */
.about .play-btn::before,
.about .play-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: ripple 2s ease-out infinite;
}

.about .play-btn::after {
    animation-delay: 1s;
}

@keyframes ripple {
    0% {
        width: 100%;
        height: 100%;
        opacity: 1;
    }
    100% {
        width: 200%;
        height: 200%;
        opacity: 0;
    }
}

/* Hover del botón de play */
.about .play-btn:hover {
    transform: scale(1.15) rotate(360deg);
    background: radial-gradient(circle, rgba(25, 119, 204, 1) 0%, rgba(45, 122, 184, 1) 100%);
    box-shadow: 0 20px 50px rgba(25, 119, 204, 0.5);
}

.about .play-btn:hover::before,
.about .play-btn:hover::after {
    border-color: rgba(255, 255, 255, 1);
    animation-duration: 1s;
}

/* ============================================
   TÍTULOS Y TEXTOS CON ANIMACIONES
   ============================================ */

.about h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 20px;
}

/* Línea decorativa bajo el título principal */
.about h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #1977cc 0%, #87CEFA 100%);
    border-radius: 2px;
    animation: lineGrow 1s ease forwards;
}

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

.about > .icon-boxes > p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #5a6c7d;
    margin-bottom: 30px;
}

/* ============================================
   CAJAS DE ICONOS CON EFECTOS
   ============================================ */

.about .icon-boxes > div {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Borde animado con gradiente */
.about .icon-boxes > div::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px;
    padding: 3px;
    background: linear-gradient(135deg, #1977cc, #87CEFA, #C0C0C0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.about .icon-boxes > div:hover::before {
    opacity: 1;
}

/* Efecto de hover en las cajas */
.about .icon-boxes > div:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(25, 119, 204, 0.2);
}

/* Icono con efectos */
.about .icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #1977cc 0%, #2d7ab8 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.4s ease;
    box-shadow: 0 8px 16px rgba(25, 119, 204, 0.3);
}

.about .icon i {
    font-size: 32px;
    color: white;
    transition: all 0.4s ease;
}

/* Efecto de rotación y escala en el icono al hover */
.about .icon-boxes > div:hover .icon {
    transform: rotateY(360deg) scale(1.1);
    box-shadow: 0 12px 24px rgba(25, 119, 204, 0.5);
}

.about .icon-boxes > div:hover .icon i {
    transform: scale(1.2);
}

/* Brillo que se mueve por el icono */
.about .icon::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 40%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 60%
    );
    transform: rotate(45deg);
    animation: iconShine 3s ease-in-out infinite;
}

@keyframes iconShine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

/* ============================================
   TÍTULOS DE CADA CAJA
   ============================================ */

/* Estilos base para títulos (sin enlaces) */
.about .title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

/* Estilos para títulos con enlaces (si se necesitan en el futuro) */
.about .title a {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.about .title a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #1977cc, #87CEFA);
    transition: width 0.4s ease;
}

.about .icon-boxes > div:hover .title a::after {
    width: 100%;
}

.about .icon-boxes > div:hover .title a {
    color: #1977cc;
    transform: translateX(5px);
}

/* ============================================
   DESCRIPCIÓN
   ============================================ */

.about .description {
    color: #5a6c7d;
    line-height: 1.8;
    margin-bottom: 0;
    transition: color 0.3s ease;
}

.about .icon-boxes > div:hover .description {
    color: #2c3e50;
}

/* ============================================
   ANIMACIONES DE SCROLL
   ============================================ */

.scroll-fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.scroll-fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Delays para efecto escalonado */
.scroll-fade-up:nth-child(1) { transition-delay: 0.1s; }
.scroll-fade-up:nth-child(2) { transition-delay: 0.2s; }
.scroll-fade-up:nth-child(3) { transition-delay: 0.3s; }
.scroll-fade-up:nth-child(4) { transition-delay: 0.4s; }
.scroll-fade-up:nth-child(5) { transition-delay: 0.5s; }

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

@media (max-width: 992px) {
    .about h3 {
        font-size: 2rem;
    }
    
    .about .video-box {
        min-height: 400px;
    }
    
    .about .icon {
        width: 56px;
        height: 56px;
    }
    
    .about .icon i {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .about h3 {
        font-size: 1.75rem;
    }
    
    .about .video-box {
        min-height: 300px;
        margin-bottom: 30px;
    }
    
    .about .play-btn {
        width: 80px;
        height: 80px;
    }
    
    .about .icon-boxes > div {
        padding: 20px;
    }
    
    .about::before,
    .about::after {
        width: 250px;
        height: 250px;
    }
}

/* ============================================
   EFECTO DE PARTÍCULAS EN MOVIMIENTO
   ============================================ */

.about .icon-boxes {
    position: relative;
}

.about .icon-boxes::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(135, 206, 250, 0.1), transparent);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes pulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.3;
    }
}
