/* =========================================
   1. IMPORTACIÓN DE FUENTES Y VARIABLES
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&family=Poppins:wght@300;400;600&display=swap');

:root {
    --bs-blue-primary: #0061f2;
    --bs-blue-cyan: #00cfd5;
    --bs-dark-bg: #0f172a;
    --bs-light-bg: #f8fafc;
    --bs-text-main: #334155;
    --bs-text-muted: #64748b;
}

/* =========================================
   2. ESTILOS GENERALES (FIX DEFINITIVO ESTRUCTURA)
   ========================================= */
html {
    height: 100%;
    /* MATA EL ESPACIO A LA DERECHA */
    overflow-x: hidden;
    /* MATA EL REBOTE BLANCO EN MÓVILES */
    background-color: var(--bs-light-bg);
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--bs-text-main);
    background-color: var(--bs-light-bg);

    /* ESTRUCTURA PARA EL FOOTER PEGADO (STICKY FOOTER) */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;

    /* SEGURIDAD CONTRA DESBORDAMIENTO HORIZONTAL */
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* El contenido principal empuja al footer hacia abajo */
main,
section,
nav,
header {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100vw;
    /* Asegura que nada sea más ancho que la pantalla */
}

/* El footer se va al fondo automáticamente */
footer {
    margin-top: auto;
    flex-shrink: 0;
}

h1,
h2,
h3,
h4,
h5,
.brand-title,
.brand-text-footer {
    font-family: 'Montserrat', sans-serif;
}

a {
    text-decoration: none;
}

.text-gradient {
    background: linear-gradient(120deg, var(--bs-blue-primary), var(--bs-blue-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =========================================
   3. FONDOS ANIMADOS (BLOBS)
   ========================================= */
.bg-blob {
    position: fixed;
    /* FIXED para que no afecte el alto de la página */
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 207, 213, 0.15) 0%, rgba(0, 97, 242, 0.05) 70%, transparent 100%);
    border-radius: 50%;
    z-index: -1;
    filter: blur(50px);
    animation: pulseBlob 10s infinite alternate;
    pointer-events: none;
    /* Para que no moleste a los clics */
}

.blob-1 {
    top: -100px;
    right: -200px;
}

.blob-2 {
    bottom: 0;
    left: -200px;
}

@keyframes pulseBlob {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

/* =========================================
   4. NAVBAR (DISEÑO PREMIUM)
   ========================================= */
.navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 15px 0;
    transition: all 0.3s ease;
}

.logo-box {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--bs-blue-cyan), var(--bs-blue-primary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    margin-right: 12px;
    box-shadow: 0 8px 20px rgba(0, 97, 242, 0.3);
    transition: transform 0.3s;
}

.navbar-brand:hover .logo-box {
    transform: rotate(10deg);
}

.brand-title {
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.5px;
    color: var(--bs-dark-bg);
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 0.65rem;
    color: var(--bs-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-link {
    font-weight: 600;
    color: #475569 !important;
    margin: 0 10px;
    position: relative;
    font-size: 0.95rem;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 5px;
    left: 0;
    background: var(--bs-blue-primary);
    transition: width 0.3s;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--bs-blue-primary) !important;
}

/* =========================================
   5. BOTONES PREMIUM
   ========================================= */
.btn-gradient {
    background: linear-gradient(135deg, var(--bs-blue-primary), var(--bs-blue-cyan));
    border: none;
    color: white;
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 10px 25px -5px rgba(0, 97, 242, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-gradient:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px rgba(0, 207, 213, 0.5);
    color: white;
}

/* =========================================
   6. HERO SECTIONS
   ========================================= */
.hero-section {
    padding: 160px 0 100px;
    position: relative;
    overflow-x: clip;
    /* Asegura que la animación no desborde */
}

.page-hero {
    padding: 180px 0 80px;
    text-align: center;
    overflow-x: clip;
}

.hero-title {
    font-weight: 800;
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 25px;
    color: var(--bs-dark-bg);
}

.hero-image-container {
    position: relative;
    z-index: 2;
    animation: float 6s ease-in-out infinite;
}

.hero-img {
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

.hero-list li {
    margin-bottom: 12px;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
}

.check-icon {
    color: var(--bs-blue-cyan);
    background: rgba(0, 207, 213, 0.1);
    padding: 4px;
    border-radius: 50%;
    margin-right: 10px;
}

/* =========================================
   7. COMPONENTES: SERVICIOS
   ========================================= */
.service-card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--bs-blue-primary), var(--bs-blue-cyan));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 97, 242, 0.1);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.icon-box {
    width: 70px;
    height: 70px;
    background: #eff6ff;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--bs-blue-primary);
    margin: 0 auto 25px;
    transition: all 0.3s;
}

.service-card:hover .icon-box {
    background: var(--bs-blue-primary);
    color: white;
    transform: rotate(15deg);
}

.detail-card {
    border: none;
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    margin-bottom: 60px;
    transition: transform 0.3s;
}

.detail-card:hover {
    transform: translateY(-5px);
}

.detail-img-box {
    height: 100%;
    min-height: 350px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.detail-img-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0, 97, 242, 0.2), transparent);
}

.service-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.service-list i {
    color: var(--bs-blue-cyan);
    background: rgba(0, 207, 213, 0.1);
    padding: 5px;
    border-radius: 50%;
    margin-right: 15px;
    margin-top: 3px;
    font-size: 0.9rem;
}

/* =========================================
   8. COMPONENTES: PROYECTOS
   ========================================= */
.project-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.06);
    transition: all 0.4s ease;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.02);
    position: relative;
    top: 0;
}

.project-card:hover {
    top: -10px;
    box-shadow: 0 25px 50px rgba(0, 97, 242, 0.15);
}

.project-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.project-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-img-wrapper img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-body {
    padding: 30px;
}

.tech-badge {
    font-size: 0.75rem;
    padding: 5px 12px;
    border-radius: 20px;
    background: #eff6ff;
    color: var(--bs-blue-primary);
    font-weight: 600;
    margin-right: 5px;
    margin-bottom: 5px;
    display: inline-block;
}

.project-preview {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

/* =========================================
   9. COMPONENTES: CONTACTO
   ========================================= */
.contact-box {
    background: white;
    border-radius: 24px;
    padding: 50px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 10;
}

.info-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.03);
    text-align: center;
    transition: 0.3s;
    height: 100%;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 97, 242, 0.1);
    border-color: rgba(0, 97, 242, 0.1);
}

.info-icon {
    width: 60px;
    height: 60px;
    background: #eff6ff;
    color: var(--bs-blue-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 20px;
}

.form-control,
.form-select {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 1rem 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
}

.form-control:focus,
.form-select:focus {
    background: white;
    box-shadow: 0 8px 25px rgba(0, 97, 242, 0.15);
    border-color: var(--bs-blue-primary);
    transform: translateY(-1px);
}

.form-control,
.form-select {
    transition: all 0.25s ease;
}

/* =========================================
   10. OTROS (Stack, Pasos, FAQ)
   ========================================= */
.tech-card {
    background: white;
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.tech-card:hover {
    transform: translateY(-5px);
    border-color: var(--bs-blue-cyan);
    box-shadow: 0 10px 25px rgba(0, 207, 213, 0.15);
}

.tech-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: -webkit-linear-gradient(45deg, var(--bs-blue-primary), var(--bs-blue-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.step-card {
    position: relative;
    padding: 30px;
    background: white;
    border-radius: 20px;
    height: 100%;
    border-bottom: 4px solid var(--bs-blue-cyan);
}

.step-number {
    font-size: 4rem;
    font-weight: 900;
    color: rgba(0, 97, 242, 0.05);
    position: absolute;
    top: 10px;
    right: 20px;
    line-height: 1;
}

.accordion-item {
    border: none;
    margin-bottom: 15px;
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.02);
}

.accordion-button {
    padding: 20px;
    font-weight: 600;
    color: var(--bs-dark-bg);
    background: white;
}

.accordion-button:not(.collapsed) {
    color: var(--bs-blue-primary);
    background-color: #eff6ff;
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
}

/* =========================================
   11. FOOTER COMPACTO PREMIUM (DEFINITIVO)
   ========================================= */
footer {
    background: linear-gradient(to right, #0a1128, #16203a);
    color: #a3bffa;
    padding: 20px 0;
    border-top: 1px solid rgba(0, 198, 255, 0.15);
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    width: 100%;
    z-index: 50;
    /* Asegura que esté por encima */
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 198, 255, 0.5), transparent);
}

.footer-logo-box {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--bs-blue-cyan), var(--bs-blue-primary));
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    margin-right: 10px;
    box-shadow: 0 0 10px rgba(0, 97, 242, 0.3);
}

.brand-text-footer {
    background: linear-gradient(to right, #ffffff, #a3bffa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
    text-shadow: 0px 0px 8px rgba(0, 198, 255, 0.15);
}

.copyright-text {
    font-size: 0.8rem;
    margin-left: 42px;
}

.contact-item {
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    padding: 5px 12px;
    border-radius: 20px;
    color: #a3bffa !important;
    text-decoration: none !important;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white !important;
    transform: translateY(-1px);
}

.contact-icon {
    color: var(--bs-blue-cyan);
    filter: drop-shadow(0 0 3px rgba(0, 207, 213, 0.5));
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    margin-left: 8px;
    transition: all 0.3s;
    color: #a3bffa !important;
    text-decoration: none !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-link:hover {
    background: var(--bs-blue-cyan);
    border-color: var(--bs-blue-cyan);
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(0, 207, 213, 0.4);
}

/* =========================================
   12. RESPONSIVE UTILITIES
   ========================================= */
@media (max-width: 991px) {
    .hero-title {
        font-size: 2.8rem;
    }

    .hero-section,
    .page-hero {
        text-align: center;
    }

    .hero-image-container {
        margin-top: 50px;
    }

    .hero-list {
        display: inline-block;
        text-align: left;
    }

    .detail-img-box {
        min-height: 250px;
    }

    .contact-box,
    .form-container {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    footer .row>div {
        text-align: center !important;
        margin-bottom: 15px;
    }

    footer .d-flex {
        justify-content: center !important;
    }
}

.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: linear-gradient(135deg, #25d366, #1ebe5d);
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .25);
    z-index: 999;
    transition: transform .3s ease, box-shadow .3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, .35);
    color: #fff;
}

.btn-gradient.loading {
    pointer-events: none;
    opacity: 0.8;
    position: relative;
}

.btn-gradient.loading::after {
    content: '';
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg) translate(-50%, -50%);
    }
}

::placeholder {
    color: #94a3b8;
    opacity: 1;
}
