/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --bg: #0a0a0a;
    --card-bg: rgba(20, 20, 20, 0.7);
    --text: #ffffff;
    --text-muted: #a1a1a1;
    --primary: #D6001C;
    --primary-dark: #b00017;
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* =========================================
   2. FONDO & ANIMACIONES
   ========================================= */
#canvas-network {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1; background: var(--bg); opacity: 0.25;
}

.fade-in { 
    opacity: 0; transform: translateY(40px) scale(0.98);
    filter: blur(10px) brightness(0.5);
    transition: var(--transition); transition-duration: 0.8s;
}
.fade-in.visible { opacity: 1; transform: translateY(0) scale(1); filter: blur(0) brightness(1); }

.text-red { color: var(--primary); }
.bg-darker { background: rgba(0,0,0,0.3); }

/* =========================================
   3. NAVEGACIÓN
   ========================================= */
.navbar {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    background: rgba(10, 10, 10, 0.8); backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.05); padding: 1rem 0;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.nav-container { display: flex; justify-content: space-between; align-items: center; }

/* Logo Styles */
.logo a { display: flex; align-items: center; font-size: 1.5rem; font-weight: 800; letter-spacing: -1px; }
.logo img { height: 65px; width: auto; }
.dot { color: var(--primary); }

.nav-links { display: flex; gap: 2rem; list-style: none; align-items: center; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; transition: 0.3s; font-weight: 500;}
.nav-links a:hover { color: white; }
.mobile-menu-btn { display: none; font-size: 1.5rem; cursor: pointer; color: white; }

/* =========================================
   4. HERO
   ========================================= */
.hero {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    text-align: center; position: relative; padding-top: 80px;
    background: radial-gradient(circle at center, rgba(10,10,10,0.9) 0%, rgba(10,10,10,0) 80%);
}
.hero h1 { font-size: 4rem; line-height: 1.1; font-weight: 800; margin: 1.5rem 0; letter-spacing: -2px; }
.hero p { color: var(--text-muted); font-size: 1.25rem; max-width: 600px; margin: 0 auto 2.5rem; }
.badge { 
    color: var(--primary); font-size: 0.75rem; letter-spacing: 3px; font-weight: bold; 
    text-transform: uppercase; border: 1px solid rgba(214, 0, 28, 0.3);
    padding: 5px 12px; border-radius: 50px; background: rgba(214, 0, 28, 0.1);
}
.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-red { 
    background: var(--primary); color: white; padding: 14px 35px; border-radius: 50px; 
    text-decoration: none; font-weight: 600; transition: 0.3s; border: none; cursor: pointer;
    box-shadow: 0 10px 20px rgba(214, 0, 28, 0.2);
}
.btn-red:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-outline { 
    border: 1px solid rgba(255,255,255,0.2); color: white; padding: 14px 35px; border-radius: 50px; 
    text-decoration: none; font-weight: 600; transition: 0.3s; 
}
.btn-outline:hover { border-color: white; background: white; color: black; }

/* =========================================
   5. CLIENTES (LOGOS GRANDES CORREGIDOS)
   ========================================= */
.clients-section { 
    padding: 3rem 0; 
    background: rgba(5,5,5,0.8); 
    overflow: hidden; 
    border-top: 1px solid rgba(255,255,255,0.05); 
    border-bottom: 1px solid rgba(255,255,255,0.05); 
}
.clients-title { 
    text-align: center; font-size: 0.8rem; color: #555; 
    letter-spacing: 3px; margin-bottom: 2rem; 
    text-transform: uppercase; font-weight: 800;
}
.marquee-container { width: 100%; overflow: hidden; white-space: nowrap; }
.marquee-content { display: inline-block; animation: marquee 40s linear infinite; }

.client-logo { 
    display: inline-block; margin: 0 60px; /* Más espacio lateral */
    opacity: 0.5; transition: 0.3s; vertical-align: middle;
}
.client-logo:hover { opacity: 1; }

.client-logo img { 
    height: 110px; /* AUMENTADO DE 35px A 80px */
    width: auto; object-fit: contain;
    filter: grayscale(100%) brightness(0.8); 
}
.client-logo:hover img { filter: grayscale(0%) brightness(1); }

@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* =========================================
   6. SERVICIOS
   ========================================= */
.section { padding: 6rem 0; }
.section-title { font-size: 2rem; margin-bottom: 4rem; letter-spacing: -1px; line-height: 1; text-align: center;}
.grid-services { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; }

.card {
    position: relative; background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 20px; overflow: hidden;
    transition: transform 0.4s ease, border-color 0.4s ease;
    padding: 2rem; padding-top: 6rem;
    display: flex; flex-direction: column; justify-content: flex-start;
}

/* LUZ SPOTLIGHT */
.card::before, .portfolio-item::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.15), transparent 40%);
    z-index: 1; opacity: 0; transition: opacity 0.4s ease; pointer-events: none;
}
.card:hover::before, .portfolio-item:hover::before { opacity: 1; }
.card:hover { border-color: rgba(255, 255, 255, 0.3); transform: translateY(-5px); }

/* CONTENIDO CARD */
.icon-box { position: absolute; top: 2rem; left: 2rem; color: var(--primary); font-size: 1.5rem; z-index: 5; }
.cat-tag { 
    position: absolute; top: 2rem; right: 2rem; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; 
    color: white; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255,255,255,0.15); 
    padding: 6px 12px; border-radius: 50px; backdrop-filter: blur(5px); z-index: 5;
}
.card h3 { font-size: 1.4rem; margin-bottom: 0.8rem; line-height: 1.2; margin-top: auto; position: relative; z-index: 5; }
.card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; position: relative; z-index: 5; margin-bottom: 1.5rem;}
.service-actions { display: flex; gap: 10px; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.5rem; margin-top: auto; position: relative; z-index: 5;}
.action-btn { font-size: 0.8rem; font-weight: 600; text-decoration: none; color: white; padding: 8px 16px; border-radius: 6px; transition: 0.3s; flex: 1; text-align: center; border: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.2);}
.action-btn:hover { background: white; color: black; border-color: white; }
.action-btn.primary { background: rgba(214, 0, 28, 0.1); border-color: rgba(214, 0, 28, 0.3); color: #ff6b6b; }
.action-btn.primary:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* =========================================
   7. PORTAFOLIO & FILTROS
   ========================================= */
.portfolio-filters { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }
.filter-btn {
    background: transparent; border: 1px solid rgba(255, 255, 255, 0.1); color: var(--text-muted);
    padding: 10px 24px; border-radius: 50px; cursor: pointer; font-size: 0.9rem; font-weight: 500; transition: 0.3s; font-family: var(--font-main);
}
.filter-btn:hover { color: white; border-color: rgba(255, 255, 255, 0.3); }
.filter-btn.active { background: var(--primary); color: white; border-color: var(--primary); box-shadow: 0 5px 15px rgba(214, 0, 28, 0.3); }

.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 2rem; }
.portfolio-item { position: relative; background: #111; border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 16px; overflow: hidden; transition: transform 0.4s ease, border-color 0.4s ease; }
.portfolio-item:hover { transform: translateY(-8px); border-color: rgba(255,255,255,0.2); }
.portfolio-img { position: relative; aspect-ratio: 16/10; overflow: hidden; border-radius: 16px 16px 0 0; }
.portfolio-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.portfolio-item:hover .portfolio-img img { transform: scale(1.05); }
.portfolio-overlay { position: absolute; inset: 0; background: rgba(214, 0, 28, 0.85); display: flex; align-items: center; justify-content: center; opacity: 0; transition: 0.3s; }
.portfolio-item:hover .portfolio-overlay { opacity: 1; }
.portfolio-overlay i { font-size: 2.5rem; color: white; transform: translateY(20px); transition: 0.3s; }
.portfolio-item:hover .portfolio-overlay i { transform: translateY(0); }
.portfolio-info { padding: 1.8rem; position: relative; z-index: 2; }
.client-name { color: var(--primary); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; display: block; margin-bottom: 5px; }
.portfolio-info h3 { font-size: 1.3rem; margin: 0; color: white; }

/* Filtros animación */
.portfolio-item.hidden { display: none; }
.portfolio-item.show { animation: fadeInScale 0.5s ease forwards; }
@keyframes fadeInScale { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

/* =========================================
   8. CONTACTO & FOOTER
   ========================================= */
.contact-container { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.contact-form { background: rgba(255, 255, 255, 0.02); padding: 3rem; border-radius: 24px; border: 1px solid rgba(255, 255, 255, 0.08); backdrop-filter: blur(10px); display: flex; flex-direction: column; gap: 1.5rem; }
.contact-form input, .contact-form textarea { width: 100%; background: transparent; border: none; border-bottom: 2px solid rgba(255,255,255,0.1); padding: 15px 0; color: white; font-size: 1rem; transition: 0.3s; }
.contact-form input:focus { outline: none; border-bottom-color: var(--primary); }

footer { background: black; border-top: 1px solid rgba(255,255,255,0.08); padding: 4rem 0; margin-top: 6rem; }
.footer-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }

/* REDES SOCIALES SIN SUBRAYADO */
.socials a { 
    color: #888; font-size: 1.5rem; margin-left: 20px; transition: 0.3s; 
    text-decoration: none !important; border: none; display: inline-block;
}
.socials a:hover { color: var(--primary); transform: translateY(-3px); }

.copyright { color: #444; font-size: 0.85rem; }

/* BOTÓN ADMIN DISCRETO */
.admin-link { 
    font-size: 0.75rem; opacity: 0.2; color: #666; 
    text-decoration: none; margin-left: 15px; padding: 4px 8px;
    border: 1px solid rgba(255,255,255,0.05); border-radius: 4px; transition: 0.3s;
}
.admin-link:hover { opacity: 1; color: var(--primary); border-color: var(--primary); }

@media (max-width: 768px) {
    .hero h1 { font-size: 2.8rem; line-height: 1.1; }
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }
    .contact-container { grid-template-columns: 1fr; gap: 3rem; }
    
    /* Logos clientes en móvil más chicos para que no se vean gigantes */
    .client-logo img { height: 50px; }
    .client-logo { margin: 0 30px; }
}

/* PAGINA PROYECTO */
.project-header { padding-top: 30px; padding-bottom: 30px; background: linear-gradient(to bottom, #000 0%, rgba(20,20,20,0.8) 100%); border-bottom: 1px solid rgba(255,255,255,0.05); }
.project-meta { display: inline-flex; gap: 3rem; margin-bottom: 2rem; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; }
.meta-item span { display: block; font-size: 0.75rem; color: var(--primary); text-transform: uppercase; letter-spacing: 1px; font-weight: bold; margin-bottom: 5px;}
.project-content { display: grid; grid-template-columns: 1fr 1.5fr; gap: 4rem; margin-bottom: 4rem; margin-top: 4rem; }
.project-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 1.5rem; margin-top: 3rem; }
.project-gallery img { width: 100%; border-radius: 12px; transition: transform 0.3s; border: 1px solid rgba(255,255,255,0.05); }
.video-responsive { position: relative; padding-bottom: 56.25%; height: 0; border-radius: 16px; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); }
.video-responsive iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }