/* =========================================
   VARIABLES Y CONFIGURACIÓN GLOBAL
========================================= */
:root {
    /* Paleta de colores - Tema claro (por defecto o tecnológico) */
    --primary-color: #00d2ff;     /* Cian brillante */
    --secondary-color: #3a7bd5;   /* Azul eléctrico */
    --dark-bg: #0f172a;           /* Fondo principal oscuro */
    --darker-bg: #0b0f19;         /* Fondo secundario oscuro */
    --light-text: #e2e8f0;        /* Texto claro principal */
    --muted-text: #94a3b8;        /* Texto secundario */
    --card-bg: rgba(30, 41, 59, 0.7); /* Fondo de tarjetas */
    --card-border: rgba(56, 189, 248, 0.2);
    --accent-glow: 0 0 15px rgba(0, 210, 255, 0.5);
    
    /* Tema claro (opcional si quieren toggle, pero el prompt pide oscuro tecnológico por defecto) */
    --light-bg: #f8fafc;
    --light-card: #ffffff;
    --dark-text: #1e293b;
    
    /* Tipografía */
    --font-main: 'Poppins', sans-serif;
    
    /* Transiciones */
    --transition: all 0.3s ease;
}

/* Modo claro (se activa mediante clase en el body) */
body.light-mode {
    --dark-bg: var(--light-bg);
    --darker-bg: #e2e8f0;
    --light-text: var(--dark-text);
    --muted-text: #475569;
    --card-bg: var(--light-card);
    --card-border: rgba(58, 123, 213, 0.2);
    --accent-glow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

img {
    max-width: 100%;
    height: auto;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-main);
    background-color: var(--dark-bg);
    color: var(--light-text);
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition);
    width: 100%;
}

/* Utilidades */
.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--light-text);
    position: relative;
    display: block;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    box-shadow: var(--accent-glow);
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    color: #fff;
    box-shadow: 0 4px 15px rgba(58, 123, 213, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 210, 255, 0.6);
}

.btn-whatsapp {
    background: #25D366;
    color: #fff;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp:hover {
    transform: translateY(-3px);
    background: #128C7E;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
}

.btn-block {
    display: block;
    width: 100%;
}

/* =========================================
   HEADER & NAVBAR
========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    background: transparent;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(11, 15, 25, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    border-bottom: 1px solid var(--card-border);
}

body.light-mode .navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--light-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 40px;
    width: auto;
    border-radius: 8px; /* Pequeño redondeo opcional */
    object-fit: cover;
}

.logo i {
    color: var(--primary-color);
}

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

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    color: var(--light-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    transition: var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    bottom: -5px;
    left: 0;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.theme-toggle, .mobile-menu-btn {
    background: none;
    border: none;
    color: var(--light-text);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:hover, .mobile-menu-btn:hover {
    color: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
}

/* =========================================
   HERO SECTION
========================================= */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 80px; /* offset navbar */
    background: var(--darker-bg);
}

.circuit-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(0, 210, 255, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(58, 123, 213, 0.08), transparent 25%),
        url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M10 10h80v80h-80z" fill="none" stroke="rgba(56,189,248,0.05)" stroke-width="1"/><path d="M10 50h80M50 10v80" fill="none" stroke="rgba(56,189,248,0.05)" stroke-width="1"/></svg>');
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(11,15,25,0.9) 0%, rgba(15,23,42,0.7) 100%);
    z-index: 2;
}

body.light-mode .hero-overlay {
    background: linear-gradient(135deg, rgba(248,250,252,0.9) 0%, rgba(226,232,240,0.7) 100%);
}

.hero-container {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #fff, var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(0, 210, 255, 0.3);
}

body.light-mode .hero-content h1 {
    background: linear-gradient(45deg, var(--dark-text), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.5rem;
    color: var(--muted-text);
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.hero-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border: 1px solid var(--card-border);
}

.hero-image::before {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 20px var(--primary-color);
    z-index: 1;
    pointer-events: none;
    border-radius: 20px;
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.hero-image:hover img {
    transform: scale(1.05);
}

/* =========================================
   SERVICIOS
========================================= */
.services {
    background: var(--dark-bg);
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.service-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0,210,255,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border-color: var(--primary-color);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    transform: scale(1.1);
    color: var(--secondary-color);
}

.service-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--light-text);
}

/* =========================================
   POR QUÉ ELEGIRNOS
========================================= */
.why-us {
    background: var(--darker-bg);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.stat-card {
    text-align: center;
    padding: 30px;
    background: var(--card-bg);
    border-radius: 15px;
    border-bottom: 3px solid var(--primary-color);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--accent-glow);
}

.stat-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--light-text);
    display: inline-block;
}

.stat-card span {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.features-list {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.feature-item {
    font-size: 1.2rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 210, 255, 0.1);
    padding: 10px 25px;
    border-radius: 30px;
    border: 1px solid rgba(0, 210, 255, 0.2);
}

.feature-item i {
    color: var(--primary-color);
}

/* =========================================
   PROCESO DE REPARACIÓN
========================================= */
.process {
    background: var(--dark-bg);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-dot {
    position: absolute;
    width: 40px;
    height: 40px;
    right: -20px;
    background: var(--dark-bg);
    border: 2px solid var(--primary-color);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0,210,255,0.5);
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -20px;
}

.timeline-content {
    padding: 20px 30px;
    background: var(--card-bg);
    position: relative;
    border-radius: 15px;
    border: 1px solid var(--card-border);
    transition: var(--transition);
}

.timeline-item:hover .timeline-content {
    transform: scale(1.03);
    border-color: var(--primary-color);
    box-shadow: var(--accent-glow);
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* =========================================
   GALERÍA
========================================= */
.gallery {
    background: var(--darker-bg);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    height: 250px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(11, 15, 25, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-overlay span {
    color: #fff;
    font-weight: 600;
    font-size: 1.2rem;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover .gallery-overlay span {
    transform: translateY(0);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0,210,255,0.3);
    animation: zoom 0.3s;
}

@keyframes zoom {
    from {transform:scale(0)}
    to {transform:scale(1)}
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close-lightbox:hover {
    color: var(--primary-color);
}

#lightbox-caption {
    margin-top: 20px;
    color: #fff;
    font-size: 1.2rem;
}

/* =========================================
   TESTIMONIOS
========================================= */
.testimonials {
    background: var(--dark-bg);
}

.testimonials-slider {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.testimonial-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 30px;
    border-radius: 15px;
    width: calc(33.333% - 20px);
    min-width: 300px;
    position: relative;
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.quote-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    color: rgba(0, 210, 255, 0.2);
}

.stars {
    color: #ffd700;
    margin-bottom: 15px;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 20px;
    color: var(--muted-text);
}

.client-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.client-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    font-size: 1.2rem;
}

.client-name h4 {
    color: var(--light-text);
}

/* =========================================
   CONTACTO
========================================= */
.contact {
    background: var(--darker-bg);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--card-border);
    overflow: hidden;
}

.contact-info {
    padding: 40px;
    background: linear-gradient(135deg, rgba(15,23,42,0.8), rgba(11,15,25,0.9));
    border-right: 1px solid var(--card-border);
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.contact-info > p {
    margin-bottom: 30px;
    color: var(--muted-text);
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    background: rgba(58, 123, 213, 0.1);
    padding: 15px;
    border-radius: 50%;
}

.info-item h4 {
    color: var(--light-text);
    margin-bottom: 5px;
}

.info-item p {
    color: var(--muted-text);
}

.social-links-contact {
    display: flex;
    gap: 15px;
    margin-top: 40px;
}

.social-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-icon.facebook { background: #1877F2; }
.social-icon.whatsapp { background: #25D366; }

.social-icon:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.contact-form-container {
    padding: 40px;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    background: rgba(11, 15, 25, 0.5);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    color: var(--light-text);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition);
}

body.light-mode .form-group input,
body.light-mode .form-group textarea {
    background: rgba(255, 255, 255, 0.5);
    border-color: #cbd5e1;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.2);
}

/* =========================================
   FOOTER
========================================= */
.footer {
    background: #060911;
    padding-top: 60px;
    border-top: 1px solid #1e293b;
}

body.light-mode .footer {
    background: #1e293b;
    color: #f8fafc;
}

body.light-mode .footer .logo,
body.light-mode .footer h3 {
    color: #f8fafc;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--light-text);
}

.footer-logo-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img-footer {
    height: 35px;
    width: auto;
    border-radius: 6px;
    object-fit: cover;
}

.footer-about p {
    color: var(--muted-text);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--muted-text);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-hours p {
    color: var(--muted-text);
    margin-bottom: 10px;
}

.footer-bottom {
    text-align: center;
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--muted-text);
}

.footer-bottom a {
    color: var(--primary-color);
    text-decoration: none;
}

/* =========================================
   ELEMENTOS FLOTANTES
========================================= */
.floating-btn {
    position: fixed;
    bottom: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    text-decoration: none;
    z-index: 1000;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.back-to-top {
    right: 30px;
    background: var(--primary-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-5px);
}

.float-whatsapp {
    left: 30px;
    background: #25D366;
}

.float-whatsapp:hover {
    background: #128C7E;
    transform: scale(1.1);
}

/* =========================================
   MEDIA QUERIES
========================================= */
@media screen and (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 80px;
        padding-right: 20px;
    }
    
    .timeline-item:nth-child(even) {
        left: 0;
    }
    
    .timeline-item:nth-child(even) .timeline-dot,
    .timeline-item:nth-child(odd) .timeline-dot {
        left: 11px;
    }
}

@media screen and (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--darker-bg);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 30px;
        transition: 0.5s ease;
    }
    
    body.light-mode .nav-links {
        background: var(--light-bg);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links a {
        font-size: 1.5rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .testimonial-card {
        width: 100%;
    }
}

/* Custom Marker Leaflet */
.custom-map-marker {
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.8);
    object-fit: cover;
    background-color: var(--card-bg);
}

.leaflet-popup-content-wrapper {
    background-color: var(--card-bg);
    color: var(--light-text);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
}
.leaflet-popup-tip {
    background-color: var(--primary-color);
}
