/* =========================================
   1. VARIABLES Y RESET
   ========================================= */
:root {
    /* Paleta de Colores Fríos / Tecnológicos */
    --primary-color: #0f172a;   /* Azul Marino Profundo (Navy) - Base */
    --secondary-color: #0ea5e9; /* Cian / Azul Eléctrico - Acentos y Botones */
    --secondary-dark: #0284c7;  /* Azul más oscuro para hover */
    --accent-color: #38bdf8;    /* Azul Claro - Detalles */
    
    --bg-body: #f8fafc;         /* Blanco Hielo - Fondo General */
    --bg-light: #e2e8f0;        /* Gris Claro - Secciones alternas */
    --bg-card: #ffffff;         /* Blanco puro - Tarjetas */
    
    --text-main: #334155;       /* Gris Oscuro - Texto principal */
    --text-muted: #64748b;      /* Gris medio - Texto secundario */
    --text-light: #f1f5f9;      /* Blanco humo - Texto sobre fondos oscuros */
    
    --border-color: #cbd5e1;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-body);
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* =========================================
   2. UTILIDADES GLOBALES
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section { padding: 80px 0; }
.bg-light { background-color: var(--bg-light); }

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
    position: relative;
    font-weight: 700;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 6px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    text-align: center;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--text-light);
}

.btn-primary:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-2px);
}

.btn-outline {
    border-color: var(--text-light);
    color: var(--text-light);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--text-light);
    color: var(--primary-color);
}

.full-width { width: 100%; }

/* =========================================
   3. HEADER Y NAVEGACIÓN
   ========================================= */
header {
    background-color: rgba(15, 23, 42, 0.95);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-light);
    letter-spacing: 1px;
}

.logo span { color: var(--secondary-color); }

.nav-links { display: flex; align-items: center; }
.nav-links li { margin-left: 30px; }

.nav-links a {
    color: var(--text-light);
    font-weight: 500;
    transition: var(--transition);
    font-size: 0.95rem;
}

.nav-links a:hover { color: var(--secondary-color); }

.btn-nav {
    border: 1px solid var(--secondary-color);
    padding: 8px 20px;
    border-radius: 4px;
    color: var(--secondary-color) !important;
}

.btn-nav:hover {
    background-color: var(--secondary-color);
    color: white !important;
}

.hamburger {
    display: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
}

/* =========================================
   4. HERO SECTION (BANNER)
   ========================================= */
.hero {
    height: 100vh; /* Pantalla completa */
    background: url('https://images.unsplash.com/photo-1550751827-4bd374c3f58b?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80') no-repeat center center/cover;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(14, 165, 233, 0.3) 100%);
}

.hero-content { position: relative; z-index: 2; padding-top: 60px; }

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: 800;
}

.hero p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 35px;
    color: #cbd5e1;
}

.hero-btns { display: flex; gap: 20px; justify-content: center; }

/* =========================================
   5. CATÁLOGO DE PRODUCTOS
   ========================================= */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--secondary-color);
}

.product-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background-color: #f1f5f9; /* Fallback si no carga imagen */
}

.badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--secondary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.p-info { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }

.p-info h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.p-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    flex-grow: 1;
}

.price {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.btn-sm {
    padding: 10px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
    transition: var(--transition);
}

.btn-sm:hover { background: var(--secondary-color); }

/* =========================================
   6. SERVICIOS
   ========================================= */
.services-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-box {
    background: var(--bg-card);
    padding: 40px 30px;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}

.service-box:hover {
    transform: translateY(-5px);
    border-bottom-color: var(--secondary-color);
    box-shadow: var(--shadow-md);
}

.service-box i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.service-box h3 { margin-bottom: 15px; color: var(--primary-color); }
.service-box p { color: var(--text-muted); }

/* =========================================
   7. NOVEDADES
   ========================================= */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.news-item {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 8px;
    border-left: 5px solid var(--secondary-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.news-item:hover { box-shadow: var(--shadow-md); }

.news-date {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.news-item h3 { margin-bottom: 10px; color: var(--primary-color); }
.news-item p { font-size: 0.95rem; color: var(--text-muted); }

/* =========================================
   8. PARTNERS (SOCIOS)
   ========================================= */
#partners { padding: 40px 0; background: white; border-top: 1px solid var(--border-color); }

.partners-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
}

.partner-icon {
    font-size: 3.5rem;
    color: #94a3b8; /* Gris apagado */
    transition: var(--transition);
    cursor: help;
}

.partner-icon:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* =========================================
   9. CONTACTO
   ========================================= */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border-top: 5px solid var(--secondary-color);
}

.form-group { margin-bottom: 20px; }

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background-color: #f8fafc;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--secondary-color);
    background-color: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* =========================================
   10. FOOTER MODERNO
   ========================================= */
.modern-footer {
    background-color: #0b1120; /* Un tono más oscuro que el Navy normal */
    color: #94a3b8; /* Gris azulado suave */
    padding-top: 80px;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.95rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr; /* Columna 1 más ancha para la marca */
    gap: 40px;
    padding-bottom: 60px;
}

/* Columna Marca */
.footer-logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-light);
    margin-bottom: 20px;
    display: inline-block;
}
.footer-logo span { color: var(--secondary-color); }
.footer-desc {
    line-height: 1.6;
    max-width: 300px;
    opacity: 0.8;
}

/* Títulos de Columnas */
.footer-col h4 {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 25px;
    font-weight: 600;
    position: relative;
}

/* Enlaces */
.footer-links li { margin-bottom: 12px; }
.footer-links a {
    color: #94a3b8;
    transition: var(--transition);
    display: inline-block;
}
.footer-links a:hover {
    color: var(--secondary-color);
    transform: translateX(5px); /* Efecto de desplazamiento sutil */
}

/* Columna Contacto */
.contact-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}
.contact-row i { color: var(--secondary-color); }

/* Newsletter Input */
.newsletter-form {
    display: flex;
    margin-top: 25px;
    position: relative;
}
.newsletter-form input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    outline: none;
    transition: var(--transition);
}
.newsletter-form input:focus {
    border-color: var(--secondary-color);
    background: rgba(255, 255, 255, 0.1);
}
.newsletter-form button {
    position: absolute;
    right: 5px;
    top: 5px;
    bottom: 5px;
    background: var(--secondary-color);
    border: none;
    color: white;
    padding: 0 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}
.newsletter-form button:hover { background: var(--secondary-dark); }

/* Footer Bottom (Barra inferior) */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.legal-links a {
    margin-left: 20px;
    font-size: 0.9rem;
    color: #64748b;
    transition: var(--transition);
}
.legal-links a:hover { color: var(--text-light); text-decoration: underline; }

.social-links-bottom a {
    color: #94a3b8;
    margin-left: 15px;
    font-size: 1.2rem;
    transition: var(--transition);
}
.social-links-bottom a:hover { color: var(--secondary-color); }

/* Responsive Footer */
@media (max-width: 992px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 576px) {
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .legal-links a { margin: 0 10px; }
    .brand-col { text-align: left; }
}

/* =========================================
   11. RESPONSIVE DESIGN (MOVIL)
   ========================================= */
@media (max-width: 768px) {
    /* Ajustes generales */
    .section-title { font-size: 2rem; }
    
    /* Header Móvil */
    .hamburger { display: block; }
    
    .nav-links {
        position: fixed;
        right: 0;
        top: 70px;
        background-color: var(--primary-color);
        flex-direction: column;
        width: 100%;
        height: auto;
        padding-bottom: 30px;
        text-align: center;
        transform: translateY(-150%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
    }

    .nav-links.active { transform: translateY(0); }
    .nav-links li { margin: 20px 0; }

    /* Hero Móvil */
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1rem; padding: 0 15px; }
    .hero-btns { flex-direction: column; padding: 0 40px; }

    /* Footer Móvil */
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .social-links a { margin: 0 10px; }
    
    /* Ajuste Partners en móvil */
    .partners-logos { gap: 30px; }
    .partner-icon { font-size: 2.5rem; }
}