/* LAI Hub - Estilos Corporativos Industriales */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Arial, sans-serif; background-color: #f8fafc; color: #1e293b; line-height: 1.6; }
.container { max-width: 1200px; margin: 0 auto; padding: 50px 20px; }

/* Tipografía y Encabezados */
h1 { font-size: 2.8rem; color: #0f172a; margin-bottom: 15px; text-align: center; font-weight: 800; }
h2 { font-size: 2rem; color: #1e293b; margin-bottom: 25px; text-align: center; }
p.subtitle { text-align: center; color: #64748b; font-size: 1.2rem; max-width: 700px; margin: 0 auto 50px auto; }

/* Sección Hero (Bienvenida impactante) */
.hero { background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); color: white; padding: 80px 20px; text-align: center; border-bottom: 4px solid #38bdf8; }
.hero h1 { color: #ffffff; font-size: 3.2rem; }
.hero p { color: #94a3b8; font-size: 1.25rem; max-width: 800px; margin: 20px auto; }
.hero-btn { display: inline-block; background-color: #38bdf8; color: #0f172a; padding: 12px 30px; font-weight: bold; text-decoration: none; border-radius: 6px; margin-top: 15px; transition: background 0.2s; }
.hero-btn:hover { background-color: #7dd3fc; }

/* Grid de Ingeniería (4 columnas fijas en escritorio) */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 20px; }

/* Tarjetas de Soluciones (Cards) */
.card { background: white; padding: 25px; border-radius: 12px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); border: 1px solid #e2e8f0; transition: transform 0.2s, box-shadow 0.2s; }
.card:hover { transform: translateY(-5px); box-shadow: 0 12px 20px -3px rgba(0,0,0,0.08); border-color: #38bdf8; }
.card .tag { display: inline-block; background: #e0f2fe; color: #0369a1; font-size: 0.75rem; font-weight: bold; padding: 4px 8px; border-radius: 4px; margin-bottom: 15px; text-transform: uppercase; }
.card h3 { font-size: 1.25rem; color: #0f172a; margin-bottom: 15px; }
.card p { color: #475569; font-size: 0.9rem; text-align: justify; }

/* Formularios de Ingeniería */
.form-box { background: white; max-width: 650px; margin: 0 auto; padding: 40px; border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); border: 1px solid #e2e8f0; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; color: #334155; }
.form-group input, .form-group textarea { width: 100%; padding: 12px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 1rem; font-family: inherit; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: #38bdf8; box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2); }
.btn-submit { background-color: #0f172a; color: white; border: none; padding: 14px 24px; font-size: 1rem; border-radius: 6px; cursor: pointer; width: 100%; font-weight: bold; transition: background 0.2s; border-bottom: 3px solid #38bdf8; }
.btn-submit:hover { background-color: #1e293b; }

/* ==========================================================================
   OPTIMIZACIÓN PARA DISPOSITIVOS MÓVILES (Celulares y Tablets)
   ========================================================================== */
@media (max-width: 1024px) {
    /* En tablets o pantallas intermedias pasa a 2x2 para que no se altere el texto */
    .grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (max-width: 768px) {
    /* Ajustar contenedores y sangrías generales */
    .container { padding: 25px 15px; }

    /* Reducir tamaño de títulos para que no se corten en el móvil */
    h1 { font-size: 1.9rem; }
    .hero h1 { font-size: 2.1rem; }
    h2 { font-size: 1.6rem; }
    p.subtitle { font-size: 1rem; margin-bottom: 30px; }

    /* Forzar a que las tarjetas se apilen en una sola columna limpia en móviles */
    .grid { grid-template-columns: 1fr; gap: 20px; }

    /* Optimizar el espacio interno de las tarjetas */
    .card { padding: 20px; }
    .card p { text-align: left; font-size: 0.9rem; }

    /* Ajustar los formularios para que los campos sean cómodos de tocar */
    .form-box { padding: 20px; }
}

/* ==========================================================================
   SISTEMA DE PESTAÑAS INDUSTRIALES (CREATIVO Y OPTIMIZADO)
   ========================================================================== */
.success-section {
    background-color: #0f172a;
    color: white;
    padding: 60px 20px;
    border-bottom: 4px solid #38bdf8;
}
.success-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}
.success-section h2 { color: #38bdf8; margin-bottom: 10px; font-weight: 800; }
.success-intro { color: #94a3b8; font-size: 1rem; margin-bottom: 35px; }

/* Ocultar los radio buttons nativos */
.tabs-wrapper input[type="radio"] { display: none; }

/* Barra de Navegación de Pestañas */
.tabs-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 1px solid #334155;
    padding-bottom: 15px;
}
.tab-btn {
    background: #1e293b;
    color: #94a3b8;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid #334155;
    transition: all 0.2s ease;
}
.tab-btn:hover { background: #334155; color: white; }

/* Paneles de Contenido */
.tabs-content {
    background: #1e293b;
    border-radius: 12px;
    border: 1px solid #334155;
    overflow: hidden;
    position: relative;
    min-height: 320px;
}
.tab-panel {
    display: none; /* Ocultos por defecto */
    padding: 30px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Lógica de activación puramente CSS */
#tab-logi:checked ~ .tabs-nav .btn-logi,
#tab-rpa:checked ~ .tabs-nav .btn-rpa,
#tab-3dfab:checked ~ .tabs-nav .btn-3dfab,
#tab-media:checked ~ .tabs-nav .btn-media {
    background: #38bdf8;
    color: #0f172a;
    border-color: #38bdf8;
}

#tab-logi:checked ~ .tabs-content .panel-logi,
#tab-rpa:checked ~ .tabs-content .panel-rpa,
#tab-3dfab:checked ~ .tabs-content .panel-3dfab,
#tab-media:checked ~ .tabs-content .panel-media {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Estructura interna del panel activo (Imagen izquierda, Texto derecha) */
.panel-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 35px;
    align-items: center;
    text-align: left;
}
.panel-img-box { width: 100%; border-radius: 8px; overflow: hidden; border: 1px solid #334155; }
.panel-img { width: 100%; height: 260px; object-fit: cover; display: block; }
.panel-text h3 { font-size: 1.5rem; color: #ffffff; margin-bottom: 15px; border-left: 4px solid #38bdf8; padding-left: 10px; }
.panel-text p { color: #94a3b8; font-size: 0.98rem; line-height: 1.6; }

/* ==========================================================================
   OPTIMIZACIÓN MÓVIL SÚPER COMPACTA
   ========================================================================== */
@media (max-width: 768px) {
    /* Hacer que los botones fluyan horizontalmente con scroll si no caben */
    .tabs-nav {
        justify-content: flex-start;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }
    .tab-btn { padding: 8px 15px; font-size: 0.85rem; }
    
    .tabs-content { min-height: auto; }
    .tab-panel { padding: 15px; }
    
    /* En móviles la imagen pasa arriba de forma compacta */
    .panel-grid { grid-template-columns: 1fr; gap: 15px; }
    .panel-img { height: 160px; }
    .panel-text h3 { font-size: 1.2rem; margin-bottom: 8px; }
    .panel-text p { font-size: 0.88rem; }
}
