/* ==========================================================================
   1. RESETEO Y CONFIGURACIONES ESENCIALES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-y: auto !important;
    overflow-x: hidden;
    height: auto !important;
    min-height: 100%;
}

a {
    transition: color 0.3s ease, opacity 0.3s ease;
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.2);
}

a:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 4px;
}

html {
    scroll-behavior: smooth;
    background-color: #000000;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #ffffff;
    -webkit-font-smoothing: antialiased;
}

/* Custom scrollbar (Navegadores WebKit: Chrome, Edge, Safari, Opera) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #000000;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    border: 2.5px solid #000000;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #3b82f6, #8b5cf6);
}

/* Soporte para Firefox */
html {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) #000000;
}

#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3.5px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ef4444, #eab308, #22c55e);
    width: 0%;
    z-index: 1100;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.7), 0 0 15px rgba(139, 92, 246, 0.5);
    border-radius: 0 2px 2px 0;
}

.bg-black { 
    background-color: #000000; 
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center;
    color: #ffffff; 
}
.bg-white { 
    background-color: #fcfcfc; 
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.025) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center;
    color: #0a0a0a; 
}

/* ==========================================================================
   2. REGLAS TIPOGRÁFICAS (SISTEMA DE 3 COMPONENTES)
   ========================================================================== */
.main-title, .section-title, .section-title-center {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.04em;
    line-height: 0.95;
}

.tagline, .section-label, .card-tag, .navbar .logo, .navbar .nav-links a {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 4px;
    text-transform: uppercase;
}

p {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.bg-white p {
    color: rgba(10, 10, 10, 0.7);
}

.bg-black p {
    color: rgba(255, 255, 255, 0.7);
}

p strong, p b {
    font-weight: 700;
}

.bg-white p strong, .bg-white p b {
    color: #0a0a0a;
}

.bg-black p strong, .bg-black p b {
    color: #ffffff;
}

.lead-paragraph {
    font-size: 1.4rem;
    line-height: 1.5;
    font-weight: 500;
    margin-bottom: 2.5rem;
    opacity: 0.95;
}

/* ==========================================================================
   3. NAVEGACIÓN
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.8rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background-color: rgba(20, 20, 20, 0.75); 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #ffffff; 
    transition: background-color 0.4s, border-color 0.4s;
}

.navbar .logo {
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.navbar .nav-links a {
    color: #ffffff; 
    text-decoration: none;
    margin-left: 2rem;
    opacity: 0.5;
    transition: opacity 0.3s, color 0.3s;
}

.navbar .nav-links a:hover {
    opacity: 1;
    color: #3b82f6;
}

/* ==========================================================================
   4. ACTIVACIONES DE COLOR (SCROLL SPY)
   ========================================================================== */
.navbar .nav-links a.active {
    opacity: 1;
    font-weight: 800;
}

.navbar .nav-links a.active[href="#que-es"],
.navbar .nav-links a.active[href="index.html#que-es"] { color: #22c55e; }

.navbar .nav-links a.active[href="#como-se-juega"],
.navbar .nav-links a.active[href="index.html#como-se-juega"] { color: #eab308; }

.navbar .nav-links a.active[href="#pix"],
.navbar .nav-links a.active[href="index.html#pix"] { color: #3b82f6; }

.navbar .nav-links a.active[href="#fundamento"],
.navbar .nav-links a.active[href="index.html#fundamento"] { color: #3b82f6; }

.navbar .nav-links a.active[href="newpage.html"] { color: #3b82f6; }

/* ==========================================================================
   5. PORTADA / HERO
   ========================================================================== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5%;
    background-color: #000000;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    width: 100%;
    max-width: 1200px;
    position: relative;
    z-index: 10;
    pointer-events: none;
}

.main-title {
    font-size: clamp(3.5rem, 9vw, 8.5rem);
    letter-spacing: -0.02em;
}

/* ==========================================================================
   6. ESTRUCTURA DE SECCIONES
   ========================================================================== */
.section {
    padding: 8rem 10%;
    position: relative;
    width: 100%;
    scroll-margin-top: 130px;
}

#que-es {
    padding-top: 17rem;
    padding-bottom: 24rem;
    scroll-margin-top: 20px;
}

#como-se-juega {
    padding-top: 10rem;
    padding-bottom: 18rem;
    scroll-margin-top: 10px;
}

#como-ganar {
    padding-top: 8rem;
    padding-bottom: 24rem;
}

#como-ganar .title-column {
    margin-top: 4.5rem;
}

@media (max-width: 992px) {
    #como-ganar .title-column {
        margin-top: 0;
    }
}

.container {
    max-width: 1300px;
    margin: 0 auto;
}

.rounded-section {
    border-top-left-radius: 40px;
    border-top-right-radius: 40px;
    margin-top: -40px;
    z-index: 5;
}

.grid-layout {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8%;
}

.title-column {
    flex: 1 1 35%;
}

.content-column {
    flex: 1 1 55%;
}

.section-label {
    margin-bottom: 1.5rem;
    opacity: 0.4;
    display: block;
}

.section-title {
    font-size: clamp(2.5rem, 4.5vw, 4rem);
    margin-bottom: 2.2rem;
}

/* ==========================================================================
   7. COMPONENTES INTERNOS DE CONTENIDO
   ========================================================================== */
.card-tag {
    display: block;
    font-size: 0.65rem;
    opacity: 0.4;
    margin-bottom: 1rem;
}

.feature-card-dark {
    background-color: #0a0a0a;
    color: #ffffff;
    padding: 3.5rem;
    margin-top: 4rem;
    border-radius: 24px;
}

.feature-card-dark h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.feature-card-dark p {
    margin-bottom: 0;
    opacity: 0.6;
}

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

.section-title-center {
    font-size: clamp(2.5rem, 4.5vw, 4rem);
    margin-bottom: 1.5rem;
}

.subtitle-center {
    font-size: 1.1rem;
    opacity: 0.5;
}

.cards-stream {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stream-card {
    background-color: #0d0d0d;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 3rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 4rem;
    transition: background 0.4s ease, border-color 0.4s, transform 0.4s;
}

.stream-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Efecto de brillo radial interno por tarjeta en hover */
#card-roulette:hover {
    background: radial-gradient(circle at center, rgba(34, 197, 94, 0.08) 0%, #0d0d0d 75%);
    border-color: rgba(34, 197, 94, 0.3);
}

#card-cards:hover {
    background: radial-gradient(circle at center, rgba(234, 179, 8, 0.08) 0%, #0d0d0d 75%);
    border-color: rgba(234, 179, 8, 0.3);
}

#card-pawn:hover {
    background: radial-gradient(circle at center, rgba(239, 68, 68, 0.08) 0%, #0d0d0d 75%);
    border-color: rgba(239, 68, 68, 0.3);
}

#card-block:hover {
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.08) 0%, #0d0d0d 75%);
    border-color: rgba(59, 130, 246, 0.3);
}

#card-grid-win:hover {
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.08) 0%, #0d0d0d 75%);
    border-color: rgba(255, 255, 255, 0.25);
}

.card-interactive {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.roulette-wrapper {
    position: relative;
    width: 110px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.roulette-pointer {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 12px solid #ffffff;
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

#cards-canvas, #pawn-canvas, #block-canvas, #grid-win-canvas {
    display: block;
    width: 120px;
    height: 120px;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-width: 250px;
}

.card-number {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 2rem;
    opacity: 0.2;
    transition: all 0.4s ease;
}

/* Iluminación de los números al hacer hover */
#card-roulette:hover .card-number {
    opacity: 1;
    color: #22c55e;
}

#card-cards:hover .card-number {
    opacity: 1;
    color: #eab308;
}

#card-pawn:hover .card-number {
    opacity: 1;
    color: #ef4444;
}

#card-block:hover .card-number {
    opacity: 1;
    color: #3b82f6;
}

#card-grid-win:hover .card-number {
    opacity: 1;
    color: #ffffff;
}

.stream-card h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

.stream-card p {
    margin-bottom: 0;
    flex-grow: 1;
}

/* Carrusel de Fotos */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: 580px;
    margin: 0 auto;
    overflow: visible;
}

#como-ganar .content-column {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.carousel-track-wrapper {
    overflow: hidden;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 24px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.carousel-track {
    position: relative;
    height: 100%;
    width: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f7f7f8;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    z-index: 1;
    transition: opacity 1.2s ease-in-out, visibility 1.2s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
    transition: opacity 1.2s ease-in-out;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
    display: block;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(10, 10, 10, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s, transform 0.3s, opacity 0.3s;
    user-select: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.carousel-btn:hover {
    background: rgba(10, 10, 10, 0.95);
    transform: translateY(-50%) scale(1.06);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.96);
}

.btn-prev {
    left: -22px;
}

.btn-next {
    right: -22px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 1.5rem;
}

.carousel-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: background-color 0.3s, width 0.3s, border-radius 0.3s;
}

.carousel-dot.active {
    background-color: #0a0a0a;
    width: 20px;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .carousel-btn {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    .btn-prev {
        left: 8px;
    }
    .btn-next {
        right: 8px;
    }
    .carousel-slide {
        padding: 16px;
    }
}

#pix {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 8rem;
    padding-bottom: 11rem;
    padding-left: 5%;
    padding-right: 5%;
    scroll-margin-top: 10px;
}

#fundamento {
    scroll-margin-top: 20px;
}

#pix .container {
    width: 100%;
}

.pix-centered-layout {
    max-width: 1400px !important;
    margin: 0 auto;
    text-align: center;
}

#pix .section-title {
    text-align: left;
}

.pix-iframe-wrapper {
    width: 100%;
    margin-top: 3.5rem;
}

#pix iframe {
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background-color: rgba(255, 255, 255, 0.015);
    display: block;
    width: 100%;
    height: 928px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.35);
}

/* ==========================================================================
   8. SECCIÓN FUNDAMENTO
   ========================================================================== */
.split-evolution {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8%;
}

.evolution-info {
    flex: 1 1 50%;
}

.evolution-container-visual {
    flex: 1 1 40%;
}

#fundamento .section-title {
    margin-bottom: 3.8rem;
}

.render-acrilicos-wrapper {
    width: 100%;
    height: 480px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 28px;
    position: relative;
    overflow: hidden;
    cursor: grab;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    max-width: 440px;
    margin: 0 auto;
}

.fundamento-action {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 5rem;
}

.btn-experimental {
    display: inline-block;
    padding: 14px 32px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    color: #ffffff;
    background-color: #000000;
    border: 1px solid #000000;
    border-radius: 30px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Efecto de destello de luz (Shine) al hacer hover */
.btn-experimental::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.35) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
}

.btn-experimental:hover::after {
    left: 150%;
    transition: left 0.75s cubic-bezier(0.25, 1, 0.5, 1);
}

.btn-experimental:hover {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
}

.btn-experimental:active {
    transform: translateY(0);
}

.render-acrilicos-wrapper:active {
    cursor: grabbing;
}

.render-acrilicos-wrapper canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* ==========================================================================
   9. COMPONENTES EXTRA PÁGINA EXPERIMENTAL
   ========================================================================== */
.experimental-code-box {
    background-color: #0f1115;
    color: #a9b1d6;
    padding: 2.5rem;
    margin-top: 4rem;
    border-radius: 20px;
    font-family: 'Courier New', Courier, monospace;
    border-left: 4px solid #ef4444;
    text-align: left;
}

.experimental-code-box pre {
    margin-top: 1rem;
    white-space: pre-wrap;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ==========================================================================
   10. FOOTER
   ========================================================================== */
.site-footer {
    background-color: #000000;
    padding: 6rem 10% 4rem 10%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.footer-container {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.footer-meta {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.5;
    margin-bottom: 0;
}

.footer-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 4rem;
    flex-wrap: wrap;
    width: 100%;
}

.footer-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    flex: 1 1 65%;
}

.footer-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-label {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.3;
}

.footer-item a, .footer-val {
    font-size: 0.95rem;
    color: #ffffff;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s, color 0.3s;
}

.footer-item a:hover,
.footer-item a:active,
.footer-item a:focus {
    opacity: 1;
    color: #3b82f6;
}

.footer-logos {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    flex-shrink: 0;
    margin-top: 0.4rem;
}

.footer-logo {
    height: 44px;
    width: auto;
    object-fit: contain;
    opacity: 0.45;
    transition: opacity 0.3s, filter 0.3s;
    filter: brightness(0) invert(1);
}

.footer-logo:hover {
    opacity: 1;
    filter: none;
}

@media (max-width: 992px) {
    .footer-bottom-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 3rem;
    }
    .footer-logos {
        margin-top: 0;
        justify-content: flex-start;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        padding-top: 2rem;
        width: 100%;
        gap: 2rem;
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.3s cubic-bezier(0.16, 1, 0.3, 1), transform 1.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   11. INTERACCIÓN DE GRILLA EN EL HERO
   ========================================================================== */
#grid-interaction-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    grid-template-rows: repeat(auto-fill, minmax(50px, 1fr));
    pointer-events: none;
    z-index: 1;
}

.grid-pixel {
    border: 1px solid rgba(255, 255, 255, 0.015);
    transition: background-color 0.8s cubic-bezier(0.1, 0.8, 0.25, 1);
    pointer-events: auto;
}

.grid-pixel.flash-verde { background-color: #94ec94 !important; transition: background-color 0s; }
.grid-pixel.flash-amarillo { background-color: #fcf464 !important; transition: background-color 0s; }
.grid-pixel.flash-azul { background-color: #4c6cf4 !important; transition: background-color 0s; }
.grid-pixel.flash-rojo { background-color: #e4646c !important; transition: background-color 0s; }

.render-caja-wrapper {
    width: 100%;
    height: 480px;
    background-color: #0c0c0e;
    border-radius: 20px;
    margin-top: 2.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: grab;
}

#que-es .render-caja-wrapper {
    margin-top: 0;
}
.render-caja-wrapper:active {
    cursor: grabbing;
}
.render-caja-wrapper canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

@media (max-width: 992px) {
    .grid-layout, .split-evolution { flex-direction: column; gap: 4rem; }
    .title-column, .content-column, .evolution-info, .evolution-container-visual { flex: 1 1 100%; }
    .stream-card { flex-direction: column; gap: 1.5rem; padding: 2rem; align-items: stretch; }
    .card-meta { min-width: auto; }
    .card-interactive { align-self: center; margin-top: 1rem; }
    .section { padding: 7rem 6%; }
    .main-title { font-size: 3.5rem; }
}

/* Grilla Interactiva para Secciones con Fondo Blanco */
.white-grid-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.bg-white .container {
    position: relative;
    z-index: 2;
}

/* ==========================================================================
   12. TRANSICIÓN SUTIL DE PÁGINA (FADE & BLUR)
   ========================================================================== */
body {
    opacity: 1;
    transition: opacity 0.5s ease-out, filter 0.5s ease-out;
}
body.page-fade-in {
    opacity: 0;
    filter: blur(8px);
    transition: none !important;
}
body.page-fade-out {
    opacity: 0;
    filter: blur(8px);
    transition: opacity 0.4s ease-in-out, filter 0.4s ease-in-out;
}

/* ==========================================================================
   13. SECCIÓN HERRAMIENTAS USADAS (INTEGRADA EN FUNDAMENTO)
   ========================================================================== */
#fundamento {
    padding-bottom: 12rem;
}

.herramientas-container {
    text-align: center;
    max-width: 1200px;
    margin: 8rem auto 0 auto;
}

.herramientas-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: clamp(1.4rem, 2.5vw, 1.8rem); /* Título más pequeño */
    color: #000000; /* Negro */
    text-transform: uppercase; /* Mayúsculas predominantes */
    letter-spacing: -0.02em;
    margin-bottom: 4rem;
}

.herramientas-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 3.5rem;
}

.herramienta-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Tooltip premium y personalizado */
.herramienta-item::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -32px;
    background-color: rgba(20, 20, 20, 0.95);
    color: #ffffff;
    padding: 0.35rem 0.75rem;
    font-family: 'Plus Jakarta Sans', sans-serif; /* Tipografía predominante de cuerpo */
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(5px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.herramienta-item:hover::after {
    opacity: 1;
    transform: translateY(0);
}

.herramienta-logo {
    height: 60px; /* Tamaño responsivo de los logos */
    width: auto;
    object-fit: contain;
    filter: grayscale(10%) opacity(0.85);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.herramienta-item:hover {
    transform: translateY(-5px);
}

.herramienta-item:hover .herramienta-logo {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.08);
}