/* =========================================
   VARIABLES Y RESET
   ========================================= */
:root {
    --primary: #00d4ff;
    --secondary: #002e5d;
    --dark: #001a35;
    --white: #ffffff;
    --gray-bg: #f8faff;
    --text: #333;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

    /* Dark mode vars */
    --dm-bg: #060d1a;
    --dm-surface: #0d1f38;
    --dm-surface2: #0a1628;
    --dm-border: rgba(0, 212, 255, 0.12);
    --dm-text: #e2e8f0;
    --dm-text-muted: #8899aa;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--white);
    color: var(--text);
    overflow-x: hidden;
}

/* HEADER INTELIGENTE */
header {
    background: transparent;
    padding: 12px 5%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: background 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease, padding 0.35s ease;
}
header.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    padding: 8px 5%;
}
header.hidden {
    transform: translateY(-100%);
}
/* Links blancos cuando header es transparente */
header:not(.scrolled) .header-nav a { color: rgba(255,255,255,0.9); }
header:not(.scrolled) .header-nav a:hover { color: var(--primary); }
header:not(.scrolled) .location-tag { color: rgba(255,255,255,0.8); }
header:not(.scrolled) .mode-toggle { filter: brightness(10); }

/* Compensar el header fixed en el hero */
.hero { padding-top: 90px; }
.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-logo { height: 65px; border-radius: 5px; }
.location-tag {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    letter-spacing: 2px;
    color: var(--secondary);
    font-weight: bold;
}
.mode-toggle { background: none; border: none; font-size: 1.5rem; cursor: pointer; }

/* HERO */
.hero {
    height: 85vh;
    background: linear-gradient(rgba(0,46,93,0.75), rgba(0,46,93,0.75)),
                url('https://i.ibb.co/S4H23pkY/racks-4.jpg') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}
.main-title { font-family: 'Cinzel', serif; font-size: 3.8rem; letter-spacing: 6px; }
.highlight { color: var(--primary); }
.hero-subtitle { font-size: 1.3rem; letter-spacing: 4px; height: 1.5em; margin: 15px 0; }
.hero-line { width: 100px; height: 4px; background: var(--primary); margin: 20px auto; }
.cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--primary);
    color: var(--secondary);
    text-decoration: none;
    font-weight: 700;
    border-radius: 50px;
    text-transform: uppercase;
    transition: var(--transition);
}
.cta-button:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,212,255,0.4); }

/* NOSOTROS */
.nosotros {
    padding: 100px 5%;
    background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
}
.nosotros-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}
.nosotros-text h2 { font-family: 'Cinzel', serif; font-size: 2.5rem; color: var(--secondary); margin-bottom: 20px; }
.nosotros-text p { line-height: 1.7; margin-bottom: 15px; }
.badge {
    background: var(--primary);
    color: var(--secondary);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.8rem;
    margin-bottom: 10px;
    display: inline-block;
}
.image-wrapper img { width: 100%; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }

/* ESTADÍSTICAS */
.stats { background: var(--secondary); padding: 60px 5%; color: white; }
.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
}
.stat-item { padding: 20px; }
.stat-icon-box { font-size: 2.5rem; color: var(--primary); margin-bottom: 15px; }
.stat-number { font-family: 'Cinzel', serif; font-size: 2.5rem; margin-bottom: 5px; }
.stat-desc { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 2px; opacity: 0.8; }

/* PORTAFOLIO */
.catalog {
    padding: 80px 5%;
    background: linear-gradient(180deg, #f0f6ff 0%, #f8faff 50%, #eef4ff 100%);
}
.cat-main-title {
    text-align: center;
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    margin-bottom: 40px;
    color: var(--secondary);
    letter-spacing: 3px;
}
.filter-container {
    text-align: center;
    margin-bottom: 40px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}
.filter-btn {
    padding: 10px 25px;
    border: 2px solid var(--secondary);
    background: transparent;
    cursor: pointer;
    border-radius: 25px;
    font-weight: 700;
    color: var(--secondary);
    transition: var(--transition);
}
.filter-btn.active, .filter-btn:hover { background: var(--secondary); color: white; }
.category-label {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: var(--secondary);
    margin: 40px 0 25px;
    border-left: 5px solid var(--primary);
    padding-left: 15px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* ITEMS + HOVER ANIMADO */
.item {
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s ease;
}
.item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), filter 0.4s ease;
}
.item:not(.video-item):hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,212,255,0.25);
}
.item:not(.video-item):hover img {
    transform: scale(1.08);
    filter: brightness(1.08) saturate(1.1);
}

/* VIDEOS */
.video-item { cursor: default; }
.video-wrapper { position: relative; width: 100%; height: 100%; background: #000; }

.video-vertical { height: 500px; }
.video-vertical .video-wrapper { width: 100%; height: 100%; }
.video-vertical .video-wrapper iframe { width: 100%; height: 100%; border: none; }

.video-horizontal { height: auto; aspect-ratio: 16 / 9; }
.video-horizontal .video-wrapper { position: relative; width: 100%; padding-top: 56.25%; height: 0; }
.video-horizontal .video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

/* LIGHTBOX ANIMADO */
#lightbox {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.92);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 0.3s ease;
}
#lightbox.open { opacity: 1; }
#lightbox img {
    max-width: 90%;
    max-height: 85%;
    border-radius: 10px;
    transform: scale(0.85);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}
#lightbox.open img { transform: scale(1); opacity: 1; }

/* FOOTER */
.main-footer { background: #001226; color: white; padding: 60px 5% 30px; text-align: center; }
.footer-logo { height: 80px; margin-bottom: 20px; }
.footer-line-straight { width: 60%; height: 1px; background: var(--primary); margin: 20px auto 40px; }
.footer-grid-horizontal { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-bottom: 30px; }
.contact-card-rect {
    background: rgba(255,255,255,0.05);
    padding: 25px;
    border-radius: 12px;
    min-width: 250px;
    text-decoration: none;
    color: white;
    border: 1px solid rgba(0,212,255,0.1);
    transition: 0.3s;
}
.contact-card-rect:hover { background: rgba(255,255,255,0.1); border-color: var(--primary); }
.contact-card-rect h4 { font-family: 'Cinzel', serif; color: var(--primary); margin-bottom: 10px; }
.btn-wa-rect {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    border: 2px solid #25d366;
    color: #25d366;
    text-decoration: none;
    border-radius: 20px;
    font-weight: bold;
    transition: 0.3s;
}
.btn-wa-rect:hover { background: #25d366; color: white; }
.footer-bottom-rect { font-size: 0.8rem; opacity: 0.6; margin-top: 40px; }

/* BOTONES FLOTANTES */
#btn-top {
    position: fixed;
    bottom: 100px; right: 30px;
    display: none;
    background: var(--secondary);
    color: white;
    border: none;
    width: 50px; height: 50px;
    border-radius: 10px;
    cursor: pointer;
    z-index: 2000;
    font-size: 1.5rem;
    transition: 0.3s;
}
#btn-top:hover { background: var(--primary); color: var(--secondary); }
.wa-float {
    position: fixed;
    bottom: 30px; right: 30px;
    background: #25d366;
    width: 60px; height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: 0.3s;
}
.wa-float img { width: 35px; height: 35px; }
.wa-float:hover { transform: scale(1.1); }

/* REVEAL */
.reveal { opacity: 0; transform: translateY(30px); transition: 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* MODO OSCURO */
body.dark-mode { background: #000b18; color: #eee; }
body.dark-mode header, body.dark-mode .catalog { background: #001a35; }
body.dark-mode .contact-card-rect { background: rgba(255,255,255,0.02); }

/* RESPONSIVE */
/* ===== MOBILE OPTIMIZATION ===== */

/* Large tablets */
@media (max-width: 1024px) {
    .hero-content { grid-template-columns: 1fr; gap: 40px; }
    .nosotros-grid { grid-template-columns: 1fr; gap: 40px; }
    .why-inner { grid-template-columns: 1fr; gap: 40px; }
    .contact-inner { grid-template-columns: 1fr; gap: 40px; }
    .servicios-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
    .footer-grid-horizontal { gap: 12px; }
    .contact-card-rect { min-width: 200px; }
}

/* Mobile */
@media (max-width: 768px) {
    /* General */
    body { overflow-x: hidden; }
    section { padding: 60px 5%; }

    /* Header */
    header { padding: 12px 5%; }
    .header-content { gap: 10px; }
    .nav-logo { height: 40px; }
    .header-nav { display: none; }
    .location-tag { display: none; }

    /* Hero */
    .hero { min-height: 100svh; padding: 0 5%; }
    .hero-content { padding: 120px 0 60px; text-align: center; }
    .main-title { font-size: 2.4rem; line-height: 1.1; }
    .hero-subtitle { font-size: 0.95rem; }
    .hero-line { margin: 16px auto; }
    .hero-buttons { flex-direction: column; align-items: center; gap: 12px; }
    .hero-buttons a { width: 100%; max-width: 300px; justify-content: center; }
    .cta-button { padding: 14px 24px; font-size: 0.85rem; }

    /* Nosotros */
    .nosotros-grid { grid-template-columns: 1fr; gap: 40px; }
    .nosotros-text { order: 1; }
    .nosotros-img { order: 0; }
    .nosotros-img .image-wrapper { max-height: 280px; overflow: hidden; border-radius: 12px; }
    .nosotros-img img { width: 100%; height: 280px; object-fit: cover; }
    .nosotros-features { grid-template-columns: 1fr 1fr; gap: 10px; }

    /* Stats */
    .stats-container { grid-template-columns: 1fr 1fr; gap: 16px; }
    .stat-item { padding: 20px 15px; }
    .stat-number { font-size: 2rem; }

    /* Servicios */
    .servicios-grid { grid-template-columns: 1fr; gap: 16px; }
    .servicio-card { padding: 24px 20px; }

    /* Portfolio */
    .portfolio-head { flex-direction: column; gap: 16px; align-items: flex-start; }
    .filter-bar { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 8px; -webkit-overflow-scrolling: touch; gap: 6px; width: 100%; }
    .filter-btn { white-space: nowrap; flex-shrink: 0; padding: 8px 14px; font-size: 0.72rem; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .gallery-item.wide { grid-column: span 2; }
    .gallery-item.tall { grid-row: span 1; }
    .gallery-item { aspect-ratio: 1/1; }
    .gallery-item.wide { aspect-ratio: 2/1; }

    /* Why */
    .why-inner { grid-template-columns: 1fr; gap: 40px; }
    .why-grid { grid-template-columns: 1fr; gap: 12px; }
    .why-item { flex-direction: row; align-items: flex-start; gap: 12px; }
    .why-icon { flex-shrink: 0; width: 40px; height: 40px; }
    .process-steps { gap: 16px; }

    /* Testimonials */
    .testimonials-grid { grid-template-columns: 1fr; gap: 16px; }
    .testi-card { padding: 24px 20px; }

    /* Contact / Quote form */
    .contact-inner { grid-template-columns: 1fr; gap: 40px; }
    .quote-form { padding: 28px 20px; }
    .form-row { grid-template-columns: 1fr; }

    /* Footer */
    .footer-grid-horizontal { flex-direction: column; align-items: center; gap: 12px; }
    .contact-card-rect { width: 100%; max-width: 400px; min-width: unset; padding: 18px 20px; box-sizing: border-box; }
    .footer-top { grid-template-columns: 1fr; gap: 24px; }
    .footer-bottom-rect { margin-top: 24px; font-size: 0.75rem; }
    .footer-logo { height: 60px; }
    .footer-line-straight { width: 80%; }

    /* Floating buttons */
    .float-cotizar { display: none; }
    .wa-float { width: 52px; height: 52px; bottom: 20px; right: 20px; }
    #waPopup { width: calc(100vw - 40px); right: 20px; bottom: 85px; }

    /* Section headers */
    .section-header h2, .about-text h2, .why-text h2 { font-size: 1.8rem; }
    .section-header { margin-bottom: 32px; }

    /* Lightbox */
    .lightbox-controls { gap: 6px; }
    .lb-btn { width: 36px; height: 36px; font-size: 0.8rem; }
    .lightbox-hint { display: none; }
    #lightbox-img { max-width: 95vw; max-height: 70vh; }
}

/* Small phones */
@media (max-width: 380px) {
    .main-title { font-size: 2rem; }
    .nosotros-features { grid-template-columns: 1fr; }
    .stats-container { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: 1fr; }
    .gallery-item.wide { grid-column: span 1; aspect-ratio: 1/1; }
}

/* =========================================
   NAVEGACIÓN EN HEADER
   ========================================= */
.header-nav {
    display: flex;
    gap: 25px;
}
.header-nav a {
    text-decoration: none;
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.3s;
}
.header-nav a:hover { color: var(--primary); }

/* =========================================
   HERO - BOTONES
   ========================================= */
.hero-buttons { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }
.cta-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}
.cta-secondary:hover {
    background: white;
    color: var(--secondary);
    box-shadow: 0 5px 15px rgba(255,255,255,0.3);
}
.cta-secondary i { margin-right: 6px; }

/* =========================================
   SECTION HEADER REUTILIZABLE
   ========================================= */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}
.section-header h2 {
    font-family: 'Cinzel', serif;
    font-size: 2.8rem;
    color: var(--secondary);
    margin-top: 10px;
    letter-spacing: 2px;
    line-height: 1.2;
}
.section-sub {
    color: #666;
    margin-top: 10px;
    font-size: 1rem;
}

/* =========================================
   SERVICIOS
   ========================================= */
.servicios {
    padding: 100px 5%;
    background: linear-gradient(180deg, #f8faff 0%, #ffffff 50%, #f0f6ff 100%);
}
.servicios-container { max-width: 1200px; margin: 0 auto; }
.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}
.servicio-card {
    background: var(--gray-bg);
    border-radius: 16px;
    padding: 35px 25px;
    text-align: center;
    border: 1px solid rgba(0,46,93,0.08);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    opacity: 0;
    transform: translateY(40px);
}
.servicio-card.card-visible {
    opacity: 1;
    transform: translateY(0);
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1),
                box-shadow 0.35s ease,
                border-color 0.35s ease,
                opacity 0.6s ease;
}
.servicio-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,46,93,0.12);
    border-color: var(--primary);
}
.servicio-icon {
    width: 70px; height: 70px;
    background: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.6rem;
    color: var(--primary);
    transition: background 0.3s;
}
.servicio-card:hover .servicio-icon { background: var(--primary); color: var(--secondary); }
.servicio-card h3 {
    font-family: 'Cinzel', serif;
    color: var(--secondary);
    margin-bottom: 12px;
    font-size: 1.1rem;
}
.servicio-card p { color: #555; font-size: 0.9rem; line-height: 1.7; }

/* =========================================
   PROCESO DE TRABAJO
   ========================================= */
.proceso {
    background: var(--secondary);
    padding: 90px 5%;
    color: white;
}
.proceso-container { max-width: 1200px; margin: 0 auto; }
.proceso .section-header h2 { color: white; }
.proceso .badge { background: rgba(0,212,255,0.2); color: var(--primary); }
.proceso-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}
.paso {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(0,212,255,0.2);
    border-radius: 16px;
    padding: 30px 25px;
    text-align: center;
    width: 200px;
    transition: background 0.3s, transform 0.3s;
}
.paso:hover { background: rgba(0,212,255,0.1); transform: translateY(-5px); }
.paso-num {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: var(--primary);
    opacity: 0.4;
    line-height: 1;
}
.paso-icon {
    font-size: 2rem;
    color: var(--primary);
    margin: 10px 0;
}
.paso h3 {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    margin-bottom: 8px;
}
.paso p { font-size: 0.82rem; opacity: 0.75; line-height: 1.6; }
.paso-arrow {
    font-size: 1.5rem;
    color: var(--primary);
    opacity: 0.5;
}

/* =========================================
   FORMULARIO DE COTIZACIÓN
   ========================================= */
.cotizacion {
    padding: 100px 5%;
    background: linear-gradient(180deg, #eef4ff 0%, #f8faff 100%);
}
.cotizacion-container { max-width: 1100px; margin: 0 auto; }
.cotizacion-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 50px;
    align-items: start;
}
.cotizacion-info { display: flex; flex-direction: column; gap: 25px; }
.info-item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
}
.info-item i {
    font-size: 1.4rem;
    color: var(--primary);
    background: var(--secondary);
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.info-item h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: #888; margin-bottom: 4px; }
.info-item a, .info-item span { color: var(--secondary); font-weight: 600; text-decoration: none; font-size: 0.95rem; }
.info-item a:hover { color: var(--primary); }

.cotizacion-form {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.form-group label { font-size: 0.82rem; font-weight: 600; color: var(--secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid #e8edf5;
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: var(--text);
    transition: border-color 0.3s;
    outline: none;
    background: #fafbff;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--primary); }
.form-group textarea { resize: vertical; }
.form-submit {
    width: 100%;
    padding: 16px;
    background: #25d366;
    color: white;
    border: none;
    border-radius: 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.form-submit:hover { background: #1da851; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(37,211,102,0.35); }
.form-submit i { font-size: 1.2rem; }

/* =========================================
   MAPA
   ========================================= */
.mapa-wrapper { width: 100%; line-height: 0; }
.mapa-wrapper iframe { display: block; }

/* =========================================
   DARK MODE - NUEVAS SECCIONES
   ========================================= */


/* =========================================
   RESPONSIVE - NUEVAS SECCIONES
   ========================================= */
@media (max-width: 900px) {
    .cotizacion-grid { grid-template-columns: 1fr; }
    .proceso-steps { flex-direction: column; align-items: center; }
    .paso-arrow { transform: rotate(90deg); }
    .header-nav { display: none; }
}
@media (max-width: 600px) {
    .form-row { grid-template-columns: 1fr; }
    .cotizacion-form { padding: 25px 18px; }
    .hero-buttons { flex-direction: column; align-items: center; }
}



/* =========================================
   PARTÍCULAS EN HERO
   ========================================= */
.hero { position: relative; overflow: hidden; }
#particles-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }

/* =========================================
   TOOLTIPS EN PORTAFOLIO
   ========================================= */
.item[data-tooltip] { position: relative; }
.item[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: rgba(0, 46, 93, 0.92);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 20px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    border: 1px solid rgba(0,212,255,0.3);
    z-index: 10;
}
.item[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}/* =========================================
   MODO OSCURO COMPLETO Y MEJORADO
   ========================================= */

/* Transición suave al activar */
body {
    transition: background 0.4s ease, color 0.4s ease;
}

body.dark-mode {
    background: #070f1e;
    color: #cdd6e8;
}

/* --- HEADER --- */
body.dark-mode header.scrolled {
    background: rgba(7, 15, 30, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.5);
    border-bottom: 1px solid rgba(0,212,255,0.1);
}
body.dark-mode .nav-logo { filter: brightness(0.9); }
body.dark-mode .location-tag { color: #00d4ff; }
body.dark-mode .header-nav a { color: #8899bb; }
body.dark-mode .header-nav a:hover { color: #00d4ff; }
body.dark-mode .mode-toggle { filter: brightness(1.2); }

/* --- HERO --- */
body.dark-mode .hero {
    background: linear-gradient(rgba(2,8,20,0.88), rgba(4,12,28,0.88)),
                url('https://i.ibb.co/S4H23pkY/racks-4.jpg') center/cover;
}

/* --- NOSOTROS --- */
body.dark-mode .nosotros {
    background: linear-gradient(180deg, #070f1e 0%, #0a1628 100%);
}
body.dark-mode .nosotros-text .badge {
    background: rgba(0,212,255,0.15);
    color: #00d4ff;
}
body.dark-mode .nosotros-text h2 { color: #e2eaf8; }
body.dark-mode .nosotros-text p { color: #8899bb; }
body.dark-mode .image-wrapper img {
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    filter: brightness(0.92) contrast(1.05);
}

/* --- ESTADÍSTICAS --- */
body.dark-mode .stats {
    background: linear-gradient(135deg, #040c1e 0%, #071428 50%, #040c1e 100%);
    border-top: 1px solid rgba(0,212,255,0.08);
    border-bottom: 1px solid rgba(0,212,255,0.08);
}
body.dark-mode .stat-icon-box { color: #00d4ff; }
body.dark-mode .stat-number { color: #ffffff; }
body.dark-mode .stat-desc { color: #6677aa; }

/* --- SERVICIOS --- */
body.dark-mode .servicios {
    background: linear-gradient(180deg, #0a1628 0%, #070f1e 100%);
}
body.dark-mode .servicio-card {
    background: #0d1f38;
    border: 1px solid rgba(0,212,255,0.1);
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
body.dark-mode .servicio-card.card-visible {
    background: #0d1f38;
}
body.dark-mode .servicio-card:hover {
    background: #112640;
    border-color: rgba(0,212,255,0.4);
    box-shadow: 0 12px 40px rgba(0,212,255,0.1);
}
body.dark-mode .servicio-icon {
    background: rgba(0,212,255,0.1);
    color: #00d4ff;
}
body.dark-mode .servicio-card:hover .servicio-icon {
    background: #00d4ff;
    color: #070f1e;
}
body.dark-mode .servicio-card h3 { color: #dde6f5; }
body.dark-mode .servicio-card p { color: #7788aa; }

/* --- PROCESO --- */
body.dark-mode .proceso {
    background: linear-gradient(135deg, #040c1e 0%, #071428 100%);
}
body.dark-mode .paso {
    background: rgba(255,255,255,0.03);
    border-color: rgba(0,212,255,0.12);
}
body.dark-mode .paso:hover {
    background: rgba(0,212,255,0.07);
    border-color: rgba(0,212,255,0.3);
}

/* --- PORTAFOLIO --- */
body.dark-mode .catalog {
    background: linear-gradient(180deg, #070f1e 0%, #0a1628 50%, #070f1e 100%);
}
body.dark-mode .cat-main-title { color: #dde6f5; }
body.dark-mode .category-label {
    color: #dde6f5;
    border-left-color: #00d4ff;
}
body.dark-mode .filter-btn {
    border-color: rgba(0,212,255,0.2);
    color: #7788aa;
    background: transparent;
}
body.dark-mode .filter-btn.active,
body.dark-mode .filter-btn:hover {
    background: #00d4ff;
    color: #070f1e;
    border-color: #00d4ff;
}
body.dark-mode .item {
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}
body.dark-mode .item:not(.video-item):hover {
    box-shadow: 0 20px 40px rgba(0,212,255,0.15);
}

/* --- COTIZACIÓN --- */
body.dark-mode .cotizacion {
    background: linear-gradient(180deg, #0a1628 0%, #070f1e 100%);
}
body.dark-mode .cotizacion-form {
    background: #0d1f38;
    border: 1px solid rgba(0,212,255,0.1);
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
}
body.dark-mode .form-group label { color: #00d4ff; }
body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .form-group textarea {
    background: #070f1e;
    border-color: rgba(0,212,255,0.15);
    color: #cdd6e8;
}
body.dark-mode .form-group input::placeholder,
body.dark-mode .form-group textarea::placeholder { color: #445566; }
body.dark-mode .form-group input:focus,
body.dark-mode .form-group select:focus,
body.dark-mode .form-group textarea:focus {
    border-color: #00d4ff;
    box-shadow: 0 0 0 3px rgba(0,212,255,0.08);
    background: #0a1628;
}
body.dark-mode .form-group select option { background: #0d1f38; }
body.dark-mode .info-item h4 { color: #445566; }
body.dark-mode .info-item a,
body.dark-mode .info-item span { color: #cdd6e8; }
body.dark-mode .info-item a:hover { color: #00d4ff; }
body.dark-mode .info-item i {
    background: rgba(0,212,255,0.1);
    color: #00d4ff;
}

/* --- SECCIÓN HEADER TEXTOS --- */
body.dark-mode .section-header h2 { color: #dde6f5; }
body.dark-mode .section-sub { color: #6677aa; }
body.dark-mode .badge {
    background: rgba(0,212,255,0.12);
    color: #00d4ff;
}

/* --- MAPA --- */
body.dark-mode .mapa-wrapper iframe { filter: invert(90%) hue-rotate(180deg) brightness(0.85); }

/* --- FOOTER --- */
body.dark-mode .main-footer {
    background: #040c1e;
    border-top: 1px solid rgba(0,212,255,0.08);
}
body.dark-mode .contact-card-rect {
    background: #0d1f38;
    border-color: rgba(0,212,255,0.1);
    color: #cdd6e8;
}
body.dark-mode .contact-card-rect:hover {
    background: #112640;
    border-color: rgba(0,212,255,0.4);
}
body.dark-mode .contact-card-rect h4 { color: #00d4ff; }
body.dark-mode .contact-card-rect p { color: #8899bb; }
body.dark-mode .footer-bottom-rect p { color: #445566; }

/* --- BOTONES FLOTANTES --- */
body.dark-mode #btn-top {
    background: #0d1f38;
    border: 1px solid rgba(0,212,255,0.2);
    color: #00d4ff;
}
body.dark-mode #btn-top:hover {
    background: #00d4ff;
    color: #070f1e;
}

/* --- LIGHTBOX --- */
body.dark-mode #lightbox { background: rgba(0,0,0,0.96); }



/* =========================================
   NOSOTROS - FEATURES
   ========================================= */
.nosotros-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 25px;
}
.nos-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary);
}
.nos-feature i {
    color: var(--primary);
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Dark mode */
body.dark-mode .nos-feature { color: #cdd6e8; }
body.dark-mode .nos-feature i { color: var(--primary); }

@media (max-width: 480px) {
    .nosotros-features { grid-template-columns: 1fr; }
}

/* =========================================
   HERO - IMAGEN DE FONDO
   ========================================= */
.hero {
    background-image:
        linear-gradient(rgba(0, 10, 25, 0.72), rgba(0, 20, 45, 0.80)),
        url('https://i.ibb.co/R4DN9qWQ/racks-6.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(0,212,255,0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* =========================================
   HERO - TIPOGRAFÍA RESPONSIVE MÓVIL
   ========================================= */
@media (max-width: 768px) {
    .main-title { font-size: 2.4rem !important; letter-spacing: 2px; }
    .hero-subtitle { font-size: 0.85rem !important; letter-spacing: 2px; }
    .hero-content { padding: 0 20px; }
    .hero-buttons { flex-direction: column; align-items: center; gap: 12px; }
    .cta-button { width: 100%; max-width: 280px; text-align: center; }
}
@media (max-width: 400px) {
    .main-title { font-size: 1.9rem !important; }
    .hero-subtitle { font-size: 0.75rem !important; }
}

/* =========================================
   POR QUÉ ELEGIRNOS
   ========================================= */
.elegirnos {
    padding: 100px 5%;
    background: linear-gradient(180deg, #f0f6ff 0%, #ffffff 50%, #f8faff 100%);
}
.elegirnos-container { max-width: 1200px; margin: 0 auto; }
.elegirnos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}
.elegir-card {
    background: white;
    border-radius: 18px;
    padding: 35px 28px;
    border: 1px solid rgba(0,46,93,0.07);
    position: relative;
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.elegir-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.elegir-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0,46,93,0.1);
    border-color: rgba(0,212,255,0.3);
}
.elegir-card:hover::before { opacity: 1; }
.elegir-num {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    opacity: 0.12;
    line-height: 1;
    position: absolute;
    top: 15px; right: 20px;
}
.elegir-icon {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, var(--secondary), #004080);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 18px;
    transition: transform 0.3s ease;
}
.elegir-card:hover .elegir-icon { transform: scale(1.1) rotate(-5deg); }
.elegir-card h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.05rem;
    color: var(--secondary);
    margin-bottom: 10px;
}
.elegir-card p {
    font-size: 0.88rem;
    color: #666;
    line-height: 1.7;
}

/* Dark mode elegirnos */
body.dark-mode .elegirnos {
    background: linear-gradient(180deg, #070f1e 0%, #0a1628 100%);
}
body.dark-mode .elegir-card {
    background: #0d1f38;
    border-color: rgba(0,212,255,0.08);
}
body.dark-mode .elegir-card:hover {
    border-color: rgba(0,212,255,0.3);
    box-shadow: 0 18px 40px rgba(0,212,255,0.08);
}
body.dark-mode .elegir-num { color: var(--primary); opacity: 0.15; }
body.dark-mode .elegir-card h3 { color: #dde6f5; }
body.dark-mode .elegir-card p { color: #7788aa; }

/* ===== BOTÓN FLOTANTE COTIZAR ===== */
.float-cotizar {
    position: fixed;
    left: 25px;
    bottom: 100px;
    background: var(--secondary);
    color: white;
    padding: 12px 18px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,46,93,0.4);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
}
.float-cotizar.visible {
    opacity: 1;
    pointer-events: all;
}
.float-cotizar:hover {
    background: var(--primary);
    color: var(--secondary);
    transform: scale(1.05);
}

/* ===== TESTIMONIOS ===== */
.testimonios {
    padding: 80px 5%;
    background: var(--bg);
}
.testimonios-container { max-width: 1100px; margin: 0 auto; }
.testimonios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 40px;
}
.testimonio-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 28px;
    border: 1px solid rgba(0,212,255,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.testimonio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,212,255,0.15);
}
.test-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.test-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.test-header h4 { font-size: 0.95rem; font-weight: 700; margin: 0 0 3px; }
.test-stars { color: #fbbf24; font-size: 0.9rem; }
.google-logo { height: 20px; margin-left: auto; opacity: 0.7; }
.testimonio-card p {
    color: var(--text-light);
    font-size: 0.92rem;
    line-height: 1.7;
    font-style: italic;
}
.test-cta { text-align: center; margin-top: 35px; }
.test-review-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: #333;
    border: 2px solid #ddd;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}
.test-review-btn:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.test-review-btn .fab { color: #4285f4; }

/* Dark mode testimonios */
body.dark-mode .testimonio-card { background: var(--surface); border-color: rgba(0,212,255,0.15); }
body.dark-mode .testimonio-card p { color: rgba(255,255,255,0.75); }
body.dark-mode .test-review-btn { background: var(--surface); color: white; border-color: rgba(255,255,255,0.2); }
