/* ==========================================================
   HOJA DE ESTILOS FINAL Y OPTIMIZADA
   ========================================================== */

/* --- 1. ESTILOS GENERALES Y FUENTES --- */
body, html { background-color: #1E1E1E; color: #F5F5F5; font-family: 'Roboto', sans-serif; margin: 0; padding: 0; }
h1, h2, h3, h4, h5, h6 { font-family: 'Oswald', sans-serif; text-transform: uppercase; color: #FFFFFF; }
a { color: #FF6F00; text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- 2. ESTRUCTURA PRINCIPAL (LAYOUT) --- */
.site-content { max-width: 1200px; margin: 0 auto; padding: 2rem; min-height: 60vh; }
.page-content { text-align: center; }

/* --- 3. CABECERA Y NAVEGACIÓN (HEADER) --- */
.site-header {
    background-color: #2C2C2C; 
    padding: 0.5rem 2rem; 
    border-bottom: 2px solid #FF6F00; 
    position: sticky; /* Header Fijo */
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}
.main-nav { 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    max-width: 1200px; 
    margin: 0 auto; 
    min-height: 60px;
}
.site-logo {
    display: flex;
    align-items: center;
}
.site-logo img {
    height: 40px;
    width: auto;
    display: block;
}
/* Estilos para los botones del menú (Estilo de Acento Lateral) */
.main-nav ul { 
    list-style: none; 
    margin: 0; 
    padding: 0; 
    display: flex; 
    gap: 1rem;
}
.main-nav ul li a {
    display: block;
    padding: 0.6rem 1.2rem;
    background-color: #2C2C2C;
    color: #FFFFFF;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 8px;
    border-left: 4px solid #FF6F00;
    transition: all 0.3s ease;
}
.main-nav ul li a:hover {
    background-color: #3a3a3a;
    border-left-color: #ff8c00;
    text-decoration: none;
    transform: translateY(-2px);
}
/* Estilos para el Header Fijo al hacer scroll */
.site-header.scrolled {
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
    background-color: rgba(44, 44, 44, 0.95);
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
.site-header.scrolled .site-logo img {
    height: 30px;
}

/* --- 4. PIE DE PÁGINA (FOOTER) --- */
.site-footer {
    background-color: #2C2C2C; 
    font-size: 0.9rem;
    padding-top: 3rem; 
    border-top: 3px solid #FF6F00;
}
.footer-container {
    max-width: 1200px; margin: 0 auto; padding: 0 2rem;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem;
}
.footer-column h3 {
    color: #FFFFFF; font-size: 1.1rem; margin-bottom: 1rem;
    border-bottom: 1px solid #444; padding-bottom: 0.5rem;
}
.footer-column p { 
    line-height: 1.6;
    /* CORRECCIÓN: Color de texto a naranja para el párrafo descriptivo */
    color: #FF6F00;
}
.footer-column ul { list-style: none; padding: 0; }
.footer-column ul li { margin-bottom: 0.5rem; }
.footer-column ul a { 
    /* CORRECCIÓN: Color de enlaces a naranja */
    color: #FF6F00; 
    transition: color 0.2s ease;
}
.footer-column ul a:hover { color: #FFFFFF; text-decoration: none; } /* Cambio a blanco para contraste */
.social-icons a { margin-right: 15px; color: #FFFFFF; font-weight: bold; }
.social-icons a:hover { color: #FF6F00; }
.footer-bottom-bar {
    text-align: center; padding: 1.5rem; margin-top: 2rem;
    border-top: 1px solid #333; font-size: 0.8rem; 
    /* CORRECCIÓN: Color del copyright a naranja */
    color: #FF6F00;
}

/* --- 5. COMPONENTES DE PÁGINAS --- */

/* Sección Héroe (Homepage) */
.hero-section {
    display: flex; align-items: center; justify-content: center; text-align: center;
    padding: 100px 20px; min-height: 40vh;
    background-image: linear-gradient(rgba(30, 30, 30, 0.75), rgba(30, 30, 30, 0.75)), url('/public/images/taller-fondo.webp');
    background-size: cover; background-position: center center;
}
.hero-content h1 { font-size: 3.5rem; margin-bottom: 0.5rem; }
.hero-content p { font-size: 1.2rem; max-width: 600px; margin-left: auto; margin-right: auto; }

/* Sección de Búsqueda */
.search-section { background-color: #2C2C2C; padding: 2rem; }
.search-form { display: flex; max-width: 700px; margin: 0 auto; }
.search-form input { flex-grow: 1; padding: 15px; border: 1px solid #444; border-radius: 5px 0 0 5px; background: #333; color: #fff; font-size: 1rem; }
.search-form button {padding: 15px 30px; border: none; background: #FF6F00; color: #1E1E1E; font-size: 1rem; font-weight: bold; cursor: pointer; border-radius: 0 5px 5px 0; }

/* Sección de Marcas (Logos) */
.brands-section { text-align: center; padding: 3rem 1rem; max-width: 1200px; margin: 0 auto; }
.brands-section h2 { margin-bottom: 2rem; }
.brands-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1.5rem; }
.brand-logo img { max-width: 100%; filter: grayscale(100%); opacity: 0.7; transition: all 0.3s ease; }
.brand-logo:hover img { filter: grayscale(0%); opacity: 1; transform: scale(1.1); }
.marca-card {
    background-color: #2C2C2C; padding: 2rem; border-radius: 8px; font-size: 1.2rem;
    font-weight: bold; text-transform: uppercase; transition: all 0.2s ease; border-bottom: 3px solid transparent;
}
.marca-card:hover { transform: translateY(-5px); text-decoration: none; border-bottom-color: #FF6F00; }

/* Secciones de Manuales Destacados y Recientes */
.featured-manuals-section, .recent-manuals-section { max-width: 1200px; margin: 3rem auto; padding: 0 2rem; text-align: center; }
.featured-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; margin-top: 2rem; }
.manual-card {
    background-color: #2C2C2C; border-radius: 8px; overflow: hidden;
    text-decoration: none; transition: all 0.3s ease; border-bottom: 4px solid #FF6F00;
}
.manual-card:hover { transform: translateY(-10px); box-shadow: 0 10px 20px rgba(0,0,0,0.4); }
.card-image-container { position: relative; height: 200px; }
.moto-image { width: 100%; height: 100%; object-fit: cover; }
.brand-logo-overlay { position: absolute; bottom: 10px; left: 10px; width: 60px; height: auto; background-color: rgba(0,0,0,0.5); padding: 5px; border-radius: 5px; }
.card-content { padding: 1rem; }
.card-content h3 { margin: 0; color: #FFFFFF; font-size: 1.2rem; }

/* Sección de Datos Curiosos (Carrusel) */
.fun-fact-section { background-color: #2C2C2C; padding: 3rem 2rem; margin-top: 3rem; }
.fun-fact-slider {
    max-width: 800px; margin: 0 auto; text-align: center;
    background-color: transparent;
    padding: 1.5rem; border-radius: 8px; border-left: 4px solid #FF6F00;
    position: relative; overflow: hidden;
}
.fun-fact-slider h3 { margin-top: 0; font-size: 1.8rem; }
.slider-track-container { width: 100%; overflow: hidden; }
.slider-track { display: flex; transition: transform 0.5s ease-in-out; }
.fun-fact-slide {
    min-width: 100%; box-sizing: border-box; padding: 0 40px;
    font-size: 1.1rem; line-height: 1.7; color: #a0a0a0;
}
.slider-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); background: transparent;
    border: none; color: rgba(255, 255, 255, 0.4); font-size: 48px;
    font-weight: 100; cursor: pointer; z-index: 10; transition: color 0.3s ease;
    padding: 0 1rem;
}
.slider-arrow:hover { color: #FF6F00; }
.slider-arrow.prev { left: 10px; }
.slider-arrow.next { right: 10px; }

/* Listas de Manuales (Resultados) */
.lista-manuales { padding: 2rem 0; text-align: left; }
.lista-manuales ul { list-style: none; padding: 0; }
.lista-manuales li a {
    display: block; padding: 1rem; background-color: #2C2C2C; margin-bottom: 0.5rem;
    border-radius: 5px; transition: background-color 0.2s ease;
}
.lista-manuales li a:hover { background-color: #FF6F00; color: #FFFFFF; text-decoration: none; }

/* Página de Contacto */
.contact-container {
    display: grid; grid-template-columns: 2fr 1fr; gap: 3rem; text-align: left;
    margin-top: 2rem; align-items: start;
}
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.5rem; }
.form-group input, .form-group textarea {
    width: 100%; padding: 12px; background-color: #333; border: 1px solid #444;
    border-radius: 5px; color: #F5F5F5; font-size: 1rem;
}
.submit-button {
    background-color: #FF6F00; color: #FFFFFF; border: none; padding: 15px 30px;
    border-radius: 5px; cursor: pointer; font-size: 1rem; font-weight: bold;
}
.contact-details {
    background-color: #2C2C2C; padding: 1.5rem; border-radius: 8px; border-left: 3px solid #FF6F00;
}
.contact-details h3 { margin-top: 0; }
.contact-details p { margin-bottom: 0.5rem; }
.contact-details a { word-break: break-all; }

/* Visualizador de Manual */
.manual-header {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid #444; padding-bottom: 1rem; margin-bottom: 1.5rem;
}
.manual-header h1 { margin: 0; font-size: 1.8rem; }
.manual-container { background-color: #FFFFFF; color: #000000; padding: 2rem; border-radius: 8px; }
#sidebar { background-color: #2C2C2C !important; border-right: 2px solid #FF6F00 !important; }
#sidebar a { color: #F5F5F5 !important; text-decoration: none !important; font-family: 'Roboto', sans-serif !important; }
#sidebar a:hover { background-color: #FF6F00 !important; color: #FFFFFF !important; }

/* --- 6. WIDGET DE TRADUCCIÓN --- */
#google_translate_element_container { display: flex; align-items: center; gap: 10px; }
#google_translate_element_container span { font-size: 0.9rem; color: #a0a0a0; }
.goog-te-gadget-simple {
    background-color: #2C2C2C !important; border: 1px solid #FF6F00 !important;
    border-radius: 5px !important; padding: 5px 8px !important; cursor: pointer;
}
.goog-te-gadget-simple span, .goog-te-gadget-simple a {
    color: #F5F5F5 !important; text-decoration: none !important; font-family: 'Roboto', sans-serif !important;
}

/* --- 7. POP-UPS (MODALES) --- */
#modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.8); z-index: 1000; display: none;
}
.modal {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background-color: #2C2C2C; color: #F5F5F5; width: 90%; max-width: 700px;
    max-height: 85vh; border-radius: 8px; z-index: 1001; display: none; border: 1px solid #444;
}
.modal-close {
    position: absolute; top: 10px; right: 20px; color: #aaa;
    font-size: 28px; font-weight: bold; cursor: pointer;
}
.modal-close:hover { color: #FF6F00; }
.modal-content { padding: 20px 30px; height: calc(85vh - 40px); overflow-y: auto; }
.modal-content h1 { color: #FF6F00; margin-top: 0; }

/* --- 8. PRELOADER DE CARGA --- */
#preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: #1E1E1E; z-index: 9999; display: flex;
    flex-direction: column; justify-content: center; align-items: center;
    text-align: center; transition: opacity 0.5s ease;
}
#preloader p { color: #F5F5F5; font-size: 1.1rem; font-family: 'Roboto', sans-serif; }
.loader-circle {
    width: 60px; height: 60px; border: 8px solid #444; border-top-color: #FF6F00;
    border-radius: 50%; animation: spin 1.2s linear infinite; margin-bottom: 20px;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- 9. REGLAS ESPECIALES (IMPRESIÓN) --- */
@media print {
  body { display: none !important; }
}

/* --- 10. RESPONSIVIDAD (MÓVILES) --- */
@media (max-width: 768px) {
    .main-nav { flex-direction: column; gap: 1rem; }
    .main-nav ul { margin-top: 1rem; }
    .hero-content h1 { font-size: 2.5rem; }
    .contact-container { grid-template-columns: 1fr; }
    .manual-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .fun-fact-slider { padding: 1.5rem; }
    .slider-arrow { width: 30px; height: 30px; font-size: 18px; }
}