/* ==========================================
   1. ESTILOS GLOBALES Y CONFIGURACIÓN
   ========================================== */
body, html {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #333333;
    background-color: #ffffff;
    scroll-behavior: smooth;
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ==========================================
   2. CABECERA Y LOGO ANIMADO (FLEXBOX)
   ========================================== */
.navbar {
    background-color: #111827;
    color: #ffffff;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid #2563eb;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Permite saltar de línea en móviles viejos */
}

/* Contenedor del Logo de Dos Capas (Pivote 2D perfecto) */
.logo-composite {
    position: relative;
    width: 220px;  
    height: 60px;
    display: flex;
    align-items: center;
}

/* Cubierta frontal del logo (Neon + Letras) */
.logo-base {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 2; /* Pasa al frente */
    pointer-events: none;
}

/* Piñón trasero (Giro concéntrico sin balanceo) */
.logo-gear {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 1; /* Se mete detrás */
    transform-origin: 50% 50%; /* Centro absoluto */
    animation: spin-perfect 12s linear infinite; 
}

@keyframes spin-perfect {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Menú de navegación */
.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.nav-links li {
    margin-left: 25px;
}

.nav-links a {
    color: #d1d5db;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover { color: #ffffff; }

.btn-nav {
    background-color: #2563eb;
    color: #ffffff !important;
    padding: 8px 16px;
    border-radius: 4px;
}
.btn-nav:hover { background-color: #1d4ed8; }

/* ==========================================
   3. SECCIÓN HERO (PRESENTACIÓN)
   ========================================== */
.hero-section {
    background-color: #1f2937;
    background-image: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    color: #ffffff;
    padding: 100px 0;
    text-align: center;
}

.hero-content { 
    max-width: 800px; 
    margin: 0 auto;
}

.hero-section h1 {
    font-size: 38px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-section p {
    font-size: 18px;
    color: #9ca3af;
    margin-bottom: 40px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary { background-color: #2563eb; color: #ffffff; }
.btn-primary:hover { background-color: #1d4ed8; }
.btn-secondary { border: 2px solid #4b5563; color: #ffffff; }
.btn-secondary:hover { background-color: #4b5563; }

/* ==========================================
   4. SECCIÓN SERVICIOS (FLEXBOX RESPONSIVE)
   ========================================== */
.services-section, .contact-section { padding: 80px 0; }
.services-section { background-color: #f9fafb; }

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px auto;
}

.section-header h2 { font-size: 30px; font-weight: 700; color: #111827; }
.section-header p { color: #6b7280; font-size: 16px; }

/* Flexbox para alinear tarjetas sin que se rompan */
.grid-services {
    display: flex;
    justify-content: space-between;
    gap: 25px;
}

.service-card {
    flex: 1; /* Distribuye el ancho equitativamente */
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.service-icon { font-size: 32px; margin-bottom: 15px; }
.service-card h3 { font-size: 18px; margin-bottom: 12px; color: #111827; }
.service-card p { font-size: 14px; color: #4b5563; line-height: 1.6; margin: 0; }

/* ==========================================
   5. PRESENCIA LOCAL Y CONTACTO
   ========================================== */
.location-section {
    background-color: #111827;
    color: #ffffff;
    padding: 80px 0;
    text-align: center;
}

.location-content { max-width: 750px; margin: 0 auto; }
.location-section h2 { font-size: 30px; margin-bottom: 20px; }
.location-section p { color: #9ca3af; font-size: 16px; line-height: 1.6; margin-bottom: 30px; }

.company-badge {
    display: inline-block;
    background-color: #1f2937;
    padding: 15px 30px;
    border-radius: 4px;
    border-left: 4px solid #3b82f6;
    font-size: 15px;
    letter-spacing: 0.5px;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: #374151; }
.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
}

.btn-submit {
    width: 100%;
    background-color: #111827;
    color: #ffffff;
    padding: 14px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
}
.btn-submit:hover { background-color: #1f2937; }

/* ==========================================
   6. PIE DE PÁGINA
   ========================================== */
.footer {
    background-color: #0b0f19;
    color: #9ca3af;
    padding: 40px 0;
    font-size: 13px;
    border-top: 1px solid #1f2937;
}

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

.address { font-family: monospace; color: #6b7280; margin-top: 5px; }

/* ==========================================
   7. ADAPTACIÓN PARA MÓVILES (MEDIA QUERIES)
   ========================================== */
@media (max-width: 768px) {
    /* Menú móvil centrado */
    .nav-container { 
        flex-direction: column; 
        gap: 15px;
        text-align: center; 
    }
    
    .nav-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-links li { 
        margin-left: 0; 
    }
    
    /* Hero adaptado */
    .hero-section h1 { font-size: 28px; }
    .hero-section p { font-size: 15px; }
    .hero-actions { flex-direction: column; gap: 10px; padding: 0 20px; }
    
    /* SOLUCIÓN AL DESCOJONADZO MÓVIL: Las tarjetas se apilan una debajo de otra */
    .grid-services { 
        flex-direction: column; 
        gap: 20px;
    }
    
    /* Secciones y formulario al 100% */
    .services-section, .contact-section { padding: 40px 0; }
    .contact-form { padding: 20px; }
    
    /* Footer en una columna */
    .footer-container { 
        flex-direction: column; 
        gap: 20px;
        text-align: center; 
    }
}
