/********** Template CSS **********/
:root {
    --primary: #E31B23;
    --secondary: #51CFED;
    --light: #F8F2F0;
    --dark: #060315;
}

html,
body {
    overflow-x: hidden;
}

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

.back-to-top {
    position: fixed;
    right: 45px;
    bottom: 45px;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .3s ease, visibility .3s ease;
}

/* .btn-lg-square below sets display:flex (needed to center the icon) with the
   same selector specificity, so visibility is toggled here instead of
   display:none/block -- otherwise the source-order winner would always show
   this button regardless of scroll position. */
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


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


/*** Topbar ***/
.topbar {
    background: var(--primary);
    color: #FFFFFF;
    font-size: 13px;
    line-height: 1.4;
}

.topbar .topbar-link {
    display: inline-flex;
    align-items: center;
    color: #FFFFFF;
    text-decoration: none;
    transition: opacity .3s;
}

.topbar .topbar-link:hover {
    opacity: .75;
}

.topbar .topbar-divider {
    margin: 0 15px;
    color: rgba(255, 255, 255, .5);
}

.topbar .topbar-label {
    margin-right: 10px;
    color: rgba(255, 255, 255, .85);
}

.topbar .topbar-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-left: 6px;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 50%;
    color: #FFFFFF;
    font-size: 11px;
    transition: all .3s;
}

.topbar .topbar-social:hover {
    background: #FFFFFF;
    color: var(--primary);
}


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

.btn.btn-primary,
.btn.btn-secondary {
    color: #FFFFFF;
}

.site-cta {
    background: var(--primary);
    margin-top: 4rem !important;
    margin-bottom: 4rem !important;
    padding: 2.75rem 0 !important;
}

.site-cta .container {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

.site-cta h1,
.site-cta h2 {
    font-size: clamp(1.6rem, 2.4vw, 2.25rem);
}

.site-cta .cta-button {
    min-height: 44px;
    padding: .65rem 1.35rem;
    border: 2px solid #FFFFFF;
    border-radius: 3px;
    font-weight: 600;
    transition: transform .25s ease, background-color .25s ease, border-color .25s ease, color .25s ease, box-shadow .25s ease;
}

.site-cta .cta-button:hover,
.site-cta .cta-button:focus-visible {
    color: var(--primary);
    background: #FFFFFF;
    border-color: #FFFFFF;
    box-shadow: 0 6px 16px rgba(6, 3, 21, .2);
    transform: translateY(-2px);
}

.site-cta .cta-button-whatsapp:hover,
.site-cta .cta-button-whatsapp:focus-visible {
    color: #FFFFFF;
    background: #25D366;
    border-color: #25D366;
}

@media (max-width: 575.98px) {
    .site-cta .cta-button {
        display: block;
        width: 100%;
        margin: .65rem 0 !important;
    }
}

.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 ***/
.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

.navbar-light .navbar-nav .nav-link {
    position: relative;
    margin-right: 34px;
    padding: 25px 0;
    color: #FFFFFF;
    font-size: 17px;
    text-transform: uppercase;
    outline: none;
}

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

@media (max-width: 991.98px) {
    .navbar-light .navbar-nav .nav-link  {
        margin-right: 0;
        padding: 10px 0;
    }

    .navbar-light .navbar-nav {
        padding-right: 0;
        border-top: 1px solid #EEEEEE;
    }
}

.navbar-light .navbar-brand,
.navbar-light a.btn {
    height: 104px;
}

.navbar-light .navbar-brand {
    overflow: visible;
}

.navbar-light .navbar-brand img {
    max-height: 100%;
    width: auto;
}

@media (min-width: 992px) {
    .navbar-light .navbar-nav {
        padding-right: 18px;
    }
}

@media (max-width: 575.98px) {
    .navbar-light .navbar-brand {
        height: auto;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .navbar-light .navbar-brand h2 {
        font-size: 1.15rem;
        white-space: nowrap;
    }
}

.navbar-light .navbar-nav .nav-link {
    color: var(--dark);
    font-weight: 500;
}

@media (min-width: 768px) {
    .navbar-light .navbar-brand img {
        width: 200px !important;
        height: 88px;
        max-height: none;
        object-fit: cover;
    }
}

.navbar-light.sticky-top {
    top: -160px;
    transition: .5s;
}

@media (min-width: 992px) {
    .navbar-light .navbar-brand img {
        width: auto !important;
        height: 96px !important;
        max-height: none !important;
        object-fit: contain;
    }

    .navbar h4.pe-lg-5 {
        font-size: calc(1.5rem - 6px);
        white-space: nowrap;
        flex-shrink: 0;
    }

    .navbar h4.pe-lg-5 a {
        white-space: nowrap;
    }

    .navbar-light .navbar-nav .nav-link::before {
        position: absolute;
        content: "";
        width: 0;
        height: 5px;
        top: -6px;
        left: 50%;
        background: #FFFFFF;
        transition: .5s;
    }

    .navbar-light .navbar-nav .nav-link:hover::before,
    .navbar-light .navbar-nav .nav-link.active::before {
        width: 100%;
        left: 0;
    }

    .navbar-light .navbar-nav .nav-link.nav-contact::before {
        display: none;
    }

    .navbar .nav-item .dropdown-menu {
        display: block;
        border: none;
        margin-top: 0;
        top: 150%;
        opacity: 0;
        visibility: hidden;
        transition: .5s;
    }

    .navbar .nav-item:hover .dropdown-menu {
        top: 100%;
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}

/* Desktop navbar: bigger logo + more spacing between nav items,
   graduated by breakpoint so it never overflows the viewport. */
@media (min-width: 992px) {
    /* Reclaim outer padding so the nav has room to breathe */
    .navbar-light .navbar-brand.px-lg-5 {
        padding-left: 1.5rem !important;
        padding-right: 1rem !important;
    }

    .navbar-light .navbar-nav {
        padding-right: 0;
        flex-wrap: nowrap;
    }

    .navbar-collapse {
        flex-wrap: nowrap;
    }

    /* Small desktops / laptops (992–1199) */
    .navbar-light .navbar-brand img {
        height: 92px !important;
    }

    .navbar-light .navbar-nav .nav-link {
        margin-right: 16px;
        font-size: 13px;
        white-space: nowrap;
    }

    .navbar h4.pe-lg-5 {
        padding-right: 1rem !important;
        font-size: 13px;
    }

    .navbar h4.pe-lg-5 i {
        margin-right: .75rem !important;
    }
}

@media (min-width: 1200px) {
    .navbar-light .navbar-brand.px-lg-5 {
        padding-left: 2rem !important;
        padding-right: 1.5rem !important;
    }

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

    .navbar-light .navbar-nav .nav-link {
        margin-right: 30px;
        font-size: 15px;
    }

    .navbar h4.pe-lg-5 {
        padding-right: 2rem !important;
        font-size: 15px;
    }
}

@media (min-width: 1400px) {
    .navbar-light .navbar-brand,
    .navbar-light a.btn {
        height: 116px;
    }

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

    .navbar-light .navbar-nav .nav-link {
        margin-right: 46px;
        font-size: 16px;
    }

    .navbar h4.pe-lg-5 {
        padding-right: 3rem !important;
        font-size: 16px;
    }
}


/*** Header ***/
.header-carousel .owl-carousel-item {
    position: relative;
    height: 500px;
}

.header-carousel {
    overflow: hidden;
    /* Reserve the final height up front: the owl-carousel base CSS sets
       display:none until JS finishes initializing, which otherwise makes the
       whole hero collapse to 0px and then jump to full height (huge CLS). */
    display: block;
    min-height: 500px;
}

.header-carousel .owl-stage-outer {
    overflow: hidden;
}

.header-carousel .owl-carousel-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Before owl.carousel.js finishes setup, show only the first slide so the
   pre-init layout already matches the initialized layout (1 slide tall). */
.header-carousel:not(.owl-loaded) .owl-carousel-item:not(:first-child) {
    display: none;
}

@media (min-width: 992px) {
    .header-carousel {
        min-height: 650px;
    }

    .header-carousel .owl-carousel-item {
        height: 650px;
    }
}

@media (max-width: 768px) {
    .header-carousel .owl-carousel-item h5,
    .header-carousel .owl-carousel-item p {
        font-size: 14px !important;
        font-weight: 400 !important;
    }

    .header-carousel .owl-carousel-item h1,
    .header-carousel .owl-carousel-item h2 {
        font-size: 30px;
        font-weight: 600;
    }
}

@media (max-width: 575.98px) {
    .header-carousel .owl-carousel-item .row {
        justify-content: center;
    }

    .header-carousel .owl-carousel-item .row > div {
        text-align: center;
    }

    .header-carousel .owl-carousel-item .btn {
        display: block;
        width: 100%;
        margin: 0 0 .75rem !important;
    }

    .header-carousel .owl-carousel-item .btn:last-child {
        margin-bottom: 0 !important;
    }
}

.header-carousel .owl-nav {
    position: absolute;
    top: 50%;
    right: 8%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    /* Arrows sit on top of the hero text at narrow widths; swipe/drag
       (enabled by default in owl.carousel) already covers navigation. */
    .header-carousel .owl-nav {
        display: none;
    }
}

.header-carousel .owl-nav .owl-prev,
.header-carousel .owl-nav .owl-next {
    margin: 7px 0;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    background: transparent;
    border: 1px solid #FFFFFF;
    border-radius: 45px;
    font-size: 22px;
    transition: .5s;
}

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

.page-header {
    background: linear-gradient(rgba(6, 3, 21, .5), rgba(6, 3, 21, .5)), url(../img/8.webp) center center no-repeat;
    background-size: cover;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--light);
}


/*** About ***/
@media (min-width: 992px) {
    .container.about {
        max-width: 100% !important;
    }

    .about-text  {
        padding-right: calc(((100% - 960px) / 2) + .75rem);
    }
}

@media (min-width: 1200px) {
    .about-text  {
        padding-right: calc(((100% - 1140px) / 2) + .75rem);
    }
}

@media (min-width: 1400px) {
    .about-text  {
        width: 220px !important;
    }
}

/*** Feature ***/
@media (min-width: 992px) {
    .container.feature {
        max-width: 100% !important;
    }

    .feature-text  {
        padding-left: calc(((100% - 960px) / 2) + .75rem);
    }
}

@media (min-width: 1200px) {
    .feature-text  {
        padding-left: calc(((100% - 1140px) / 2) + .75rem);
    }
}

@media (min-width: 1400px) {
    .feature-text  {
        padding-left: calc(((100% - 1320px) / 2) + .75rem);
    }
}


/*** Service, Price & Team ***/
.service-item,
.price-item,
.team-item {
    box-shadow: 0 0 45px rgba(0, 0, 0, .07);
}

.team-item img {
    transition: .5s;
}

.team-item:hover img {
    transform: scale(1.1);
}

.service-item .service-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--light);
    transition: .5s;
}

.service-item .service-icon i {
    font-size: 36px;
    color: var(--primary);
    transition: .5s;
}

.service-item:hover .service-icon {
    background: var(--primary);
}

.service-item:hover .service-icon i {
    color: #FFFFFF;
}

.service-item a.btn-slide,
.price-item a.btn-slide,
.team-item div.btn-slide {
    position: relative;
    display: inline-block;
    overflow: hidden;
    font-size: 0;
}

.service-item a.btn-slide i,
.service-item a.btn-slide span,
.price-item a.btn-slide i,
.price-item a.btn-slide span,
.team-item div.btn-slide i,
.team-item div.btn-slide span {
    position: relative;
    height: 40px;
    padding: 0 15px;
    display: inline-flex;
    align-items: center;
    font-size: 16px;
    color: #FFFFFF;
    background: var(--primary);
    border-radius: 0 35px 35px 0;
    transition: .5s;
    z-index: 2;
}

.team-item div.btn-slide span a i {
    padding: 0 10px;
}

.team-item div.btn-slide span a:hover i {
    background: var(--secondary);
}

.service-item a.btn-slide span,
.price-item a.btn-slide span,
.team-item div.btn-slide span {
    padding-left: 0;
    left: -100%;
    z-index: 1;
}

.service-item:hover a.btn-slide i,
.price-item:hover a.btn-slide i,
.team-item:hover div.btn-slide i {
    border-radius: 0;
}

.service-item:hover a.btn-slide span,
.price-item:hover a.btn-slide span,
.team-item:hover div.btn-slide span {
    left: 0;
}

.service-item a.btn-slide:hover i,
.service-item a.btn-slide:hover span,
.price-item a.btn-slide:hover i,
.price-item a.btn-slide:hover span {
    background: var(--secondary);
}


/*** Testimonial ***/
.testimonial-carousel .owl-item .testimonial-item {
    position: relative;
    transition: .5s;
}

.testimonial-carousel .owl-item.center .testimonial-item {
    box-shadow: 0 0 45px rgba(0, 0, 0, .08);
    animation: pulse 1s ease-out .5s;
}

.testimonial-carousel .owl-dots {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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


/*** Contact ***/
@media (min-width: 992px) {
    .container.contact-page {
        max-width: 100% !important;
    }

    .contact-page .contact-form  {
        padding-left: calc(((100% - 960px) / 2) + .75rem);
    }
}

@media (min-width: 1200px) {
    .contact-page .contact-form  {
        padding-left: calc(((100% - 1140px) / 2) + .75rem);
    }
}

@media (min-width: 1400px) {
    .contact-page .contact-form  {
        padding-left: calc(((100% - 1320px) / 2) + .75rem);
    }
}


/*** Footer ***/
.footer {
    background: linear-gradient(180deg, var(--dark) 0%, #0f0a2e 100%);
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.footer .container.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3.25rem !important;
}

.footer .row.g-5 {
    --bs-gutter-x: 2rem;
}

@media (min-width: 992px) {
    .footer .row.g-5 > .col-lg-3:nth-child(1) {
        width: 25%;
    }

    .footer .row.g-5 > .col-lg-3:nth-child(2) {
        width: 29%;
    }

    .footer .row.g-5 > .col-lg-3:nth-child(3) {
        width: 27%;
    }

    .footer .row.g-5 > .col-lg-3:nth-child(4) {
        width: 19%;
    }
}

@media (min-width: 1400px) {
    .footer .container.py-5 {
        max-width: 1360px;
    }
}

.footer h4 {
    font-size: calc(1.15rem - 2px);
    letter-spacing: .02em;
}

.footer p {
    color: rgba(255, 255, 255, .82);
    font-size: calc(1rem - 2px);
    line-height: 1.7;
    overflow-wrap: break-word;
}

.footer p.d-flex > span {
    min-width: 0;
    flex: 1 1 auto;
}

.footer p.d-flex .footer-email {
    display: inline-block;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 12px;
}

@media (min-width: 992px) {
    .footer p.d-flex .footer-email {
        white-space: nowrap;
        overflow-wrap: normal;
    }
}

.footer .footer-email-role {
    font-size: 11px;
    line-height: 1.4;
    margin-top: 1px;
}

.contact-emails p {
    margin: 0;
    line-height: 1.35;
}

.contact-emails .contact-email-address {
    display: block;
    white-space: nowrap;
    font-size: 14px;
    line-height: 1.45;
}

.contact-emails .contact-email-role {
    display: block;
    font-size: 12px;
    line-height: 1.4;
    margin-top: 1px;
}

.contact-emails a:hover {
    color: var(--primary) !important;
}

@media (max-width: 575.98px) {
    .contact-emails {
        min-width: 0;
        padding-left: 1rem !important;
    }

    .contact-emails .contact-email-address {
        font-size: 11px;
    }

    .contact-emails .contact-email-role {
        font-size: 11px;
    }
}

@media (min-width: 1400px) {
    .navbar-light .navbar-brand img {
        width: auto !important;
        height: 112px !important;
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .footer p.d-flex .footer-email {
        font-size: 10px;
    }
}

.footer .btn.btn-social {
    margin-right: 5px;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    border: 1px solid #FFFFFF;
    border-radius: 35px;
    transition: .3s;
}

.footer .btn.btn-social:hover {
    color: var(--primary);
}

.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: #FFFFFF;
    font-size: 13px;
    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(--secondary);
    box-shadow: none;
}

.footer .copyright {
    padding: 25px 0;
    font-size: 13px;
    border-top: 1px solid rgba(256, 256, 256, .1);
}

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

.footer-brand {
    min-height: 58px;
    align-items: center;
    transition: .3s;
}

.footer-brand img {
    display: block;
    width: min(100%, 400px);
    height: auto;
    max-height: 140px;
    object-fit: contain;
    object-position: left center;
}

.footer-brand:hover {
    opacity: .9;
}

.footer .credit-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--light);
    font-size: 12px;
    text-decoration: none;
    transition: .3s;
}

.footer .credit-link:hover {
    color: var(--primary);
}

.footer .credit-logo {
    height: 18px;
    width: auto;
}

@media (max-width: 767.98px) {
    .footer p.d-flex .footer-email {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .footer .container.py-5 {
        padding-top: 3rem !important;
        padding-bottom: 2rem !important;
    }

    .footer-brand img {
        max-width: 350px;
    }

    .footer .copyright {
        padding-bottom: 25px;
    }
}


/*** Onepage / Smooth Scroll ***/
html {
    scroll-behavior: smooth;
}

.page-section {
    scroll-margin-top: 90px;
    /* el padding real lo da el .container interno; se anula el duplicado del wrapper */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

@media (max-width: 991.98px) {
    .page-section {
        scroll-margin-top: 70px;
    }
}


/*** Proyectos Realizados ***/
.proyecto-item {
    display: block;
    height: 100%;
    background: #FFFFFF;
    box-shadow: 0 0 45px rgba(0, 0, 0, .07);
    color: var(--dark);
    transition: .5s;
}

.proyecto-item:hover {
    transform: translateY(-5px);
}

.proyecto-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.proyecto-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .5s;
}

.proyecto-item:hover .proyecto-img img {
    transform: scale(1.08);
}

.proyecto-img::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(6, 3, 21, 0), rgba(6, 3, 21, .55));
}

.proyecto-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .2);
    border: 2px solid #FFFFFF;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: .5s;
}

.proyecto-item:hover .proyecto-play {
    background: var(--primary);
    border-color: var(--primary);
}

.proyecto-content h5 {
    color: var(--dark);
    transition: .3s;
}

.proyecto-item:hover .proyecto-content h5 {
    color: var(--primary);
}


/*** Video Placeholder (fichas de proyecto) ***/
.video-placeholder {
    position: relative;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--dark), #1c1633);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #FFFFFF;
}

.video-placeholder-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.proyecto-video {
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
    background: #000000;
    border: 0;
}


/*** Ficha Técnica (proyectos) ***/
.specs-box {
    background: var(--light);
    padding: 2rem;
}

.specs-box li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.specs-box li:last-child {
    margin-bottom: 0;
}

.specs-box li i {
    margin-top: 4px;
}
