/* --- CONFIGURACIÓN GLOBAL "MIDNIGHT DEEP PURPLE" --- */
:root {
    /* PALETA: Midnight Deep Purple */
    --bg-main: #05050a;       /* Negro con un tinte imperceptible de azul noche */
    --bg-secondary: #0f0a1e;  /* Violeta Muy Oscuro (Casi negro) */
    --bg-card: #160e2e;       /* Violeta Profundo (Para tarjetas) */
    
    --accent: #8b5cf6;        /* VIOLETA ELÉCTRICO (Violet 500) - Intenso y elegante */
    
    --text-main: #ffffff;     /* Blanco Puro */
    --text-muted: #c4b5fd;    /* Lavanda Grisáceo (Muy legible sobre fondo oscuro) */
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;

    /* --- FONDO ATMOSFÉRICO --- */
    /* Crea un resplandor violeta muy sutil en la parte superior central */
    background: radial-gradient(circle at 50% -20%, #2e1065 0%, var(--bg-main) 60%);
    background-attachment: fixed; /* El fondo se queda quieto, dando profundidad */
}

/* --- UTILIDADES DE TEXTO --- */
.text-accent { color: var(--accent) !important; text-shadow: 0 0 20px rgba(139, 92, 246, 0.3); } /* Pequeño brillo en el texto acento */
.text-secondary, .text-muted { color: var(--text-muted) !important; }
.bg-darker { background-color: var(--bg-secondary); }
.bg-accent { background-color: var(--accent); }
.ls-2 { letter-spacing: 2px; }

/* --- NAVBAR (Glassmorphism Purple) --- */
.custom-nav {
    background-color: rgba(5, 5, 10, 0.85); /* Semitransparente oscuro */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(139, 92, 246, 0.1); /* Borde violeta muy sutil */
    padding: 15px 0;
}

.nav-link {
    font-weight: 500;
    color: var(--text-muted) !important;
    transition: all 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent) !important;
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}

.navbar-toggler { border-color: rgba(255,255,255,0.1); }
.navbar-toggler-icon { filter: invert(1); }

/* --- MENÚ DESPLEGABLE --- */
.dropdown-menu {
    background-color: rgba(15, 10, 30, 0.95);
    border: 1px solid rgba(139, 92, 246, 0.15);
    backdrop-filter: blur(10px);
    padding: 0.5rem 0;
    margin-top: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.dropdown-item {
    color: var(--text-muted);
    font-size: 0.95rem;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.dropdown-item.active, .dropdown-item:active {
    background-color: transparent !important;
    color: var(--text-muted) !important;
}

.dropdown-item:hover, .dropdown-item:focus {
    background-color: rgba(139, 92, 246, 0.15); /* Fondo violeta suave */
    color: var(--accent) !important;
    padding-left: 25px;
}

/* --- OFFSET SCROLL --- */
div[id], section[id] { scroll-margin-top: 100px; }

/* --- HERO SECTION --- */
.hero-section {
    min-height: 100vh;
    padding-top: 100px;
    padding-bottom: 50px;
    display: flex;
    align-items: center;
    /* Un brillo extra detrás del hero para destacar */
    background: radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 60%);
}

.hero-image-wrapper {
    position: relative;
    padding: 20px;
    display: inline-block;
}

.main-logo {
    max-width: 320px;
    width: 100%;
    border-radius: 50%;
    border: 2px solid rgba(139, 92, 246, 0.3); /* Borde violeta */
    box-shadow: 0 0 60px rgba(139, 92, 246, 0.15); /* Sombra violeta atmosférica */
    object-fit: cover;
}

/* --- BOTONES NEÓN --- */
.btn-accent {
    background-color: var(--accent);
    color: #ffffff;
    font-weight: 700;
    border: 2px solid var(--accent);
    border-radius: 6px;
    padding: 12px 30px;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

.btn-accent:hover {
    background-color: transparent;
    color: var(--accent);
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.5); /* Glow intenso al hover */
    transform: translateY(-3px);
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-weight: 600;
    border-radius: 6px;
    padding: 12px 30px;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-color: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

/* --- TARJETAS --- */
.icon-box-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: rgba(139, 92, 246, 0.05);
    border-radius: 10px;
    margin-bottom: 15px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.border-accent { border-color: var(--accent) !important; }
.list-unstyled li { margin-bottom: 8px; }

.service-card, .project-card {
    background-color: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.03); /* Borde casi invisible */
    border-radius: 12px;
    transition: all 0.4s ease;
    overflow: hidden;
}

/* Efecto hover elegante para las tarjetas */
.service-card:hover, .project-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    background-color: #1a1030; /* Se aclara un poco al hover */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(139, 92, 246, 0.1); /* Sombra con tinte violeta */
}

.card-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    opacity: 0.8;
}

.project-card:hover .card-img-top {
    transform: scale(1.08);
    opacity: 1;
}

/* --- FORMULARIO --- */
.form-control {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #ffffff !important;
    padding: 12px;
    transition: all 0.3s;
}
textarea.form-control { resize: none; }

.form-control:focus {
    background-color: rgba(139, 92, 246, 0.05);
    border-color: var(--accent);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.1);
}
::placeholder { color: rgba(255, 255, 255, 0.5) !important; opacity: 1; }

/* --- WIDGET WHATSAPP --- */
.whatsapp-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.wa-button {
    background-color: #25d366; /* El verde de WhatsApp se mantiene por marca */
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-align: center;
    font-size: 32px;
    line-height: 60px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    position: relative;
    transition: transform 0.3s ease;
    text-decoration: none;
}
.wa-button:hover { transform: scale(1.1); box-shadow: 0 4px 25px rgba(37, 211, 102, 0.4); }
.wa-message {
    background-color: white;
    color: #333;
    padding: 10px 15px;
    border-radius: 10px 10px 0 10px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    margin-bottom: 10px;
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    transition: all 0.4s;
    pointer-events: none;
    white-space: nowrap;
}
.wa-message.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.wa-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff3b30;
    color: white;
    font-size: 12px;
    font-weight: bold;
    width: 22px;
    height: 22px;
    line-height: 22px;
    border-radius: 50%;
    border: 2px solid var(--bg-main);
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s;
}
.wa-badge.show { opacity: 1; transform: scale(1); }

/* --- SCROLL REVEAL --- */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }

/* RESPONSIVE */
@media (max-width: 991px) {
    .hero-section { text-align: center; }
    .hero-image-wrapper { margin-bottom: 40px; }
    .d-grid { justify-content: center !important; }
}
@media (max-width: 480px) {
    .whatsapp-widget { bottom: 20px; right: 20px; }
    .wa-button { width: 50px; height: 50px; line-height: 50px; font-size: 28px; }
}

/* =========================================
   TECH SLIDER (Optimizado para Deep Purple)
   ========================================= */
.slider {
    height: 80px;
    margin: auto;
    overflow: hidden;
    position: relative;
    width: 100%;
}
.slider::before,
.slider::after {
    /* Degradado hacia el color principal para que se funda perfecto */
    background: linear-gradient(to right, var(--bg-main) 0%, rgba(5, 5, 10, 0) 100%);
    content: "";
    height: 100%;
    position: absolute;
    width: 150px;
    z-index: 2;
    pointer-events: none;
}
.slider::before { left: 0; top: 0; }
.slider::after { right: 0; top: 0; transform: rotateZ(180deg); }

.slide-track {
    display: flex;
    width: 13680px; /* (38 iconos * 2 para infinito) * 180px */
    animation: scroll 60s linear infinite; /* Un poco más lento para que se aprecien */
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-6840px); } /* La mitad del ancho total */
}

.slide {
    height: 80px;
    width: 180px; /* Aumentamos de 150px a 180px para dar más aire */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px; /* Reducimos el padding lateral para ganar espacio interno */
}

.slide img {
    height: 45px; /* Forzamos una altura fija para uniformidad */
    width: auto;  /* El ancho se ajusta proporcionalmente */
    max-width: 140px; /* Evitamos que logos largos rompan el layout */
    opacity: 0.8;
    filter: grayscale(10%) brightness(1.2);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}
.slide img:hover {
    opacity: 1;
    /* Glow Violeta Intenso al Hover */
    filter: grayscale(0%) drop-shadow(0 0 10px rgba(139, 92, 246, 0.8));
    transform: scale(1.15);
}
.slider:hover .slide-track { animation-play-state: paused; }

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-1350px); }
}
@media (max-width: 768px) {
    .slide img { max-height: 45px; }
    .slider::before, .slider::after { width: 50px; }
}