﻿/* CORREGIDO: Añadidas variables CSS para facilitar el mantenimiento del tema */
:root {
    --bg-primary: #0d1117;
    --bg-secondary: #0f141b;
    --bg-card: #161b22;
    --border-color: #1f2937;
    --text-primary: #ffffff;
    --text-secondary: #c9d1d9;
    --text-muted: #6b7280;
    --accent-color: #4ea1ff;
    --accent-hover: #1f8bff;
}

/* GENERAL */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-secondary);
    scroll-behavior: smooth;
}

h1, h2, h3 {
    color: var(--text-primary);
}

/* NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--bg-secondary);
    /* CORREGIDO: padding más adaptable en móviles */
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    box-sizing: border-box; /* Asegura que el padding no desborde el ancho */
}

.logo {
    font-size: 22px;
    color: var(--accent-color);
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: 0.2s;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.btn-login {
    background: var(--accent-color);
    padding: 8px 16px;
    border-radius: 6px;
    color: #fff !important;
}

.menu-toggle {
    display: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--accent-color);
}

/* HERO */
.hero {
    padding: 160px 20px 120px;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-primary) 0%, #11161f 100%);
}

.hero p {
    max-width: 700px;
    margin: 20px auto 40px;
    color: var(--text-secondary);
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    padding: 14px 28px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 18px;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

/* SECCIONES */
.features, .modules, .security {
    padding: 80px 5%; /* CORREGIDO: usar porcentaje para mejor adaptación */
    max-width: 1100px;
    margin: auto;
}

.features h2, .modules h2, .security h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
}

/* GRID */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.card {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: 0.2s;
    text-align: center;
}

.card:hover {
    border-color: var(--accent-color);
}

.icon {
    font-size: 40px;
    color: var(--accent-color);
    margin-bottom: 15px;
}

/* CTA */
.cta {
    text-align: center;
    padding: 80px 20px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

/* FOOTER */
footer {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 14px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

/* ANIMACIONES INICIALES */
.fade-in, .slide-up {
    opacity: 0;
    transform: translateY(20px);
}

.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .nav-links {
        position: absolute;
        top: 100%; /* Ahora se posiciona justo debajo del header */
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        width: 220px;
        padding: 20px;
        border-left: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
        display: none;
        /* CORREGIDO: Asegura que el menú no quede oculto detrás de elementos */
        box-shadow: -2px 4px 10px rgba(0,0,0,0.3);
    }

    .nav-links.open {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }
}
/* ===== SECCIÓN DE CONTACTO MEJORADA ===== */
.contact-section {
    padding: 80px 5%;
    max-width: 1200px;
    margin: auto;
    background: var(--bg-primary);
}

.contact-section h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.contact-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 50px;
    font-size: 18px;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

/* FORMULARIO */
.contact-form-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 30px;
}

.contact-form-container h3 {
    margin-bottom: 25px;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(78, 161, 255, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input {
    width: auto;
    margin-right: 10px;
}

.checkbox-group label {
    margin-bottom: 0;
}

.btn-submit {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    justify-content: center;
}

.btn-submit:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* MENSAJES DEL FORMULARIO */
.form-message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 6px;
    display: none;
}

.form-message.success {
    display: block;
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid #28a745;
    color: #28a745;
}

.form-message.error {
    display: block;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid #dc3545;
    color: #dc3545;
}

/* INFORMACIÓN DE CONTACTO */
.contact-info-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 30px;
}

.info-card h3 {
    margin-bottom: 25px;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-item {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item i {
    font-size: 24px;
    color: var(--accent-color);
    min-width: 30px;
}

.info-item h4 {
    margin: 0 0 5px 0;
    color: var(--text-primary);
}

.info-item p,
.info-item a {
    margin: 0;
    color: var(--text-secondary);
    text-decoration: none;
    line-height: 1.5;
}

.info-item a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* TARJETA DE WHATSAPP */
.whatsapp-card {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 10px;
    padding: 30px;
    color: white;
    text-align: center;
}

.whatsapp-card h3 {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: white;
}

.whatsapp-card p {
    margin-bottom: 20px;
    opacity: 0.9;
}

.btn-whatsapp {
    background: white;
    color: #25D366;
    padding: 14px 28px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    background: #f8f9fa;
}

.whatsapp-note {
    margin-top: 15px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* WHATSAPP FLOTANTE */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 999;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.4);
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 25px;
    }
}

@media (max-width: 480px) {
    .contact-section {
        padding: 60px 20px;
    }
    
    .info-item {
        flex-direction: column;
        gap: 5px;
    }
    
    .btn-whatsapp {
        width: 100%;
        justify-content: center;
    }
}