/*
 * Hoja de Estilos Personalizada MinnoLatam
 * Tema: "Eléctrico Oscuro" (Ref: Tron Legacy)
 */

/* 1. Definición de Variables de Color */
:root {
    /* Paleta de Marca */
    --minno-primary: #03609C;   /* Azul principal (más oscuro) */
    --minno-secondary: #1a7efb; /* Azul brillante (eléctrico) */

    /* Paleta del Tema Oscuro */
    --theme-bg: #0A0A10;       /* Fondo de sitio (casi negro, tono azulado) */
    --theme-surface: #10141C;  /* Fondo para "tarjetas" (un poco más claro) */
    --theme-text: #E0E0E0;     /* Color de texto principal (blanco suave) */
    --theme-text-muted: #8899A6; /* Texto secundario (grisáceo) */
    --theme-border: #2a2a3a;     /* Color de borde sutil */
}

/* 2. Estilos Globales (Base Oscura) */
body {
    background-color: var(--theme-bg);
    color: var(--theme-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    color: #FFFFFF; /* Títulos más blancos para mayor impacto */
}

/* 3. Estilos de Componentes (Navbar) */
.navbar-theme {
    background-color: var(--theme-surface);
    border-bottom: 1px solid var(--theme-border);
}

.navbar-theme .navbar-nav .nav-link {
    color: var(--theme-text);
    transition: color 0.2s;
}

.navbar-theme .navbar-nav .nav-link:hover,
.navbar-theme .navbar-nav .nav-link.active {
    color: var(--minno-secondary); /* Azul brillante */
    text-shadow: 0 0 5px var(--minno-secondary); /* Sutil brillo de neón */
}

.navbar-theme .btn-outline-light {
    border-color: var(--minno-secondary);
    color: var(--minno-secondary);
    transition: background-color 0.2s, box-shadow 0.2s;
}

.navbar-theme .btn-outline-light:hover {
    background-color: var(--minno-secondary);
    color: var(--theme-bg); /* Texto oscuro sobre fondo brillante */
    box-shadow: 0 0 10px var(--minno-secondary); /* Brillo más fuerte */
}


/* 4. Estilos del Botón Flotante de WhatsApp */
.whatsapp-float-btn {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    line-height: 60px; /* Centra el ícono verticalmente */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 1040;
    transition: 0.3s;
    animation: whatsapp-pulse 2s infinite; /* Animación de pulso */
}

.whatsapp-float-btn:hover {
    color: #FFF;
    background-color: #1EBD56; /* Un poco más oscuro al pasar el mouse */
    animation: none; /* Detener el pulso al pasar el mouse */
}

@keyframes whatsapp-pulse {
    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);
    }
}


/* 5. Estilos de la Página de Inicio (index.php) */

/* Estilos de la Sección Hero */
.hero-section {
    position: relative;
    height: 90vh; /* 90% de la altura de la ventana */
    background-color: var(--theme-bg); /* Color de fondo si la imagen falla */
    overflow: hidden;
    background-image: url('../img/portada.png');
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); 
    z-index: 1;
}

/* Botones del Hero */
.hero-btn-primary {
    background-color: var(--minno-secondary);
    border-color: var(--minno-secondary);
    padding: 12px 30px;
    font-weight: bold;
    transition: 0.3s;
}
.hero-btn-primary:hover {
    background-color: #1a7efb;
    border-color: #1a7efb;
    box-shadow: 0 0 15px var(--minno-secondary);
    transform: translateY(-2px);
}

.hero-btn-secondary {
    border-color: var(--minno-secondary);
    color: var(--minno-secondary);
    padding: 12px 30px;
    font-weight: bold;
    transition: 0.3s;
}
.hero-btn-secondary:hover {
    background-color: var(--minno-secondary);
    color: var(--theme-bg);
    box-shadow: 0 0 15px var(--minno-secondary);
    transform: translateY(-2px);
}


/* Estilos de la Sección de Features (Categorías) */
.features-section {
    padding: 80px 0;
    background-color: var(--theme-surface); /* Un fondo ligeramente diferente */
    border-top: 1px solid var(--theme-border);
    border-bottom: 1px solid var(--theme-border);
}

.feature-card {
    background-color: var(--theme-bg); /* Más oscuro que el fondo de la sección */
    padding: 40px 30px;
    border-radius: 8px;
    border: 1px solid var(--theme-border);
    height: 100%;
    transition: 0.3s ease;
    box-shadow: 0 0 10px rgba(26, 126, 251, 0.0);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--minno-secondary);
    box-shadow: 0 0 20px rgba(26, 126, 251, 0.3);
}

.feature-icon {
    font-size: 50px;
    color: var(--minno-secondary); /* Icono en color neón */
}

.feature-card h4 {
    color: var(--theme-text);
}
.feature-card p {
    color: var(--theme-text-muted);
}

.feature-link {
    color: var(--minno-secondary);
    text-decoration: none;
    font-weight: bold;
    transition: 0.2s;
}
.feature-link:hover {
    color: #FFF;
    text-shadow: 0 0 5px var(--minno-secondary);
}


/* 6. Estilos de la Página "Acerca de" */

/* Hero reutilizable para páginas internas */
.page-hero-section {
    position: relative;
    padding: 120px 0;
    background-color: var(--theme-surface);
    overflow: hidden;
}

/* Tarjeta de contenido estático (Historia, Misión) */
.static-content-section {
    padding: 80px 0;
    background-color: var(--theme-bg);
}
.static-card {
    background-color: var(--theme-surface);
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    padding: 30px;
    height: 100%;
}
.static-card h2 {
    border-bottom: 2px solid var(--minno-secondary);
    padding-bottom: 10px;
    display: inline-block;
}

/* Sección de Testimoniales */
.testimonial-section {
    padding: 80px 0;
    background-color: var(--theme-surface);
    border-top: 1px solid var(--theme-border);
    border-bottom: 1px solid var(--theme-border);
}
.testimonial-card {
    background-color: var(--theme-bg);
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    padding: 30px;
    height: 100%;
    position: relative;
    transition: 0.3s;
}
.testimonial-card:hover {
    border-color: var(--minno-secondary);
    box-shadow: 0 0 20px rgba(26, 126, 251, 0.3);
    transform: translateY(-5px);
}
.testimonial-quote {
    font-size: 3rem;
    color: var(--minno-secondary);
    position: absolute;
    top: 15px;
    right: 25px;
    opacity: 0.2;
}
.testimonial-text {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--theme-text);
}
.testimonial-author h5 {
    color: #FFF;
}

/* Sección de FAQs (Estilo Acordeón "Tron") */
.faq-section {
    padding: 80px 0;
    background-color: var(--theme-bg);
}
.accordion-item {
    background-color: var(--theme-surface);
    border: 1px solid var(--theme-border);
    margin-bottom: 10px;
    border-radius: 8px;
}
.accordion-header {
    border-radius: 8px;
}
.accordion-button {
    background-color: var(--theme-surface);
    color: #FFFFFF;
    font-weight: bold;
    border-radius: 8px;
    box-shadow: none; /* Quitar sombra de Bootstrap */
    transition: 0.3s;
}
.accordion-button:not(.collapsed) {
    background-color: rgba(26, 126, 251, 0.1); /* Brillo azul */
    color: var(--minno-secondary);
    box-shadow: none;
    border-bottom: 1px solid var(--theme-border);
}
.accordion-button:focus {
    box-shadow: 0 0 10px rgba(26, 126, 251, 0.3);
}
.accordion-button::after {
    /* (Opcional) Cambiar el ícono del acordeón */
    filter: brightness(0) invert(1);
}
.accordion-body {
    color: var(--theme-text-muted);
}


/* 7. Estilos de la Página "Productos" */
.catalog-section {
    padding: 80px 0;
    background-color: var(--theme-bg);
}

/* Sidebar de Categorías */
.category-sidebar h4 {
    color: var(--minno-secondary);
    border-bottom: 1px solid var(--theme-border);
    padding-bottom: 10px;
}
.list-group-item {
    background-color: var(--theme-surface);
    color: var(--theme-text);
    border: 1px solid var(--theme-border);
    margin-bottom: 5px;
    border-radius: 5px;
    transition: 0.3s;
}
.list-group-item.active {
    background-color: var(--minno-secondary);
    border-color: var(--minno-secondary);
    color: #FFF;
    font-weight: bold;
}
.list-group-item:hover:not(.active) {
    background-color: var(--theme-bg);
    color: var(--minno-secondary);
    transform: translateX(5px);
}

/* Tarjeta de Producto (¡ACTUALIZADO!) */
.product-card {
    background-color: var(--theme-surface);
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    height: 100%;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    border-color: var(--minno-secondary);
    box-shadow: 0 0 20px rgba(26, 126, 251, 0.3);
    transform: translateY(-5px);
}
.product-card-image {
    width: 100%;
    aspect-ratio: 1 / 1; /* Forzar a ser cuadrado */
    overflow: hidden;
    border-top-left-radius: 7px;
    border-top-right-radius: 7px;
    background-color: #FFF; /* (NUEVO) Fondo blanco para 'contain' */
    padding: 1rem; /* (NUEVO) Espacio para que la imagen no toque los bordes */
}
.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* (CAMBIADO) de 'cover' a 'contain' */
}
.product-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--theme-bg);
    font-size: 5rem;
    color: var(--theme-text-muted);
}
.product-card-body {
    padding: 20px;
    flex-grow: 1;
}
.product-category {
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--minno-secondary);
    text-transform: uppercase;
}
.product-title {
    font-size: 1.25rem;
    color: #FFF;
    margin-top: 5px;
    margin-bottom: 10px;
}
.product-description {
    font-size: 0.9rem;
    color: var(--theme-text-muted);
}
.product-card-footer {
    padding: 0 20px 20px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--theme-border);
    padding-top: 15px;
    margin-top: 15px;
}


/* 8. Estilos de la Página "Detalle de Producto" (¡ACTUALIZADO!) */
.product-detail-section {
    padding: 80px 0;
    background-color: var(--theme-bg);
}
.product-detail-image {
    background-color: #FFFFFF;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    padding: 20px;
    max-width: 500px;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
    display: flex; 
    align-items: center;
    justify-content: center;
}
.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
}
.product-detail-placeholder {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--theme-surface);
    font-size: 8rem;
    color: var(--theme-text-muted);
    border-radius: 8px;
    max-width: 500px;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
}
.product-detail-info {
    padding: 20px;
}
.product-full-description {
    font-size: 1.1rem;
    color: var(--theme-text-muted);
    line-height: 1.7;
    margin-top: 20px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--theme-border);
}
.product-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}


/* 9. Estilos de la Página "Dónde Comprar" (¡ACTUALIZADO!) */
.dealer-section {
    padding: 80px 0;
}
.dealer-card {
    background-color: var(--theme-surface);
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    height: 100%;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}
.dealer-card:hover {
    border-color: var(--minno-secondary);
    box-shadow: 0 0 20px rgba(26, 126, 251, 0.3);
    transform: translateY(-5px);
}

/* --- INICIO DE LA MODIFICACIÓN --- */
.dealer-card-image {
    width: 100%;
    aspect-ratio: 1 / 1; /* Forzar a ser cuadrado */
    overflow: hidden;
    border-top-left-radius: 7px;
    border-top-right-radius: 7px;
    
    /* (NUEVO) Fondo blanco y padding para que 'contain' se vea bien */
    background-color: #FFF; 
    padding: 1rem;
}
.dealer-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* (CAMBIADO) de 'cover' a 'contain' */
}
/* --- FIN DE LA MODIFICACIÓN --- */

.dealer-card-body {
    padding: 25px;
    flex-grow: 1;
}
.dealer-title {
    color: #FFF;
    font-size: 1.4rem;
    border-bottom: 2px solid var(--minno-secondary);
    padding-bottom: 10px;
    margin-bottom: 15px;
}
.dealer-contact {
    color: var(--theme-text);
    font-weight: bold;
    font-size: 1.1rem;
}
.dealer-info-list {
    list-style: none;
    padding-left: 0;
    margin-top: 20px;
    font-size: 0.95rem;
}
.dealer-info-list li {
    color: var(--theme-text-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
}
.dealer-info-list i {
    color: var(--minno-secondary);
    margin-right: 12px;
    margin-top: 4px;
}
.dealer-info-list a {
    color: var(--theme-text-muted);
    text-decoration: none;
    transition: 0.2s;
}
.dealer-info-list a:hover {
    color: var(--minno-secondary);
}
.dealer-address {
    line-height: 1.6;
}


/* 10. Estilos de la Página "Blog (Recursos)" (¡ACTUALIZADO!) */
.blog-section {
    padding: 80px 0;
    background-color: var(--theme-bg);
}
.blog-card {
    background-color: var(--theme-surface);
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    height: 100%;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}
.blog-card:hover {
    border-color: var(--minno-secondary);
    box-shadow: 0 0 20px rgba(26, 126, 251, 0.3);
    transform: translateY(-5px);
}
.blog-card-image {
    width: 100%;
    aspect-ratio: 1 / 1; /* Forzar a ser cuadrado */
    overflow: hidden;
    border-top-left-radius: 7px;
    border-top-right-radius: 7px;
}
.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.blog-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--theme-bg);
    font-size: 5rem;
    color: var(--theme-text-muted);
    aspect-ratio: 1 / 1;
}
.blog-card-body {
    padding: 20px;
    flex-grow: 1;
}
.blog-date {
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--minno-secondary);
    text-transform: uppercase;
}
.blog-title {
    font-size: 1.25rem;
    color: #FFF;
    margin-top: 5px;
    margin-bottom: 10px;
}
.blog-excerpt {
    font-size: 0.9rem;
    color: var(--theme-text-muted);
    line-height: 1.6;
}
.blog-card-footer {
    padding: 0 20px 20px 20px;
    border-top: 1px solid var(--theme-border);
    padding-top: 15px;
    margin-top: auto;
}

/* 11. Estilos de la Página "Artículo Individual (post.php)" */
.post-content-section {
    padding: 80px 0;
    background-color: var(--theme-bg);
}
.post-featured-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--theme-border);
    margin-bottom: 40px;
    background-color: #FFF; /* Fondo blanco si la imagen es transparente */
}
.post-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.post-content {
    color: var(--theme-text-muted);
    font-size: 1.15rem;
    line-height: 1.8;
}
.post-content h2,
.post-content h3,
.post-content h4 {
    color: #FFF;
    margin-top: 30px;
    margin-bottom: 15px;
}
.post-content p {
    margin-bottom: 20px;
}
.post-footer {
    border-top: 1px solid var(--theme-border);
    padding-top: 30px;
    margin-top: 40px;
}


/* 12. Estilos de la Página "Búsqueda" */
.search-results-section {
    padding: 80px 0;
    background-color: var(--theme-bg);
}
.search-section-title {
    font-size: 1.8rem;
    color: var(--minno-secondary);
    border-bottom: 1px solid var(--theme-border);
    padding-bottom: 15px;
    margin-top: 30px;
    margin-bottom: 30px;
}
.search-result-card {
    display: flex;
    background-color: var(--theme-surface);
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: 0.3s;
    text-decoration: none; /* Quitar subrayado del enlace */
}
.search-result-card:hover {
    border-color: var(--minno-secondary);
    box-shadow: 0 0 20px rgba(26, 126, 251, 0.3);
    transform: translateY(-5px);
}
.search-result-image {
    width: 150px;
    height: 150px;
    flex-shrink: 0;
    background-color: #FFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--theme-text-muted);
}
.search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Usar 'contain' para productos */
}
/* Específico para imágenes de blog en la búsqueda */
.search-result-card[href*="post.php"] .search-result-image img {
    object-fit: cover; /* Usar 'cover' para blogs */
}

.search-result-body {
    padding: 20px 25px;
}
.search-result-title {
    color: #FFF;
    font-size: 1.3rem;
    margin-bottom: 10px;
}
.search-result-excerpt {
    color: var(--theme-text-muted);
    font-size: 0.95rem;
    margin-bottom: 10px;
}
.search-result-type {
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--minno-secondary);
    text-transform: uppercase;
}


/* 13. Estilos de la Página "Contacto" */
.contact-section {
    padding: 80px 0;
    background-color: var(--theme-bg);
}

.contact-form .form-label {
    color: var(--theme-text-muted);
    font-weight: bold;
}

.contact-form .form-control {
    background-color: var(--theme-surface);
    border: 1px solid var(--theme-border);
    color: #FFF;
    padding: 12px;
}
.contact-form .form-control:focus {
    background-color: var(--theme-surface);
    border-color: var(--minno-secondary);
    color: #FFF;
    box-shadow: 0 0 10px rgba(26, 126, 251, 0.3);
}

/* Estilos para placeholder en modo oscuro */
.contact-form .form-control::placeholder {
    color: var(--theme-text-muted);
    opacity: 0.7;
}