/* ============================================= */
/* =========== IMPORTACIONES Y VARIABLES ========= */
/* ============================================= */
:root {
    --primary-color: #4B46CD;
    --dark-bg-color: #1a1a1a;
    --dark-text-color: #f0f0f0;
    --light-section-bg: #222222;
    --secondary-accent: #6c757d;
    --font-family: 'Poppins', sans-serif;
}

/* ============================================= */
/* ============= ESTILOS GLOBALES ============== */
/* ============================================= */
body {
    font-family: var(--font-family);
    color: var(--dark-text-color);
    line-height: 1.7;
    background-color: var(--dark-bg-color);
}
h1, h2, h3, h4, h5, h6 {
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 1rem;
}
p {
    color: var(--dark-text-color);
}
.section-padding {
    padding: 100px 0;
}
.section-title {
    margin-bottom: 60px;
    color: #ffffff;
}
.section-title h2 {
    font-size: 2.8rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 20px;
    color: #ffffff;
}
.section-title h2::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}
.section-title p {
    max-width: 700px;
    margin: 20px auto 0;
    font-size: 1.1rem;
    color: var(--dark-text-color);
}

/* ============================================= */
/* ================= BOTONES =================== */
/* ============================================= */
.btn {
    transition: all 0.3s ease;
    border-radius: 50px;
    padding: 14px 35px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}
.btn-primary:hover {
    background-color: #3a36a8;
    border-color: #3a36a8;
    box-shadow: 0 8px 15px rgba(75, 70, 205, 0.3);
}
.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background-color: transparent;
}
.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 8px 15px rgba(75, 70, 205, 0.3);
}

/* ============================================= */
/* =================== NAVBAR ================== */
/* ============================================= */
.navbar {
    transition: all 0.4s ease;
    padding: 15px 0;
}
.navbar.scrolled {
    background-color: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(15px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.navbar-brand img {
    max-height: 45px;
}
.navbar-toggler {
    border: none;
    color: rgba(255,255,255,0.9);
    font-size: 1.8rem;
}
.navbar-toggler:focus { box-shadow: none; }
.nav-link {
    color: rgba(255,255,255,0.8);
    font-weight: 500;
    margin: 0 15px;
    transition: color 0.3s ease;
    font-size: 1.05rem;
}
.nav-link:hover, .nav-link.active { color: var(--primary-color); }
.social-icons .nav-link { font-size: 1.1rem; padding: 0 12px; }

/* ============================================= */
/* =================== HERO ==================== */
/* ============================================= */
#hero {
    height: 100vh;
    min-height: 700px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    overflow: hidden;
    /* --- CAMBIOS AQUÍ --- */
    background-image: url('../images/fondo.jpg');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed; /* Opcional: crea un efecto parallax simple */
}
#hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.7); /* Capa oscura para legibilidad */
    z-index: 0;
}
#tsparticles {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1; /* Partículas encima de la capa oscura */
}
.hero-content {
    position: relative;
    z-index: 2; /* Contenido encima de todo */
    max-width: 800px;
}
.hero-content h1 {
    font-size: 4.8rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 25px;
    line-height: 1.1;
}
.hero-content p {
    font-size: 1.5rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 40px;
}

/* ============================================= */
/* ================= ABOUT US ================== */
/* ============================================= */
#about { background-color: var(--dark-bg-color); }
#about h2 { font-size: 2.5rem; margin-bottom: 20px; }
#about p { font-size: 1.05rem; margin-bottom: 30px; }
#about img { border-radius: 8px; }

/* ============================================= */
/* ============= METRICS SECTION =============== */
/* ============================================= */
#metrics { background-color: var(--light-section-bg); }
.metric-box {
    padding: 20px;
    color: var(--dark-text-color);
}
.metric-box i {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: block;
}
.metric-box h3 {
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
}
.metric-box p {
    font-size: 1rem;
    color: var(--secondary-accent);
    font-weight: 500;
}

/* ============================================= */
/* ================= SERVICES ================== */
/* ============================================= */
#services { background-color: var(--dark-bg-color); }
.service-box {
    padding: 40px;
    background: var(--light-section-bg);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}
.service-box:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.service-icon {
    width: 90px; height: 90px;
    margin: 0 auto 25px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    transition: background-color 0.3s ease;
}
.service-box:hover .service-icon { background-color: #3a36a8; }
.service-box h3 { font-size: 1.7rem; margin-bottom: 15px; }
.service-box p { font-size: 1rem; }

/* ============================================= */
/* ============== LOGO GRID (WORKS & CLIENTS) ============ */
/* ============================================= */
#works { background-color: var(--light-section-bg); }
#clients { background-color: var(--dark-bg-color); }
.logo-grid { align-items: center; }
.logo-item {
    background-color: var(--light-section-bg);
    padding: 25px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    font-size: 0.9rem;
    color: var(--dark-text-color);
    font-weight: 500;
}
#clients .logo-item { background-color: var(--light-section-bg); }
#works .logo-item { background-color: var(--dark-bg-color); }

.logo-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    background-color: var(--primary-color);
    color: #fff;
}
.logo-item img {
    max-width: 100%; max-height: 50px;
    object-fit: contain;
}

/* ============================================= */
/* =================== TEAM ==================== */
/* ============================================= */
#team { background-color: var(--light-section-bg); }
.team-member {
    text-align: center;
    background: var(--dark-bg-color);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}
.team-member:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
}
.team-member img {
    border-radius: 8px;
    margin-bottom: 20px;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}
.team-member:hover img { filter: grayscale(0%); }
.team-info h5 { font-size: 1.5rem; margin-bottom: 8px; }
.team-info p { color: var(--secondary-accent); font-size: 1rem; font-weight: 400; }
.team-slider .swiper-pagination-bullet { background-color: rgba(255,255,255,0.5); }
.team-slider .swiper-pagination-bullet-active { background-color: var(--primary-color); }

/* ============================================= */
/* =================== CTA ===================== */
/* ============================================= */
#cta {
    background-color: var(--primary-color);
    padding: 80px 0;
}
#cta h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
}
#cta p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}
#cta .btn-primary {
    background-color: #fff;
    color: var(--primary-color);
    border-color: #fff;
}
#cta .btn-primary:hover {
    background-color: #f0f0f0;
    border-color: #f0f0f0;
    transform: scale(1.05);
}

/* ============================================= */
/* =================== FOOTER ================== */
/* ============================================= */
footer {
    background-color: #0d0d0d !important;
    color: rgba(255,255,255,0.6);
    padding: 40px 0;
    font-size: 0.9rem;
}
footer p { margin: 0; color: rgba(255,255,255,0.6); }

/* ============================================= */
/* ================ RESPONSIVE ================= */
/* ============================================= */
@media (max-width: 991px) {
    .navbar-collapse { background-color: var(--dark-bg-color); padding: 20px; border-radius: 8px; margin-top: 10px; }
    .navbar-nav { text-align: center; }
    .nav-item { margin: 10px 0 !important; }
    .hero-content h1 { font-size: 3.5rem; }
    .hero-content p { font-size: 1.2rem; }
    .section-title h2 { font-size: 2.2rem; }
    .service-box, .team-member { margin-bottom: 30px; }
}
@media (max-width: 576px) {
    .hero-content h1 { font-size: 2.8rem; }
    .hero-content p { font-size: 1rem; }
    .section-title h2 { font-size: 1.8rem; }
}