/* =========================================
   1. VARIABLES Y BASE
   ========================================= */
:root {
    /* --- COLORES CORPORATIVOS (JNY SMART GLOBAL GROUP) --- */
    --primary: #0057D9;      /* Azul Vibrante */
    --primary-dark: #003891; /* Azul Oscuro */
    --secondary: #00C2E0;    /* Cyan Smart (Tecnología) */
    --accent: #FF8C00;       /* Naranja (Detalles) */
    
    --dark: #101828;         
    --light: #FFFFFF;        
    --gray-bg: #F4F7FA;      
    --text-body: #475467;    
    --radius: 16px;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);

    /* --- COLORES DE LAS 8 MARCAS --- */
    --brand-electric: #00C2E0;  /* Cyan */
    --brand-promaint: #006D77;  /* Verde Oscuro */
    --brand-domotica: #2D9CDB;  /* Azul Cielo */
    --brand-drywall: #8E44AD;   /* Violeta */
    --brand-cctv: #2ECC71;      /* Verde */
    --brand-fire: #FF3D3D;      /* Rojo */
    --brand-welding: #F39C12;   /* Naranja */
    --brand-painter: #F1C40F;   /* Amarillo */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; color: var(--text-body); background-color: var(--light); line-height: 1.6; }
h1, h2, h3, h4 { font-family: 'Poppins', sans-serif; color: var(--dark); font-weight: 700; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; display: block; object-fit: cover; }

/* Contenedor Global */
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* =========================================
   2. BOTONES Y UTILIDADES
   ========================================= */
.btn { display: inline-block; padding: 12px 30px; border-radius: 50px; font-weight: 600; font-size: 0.95rem; border: none; cursor: pointer; transition: 0.3s; text-align: center; }

.btn-secondary { background: var(--secondary); color: white; }
.btn-secondary:hover { background: #00a0b8; transform: translateY(-3px); }

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-3px); }

.btn-whatsapp-custom {
    background-color: #25D366 !important;
    color: white !important;
    border: 2px solid white !important;
    font-weight: 700;
    display: inline-flex; align-items: center; gap: 8px;
}
.btn-whatsapp-custom:hover {
    background-color: white !important;
    color: #25D366 !important;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.section-padding { padding: 80px 0; }
.bg-gray { background-color: var(--gray-bg); }
.section-header { margin-bottom: 50px; }
.section-header h2 { font-size: 2.5rem; position: relative; display: inline-block; }
.section-header.left { text-align: left; border-left: 5px solid var(--secondary); padding-left: 20px; }
.section-header.center { text-align: center; }
.section-header.center h2::after { content: ''; display: block; width: 80px; height: 4px; background: var(--secondary); margin: 15px auto 0; border-radius: 2px; }

/* =========================================
   3. HEADER Y NAV
   ========================================= */
.top-bar { background: var(--primary-dark); color: white; padding: 10px 0; font-size: 0.9rem; }
.top-bar .container { display: flex; justify-content: flex-end; gap: 30px; }
.top-bar i { color: var(--secondary); margin-right: 8px; }

header { background: white; padding: 15px 0; position: sticky; top: 0; z-index: 1000; box-shadow: var(--shadow); }
header .container { display: flex; justify-content: space-between; align-items: center; }
.logo img { height: 50px; width: auto; object-fit: contain; } /* Asegura que el logo se vea bien */
nav ul { display: flex; gap: 30px; }
nav a { font-weight: 600; color: var(--dark); font-size: 0.95rem; text-transform: uppercase; }
nav a:hover, nav a.active { color: var(--primary); }
.header-btn { display: none; }

/* =========================================
   4. BANNERS (HERO)
   ========================================= */

/* A. Banner Gigante (Solo para Index) */
.hero { 
    height: 90vh; 
    background: linear-gradient(rgba(0, 56, 145, 0.85), rgba(16, 24, 40, 0.9)), url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?q=80&w=2070');
    background-size: cover; background-position: center; 
    display: flex; align-items: center; color: white;
}
.hero-content h1 { font-size: 3.5rem; line-height: 1.1; margin-bottom: 25px; color: white; }
.hero-content p { font-size: 1.25rem; margin-bottom: 40px; opacity: 0.95; max-width: 700px; font-weight: 300; }
.hero-tag { color: var(--secondary); font-weight: 800; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 20px; display: block; }
.hero-btns { display: flex; gap: 15px; flex-wrap: wrap; }

/* B. Banner Pequeño (Para páginas internas) */
.page-header {
    background: linear-gradient(rgba(0, 56, 145, 0.9), rgba(16, 24, 40, 0.9)), url('https://images.unsplash.com/photo-1497366216548-37526070297c?q=80&w=2069');
    background-size: cover; background-position: center;
    padding: 100px 0; text-align: center; color: white; margin-bottom: 0;
}
.page-header h1 { font-size: 3rem; margin-bottom: 15px; color: white; }
.page-header p { font-size: 1.2rem; opacity: 0.9; max-width: 600px; margin: 0 auto; }

/* =========================================
   5. COMPONENTES DEL HOME (Index)
   ========================================= */

/* Estadísticas */
.stats-section { margin-top: -70px; position: relative; z-index: 10; margin-bottom: 60px; }
.stats-grid { 
    background: var(--primary); color: white; padding: 50px; border-radius: var(--radius);
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center;
    box-shadow: 0 20px 40px rgba(0, 87, 217, 0.3);
}
.stat-item h3 { font-size: 3rem; color: var(--secondary); margin-bottom: 5px; font-weight: 800; }
.stat-item p { font-weight: 600; text-transform: uppercase; letter-spacing: 1px; font-size: 0.9rem; }

/* Sectores de Trabajo */
.sectores-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; }
.sector-card { 
    background: white; padding: 40px 30px; border-radius: var(--radius); text-align: center; 
    box-shadow: var(--shadow); transition: 0.3s; border: 1px solid #eee;
}
.sector-card:hover { transform: translateY(-10px); border-bottom: 5px solid var(--secondary); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
.sector-icon { font-size: 3rem; color: var(--primary); margin-bottom: 20px; }
.sector-title { font-weight: 800; font-size: 1.2rem; margin-bottom: 10px; color: var(--dark); }

/* Proceso de Trabajo (Timeline) */
.process-wrapper { display: flex; justify-content: space-between; position: relative; margin-top: 50px; gap: 20px; }
.process-line { position: absolute; top: 50px; left: 0; width: 100%; height: 4px; background-color: #e0e0e0; z-index: 1; }
.p-step { position: relative; z-index: 2; flex: 1; text-align: center; padding: 0 10px; }
.p-icon { width: 100px; height: 100px; background-color: white; border: 4px solid var(--primary); border-radius: 50%; margin: 0 auto 20px auto; display: flex; align-items: center; justify-content: center; position: relative; transition: all 0.3s ease; color: var(--primary); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.p-icon i { font-size: 2rem; }
.p-num { position: absolute; top: 0; right: 0; width: 30px; height: 30px; background-color: var(--secondary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.9rem; border: 2px solid white; }
.p-step h4 { font-size: 1.1rem; font-weight: 700; color: var(--dark); margin-bottom: 10px; }
.p-step p { font-size: 0.9rem; color: #666; line-height: 1.4; }
.p-step:hover .p-icon { background-color: var(--primary); color: white; transform: translateY(-5px); box-shadow: 0 10px 20px rgba(7, 62, 166, 0.3); }
.p-step:hover .p-icon.last { background-color: #25d366; border-color: #25d366; }

/* Ventajas */
.ventajas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.ventaja-box { 
    background: white; padding: 40px 30px; border-radius: var(--radius); text-align: center; 
    box-shadow: var(--shadow); transition: 0.3s; border-bottom: 4px solid transparent; 
}
.ventaja-box:hover { border-bottom-color: var(--secondary); transform: translateY(-5px); }
.v-icon { font-size: 2.5rem; color: var(--secondary); margin-bottom: 20px; }
.v-title { font-size: 1.2rem; margin-bottom: 15px; color: var(--primary); }
.v-text { font-size: 0.95rem; color: #666; }

/* Clientes (Estilo Bloque Azul + Grilla) */
.trust-section { padding: 80px 0; background: white; }
.trust-wrapper { display: flex; flex-wrap: wrap; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); min-height: 450px; }
.trust-left { flex: 1; min-width: 300px; background-color: var(--primary); color: white; display: flex; align-items: center; justify-content: center; padding: 60px; text-align: center; }
.trust-left h2 { font-size: 3rem; line-height: 1.1; font-weight: 800; color: white; }
.trust-right { flex: 2; min-width: 400px; background-color: white; padding: 50px; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 30px; align-items: center; justify-items: center; }
.brand-box { width: 100%; height: 100px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #ccc; border: 1px solid #eee; border-radius: 8px; transition: 0.3s; text-align: center; padding: 10px; }
.brand-box:hover { color: var(--primary); border-color: var(--primary); transform: scale(1.05); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.brand-box i { font-size: 2.5rem; margin-bottom: 10px; }
.brand-box span { font-weight: 800; font-size: 0.8rem; text-transform: uppercase; }

/* Franja de Contacto (Sobre el Footer) */
.contact-section { 
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important; 
    color: white; border-radius: var(--radius); padding: 70px; margin-bottom: 80px; text-align: center;
}
.contact-flex { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 30px; text-align: left; }

/* =========================================
   6. GRID DE SERVICIOS (USADO EN HOME Y SERVICIOS)
   ========================================= */
.destacados-wrapper { display: grid; grid-template-columns: 1fr 2fr; gap: 50px; align-items: center; }
.destacados-text p { font-size: 1.1rem; color: #666; margin-bottom: 30px; }

/* Grilla de tarjetas de marca */
.destacados-grid-small { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }

.brand-card-small {
    background: white; padding: 25px 15px; border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); border: 1px solid #eee; border-bottom: 4px solid transparent; 
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-align: center;
    height: 100%; min-height: 180px; transition: all 0.3s ease;
}
.brand-card-small:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }

.brand-logo, .brand-card-small i {
    height: 65px; width: auto; max-width: 100%; object-fit: contain; margin-bottom: 15px;
    display: flex; align-items: center; justify-content: center;
}
.brand-card-small i { font-size: 2.5rem; }
.logo-zoom { transform: scale(1.6); }

.brand-card-small h4 { font-size: 0.8rem; font-weight: 800; color: var(--dark); text-transform: uppercase; line-height: 1.4; margin: 0; }
.brand-card-small p { font-size: 0.85rem; color: #666; margin-top: 10px; }

/* Colores Hover por Marca */
.card-electric:hover { border-bottom-color: var(--brand-electric); } .card-electric i { color: var(--brand-electric); }
.card-promaint:hover { border-bottom-color: var(--brand-promaint); } .card-promaint i { color: var(--brand-promaint); }
.card-domotica:hover { border-bottom-color: var(--brand-domotica); } .card-domotica i { color: var(--brand-domotica); }
.card-drywall:hover { border-bottom-color: var(--brand-drywall); }   .card-drywall i { color: var(--brand-drywall); }
.card-cctv:hover { border-bottom-color: var(--brand-cctv); }         .card-cctv i { color: var(--brand-cctv); }
.card-fire:hover { border-bottom-color: var(--brand-fire); }         .card-fire i { color: var(--brand-fire); }
.card-welding:hover { border-bottom-color: var(--brand-welding); }   .card-welding i { color: var(--brand-welding); }
.card-painter:hover { border-bottom-color: var(--brand-painter); }   .card-painter i { color: var(--brand-painter); }

/* =========================================
   7. GRID DE PROYECTOS Y EXPERIENCIA
   ========================================= */
.exp-grid, .projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }

.exp-card, .project-card { 
    background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); 
    transition: 0.3s; position: relative; height: 350px; border: 1px solid #eee;
}
.project-card { height: auto; } /* En página proyectos la altura es automática */

.exp-card:hover, .project-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }

.exp-bg, .project-img { height: 100%; width: 100%; object-fit: cover; transition: 0.5s; }
.project-img { height: 250px; } /* Altura para tarjetas de proyecto */

.exp-card:hover .exp-bg { transform: scale(1.1); }

/* Overlay para Home (Texto sobre imagen) */
.exp-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; 
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 25px; color: white;
}
.exp-overlay h3 { color: white; font-size: 1.3rem; margin-bottom: 5px; font-weight: 700; }
.exp-overlay p { color: var(--secondary); font-weight: 600; text-transform: uppercase; font-size: 0.85rem; }

/* Cuerpo para Página Proyectos (Texto debajo de imagen) */
.project-body { padding: 25px; }
.project-tag { display: inline-block; background: var(--gray-bg); color: var(--primary); padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; margin-bottom: 10px; }
.project-card h3 { font-size: 1.3rem; margin-bottom: 10px; color: var(--dark); }

/* =========================================
   8. COMPONENTES PÁGINAS INTERNAS
   ========================================= */

/* Grid de Equipos */
.equip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 30px; }
.equip-card { background: white; padding: 30px; border-radius: var(--radius); border: 1px solid #eee; text-align: center; transition: 0.3s; box-shadow: var(--shadow); }
.equip-card:hover { border-color: var(--secondary); transform: translateY(-5px); }
.equip-img { height: 180px; width: auto; max-width: 100%; margin-bottom: 20px; object-fit: contain; }

/* Contacto Layout */
.contact-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.contact-info-box { background: var(--primary); color: white; padding: 40px; border-radius: var(--radius); box-shadow: var(--shadow); }
.info-item { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 30px; }
.info-item i { font-size: 1.5rem; color: var(--secondary); margin-top: 5px; }
.info-item h5 { font-size: 1.1rem; margin-bottom: 5px; color: white; }
.info-item p { color: rgba(255,255,255,0.8); font-size: 0.95rem; }

.contact-form { background: white; padding: 40px; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid #eee; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--dark); }
.form-group input, .form-group textarea { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; font-family: 'Inter', sans-serif; font-size: 1rem; transition: 0.3s; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 87, 217, 0.1); }

/* =========================================
   9. FOOTER
   ========================================= */
footer { background: var(--dark); color: white; padding: 80px 0 20px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 50px; margin-bottom: 50px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 50px; }
.footer-col h4 { margin-bottom: 25px; color: white; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px; }
.footer-col ul li { margin-bottom: 15px; color: #ccc; font-size: 0.95rem; }
.footer-col ul li i { color: var(--secondary); width: 25px; }
.whatsapp-float { position: fixed; width: 65px; height: 65px; bottom: 30px; right: 30px; background-color: #25d366; color: white; border-radius: 50%; text-align: center; font-size: 35px; box-shadow: 0 4px 15px rgba(0,0,0,0.3); z-index: 2000; display: flex; align-items: center; justify-content: center; transition: 0.3s; }
.whatsapp-float:hover { transform: scale(1.1); }

/* =========================================
   10. RESPONSIVE (MÓVIL)
   ========================================= */
@media (min-width: 900px) { .header-btn { display: inline-block; } }

@media (max-width: 992px) { 
    .destacados-grid-small { grid-template-columns: repeat(2, 1fr); }
    .destacados-wrapper { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .hero-content h1 { font-size: 2.8rem; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .soluciones-layout, .equip-layout, .trust-wrapper, .contact-flex { grid-template-columns: 1fr; flex-direction: column; text-align: center; }
    .contact-wrapper { grid-template-columns: 1fr; }
    .sol-item.wide { grid-column: span 1; }
    nav { display: none; } /* En móvil ocultamos menú (requiere JS) */
}

@media (max-width: 600px) {
    .stats-grid { grid-template-columns: 1fr; }
    .top-bar .container { justify-content: center; flex-direction: column; align-items: center; gap: 5px; }
    .destacados-grid-small { grid-template-columns: repeat(1, 1fr); }
    .process-wrapper { flex-direction: column; gap: 40px; }
    .process-line { width: 4px; height: 100%; left: 50%; top: 0; transform: translateX(-50%); }
    .p-step { background: white; padding: 20px 0; }
}