/* assets/css/custom.css */

/* Animations & Transitions */
@keyframes kenburns {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
    100% {
        transform: scale(1);
    }
}

.swiper-slide-active .kenburns-bg {
    animation: kenburns 12s ease-out infinite alternate;
}

/* Image Zoom on Hover Container */
.img-zoom-container {
    overflow: hidden;
    position: relative;
}

.img-zoom-container img {
    transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1), filter 0.5s ease;
    will-change: transform;
}

.group:hover .img-zoom-container img,
.img-zoom-container:hover img {
    transform: scale(1.08);
}

/* Watermark Text */
.watermark-text {
    position: absolute;
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    font-size: clamp(3rem, 8vw, 8rem);
    color: rgba(124, 58, 237, var(--watermark-opacity, 0.04));
    user-select: none;
    pointer-events: none;
    white-space: nowrap;
    z-index: 0;
    letter-spacing: 0.05em;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Custom Button Glowing Glow */
.btn-glow {
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-glow:hover {
    box-shadow: 0 15px 30px -5px rgba(124, 58, 237, 0.5);
    transform: translateY(-2px);
}

/* Swiper Custom Navigation & Pagination styling */
.testimonials-pagination .swiper-pagination-bullet-active {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary)) !important;
    width: 28px !important;
    border-radius: 999px !important;
    opacity: 1 !important;
}

.testimonials-pagination .swiper-pagination-bullet {
    background: #94a3b8;
    opacity: 0.5;
    transition: all 0.3s ease;
}

/* Linear Infinite Marquee Ticker for Client Logos */
.logos-swiper .swiper-wrapper {
    transition-timing-function: linear !important;
}

/* Glassmorphism & Card Glow Effects */
.glass-card-testimonial {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.testimonial-card-glow {
    box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.05);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.testimonial-card-glow:hover {
    box-shadow: 0 25px 50px -12px rgba(37, 99, 235, 0.15);
    transform: translateY(-6px);
}

/* Animated Ambient Glow Blobs */
@keyframes float-slow {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-15px) scale(1.05); }
}

.animate-float-slow {
    animation: float-slow 8s ease-in-out infinite;
}

/* Hero Swiper Full Height */
.hero-swiper, .hero-swiper .swiper-wrapper, .hero-swiper .swiper-slide {
    height: 100%;
}

/* Liquid Glass Effect */
.liquid-glass {
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.8) 50%, rgba(255,255,255,0.9) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.5);
    box-shadow: 
        0 8px 32px rgba(31, 38, 135, 0.15),
        inset 0 1px 0 rgba(255,255,255,0.6),
        inset 0 -1px 0 rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden;
}

.liquid-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: liquid-shimmer 3s infinite;
}

@keyframes liquid-shimmer {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

.liquid-card {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow: 
        0 4px 16px rgba(31, 38, 135, 0.08),
        inset 0 1px 0 rgba(255,255,255,0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.liquid-card:hover {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    transform: translateY(-4px);
    box-shadow: 
        0 12px 32px rgba(37, 99, 235, 0.15),
        inset 0 1px 0 rgba(255,255,255,0.9);
}

/* Technological Background Animation - Persistent Circuit Network */
.tech-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.tech-bg canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Sections with translucent background to let animated circuits shine through */
section, main > section {
    position: relative;
    z-index: 1;
}

.section-white {
    background-color: rgba(255, 255, 255, 0.45) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.section-alt {
    background-color: rgba(248, 250, 252, 0.45) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.card-dynamic {
    background-color: var(--card-bg, #ffffff) !important;
}

/* Service cards consistent height */
.grid-cols-1 > .bg-slate-50,
.grid-cols-2 > .bg-slate-50,
.grid-cols-3 > .bg-slate-50 {
    min-height: 420px;
}

/* Project cards consistent height */
.project-item,
a.project-item {
    display: flex !important;
    flex-direction: column;
    height: 100%;
}

.project-item .relative,
a.project-item .relative {
    flex: 1;
    min-height: 320px;
}

.project-item img,
a.project-item img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

/* Smooth zoom on images inside containers */
.img-zoom-container img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.img-zoom-container:hover img {
    transform: scale(1.08);
}

/* Watermark text behind sections */
.watermark-text {
    position: absolute;
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: clamp(5rem, 11vw, 10.5rem);
    color: #0f172a !important;
    opacity: var(--watermark-opacity, 0.12);
    user-select: none;
    pointer-events: none;
    z-index: 1;
    line-height: 0.85;
    letter-spacing: -0.04em;
    white-space: nowrap;
    text-transform: uppercase;
}

.bg-white {
    background-color: rgba(255, 255, 255, 0.92) !important;
}

.bg-slate-50 {
    background-color: rgba(248, 250, 252, 0.92) !important;
}

/* Subtitles same font as headings */
.subtitle-heading {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.01em;
}

p.subtitle-desc,
.subtitle-desc {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
    line-height: 1.7 !important;
    color: #64748b !important;
}

/* Back to Top Button */
#back-to-top {
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Menu Animations */
.mobile-menu-item {
    animation: slideInLeft 0.3s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==========================================================================
   MENÚ CHICLE (Sticky Floating Capsule Navbar)
   ========================================================================== */
#header-wrapper {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#main-navbar {
    transition: all 0.35s cubic-bezier(0.34, 1.3, 0.64, 1);
}

/* Estado Chicle Flotante cuando el usuario hace Scroll */
.is-chicle-nav {
    position: fixed !important;
    top: 14px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: min(95%, 1380px) !important;
    z-index: 9999 !important;
    background: rgba(7, 11, 25, 0.92) !important;
    backdrop-filter: blur(28px) !important;
    -webkit-backdrop-filter: blur(28px) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 9999px !important;
    padding: 0.5rem 1.5rem !important;
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 102, 255, 0.25) !important;
    animation: chicleSnap 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Adaptación responsive para Móvil: Evita que el menú desplegado se vuelva circular */
@media (max-width: 1023px) {
    .is-chicle-nav {
        border-radius: 20px !important;
        width: 95% !important;
        top: 10px !important;
        padding: 0.6rem 1rem !important;
    }
}

@keyframes chicleSnap {
    0% {
        transform: translateX(-50%) translateY(-25px) scale(0.96);
        opacity: 0.7;
    }
    60% {
        transform: translateX(-50%) translateY(4px) scale(1.02);
    }
    100% {
        transform: translateX(-50%) translateY(0) scale(1);
        opacity: 1;
    }
}

/* Enlaces con efecto Píldora Elástica (Chicle Hover) */
.chicle-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.15rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.92) !important;
    background: transparent !important;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
    text-decoration: none;
}

.chicle-nav-link:hover {
    background: rgba(255, 255, 255, 0.18) !important;
    transform: translateY(-2px) scale(1.04);
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.chicle-nav-link:active {
    transform: scale(0.96);
}

.chicle-nav-link.active-pill {
    background: linear-gradient(135deg, var(--brand-primary, #0066ff), var(--brand-secondary, #e00085)) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 20px rgba(0, 102, 255, 0.4);
}

/* ==========================================================================
   SCROLL ENTRANCE & EXIT ANIMATION ENGINE (Efectos de entrada y salida)
   ========================================================================== */
[data-reveal] {
    opacity: 0;
    filter: blur(6px);
    transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.85s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.85s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform, filter;
}

[data-reveal="fade-up"] {
    transform: translateY(45px);
}

[data-reveal="fade-down"] {
    transform: translateY(-45px);
}

[data-reveal="fade-left"] {
    transform: translateX(50px);
}

[data-reveal="fade-right"] {
    transform: translateX(-50px);
}

[data-reveal="zoom-in"] {
    transform: scale(0.88) translateY(20px);
}

[data-reveal="zoom-out"] {
    transform: scale(1.08);
}

/* Elemento Revelado (Entrada) */
[data-reveal].is-revealed {
    opacity: 1 !important;
    transform: translate(0, 0) scale(1) !important;
    filter: blur(0) !important;
}

/* Escalonamiento Stagger en Listas y Grillas */
[data-reveal-stagger] > * {
    opacity: 0;
    transform: translateY(35px);
    filter: blur(4px);
    transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.75s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal-stagger].is-revealed > *:nth-child(1) { transition-delay: 0.05s; }
[data-reveal-stagger].is-revealed > *:nth-child(2) { transition-delay: 0.15s; }
[data-reveal-stagger].is-revealed > *:nth-child(3) { transition-delay: 0.25s; }
[data-reveal-stagger].is-revealed > *:nth-child(4) { transition-delay: 0.35s; }
[data-reveal-stagger].is-revealed > *:nth-child(5) { transition-delay: 0.45s; }
[data-reveal-stagger].is-revealed > *:nth-child(6) { transition-delay: 0.55s; }
[data-reveal-stagger].is-revealed > *:nth-child(7) { transition-delay: 0.65s; }
[data-reveal-stagger].is-revealed > *:nth-child(8) { transition-delay: 0.75s; }

[data-reveal-stagger].is-revealed > * {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
    filter: blur(0) !important;
}

/* ==========================================================================
   SECCIÓN MAPA: COBERTURA A NIVEL NACIONAL DEL PERÚ
   ========================================================================== */
.peru-map-wrapper {
    position: relative;
    user-select: none;
}

.map-radar-pulse {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.map-radar-pulse::before,
.map-radar-pulse::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.75;
    animation: mapPulseRing 2.4s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.map-radar-pulse::after {
    animation-delay: 1.2s;
}

@keyframes mapPulseRing {
    0% {
        transform: scale(0.6);
        opacity: 0.8;
    }
    100% {
        transform: scale(2.8);
        opacity: 0;
    }
}

.map-node-pin {
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.map-node-pin:hover,
.map-node-pin.is-active {
    transform: translate(-50%, -50%) scale(1.35);
    z-index: 30;
}

.map-node-pin.is-active .pin-dot {
    box-shadow: 0 0 25px currentColor, 0 0 10px #ffffff;
}

.map-hub-card {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.map-region-btn {
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.map-region-btn:hover,
.map-region-btn.is-active {
    transform: translateX(4px);
}


