/* ==========================================================================
   ALL IN ONE ELECTRICIAN - FULL VERIFIED CSS (DARK TECH / GLASSMORPHISM)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. VARIABLES Y TEMA OSCURO PREMIUM
   -------------------------------------------------------------------------- */
:root {
    --bg-dark: #080f1e;          /* Fondo principal ultra oscuro */
    --bg-card: rgba(16, 27, 48, 0.7); /* Cristal para tarjetas */
    --primary: #00d2ff;         /* Cyan Eléctrico */
    --accent: #ffcc00;          /* Amarillo Alto Voltaje */
    --accent-glow: rgba(255, 204, 0, 0.4);
    --text-light: #f1f5f9;      /* Blanco suave para lectura */
    --text-muted: #94a3b8;      /* Gris metálico secundario */
    --border-glow: rgba(0, 210, 255, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 15% 20%, rgba(0, 210, 255, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(255, 204, 0, 0.05) 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   2. HEADER & NAVEGACIÓN GLASSMORPHISM
   -------------------------------------------------------------------------- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 6%;
    background: rgba(8, 15, 30, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo {
    color: var(--text-light);
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    text-decoration: none;
}

.logo span {
    color: var(--accent);
    text-shadow: 0 0 12px var(--accent-glow);
}

.nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.nav a:hover {
    color: var(--primary);
    text-shadow: 0 0 8px rgba(0, 210, 255, 0.6);
}

.btn-nav {
    background: linear-gradient(135deg, var(--accent) 0%, #ffa500 100%);
    color: #080f1e !important;
    padding: 0.6rem 1.4rem;
    border-radius: 30px;
    font-weight: 700 !important;
    box-shadow: 0 0 15px var(--accent-glow);
    transition: all 0.3s ease !important;
}

.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(255, 204, 0, 0.8);
}

/* Selector de Idioma */
.lang-switch {
    display: flex;
    align-items: center;
    margin-left: 10px;
    padding-left: 15px;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    font-weight: 700;
}

.lang-switch a {
    color: var(--text-muted);
    margin: 0 3px;
    text-decoration: none;
}

.lang-switch a.active, 
.lang-switch a:hover {
    color: var(--accent);
}

/* --------------------------------------------------------------------------
   3. HERO SECTION
   -------------------------------------------------------------------------- */
.hero {
    min-height: 85vh;
    background: linear-gradient(180deg, rgba(8, 15, 30, 0.7) 0%, var(--bg-dark) 100%), 
                url('https://images.unsplash.com/photo-1621905251189-08b45d6a269e?q=80&w=1600&auto=format&fit=crop') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 1.5rem;
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0,210,255,0.25) 0%, rgba(0,0,0,0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: electricPulse 4s infinite alternate;
    pointer-events: none;
}

@keyframes electricPulse {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.3; }
    100% { transform: translate(-50%, -50%) scale(1.4); opacity: 0.8; }
}

.hero-content {
    max-width: 850px;
    z-index: 2;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1.2rem;
    line-height: 1.15;
    letter-spacing: -1px;
}

.hero-content h1 span {
    background: linear-gradient(90deg, var(--accent) 0%, #fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px var(--accent-glow));
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #ff9900 100%);
    color: #080f1e;
    border: none;
    padding: 1rem 2.2rem;
    border-radius: 30px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 35px rgba(255, 204, 0, 0.9);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    padding: 1rem 2.2rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-4px);
}

/* --------------------------------------------------------------------------
   4. GALERÍA Y SECCIONES (ESTRUCTURA UNIFORME)
   -------------------------------------------------------------------------- */
.services, .gallery-section, .contact-section {
    padding: 5rem 5%;
    text-align: center;
}

.services h2, .gallery-section h2, .contact-section h2 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, #ffffff 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 3rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Cuadrícula de Tarjetas Identicas */
.services-grid, .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 340px));
    gap: 2rem;
    justify-content: center;
    align-items: stretch;
}

/* Tarjeta individual con altura y ancho fijos */
.service-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-glow);
    padding: 1.5rem 1.2rem;
    border-radius: 16px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 400px !important; /* ALTURA FIJA EXACTA PARA TODAS LAS TARJETAS */
    box-sizing: border-box;
}

.service-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 10px 25px rgba(0, 210, 255, 0.2);
}

.service-card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 6px rgba(0, 210, 255, 0.5));
    flex-shrink: 0;
}

.service-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--text-light);
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   5. BOTONES DE PESTAÑAS
   -------------------------------------------------------------------------- */
.tabs-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: rgba(16, 27, 48, 0.85);
    color: var(--text-muted);
    border: 1px solid rgba(0, 210, 255, 0.25);
    padding: 0.75rem 1.6rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.tab-btn i {
    font-size: 1rem;
    color: var(--primary);
    transition: transform 0.3s ease, color 0.3s ease;
}

.tab-btn:hover {
    color: #ffffff;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.25);
}

.tab-btn:hover i {
    transform: scale(1.15);
}

.tab-btn.active {
    background: linear-gradient(135deg, #00d2ff 0%, #0072ff 100%);
    color: #080f1e;
    border-color: #00d2ff;
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.6);
}

.tab-btn.active i {
    color: #080f1e;
}

/* --------------------------------------------------------------------------
   6. VISOR DE IMÁGENES (LIMITADO STRICTAMENTE A 200PX DE ALTO)
   -------------------------------------------------------------------------- */
.auto-slider-container {
    position: relative !important;
    width: 100% !important;
    height: 200px !important;     /* FUERZA LA MISMA ALTURA EN TODAS LAS FOTOS */
    max-height: 200px !important;
    border-radius: 10px;
    overflow: hidden !important;
    border: 1px solid rgba(0, 210, 255, 0.3);
    margin-top: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

.auto-img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

/* AQUÍ SE FUERZA A QUE LA FOTO SE RECORTES Y QUEDE IDENTICA A CUALQUIER OTRA */
.auto-img img {
    width: 100% !important;
    height: 100% !important;
    max-height: 200px !important;
    object-fit: cover !important;     /* RECORTE AUTOMÁTICO PROFESIONAL */
    object-position: center !important;  /* CENTRA EL ENFOQUE DE LA FOTO */
    display: block !important;
}

.img-after {
    animation: autoScanClip 4s ease-in-out infinite alternate;
}

.auto-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary);
    pointer-events: none;
    z-index: 5;
    animation: autoScanLine 4s ease-in-out infinite alternate;
}

.auto-tag {
    position: absolute;
    bottom: 5px;
    padding: 2px 6px;
    background: rgba(8, 15, 30, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.65rem;
    font-weight: 800;
    border-radius: 4px;
    text-transform: uppercase;
    pointer-events: none;
    z-index: 6;
}

.tag-before { left: 5px; color: var(--accent); }
.tag-after { right: 5px; color: var(--primary); }

@keyframes autoScanClip {
    0% { clip-path: polygon(0% 0, 100% 0, 100% 100%, 0% 100%); }
    100% { clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%); }
}

@keyframes autoScanLine {
    0% { left: 0%; }
    100% { left: 100%; }
}

/* --------------------------------------------------------------------------
   7. BANNER FLOTANTE DE AVISO DE SEGURIDAD
   -------------------------------------------------------------------------- */
.safety-alert {
    position: fixed;
    bottom: -150px;
    left: 25px;
    background: rgba(16, 27, 48, 0.95);
    border: 1px solid var(--accent);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px var(--accent-glow);
    z-index: 9998;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 380px;
}

.safety-alert.show-banner {
    bottom: 25px;
}

.safety-icon {
    font-size: 1.8rem;
    color: var(--accent);
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.safety-text h4 {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 2px;
}

.safety-text p {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.btn-safety-call {
    background: var(--accent);
    color: #080f1e;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.5rem 0.8rem;
    border-radius: 20px;
    white-space: nowrap;
    transition: transform 0.2s ease;
}

.btn-safety-call:hover {
    transform: scale(1.05);
}

.close-alert {
    position: absolute;
    top: 5px;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
}

.close-alert:hover {
    color: #fff;
}

/* --------------------------------------------------------------------------
   8. BOTÓN FLOTANTE DE WHATSAPP
   -------------------------------------------------------------------------- */
.whatsapp-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #ffffff !important;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.1rem;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    text-decoration: none;
    z-index: 99999;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-btn:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.8);
}

/* --------------------------------------------------------------------------
   9. ADAPTABILIDAD MÓVIL
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .safety-alert {
        left: 15px;
        right: 15px;
        max-width: none;
        bottom: 95px;
    }

    .safety-alert.show-banner {
        bottom: 95px;
    }
}