/*==================================================
 SGP Consulting
 Autor: Sebastian Pona
 Versión: 1.0
===================================================*/

:root{

    --primary:#d90429;
    --secondary:#0f172a;
    --dark:#050816;
    --light:#ffffff;
    --gray:#94a3b8;
    --glass:rgba(255,255,255,.08);

}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{

    font-family:'Poppins',sans-serif;

    background:var(--dark);

    color:white;

    overflow-x:hidden;

}

/**********************************************
PARTICLES
**********************************************/

#particles-js{

    position:fixed;

    width:100%;

    height:100%;

    top:0;

    left:0;

    z-index:-1;

}

/**********************************************
NAVBAR
**********************************************/

.navbar{

    transition:.4s;

    padding:18px 0;

    background:transparent;

}

.navbar.scrolled{

    background:rgba(5,8,22,.92);

    backdrop-filter:blur(12px);

    box-shadow:0 0 25px rgba(0,0,0,.45);

}

.navbar-brand img{

    height: 65px !important;

    width: 303px !important;

    max-width: 100%;

    object-fit: contain;

    transition:.4s;

}

.nav-link{

    color:white !important;

    font-weight:500;

    margin-left:18px;

    position:relative;

}

.nav-link:after{

    content:'';

    position:absolute;

    width:0;

    left:0;

    bottom:-5px;

    height:2px;

    background:var(--primary);

    transition:.3s;

}

.nav-link:hover:after{

    width:100%;

}

/**********************************************
HERO
**********************************************/

.hero{

    min-height:85vh;

    display:flex;

    align-items:center;

    position:relative;

    padding-top:100px;

    padding-bottom:50px;

}

.hero + section,

.hero + .section{

    padding-top:50px;

}

.hero.hero-sm{

    min-height:60vh;

    padding-top:140px;

    padding-bottom:80px;

}

.hero h5{

    color:var(--primary);

    font-weight:700;

    letter-spacing:2px;

    text-transform:uppercase;

}

.hero h1{

    font-size:64px;

    font-weight:800;

    margin:20px 0;

    line-height:1.1;

}

.hero h1 span{

    color:var(--primary);

}

.hero p{

    color:#cbd5e1;

    font-size:20px;

    line-height:34px;

    margin-top:20px;

}

.hero-image{

    animation:float 5s ease-in-out infinite;

    filter:drop-shadow(0 20px 40px rgba(0,0,0,.45));

    max-height: 420px;

    width: auto;

    object-fit: contain;

}

/**********************************************
BOTONES
**********************************************/

.btn-danger{

    background:var(--primary);

    border:none;

    padding:15px 35px;

    border-radius:12px;

    font-weight:600;

}

.btn-danger:hover{

    transform:translateY(-3px);

    box-shadow:0 15px 35px rgba(217,4,41,.45);

}

.btn-outline-light{

    padding:15px 35px;

    border-radius:12px;

}

/**********************************************
SECCIONES
**********************************************/

section{

    padding:90px 0;

}

.section h2{

    font-size:46px;

    font-weight:800;

}

.section p{

    color:var(--gray);

}

/**********************************************
SERVICIOS
**********************************************/

.service-card{

    background:rgba(255,255,255,.05);

    border:1px solid rgba(255,255,255,.08);

    border-radius:24px;

    padding:45px;

    transition:.35s;

    backdrop-filter:blur(14px);

    height:100%;

}

.service-card:hover{

    transform:translateY(-12px);

    border-color:var(--primary);

    box-shadow:0 25px 60px rgba(0,0,0,.35);

}

.service-card i{

    font-size:60px;

    color:var(--primary);

    margin-bottom:25px;

}

.service-card h4{

    margin-bottom:20px;

    font-weight:700;

}

.service-card p{

    color:#cbd5e1;

    line-height:30px;

}

/**********************************************
LABORATORIO IA
**********************************************/

#ia{

    background:#08101f;

}

.terminal{

    background:#111827;

    border-radius:14px;

    overflow:hidden;

    box-shadow:0 25px 60px rgba(0,0,0,.55);

}

.terminal-header{

    background:#1f2937;

    padding:14px 20px;

    color:#ff5f57;

    font-size:18px;

}

.terminal-body{

    padding:30px;

    font-family:Consolas, monospace;

    color:#00ff88;

    line-height:34px;

    min-height:260px;

    overflow-x:auto;

    white-space:pre-wrap;

    overflow-wrap:break-word;

}

/**********************************************
CONTACTO
**********************************************/

#contacto{

    text-align:center;

}

#contacto h2{

    font-size:48px;

    margin-bottom:20px;

}

#contacto p{

    color:#cbd5e1;

    font-size:20px;

}

/**********************************************
FOOTER
**********************************************/

footer{

    padding:40px 0;

    background:#02040d;

    color:#94a3b8;

    text-align:center;

}

footer img{

    height: 72px !important;

    width: 336px !important;

    max-width: 100%;

    object-fit: contain;

}

/**********************************************
ANIMACIONES
**********************************************/

@keyframes float{

    0%{

        transform:translateY(0px);

    }

    50%{

        transform:translateY(-20px);

    }

    100%{

        transform:translateY(0px);

    }

}

/*==================================================
  RESPONSIVE MEDIA QUERIES
===================================================*/

/* Para pantallas grandes (desktops pequeños y laptops) */
@media (max-width: 1199.98px) {
    .hero h1 {
        font-size: 52px;
    }
    .section h2 {
        font-size: 40px;
    }
}

/* Para tablets (max-width: 991.98px) */
@media (max-width: 991.98px) {
    .navbar {
        padding: 12px 0;
        background: rgba(5, 8, 22, 0.95) !important;
        backdrop-filter: blur(12px);
    }

    .navbar-brand img {
        height: 50px !important;
        width: 233px !important;
    }
    
    .navbar-collapse {
        background: rgba(5, 8, 22, 0.98);
        backdrop-filter: blur(12px);
        margin: 15px -12px 0 -12px;
        padding: 20px;
        border-radius: 14px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    }

    .nav-link {
        margin-left: 0;
        padding: 10px 0;
    }

    .nav-link:after {
        display: none; /* Eliminar animación de hover inferior en menú móvil */
    }

    .hero {
        padding-top: 120px;
        padding-bottom: 60px;
        min-height: auto;
    }

    .hero.hero-sm {
        padding-top: 100px;
        padding-bottom: 40px;
        min-height: auto;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero p {
        font-size: 18px;
        line-height: 28px;
    }

    section {
        padding: 70px 0;
    }

    .hero + section,
    .hero + .section {
        padding-top: 40px;
    }

    .section h2 {
        font-size: 34px;
    }
    
    .hero-image {
        margin-top: 40px;
        max-width: 80%;
    }
}

/* Para dispositivos móviles (max-width: 767.98px) */
@media (max-width: 767.98px) {
    .navbar-brand img {
        height: 45px !important;
        width: 210px !important;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 16px;
        line-height: 26px;
    }

    section {
        padding: 50px 0;
    }

    .hero + section,
    .hero + .section {
        padding-top: 30px;
    }

    .section h2 {
        font-size: 28px;
    }

    #contacto h2 {
        font-size: 32px;
    }

    .service-card {
        padding: 30px 20px;
    }

    .service-card i {
        font-size: 45px;
        margin-bottom: 15px;
    }

    .terminal-body {
        padding: 20px;
        font-size: 14px;
        line-height: 26px;
        min-height: auto;
    }
}

/* Para móviles pequeños (max-width: 575.98px) */
@media (max-width: 575.98px) {
    .hero h1 {
        font-size: 28px;
    }
    
    .hero-image {
        max-width: 100%;
    }
}

/*==================================================
  BOTÓN VOLVER ARRIBA (BACK TO TOP)
===================================================*/
.btn-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1000;
    box-shadow: 0 10px 20px rgba(217, 4, 41, 0.3);
}

.btn-top.show {
    opacity: 1;
    visibility: visible;
}

.btn-top:hover {
    transform: translateY(-5px);
    background: #b60322;
    box-shadow: 0 12px 24px rgba(217, 4, 41, 0.5);
}

.btn-top:active {
    transform: translateY(-2px);
}