/********** Template CSS **********/
:root {
    --primary: #6244C5;
    --secondary: #FFC448;
    --light: #FAFAFB;
    --dark: #12141D;
    
    /* Variables base de fondo y texto */
    --bg-body: #ffffff;
    --bg-section: #f8f9fa; /* Equivale al bg-light */
    --card-bg: #ffffff; /* Equivale al bg-white */
    --text-color: #666565;
    --heading-color: #12141D;
}

/* 🌙 EL MODO OSCURO (Reemplaza los colores cuando está activo) */
[data-theme="dark"] {
    --bg-body: #0d0f14;
    --bg-section: #14171f;
    --card-bg: #1c202a;
    --text-color: #aeb4c0;
    --heading-color: #ffffff;
    --dark: #ffffff; /* Invertimos el oscuro por blanco */
}

/* Forzar transiciones suaves y aplicar variables */
body {
    background-color: var(--bg-body) !important;
    color: var(--text-color) !important;
    transition: background-color 0.4s ease, color 0.4s ease;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--heading-color) !important;
    transition: color 0.4s ease;
}

/* Adaptamos las clases de Bootstrap al Modo Oscuro */
[data-theme="dark"] .bg-white { background-color: var(--card-bg) !important; }
[data-theme="dark"] .bg-light { background-color: var(--bg-section) !important; }
[data-theme="dark"] .text-dark { color: var(--heading-color) !important; }
[data-theme="dark"] .navbar { background-color: rgba(20, 23, 31, 0.95) !important; border-bottom: 1px solid #333;}

/* 👇 AQUÍ ESTABA LA LLAVE EXTRA QUE ROMPÍA TU CÓDIGO. YA LA ELIMINÉ 👇 */

.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    z-index: 99;
}

.my-6 {
    margin-top: 6rem;
    margin-bottom: 6rem;
}

.py-6 {
    padding-top: 6rem;
    padding-bottom: 6rem;
}


/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}


/*** Button ***/
.btn {
    font-weight: 500;
    transition: .5s;
}

.btn.btn-primary,
.btn.btn-secondary {
    color: #FFFFFF;
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}


/*** Navbar ***/
.navbar.fixed-top {
    display: none;
    transition: .5s;
}

.navbar .navbar-nav .nav-link {
    padding: 20px 15px;
    color: var(--dark);
    font-size: 18px;
    font-weight: 600;
    outline: none;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--primary);
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link  {
        padding: 10px 0;
    }
}


/*** Header ***/
#home {
    margin-bottom: 6rem;
    background: url(../img/bg-header.png) left top no-repeat;
}

.typed-cursor {
    font-size: 30px;
    color: var(--dark);
}

.btn-play {
    position: relative;
    display: block;
    box-sizing: content-box;
    width: 16px;
    height: 26px;
    border-radius: 100%;
    border: none;
    outline: none !important;
    padding: 18px 20px 20px 28px;
    background: var(--primary);
}

.btn-play:before {
    content: "";
    position: absolute;
    z-index: 0;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    display: block;
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 100%;
    animation: pulse-border 1500ms ease-out infinite;
}

.btn-play:after {
    content: "";
    position: absolute;
    z-index: 1;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    display: block;
    width: 60px;
    height: 60px;
    background: #FFFFFF;
    border-radius: 100%;
    transition: all 200ms;
}

.btn-play span {
    display: block;
    position: relative;
    z-index: 3;
    width: 0;
    height: 0;
    left: -1px;
    border-left: 16px solid var(--primary);
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
}

@keyframes pulse-border {
    0% {
        transform: translateX(-50%) translateY(-50%) translateZ(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateX(-50%) translateY(-50%) translateZ(0) scale(2);
        opacity: 0;
    }
}

.modal-video .modal-dialog {
    position: relative;
    max-width: 800px;
    margin: 60px auto 0 auto;
}

.modal-video .modal-body {
    position: relative;
    padding: 0px;
}

.modal-video .close {
    position: absolute;
    width: 30px;
    height: 30px;
    right: 0px;
    top: -30px;
    z-index: 999;
    font-size: 30px;
    font-weight: normal;
    color: #FFFFFF;
    background: #000000;
    opacity: 1;
}


/*** About ***/
#about .years .display-1 {
    font-size: 10rem;
    line-height: 9rem;
}

#about .years h5 {
    letter-spacing: 30px;
    margin-right: -30px;
}


/*** Skills ***/
#skill .progress {
    height: 5px;
    border-radius: 5px;
}

#skill .progress .progress-bar {
    width: 0px;
    border-radius: 5px;
    transition: 3s;
}

#skill .nav-pills .nav-link {
    color: var(--dark);
}

#skill .nav-pills .nav-link.active {
    color: #FFFFFF;
}

#skill .tab-content hr {
    width: 30px;
}


/*** Service ***/
.service-item .bg-icon {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url(../img/bg-icon.png) center center no-repeat;
    background-size: cover;
}


/*** Project Portfolio ***/
#portfolio-flters li {
    display: inline-block;
    font-weight: 500;
    color: var(--dark);
    cursor: pointer;
    transition: .5s;
    border-bottom: 2px solid transparent;
}

#portfolio-flters li:hover,
#portfolio-flters li.active {
    color: var(--primary);
    border-color: var(--primary);
}

.portfolio-img {
    position: relative;
}

.portfolio-btn {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(98, 68, 197, .9);
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 30px;
    padding-bottom: 100px !important;
    opacity: 0;
    transition: .5s;
}

.portfolio-item:hover .portfolio-btn {
    opacity: 1;
    padding-bottom: 30px !important;
}


/*** Team ***/
.team-item img {
    transition: .5s;
}

.team-item:hover img {
    opacity: .7;
}

.team-item .team-text {
    position: absolute;
    left: 0;
    right: 60px;
    bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    opacity: 0;
    transition: .5s;
}

.team-item:hover .team-text {
    right: 30px;
    opacity: 1;
}

.team-item .team-text div {
    transition: .5s;
}

.team-item:hover .team-text div {
    margin-left: 30px;
}


/*** Testimonial ***/
.testimonial-left,
.testimonial-right {
    position: relative;
}

.testimonial-left img,
.testimonial-right img {
    position: absolute;
    padding: 5px;
    border: 1px solid var(--secondary);
    border-radius: 70px;
}

.testimonial-left img:nth-child(1),
.testimonial-right img:nth-child(3) {
    width: 70px;
    height: 70px;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
}

.testimonial-left img:nth-child(2),
.testimonial-right img:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
}

.testimonial-left img:nth-child(3),
.testimonial-right img:nth-child(1) {
    width: 50px;
    height: 50px;
    bottom: 10%;
    right: 10%;
}

.testimonial-carousel .owl-item img {
    width: 120px;
    height: 120px;
}

.testimonial-carousel .testimonial-icon {
    position: absolute;
    width: 40px;
    height: 40px;
    left: 50%;
    bottom: -15px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    border: 1px solid var(--secondary);
    border-radius: 60px;
}

.testimonial-carousel .owl-dots {
    height: 40px;
    margin-top: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin: 0 5px;
    width: 30px;
    height: 30px;
    background: #FFFFFF;
    border: 2px solid var(--secondary);
    border-radius: 30px;
    transition: .5s;
}

.testimonial-carousel .owl-dot::after {
    position: absolute;
    content: "";
    width: 16px;
    height: 16px;
    top: 5px;
    left: 5px;
    border-radius: 16px;
    background: var(--secondary);
    transition: .5s;
}

.testimonial-carousel .owl-dot.active::after {
    background: var(--primary);
}

/*** Logo RVBRICA Premium ***/
.logo-rvbrica {
    font-family: 'Open Sans', sans-serif;
    font-size: 2.2rem;
    font-weight: 800; /* Letra gruesa para darle peso */
    color: var(--dark); /* Color oscuro casi negro */
    text-transform: uppercase;
    letter-spacing: 3px;
    display: flex;
    align-items: center;
    margin: 0;
    transition: all 0.3s ease;
}

.logo-rvbrica:hover {
    color: var(--primary);
}

.logo-rvbrica .v-letter {
    font-weight: 300; /* La 'V' delgada para darle el toque minimalista/tecnológico */
    color: var(--primary); /* Se pintará del color morado de tu CSS */
    font-size: 2.8rem; /* Un poco más grande para destacar */
    margin: 0 4px;
    line-height: 1;
}

.logo-rvbrica .dot {
    color: var(--primary);
    font-size: 3rem;
    line-height: 0;
    margin-left: 2px;
}

/* Ajuste de tamaño para celulares */
@media (max-width: 991.98px) {
    .logo-rvbrica {
        font-size: 1.6rem;
    }
    .logo-rvbrica .v-letter {
        font-size: 2rem;
    }
    .logo-rvbrica .dot {
        font-size: 2rem;
    }
}

/* Ajuste de tamaño uniforme para las fotos del equipo */
#team .team-item img {
    width: 100%;
    aspect-ratio: 3 / 4; /* Proporción perfecta para retratos corporativos */
    object-fit: cover; /* MAGIA: Recorta la foto para llenar el espacio sin deformar */
    object-position: top center; /* Prioriza enfocar la parte superior (las caras) */
}

/* EFECTO PARALLAX PARA LA SECCIÓN NOSOTROS */
#about {
    position: relative;
    /* Reemplaza 'img/fondo1.jpg' con la ruta de la imagen que quieras usar */
    background: url('../img/fondo1.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: fixed; /* ESTA ES LA MAGIA QUE CREA EL EFECTO DE MOVIMIENTO */
    z-index: 1;
}

/* Capa semitransparente blanca para que el texto se siga leyendo perfecto (Igual que en la pág de Aldeco) */
#about::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.85); /* Fondo blanco al 85% de opacidad */
    z-index: -1;
}

/* EFECTO 3D EXTRA PARA LAS TARJETAS */
.service-item {
    transform-style: preserve-3d;
    will-change: transform;
}

/* Hace que el ícono (o la animación Lottie) "salte" 30 pixeles hacia ti */
.service-item .bg-icon, .service-item lottie-player {
    transform: translateZ(40px);
}
.service-item h4 {
    transform: translateZ(25px);
}

/* =========================================
   FONDO ANIMADO PREMIUM PARA HABILIDADES (V2 MÁS VISIBLE)
   ========================================= */
#skill {
    position: relative;
    /* Gradiente con mucho más contraste usando tu color morado */
    background: linear-gradient(-45deg, #ffffff, #eae0fa, #d1bdf2, #ffffff);
    background-size: 400% 400%;
    animation: animarFondo 6s ease infinite; /* El doble de rápido para notar el movimiento */
    overflow: hidden;
}

/* Patrón de puntos tecnológicos MÁS GRANDE Y VISIBLE */
#skill::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Puntos más gruesos (2px) */
    background-image: radial-gradient(var(--primary) 2px, transparent 2px);
    background-size: 35px 35px; /* Separación más amplia */
    opacity: 0.20; /* ¡Subimos la opacidad para que se vea la malla claramente! */
    z-index: 0;
}

/* Aseguramos que el contenido flote sobre el fondo */
#skill .container {
    position: relative;
    z-index: 1;
}

/* El motor de la animación */
@keyframes animarFondo {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Modo Oscuro con más contraste */
[data-theme="dark"] #skill {
    background: linear-gradient(-45deg, #12141D, #2a2045, #161925, #0d0f14);
    background-size: 400% 400%;
}
[data-theme="dark"] #skill::before {
    background-image: radial-gradient(#ffffff 2px, transparent 2px);
    opacity: 0.10;
}

/* =========================================
   ESTILOS PREMIUM PARA SECCIÓN DE CONTACTO
   ========================================= */

/* Tarjetas de información lateral */
.info-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary);
    margin-bottom: 20px;
}

.info-card:hover {
    transform: translateX(10px); /* Se desliza a la derecha */
    box-shadow: 0 8px 25px rgba(98, 68, 197, 0.15); /* Sombra morada suave */
    border-left: 8px solid var(--primary);
}

.info-card i {
    color: var(--primary);
    font-size: 1.8rem;
    margin-right: 20px;
    width: 30px;
    text-align: center;
}

/* Efecto Glow en el Formulario */
.contact-form .form-control {
    border: 1px solid rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    background-color: var(--card-bg);
    color: var(--text-color);
}

.contact-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(98, 68, 197, 0.25); /* Resplandor morado */
}

/* Animación del botón Enviar */
.btn-send {
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.btn-send:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(98, 68, 197, 0.4);
}

/* Soporte para Modo Oscuro en contacto */
[data-theme="dark"] .contact-form .form-control {
    border-color: rgba(255,255,255,0.1);
}
[data-theme="dark"] .info-card {
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

/* =========================================
   ESTILOS PREMIUM PARA LA SECCIÓN DE EQUIPO
   ========================================= */

.team-item {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.team-item .team-img {
    transition: all 0.5s ease;
    filter: grayscale(100%); /* Inicia en blanco y negro elegante */
    transform: scale(1);
}

.team-item:hover .team-img {
    filter: grayscale(0%); /* Se vuelve a todo color al pasar el ratón */
    transform: scale(1.05); /* Efecto de zoom suave */
}

/* Capa de color morado semitransparente para los iconos */
.team-social {
    background: rgba(98, 68, 197, 0.7); /* Tu color primario con 70% de opacidad */
    opacity: 0;
    transition: all 0.5s ease;
    z-index: 1;
}

.team-item:hover .team-social {
    opacity: 1;
}

/* Animación de salto de los botones */
.team-social .btn {
    transform: translateY(20px);
    transition: all 0.5s ease;
    opacity: 0;
}

.team-item:hover .team-social .btn {
    transform: translateY(0);
    opacity: 1;
}

/* Retraso de un milisegundo para el segundo botón (Efecto escalera) */
.team-social .btn:nth-child(2) {
    transition-delay: 0.1s;
}

/* Comportamiento de la caja de nombres */
.team-text {
    transition: all 0.5s ease;
    z-index: 2;
}

.team-item:hover .team-text {
    transform: translate(-50%, -10px) !important; /* La caja de texto se eleva un poco */
}

/* Adaptación al Modo Oscuro */
[data-theme="dark"] .team-text {
    background-color: var(--card-bg) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
}

/* =========================================
   BOTÓN DE WHATSAPP CON ANIMACIÓN MAESTRA (RVBRICA)
   ========================================= */

/* Keyframes maestros: Onda expansiva (Pulse) + Sacudida (Shake) */
@keyframes whatsapp-master-effect {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); transform: scale(1); }
    35% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); transform: scale(1.03); }
    70% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); transform: scale(1); }
    
    /* Sacudida (Shake) */
    75% { transform: scale(1.1) rotate(-10deg); }
    78% { transform: scale(1.1) rotate(10deg); }
    81% { transform: scale(1.1) rotate(-10deg); }
    84% { transform: scale(1.1) rotate(10deg); }
    87% { transform: scale(1.1) rotate(-10deg); }
    90% { transform: scale(1.1) rotate(0deg); }
    
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); transform: scale(1); }
}

/* Contenedor principal: POSICIÓN ESTÁNDAR CORREGIDA */
.rvbrica-whatsapp-flotante {
    position: fixed;
    bottom: 100px; /* Arriba del botón de "volver arriba" */
    right: 40px;
    z-index: 9999;
}

/* El botón verde circular LIMPIO */
.rvbrica-whatsapp-flotante .whatsapp-btn {
    width: 60px;
    height: 60px;
    background-color: #25D366; /* Verde original */
    color: #ffffff;
    font-size: 35px;
    border: 3px solid #ffffff; /* Borde blanco */
    border-radius: 50%;
    position: relative;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease, border-color 0.3s ease;
    /* Animación unificada asignada aquí */
    animation: whatsapp-master-effect 4s infinite ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tamaño del ícono */
.rvbrica-whatsapp-flotante i {
    font-size: 35px;
    z-index: 2;
}

/* EL GLOBO DE TEXTO (Estilo burbuja) */
.rvbrica-whatsapp-flotante .whatsapp-badge-text {
    position: absolute;
    right: 75px; 
    top: 50%;
    transform: translateY(-50%);
    background-color: #ffffff;
    color: var(--dark);
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    pointer-events: none;
    transition: all 0.3s ease;
}

/* Flecha de la burbuja */
.rvbrica-whatsapp-flotante .whatsapp-badge-text::after {
    content: "";
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px 0 6px 6px;
    border-style: solid;
    border-color: transparent transparent transparent #ffffff;
    transition: all 0.3s ease;
}

/* HOVERS (La interacción al pasar el mouse) */
.rvbrica-whatsapp-flotante:hover .whatsapp-btn {
    animation-play-state: paused; /* Pausa la animación */
    background-color: var(--primary); /* Cambia al morado RVBRICA */
    border-color: var(--primary);
    transform: scale(1.1);
    box-shadow: 0 10px 25px rgba(98, 68, 197, 0.4) !important;
}

.rvbrica-whatsapp-flotante:hover .whatsapp-badge-text {
    background-color: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.rvbrica-whatsapp-flotante:hover .whatsapp-badge-text::after {
    border-color: transparent transparent transparent var(--primary);
}



/* =========================================
   SECCIÓN INMERSIVA TIPO "PLEASURE PURSUIT"
   ========================================= */
#immersive-showcase {
    position: relative;
    background-color: #050505;
    min-height: 80vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Contenedor de las fotos de fondo */
.showcase-images {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Efecto cinematográfico de las fotos (Aparecen con un zoom suave) */
.showcase-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.1);
    transition: opacity 0.8s ease, transform 2s ease;
}

.showcase-img.active {
    opacity: 0.35; /* Oscurecidas para no comerse al texto */
    transform: scale(1);
}

/* Un velo oscuro a la izquierda para que el texto siempre se lea */
.showcase-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to right, #050505 10%, transparent 100%);
    z-index: 1;
}

.showcase-list {
    position: relative;
    z-index: 2;
}

.showcase-item {
    padding: 20px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
}

/* El truco de la tipografía "hueca" (Outline) */
.showcase-title {
    font-size: 5rem;
    font-weight: 800;
    text-transform: uppercase;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.4);
    margin-bottom: 0;
    line-height: 1;
    transition: all 0.4s ease;
}

.showcase-detail {
    color: var(--primary);
    font-size: 1.1rem;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    transform: translateX(-20px);
}

/* Interacción al pasar el mouse */
.showcase-item:hover .showcase-title {
    color: #ffffff; /* Se rellena de color blanco sólido */
    -webkit-text-stroke: 1px #ffffff;
    transform: translateX(30px); /* Se desliza elegantemente a la derecha */
}

.showcase-item:hover .showcase-detail {
    max-height: 50px;
    opacity: 1;
    margin-top: 10px;
    transform: translateX(30px); /* Acompaña al título */
}

/* Responsivo para celulares */
@media (max-width: 768px) {
    .showcase-title {
        font-size: 3rem;
    }
}