html {
    scroll-behavior: smooth;
}

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background-color: #333;
    color: #fff;
    padding: 1rem 1.5rem;
    margin-top: 10px;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.fade-out {
    opacity: 0;
    transform: translateX(100%);
}

.toast.exito {
    background-color: #28a745;
}

.toast.error {
    background-color: #dc3545;
}

.icono-servicio-tapiceria i {
    font-size: 2.2rem;
    color: #ffc107;
    display: inline-block;
    margin-bottom: 10px;
}

/* ===== NAVBAR ===== */
.navbar .banner img {
    max-height: 80px;
    width: auto;
    display: block;
}

/* Ajuste para pantallas pequeñas */
@media (max-width: 480px) {
    .navbar .banner img {
        max-height: 50px;
    }
}

/* ===== CARRUSEL: Altura dinámica según tamaño de navbar ===== */
#carouselExampleCaptions,
.carousel,
.carousel-inner,
.carousel-item {
    height: calc(100vh - 80px); /* alto total menos navbar */
    background-color: #000; /* evita fondo blanco si imagen no llena */
}

.carousel-item {
    height: calc(100vh - 80px); /* o el alto que estás usando */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000; /* opcional */
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: scale-down;
    object-position: center; /* ⬅️ centrado en el medio al hacer zoom */
    display: block;
}

/* En pantallas medianas o móviles, navbar más bajo */
@media (max-width: 768px) {
    #carouselExampleCaptions,
    .carousel,
    .carousel-inner,
    .carousel-item {
        height: calc(100vh - 60px);
    }

    .carousel-item img {
        max-height: 100%; /* asegura que la imagen no desborde */
    }
}

/* ===== TEXTO DEL CARRUSEL ===== */
.carousel-caption {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 10px;
}
.carousel-caption h5,
.carousel-caption p {
    color: #fff;
}

.hero-section {
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.8));
    z-index: 1;
}

.hero-content {
    z-index: 2;
}

.hero-btn {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.animate-bounce {
    animation: bounce 2s infinite;
}

/* Flecha scroll */
.scroll-down-indicator {
    z-index: 2;
    font-size: 1.5rem;
    color: #fff;
}

#mainNavbar {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, padding 0.3s ease;
}

nav a {
    font-size: large;
    color: #ffffff !important; /* Cambia el color de los enlaces */
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8); /* sombra negra suave */
}

.dropdown-menu a {
    font-size: 0.95rem; /* un poco más pequeño que el menú principal */
}

nav a:hover {
    color: #ffd700 !important; /* opcional: dorado al pasar el mouse */
}

.navbar-scrolled {
    background-color: #000 !important;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.dropdown-menu {
    background-color: #000 !important; /* fondo negro */
    border: none;
    border-radius: 8px;
}

.dropdown-menu a:hover {
    background-color: #333 !important; /* fondo más claro al pasar el cursor */
    color: #ffd700 !important; /* opcional: dorado al pasar el mouse */
}

.animated-btn {
    transition: all 0.3s ease-in-out;
}

.animated-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.scroll-down-indicator {
    transition: opacity 0.3s ease;
}

/* Botón "Ir arriba" */
#btnSubir {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: rgba(255, 193, 7, 0.5); /* amarillo con transparencia */
    color: #000;
    font-size: 22px;
    line-height: 50px;
    text-align: center;
    text-decoration: none;
    border-radius: 50%; /* círculo perfecto */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.3s ease;
}

#btnSubir:hover {
    background-color: rgba(255, 193, 7, 0.5); /* amarillo con transparencia */
    transform: scale(1.1);
}

/* Mostrar cuando haces scroll */
#btnSubir.show {
    opacity: 1;
    visibility: visible;
}

/* ===== SECCIÓN DE TAPICERIA PARA AUTOMOVILES ===== */
.seccion-servicios {
    background: linear-gradient(to bottom, #1b1b1b, #000);
    color: #fff;
    padding: 80px 20px;
}

.titulo-seccion {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #fff;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

.grid-servicios {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card-servicio {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.card-servicio:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.card-servicio h3 {
    color: #ffd700;
    margin-bottom: 15px;
}

.card-servicio p {
    color: #ccc;
    font-size: 0.95rem;
}

.icono {
    font-size: 40px;
    margin-bottom: 15px;
    display: block;
}

.card-servicio {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.card-servicio:hover {
    transform: scale(1.05);
    background-color: rgba(255, 255, 255, 0.08); /* un poco más clara */
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
    filter: brightness(1.1);
}

.card-servicio.visible {
    opacity: 1;
    transform: translateY(0);
}

.seccion-servicios {
    position: relative;
    color: #fff;
    padding: 80px 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.seccion-servicios.tapiceria {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.95)),
        url('../img/servicio_tapiceria.jpg') no-repeat center center / cover;
}

.seccion-servicios.pintura {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.95)),
        url('../img/servicio_plancha_pintura.jpg') no-repeat center center / cover;
}

.seccion-servicios.lavado {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.95)),
        url('../img/servicio_limpieza.png') no-repeat center center / cover;
}

.seccion-servicios.mecanica {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.95)),
        url('../img/servicio_mecanica.jpg') no-repeat center center / cover;
}

.seccion-servicios.gps {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.95)),
        url('../img/servicio_gps.png') no-repeat center center / cover;
}

/* ===== SECCIÓN DE TRABAJOS ===== */
/* === SECCIÓN TRABAJOS === */
.seccion-trabajos {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.98));
    padding: 60px 20px;
    color: #fff;
    min-height: 100vh;
}

.titulo-seccion {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 40px; /* 👈 espacio arriba */
    font-size: 2.5rem;
    color: #fff;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.8);
}

.grid-trabajos {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card-trabajo {
    background-color: #111;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.card-trabajo:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.3);
}

.card-trabajo a {
    display: block;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.card-trabajo img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid #222;
}

.info-trabajo {
    padding: 20px;
    color: #ccc;
}

.info-trabajo h3 {
    color: #ffd700;
    margin-bottom: 10px;
}

/* ===== SECCIÓN DE CONTACTO ===== */

.seccion-contacto {
    background: linear-gradient(to bottom, #111, #000);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.formulario-contacto {
    max-width: 600px;
    margin: 0 auto;
}

.campo {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.campo label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #ffd700;
}

.campo input,
.campo textarea {
    background-color: #222;
    color: #fff;
    border: 1px solid #444;
    padding: 10px;
    border-radius: 6px;
    font-size: 1rem;
}

.campo input:focus,
.campo textarea:focus {
    border-color: #ffd700;
    outline: none;
}

.btn-enviar {
    background-color: #ffd700;
    color: #000;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-enviar:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.3);
}

.mensaje-error {
    color: #ff4d4d;
    font-size: 0.9rem;
    margin-top: 5px;
}

.estado-formulario {
    margin-top: 20px;
    font-weight: bold;
}

/* ===== FOOTER ===== */
footer {
    background-color: #000;
}

.footer-link {
    color: #f8f9fa;
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer-link:hover {
    color: #ffd700 !important;
}
.social-icon {
    width: 35px;
    height: 35px;
    line-height: 35px;
    border-radius: 50%;
    text-align: center;
    color: #fff;
    display: inline-block;
    margin: 0 8px;
    transition: all 0.3s ease;
}
.social-icon:hover {
    transform: translateY(-3px);
    color: #fff;
}

@keyframes bounce {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(10px);
    }
}

/* Fondo negro del menú en pantallas pequeñas */
@media (max-width: 768px) {
    .navbar {
        background-color: #000 !important;
    }

    .navbar a {
        color: #ffffff !important; /* Cambia el color de los enlaces */
        text-shadow: none !important;
    }
}

.loader-envio {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
}

.loader-envio .spinner {
    width: 30px;
    height: 30px;
    border: 4px solid #fff;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: girar 1s linear infinite;
}

@keyframes girar {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
