/* ======================================
   NOSOTROS - ROMPECABEZAS (MODERNO)
====================================== */

/* --------------------
   GLOBAL
-------------------- */
#nosotros-rompecabezas {
    font-family: 'Poppins', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f5f1f1; /* gris muy claro */
    padding: 80px 0; /* opcional, para separar del contenido */
    /* ESTO ES LO QUE FALTABA */
    scroll-margin-top: var(--header-height);
}

.nr-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --------------------
   TÍTULO
-------------------- */
.nr-title {
    text-align: center;
    margin-bottom: 60px;
}

.nr-title h2 {
    font-size: 44px; /* Más grande que antes */
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #111827;
}
/* --------------------
   SUBTÍTULO MODERNO RESPONSIVO FIJO
-------------------- */
.section-subtitle {
    text-align: left; /* Cambia a center si quieres centrado */
    margin-bottom: 60px;
    position: relative;
}

.section-subtitle h2 {
    font-size: clamp(150%, 4vw, 250%);; /* Ajustable según pantalla */
    font-weight: 800;
    color: #173E68;
    letter-spacing: 1px;
    margin-bottom: 15px;
    line-height: 1.2;
    position: relative;
    display: inline-block; /* Para alinear la línea con el inicio */
}

.section-subtitle h2::after {
    content: '';
    position: absolute;
    left: 0;                
    bottom: -10px;          
    height: 4px;            
    width: 50vw; /* Siempre llega a la mitad de la pantalla */
    background-color: #2E5C88; 
    border-radius: 2px;
}

.section-subtitle p {
    font-size: clamp(14px, 2vw, 18px); /* Texto responsivo */
    color: #173E68;
    margin-top: 10px;
}


/* --------------------
   GRID PRINCIPAL
-------------------- */
.nr-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

/* --------------------
   TEXTO
-------------------- */
.nr-text h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #111827;
}

.nr-text p {
    font-size: 17px;
    line-height: 1.8;
    color: #4b5563; /* Gris profesional */
    margin-bottom: 35px;
}

.nr-btn {
    display: inline-block;
    background: #2E5C88; /* Azul moderno */
    color: #ffffff;
    padding: 14px 36px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

.nr-btn:hover {
    background: #C9DEEC;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.4);
}

/* --------------------
   ROMPECABEZAS
-------------------- */

/* Puzzle completo */
.nr-puzzle {
    position: relative;
    width: 80%;       /* Tamaño responsive */
    max-width: 500px;
    aspect-ratio: 1/1;
    margin: 0 auto;
    transition: transform 0.35s ease; /* Animación de escala */
}

.nr-puzzle:hover {
    transform: scale(1.1); /* Escala el rompecabezas completo */
}

/* Pieza base */
.nr-piece {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    border-radius: 16px;
    padding: 10px;
    transition: all 0.35s ease; /* Incluye tamaño y sombra */
}

/* Título de cada pieza */
.nr-piece span {
    display: block;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

/* Descripción oculta */
.nr-piece .description {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.35s ease;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.95);
    margin-top: 10px;
    line-height: 1.4;
}

.nr-piece:hover .description {
    opacity: 1;
    max-height: 200px;
}

/* --------------------
   CUADRANTES / COLORES
-------------------- */

/* Primer cuadrante: AI */
.nr-piece.ai {
    top: 0;
    left: 0;
    width: 50%;
    height: 50%;
    background: #173E68;
    color: #ffffff;
}

/* Segundo cuadrante: Analytics */
.nr-piece.analytics {
    top: 0;
    right: 0;
    width: 50%;
    height: 50%;
    background: #9FC0D9;
    color: #ffffff;
}

/* Tercer cuadrante: Big Data */
.nr-piece.bigdata {
    bottom: 0;
    left: 0;
    width: 50%;
    height: 50%;
    background: #C9DEEC;
    color: #ffffff;
}

/* Cuarto cuadrante: Automation */
.nr-piece.automation {
    bottom: 0;
    right: 0;
    width: 50%;
    height: 50%;
    background: #2E5C88;
    color: #ffffff;
}

/* Hover de la pieza (solo sombra y destaque) */
.nr-piece:hover {
    box-shadow: 0 25px 45px rgba(0,0,0,0.25);
    transform: none; /* La escala la da el puzzle completo */
}

/* --------------------
   RESPONSIVE
-------------------- */
@media (max-width: 991px) {
    .nr-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .nr-puzzle {
        margin-top: 50px;
    }
}

@media (max-width: 480px) {
    .nr-puzzle {
        width: 280px;
        height: 280px;
    }

    .nr-piece {
        font-size: 13px;
    }

    .nr-piece:hover {
        transform: scale(1.1); /* Escala menor en móvil */
    }
}
