/* =========================
   NUEVAS ESTRUCTURAS - NOSOTROS
   ========================= */

/* 1. N-Hero (Hero Centrado con Barra de Stats Flotante) */
.n-hero {
    position: relative;
    padding: 9rem 5% 8rem 5%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.n-hero__content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.n-hero__title {
    font-size: clamp(3rem, 6vw, 4.8rem);
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.n-hero__subtitle {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 4rem;
}

/* Barra flotante estilo "glass" para los Stats */
.n-hero__stats-bar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    padding: 1.5rem 4rem;
    backdrop-filter: blur(16px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), inset 0 0 20px rgba(153, 102, 221, 0.05);
}

.n-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.n-stat__number {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
    line-height: 1;
}

.n-stat__label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.n-stat__divider {
    width: 1px;
    height: 40px;
    background: var(--glass-border);
}

/* 2. Layout Editorial (Grid Asimétrico + Cita) */
.n-editorial {
    padding: 2rem 5% 4rem 5%;
    position: relative;
    z-index: 1;
}

.n-editorial__container {
    max-width: 1100px;
    margin: 0 auto;
}

.n-editorial__header {
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 2rem;
}

.n-editorial__title {
    font-size: clamp(2.5rem, 5vw, 3.8rem);
    font-weight: 800;
}

.n-editorial__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.n-editorial__col {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.n-editorial__col h3 {
    font-size: 1.8rem;
    color: var(--text-white);
    margin-bottom: 0.5rem;
}

.n-editorial__col p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Bloque de cita destacado que rompe visualmente */
.n-editorial__quote-box {
    background: linear-gradient(135deg, rgba(153, 102, 221, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-left: 4px solid var(--primary-color);
    padding: 3rem;
    border-radius: 0 1.5rem 1.5rem 0;
    position: relative;
}

.quote-icon {
    width: 40px;
    height: 40px;
    color: rgba(153, 102, 221, 0.3);
    margin-bottom: 1rem;
}

.n-editorial__quote-box blockquote {
    font-size: 1.5rem;
    line-height: 1.6;
    font-family: 'Poppins', sans-serif;
    color: var(--text-white);
    font-weight: 500;
    font-style: italic;
}


/* 4. Pilares Verticales (Ventajas) */
.n-advantages {
    position: relative;
    padding: 6rem 5%;
    overflow: hidden;
}

.n-advantages__container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.n-advantages__header {
    text-align: center;
    margin-bottom: 4rem;
}

.n-advantages__header h2 {
    font-size: clamp(2.5rem, 5vw, 3.8rem);
    font-weight: 800;
}

.n-advantages__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.n-advantages-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    backdrop-filter: blur(12px);
}

.n-advantages-card:hover {
    transition-delay: 0ms !important;
    transform: translateY(-0.8rem);
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.05);
}

.n-advantages-card__icon {
    width: 60px;
    height: 60px;
    background: rgba(153, 102, 221, 0.1);
    color: var(--primary-color);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.n-advantages-card__icon svg {
    width: 30px;
    height: 30px;
}

.n-advantages-card__title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-white);
}

.n-advantages-card__text {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}


/* =========================
   ANIMACIONES DE ENTRADA
   ========================= */

.reveal,
.reveal-left,
.reveal-right,
.reveal-pop,
.reveal-hero {
    opacity: 0;
    transition-property: opacity, transform;
    transition-duration: 750ms;
    transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.reveal-hero {
    transform: translate3d(0, 34px, 0) scale(0.985);
    filter: blur(10px);
    transition-property: opacity, transform, filter;
    transition-duration: 850ms;
    transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

.n-hero__content > * {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
    transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1), transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.n-hero__content.is-visible > * {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.n-hero__content.is-visible > :nth-child(1) {
    transition-delay: 90ms;
}

.n-hero__content.is-visible > :nth-child(2) {
    transition-delay: 190ms;
}

.n-hero__content.is-visible > :nth-child(3) {
    transition-delay: 300ms;
}

.reveal {
    transform: translate3d(0, 22px, 0);
}

.reveal-left {
    transform: translate3d(-28px, 0, 0);
}

.reveal-right {
    transform: translate3d(28px, 0, 0);
}

.reveal-pop {
    transform: translate3d(0, 16px, 0) scale(0.98);
}

.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

.reveal-hero.is-visible {
    filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-pop,
    .reveal-hero {
        opacity: 1;
        transform: none;
        filter: none;
        transition: none;
    }

    .n-hero__content > * {
        opacity: 1;
        transform: none;
        transition: none;
    }
}


/* =========================
   RESPONSIVE (Nuevos Layouts)
   ========================= */

@media (max-width: 1024px) {
    .n-hero__stats-bar {
        padding: 1.5rem 2rem;
        gap: 2rem;
    }
    
    .n-advantages__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
.reveal:not(.is-visible) {
        transform: translate3d(0, 14px, 0);
    }

    .reveal-hero:not(.is-visible) {
        transform: translate3d(0, 18px, 0) scale(0.995);
        filter: blur(6px);
    }

    .reveal-left:not(.is-visible) {
        transform: translate3d(-16px, 0, 0);
    }

    .reveal-right:not(.is-visible) {
        transform: translate3d(16px, 0, 0);
    }

    .reveal-pop:not(.is-visible) {
        transform: translate3d(0, 10px, 0) scale(0.99);
    }

    .n-hero__content > * {
        transform: translate3d(0, 12px, 0);
        transition-duration: 560ms;
    }

    .n-hero__content.is-visible > :nth-child(1) {
        transition-delay: 50ms;
    }

    .n-hero__content.is-visible > :nth-child(2) {
        transition-delay: 120ms;
    }

    .n-hero__content.is-visible > :nth-child(3) {
        transition-delay: 190ms;
    }

    .n-hero__stats-bar {
        flex-direction: column;
        border-radius: 2rem;
        padding: 2.5rem;
        gap: 1.5rem;
        width: 100%;
    }

    .n-stat__divider {
        width: 100px;
        height: 1px;
    }

    .n-editorial__grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .n-editorial__quote-box {
        border-left: none;
        border-top: 4px solid var(--primary-color);
        border-radius: 0 0 1.5rem 1.5rem;
    }

    .n-advantages__grid {
        grid-template-columns: 1fr;
    }
}

/* =========================
   NUEVA SECCIÓN: FILOSOFÍA (Bento Grid)
   ========================= */

.n-philosophy {
    position: relative;
    padding: 6rem 5%;
    overflow: hidden;
    z-index: 1;
}

/* Resplandor de fondo sutil para integrar con el diseño oscuro */
.n-philosophy::before {
    content: '';
    position: absolute;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(153, 102, 221, 0.04) 0%, transparent 60%);
    top: 50%;
    left: -20%;
    transform: translateY(-50%);
    z-index: -1;
    pointer-events: none;
}

.n-philosophy__container {
    max-width: 1200px;
    margin: 0 auto;
}

.n-philosophy__header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 750px;
    margin-inline: auto;
}

.n-philosophy__header h2 {
    font-size: clamp(2.5rem, 5vw, 3.8rem);
    font-weight: 800;
    margin-bottom: 1.2rem;
}

.n-philosophy__header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Grid Bento asimétrico */
.n-philosophy__bento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(240px, auto);
    gap: 1.5rem;
}

.n-bento-item {
    --ph-icon-accent: #7fdab8;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}

.n-bento-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-text);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.n-bento-item:hover {
    transform: translateY(-0.5rem);
    border-color: rgba(153, 102, 221, 0.3);
    background: rgba(255, 255, 255, 0.04);
}

.n-bento-item:hover::after {
    opacity: 1;
}

.n-bento-item:nth-child(2) {
    --ph-icon-accent: #9966dd;
}

.n-bento-item:nth-child(3) {
    --ph-icon-accent: #5dc7ff;
}

/* Control de tamaños en el Grid Desktop */
.n-bento-item--tall {
    grid-column: span 1;
    grid-row: span 2;
}

.n-bento-item--wide {
    grid-column: span 2;
    grid-row: span 1;
    flex-direction: row; /* Coloca ícono y texto lado a lado en las anchas */
    align-items: center;
}

.n-bento-item__icon {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    background: rgba(8, 12, 22, 0.55);
    color: var(--ph-icon-accent);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
    isolation: isolate;
    transition: transform 0.28s ease, border-color 0.28s ease;
}

.n-bento-item__icon::before {
    content: '';
    position: absolute;
    width: 130%;
    height: 130%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(153, 102, 221, 0.28) 0%, transparent 68%);
    opacity: 0.6;
    z-index: -2;
    animation: phGlowPulse 4.8s ease-in-out infinite;
}

.n-bento-item__icon::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 1.2rem;
    border: 1px dashed rgba(255, 255, 255, 0.26);
    z-index: -1;
    animation: phOrbitSpin 9s linear infinite;
}

.n-bento-item__icon svg {
    width: 32px;
    height: 32px;
    animation: phIconFloat 3.6s ease-in-out infinite;
}

.n-bento-item:nth-child(2) .n-bento-item__icon::before {
    background: radial-gradient(circle, rgba(153, 102, 221, 0.28) 0%, transparent 68%);
}

.n-bento-item:nth-child(3) .n-bento-item__icon::before {
    background: radial-gradient(circle, rgba(93, 199, 255, 0.28) 0%, transparent 68%);
}

.n-bento-item:hover .n-bento-item__icon::after {
    border-color: rgba(255, 255, 255, 0.42);
}

.n-bento-item:hover .n-bento-item__icon {
    transform: scale(1.05);
}

@keyframes phIconFloat {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

@keyframes phOrbitSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes phGlowPulse {
    0%,
    100% {
        transform: scale(0.94);
        opacity: 0.45;
    }
    50% {
        transform: scale(1.06);
        opacity: 0.78;
    }
}

@media (prefers-reduced-motion: reduce) {
    .n-bento-item__icon::before,
    .n-bento-item__icon::after,
    .n-bento-item__icon svg {
        animation: none;
    }

    .n-bento-item:hover .n-bento-item__icon {
        transform: none;
    }
}

.n-bento-item__content h3 {
    font-size: 1.35rem;
    color: var(--text-white);
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.n-bento-item__content p {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* =========================
   RESPONSIVE BENTO GRID
   ========================= */

@media (max-width: 1024px) {
    .n-philosophy__bento {
        grid-template-columns: repeat(2, 1fr);
    }

    .n-bento-item--tall {
        grid-column: span 2;
        grid-row: span 1;
        flex-direction: row;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .n-philosophy__bento {
        grid-template-columns: 1fr;
    }

    .n-bento-item--tall, 
    .n-bento-item--wide {
        grid-column: span 1;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .n-bento-item {
        padding: 2rem;
    }
}