/* =========================================
   1. ESTILOS GENERALES Y VARIABLES
   ========================================= */
:root {
    --neon-cyan: #00f3ff;
    --neon-blue: #0066ff;
    --dark-bg: #050a10;
    --panel-bg: rgba(13, 20, 30, 0.7);
    --text-main: #e0e6ed;
    --text-muted: #94a3b8;
    --glass-border: 1px solid rgba(0, 243, 255, 0.2);
}

body {
    font-family: 'Rajdhani', sans-serif;
    /* Fuente tecnológica limpia */
    margin: 0;
    padding: 0;
    /* Fondo oscuro con un degradado sutil radial */
    background: radial-gradient(circle at top, #0f1c2e 0%, #050a10 100%);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    align-items: center;
    overflow-x: hidden;
}

/* Efecto de rejilla futurista de fondo (Opcional pero recomendado) */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(rgba(0, 243, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
}

/* =========================================
   2. ENCABEZADO (HEADER)
   ========================================= */
header {
    width: 100%;
    background-color: rgba(5, 10, 16, 0.9);
    border-bottom: 1px solid rgba(0, 243, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.1);
    backdrop-filter: blur(10px);
    text-align: center;
    padding: 20px 0;
}

.logo-container {
    max-width: 250px;
    margin: 5px auto;
}

/* Invertimos el logo oscuro para que se vea blanco/brillante en fondo oscuro */
.logo-img,
.logo-small {
    filter: brightness(0) invert(1) drop-shadow(0 0 5px var(--neon-cyan));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.logo-small {
    height: 100px;
    width: auto;
    transform: scale(1.1);
    filter: brightness(0) invert(1) drop-shadow(0 0 20px var(--neon-cyan));
}

.logo-small:hover {
    transform: scale(1.1);
    filter: brightness(0) invert(1) drop-shadow(0 0 20px var(--neon-cyan));
}

h1 {
    font-family: 'Orbitron', sans-serif;
    /* Fuente Sci-Fi para títulos */
    color: var(--neon-cyan);
    font-size: 2.2rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
    text-align: center;
    margin-top: 30px;
}

.tagline {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    color: #fff;
    letter-spacing: 2px;
    margin-bottom: 15px;
    text-align: center;
}

.description {
    max-width: 700px;
    margin: 0 auto 10px auto;
    line-height: 1.6;
    color: var(--text-muted);
    font-size: 1.1rem;
    text-align: center;
    padding: 0 20px;
}

/* =========================================
   3. ZONA DE SERVICIOS (TARJETAS GLOW)
   ========================================= */
.services-container {
    margin-top: 60px;
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 50px 20px;
    flex-wrap: wrap;
    max-width: 1200px;
    width: 100%;
}

.service-card {
    background: var(--panel-bg);
    border: var(--glass-border);
    border-radius: 10px;
    padding: 40px 30px;
    width: 300px;
    transition: all 0.4s ease;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

/* Efecto Hover Futurista */
.service-card:hover {
    background: rgba(0, 243, 255, 0.05);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 25px rgba(0, 243, 255, 0.4);
    transform: translateY(-10px);
}

.service-title {
    font-family: 'Orbitron', sans-serif;
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 15px;
    display: block;
    text-transform: uppercase;
}

.service-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 30px;
    line-height: 1.5;
    display: block;
}

/* Botones Neón */
.cta-button,
button.submit-btn {
    background: transparent;
    color: var(--neon-cyan);
    padding: 12px 30px;
    border: 1px solid var(--neon-cyan);
    border-radius: 4px;
    /* Bordes más rectos */
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    font-size: 0.9rem;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.1);
    text-decoration: none;
    text-align: center;
}

.cta-button:hover,
button.submit-btn:hover {
    background-color: var(--neon-cyan);
    color: #000;
    box-shadow: 0 0 30px var(--neon-cyan);
    border-color: var(--neon-cyan);
}

/* =========================================
   4. FORMULARIOS (ESTILO HUD / INTERFAZ)
   ========================================= */
.container {
    max-width: 800px;
    padding: 40px 20px;
    width: 100%;
    box-sizing: border-box;
}

.subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.6;
    font-size: 1.1rem;
}

.contact-form {
    background: rgba(10, 15, 25, 0.8);
    backdrop-filter: blur(15px);
    padding: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    border-top: 3px solid var(--neon-cyan);
}

label {
    display: block;
    margin-bottom: 8px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: var(--neon-cyan);
    letter-spacing: 1px;
}

input,
textarea,
select {
    width: 100%;
    padding: 15px;
    margin-bottom: 25px;
    background-color: rgba(255, 255, 255, 0.05);
    /* Fondo semitransparente */
    border: 1px solid #333;
    border-radius: 4px;
    box-sizing: border-box;
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
    transition: 0.3s;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--neon-cyan);
    background-color: rgba(0, 243, 255, 0.05);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}

.info-badge {
    background-color: rgba(0, 243, 255, 0.1);
    color: var(--neon-cyan);
    border: 1px solid var(--neon-cyan);
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.back-link {
    margin-top: 30px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1rem;
    display: inline-block;
    transition: 0.3s;
}

.back-link:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
}

/* =========================================
   5. PORTFOLIO / RESULTADOS (CORREGIDO)
   ========================================= */
.project-block {
    background: var(--panel-bg);
    border-radius: 10px;
    padding: 40px;
    margin-bottom: 60px;
    border: var(--glass-border);
    position: relative;
    border-left: 5px solid var(--neon-cyan);
    overflow: hidden; /* Asegura que nada se salga de la tarjeta */
}

.project-header {
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
}

.project-header h2 {
    color: #fff;
    text-align: left;
    text-shadow: none;
    font-family: 'Orbitron', sans-serif;
    margin-top: 10px;
}

.client-tag {
    background-color: transparent;
    border: 1px solid var(--neon-blue);
    color: var(--neon-blue);
    padding: 5px 15px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.project-description {
    color: var(--text-muted);
    line-height: 1.6;
}

/* --- Galería Grid (Esto soluciona la imagen gigante) --- */
.project-gallery {
    display: grid;
    /* Crea columnas automáticas de mínimo 300px */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 20px;
    width: 100%;
}

.gallery-item {
    background: #000;
    border: 1px solid #333;
    transition: 0.3s;
    border-radius: 8px;
    overflow: hidden; /* Recorta la imagen si se pasa */
    position: relative;
}

.gallery-item:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
    transform: translateY(-5px);
}

.gallery-img {
    width: 100%;
    height: 250px; /* Altura fija para que todas sean iguales */
    object-fit: cover; /* Recorta la imagen para llenar el hueco sin deformar */
    object-position: top center; /* Muestra la parte de arriba de la web (el header) */
    display: block;
    cursor: zoom-in;
}

.gallery-caption {
    background: #0a0a0a;
    color: var(--neon-cyan);
    padding: 10px;
    text-align: center;
    font-size: 0.8rem;
    font-family: 'Orbitron', sans-serif;
    border-top: 1px solid #222;
    letter-spacing: 1px;
}

/* =========================================
   6. FOOTER (CORREGIDO - Alineación Horizontal)
   ========================================= */
footer {
    margin-top: 40px;
    width: 100%;
    background-color: #020406;
    border-top: 1px solid #111;
    color: var(--text-muted);
    padding: 30px 20px;
    text-align: center;
    /* Aseguramos que el footer no tape contenido */
    position: relative; 
    z-index: 10;
}

.footer-icons {
    /* ESTO ES LO QUE FALTABA: */
    display: flex;           /* Activa el modo flexible */
    justify-content: center; /* Los centra horizontalmente */
    align-items: center;     /* Los alinea verticalmente */
    gap: 30px;               /* Espacio entre cada elemento */
    flex-wrap: wrap;         /* Si la pantalla es muy pequeña (móvil), permite que bajen para no romperse */
    margin-bottom: 20px;     /* Espacio entre los iconos y el copyright */
}

.value-item {
    display: flex;
    align-items: center;
    gap: 8px; /* Espacio entre el emoji y el texto */
    font-size: 0.95rem;
    font-family: 'Rajdhani', sans-serif;
}

.value-item span {
    font-size: 1.2rem;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.5));
}

footer p {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.6;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
}

/* =========================================
   7. MODAL (LIGHTBOX) - CORREGIDO
   ========================================= */
.modal {
    display: none; /* Importante: Oculto por defecto */
    position: fixed; 
    z-index: 2000; /* Por encima de todo */
    padding-top: 50px; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    /* Fondo oscuro futurista con desenfoque */
    background-color: rgba(5, 10, 16, 0.95);
    backdrop-filter: blur(5px);
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 1000px;
    max-height: 85vh; /* Que no se salga de la pantalla verticalmente */
    object-fit: contain;
    
    /* Estilos Futuristas */
    border: 2px solid var(--neon-cyan);
    box-shadow: 0 0 50px rgba(0, 243, 255, 0.2);
    border-radius: 8px;
    
    /* Animación de entrada */
    animation-name: zoom;
    animation-duration: 0.3s;
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: var(--neon-cyan); /* Texto cián */
    padding: 20px 0;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
    font-size: 1.1rem;
    animation-name: zoom;
    animation-duration: 0.3s;
}

/* Animación Zoom */
@keyframes zoom {
    from {transform:scale(0.8); opacity: 0} 
    to {transform:scale(1); opacity: 1}
}

/* Botón de Cerrar (X) */
.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: var(--neon-cyan);
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
    text-shadow: 0 0 10px var(--neon-cyan);
    opacity: 0.8;
}

.close:hover,
.close:focus {
    color: #fff;
    text-shadow: 0 0 20px var(--neon-cyan);
    text-decoration: none;
    opacity: 1;
}