/* Estilos Generales */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif; 
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f8fc; /* Fondo principal gris muy claro */
    color: #212529; /* Negro suave para texto principal */
    padding-top: 80px; /* Ajustado a la altura del header fijo */
}

.container {
    width: 90%; 
    max-width: 1140px; 
    margin: auto;
    padding: 0 15px; 
}

h1, h2, h3, h4 { 
    font-family: 'Oswald', sans-serif;
    color: #212529; /* Títulos oscuros */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
h1 { font-size: 2.8em; margin-bottom: 0.6em;}
h2 { font-size: 2.2em; margin-bottom: 0.5em;} 
h3 { font-size: 1.7em; margin-bottom: 0.4em;}
h4 { font-size: 1.3em; margin-bottom: 0.3em;}

a {
    color: #007bff; /* Azul eléctrico para enlaces */
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0056b3; /* Azul más oscuro al pasar el ratón */
}

/* Header */
header {
    background: #ffffff; /* Header blanco */
    color: #333333; /* Texto oscuro en header */
    padding: 15px 0; 
    border-bottom: #007bff 2px solid; /* Borde inferior azul */
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.08); /* Sombra sutil */
}

header .header-container { 
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%; 
    max-width: 1140px; 
    margin: 0 auto; 
    padding: 0 15px; 
}

.logo-container {
    flex-shrink: 0; 
}

#site-logo {
    max-height: 50px; 
    width: auto;
    display: block;
}

.site-title-text h1 {
    margin: 0;
    font-size: 1.6em; 
    line-height: 1.2;
}
.site-title-text h1 a {
    color: #212529; /* Título oscuro */
    text-decoration: none;
    font-family: 'Oswald', sans-serif; 
}
.site-title-text p {
    margin: 0;
    font-size: 0.75em;
    color: #5a6268; /* Subtítulo gris */
}

header nav#main-nav ul {
    list-style: none; 
    padding: 0; 
    margin: 0; 
    display: flex; 
}

header nav#main-nav ul li {
    margin-left: 25px; 
    list-style-type: none; 
}

header nav#main-nav ul li a {
    color: #333333; 
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9em; 
    font-weight: 600; 
    padding: 10px 0; 
    font-family: 'Oswald', sans-serif; 
    letter-spacing: 0.8px; 
    transition: color 0.2s ease;
    border-bottom: 2px solid transparent; 
    position: relative; 
}
header nav#main-nav ul li a::after { 
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px; 
    left: 50%;
    transform: translateX(-50%);
    background-color: #007bff; /* Azul para la línea hover */
    transition: width 0.25s ease-in-out;
}

header nav#main-nav ul li a:hover::after,
header nav#main-nav ul li a.active-link::after {
    width: 100%;
}

header nav#main-nav ul li a:hover,
header nav#main-nav ul li a.active-link { 
    color: #007bff; /* Azul al hacer hover/activo */
}


/* Botón de hamburguesa */
#mobile-menu-toggle {
    display: none; 
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 1001; 
}
#mobile-menu-toggle span {
    display: block;
    width: 28px; 
    height: 3px;
    background-color: #333333; /* Color oscuro para las barras */
    margin: 6px 0; 
    transition: all 0.3s ease-in-out;
    border-radius: 1px;
}

#mobile-menu-toggle.is-active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg); 
}
#mobile-menu-toggle.is-active span:nth-child(2) {
    opacity: 0;
}
#mobile-menu-toggle.is-active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg); 
}


/* Hero Section */
#hero {
    min-height: 450px; 
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    color: #fff; /* Texto blanco sobre imagen */
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    position: relative; 
}
#hero::before { 
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.5)); /* Overlay más sutil */
    z-index: 1;
}
#hero .container { 
    position: relative;
    z-index: 2;
}


#hero h2 {
    font-size: 3.2em; 
    margin-bottom: 15px;
    color: #fff;
    text-shadow: 0 0 8px rgba(0,0,0,0.6); 
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    font-weight: 700;
}

#hero p {
    font-size: 1.25em; 
    margin-bottom: 30px;
    text-shadow: 0 0 6px rgba(0,0,0,0.5);
    max-width: 750px; 
    margin-left:auto;
    margin-right:auto;
    color: #f8f9fa; /* Texto hero claro */
}

.cta-button {
    display: inline-block;
    background: #007bff; 
    color: #fff;
    padding: 14px 30px; 
    text-decoration: none;
    border-radius: 5px; 
    font-size: 1.1em;
    font-weight: 700; 
    text-transform: uppercase;
    letter-spacing: 1px; 
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    border: none; 
}

.cta-button:hover {
    background: #0056b3; 
    color: #fff;
    transform: translateY(-2px); 
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
}

/* Main Content */
main.container {
    padding-top: 30px; 
    padding-bottom: 30px;
}

main section {
    padding: 40px 0; 
    border-bottom: 1px solid #dee2e6; /* Borde claro entre secciones */
}
main section:last-child {
    border-bottom: none;
}

/* Estilo para la sección de bienvenida */
#bienvenida {
    background-color: #ffffff; /* Fondo blanco */
    color: #343a40; /* Texto oscuro */
    padding: 40px 20px; 
    margin-top: 30px; 
    margin-bottom: 40px; 
    border-radius: 8px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.075); 
}

#bienvenida .container { 
    max-width: 800px; 
    margin: auto; 
    text-align: center;
}

#bienvenida h2 {
    color: #007bff; 
    font-size: 2.6em; 
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: none; 
}

#bienvenida p {
    font-size: 1.05em; 
    line-height: 1.7; 
    color: #495057; 
    margin-bottom: 0; 
}
#bienvenida p:not(:last-child) { 
    margin-bottom: 1.2em; 
}

/* Títulos generales de sección (Servicios, Galería, etc.) */
main h2 { 
    text-align: center;
    margin-top: 30px; 
    margin-bottom: 35px; 
    font-size: 2.6em; 
    font-family: 'Oswald', sans-serif;
    color: #212529; 
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 15px;
    border-bottom: 2px solid #007bff; 
    display: inline-block; 
}
section > h2 { 
    display: block; 
}
section { 
    text-align: center;
}
section > h2 { 
    display: inline-block;
    text-align: left; 
}


/* Servicios */
.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 350px)); 
    gap: 30px; 
    justify-content: center;
}

/* Media Query para servicios con 4 columnas (ajustado) */
@media (min-width: 1180px) { 
    .servicios-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
/* Media Query para servicios con 3 columnas (ajustado) */
@media (min-width: 880px) and (max-width: 1179px) { 
    .servicios-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
/* Media Query para servicios con 2 columnas (ajustado) */
@media (min-width: 590px) and (max-width: 879px) { 
    .servicios-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* Para móviles (menos de 590px), el auto-fit con minmax(260px, 350px) resultará en 1 columna */


.servicio-item {
    background: #ffffff; 
    color: #343a40; 
    padding: 0; 
    border: 1px solid #dee2e6; 
    border-radius: 5px; 
    box-shadow: 0 4px 8px rgba(0,0,0,0.08); 
    display: flex; 
    flex-direction: column;
    overflow: hidden; 
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.servicio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.12);
}

.servicio-item-imagen {
    width: 100%;
    height: 200px; 
    object-fit: cover; 
    border-bottom: 1px solid #dee2e6; 
}

.servicio-item h3, 
.servicio-item p {
    padding: 18px; 
}
.servicio-item h3 {
    margin-top: 0; 
    font-family: 'Oswald', sans-serif;
    color: #007bff; 
    font-size: 1.5em; 
    margin-bottom: 12px;
}

.servicio-item p {
    font-size: 0.9em;
    line-height: 1.6;
    margin-bottom: 12px;
    color: #495057; 
}
.servicio-item p:last-of-type { 
    margin-bottom: 18px; 
}

.servicio-item .precio {
    font-weight: bold;
    color: #28a745; 
    font-size: 1.15em;
    font-family: 'Oswald', sans-serif;
}

/* Galería */
.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(max(180px, calc(20% - 15px)), 1fr)); 
    gap: 20px; 
}

@media (min-width: 1200px) { 
    .galeria-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}


.galeria-item img {
    width: 100%;
    height: 200px; 
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid #dee2e6;
    box-shadow: 0 3px 6px rgba(0,0,0,0.08);
    transition: transform 0.25s ease, opacity 0.25s ease, box-shadow 0.25s ease;
}
.galeria-item img:hover {
    transform: scale(1.05);
    opacity: 0.95; 
    box-shadow: 0 5px 10px rgba(0,0,0,0.12);
}

/* Contacto */
.page-title-container { 
    text-align: center;
    margin-bottom: 40px; 
}
.page-title-container h2 {
    font-size: 2.8em; 
    color: #212529; 
    margin-bottom: 8px;
    border-bottom: none; 
}
.page-title-container p {
    font-size: 1.15em;
    color: #6c757d;
}

.contact-page-layout {
    display: grid;
    grid-template-columns: 1fr; 
    gap: 35px; 
}

@media(min-width: 800px) { 
    .contact-page-layout {
        grid-template-columns: 1fr 1fr; 
    }
}

#contacto-info-mapa, #formulario-contacto { 
    padding: 30px; 
    background-color: #ffffff; 
    border-radius: 5px;
    border: 1px solid #dee2e6;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}
#contacto-info-mapa h3, #formulario-contacto h3 { 
    font-size: 1.8em; 
    color: #007bff; 
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e9ecef; 
}


#contacto-info .datos-contacto {
    display: grid;
    grid-template-columns: 1fr; 
    gap: 20px; 
    margin-bottom: 30px;
}

#contacto-info .datos-contacto div {
    background: transparent; 
    padding: 0;
    border-left: 3px solid #007bff; 
    padding-left: 18px; 
}
#contacto-info .datos-contacto h4 { 
    font-size: 0.95em; 
    color: #495057; 
    margin-top: 0;
    margin-bottom: 6px; 
    text-transform: uppercase;
    font-weight: 600;
}
#contacto-info .datos-contacto img { 
     display:none; 
}
#contacto-info .datos-contacto p {
    margin-bottom: 4px; 
    font-size: 1em; 
    color: #343a40;
}
#contacto-info .datos-contacto p a { 
    color: #007bff; 
}
#contacto-info .datos-contacto p a:hover {
    color: #0056b3;
}

.contact-social-icons {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}
.contact-social-icons h4 {
    font-size: 0.95em;
    color: #495057;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 10px;
}
.contact-social-icons a {
    display: inline-block;
    margin-right: 15px;
    color: #5a6268; /* Color base del icono */
}
.contact-social-icons a:hover {
    color: #007bff; /* Color de acento al pasar el ratón */
    transform: scale(1.1);
}
.contact-social-icons svg { /* Mismo tamaño que en el footer */
    width: 26px; 
    height: 26px;
    vertical-align: middle;
}


.mapa {
    margin-top: 30px;
}
.mapa h3 { 
    font-size: 1.3em; 
    color: #343a40;
    margin-bottom: 15px;
}
.mapa iframe {
    border-radius: 5px;
    border: 1px solid #dee2e6;
    width:100%; 
    height: 350px; 
    filter: none; 
}

/* Formulario de Contacto */
#formulario-contacto label {
    display: block;
    margin-bottom: 8px; 
    font-weight: 600; 
    font-size: 0.9em;
    color: #495057;
}

#formulario-contacto input[type="text"],
#formulario-contacto input[type="email"],
#formulario-contacto textarea {
    width: 100%;
    padding: 14px; 
    border: 1px solid #ced4da; 
    border-radius: 5px;
    box-sizing: border-box; 
    background-color: #fff; 
    color: #495057; 
    font-family: 'Montserrat', sans-serif;
    font-size: 1em; 
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
#formulario-contacto input[type="text"]:focus,
#formulario-contacto input[type="email"]:focus,
#formulario-contacto textarea:focus {
    border-color: #007bff; 
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25); 
}


#formulario-contacto textarea {
    resize: vertical;
    min-height: 140px; 
}

#formulario-contacto button[type="submit"].cta-button { 
    width: 100%; 
    margin-top: 15px;
    padding: 14px; 
}


.success-message {
    background-color: #d1e7dd; 
    color: #0f5132; 
    border: 1px solid #badbcc;
    padding: 14px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.error-message {
    background-color: #f8d7da; 
    color: #842029; 
    border: 1px solid #f5c2c7;
    padding: 14px;
    border-radius: 5px;
    margin-bottom: 20px;
}


/* Footer */
footer {
    background: #343a40; /* Footer gris oscuro */
    color: #adb5bd; 
    text-align: center;
    padding: 40px 20px; 
    margin-top: 50px; 
    border-top: 1px solid #495057;
}

footer p {
    margin: 10px 0; 
    font-size: 0.9em; 
}
footer strong { 
    color: #f8f9fa; /* Nombre de empresa más claro en footer */
    font-weight: 500;
}
footer a {
    color: #ced4da; 
}
footer a:hover {
    color: #007bff; /* Enlaces hover azules */
}

/* Footer Social Icons */
footer .social-icons {
    margin-top: 20px;
    margin-bottom: 20px;
}

footer .social-icons a {
    display: inline-block;
    margin: 0 12px; 
    color: #adb5bd; 
    transition: color 0.2s ease, transform 0.2s ease;
}

footer .social-icons a:hover {
    color: #007bff; 
    transform: scale(1.2); 
}

footer .social-icons svg {
    width: 26px; 
    height: 26px;
    vertical-align: middle;
}


/* Responsive */
@media(max-width: 768px){
    body {
        padding-top: 70px; /* Ajustar si la altura del header móvil cambia */
    }
    header .header-container {
        flex-wrap: wrap; 
        padding: 0 10px; 
    }
    #site-logo {
        max-height: 40px; 
    }
    .site-title-text h1 {
        font-size: 1.4em;
    }
    .site-title-text p {
        display:none; 
    }
    
    header nav#main-nav { /* Menú desplegable móvil */
        display: none; 
        width: 100%;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98); /* Fondo blanco para menú móvil */
        position: absolute;
        top: 100%; 
        left: 0;
        right: 0;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1); 
        border-top: 1px solid #dee2e6;
    }
    header nav#main-nav.active { 
        display: flex;
    }

    header nav#main-nav ul {
        flex-direction: column;
        width: 100%;
    }

    header nav#main-nav ul li {
        margin-left: 0;
        text-align: left; 
        border-bottom: 1px solid #e9ecef; 
    }
    header nav#main-nav ul li:last-child {
        border-bottom: none;
    }

    header nav#main-nav ul li a {
        display: block; 
        padding: 16px 20px; 
        width: 100%;
        border-bottom: none; 
        font-size: 1em; 
        font-weight: 500; 
        color: #343a40; /* Texto oscuro en menú móvil */
    }
    header nav#main-nav ul li a:hover,
    header nav#main-nav ul li a.active-link {
        background-color: #007bff; 
        color: #fff;
    }


    #mobile-menu-toggle {
        display: block; 
        position: absolute; 
        right: 15px; 
        top: 50%;
        transform: translateY(-50%);
    }
     #mobile-menu-toggle span { 
        background-color: #343a40;
    }


    .container {
        width: 95%;
        padding: 0 10px;
    }

    #hero h2 {
        font-size: 2.4em; 
    }
    #hero p {
        font-size: 1.1em; 
    }
    .cta-button {
        padding: 12px 22px; 
        font-size: 1em;
    }

    main h2 { 
        font-size: 2.2em; 
    }
    #bienvenida h2 { font-size: 2.2em; }
    #bienvenida p { font-size: 1em; }


    .servicios-grid,
    .galeria-grid,
    .contact-page-layout { 
        grid-template-columns: 1fr; 
    }

    .motos-grid { 
         grid-template-columns: 1fr;
    }
    .filtros-motos form {
        flex-direction: column; 
        align-items: stretch; 
    }
    .filtros-motos form div {
        width: 100%; 
    }
    .filtros-motos input[type="text"], .filtros-motos select, .filtros-motos button, .filtros-motos a.btn {
        width: 100%;
        margin-bottom: 10px; 
    }
    .filtros-motos button, .filtros-motos a.btn {
        display: block;
    }


    .mapa iframe {
        height: 250px; 
    }
}