/* Variables de color y ajustes generales */
/* =========================================
   Variables de color actualizadas (Logo Autotyre)
   ========================================= */
:root {
    --primary-color: #FFE600; /* Amarillo brillante exacto del logo */
    --dark-bg: #050505;       /* Negro puro del borde del escudo y llantas */
    --light-bg: #F9F9F9;      /* Blanco ligeramente grisáceo para el fondo general */
    --text-color: #111111;    /* Casi negro para los textos legibles */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.6;
}

/* Navegación */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--dark-bg);
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 100;
    /* Añadimos un pequeño borde inferior amarillo para resaltar el menú */
    border-bottom: 3px solid var(--primary-color); 
}

.logo {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 2px;
    font-style: italic; /* El logo original tiene las letras inclinadas */
}

/* =========================================
   Ajustes de Botones para contraste con Amarillo
   ========================================= */
.btn-primary {
    background-color: var(--primary-color);
    color: #000000; /* Forzamos texto negro puro sobre el botón amarillo */
    padding: 15px 30px;
    text-decoration: none;
    font-weight: 900;
    font-size: 1.1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    display: inline-block;
    text-transform: uppercase;
}

.btn-primary:hover {
    background-color: #D4C000; /* Un amarillo un poco más oscuro al pasar el mouse */
    transform: translateY(-2px);
}

/* =========================================
   Ajuste para los botones del Carrusel
   ========================================= */
.prev:hover, .next:hover {
    background-color: var(--primary-color); 
    color: #000000; /* Flechas negras al pasar el mouse sobre el amarillo */
}

.active, .dot:hover {
    background-color: var(--primary-color); 
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s;
}

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

/* Hero Section */
.hero {
    /* Imagen de fondo oscura de un taller/llantas */
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1578844251758-2f71da64c96f?auto=format&fit=crop&w=1600&q=80') center/cover;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--dark-bg);
    padding: 15px 30px;
    text-decoration: none;
    font-weight: 900;
    font-size: 1.1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    display: inline-block;
}

.btn-primary:hover {
    background-color: #e68a00;
    transform: translateY(-2px);
}

/* Secciones Comunes */
.section {
    padding: 80px 5%;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--dark-bg);
    text-transform: uppercase;
}

.bg-dark {
    background-color: var(--dark-bg);
    color: white;
}

/* Grid de Servicios */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-10px);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card h3 {
    margin: 20px 0 10px;
    color: var(--dark-bg);
}

.card p {
    padding: 0 20px 20px;
    color: #666;
}

/* Nosotros */
.about-container ul {
    list-style: none;
    margin-top: 20px;
}

.about-container li {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

/* Contacto y Mapa */
.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.contact-form {
    flex: 1;
    min-width: 300px;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.contact-form h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.contact-form input, 
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.contact-map {
    flex: 1;
    min-width: 300px;
    border-radius: 8px;
    overflow: hidden;
}

/* Footer */
footer {
    background: #111;
    color: #ccc;
    text-align: center;
    padding: 30px 20px;
}

/* WhatsApp Flotante */
.whatsapp-flotante {
    position: fixed;
    width: 65px;
    height: 65px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.whatsapp-flotante:hover {
    transform: scale(1.1);
}

/* Responsive básico para móviles */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Aquí podrías agregar un menú hamburguesa con JS después */
    }
    .hero-content h1 {
        font-size: 2.2rem;
    }
}

/* =========================================
   NUEVOS ESTILOS: Carrusel de Imágenes
   ========================================= */

.section-carousel {
    padding: 60px 5%;
    background-color: #fff; /* Fondo blanco para destacar */
}

/* Contenedor principal del carrusel */
.carousel-container {
    max-width: 1000px;
    position: relative;
    margin: auto;
    overflow: hidden; /* Oculta lo que sale del recuadro */
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

/* Ocultar las diapositivas por defecto */
.mySlides {
    display: none;
}

/* Ajuste de imágenes dentro del carrusel */
.mySlides img {
    width: 100%;
    height: 500px; /* Altura fija para escritorio */
    object-fit: cover; /* Recorta la imagen para llenar el espacio sin deformarse */
    vertical-align: middle;
}

/* Botones anterior y siguiente */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    margin-top: -22px;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0,0,0,0.5); /* Fondo semitransparente */
}

/* Posicionar el botón "siguiente" a la derecha */
.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

/* Efecto hover en los botones */
.prev:hover, .next:hover {
    background-color: var(--primary-color); /* Usamos el naranja de la marca */
    color: var(--dark-bg);
}

/* Texto de la leyenda (Caption) */
.text-caption {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    padding: 15px 20px;
    position: absolute;
    bottom: 0;
    width: 100%;
    text-align: center;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0)); /* Degradado para legibilidad */
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Los puntos/círculos indicadores */
.dot {
    cursor: pointer;
    height: 13px;
    width: 13px;
    margin: 0 5px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

.active, .dot:hover {
    background-color: var(--primary-color); /* Naranja activo */
}

/* Animación de desvanecimiento (Fading animation) */
.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

@keyframes fade {
    from {opacity: .4} 
    to {opacity: 1}
}

/* Ajustes Responsivos para el carrusel */
@media (max-width: 768px) {
    .mySlides img {
        height: 300px; /* Altura más baja en celulares */
    }
    .text-caption {
        font-size: 1.1rem;
        padding: 10px;
    }
    .prev, .next {
        font-size: 18px;
        padding: 12px;
    }
}

/* =========================================
   NUEVOS ESTILOS: Carrusel de Imágenes
   ========================================= */

.section-carousel {
    padding: 60px 5%;
    background-color: #fff; /* Fondo blanco para destacar */
}

/* Contenedor principal del carrusel */
.carousel-container {
    max-width: 1000px;
    position: relative;
    margin: auto;
    overflow: hidden; /* Oculta lo que sale del recuadro */
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

/* Ocultar las diapositivas por defecto */
.mySlides {
    display: none;
}

/* Ajuste de imágenes dentro del carrusel */
.mySlides img {
    width: 100%;
    height: 500px; /* Altura fija para escritorio */
    object-fit: cover; /* Recorta la imagen para llenar el espacio sin deformarse */
    vertical-align: middle;
}

/* Botones anterior y siguiente */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    margin-top: -22px;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0,0,0,0.5); /* Fondo semitransparente */
}

/* Posicionar el botón "siguiente" a la derecha */
.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

/* Efecto hover en los botones */
.prev:hover, .next:hover {
    background-color: var(--primary-color); /* Usamos el naranja de la marca */
    color: var(--dark-bg);
}

/* Texto de la leyenda (Caption) */
.text-caption {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    padding: 15px 20px;
    position: absolute;
    bottom: 0;
    width: 100%;
    text-align: center;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0)); /* Degradado para legibilidad */
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Los puntos/círculos indicadores */
.dot {
    cursor: pointer;
    height: 13px;
    width: 13px;
    margin: 0 5px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

.active, .dot:hover {
    background-color: var(--primary-color); /* Naranja activo */
}

/* Animación de desvanecimiento (Fading animation) */
.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

@keyframes fade {
    from {opacity: .4} 
    to {opacity: 1}
}

/* Ajustes Responsivos para el carrusel */
@media (max-width: 768px) {
    .mySlides img {
        height: 300px; /* Altura más baja en celulares */
    }
    .text-caption {
        font-size: 1.1rem;
        padding: 10px;
    }
    .prev, .next {
        font-size: 18px;
        padding: 12px;
    }
}

/* =========================================
   NUEVOS ESTILOS: Sección de Marcas
   ========================================= */

#marcas {
    background-color: #ffffff; /* Fondo blanco puro para que resalten los logos */
}

.brands-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; /* Permite que los logos pasen a la siguiente línea en celulares */
    gap: 40px; /* Espacio entre cada logotipo */
    max-width: 1000px;
    margin: 0 auto;
}

.brand-logo {
    max-width: 140px; /* Tamaño máximo del logo */
    height: auto;
    object-fit: contain;
    /* Efecto inicial: Grises y ligeramente transparentes */
    filter: grayscale(100%) opacity(0.6);
    transition: filter 0.4s ease, transform 0.4s ease;
    cursor: pointer;
}

/* Efecto Hover (Al pasar el mouse): Recupera el color y crece un poco */
.brand-logo:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.1);
}

/* Ajustes para dispositivos móviles */
@media (max-width: 768px) {
    .brands-container {
        gap: 20px;
    }
    .brand-logo {
        max-width: 100px;
    }
}

/* =========================================
   Sección Hero (Fondo de Video)
   ========================================= */
.hero {
    position: relative;
    height: 80vh; /* Altura de la portada */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    overflow: hidden; /* Evita que el video se salga de los bordes */
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 0;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover; /* Asegura que el video llene toda la pantalla sin aplastarse */
}

/* Capa negra semitransparente sobre el video para poder leer el texto */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65); /* 65% de oscuridad, puedes subirlo o bajarlo */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2; /* Coloca el texto y el botón POR ENCIMA del video y la capa oscura */
    color: white;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}