:root {
    --primary-color: #003d76;   /* Azul Oscuro */
    --accent-color: #00bbea;    /* Azul Claro */
    --light-bg: #f4f7f6;
    --text-color: #333;
    --border-color: #ddd;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light-bg);
    color: var(--text-color);
}

/* Encabezado */
header {
    background-color: #fff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Asegura la distribución correcta con o sin buscador */
.header-container {
    display: flex;
    justify-content: space-between; /* Empuja el logo a la izquierda y el menú a la derecha */
    align-items: center;
    width: 100%;
    padding: 10px 20px;
}

.logo {
    height: 60px;
    object-fit: contain;
}

/* Buscador */
.search-area {
    position: relative;
    width: 300px;
}

#search-input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    outline: none;
    transition: all 0.3s ease;
}

#search-input:focus {
    border-color: var(--accent-color);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

/* Menú Superior */
.nav-top ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-top a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.nav-top a:hover, .nav-top a.active {
    background-color: var(--primary-color);
    color: #fff;
}

/* Banner de Imagen Opcional */
.hero-banner {
    width: 100%;
    max-width: 1400px;
    margin: 20px auto 0 auto;
    padding: 0 20px;
}

.banner-img {
    width: 100%;
    height: 490px;
    object-fit: cover;
    border-radius: 8px;
}

/* Layout Principal */
.main-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Barra Lateral */
.sidebar {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    height: fit-content;
}

.sidebar-title {
    background-color: var(--primary-color);
    color: white;
    padding: 10px;
    font-size: 1.1rem;
    text-align: center;
    border-radius: 4px;
    margin-bottom: 15px;
}

.category-list {
    list-style: none;
}

.main-cat {
    display: block;
    padding: 10px;
    margin-top: 5px;
    background-color: #f8f9fa;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    border-left: 4px solid transparent;
    transition: all 0.2s;
}

.main-cat:hover, .active-cat {
    background-color: #eef7fc;
    border-left-color: var(--accent-color);
    color: var(--accent-color);
}

.sub-list {
    list-style: none;
    padding-left: 15px;
    margin-bottom: 10px;
}

.sub-list li {
    padding: 8px 10px;
    font-size: 0.9rem;
    color: #555;
    cursor: pointer;
    transition: color 0.2s;
}

.sub-list li:hover, .active-sub {
    color: var(--accent-color);
    font-weight: bold;
}

/* Grilla de Productos */
.products-section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.product-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    padding: 15px;
    display: flex;          /* Añadido: para alinear verticalmente el contenido */
    flex-direction: column; /* Añadido: coloca la imagen arriba y el texto abajo */
    justify-content: space-between; /* Añadido: distribuye el espacio de forma limpia */
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-card img {
    width: 100%;
    height: 200px;          /* Aumentamos levemente el alto del box de la imagen */
    object-fit: cover;      /* Cambiado de 'contain' a 'cover' para que llene todo el box */
    border-radius: 4px;
    cursor: pointer;
    background: #fdfdfd;
    display: block;         /* Asegura que se comporte correctamente como bloque */
}

.product-card h3 {
    font-size: 0.95rem;
    color: var(--primary-color);
    margin-top: 12px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal / Ventana Flotante */
.modal {
    display: none; 
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.modal-content {
    max-width: 80%;
    max-height: 80%;
    border-radius: 4px;
    background-color: white;
    padding: 10px;
}

#modal-caption {
    margin-top: 15px;
    color: #fff;
    font-size: 1.2rem;
    font-weight: bold;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}



.whatsapp-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    z-index: 999; /* Asegura que se sitúe por encima del contenido básico */
}

/* Botón Flotante con Animación */
.whatsapp-btn {
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    text-decoration: none;
    transition: transform 0.3s;
    /* Aplicamos la animación: dura 2 segundos, es suave y se repite infinitamente */
    animation: pulseWhatsapp 2s infinite; 
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    animation: none; /* Detiene la animación al pasar el cursor para mejorar el clic */
}

/* Nube de texto (Tooltip) */
.whatsapp-tooltip {
    background-color: #003d76; /* Azul Oscuro Corporativo */
    color: white;
    padding: 10px 15px;
    font-size: 0.85rem;
    font-weight: bold;
    border-radius: 8px;
    margin-right: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    white-space: nowrap;
    position: relative;
    pointer-events: none; /* Evita que estorbe si intentan hacer clic sobre el texto en vez del icono */
    animation: fadeInTooltip 0.5s ease-in-out;
}

/* Pequeña flecha apuntando al icono de WhatsApp */
.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px 0 6px 6px;
    border-style: solid;
    border-color: transparent transparent transparent #003d76;
}

/* LÓGICA DE LAS ANIMACIONES */

/* Animación de pulso para el botón */
@keyframes pulseWhatsapp {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
    }
    70% {
        transform: scale(1.05);
        /* Crea un efecto de onda expansiva translúcida alrededor del botón */
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Entrada suave para el texto */
@keyframes fadeInTooltip {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Ocultar la nube de texto en pantallas muy pequeñas (celulares) para no tapar contenido */
@media (max-width: 480px) {
    .whatsapp-tooltip {
        display: none;
    }
}

/* Adaptabilidad Móvil */
@media (max-width: 900px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    .header-container {
        flex-direction: column;
        gap: 15px;
    }
}
/* --- NUEVOS ESTILOS PARA SUB-SUBCATEGORÍAS DESPLEGABLES --- */

.sub-sub-list {
    list-style: none;
    padding-left: 15px;
    max-height: 0;       /* Oculto por defecto mediante altura cero */
    overflow: hidden;
    transition: max-height 0.3s ease-out; /* Animación fluida al abrir */
}

/* Cuando el elemento padre se activa, mostramos la sub-lista */
.has-sub-sub.open .sub-sub-list {
    max-height: 300px; /* Altura máxima permitida al desplegarse */
    margin-top: 5px;
    margin-bottom: 5px;
}

.sub-cat-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    font-size: 0.95rem;
    color: #444;
    cursor: pointer;
    font-weight: 500;
}

.sub-cat-toggle:hover {
    color: var(--accent-color);
}

.arrow-icon {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

/* Rotación de la flecha al abrir el menú */
.has-sub-sub.open .arrow-icon {
    transform: rotate(180px);
}

.sub-sub-list li {
    padding: 6px 10px;
    font-size: 0.85rem;
    color: #666;
    cursor: pointer;
    border-left: 2px solid transparent;
    transition: all 0.2s;
}

.sub-sub-list li:hover, .sub-sub-list li.active-subsub {
    color: var(--accent-color);
    border-left-color: var(--accent-color);
    font-weight: bold;
    background-color: #f9f9f9;
}
/* --- NUEVOS ESTILOS: FOOTER & COOKIES --- */

/* Footer */
.main-footer {
    background-color: var(--primary-color); /* Azul Oscuro #003d76 */
    color: #ffffff;
    padding: 40px 20px 20px 20px;
    margin-top: 50px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
}

.footer-info h3 {
    font-size: 1.6rem;
    margin-bottom: 10px;
    color: var(--accent-color); /* Azul Claro #00bbea */
}

.footer-info p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 8px;
    color: #ddd;
}

.footer-links h4 {
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 5px;
}

.footer-links h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background-color: var(--accent-color);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ddd;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.footer-rights {
    text-align: right;
    font-size: 0.85rem;
    color: #bbb;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Banner de Cookies Flotante */
.cookies-box {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(20, 30, 45, 0.96); /* Fondo oscuro transparente elegante */
    color: #ffffff;
    padding: 20px;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.2);
    z-index: 9999; /* Por encima de cualquier elemento o modal */
    display: none;  /* Controlado dinámicamente por JavaScript */
    animation: slideUp 0.4s ease-out;
}

.cookies-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.cookies-content p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #eceff1;
}

.cookies-btn {
    background-color: var(--accent-color); /* Azul Claro #00bbea */
    color: #ffffff;
    border: none;
    padding: 10px 25px;
    font-size: 0.95rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    white-space: nowrap;
}

.cookies-btn:hover {
    background-color: #0099c2;
    transform: scale(1.03);
}

/* Animación de entrada */
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Responsivo para el footer y cookies */
@media (max-width: 768px) {
    .footer-rights {
        text-align: left;
        margin-top: 10px;
    }
    .cookies-content {
        flex-direction: column;
        text-align: center;
    }
    .cookies-btn {
        width: 100%;
    }
}

/* --- NUEVOS ESTILOS PARA EL APARTADO NOSOTROS --- */

.about-section {
    padding: 10px;
    animation: fadeIn 0.5s ease-in-out;
}

/* Animación de entrada suave al cambiar de pestaña */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Bloque Introducción */
.about-hero {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    border-left: 5px solid var(--primary-color); /* Detalle azul oscuro */
}

.about-hero h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 15px;
}

.lead-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #444;
    margin-bottom: 15px;
}

.about-hero p {
    color: #666;
    line-height: 1.6;
}

/* Misión y Visión (Grid de 2 Columnas) */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 35px;
}

.about-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.04);
    text-align: center;
    border-top: 4px solid var(--accent-color); /* Detalle azul claro de acento */
    transition: transform 0.3s ease;
}

.about-card:hover {
    transform: translateY(-5px);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.about-card h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.about-card p {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Valores Corporativos */
.values-section {
    background: #ffffff;
    padding: 35px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.values-section > h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 25px;
    text-align: center;
    position: relative;
    padding-bottom: 10px;
}

.values-section > h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.value-item {
    padding: 15px;
}

.value-item h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.value-item h4 i {
    color: var(--accent-color); /* Iconos de los valores en azul claro */
}

.value-item p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* --- NUEVOS ESTILOS PARA EL APARTADO OFERTAS DE LA SEMANA --- */

.offers-section {
    padding: 10px;
    animation: fadeIn 0.5s ease-in-out;
}

/* Banner de la Oferta Principal */
.featured-offer-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, #002244 100%);
    color: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 35px;
    position: relative;
    overflow: hidden;
}

/* Adorno de fondo sutil para el banner */
.featured-offer-banner::after {
    content: '\f5fa'; /* Icono de caja de herramientas o etiqueta en FontAwesome */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: -20px;
    bottom: -30px;
    font-size: 12rem;
    color: rgba(255, 255, 255, 0.04);
    pointer-events: none;
}

.offer-badge {
    background-color: #ff9800; /* Naranja llamativo para ofertas */
    color: white;
    display: inline-block;
    padding: 5px 12px;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 4px;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.offer-banner-content h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--accent-color); /* Azul Claro #00bbea */
}

.offer-banner-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 15px;
    max-width: 800px;
}

.offer-condition {
    font-size: 0.8rem;
    color: #b0bec5;
    font-style: italic;
}

/* Encabezado del Listado */
.offers-header {
    margin-bottom: 25px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 12px;
}

.offers-header h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.offers-header p {
    color: #666;
    font-size: 0.95rem;
}

/* Cuadrícula de Productos en Oferta */
.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.offer-product-card {
    background: #fff;
    border: 2px dashed #ff9800; /* Borde discontinuo para denotar promoción */
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    padding: 15px;
    position: relative; /* Necesario para la etiqueta flotante */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s, box-shadow 0.3s;
}

.offer-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.15);
}

.offer-product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    background: #fdfdfd;
    display: block;
}

.offer-product-card h3 {
    font-size: 0.95rem;
    color: var(--primary-color);
    margin-top: 12px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Etiqueta Flotante de Descuento */
.discount-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #e53935; /* Rojo de alerta de descuento */
    color: white;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 4px;
    box-shadow: 1px 1px 5px rgba(0,0,0,0.2);
    z-index: 10;
}
/* --- NUEVOS ESTILOS PARA EL APARTADO MECANIZADO --- */

.machining-section {
    padding: 10px;
    animation: fadeIn 0.5s ease-in-out;
}

/* Encabezado Principal */
.machining-hero {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    border-left: 5px solid var(--primary-color);
}

.machining-hero h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 15px;
}

/* Cuadrícula de Servicios */
.machining-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    margin-bottom: 35px;
}

.service-card {
    background: #ffffff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.service-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 187, 234, 0.1);
}

.service-icon {
    font-size: 2rem;
    color: var(--accent-color); /* Azul Claro #00bbea */
    margin-bottom: 15px;
}

.service-card h3 {
    color: var(--primary-color); /* Azul Oscuro #003d76 */
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.service-card p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Recuadro de Contacto Técnico (CTA) */
.machining-cta {
    background-color: #ffffff;
    border: 2px solid var(--primary-color);
    padding: 35px;
    border-radius: 8px;
    text-align: center;
}

.machining-cta h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.machining-cta p {
    color: #555;
    max-width: 700px;
    margin: 0 auto 20px auto;
    line-height: 1.6;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    padding: 12px 30px;
    font-weight: bold;
    border-radius: 25px;
    box-shadow: 0 4px 6px rgba(0, 187, 234, 0.2);
    transition: all 0.3s ease;
}

.cta-button:hover {
    background-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 61, 118, 0.3);
    transform: scale(1.03);
}
/* --- NUEVOS ESTILOS PARA EL APARTADO CONTÁCTENOS --- */

.contact-section {
    padding: 10px;
    animation: fadeIn 0.5s ease-in-out;
}

.contact-header {
    margin-bottom: 30px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 12px;
}

.contact-header h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 5px;
}

.contact-header p {
    color: #666;
    font-size: 1rem;
}

/* Contenedor Grid Dos Columnas */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 850px) {
    .contact-container {
        grid-template-columns: 1fr; /* Pasa a una sola columna en móviles */
    }
}

/* Columna del Formulario */
.contact-form-box {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.contact-form-box h3, .contact-info-box h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 20px;
    border-left: 4px solid var(--accent-color);
    padding-left: 10px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #444;
}

.form-group input, .form-group textarea {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--accent-color);
}

.submit-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    margin-top: 5px;
}

.submit-btn:hover {
    background-color: #002b54;
}

.submit-btn:active {
    transform: scale(0.98);
}

/* Columna de Información */
.contact-info-box {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.info-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
}

.info-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.info-item i {
    font-size: 1.2rem;
    color: var(--accent-color);
    background: #eef7fc;
    padding: 10px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-item h4 {
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: 3px;
}

.info-item p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Caja de Mapa */
.map-box h4 {
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: 10px;
}

.map-wrapper {
    border: 2px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    line-height: 0; /* Elimina espacios extra debajo del iframe */
}
body a {
    text-decoration:none;
    color:white;
}
body a:hover {
    color:blue;
}
/* --- OPTIMIZACIÓN RESPONSIVA PARA EL MENÚ (MÓVILES) --- */

/* Por defecto, ocultamos el botón hamburguesa en pantallas grandes */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
}

/* Reglas exclusivas para pantallas menores a 768px (móviles y tablets) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.6rem;
    cursor: pointer;
    padding: 10px;
    z-index: 1001; /* Asegura que el botón quede siempre visible */
}

@media (max-width: 768px) {
    .nav-top {
        display: flex;
        justify-content: flex-end; /* Coloca el botón hamburguesa a la derecha */
        padding: 10px 20px;
        position: relative;
        width: 100%;
    }

    .menu-toggle {
        display: block; /* Muestra el botón de tres líneas en móviles */
    }

    /* Transformación a menú lateral flotante desde la derecha */
    .nav-top ul {
        display: flex;
        flex-direction: column;
        position: fixed; /* Se fija a la pantalla */
        top: 0;
        right: -100%; /* Escondido completamente a la derecha por defecto */
        width: 75%; /* Ocupa las tres cuartas partes de la pantalla móvil */
        height: 100vh; /* Ocupa todo el alto de la pantalla */
        background-color: #ffffff;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.15);
        z-index: 1000;
        padding: 80px 0 20px 0; /* Espacio superior para que el botón de cerrar no tape los links */
        transition: right 0.3s ease-in-out; /* Animación de deslizamiento suave */
    }

    /* Clase activa controlada por tu JS para deslizar el menú hacia adentro */
    .nav-top ul.show {
        right: 0; /* Se desliza suavemente a la pantalla */
    }

    .nav-top li {
        width: 100%;
    }

    /* Estilo de los enlaces alineados limpiamente a la izquierda */
    .nav-top a {
        display: block;
        padding: 15px 25px;
        color: var(--primary-color);
        font-weight: 600;
        font-size: 1.05rem;
        text-align: left; /* Alineación limpia a la izquierda */
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        text-decoration: none;
    }

    /* Resalta la pestaña activa dentro del menú lateral */
    .nav-top a.active {
        background-color: rgba(0, 61, 118, 0.05);
        color: var(--accent-color);
        border-left: 4px solid var(--accent-color);
    }

    /* Forzamos al botón de cerrar a quedarse arriba a la derecha mientras está abierto */
    .nav-top ul.show ~ .menu-toggle {
        position: fixed;
        top: 15px;
        right: 20px;
    }
}
@media (max-width: 768px) {
    .hero-banner {
        /* Si la imagen está puesta como fondo (background-image) en el CSS: */
        background-size: contain !important;
        background-repeat: no-repeat !important;
        background-position: center center !important;
        
        /* Ajustes de altura para que el engranaje no se corte ni deje huecos */
        height: auto !important;
        min-height: 300px !important;
        padding: 20px 10px !important;
    }

    /* Si la imagen está puesta directamente dentro del HTML con una etiqueta <img>: */
    .hero-banner img {
        width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
        max-height: 350px;
    }
}
/* --- ESTILOS PARA EL LOGO CON ENLACE --- */

.logo-link {
    display: inline-block;
    text-decoration: none;
    outline: none;
    transition: transform 0.2s ease;
}

/* Un pequeño efecto visual: el logo se agranda un 2% sutilmente al pasar el mouse */
.logo-link:hover {
    transform: scale(1.02);
}

.main-logo {
    display: block;
    max-height: 60px; /* Ajusta este valor al tamaño real que desees para tu cabecera */
    width: auto;
    cursor: pointer;
}

/* --- ESTILOS PARA LAS REDES SOCIALES EN EL FOOTER --- */

.main-footer {
    background-color: var(--primary-color); /* El azul oscuro de Alumec */
    color: #ffffff;
    padding: 20px 0;
    margin-top: 40px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between; /* Separa el texto a la izquierda y redes a la derecha */
    align-items: center;
}

.footer-copy {
    font-size: 0.9rem;
    color: #b0bec5;
}

/* Contenedor de iconos */
.footer-socials {
    display: flex;
    gap: 15px; /* Espacio entre cada botón */
}

/* Estilo base de cada botón circular */
.social-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 38px;
    height: 38px;
    background-color: rgba(255, 255, 255, 0.08); /* Fondo sutil translúcido */
    color: #ffffff;
    border-radius: 50%;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Efecto Hover: se ilumina con el azul claro y sube ligeramente */
.social-icon:hover {
    background-color: var(--accent-color); /* Azul claro #00bbea */
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 187, 234, 0.4);
}

/* OPTIMIZACIÓN EN DISPOSITIVOS MÓVILES */
@media (max-width: 600px) {
    .footer-container {
        flex-direction: column-reverse; /* En celulares pone las redes arriba y el texto abajo */
        gap: 15px;
        text-align: center;
    }
}
/* --- ESTILOS PARA EL MODAL DE ÉXITO DEL FORMULARIO --- */

.contact-modal {
    display: none; /* Oculto por defecto */
    position: fixed;
    z-index: 9999; /* Por encima de todo, incluso del banner de cookies */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 61, 118, 0.6); /* Fondo azul oscuro translúcido */
    justify-content: center;
    align-items: center;
    animation: fadeInModal 0.3s ease-out;
}

.contact-modal-content {
    background-color: #ffffff;
    padding: 35px;
    border-radius: 12px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-top: 5px solid var(--accent-color); /* Detalle azul claro */
    animation: scaleUpModal 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-icon {
    font-size: 3.5rem;
    color: #25d366; /* Verde de éxito */
    margin-bottom: 15px;
}

.contact-modal-content h3 {
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.contact-modal-content p {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.close-btn-modal {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 30px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.close-btn-modal:hover {
    background-color: var(--accent-color);
}

/* Animaciones */
@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleUpModal {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}