:root {
    --primary-indigo: #1e1b4b;
    --emerald-accent: #10b981;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --bg-dark: #0f172a;
}
/* --- Agregamos comportamiento de desplazamiento suave global --- */
html {
    scroll-behavior: smooth;
}

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

body {
		/*padding-top: 80px;*/    
		font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- SOLUCIÓN: Compensación para el Header Fijo --- */
/* Cada sección que tenga un ID se detendrá 90px antes del borde superior */
section[id] {
    scroll-margin-top: 90px;
}

/* Header & Nav */
header {	
		background-color: var(--bg-dark);
		position: fixed;
		top: 0;		/* Asegura que inicie en el borde superior */
		left: 0;	/* Asegura que cubra desde la izquierda*/
		width: 100%; 
		z-index: 1000;	/* Prioridad de capa para estar siempre arriba*/
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);	
}

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

.logo img {
    height: 50px;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
}

/* Hero Section */
.hero {
		/* Evita que el Hero quede tapado por el header fijo */
    padding-top: 140px; /* Ajusta este valor según la altura de tu header */
    background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.05), transparent);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

h1 span {
    color: var(--emerald-accent);
}

p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* Botones */
.btn-primary {
    background-color: var(--emerald-accent);
    color: var(--bg-dark);
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    margin-right: 15px;
}

.btn-outline {
    border: 2px solid var(--emerald-accent);
    color: var(--emerald-accent);
    padding: 13px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
}

/* Tarjeta Visual */
.tech-card {
    background: var(--primary-indigo);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
/* [Inferencia] Eliminamos el float para usar Flexbox en el padre */
.tech-card p {
    margin-bottom: 15px;
    font-family: monospace;
	display: flex;             /* [Inferencia] Activa el modo flexible */
    justify-content: space-between; /* [Inferencia] Empuja un texto a la izquierda y otro a la derecha */
    align-items: center;
}

.tech-card span:last-child {
    color: var(--emerald-accent);
    text-align: right;
}

.services-section {
    padding: 60px 20px;
}

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

.service-card {
    background: rgba(30, 27, 75, 0.4); /* Variación del indigo */
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.service-card:hover {
    border-color: var(--emerald-accent);
    transform: translateY(-5px);
    background: var(--primary-indigo);
}

.service-card h3 {
    color: var(--emerald-accent);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.service-card p {
    font-size: 1rem;
    margin-bottom: 0;
}

.lang-selector {
    white-space: nowrap; /* Evita que el texto salte de línea */
    display: flex;       /* Alinea los elementos en una fila[cite: 5] */
    align-items: center; /* Centra los botones verticalmente[cite: 5] */
	gap: 8px;            /* SOLUCIÓN: Agrega la misma separación que el footer */
}

.lang-selector button {
    background: none;
    border: none;
    color: var(--emerald-accent);
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    transition: opacity 0.3s;
	padding: 0 4px;      /* SOLUCIÓN: Añade espacio interno a los lados del texto */
}

.lang-selector button:hover {
    opacity: 0.7;
}

/* --- RESPONSIVE DESIGN --- */

/* Tabletas y Móviles Grandes (Menos de 768px) */
@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr; /* Cambiamos de 2 columnas a 1 sola */
        text-align: center;
        gap: 30px;
    }

    h1 {
        font-size: 2.5rem; /* Reducimos el tamaño del título principal */
    }

    .hero-btns {
        display: flex;
        flex-direction: column; /* Botones uno sobre otro en móviles */
        gap: 15px;
    }

    .btn-primary {
        margin-right: 0; /* Quitamos el margen lateral */
    }

    .tech-card {
        padding: 25px; /* Reducimos el padding interno para ganar espacio */
    }

    /* Navegación */
    .nav-links {
			gap: 10px; /* Reducimos el espacio de 30px a 10px en móvil */
        font-size: 0.85rem; /* Un pelín más pequeña la letra para ganar espacio */
        /*gap: 15px;*/
        /*font-size: 0.9rem;*/		
    }
}

/* Móviles Pequeños (Menos de 480px) */
@media (max-width: 480px) {
    header {
        padding: 10px 0;
			background-color: rgba(15, 23, 42, 0.8); /* Fondo con transparencia */
			backdrop-filter: blur(10px); /* Desenfoque de fondo */
			/* ... resto de tus estilos ... */
    }

    .logo img {
        height: 40px; /* Logo un poco más pequeño */
    }

    h1 {
        font-size: 2rem;
    }

    .services-grid {
        grid-template-columns: 1fr; /* Forzamos una sola columna en servicios */
    }
}

.btn-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-indigo);
    border: 2px solid var(--emerald-accent);
    border-radius: 50%;
    cursor: pointer;
    display: none; /* Se oculta por defecto */
    z-index: 999;
    padding: 8px;
    transition: transform 0.3s ease;
}

.btn-top:hover {
    transform: scale(1.1);
    background-color: var(--emerald-accent);
}

/* Cambia el color del diamante al hacer hover */
.btn-top:hover svg path:first-child {
    fill: var(--primary-indigo);
}

/* --- SECCIÓN DEMOS --- */
.demos-section { padding: 80px 20px; }
.section-title { 
    text-align: center; 
    font-size: 2.5rem; 
    margin-bottom: 50px; 
    color: var(--text-light); 
}

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

.demo-card {
    background: rgba(30, 27, 75, 0.4); 
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.demo-card:hover {
    transform: translateY(-10px);
    border-color: var(--emerald-accent);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.1);
}

.demo-header {
    background: rgba(15, 23, 42, 0.9);
    padding: 12px 15px;
    display: flex;
    gap: 8px;
}

.dot { width: 12px; height: 12px; border-radius: 50%; }
.red { background: #ff5f56; } .yellow { background: #ffbd2e; } .green { background: #27c93f; }

.demo-content { padding: 30px; }
.demo-content h3 { color: var(--emerald-accent); margin-bottom: 15px; }
.demo-content p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 25px; }

.tech-stack { display: flex; gap: 10px; margin-bottom: 25px; }
.tech-stack span {
    font-size: 0.75rem;
    font-family: monospace;
    padding: 4px 10px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--emerald-accent);
    border: 1px solid var(--emerald-accent);
    border-radius: 4px;
}

.btn-demo-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.btn-demo-link:hover { color: var(--emerald-accent); }

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

/* --- SECCIÓN CONTACTO --- */
.contact-section {
    padding: 100px 20px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.contact-info h2 {
    font-size: 2.8rem;
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.2;
}

.contact-info p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.audit-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 10px 20px;
    border-radius: 50px;
    color: var(--emerald-accent);
    font-size: 0.9rem;
    font-weight: bold;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--emerald-accent);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse 1.6s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Formulario */
.contact-form-container {
    background: rgba(30, 27, 75, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.contact-form .input-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-form label {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: bold;
}

.contact-form input {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px;
    border-radius: 8px;
    color: var(--text-light);
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.contact-form input:focus {
    outline: none;
    border-color: var(--emerald-accent);
    background: rgba(15, 23, 42, 0.9);
}

.btn-submit {
    width: 100%;
    background: var(--emerald-accent);
    color: var(--primary-indigo);
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

/* --- FOOTER --- */
footer {
    background: #0b0f19;
    padding: 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

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

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.language-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-lang {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: bold;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.btn-lang:hover {
    color: var(--emerald-accent);
}

.divider {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.85rem;
}

/* Responsivo */
@media (max-width: 768px) {
    .contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .contact-info h2 { font-size: 2.2rem; }
	
	/* SOLUCIÓN: Centra los elementos del footer y les da espacio en móviles */
    .footer-content { 
		flex-direction: column; 
		gap: 20px; 
		text-align: center; 
		padding-bottom: 20px; /* Margen extra de protección */
	}
}

/* Botón Flotante de WhatsApp */
.btn-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #25d366;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1001;
    padding: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-whatsapp:hover {
    transform: scale(1.1);
    background-color: #128c7e;
}

/* Reubicación adaptativa para el botón de ir arriba si ambos coinciden */
.btn-top {
    position: fixed;
    bottom: 95px; /* Lo subimos para dejarle la base libre a WhatsApp */
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-indigo);
    border: 2px solid var(--emerald-accent);
    border-radius: 50%;
    cursor: pointer;
    display: none; /* Se oculta por defecto */
    z-index: 1001; /* ◄ Subimos de 999 a 1001 */
    padding: 8px;
    transition: transform 0.3s ease;
}

/* Estilos para el Checkbox de Privacidad en el Formulario */
.privacy-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    padding: 0 2px;
}

.privacy-group input[type="checkbox"] {
    margin-top: 4px;
    accent-color: var(--emerald-accent);
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.privacy-label {
    font-size: 0.85rem !important;
    color: var(--text-muted) !important;
    font-weight: normal !important;
    line-height: 1.4;
}

.privacy-label a, .footer-brand a {
    color: var(--emerald-accent);
    text-decoration: none;
    border-bottom: 1px dashed var(--emerald-accent);
    transition: color 0.3s;
}

.privacy-label a:hover, .footer-brand a:hover {
    color: var(--text-light);
    border-bottom-style: solid;
}

/* Estilos de la Ventana Emergente (Modal) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    display: none; /* Oculto por defecto */
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
}

/* Clase activa para mostrar el modal */
.modal-overlay.is-active {
    display: flex;
}

.modal-container {
    background: #111625;
    border: 1px solid rgba(16, 185, 129, 0.2);
    width: 100%;
    max-width: 650px;
    border-radius: 16px;
    padding: 30px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: modalFade 0.3s ease-out;
}

@keyframes modalFade {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

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

.modal-content h2 {
    color: var(--emerald-accent);
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.modal-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.modal-text-scroll {
    max-height: 350px;
    overflow-y: auto;
    padding-right: 15px;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    text-align: justify;
}

/* Personalización del scroll del aviso */
.modal-text-scroll::-webkit-scrollbar {
    width: 6px;
}
.modal-text-scroll::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.02);
    border-radius: 4px;
}
.modal-text-scroll::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.3);
    border-radius: 4px;
}
.modal-text-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--emerald-accent);
}