/********** Template CSS **********/
:root {
    --primary: #355EFC;
    --secondary: #E93C05;
    --tertiary: #555555;
    --light: #DFE4FD;
    --dark: #011A41;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 30px;
    bottom: 30px;
    z-index: 99;
}

h1,
.h1,
h2,
.h2,
.fw-bold {
    font-weight: 700 !important;
}

h3,
.h3,
h4,
.h4,
.fw-medium {
    font-weight: 600 !important;
}

h5,
.h5,
h6,
.h6,
.fw-semi-bold {
    font-weight: 500 !important;
}


/* Ajustes tipográficos generales */
body {
    font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    color: #1f2933;
}

h1, .display-1, .display-5 {
    letter-spacing: -0.02em;
}


/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}


/*** Button ***/
.btn {
    transition: .5s;
    font-weight: 500;
}

.btn-primary,
.btn-outline-primary:hover {
    color: var(--light);
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}


/*** Navbar ***/
.fixed-top {
    transition: .5s;
}

.top-bar {
    height: 45px;
    border-bottom: 1px solid rgba(53, 94, 252, .07);
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

.navbar .navbar-nav .nav-link {
    padding: 25px 15px;
    color: var(--tertiary);
    font-weight: 500;
    outline: none;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--primary);
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav {
        margin-top: 10px;
        border-top: 1px solid rgba(0, 0, 0, .07);
        background: #FFFFFF;
    }

    .navbar .navbar-nav .nav-link {
        padding: 10px 0;
    }
}

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        visibility: hidden;
        top: 100%;
        transform: rotateX(-75deg);
        transform-origin: 0% 0%;
        transition: .5s;
        opacity: 0;
    }

    .navbar .nav-item:hover .dropdown-menu {
        transform: rotateX(0deg);
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}


/*** Header ***/
.carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: start;
    z-index: 1;
}

.carousel-control-prev,
.carousel-control-next {
    width: 3rem;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    background-color: var(--primary);
    border: 10px solid var(--primary);
}

.carousel-control-prev-icon {
    border-radius: 0 3rem 3rem 0;
}

.carousel-control-next-icon {
    border-radius: 3rem 0 0 3rem;
}

/* Altura más contenida del slider en general */
#header-carousel .carousel-item {
    position: relative;
    height: 65vh;
    max-height: 520px;
}

#header-carousel .carousel-item img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {
    #header-carousel .carousel-item {
        height: 52vh;
        max-height: 360px;
    }

    .carousel-caption {
        align-items: flex-end;
        padding-bottom: 2.8rem;
        text-align: left;
    }

    .carousel-caption h1 {
        font-size: 1.9rem;
        line-height: 1.2;
    }
}

.page-header {
    padding-top: 12rem;
    padding-bottom: 6rem;
    background-color: #f5f7ff;
    background-image: url(../img/header.jpg);
    background-repeat: no-repeat;
    background-position: right center;
    background-size: contain;
}

.page-header .breadcrumb-item,
.page-header .breadcrumb-item a {
    font-weight: 500;
}

.page-header .breadcrumb-item+.breadcrumb-item::before {
    color: var(--tertiary);
}


/*** Facts ***/
.facts {
    background: linear-gradient(rgba(53, 94, 252, .95), rgba(53, 94, 252, .95)), url(../img/bg.png);
}


/*** Callback ***/
.callback {
    position: relative;
}

.callback::before {
    position: absolute;
    content: "";
    width: 100%;
    height: 50%;
    top: 0;
    left: 0;
    background: linear-gradient(rgba(53, 94, 252, .95), rgba(53, 94, 252, .95)), url(../img/bg.png);
    z-index: -1;
}


/*** Feature ***/
.feature .feature-box,
.feature .feature-box * {
    transition: .5s;
}

.feature .feature-box:hover {
    background: var(--primary);
    border-color: var(--primary) !important;
}

.feature .feature-box:hover * {
    color: #FFFFFF !important;
}


/*** Service ***/
.service .nav .nav-link {
    transition: .5s;
}

.service .nav .nav-link.active {
    border-color: var(--primary) !important;
    background: var(--primary);
}

.service .nav .nav-link.active h5 {
    color: #FFFFFF !important;
}

.service .nav .nav-link.active h5 i {
    color: #FFFFFF !important;
}


/*** Project ***/
.project-item,
.project-item .project-img {
    position: relative;
}

.project-item .project-img a {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(255, 255, 255, .5);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    opacity: 0;
    transition: .5s;
}

.project-item:hover .project-img a {
    opacity: 1;
}

.project-item .project-title {
    position: absolute;
    top: 3rem;
    right: 0;
    bottom: 0;
    left: 3rem;
    border: 1px solid var(--light);
    border-radius: 8px;
    display: flex;
    align-items: flex-end;
    padding: 18px;
    z-index: -1;
    transition: .5s;
}

.project-item:hover .project-title {
    background: var(--primary);
    border-color: var(--primary);
}

.project-item .project-title h4 {
    transition: .5s;
}

.project-item:hover .project-title h4 {
    color: #FFFFFF;
}

.project-carousel .owl-nav {
    margin-top: 25px;
    display: flex;
    justify-content: center;
}

.project-carousel .owl-nav .owl-prev,
.project-carousel .owl-nav .owl-next {
    margin: 0 12px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: var(--light);
    border-radius: 45px;
    font-size: 22px;
    transition: .5s;
}

.project-carousel .owl-nav .owl-prev:hover,
.project-carousel .owl-nav .owl-next:hover {
    background: var(--primary);
    color: var(--light);
}


/*** Team ***/
.team-item {
    position: relative;
    padding: 4rem 0;
}

.team-item img {
    position: relative;
    z-index: 2;
}

.team-item .team-text {
    position: absolute;
    top: 0;
    right: 3rem;
    bottom: 0;
    left: 3rem;
    padding: 15px;
    border: 1px solid var(--light);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    transition: .5s;
    z-index: 1;
}

.team-item:hover .team-text {
    background: var(--primary);
    border-color: var(--primary);
}

.team-item .team-text h4 {
    transition: .5s;
}

.team-item:hover .team-text h4 {
    color: #FFFFFF;
}

.team-item .team-social .btn {
    background: var(--light);
    color: var(--primary);
}

.team-item:hover .team-social .btn {
    background: #FFFFFF;
}

.team-item .team-social .btn:hover {
    background: var(--primary);
    color: var(--light);
}


/*** Testimonial ***/
.testimonial-item {
    position: relative;
    text-align: center;
    padding-top: 30px;
}

.testimonial-item .testimonial-text {
    position: relative;
    text-align: center;
}

.testimonial-item .testimonial-text .btn-square {
    position: absolute;
    width: 60px;
    height: 60px;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
}

.testimonial-item .testimonial-text::before {
    position: absolute;
    content: "";
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    border: 30px solid;
    border-color: var(--light) transparent transparent transparent;
}

.testimonial-item .testimonial-text::after {
    position: absolute;
    content: "";
    bottom: -59px;
    left: 50%;
    transform: translateX(-50%);
    border: 30px solid;
    border-color: #FFFFFF transparent transparent transparent;
}

.testimonial-carousel .owl-item img {
    margin: 0 auto;
    width: 100px;
    height: 100px;
}

.testimonial-carousel .owl-dots {
    margin-top: 25px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.testimonial-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin: 0 5px;
    width: 30px;
    height: 30px;
    border: 1px solid var(--light);
    border-radius: 30px;
    transition: .5s;
}

.testimonial-carousel .owl-dot::after {
    position: absolute;
    content: "";
    width: 16px;
    height: 16px;
    top: 6px;
    left: 6px;
    border-radius: 16px;
    background: var(--light);
    transition: .5s;
}

.testimonial-carousel .owl-dot.active {
    border-color: var(--primary);
}

.testimonial-carousel .owl-dot.active::after {
    background: var(--primary);
}


/*** Footer ***/
.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: var(--light);
    font-weight: normal;
    text-transform: capitalize;
    transition: .3s;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    color: var(--primary);
    letter-spacing: 1px;
    box-shadow: none;
}

.copyright {
    color: var(--light);
    background: #000B1C;
}

.copyright a {
    color: var(--light);
}

.copyright a:hover {
    color: var(--primary);
}

.service-card{
background:white;
border-radius:12px;
overflow:hidden;
transition:0.3s;
}

.service-card:hover{
transform:translateY(-6px);
box-shadow:0 10px 25px rgba(0,0,0,0.08);
}

.service-header{
padding:25px;
cursor:pointer;
text-align:center;
}

.service-icon{
font-size:32px;
color:#0d6efd;
margin-bottom:10px;
}

.service-body{
padding:20px;
}
/* WhatsApp bubble + floating icon */
.wa-wrap{
  position: fixed;
  right: 18px;
  bottom: 90px; /* deja espacio al back-to-top */
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.wa-float{
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 10px 25px rgba(0,0,0,0.18);
  transition: 0.25s ease;
}

.wa-float i{
  font-size: 30px;
  line-height: 1;
}

.wa-float:hover{
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.22);
  color:#fff;
}

.wa-bubble{
  position: relative;
  max-width: 240px;
  background: #ffffff;
  color: #1f2a37;
  padding: 12px 40px 12px 14px;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
  font-size: 14px;
  font-weight: 600;
}

.wa-bubble:after{
  content:"";
  position:absolute;
  right: -8px;
  bottom: 18px;
  width: 0;
  height: 0;
  border-left: 10px solid #fff;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}

.wa-close{
  position: absolute;
  top: 6px;
  right: 8px;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.06);
  color: #111;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wa-close:hover{
  background: rgba(0,0,0,0.12);
}

/* En móvil: burbuja más compacta */
@media (max-width: 575.98px){
  .wa-bubble{ max-width: 200px; font-size: 13px; }
}


/* ========================
   MEJORAS PARA MÓVILES
   ======================== */

@media (max-width: 991.98px) {
    /* Navbar más compacta en móvil */
    .top-bar {
        display: none;
    }

    .navbar {
        padding-top: 0.4rem !important;
        padding-bottom: 0.4rem !important;
        background: #ffffff;
        box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
    }

    .navbar-brand img {
        height: 70px !important;
    }

    .navbar .navbar-nav .nav-link {
        padding: 8px 0;
        font-size: 0.95rem;
    }

    /* Secciones: menos márgenes para que se sienta más compacto */
    .container-xxl.py-5,
    .facts.my-5.py-5,
    .callback.my-5.pt-5,
    .container-xxl.service.py-5 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
        margin-top: 1.5rem !important;
        margin-bottom: 1.5rem !important;
    }

    /* Cards de servicios/tab: bordes más suaves y sombra ligera */
    .service .nav .nav-link {
        border-radius: 14px;
        margin-bottom: 12px;
    }

    .service .nav .nav-link.active {
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    }

    /* Imágenes de secciones lado a lado: ocupar ancho completo y arriba */
    .service .col-md-6 img,
    .container-xxl .col-lg-6 img {
        display: block;
        width: 100%;
        height: auto;
        margin-bottom: 1rem;
    }

    /* Testimonios: más aire alrededor */
    .testimonial-item .testimonial-text {
        padding: 1.75rem 1.25rem 2.25rem;
    }

    /* Footer: separar bloques y mejorar lectura */
    .footer .col-lg-3 {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    /* Encabezados internos: compactos y con imagen visible en móvil */
    .page-header {
        padding-top: 7.5rem;
        padding-bottom: 2.4rem;
        background-position: right center;
        background-size: contain;
    }
    /* Titulares más legibles en pantallas pequeñas */
    .display-1 {
        font-size: 2.1rem;
    }

    .display-5 {
        font-size: 1.7rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    /* Sección "About" y texto: centrados y con mejor espaciado */
    .container-xxl .text-center.mx-auto {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .border.rounded.p-4 {
        padding: 1.4rem !important;
    }

    /* Facts: texto centrado aún más compacto */
    .facts .display-4 {
        font-size: 2rem;
    }

    .facts span.fs-5 {
        font-size: 0.95rem;
    }

    /* Carrusel de proyectos: mostrar una tarjeta por fila */
    .project-item {
        margin-right: 0 !important;
    }

    .project-title {
        left: 1.5rem !important;
        right: 0 !important;
    }

    /* Formulario de contacto breve y cómodo de pulsar */
    .form-floating > .form-control,
    .form-floating > .form-select {
        padding-top: 1.1rem;
        padding-bottom: 1.1rem;
        font-size: 0.95rem;
    }

    /* Sección "Nuestros Servicios" como módulos apilados en móvil */
    .service .col-lg-4 {
        display: none !important; /* Oculta por completo la columna del menú lateral */
    }

    .service .nav,
    .service .nav.nav-pills {
        display: none !important; /* Asegura que los botones de la izquierda no se vean */
    }

    .service .col-lg-8 {
        margin-top: 1.5rem;
    }

    .service .tab-content {
        margin-top: 0.5rem;
    }

    .service .tab-content > .tab-pane {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .service .tab-content > .tab-pane + .tab-pane {
        margin-top: 2.5rem;
        padding-top: 1.8rem;
        border-top: 1px solid rgba(15, 23, 42, 0.08);
    }

    .service .tab-pane h3 {
        font-size: 1.35rem;
        margin-bottom: 0.9rem;
    }

    .btn.btn-primary.py-3 {
        padding-top: 0.9rem !important;
        padding-bottom: 0.9rem !important;
        font-size: 0.98rem;
    }

    /* Botones flotantes: que no tapen el contenido */
    .back-to-top {
        right: 18px;
        bottom: 18px;
    }

    .wa-wrap {
        right: 14px;
        bottom: 78px;
    }
}

@media (max-width: 575.98px) {
    /* Ajustes muy pequeños: tipografía un poco menor pero legible */
    body {
        font-size: 15px;
    }

    .display-5 {
        font-size: 1.55rem;
    }

    .facts .display-4 {
        font-size: 1.8rem;
    }

    .navbar-brand img {
        height: 62px !important;
    }

    /* Modal regularización en móvil: con fondo pero más contenido */
    .modal-contenido {
        padding: 18px 14px 18px;
        max-width: 94%;
        margin: 0 auto;
        border-radius: 18px;
        background-size: 150px auto;
        background-position: right bottom;
    }

    .modal-contenido h2 {
        font-size: 1.3rem;
    }

    .modal-contenido p {
        font-size: 0.9rem;
    }

    .btn-modal-aceptar,
    .btn-modal-contacto {
        width: 100%;
        text-align: center;
        margin-top: 10px;
    }
}