
/* --- PALETA DE COLORES BOSCH --- */
:root {
    --bosch-red: #E20015;
    --bosch-blue: #005691;
    --bosch-dark: #191919;
    --bosch-gray: #F5F5F5;
    --bosch-white: #FFFFFF;
    --whatsapp-green: #25D366; /* Color oficial WhatsApp */
    --transition-smooth: all 0.5s ease-in-out;
}

/* --- IMPORTAR FUENTE OFICIAL BOSCH SANS --- */

/* Fuente Regular (Normal - Peso 400) */
@font-face {
    font-family: 'Bosch Sans';
    src: url('../fonts/BoschOfficeSans-Regular_V2_45.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

/* Fuente Bold (Negrita - Peso 700) */
@font-face {
    font-family: 'Bosch Sans';
    src: url('../fonts/BoschOfficeSans-Bold_V2_45.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

/* Fuente Black/Extra Bold (Peso 900 - Para el título principal) */
@font-face {
    font-family: 'Bosch Sans';
    src: url('../fonts/BoschSans-Bold.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
}

/* Fuente Light (Ligera - Peso 300) */
@font-face {
    font-family: 'Bosch Sans';
    src: url('../fonts/BoschSans-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Bosch Sans', 'Roboto', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bosch-white);
    color: var(--bosch-dark);
    line-height: 1.6;
    overflow-x: hidden; /* Evita scroll horizontal por animaciones */
}

/* --- HEADER Y NAVEGACIÓN --- */
header {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1200px;
    margin: auto;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700; /* Roboto Bold para Autocentro */
    color: var(--bosch-dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    /* Eliminado text-transform: uppercase para respetar mayúsculas/minúsculas mixtas */
}

/* --- ESTILO PARA LA IMAGEN DEL LOGO --- */
.logo-img {
    height: 40px; /* Controla la altura del logo. Cámbialo si lo ves muy chico o muy grande */
    width: auto;  /* Mantiene la proporción para que no se deforme */
    margin-right: 5px; /* Deja un pequeño espacio antes de la palabra "Autocentro" */
    display: block;
}

.logo span {
    font-weight: 900; /* Roboto Black para ALEGRE */
    color: var(--bosch-red);
    text-transform: uppercase; /* Solo ALEGRE en mayúsculas */
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
}

.nav-links a {
    color: #333333; /* Gris oscuro corporativo */
    font-weight: 700;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #005691; /* Azul Bosch */
}

/* --- SECCIÓN HERO (Ajuste Responsivo y Fondo) --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px; 
    text-align: center;
    
    /* --- RECUPERAMOS EL FONDO --- */
    /* Usamos un degradado azul oscuro corporativo para que el texto blanco resalte, y llamamos a la foto */
    background: linear-gradient(rgba(0, 86, 145, 0.6), rgba(25, 25, 25, 0.8)), url('../img/foto-portada.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* El texto general del H1 (Mecánica de Excelencia Bosch) */
.hero h1 { 
    color: var(--bosch-white);
    font-size: clamp(2.5rem, 5vw, 4.5rem) !important;
    margin-bottom: 20px;
    line-height: 1.1;
    font-weight: 700;
}

/* El texto rojo (Autocentro ALEGRE) que está dentro del span */
.hero h1 span { 
    color: var(--bosch-red);
    /* clamp(Mínimo en celulares, Tamaño dinámico, Tope máximo en PC) */
    font-size: clamp(2rem, 4vw, 3.5rem) !important; 
    display: inline-block;
    margin-bottom: 10px;
    line-height: 1.2;
    text-transform: uppercase;
    font-weight: 900;
}


/* El texto rojo (Autocentro ALEGRE) */
.hero h2 { /* O la clase que le hayas puesto, ej: .hero-subtitle */
    color: var(--bosch-red);
    /* clamp(Mínimo en celulares, Tamaño dinámico, Tope máximo en PC) */
    font-size: clamp(2rem, 4vw, 3.5rem) !important; 
    margin-bottom: 10px;
    line-height: 1.2;
    text-transform: uppercase;
    font-weight: 900;
}

/* El párrafo más chico */
.hero p {
    color: var(--bosch-white); /* Forzamos el color blanco */
    font-size: clamp(1rem, 2vw, 1.2rem);
    max-width: 700px;
    margin: 0 auto 30px auto;
    font-weight: 400;
    /* Le agregamos una sombra sutil para despegar el texto del fondo */
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6); 
}

/* Botón estilo Bosch */
.btn-primary {
    background-color: #ED0007; /* Rojo Bosch */
    color: #ffffff;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 4px; /* Bordes ligeramente redondeados, muy corporativo */
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-block;
}

.btn-primary:hover {
    background-color: #c40006; /* Un rojo más oscuro al pasar el mouse */
    transform: translateY(-2px);
}

/* Botón Secundario (Trabaja con nosotros) */
.btn-secondary {
    background-color: transparent;
    color: var(--bosch-blue);
    padding: 12px 25px;
    font-size: 1.1rem;
    font-weight: 700;
    border: 2px solid var(--bosch-blue);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-block;
    font-family: 'Bosch Sans', 'Roboto', sans-serif;
}

.btn-secondary:hover {
    background-color: var(--bosch-blue);
    color: var(--bosch-white);
}

/* --- TÍTULOS DE SECCIÓN GENERALES --- */
.section-title {
    font-size: 2.8rem;
    color: var(--bosch-dark);
    margin-bottom: 60px;
    text-transform: uppercase;
    font-weight: 900;
    text-align: center;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 5px;
    background-color: var(--bosch-red);
    margin: 15px auto 0;
}

/* --- SECCIÓN SERVICIOS (FLIP CARDS) --- */
.services {
    padding: 100px 5%;
    background-color: var(--bosch-gray);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: auto;
}

/* Contenedor principal de la tarjeta (perspectiva) */
.flip-card {
    background-color: transparent;
    width: 100%;
    height: 350px; /* Altura fija para el giro */
    perspective: 1000px; /* Necesario para efecto 3D */
    cursor: pointer;
}

/* Contenedor interno que gira */
.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
}

/* Giro al pasar el mouse */
.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

/* Caras Frontal y Trasera */
.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; /* Oculta la cara trasera cuando no se ve */
    backface-visibility: hidden;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
}

/* Estilo Cara Frontal (Icono y Título) */
.flip-card-front {
    background-color: var(--bosch-white);
    color: var(--bosch-dark);
    border-bottom: 5px solid var(--bosch-blue);
}

.flip-card-front i {
    font-size: 4rem;
    color: var(--bosch-blue);
    margin-bottom: 25px;
}

.flip-card-front h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Estilo Cara Trasera (Descripción) */
.flip-card-back {
    background-color: var(--bosch-blue);
    color: var(--bosch-white);
    transform: rotateY(180deg); /* Ya está girada por defecto */
}

.flip-card-back h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--bosch-white);
}

.flip-card-back p {
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1.5;
}

/* --- SECCIÓN NOSOTROS --- */
.about {
    padding: 100px 5%;
    max-width: 1200px;
    margin: auto;
    display: flex;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
}

.about-text {
    flex: 1;
    min-width: 350px;
}

.about-text h2 {
    text-align: left;
}

.about-text h2::after {
    margin: 15px 0 0 0;
}

.about-text p {
    margin-top: 25px;
    font-size: 1.2rem;
    color: #444;
    font-weight: 300;
}

.about-image {
    flex: 1;
    min-width: 350px;
    position: relative;
}

.about-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    transition: var(--transition-smooth);
}

.about-image img:hover {
    transform: scale(1.02) rotate(1deg);
}

/* --- SECCIÓN CONTACTO, FORMULARIO Y MAPA --- */
.contact {
    padding: 100px 5% 0 5%; /* Padding inferior 0 para el mapa full width */
    background-color: var(--bosch-blue);
    color: var(--bosch-white);
}

.contact .section-title {
    color: var(--bosch-white);
}

.contact .section-title::after {
    background-color: var(--bosch-white);
}

.contact-container {
    display: flex;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto 80px auto; /* Margen inferior antes del mapa */
    flex-wrap: wrap;
}

.contact-info {
    flex: 1;
    min-width: 300px;
    background-color: rgba(255,255,255,0.08);
    padding: 50px;
    border-radius: 8px;
}

.contact-info p {
    margin-bottom: 30px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    font-size: 1.15rem;
    font-weight: 300;
}

.contact-info i {
    color: var(--bosch-white);
    font-size: 2rem;
    width: 40px;
    text-align: center;
    margin-top: 3px;
}

.contact-form {
    flex: 1.2;
    min-width: 350px;
    background: var(--bosch-white);
    padding: 50px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.contact-form h3 {
    color: var(--bosch-dark);
    margin-bottom: 30px;
    font-size: 1.8rem;
    font-weight: 700;
}

.form-group {
    margin-bottom: 25px;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 18px;
    border: 2px solid #eee;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    background-color: #fafafa;
    transition: border-color 0.3s;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--bosch-blue);
    background-color: var(--bosch-white);
}

.form-group textarea {
    height: 160px;
    resize: vertical;
}

.btn-submit {
    background-color: var(--bosch-red);
    color: var(--bosch-white);
    padding: 18px 30px;
    border: none;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-size: 1.2rem;
    transition: var(--transition-smooth);
    text-transform: uppercase;
}

.btn-submit:hover {
    background-color: #b30010;
    letter-spacing: 1px;
}

/* --- GOOGLE MAPS ESTILO --- */
.map-container {
    width: 100%;
    height: 450px;
    border: none;
    line-height: 0; /* Quita espacio extra inferior */
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* --- FOOTER --- */
footer {
    background-color: var(--bosch-dark);
    color: #aaa;
    text-align: center;
    padding: 40px 20px;
    font-size: 1rem;
    border-top: 1px solid #333;
}

/* --- BOTÓN WHATSAPP FLOTANTE --- */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    background-color: var(--whatsapp-green);
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 35px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    z-index: 2000; /* Por encima de todo, incluso el header */
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(5deg);
    background-color: #1ebe57; /* Un verde un poco más oscuro al hover */
    box-shadow: 2px 2px 20px rgba(0,0,0,0.5);
}

/* Animación de pulso para llamar la atención (opcional) */
@keyframes pulse-whatsapp {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.whatsapp-float {
    animation: pulse-whatsapp 2s infinite;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 992px) {
    .hero h1 { font-size: 3rem; }
    .section-title { font-size: 2.3rem; }
    .about, .contact-container { gap: 30px; }
}

@media (max-width: 768px) {
    .nav-links { display: none; } /* Simplificación para móvil */
    .hero h1 { font-size: 2.4rem; }
    .hero p { font-size: 1.1rem; }
    .about-text, .contact-info, .contact-form { padding: 30px; }
    .flip-card { height: 380px; } /* Un poco más alto en móvil */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 30px;
        bottom: 15px;
        right: 15px;
    }
}
/* --- CARRUSEL SPLIDE --- */
.gallery {
    padding: 80px 5%;
    background-color: var(--bosch-white);
    max-width: 1200px;
    margin: auto;
}

/* La imagen es la que manda en el tamaño */
.splide__slide img {
    width: 100%;
    height: 300px; /* Altura estricta para TODAS las fotos */
    object-fit: cover; /* Recorta la foto vertical u horizontal para rellenar */
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: block;
    transition: transform 0.3s ease;
}

.splide__slide a {
    display: block;
    overflow: hidden;
    border-radius: 8px;
}

.splide__slide a:hover img {
    transform: scale(1.05);
}

/* Colores Bosch para flechas y puntos */
.splide__arrow {
    background: rgba(255, 255, 255, 0.9);
}
.splide__arrow svg {
    fill: var(--bosch-red);
}
.splide__pagination__page.is-active {
    background: var(--bosch-red);
}

/* --- REDES SOCIALES --- */
.social-links {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.social-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    background-color: var(--bosch-blue); /* Fondo blanco del círculo */
    color: var(--bosch-blue); /* Color Azul del icono (la F, la camarita, etc) */
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.3rem;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Al pasar el mouse por encima (hover) */
.social-icon:hover {
    background-color: var(--bosch-red); /* Fondo se hace rojo */
    color: var(--bosch-white); /* El icono se hace blanco */
    transform: translateY(-5px); /* Efecto de saltito */
}

/* Ajustes específicos para que se vea bien en el footer (fondo oscuro) */
footer .social-links {
    justify-content: center;
    margin-bottom: 20px;
}

footer .social-icon {
    background-color: #333; /* Fondo gris oscuro */
    color: #aaa; /* Icono gris claro */
    box-shadow: none;
}

footer .social-icon:hover {
    background-color: var(--bosch-red); /* Fondo se hace rojo */
    color: var(--bosch-white); /* El icono se hace blanco */
}