:root {
    --primary-color: #00d4ff; 
    --bg-dark: #0f172a;      
    --bg-card: #1e293b;      
    --text-light: #f8fafc;
    --text-dim: #94a3b8;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background: radial-gradient(circle at top right, #1e293b, #0f172a);
    color: var(--text-light);
    line-height: 1.6;
    scroll-behavior: smooth;
    min-height: 100vh;
    overflow-x: hidden; /* Evita scroll horizontal molesto en celular */
}

/* --- Navegación --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 10%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px); /* Efecto vidrio esmerilado */
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

.logo img {
    height: 45px;
    width: auto;
    transition: var(--transition);
}

.logo img:hover {
    transform: scale(1.05);
}

nav ul { 
    display: flex; 
    list-style: none; 
    gap: 25px;
}

nav ul li a { 
    text-decoration: none; 
    color: var(--text-light); 
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition); 
}

nav ul li a:hover { 
    color: var(--primary-color); 
}

/* --- Hero Section --- */
.hero {
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 10%;
    /* Imagen de fondo con overlay oscuro */
    background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.8)), 
                url('https://images.unsplash.com/photo-1555066931-4365d14bab8c?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Esto hace un efecto de scroll muy pro */
}

.hero h1 { 
    font-size: clamp(2rem, 5vw, 3.5rem); /* Tamaño fluido según pantalla */
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero h1 span { color: var(--primary-color); }

.hero p { 
    color: var(--text-dim); 
    margin-bottom: 2.5rem; 
    max-width: 700px; 
    font-size: clamp(1rem, 2vw, 1.25rem); 
}

/* --- Botones --- */
.btn-primary {
    background: var(--primary-color);
    color: #0f172a; 
    padding: 14px 32px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
}

.btn-primary:hover { 
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 212, 255, 0.4);
}

/* --- Secciones y Grillas --- */
.section { padding: 6rem 10%; }

.section h2 { 
    margin-bottom: 3rem; 
    font-size: 2.2rem; 
    border-left: 5px solid var(--primary-color); 
    padding-left: 20px; 
}

.bg-alt { background-color: rgba(30, 41, 59, 0.5); }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* --- Tarjetas (Cards) --- */
.card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 4px solid var(--primary-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.card:hover { 
    transform: translateY(-10px);
    background: #243147;
}

.card h3 { color: var(--primary-color); }

/* --- Skill Cards --- */
.skill-card {
    text-align: center;
    padding: 2.5rem;
    background: var(--bg-card);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.skill-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.skill-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* --- Formulario --- */
.contact-form {
    max-width: 600px;
    margin: 2rem auto 0; /* Centrado */
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form input, .contact-form textarea {
    padding: 16px;
    border-radius: 8px;
    border: 2px solid transparent;
    background: #1e293b;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.contact-form input:focus, .contact-form textarea:focus {
    border-color: var(--primary-color);
    background: #243147;
}

/* --- Footer --- */
footer { 
    text-align: center; 
    padding: 4rem 10%; 
    color: var(--text-dim); 
    font-size: 0.9rem; 
    border-top: 1px solid rgba(255, 255, 255, 0.05); 
}

/* --- RESPONSIVE OPTIMIZADO --- */

@media (max-width: 768px) {
    /* Achicamos el espacio general */
    .section { padding: 3rem 6%; }
    
    /* Hero más compacto para que se vea el contenido rápido */
    .hero { 
        min-height: 70vh; 
        padding: 0 5%;
    }
    .hero h1 { font-size: 1.8rem; }
    .hero p { font-size: 1rem; margin-bottom: 1.5rem; }

    /* Menú Móvil */
    .menu-toggle {
        display: block;
        font-size: 1.5rem;
        color: var(--primary-color);
        cursor: pointer;
    }

    .nav-list {
        display: none; /* Se oculta por defecto */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-dark);
        padding: 20px;
        border-bottom: 2px solid var(--primary-color);
        gap: 15px;
        text-align: center;
    }

    .nav-list.active {
        display: flex; /* Se muestra al hacer clic */
    }

    /* Tarjetas más pequeñas para celular */
    .grid { gap: 15px; }
    .card { padding: 1.5rem; }
    .section h2 { font-size: 1.5rem; margin-bottom: 1.5rem; }
}

/* Ocultar botón de menú en PC */
@media (min-width: 769px) {
    .menu-toggle { display: none; }
}

.soluciones-bg {
    background: linear-gradient(rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.9)), 
                url('https://images.unsplash.com/photo-1555949963-ff9fe0c870eb?auto=format&fit=crop&w=1920&q=80') !important;
    background-size: cover !important;
    background-attachment: fixed !important;
}

.tech-bg {
    background: linear-gradient(rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.92)), 
                url('https://images.unsplash.com/photo-1555066931-4365d14bab8c?auto=format&fit=crop&w=1920&q=80') !important;
    background-size: cover !important;
    background-attachment: fixed !important;
}

/* Contenedor específico para que entren 4 en línea */
.grid-habilidades {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columnas iguales */
    gap: 15px;
    margin-top: 2rem;
}

/* Tarjetas más compactas */
.skill-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem 1rem; /* Reducimos el relleno */
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(0, 212, 255, 0.1);
    transition: transform 0.3s ease;
}

.skill-card i {
    font-size: 1.8rem; /* Icono un poco más chico */
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.skill-card h3 {
    font-size: 1.1rem; /* Título más balanceado */
    margin-bottom: 0.5rem;
}

.skill-card p {
    font-size: 0.85rem; /* Texto más pequeño para que no ocupe tanto */
    line-height: 1.4;
    color: var(--text-dim);
}

/* Ajuste para tablets y celulares */
@media (max-width: 992px) {
    .grid-habilidades {
        grid-template-columns: repeat(2, 1fr); /* 2 y 2 en tablets */
    }
}

@media (max-width: 480px) {
    .grid-habilidades {
        grid-template-columns: 1fr; /* 1 sola columna en celus muy chicos si prefieres, o mantené 2 */
    }
    .skill-card {
        padding: 1rem;
    }
}

.main-footer {
    padding: 3.5rem 0 2.5rem;
    background: rgba(10, 15, 30, 0.95); /* Un poco más oscuro para cerrar la web */
    border-top: 1px solid rgba(0, 212, 255, 0.08);
    color: #fff;
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
}

.footer-logo img {
    height: 35px; /* Un pelín más grande para que se note */
    width: auto;
    /* Quitamos el filtro que lo hacía blanco y le damos visibilidad */
    opacity: 0.7; /* Se ve el color original, pero un poco suave */
    transition: all 0.3s ease;
    display: block; /* Asegura buen centrado */
}

.footer-logo img:hover {
    opacity: 1; /* Al pasar el mouse se ve perfecto */
    transform: scale(1.05); /* Un pequeño aumento para dar interactividad */
}
.footer-info {
    text-align: center;
}

.footer-info p {
    font-size: 0.9rem;
    color: #cbd5e1;
    margin-bottom: 4px;
}

.footer-info strong {
    color: var(--primary-color);
    font-weight: 600;
}

.footer-tagline {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: #64748b;
    display: block;
}

.footer-social {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.footer-social a {
    color: #64748b;
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}