/* --- Variables de Color y Tipografía --- */
:root {
    --bg-dark: #050a14;
    --bg-secondary: #0a1325;
    --card-bg: #111a33;
    --primary-blue: #0066ff;
    --accent-cyan: #00d4ff;
    --text-light: #e0e6ed;
    --text-muted: #a0a8b8;
    --font-main: 'Montserrat', sans-serif;
    --header-height: 70px;
}

/* --- Configuración General (Mobile First) --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

.section-pad {
    padding: 60px 5%;
}

/* Ajuste de padding para secciones en diferentes dispositivos */
@media (min-width: 768px) {
    .section-pad {
        padding: 80px 8%;
    }
}

@media (min-width: 1200px) {
    .section-pad {
        padding: 100px 10%;
    }
}

h1, h2, h3, h4 {
    font-weight: 700;
    color: white;
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- Header y Navegación Responsive --- */
header {
    background: rgba(5, 10, 20, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
    transition: all 0.3s ease;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

header.scrolled {
    padding: 0.5rem 5%;
    background: rgba(5, 10, 20, 0.98);
    border-bottom: 1px solid var(--primary-blue);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1001;
}

.logo i { color: var(--accent-cyan); }
.logo span { color: var(--primary-blue); }

/* Menú Hamburguesa */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--text-light);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Navegación Desktop */
.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-links a {
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: 0.3s;
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-cyan);
    transition: 0.3s;
}

.nav-links a:hover { color: var(--accent-cyan); }
.nav-links a:hover::after { width: 100%; }

/* Botones */
.btn-cta-nav, .btn-primary, .btn-secondary, .btn-submit {
    padding: 5px 5px;
    border-radius: 4px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    border: none;
    outline: none;
    min-height: 34px; /* Tamaño mínimo para touch */
}

.btn-cta-nav {
    background: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 3px 6px;
    font-size: 0.8rem;
}

.btn-cta-nav:hover {
    background: var(--primary-blue);
    color: white;
    box-shadow: 0 0 5px rgba(0, 102, 255, 0.5);
}

.btn-primary, .btn-submit {
    background: linear-gradient(45deg, var(--primary-blue), var(--accent-cyan));
    color: white;
}

.glow-effect:hover {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.6);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--text-light);
    color: var(--text-light);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

/* --- Hero Section Responsive --- */
.hero {
    min-height: 100vh;
    background: url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?auto=format&fit=crop&q=80&w=2072') no-repeat center center/cover;
    position: relative;
    display: flex;
    align-items: center;
    padding: calc(var(--header-height) + 40px) 5% 40px;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to right, rgba(5,10,20,0.95) 30%, rgba(5,10,20,0.6));
    background-image: 
        linear-gradient(to right, rgba(5,10,20,0.95) 30%, rgba(5,10,20,0.6)),
        linear-gradient(rgba(0, 212, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.1) 1px, transparent 1px);
    background-size: cover, 30px 30px, 30px 30px;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 100%;
    text-align: center;
}

.hero-content h1 {
    font-size: 2.2rem;
    line-height: 1.2;
    margin-bottom: 1.2rem;
    background: linear-gradient(to right, white, var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

/* --- Servicios Responsive --- */
.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 { 
    font-size: 1.8rem; 
    margin-bottom: 10px; 
}

.section-title p { 
    color: var(--text-muted); 
    font-size: 1rem; 
    max-width: 600px;
    margin: 0 auto;
}

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

.service-card {
    background: var(--card-bg);
    padding: 30px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-cyan));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.service-card:hover::before { transform: scaleX(1); }

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    border-color: rgba(0, 212, 255, 0.3);
}

.icon-box {
    font-size: 2.5rem;
    color: var(--accent-cyan);
    margin-bottom: 20px;
    background: rgba(0, 212, 255, 0.1);
    width: 70px; height: 70px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
}

.service-card h3 { 
    font-size: 1.3rem; 
    margin-bottom: 12px; 
}

.service-card p { 
    color: var(--text-muted); 
    font-size: 0.9rem; 
    line-height: 1.5;
}

/* --- Sección Nosotros Responsive --- */
.about-section {
    background: var(--bg-secondary);
}

.about-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.about-image {
    width: 100%;
    position: relative;
    order: 2;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    position: relative;
    z-index: 2;
    filter: grayscale(30%) contrast(1.1);
    border: 2px solid rgba(0, 212, 255, 0.2);
}

.image-deco {
    display: none; /* Ocultamos en móviles por simplicidad */
}

.about-text {
    order: 1;
}

.about-text h4 { 
    color: var(--accent-cyan); 
    margin-bottom: 10px; 
    font-size: 1rem;
}

.about-text h2 { 
    font-size: 1.8rem; 
    margin-bottom: 20px; 
    line-height: 1.3; 
}

.about-text p { 
    color: var(--text-muted); 
    margin-bottom: 25px; 
    line-height: 1.6;
}

.tech-list { 
    list-style: none; 
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.tech-list li {
    margin-bottom: 10px; 
    font-weight: 600; 
    display: flex; 
    align-items: center; 
    gap: 10px;
    font-size: 0.9rem;
}

.tech-list li i { 
    color: var(--accent-cyan); 
    font-size: 1rem;
}

/* --- Contacto Responsive --- */
.contact-wrapper {
    display: flex;
    flex-direction: column;
    gap: 40px;
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.contact-info { 
    width: 100%; 
}

.contact-info h2 { 
    margin-bottom: 15px; 
    font-size: 1.8rem;
}

.contact-info p { 
    color: var(--text-muted); 
    margin-bottom: 30px; 
    line-height: 1.6;
}

.info-item {
    display: flex; 
    align-items: flex-start; 
    gap: 15px; 
    margin-bottom: 20px;
}

.info-item i {
    font-size: 1.2rem; 
    color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.1);
    padding: 10px; 
    border-radius: 50%;
    flex-shrink: 0;
}

.info-item p { 
    margin-bottom: 0; 
    color: var(--text-light); 
    line-height: 1.5;
}

.cyber-form {
    width: 100%;
    background: rgba(0,0,0,0.2);
    padding: 25px;
    border-radius: 12px;
}

.cyber-form h3 { 
    margin-bottom: 25px; 
    font-size: 1.5rem;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group input, .input-group textarea {
    width: 100%;
    padding: 14px;
    background: var(--bg-dark);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 5px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
    font-family: var(--font-main);
}

.input-group textarea { 
    resize: vertical; 
    min-height: 120px; 
    max-height: 200px;
}

.input-group label {
    position: absolute;
    top: 14px; 
    left: 14px;
    color: var(--text-muted);
    pointer-events: none;
    transition: 0.3s;
    background: var(--bg-dark); 
    padding: 0 5px;
    font-size: 0.95rem;
}

.input-group input:focus,
.input-group input:not(:placeholder-shown),
.input-group textarea:focus,
.input-group textarea:not(:placeholder-shown) {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
}

.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label,
.input-group textarea:focus ~ label,
.input-group textarea:not(:placeholder-shown) ~ label {
    top: -10px;
    font-size: 0.8rem;
    color: var(--accent-cyan);
    font-weight: 700;
}

.btn-submit { 
    width: 100%; 
    justify-content: center; 
    font-size: 1rem; 
}

/* --- Footer --- */
footer {
    background: #020408;
    text-align: center;
    padding: 2rem 5%;
    margin-top: 50px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-logo {
    font-size: 1.2rem; 
    font-weight: 700; 
    margin-bottom: 10px;
}

.footer-logo span { 
    color: var(--accent-cyan); 
}

footer p { 
    color: var(--text-muted); 
    font-size: 0.9rem; 
    line-height: 1.5;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Media Queries Responsive --- */

/* Tablet (768px y más) */
@media (min-width: 768px) {
    .hero-content h1 {
        font-size: 2.8rem;
        text-align: left;
    }
    
    .hero-content p {
        font-size: 1.1rem;
        text-align: left;
    }
    
    .hero-content {
        text-align: left;
        max-width: 600px;
    }
    
    .hero-buttons {
        flex-direction: row;
        justify-content: flex-start;
    }
    
    .section-title h2 {
        font-size: 2.2rem;
    }
    
    .about-container {
        flex-direction: row;
        align-items: center;
        gap: 50px;
    }
    
    .about-image {
        order: 1;
        flex: 1;
    }
    
    .about-text {
        order: 2;
        flex: 1;
    }
    
    .contact-wrapper {
        flex-direction: row;
        gap: 50px;
        padding: 40px;
    }
    
    .contact-info {
        flex: 1;
    }
    
    .cyber-form {
        flex: 1.2;
    }
    
    .nav-links {
        gap: 20px;
    }
    
    .btn-cta-nav {
        display: inline-flex;
    }
}

/* Desktop (1024px y más) */
@media (min-width: 1024px) {
    .hero-content h1 {
        font-size: 3.2rem;
    }
    
    .section-pad {
        padding: 100px 10%;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 35px;
    }
    
    .service-card {
        padding: 40px 30px;
    }
    
    .about-text h2 {
        font-size: 2.2rem;
    }
    
    .image-deco {
        display: block;
        position: absolute;
        top: 20px; 
        left: 20px;
        width: 100%; 
        height: 100%;
        border: 3px solid var(--primary-blue);
        z-index: 1;
        border-radius: 10px;
    }
    
    .nav-links {
        gap: 30px;
    }
}

/* Desktop Grande (1200px y más) */
@media (min-width: 1200px) {
    .hero-content h1 {
        font-size: 3.5rem;
    }
    
    .hero-content {
        max-width: 700px;
    }
}

/* Menú Hamburguesa para móviles */
@media (max-width: 767px) {
    .menu-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: rgba(5, 10, 20, 0.98);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: flex-start;
        padding: 40px 5%;
        transform: translateX(-100%);
        transition: transform 0.4s ease;
        gap: 25px;
        z-index: 999;
    }
    
    .nav-links.active {
        transform: translateX(0);
    }
    
    .nav-links a {
        font-size: 1.1rem;
        padding: 10px 0;
        width: 100%;
        text-align: center;
    }
    
    .btn-cta-nav {
        margin-top: 20px;
        width: 100%;
        justify-content: center;
    }
    
    /* Asegurar que el contenido no se desborde en móviles */
    .hero-content h1 {
        word-wrap: break-word;
    }
    
    .hero-buttons .btn-primary,
    .hero-buttons .btn-secondary {
        width: 100%;
        max-width: 300px;
    }
}

/* Pantallas muy pequeñas (menos de 360px) */
@media (max-width: 360px) {
    .section-pad {
        padding: 50px 4%;
    }
    
    .hero {
        padding: calc(var(--header-height) + 30px) 4% 30px;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .service-card {
        padding: 25px 15px;
    }
    
    .contact-wrapper {
        padding: 20px;
    }
    
    .cyber-form {
        padding: 20px;
    }
}

/* Mejoras de accesibilidad y toques finales */
@media (hover: none) and (pointer: coarse) {
    .service-card:hover {
        transform: none;
    }
    
    .service-card:active {
        transform: translateY(-5px);
    }
    
    .btn-primary:active,
    .btn-secondary:active,
    .btn-cta-nav:active {
        transform: scale(0.98);
    }
}

/* Soporte para modo oscuro del sistema */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-dark: #050a14;
        --bg-secondary: #0a1325;
    }
}

/* Mejoras de impresión */
@media print {
    .hero {
        background: none !important;
        min-height: auto;
    }
    
    .hero-overlay {
        display: none;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-cta-nav,
    .btn-submit {
        border: 1px solid #000 !important;
        background: none !important;
        color: #000 !important;
    }
    
    .service-card {
        break-inside: avoid;
        border: 1px solid #ccc;
    }
}
/* Agrega esto al final de style.css */

/* Ocultar el botón "Cotizar" de la lista en escritorio */
.nav-links .btn-cta-nav-mobile {
    display: none;
}

/* En escritorio, ocultamos el botón que pusimos dentro de la lista */
@media (min-width: 768px) {
    .btn-cta-nav.desktop-only {
        display: inline-flex;
    }
}

/* En móvil: Ocultar el botón del header y mostrar el de la lista */
@media (max-width: 767px) {
    .btn-cta-nav.desktop-only {
        display: none;
    }

    .nav-links .btn-cta-nav-mobile {
        display: inline-block; /* O inline-flex */
        border: 2px solid var(--primary-blue);
        color: var(--primary-blue);
        padding: 10px 20px;
        margin-top: 15px;
        border-radius: 4px;
        text-align: center;
    }
    
    /* Aseguramos que el botón hamburguesa se vea */
    .menu-toggle {
        display: flex; /* Tu CSS original ya tenía esto, pero asegúrate */
    }
}
