/* --- CSS Reset and Variables --- */
:root {
    /* Color Palette - Premium Dark Mode with Dell Blue accent */
    --bg-dark: #0f172a;
    --bg-darker: #0b1120;
    --bg-card: rgba(30, 41, 59, 0.7);
    --accent: #0076CE; /* Dell Blue approx */
    --accent-hover: #005fa3;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --gradient-1: linear-gradient(135deg, #0076CE 0%, #38bdf8 100%);
    
    /* Layout */
    --container-width: 1200px;
    --nav-height: 90px;
    
    /* Effects */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    /* Detalle visual: Cuadrícula tecnológica de fondo */
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Detalle visual: Orbe luminoso */
.ambient-orb {
    position: fixed;
    top: -30vh; right: -20vw; width: 100vw; height: 100vw;
    background: radial-gradient(circle, rgba(0, 118, 206, 0.12) 0%, rgba(0, 0, 0, 0) 65%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: ambientPulse 12s infinite alternate ease-in-out;
}

@keyframes ambientPulse {
    0% { transform: scale(1) translate(0, 0); opacity: 0.5; }
    100% { transform: scale(1.1) translate(-80px, 120px); opacity: 1; }
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-weight: 800;
    line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: 1rem; }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }

p { color: var(--text-secondary); margin-bottom: 1rem; }

a { text-decoration: none; color: inherit; transition: var(--transition-smooth); }

.accent { color: var(--accent); }
.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Utilities --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section-padding { padding: 6rem 2rem; }
.bg-alt { background-color: var(--bg-darker); }
.full-width { width: 100%; }

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Buttons --- */
.btn-primary, .btn-secondary, .btn-outline {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--gradient-1);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 118, 206, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 118, 206, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-outline {
    border: 2px solid var(--accent);
    color: var(--accent);
    padding: 0.6rem 1.8rem;
}

.btn-outline:hover {
    background: var(--accent);
    color: #fff;
}

/* --- Navigation --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
}

nav.scrolled {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    border-bottom: var(--glass-border);
}

.nav-container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text { font-size: 1.5rem; font-weight: 800; }
.nav-logo { height: 75px; width: auto; object-fit: contain; }


.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a { font-weight: 600; font-size: 0.95rem; }
.nav-links a:hover { color: var(--accent); }

.hamburger { display: none; font-size: 1.5rem; cursor: pointer; }

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: var(--nav-height);
    /* Imagen de fondo de cuartos de servidores (Pasillo central) */
    background: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.95)), url('https://images.pexels.com/photos/1148820/pexels-photo-1148820.jpeg?auto=compress&cs=tinysrgb&w=1920') center/cover no-repeat;
}

/* Glow effect behind hero */
.hero::before {
    content: '';
    position: absolute;
    top: 20%;
    right: 10%;
    width: 400px;
    height: 400px;
    background: var(--accent);
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.3;
    z-index: -1;
}

.hero-content {
    flex: 1;
    z-index: 1;
    padding-left: 10%;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(0, 118, 206, 0.1);
    color: var(--accent);
    border: 1px solid rgba(0, 118, 206, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.hero-logo-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

.hero-main-logo {
    max-width: 400px;
    width: 100%;
    height: auto;
    z-index: 2;
    /* Se elimina el fondo circular blanco para mostrar el logo transparente */
}

.glow-effect {
    display: none; /* Oculto temporalmente a petición del usuario para probar el logo limpio */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(0,118,206,0.4) 0%, rgba(0,118,206,0) 70%);
    z-index: 1;
    border-radius: 50%;
}

/* --- Partners Section --- */
.partners {
    background: linear-gradient(180deg, var(--bg-dark) 0%, rgba(0, 118, 206, 0.05) 50%, var(--bg-dark) 100%);
    position: relative;
    border-top: 1px solid rgba(0, 118, 206, 0.1);
    border-bottom: 1px solid rgba(0, 118, 206, 0.1);
}

.partners::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 150px;
    background: var(--accent);
    filter: blur(120px);
    opacity: 0.15;
    z-index: 0;
}

.partners .container {
    position: relative;
    z-index: 1;
}

.partners-title {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 2rem;
}

.partner-logo {
    height: 80px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1) opacity(0.5); /* Ghost style: white and faded */
    transition: var(--transition-smooth);
    cursor: default;
}

.partner-logo:hover {
    filter: brightness(1) invert(0) opacity(1); /* Reveal true colors on hover */
    transform: translateY(-5px);
}

.partner-logo.featured {
    height: 100px;
    filter: brightness(0) invert(1) opacity(0.8); /* Dell is slightly more visible */
}

.partner-lenovo {
    height: 40px; /* Reducido para mejor equilibrio visual */
}

.partner-logo.featured:hover {
    filter: brightness(1) invert(0) opacity(1);
}

.reverse-scroll {
    animation: scroll-reverse 35s linear infinite;
}

.reverse-scroll:hover {
    animation-play-state: paused;
}

@keyframes scroll-reverse {
    0% { transform: translateX(calc(-50% - 1.5rem)); }
    100% { transform: translateX(0); }
}

/* --- About Section --- */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.about-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition-smooth);
}

.about-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-5px);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

/* --- Services Section --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.service-card {
    padding: 0;
    text-align: left;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.service-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover .service-image img {
    transform: scale(1.08);
}

.service-content {
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 0; height: 3px;
    background: var(--gradient-1);
    transition: width 0.4s ease;
}

.service-card:hover::after { width: 100%; }

.service-card:hover { transform: translateY(-10px); }

.service-icon {
    width: 60px;
    height: 60px;
    background: rgba(0, 118, 206, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    transition: var(--transition-smooth);
}

.service-card:hover .service-icon { background: var(--accent); color: #fff; }

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    font-weight: 600;
    margin-top: 1rem;
}

.service-link i { transition: transform 0.3s ease; }
.service-link:hover i { transform: translateX(5px); }

/* --- Features Section --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2.5rem 2rem;
    border-radius: 16px;
    text-align: center;
    transition: var(--transition-smooth);
}

.feature-card:hover {
    background: rgba(0, 118, 206, 0.05);
    border-color: rgba(0, 118, 206, 0.3);
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    display: inline-block;
}

.feature-card h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #fff;
}

/* --- Clients Section --- */
.clients {
    border-top: 1px solid rgba(255,255,255,0.05);
}

.marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 2rem 0;
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
    display: flex;
    align-items: center; /* Centrado vertical para logos de diferentes alturas */
    gap: 3rem;
    width: max-content;
    animation: scroll 30s linear infinite;
}

.marquee-content:hover {
    animation-play-state: paused;
}

.client-badge {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 3rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: var(--transition-smooth);
    cursor: default;
}

.client-badge:hover {
    background: rgba(0, 118, 206, 0.1);
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-5px);
}

.client-logo {
    height: 120px; /* Tamaño extra grande */
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1) opacity(0.5); /* Ghost style: white and faded */
    transition: var(--transition-smooth);
    cursor: default;
}

.client-logo:hover {
    filter: brightness(1) invert(0) opacity(1); /* Reveal true colors on hover */
    transform: translateY(-5px);
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 1.5rem)); }
}

/* --- Contact Section --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: flex-start;
}

.info-items { display: flex; flex-direction: column; gap: 2rem; }

.info-item { display: flex; align-items: flex-start; gap: 1.5rem; }

.info-item i {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--accent);
}

.info-item h4 { margin-bottom: 0.2rem; font-size: 1.1rem; }

.contact-form { padding: 3rem; }

.form-group { margin-bottom: 1.5rem; }

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    transition: var(--transition-smooth);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(0,0,0,0.4);
}

/* --- Locations (Maps) --- */
.locations-wrapper {
    margin-top: 5rem;
    padding-top: 4rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.locations-title {
    text-align: center;
    margin-bottom: 3rem;
}

.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 3rem;
}

.location-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.location-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.location-header i {
    font-size: 2rem;
    color: var(--accent);
}

.location-header h4 { margin: 0; font-size: 1.2rem; }
.location-header p { margin: 0; font-size: 0.9rem; color: var(--text-secondary); }

.map-container {
    width: 100%;
    height: 250px;
    border-radius: 12px;
    overflow: hidden;
    border: var(--glass-border);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    filter: invert(90%) hue-rotate(180deg) brightness(80%) contrast(90%); /* Dark mode map effect */
    transition: var(--transition-smooth);
}

.map-container:hover iframe {
    filter: invert(0%) hue-rotate(0deg) brightness(100%) contrast(100%); /* Normal on hover */
}


/* --- Footer --- */
footer {
    background: #060a14;
    padding: 4rem 2rem 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-logo { height: 90px; width: auto; object-fit: contain; }
.footer-brand p { margin-top: 1rem; font-size: 0.9rem; }

.footer-links { display: flex; gap: 1.5rem; }
.footer-links a:hover { color: var(--accent); }

.footer-social { display: flex; gap: 1rem; }
.footer-social a {
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.footer-social a:hover { background: var(--accent); color: #fff; }

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 0.85rem;
}

/* --- Animations --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* --- Modals --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: rgba(15, 23, 42, 0.95);
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    border-radius: 16px;
    position: relative;
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 1.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10;
}

.close-modal:hover {
    color: var(--accent);
}

.modal-body {
    padding: 3rem 2.5rem;
    overflow-y: auto;
    color: var(--text-secondary);
}

/* Custom scrollbar for modal */
.modal-body::-webkit-scrollbar {
    width: 8px;
}
.modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}
.modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 118, 206, 0.5);
    border-radius: 4px;
}
.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

.modal-body h2 {
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.modal-body h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    color: #fff;
    font-size: 1.1rem;
}

.modal-body p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.modal-list {
    margin-left: 20px;
    margin-bottom: 1.5rem;
    list-style-type: disc;
}

.modal-list li {
    margin-bottom: 0.5rem;
}

/* --- WhatsApp Float --- */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 0px 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.whatsapp-float:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0px 6px 20px rgba(37, 211, 102, 0.6);
    color: #FFF;
}

@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 25px;
    }
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .hero { flex-direction: column; padding-top: 120px; text-align: center; }
    .hero-content { padding-left: 0; margin-bottom: 4rem; }
    .hero-buttons { justify-content: center; }
    .hero-main-logo { max-width: 300px; }
    .glow-effect { width: 350px; height: 350px; }
    
    .contact-wrapper { grid-template-columns: 1fr; }
    .contact-form { padding: 2rem; }
    .locations-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: var(--nav-height);
        left: -100%;
        width: 100%;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 2rem 0;
        transition: 0.4s ease;
    }
    
    .nav-links.active { left: 0; }
    .hamburger { display: block; }
    .footer-content { flex-direction: column; text-align: center; }
}
