:root {
    --neon-cyan: #00F2FF;
    --tgenix-blue: #3a96ff; 
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(0, 242, 255, 0.2);
    --modal-bg: rgba(10, 15, 20, 0.95);
}

body {
    background-color: #080a0c;
    color: white;
    font-family: 'Inter', sans-serif;
    margin: 0;
    overflow-x: hidden;
    position: relative;
}

/* Solución definitiva para que la imagen de fondo no salte en celulares */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #080a0c url('fondo.png') no-repeat center center;
    background-size: cover;
    z-index: -1;
    transform: translate3d(0,0,0); /* Aceleración por hardware */
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    position: relative;
    z-index: 1000;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    font-weight: 800;
    font-size: 1.6rem;
    text-decoration: none;
    color: white;
    letter-spacing: -1.5px;
}
.logo img { width: 40px; margin-right: 10px; }
.logo span.blue-letter { color: var(--tgenix-blue); }
.logo span.white-dash { color: white; margin-left: -4px; margin-right: -4px; }

nav {
    display: flex;
    gap: 25px;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 35px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}
nav a { text-decoration: none; color: #94a3b8; font-size: 0.95rem; transition: 0.3s; }
nav a:hover, nav a.active { color: white; }

/* Aseguramos que el botón siempre sea inline-block en cualquier resolución */
.btn-contact {
    display: inline-block !important;
    background: linear-gradient(90deg, #0072ff, #00c6ff);
    padding: 12px 28px;
    border-radius: 50px;
    color: white;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 198, 255, 0.3);
    transition: 0.3s;
    white-space: nowrap; /* Evita que el texto se parta en dos renglones */
}
.btn-contact:hover { transform: scale(1.03); }

/* Menú Hamburguesa oculto en desktop */
.menu-toggle, .hamburger, nav {
    display: none !important;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 10px;
    transition: all 0.3s linear;
}

.hero { 
    text-align: center; 
    padding: 100px 15px 40px 15px; /* Reducimos padding superior e inferior en móviles */
    box-sizing: border-box;
}
.hero h1 { 
    font-size: 3.5rem; 
    margin-bottom: 20px; 
    font-weight: 800; 
    letter-spacing: -1.5px; 
    line-height: 1.1; 
}
.hero p { 
    color: #94a3b8; 
    font-size: 1.1rem; 
    margin-bottom: 30px; 
    padding: 0 10px; /* Evita que el texto toque los bordes del cel */
    line-height: 1.5;
}

.services-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); /* Bajamos el mínimo a 260px */
    gap: 20px; 
    max-width: 1200px;
    margin: 40px auto 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    clip-path: polygon(0% 0%, 100% 0%, 100% 90%, 50% 100%, 0% 90%);
    padding: 35px 20px 60px 20px; /* Ligeramente más compacto para pantallas chicas */
    text-align: center;
    transition: 0.4s;
    cursor: pointer;
    box-sizing: border-box; /* Crucial para que no se desborde */
    width: 100%;
}
.card:hover { transform: translateY(-5px); border-color: var(--neon-cyan); background: rgba(255,255,255,0.08); }
.card img { width: 60px; margin-bottom: 20px; }
.card h3 { font-size: 1.2rem; margin-bottom: 12px; font-weight: 700; }
.card p { font-size: 0.88rem; color: #94a3b8; line-height: 1.6; margin-bottom: 15px; }
.btn-saber-mas { color: var(--neon-cyan); font-weight: bold; font-size: 0.8rem; letter-spacing: 1px; }

/* Estructura de Modales */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.85);
    backdrop-filter: blur(10px);
    justify-content: center; align-items: center;
    padding: 20px;
    box-sizing: border-box;
}
.modal-content {
    background: var(--modal-bg);
    padding: 40px 30px;
    border: 1px solid var(--neon-cyan);
    border-radius: 20px;
    width: 100%; max-width: 500px;
    position: relative;
    animation: slideIn 0.3s ease-out;
}
@keyframes slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.close-modal { position: absolute; top: 15px; right: 20px; font-size: 2rem; color: #94a3b8; cursor: pointer; }
.close-modal:hover { color: white; }
.modal-content h2 { color: var(--neon-cyan); margin-bottom: 15px; font-size: 1.5rem; }
.modal-content p { color: white; margin-bottom: 15px; font-size: 0.95rem; }
.modal-content ul { text-align: left; color: #94a3b8; line-height: 1.7; padding-left: 20px; font-size: 0.9rem; }

.purpose-section { text-align: center; padding: 80px 20px; }
.purpose-section img { width: 50px; margin-bottom: 20px; filter: drop-shadow(0 0 10px var(--neon-cyan)); }
.purpose-section h2 { font-size: 1.8rem; }

/* ==========================================================================
   MEDIA QUERIES - RESPONSIVE DESIGN BREAKPOINTS
   ========================================================================== */

/* Ajustes finos para celulares (pantallas menores a 480px) */
@media (max-width: 480px) {
    header {
        padding: 15px 5% !important;
        width: 90% !important;
    }

    .logo {
        font-size: 1.3rem !important;
    }

    .logo img {
        width: 35px !important;
        margin-right: 6px !important;
    }

    .btn-contact {
        padding: 8px 18px !important;
        font-size: 0.85rem !important;
    }
}


@media (max-width: 1024px) {
    .hero h1 { font-size: 2.8rem; }
    header { padding: 20px 4%; }
}

@media (max-width: 768px) {
    .menu-toggle { display: flex; } /* Activar hamburguesa */

    /* Menú móvil desplegable */
    nav {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        gap: 20px;
        background: rgba(10, 15, 20, 0.98);
        width: 75%;
        height: 100vh;
        padding: 100px 40px;
        border-radius: 0;
        border: none;
        border-right: 1px solid var(--glass-border);
        box-shadow: 5px 0 25px rgba(0,0,0,0.5);
        z-index: 1050;
    }

    nav.open { left: 0; }

    /* Animación de hamburguesa a cruz X */
    .menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .menu-toggle.open span:nth-child(2) { opacity: 0; }
    .menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1rem; }
    
    .btn-contact { padding: 10px 22px; font-size: 0.9rem; }
}

/* Ajustes finos para celulares pequeños (como el de tu captura) */
@media (max-width: 480px) {
    .hero { padding-top: 110px; } /* Le damos aire para que el logo/hamburguesa no encimen el H1 */
    .hero h1 { font-size: 1.8rem; letter-spacing: -0.5px; }
    .hero p { font-size: 0.95rem; }
    .logo { font-size: 1.3rem; }
    .logo img { width: 32px; }
    .btn-contact { display: none; } /* Oculto en móvil para limpiar la barra superior */
    nav { width: 100%; box-sizing: border-box; }
}

/* Bloqueo nativo de selección de texto en todo el sitio */
body {
    -webkit-user-select: none;  /* Safari */
    -moz-user-select: none;     /* Firefox */
    -ms-user-select: none;      /* IE10+ */
    user-select: none;          /* Estándar (Chrome, Edge, Opera) */
}

/* Permitir selección únicamente si en el futuro pones campos de inputs en formularios */
input, textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}