/********** Template CSS **********/
:root {
    --primary: #077c71;
    --secondary: #E93C05;
    --tertiary: #555555;
    --light: #DFE4FD;
    --dark: #05206d;
}

.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;
}


/*** 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;
}

@media (max-width: 768px) {
    #header-carousel .carousel-item {
        position: relative;
        min-height: 450px;
    }
    
    #header-carousel .carousel-item img {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

.page-header {
    padding-top: 12rem;
    padding-bottom: 6rem;
    background: url(../img/header-base.jpg) top left / cover no-repeat;
}

/* En escritorio: mapa de México a la derecha, siempre debajo del menú */
@media (min-width: 992px) {
    .page-header {
        min-height: 520px;
        display: flex;
        align-items: center;
        padding-top: 10rem;
        padding-bottom: 3rem;
        background:
            url(../img/header-mapa-v2.png) right 6% bottom 24px / auto calc(100% - 200px) no-repeat,
            url(../img/header-base.jpg) top left / cover no-repeat;
    }
}

.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);
}

/*** Productos: modal de detalle y botón Perfílate ***/
:root {
    --ctc-navy: #05206d;
    --ctc-navy-2: #0a3a7a;
    --ctc-green: #077c71;
    --ctc-green-2: #0aa37f;
    --ctc-mint: #9ff0d4;
}

.project-item[data-producto] { cursor: pointer; }

.ctc-modal .modal-content {
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(5, 32, 109, .35);
}

.ctc-modal-head {
    position: relative;
    padding: 28px 32px 26px;
    color: #fff;
    background:
        radial-gradient(circle at 105% -20%, rgba(10, 163, 127, .55), transparent 55%),
        linear-gradient(135deg, var(--ctc-navy) 0%, var(--ctc-navy-2) 60%, var(--ctc-green) 130%);
}

.ctc-modal-head .btn-close {
    position: absolute;
    top: 18px;
    right: 18px;
    opacity: .85;
}

.ctc-kicker {
    display: inline-block;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ctc-mint);
    margin-bottom: 6px;
}

.ctc-modal-title {
    color: #fff;
    font-size: 2rem;
    margin: 0 40px 14px 0;
    line-height: 1.1;
}

.ctc-head-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.ctc-badge {
    border: 1.5px solid rgba(255, 255, 255, .6);
    border-radius: 40px;
    padding: 4px 16px;
    font-size: .9rem;
    font-weight: 500;
}

.ctc-badge--con {
    background: var(--ctc-mint);
    border-color: var(--ctc-mint);
    color: var(--ctc-navy);
}

.ctc-monto {
    background: #fff;
    color: var(--ctc-navy);
    border-radius: 14px;
    padding: 8px 18px;
    text-align: right;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
}

.ctc-monto small {
    display: block;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--ctc-green);
    font-weight: 600;
}

.ctc-monto strong {
    font-family: 'Jost', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
}

.ctc-head-note {
    margin: -4px 0 0;
    opacity: .85;
    font-size: .95rem;
}

.ctc-modal .modal-body { padding: 26px 32px 10px; }

.ctc-sec {
    display: inline-block;
    font-family: 'Jost', sans-serif;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #fff;
    background: var(--ctc-green);
    padding: 6px 16px;
    border-radius: 0 20px 20px 0;
    margin: 0 0 14px -32px;
    padding-left: 32px;
}

.ctc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ctc-list li {
    display: flex;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px dashed #e4e8f5;
    color: #34405e;
}

.ctc-list li:last-child { border-bottom: 0; }

.ctc-list i {
    color: var(--ctc-green-2);
    margin-top: 4px;
}

.ctc-modal-foot {
    border: 0;
    padding: 14px 32px 26px;
    gap: 10px;
}

.ctc-btn-wa,
.ctc-btn-blue {
    border: 0;
    border-radius: 40px;
    padding: 11px 24px;
    font-weight: 600;
    color: #fff !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform .2s, box-shadow .2s;
}

.ctc-btn-wa { background: #16BE45; box-shadow: 0 8px 20px rgba(22, 190, 69, .3); }
.ctc-btn-blue { background: linear-gradient(135deg, #1747c9, var(--ctc-navy)); box-shadow: 0 8px 20px rgba(5, 32, 109, .3); }
.ctc-btn-wa:hover,
.ctc-btn-blue:hover { transform: translateY(-2px); }

/* Botón flotante Perfílate (debajo del botón de WhatsApp) */
.ctc-perfilate-btn {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1040;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 40px;
    padding: 12px 24px 12px 18px;
    font-family: 'Jost', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #2257e8 0%, var(--ctc-navy) 100%);
    box-shadow: 0 10px 26px rgba(5, 32, 109, .45);
    transition: transform .2s, box-shadow .2s;
}

.ctc-perfilate-btn i {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .18);
    font-size: .85rem;
}

.ctc-perfilate-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: 0 0 0 0 rgba(34, 87, 232, .55);
    animation: ctc-pulse 2.4s infinite;
}

.ctc-perfilate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(5, 32, 109, .55);
}

@keyframes ctc-pulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 87, 232, .55); }
    70% { box-shadow: 0 0 0 14px rgba(34, 87, 232, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 87, 232, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .ctc-perfilate-btn::before { animation: none; }
}

/* Formulario */
.ctc-form .form-label {
    font-weight: 500;
    color: var(--ctc-navy);
    font-size: .95rem;
}

.ctc-form .ctc-sec { margin-top: 18px; }
.ctc-form .ctc-sec:first-child { margin-top: 0; }

.ctc-form .form-control,
.ctc-form .form-select {
    border-radius: 10px;
    border-color: #d6dcef;
    padding: .6rem .85rem;
}

.ctc-form .input-group-text {
    background: #f1f4fc;
    border-color: #d6dcef;
    color: var(--ctc-navy);
}

.ctc-form .input-group > .form-control { border-radius: 0; }
.ctc-form .input-group > :first-child { border-radius: 10px 0 0 10px; }
.ctc-form .input-group > :last-child { border-radius: 0 10px 10px 0; }

.ctc-form .form-control:focus,
.ctc-form .form-select:focus {
    border-color: var(--ctc-green-2);
    box-shadow: 0 0 0 .2rem rgba(10, 163, 127, .18);
}

.ctc-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ctc-chip {
    border: 1.5px solid #d6dcef;
    border-radius: 40px;
    padding: 8px 18px;
    cursor: pointer;
    color: #34405e;
    background: #fff;
    transition: all .15s;
    user-select: none;
}

.ctc-chip:hover { border-color: var(--ctc-green-2); }

.btn-check:checked + .ctc-chip {
    background: var(--ctc-navy);
    border-color: var(--ctc-navy);
    color: #fff;
}

.btn-check:focus-visible + .ctc-chip { box-shadow: 0 0 0 .2rem rgba(10, 163, 127, .3); }
.was-validated .btn-check:invalid + .ctc-chip { border-color: #dc3545; }

.ctc-form .pf-solo-pf,
.ctc-form .pf-solo-pm { display: none; }
.ctc-form.pf-es-pf .pf-solo-pf,
.ctc-form.pf-es-pm .pf-solo-pm { display: block; }

.ctc-form-error {
    color: #dc3545;
    font-size: .92rem;
    margin-top: 16px;
    min-height: 1px;
}

.ctc-submit {
    width: 100%;
    justify-content: center;
    margin-top: 14px;
    padding: 14px 24px;
    font-size: 1.05rem;
}

.ctc-privacy {
    text-align: center;
    font-size: .85rem;
    color: #7a849c;
    margin: 12px 0 18px;
}

.ctc-exito {
    text-align: center;
    padding: 24px 10px 34px;
}

.ctc-exito-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.6rem;
    color: #fff;
    background: linear-gradient(135deg, var(--ctc-green-2), var(--ctc-navy));
}

.ctc-exito p { color: #4b5675; max-width: 440px; margin: 0 auto 20px; }

@media (max-width: 575.98px) {
    .ctc-modal-head { padding: 24px 22px 22px; }
    .ctc-modal .modal-body { padding: 22px 22px 6px; }
    .ctc-sec { margin-left: -22px; padding-left: 22px; }
    .ctc-modal-foot { padding: 12px 22px 22px; }
    .ctc-modal-foot .btn { flex: 1 1 auto; justify-content: center; }
    .ctc-modal-title { font-size: 1.6rem; }
    .ctc-perfilate-btn { right: 14px; bottom: 14px; padding: 10px 20px 10px 14px; }
}

.ctc-modal .row .ctc-sec {
    margin-left: 0;
    padding-left: 16px;
    border-radius: 20px;
}

/* Que el título del encabezado no se encime con el mapa */
@media (min-width: 992px) {
    .page-header .container > h1 { max-width: 58%; }
}

/* Mientras un modal está abierto, el botón flotante no estorba */
body.modal-open .ctc-perfilate-btn { opacity: 0; pointer-events: none; }


/*** Logo optimizado ***/
.navbar-brand .ctc-logo {
    width: 200px;
    height: auto;
}

/*** Footer ***/
.ctc-footer {
    background: var(--ctc-navy);
    color: rgba(255, 255, 255, .78);
    padding: 64px 0 36px;
}

.ctc-footer-logo {
    width: 180px;
    height: auto;
    margin-bottom: 18px;
    filter: brightness(0) invert(1);
}

.ctc-footer p { max-width: 340px; }

.ctc-footer-title {
    color: #fff;
    font-size: 1.15rem;
    margin-bottom: 18px;
}

.ctc-footer a {
    color: rgba(255, 255, 255, .85);
}

.ctc-footer a:hover { color: var(--ctc-mint); }

.ctc-footer-links,
.ctc-footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ctc-footer-links li,
.ctc-footer-contact li {
    padding: 6px 0;
}

.ctc-footer-contact li {
    display: flex;
    gap: 12px;
    align-items: baseline;
}

.ctc-footer-contact i {
    color: var(--ctc-mint);
    width: 16px;
    text-align: center;
}

.ctc-footer-social {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.ctc-footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .1);
    transition: background .2s;
}

.ctc-footer-social a:hover {
    background: var(--ctc-green-2);
    color: #fff;
}

.copyright a { color: rgba(255, 255, 255, .85); }


/*** Optimización para celulares y tablets ***/
@media (max-width: 991.98px) {
    /* Barra de navegación siempre visible y más compacta */
    .fixed-top {
        background: #fff;
        box-shadow: 0 2px 14px rgba(5, 32, 109, .08);
    }

    .navbar { padding-top: 6px; padding-bottom: 6px; }
    .navbar-brand .ctc-logo { width: 140px; }
    .navbar .navbar-nav .nav-link { padding: 12px 0; font-size: 1.05rem; }
    .navbar-collapse .d-flex.ms-2 { margin-left: 1.5rem !important; }
    .navbar-collapse .d-flex.ms-2 > a:first-child { margin-left: 0 !important; }

    /* Encabezados de página: menos espacio vacío */
    .page-header {
        padding-top: 8.5rem;
        padding-bottom: 3rem;
        margin-bottom: 2rem !important;
    }

    .page-header .display-3 { font-size: 2.3rem; }
}

@media (max-width: 767.98px) {
    /* Carrusel principal: imagen recortada arriba y texto debajo, siempre legible */
    .ctc-hero { margin-top: 74px; margin-bottom: 1.5rem !important; }

    #header-carousel .carousel-item {
        min-height: 0;
    }

    #header-carousel .carousel-item img {
        position: static;
        height: auto;
        object-fit: initial;
    }

    #header-carousel .carousel-caption {
        position: static;
        display: block;
        padding: 18px 0 8px;
        color: inherit;
    }

    #header-carousel .carousel-caption .display-1 {
        font-size: 2rem;
        line-height: 1.15;
        margin-bottom: 0 !important;
    }

    #header-carousel .carousel-control-prev,
    #header-carousel .carousel-control-next {
        top: 0;
        bottom: auto;
        height: 75vw;
    }

    /* Tipografía y espacios más compactos */
    .display-5 { font-size: 1.85rem; }
    .container-xxl.py-5 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
    .feature.py-5 { padding-top: 1.5rem !important; }

    /* Cifras: tres en línea, compactas */
    .facts { margin-top: 1.5rem !important; margin-bottom: 1.5rem !important; padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
    .facts .container { padding-top: 1rem !important; padding-bottom: 1rem !important; }
    .facts .row { --bs-gutter-x: .75rem; --bs-gutter-y: 1.25rem; }
    .facts .col-sm-6 { flex: 0 0 auto; width: 33.333%; padding-left: 4px; padding-right: 4px; }
    .facts .fa-3x { font-size: 1.6em; margin-bottom: .5rem !important; }
    .facts .display-4 { font-size: 1.9rem; }
    .facts .fs-5 { font-size: .85rem !important; line-height: 1.25; display: block; }
    .facts hr { display: none; }

    /* Botones con área táctil cómoda */
    .ctc-btn-wa, .ctc-btn-blue { padding: 12px 22px; }

    /* Productos: tarjeta centrada */
    .project-item { padding-right: 0 !important; }
    .project-item .project-title { left: 1.5rem; right: 1.5rem; }

    /* Footer */
    .ctc-footer { padding: 44px 0 20px; text-align: left; }
    .copyright { font-size: .9rem; }

    /* Espacio para que los botones flotantes no tapen el final de la página */
    body { padding-bottom: 72px; }
}

@media (max-width: 575.98px) {
    .facts .display-4 { font-size: 1.6rem; }
    .facts .fs-5 { font-size: .78rem !important; }
}


/*** Ajustes 2026-10-11: texto del carrusel a la izquierda y menos espacio en móvil ***/
@media (min-width: 768px) {
    /* El texto se queda sobre la onda lila, sin encimarse con la imagen */
    #header-carousel .carousel-caption .container {
        max-width: none;
        padding-left: 5vw;
        padding-right: 0;
    }

    #header-carousel .carousel-caption .row > div {
        flex: 0 0 auto;
        width: 44vw;
        max-width: 760px;
    }

    #header-carousel .carousel-caption .display-1 {
        font-size: clamp(2.2rem, 4.1vw, 5rem);
        line-height: 1.12;
        margin-left: 0 !important;
    }
}

@media (max-width: 991.98px) {
    /* Encabezado de páginas internas compacto */
    .page-header {
        padding-top: 6.5rem;
        padding-bottom: 1.75rem;
        margin-bottom: 1rem !important;
    }

    .page-header .display-3 { font-size: 2rem; margin-bottom: .5rem !important; }
    .page-header .breadcrumb { font-size: .9rem; }
}

@media (max-width: 767.98px) {
    /* Menos aire entre secciones */
    .container-xxl.py-5 { padding-top: 1.25rem !important; padding-bottom: 1.25rem !important; }
    .container-xxl.py-5 .row.g-5,
    .container-xxl.py-5 .row.g-4 { --bs-gutter-y: 1.25rem; }
    .display-5 { font-size: 1.65rem; margin-bottom: 1rem !important; }
    .mb-5 { margin-bottom: 1.5rem !important; }
    .ctc-hero { margin-bottom: .5rem !important; }

    /* Contacto: botones de oficina en una fila y mapa más bajo */
    .ctc-oficinas { display: flex; flex-wrap: wrap; gap: 8px; }
    .ctc-oficinas .btn { width: auto !important; padding: 10px 18px !important; }
    #div1 { min-height: 300px !important; }
    .container-xxl .col-lg-6[style*="min-height: 450px"] { min-height: 300px !important; }
}

.ctc-oficinas { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }
@media (max-width: 767.98px) {
    .ctc-oficinas { flex-direction: row; flex-wrap: wrap; gap: 8px; }
}

/* Barra superior: que los teléfonos no se partan en pantallas medianas */
@media (min-width: 992px) and (max-width: 1399.98px) {
    .top-bar small { font-size: .8rem; white-space: nowrap; }
    .top-bar .ms-4 { margin-left: 1rem !important; }
    .top-bar .px-5 { padding-left: 2rem !important; padding-right: 2rem !important; }
}

/*** Carrusel: sin deformar y más bajo en escritorio ***/
/* Las imágenes de escritorio ahora son 1920x820 (más bajas); se muestran completas, sin recortes */
#header-carousel .carousel-item img {
    height: auto; /* evita que el atributo height estire la imagen */
}

/* Tablet: el carrusel empieza debajo del menú (que en esta medida es blanco) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .ctc-hero { margin-top: 74px; }
    #header-carousel .carousel-caption .display-1 { font-size: 2rem; }
}
