/* Definimos nuestras variables de color basadas en tu imagen y mejoras */
:root {
    --bg-main: #0c0c0e;
    --bg-card: rgba(21, 21, 24, 0.6);
    /* Semi-transparente para glassmorphism */
    --color-primary: #8a2be2;
    --color-primary-hover: #7220bd;
    --color-cyan: #00f0ff;
    /* Color secundario tech */
    --text-light: #ffffff;
    --text-muted: #a1a1aa;
    --border-color: rgba(39, 39, 42, 0.8);
    --border-light: rgba(255, 255, 255, 0.05);

    /* Configuración de transiciones */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-light);
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(138, 43, 226, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(138, 43, 226, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
    pointer-events: none;
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.04;
    z-index: 0;
    pointer-events: none;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand {
    font-family: 'Outfit', sans-serif;
    /* Tipografía más de tecnología para encabezados */
}

/* --- Elementos de Fondo / Glow Orbs --- */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    opacity: 0.55;
    animation: floatingOrb 18s infinite alternate ease-in-out;
    pointer-events: none;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--color-primary) 0%, transparent 70%);
    top: -150px;
    right: -200px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.6) 0%, transparent 70%);
    bottom: 20%;
    left: -150px;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.3) 0%, transparent 70%);
    top: 40%;
    right: 15%;
    animation-delay: -10s;
}

@keyframes floatingOrb {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-30px, 40px) scale(1.1);
    }

    100% {
        transform: translate(20px, -30px) scale(0.9);
    }
}

/* --- Utilidades --- */
.text-gradient {
    background: linear-gradient(135deg, var(--color-primary), #ce8ffb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Estilos de la Barra de Navegación (Glassmorphism) --- */
.navbar {
    background-color: transparent;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    transition: var(--transition-normal);
    z-index: 1000;
}

/* Clase que se agrega con JS al hacer scroll */
.navbar.scrolled {
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
    background-color: rgba(12, 12, 14, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--color-primary) !important;
    letter-spacing: -0.5px;
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(138, 43, 226, 0.1);
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 10px;
    color: var(--color-primary);
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.2);
}

.nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    font-size: 0.95rem;
    margin-left: 1rem;
    position: relative;
    transition: var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-light) !important;
}

/* Línea animada en los enlaces */
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 50%;
    background-color: var(--color-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    box-shadow: 0 0 8px var(--color-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

/* Resetear el caret de Bootstrap en dropdown-toggle y mostrar línea al hover */
.nav-item.dropdown>.nav-link::after {
    border: none;
    background-color: var(--color-primary);
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    display: block;
    box-shadow: 0 0 8px var(--color-primary);
    transition: all 0.3s ease;
}

.nav-item.dropdown>.nav-link:hover::after,
.nav-item.dropdown>.nav-link.active::after {
    width: 80%;
}

.dropdown-menu {
    background-color: rgba(21, 21, 24, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 0.5rem;
}

.dropdown-item {
    color: var(--text-muted);
    border-radius: 8px;
    transition: var(--transition-fast);
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    transform: translateX(4px);
}

.dropdown-header {
    color: var(--color-primary);
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.dropdown-divider {
    border-top-color: var(--border-light);
}

/* --- Estilos del Hero (Sección Principal) --- */
.hero-section {
    min-height: 100vh;
    padding-top: 80px;
    position: relative;
    z-index: 10;
    /* Quitamos el bg-radial original estático a favor de los orbes dinámicos */
}

.badge-tech {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.2rem;
    background: rgba(138, 43, 226, 0.1);
    border: 1px solid rgba(138, 43, 226, 0.25);
    border-radius: 50px;
    color: #e2baff;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.15rem;
    max-width: 600px;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

/* --- Botones --- */
.btn-custom-primary {
    background-color: var(--color-primary);
    color: white;
    border: 1px solid transparent;
    padding: 0.85rem 2.2rem;
    font-weight: 600;
    border-radius: 8px;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
}

.btn-custom-primary:hover {
    background-color: var(--color-primary-hover);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(138, 43, 226, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
}

.btn-custom-primary .transition-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.btn-custom-primary:hover .transition-icon {
    transform: translateX(4px);
}

.btn-custom-secondary {
    background-color: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(5px);
    color: white;
    border: 1px solid var(--border-color);
    padding: 0.85rem 2.2rem;
    font-weight: 600;
    border-radius: 8px;
    transition: var(--transition-normal);
}

.btn-custom-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-3px);
}

/* --- Tarjetas de Características Premium --- */
.features-section {
    position: relative;
    z-index: 10;
    padding-bottom: 6rem;
    margin-top: -3rem;
    /* Para montarse levemente sobre el hero */
}

.feature-card {
    background-color: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    height: 100%;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0.5;
}

.feature-card:hover {
    border-color: rgba(138, 43, 226, 0.5);
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(138, 43, 226, 0.1);
}

.feature-icon-wrapper {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.1), rgba(138, 43, 226, 0.05));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    border: 1px solid rgba(138, 43, 226, 0.2);
    transition: var(--transition-normal);
}

.feature-card:hover .feature-icon-wrapper {
    background: var(--color-primary);
    border-color: var(--color-primary);
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 20px rgba(138, 43, 226, 0.3);
}

.feature-icon {
    font-size: 2rem;
    color: var(--color-primary);
    transition: var(--transition-normal);
}

.feature-card:hover .feature-icon {
    color: #ffffff;
}

.feature-title {
    font-weight: 700;
    font-size: 1.35rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.feature-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.6;
}

/* --- Estilos de los checks de lista en tarjetas de servicio --- */
.bi-check2-circle {
    color: var(--color-primary) !important;
}

/* --- Estilos del Footer --- */
.site-footer {
    background: linear-gradient(180deg, transparent, rgba(10, 10, 12, 0.95));
    border-top: 1px solid var(--border-light);
    padding: 3rem 0 1.5rem;
    position: relative;
    z-index: 10;
}

.site-footer .footer-brand {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--color-primary);
}

.site-footer .footer-brand span {
    color: var(--text-light);
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--color-primary);
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Hover para tarjeta de equipo */
a:has(.team-card) .team-card,
.team-card {
    transition: transform 0.3s ease, border-color 0.3s ease;
}

a:hover .team-card {
    transform: translateY(-8px);
    border-color: rgba(138, 43, 226, 0.6) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(138, 43, 226, 0.15) !important;
}

.reveal-on-load {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s forwards cubic-bezier(0.165, 0.84, 0.44, 1);
    animation-delay: 0.2s;
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal-on-scroll.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Ajustes Responsive --- */
@media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(15, 15, 18, 0.95);
        backdrop-filter: blur(15px);
        padding: 1.5rem;
        border-radius: 12px;
        border: 1px solid var(--border-light);
        margin-top: 1rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding-top: 120px;
        text-align: center;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .hero-subtitle {
        margin: 0 auto 2rem auto;
    }

    .badge-tech {
        margin: 0 auto 1.5rem auto;
    }

    .hero-content .d-flex {
        justify-content: center;
    }

    .features-section {
        margin-top: 0;
    }
}

/* --- Sección de Contacto --- */
.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.5px;
}

.contact-section {
    padding-top: 4rem;
}

.contact-info-card {
    background: linear-gradient(145deg, rgba(21, 21, 24, 0.6), rgba(15, 15, 18, 0.4));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: rgba(138, 43, 226, 0.1);
    border: 1px solid rgba(138, 43, 226, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-right: 1.5rem;
    transition: var(--transition-fast);
}

.contact-info-card:hover .contact-icon {
    background: var(--color-primary);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.3);
}

.social-btn {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    color: var(--text-light);
    font-size: 1.2rem;
    transition: var(--transition-normal);
}

.social-btn:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.4);
}

.glass-form-container {
    background-color: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.form-control-custom {
    display: block;
    width: 100%;
    padding: 0.8rem 1.2rem;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-light);
    background-color: rgba(0, 0, 0, 0.2);
    background-clip: padding-box;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: var(--transition-fast);
}

.form-control-custom:focus {
    color: var(--text-light);
    background-color: rgba(0, 0, 0, 0.3);
    border-color: var(--color-primary);
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(138, 43, 226, 0.25);
}

.form-control-custom::placeholder {
    color: rgba(161, 161, 170, 0.5);
}

select.form-control-custom {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23a1a1aa' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px 12px;
}

select.form-control-custom option {
    background-color: var(--bg-main);
    color: var(--text-light);
}