/********** Template CSS **********/

html {
    scroll-behavior: smooth;
}

/* Evita el desbordamiento horizontal en móvil (espacios en blanco al deslizar).
   Se usa `clip` en vez de `hidden` para NO romper el navbar position: sticky. */
html, body {
    overflow-x: clip;
    max-width: 100%;
}

/* Compensa la altura del navbar sticky en los saltos de ancla */
#nosotros, #servicios, #contacto {
    scroll-margin-top: 88px;
}

:root {
    --primary: #1985C0;
    --secondary: #F5C414;
    --light: #F2F2F2;
    --dark: #1A3F70;
}

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

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


/*** 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 {
    font-weight: 500;
    text-transform: uppercase;
    transition: .5s;
}

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

.btn.btn-secondary {
    color: #1A3F70;
}

.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;
    border-radius: 2px;
}


/*** 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 {
    margin-right: 30px;
    padding: 25px 0;
    color: #FFFFFF;
    font-size: 18px;
    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 {
        border-top: 1px solid #EEEEEE;
    }
}

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

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

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

@media (min-width: 992px) {
    .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;
    }
}


/*** Header ***/
.carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .7);
    z-index: 1;
}

.carousel-control-prev,
.carousel-control-next {
    width: 10%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 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 {
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

.page-header-inner {
    background: rgba(0, 0, 0, .7);
}

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


/*** Facts ***/
.fact {
    background: linear-gradient(rgba(0, 0, 0, .7), rgba(0, 0, 0, .7)), url(../img/carousel-bg-1.jpg);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}


/*** Service ***/
.service .nav .nav-link {
    background: var(--light);
    transition: .5s;
}

.service .nav .nav-link.active {
    background: var(--primary);
}

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

.service-nav-viewport {
    overflow: hidden;
    scroll-behavior: smooth;
}

.service-scroll-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    margin: 0 auto;
    border: none;
    border-radius: 50%;
    background: var(--dark);
    color: #FFFFFF;
    transition: .3s;
}

.service-scroll-btn:hover {
    background: var(--primary);
}

.service-scroll-btn:disabled {
    opacity: .35;
    cursor: default;
}

/* Center the service text vertically next to the image */
.service .tab-content .col-md-6:last-child {
    display: flex;
    flex-direction: column;
    justify-content: center;
}


/*** Booking ***/
.booking {
    background: linear-gradient(rgba(0, 0, 0, .7), rgba(0, 0, 0, .7)), url(../img/carousel-bg-2.jpg) center center no-repeat;
    background-size: cover;
}

.bootstrap-datetimepicker-widget.bottom {
    top: auto !important;
}

.bootstrap-datetimepicker-widget .table * {
    border-bottom-width: 0px;
}

.bootstrap-datetimepicker-widget .table th {
    font-weight: 500;
}

.bootstrap-datetimepicker-widget.dropdown-menu {
    padding: 10px;
    border-radius: 2px;
}

.bootstrap-datetimepicker-widget table td.active,
.bootstrap-datetimepicker-widget table td.active:hover {
    background: var(--primary);
}

.bootstrap-datetimepicker-widget table td.today::before {
    border-bottom-color: var(--primary);
}


/*** Team ***/
.team-item .team-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    transform: scale(0);
    transition: .5s;
}

.team-item:hover .team-overlay {
    transform: scale(1);
}

.team-item .team-overlay .btn {
    color: var(--primary);
    background: #FFFFFF;
}

.team-item .team-overlay .btn:hover {
    color: #FFFFFF;
    background: var(--secondary)
}


/*** Testimonial ***/
.testimonial-carousel .owl-item .testimonial-text,
.testimonial-carousel .owl-item.center .testimonial-text * {
    transition: .5s;
}

.testimonial-carousel .owl-item.center .testimonial-text {
    background: var(--primary) !important;
}

.testimonial-carousel .owl-item.center .testimonial-text * {
    color: #FFFFFF !important;
}

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

.testimonial-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin: 0 5px;
    width: 15px;
    height: 15px;
    border: 1px solid #CCCCCC;
    transition: .5s;
}

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


/*** Footer ***/
.footer {
    background: linear-gradient(rgba(0, 0, 0, .9), rgba(0, 0, 0, .9)), url(../img/carousel-bg-1.jpg) center center no-repeat;
    background-size: cover;
}

.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: 15px;
    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 {
    letter-spacing: 1px;
    box-shadow: none;
}

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

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

.footer .footer-menu a {
    margin-right: 15px;
    padding-right: 15px;
    border-right: 1px solid rgba(255, 255, 255, .3);
}

.footer .footer-menu a:last-child {
    margin-right: 0;
    padding-right: 0;
    border-right: none;
}


/*** Hero Section ***/
.hero-section {
    position: relative;
    min-height: 780px;
    background-image: url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center top;
    display: flex;
    align-items: center;
    padding: 80px 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .2);
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.min-vh-hero {
    min-height: 620px;
}

/* Título del hero responsivo: 5rem en escritorio, se reduce en móvil
   para que "AUTOMOTRIZ" no se salga y cause scroll horizontal */
.hero-section h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
}

.hero-logo {
    max-width: 380px;
    max-height: 380px;
    object-fit: contain;
    filter: drop-shadow(0 2px 12px rgba(0, 0, 0, .5));
}

.btn-whatsapp {
    background-color: #25D366;
    color: #fff;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
}

.btn-whatsapp:hover {
    background-color: #1dab52;
    color: #fff;
}


/*** Floating Buttons ***/
.btn-float-whatsapp,
.btn-float-appointment {
    position: fixed;
    right: 20px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    z-index: 998;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
    transition: transform .2s;
}

.btn-float-whatsapp:hover,
.btn-float-appointment:hover {
    transform: scale(1.1);
    color: #fff;
}

.btn-float-whatsapp {
    bottom: 215px;
    background-color: #25D366;
}

.btn-float-appointment {
    bottom: 150px;
    background-color: var(--primary);
}

/*** Stack de imágenes (sección Testimonial) ***/
.testimonial-img-stack {
    position: relative;
    width: 445px;
    height: 535px;
    flex-shrink: 0;
    transform: translateX(-50px);
}

.testimonial-img-stack .stack-img {
    position: absolute;
    width: 325px;
    height: 425px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
    transition: top 0.65s cubic-bezier(0.4, 0, 0.2, 1),
                left 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Las tres cartas tienen la misma orientación,
   desplazadas en diagonal (de atrás a adelante: esquina superior-izquierda → inferior-derecha) */
.stack-img--back {
    top: 0;
    left: 0;
    z-index: 1;
}

.stack-img--mid {
    top: 50px;
    left: 50px;
    z-index: 2;
}

.stack-img--front {
    top: 100px;
    left: 100px;
    z-index: 3;
}

/*** Iconos de redes sociales estáticos (sección Testimonial) ***/
.social-static {
    width: 80px;
    height: 100px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    color: #fff;
    text-decoration: none;
    transition: transform .2s, opacity .2s;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}

.social-static:hover {
    transform: scale(1.08);
    color: #fff;
    opacity: .9;
}

.social-static.tiktok { background: #010101; }
.social-static.instagram { background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.social-static.facebook { background: #1877F2; }

/* 992–1399px: columnas lado a lado pero angostas — sin desplazamiento lateral */
@media (min-width: 992px) and (max-width: 1399.98px) {
    .testimonial-img-stack {
        width: 390px;
        height: 480px;
        transform: none;
    }
    .testimonial-img-stack .stack-img {
        width: 285px;
        height: 375px;
    }
    .stack-img--mid  { top: 47px; left: 47px; }
    .stack-img--front { top: 94px; left: 94px; }
}

/* Tablet (columnas apiladas verticalmente) */
@media (max-width: 991.98px) {
    .testimonial-img-stack {
        width: 325px;
        height: 400px;
        transform: none;
        margin: 0 auto;
        flex-shrink: 0;
    }
    .testimonial-img-stack .stack-img {
        width: 245px;
        height: 320px;
    }
    .stack-img--mid  { top: 38px; left: 38px; }
    .stack-img--front { top: 76px; left: 76px; }
}

/* Mobile */
@media (max-width: 575.98px) {
    .testimonial-img-stack {
        width: 252px;
        height: 312px;
        transform: none;
        margin: 0 auto;
        flex-shrink: 0;
    }
    .testimonial-img-stack .stack-img {
        width: 190px;
        height: 250px;
    }
    .stack-img--mid  { top: 31px; left: 31px; }
    .stack-img--front { top: 62px; left: 62px; }
}

/* Animaciones de scroll (WOW.js): que el contenido aparezca más rápido */
.wow.animated {
    animation-duration: 0.55s;
}