* { margin: 0; padding: 0; box-sizing: border-box; }

/* NAVEGACIÓN FLUIDA NATIVA */
html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #9c3d42 #F5BEBF;
}

/* === SCROLLBAR PERSONALIZADO (WEBKIT) === */
::-webkit-scrollbar { width: 14px; }
::-webkit-scrollbar-track { background: #F5BEBF; }
::-webkit-scrollbar-thumb { background-color: #9c3d42; border-radius: 10px; border: 3px solid #F5BEBF; }
::-webkit-scrollbar-thumb:hover { background-color: #9c3d42; }

body { 
    background-color: #ffffff; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    overflow-x: hidden;
    overflow-y: hidden;
}

body.scroll-allowed { overflow-y: auto; }

/* === PANTALLAS DE CARGA Y TRANSICIÓN === */
.intro-screen {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background-color: #9c3d42; z-index: 3000; 
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}
.intro-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.intro-hex {
    width: 80px; height: 80px; background-color: #ffffff; 
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    display: flex; justify-content: center; align-items: center;
    animation: spin-wheel 4s linear infinite; margin-bottom: 30px;
}
.intro-hole { width: 26px; height: 26px; background-color: #9c3d42; transform: rotate(45deg); }
@keyframes spin-wheel { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.intro-text { color: #ffffff; font-size: 1.1rem; text-align: center; margin-bottom: 40px; }
.intro-btn { padding: 12px 35px; border: 2px solid #ffffff; background: transparent; color: #ffffff; font-family: 'Space Grotesk', sans-serif; font-size: 1.2rem; cursor: pointer; transition: 0.3s; }
.intro-btn:hover { background-color: #ffffff; color: #9c3d42; box-shadow: 0 0 15px rgba(255, 255, 255, 0.5); }

/* === BARRA DE NAVEGACIÓN === */
.main-header {
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%;
    background-color: #ffffff;
    border-bottom: 2px solid #F5BEBF;
    z-index: 1000;
    padding: 0 40px;
    box-shadow: 0 4px 15px rgba(156, 61, 66, 0.1);
}

.nav-container {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    height: 70px; 
    max-width: 1400px; 
    margin: 0 auto;
}

.nav-brand { display: flex; align-items: center; gap: 15px; }

.nav-hex {
    width: 28px; height: 28px; background-color: #9c3d42;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    display: flex; justify-content: center; align-items: center;
    animation: spin-wheel 6s linear infinite;
}
.nav-hole { width: 10px; height: 10px; background-color: #ffffff; transform: rotate(45deg); }

.nav-brand-text { font-family: 'Space Grotesk', sans-serif; font-weight: 800; color: #9c3d42; font-size: 1.2rem; letter-spacing: 1px; }

.main-nav { display: flex; gap: 40px; }

.nav-link { font-family: 'Space Grotesk', sans-serif; color: #000000; font-size: 1.05rem; text-decoration: none; font-weight: 700; transition: color 0.3s, transform 0.3s; }
.nav-link:hover { transform: translateY(-2px); color: #A6DDE5; }

/* === BOTÓN DE SONIDO === */
.nav-controls { display: flex; align-items: center; }
.nav-controls .toggle-wrapper { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; color: #000000; font-size: 0.95rem; font-family: 'Space Grotesk', sans-serif; font-weight: 700; }
.nav-controls .toggle-switch { width: 44px; height: 24px; border-radius: 12px; background-color: #A6DDE5; border: 2px solid #A6DDE5; position: relative; transition: 0.3s; }
.nav-controls .toggle-knob { width: 16px; height: 16px; border-radius: 50%; background-color: #ffffff; position: absolute; top: 2px; left: 4px; transition: 0.3s; }
.nav-controls .toggle-wrapper.active .toggle-knob { left: 22px; background-color: #ffffff; }
.nav-controls .toggle-wrapper.active .toggle-switch { background-color: #F5BEBF; border-color: #F5BEBF; }

/* === BOTÓN VOLVER FLOTANTE === */
.section-indicator {
    position: fixed; top: 100px; right: 45px; left: auto;
    background-color: #9c3d42; border: 2px solid transparent; 
    padding: 8px 24px; border-radius: 12px; z-index: 2500;
    box-shadow: 0 8px 20px rgba(156, 61, 66, 0.4); opacity: 0; transform: translateY(-20px);
    transition: opacity 0.4s ease, transform 0.4s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer; display: flex; justify-content: center; align-items: center; pointer-events: none; 
}
.section-indicator.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.section-indicator:hover { background-color: #9c3d42; border-color: #A6DDE5; box-shadow: 0 10px 25px rgba(166, 221, 229, 0.5); transform: translateY(-2px); }

.indicator-text { font-family: 'Space Grotesk', sans-serif; font-weight: 800; color: #ffffff; font-size: 0.95rem; display: block; white-space: nowrap; }

/* === GRÚA DE DEMOLICIÓN === */
.crane-container {
    position: fixed; top: -45vh; left: 50%; margin-left: -90px; width: 180px; height: 110vh; 
    transform-origin: top center; transform: rotate(80deg); z-index: 999; pointer-events: none; opacity: 0; display: flex; flex-direction: column; align-items: center; will-change: transform; 
}
.crane-container.swing-in { animation: directHit 1.5s forwards; }
@keyframes directHit {
    0% { transform: rotate(80deg); opacity: 0; animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.33); }
    5% { opacity: 1; transform: rotate(80deg); animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.33); }
    60% { transform: rotate(20deg); animation-timing-function: cubic-bezier(0.1, 0.7, 0.1, 1); } 
    100% { transform: rotate(-70deg); opacity: 1; } 
}
.crane-chain { width: 6px; flex-grow: 1; flex-shrink: 0; background: repeating-linear-gradient(to bottom, #cfcbc0 0px, #cfcbc0 10px, transparent 10px, transparent 15px); border-left: 2px solid #827f77; border-right: 2px solid #827f77; border-radius: 4px; z-index: 2; }
.crane-ring { width: 24px; height: 24px; border: 4px solid #a3a199; border-radius: 50%; margin-top: -6px; margin-bottom: -6px; z-index: 3; flex-shrink: 0; }
.crane-ball { width: 180px; height: 180px; background: radial-gradient(circle at 35% 35%, #555, #1a0a0b 70%); border-radius: 50%; box-shadow: inset -10px -10px 25px rgba(0,0,0,0.8), 10px 10px 20px rgba(0,0,0,0.6); z-index: 4; flex-shrink: 0; }

/* === PATRÓN DE FONDO UNIFICADO === */
.bg-patterns-container { 
    position: absolute; 
    top: -20%; 
    left: -20%; 
    width: 140%; 
    height: 140%; 
    background-image: repeating-conic-gradient(#e58a8b 0% 25%, #e9b3b3 0% 50%);
    background-size: 120px 120px; 
    z-index: 1; 
    pointer-events: none; 
    animation: breathingPattern 15s infinite alternate ease-in-out; 
}
@keyframes breathingPattern { 0% { transform: scale(1) translate(0, 0); opacity: 0.7; } 50% { opacity: 0.8; } 100% { transform: scale(1.3) translate(2%, 2%); opacity: 0.5; } }

/* === LAYOUT HOME === */
.home-grid { display: flex; flex-direction: column; justify-content: center; align-items: center; width: 100vw; height: 100vh; position: relative; z-index: 5; overflow: hidden; }

.main-title-container { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding-bottom: 0; z-index: 5; margin-top: 5vh; }
.main-title { font-family: 'Space Grotesk', sans-serif; font-size: clamp(2rem, 9.5vw, 9.5rem); white-space: nowrap; font-weight: 800; letter-spacing: -3px; text-transform: uppercase; color: #ffffff; user-select: none; display: inline-block; cursor: pointer; animation: float-invite 4s ease-in-out infinite; }
@keyframes float-invite { 0%, 100% { transform: translateY(0) scale(1); filter: drop-shadow(0 0 0px rgba(255,255,255,0)); } 50% { transform: translateY(-15px) scale(1.02); filter: drop-shadow(0 15px 25px rgba(255,255,255,0.7)); } }
.main-title span { display: inline-block; }

.letter-blackened { color: #000000 !important; text-shadow: none !important; animation: violent-shake 0.08s infinite alternate !important; }
@keyframes violent-shake { 0% { transform: translate(-3px, -3px) rotate(-2deg); } 100% { transform: translate(3px, 3px) rotate(2deg); } }

.letter-shadowed { text-shadow: 0 0 15px rgba(255,255,255,0.8) !important; transition: text-shadow 0.2s; }
.letter-nudge { animation: circular-nudge 0.8s ease-in-out !important; }
@keyframes circular-nudge { 
    0% { transform: translate(0px, 0px) rotate(0deg); text-shadow: 0 0 0 rgba(255,255,255,0); } 
    20% { transform: translate(4px, -6px) rotate(6deg); text-shadow: 0 0 15px rgba(255,255,255,0.8); } 
    40% { transform: translate(8px, 0px) rotate(-4deg); text-shadow: 0 0 20px rgba(255,255,255,1); } 
    60% { transform: translate(4px, 6px) rotate(4deg); text-shadow: 0 0 15px rgba(255,255,255,0.8); } 
    80% { transform: translate(-4px, 2px) rotate(-6deg); text-shadow: 0 0 5px rgba(255,255,255,0.4); } 
    100% { transform: translate(0px, 0px) rotate(0deg); text-shadow: 0 0 0 rgba(255,255,255,0); } 
}

@keyframes explode-letter { 0% { transform: translate(0, 0) rotate(0deg) scale(1); animation-timing-function: ease-out; } 30% { transform: translate(var(--explode-x-mid), var(--explode-y-mid)) rotate(var(--explode-rot-mid)) scale(var(--explode-scale)); animation-timing-function: ease-in; } 100% { transform: translate(var(--explode-x-end), var(--explode-y-end)) rotate(var(--explode-rot-end)) scale(var(--explode-scale)); } }

.subtitle-container { color: #ffffff; font-family: 'Segoe UI', sans-serif; font-size: 1.1rem; margin-top: 10px; opacity: 0; visibility: hidden; transition: opacity 1s, transform 1s; transform: translateY(20px); }
.subtitle-visible { opacity: 1; visibility: visible; transform: translateY(0); }

/* === SECCIONES LANDING BLANCAS === */
.scrollable-screen { height: auto; overflow: visible; }
.new-section { background-color: #ffffff !important; display: flex; flex-direction: column; align-items: center; width: 100%; z-index: 10; padding-top: 50px; position: relative; }

.ref-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; flex-direction: column; gap: 80px; scroll-margin-top: 10vh; }
.ref-title { font-family: 'Space Grotesk', sans-serif; color: #9c3d42; font-size: clamp(2.5rem, 5vw, 4.5rem); line-height: 0.95; display: block; text-align: center; margin-bottom: 20px; opacity: 0; }
.ref-title.visible { animation: titleFallFromSky 0.85s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
@keyframes titleFallFromSky { 0% { transform: translateY(-100px); opacity: 0; } 60% { transform: translateY(25px); opacity: 1; } 100% { transform: translateY(0); opacity: 1; } }

.ref-block { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 25px; }
.ref-block h2 { font-family: 'Space Grotesk', sans-serif; color: #9c3d42; font-size: 2rem; letter-spacing: -1px; text-transform: none; } 
.ref-block p { font-size: 1.1rem; color: #000000; line-height: 1.6; max-width: 700px; } 

.responsive-board-img { max-height: 45vh; width: auto; max-width: 100%; display: block; margin: 0 auto; border-radius: 20px; }

/* === REGLAS LÍNEA DE TIEMPO Y CONTENEDORES ANCHOS === */
.interactive-rules-wrapper { display: flex; flex-direction: row; gap: 50px; width: 100%; margin: 20px auto; align-items: stretch; }
.rules-timeline { position: relative; width: 25%; display: flex; flex-direction: column; justify-content: space-between; padding: 20px 0; }
.timeline-line { position: absolute; left: 19px; top: 40px; bottom: 40px; width: 2px; background-color: #F5BEBF; z-index: 1; }
.timeline-btn { position: relative; z-index: 2; background: transparent; border: none; display: flex; align-items: center; gap: 20px; cursor: pointer; text-align: left; padding: 10px 0; }
.timeline-dot { width: 40px; height: 40px; border-radius: 50%; background-color: #ffffff; border: 2px solid #F5BEBF; display: flex; justify-content: center; align-items: center; font-family: 'Space Grotesk', sans-serif; font-weight: bold; font-size: 1.1rem; color: #000000; transition: all 0.3s ease; flex-shrink: 0; }
.timeline-dot:hover { border-color: #A6DDE5; color: #A6DDE5; }
.timeline-label { font-family: 'Space Grotesk', sans-serif; font-size: 1.3rem; font-weight: 700; color: #000000; transition: color 0.3s ease; }
.timeline-btn:hover .timeline-dot { border-color: #A6DDE5; color: #A6DDE5; }
.timeline-btn:hover .timeline-label { color: #9c3d42; }
.timeline-btn.active .timeline-dot { background-color: #9c3d42; border-color: #9c3d42; color: #ffffff; box-shadow: 0 0 15px rgba(156, 61, 66, 0.4); }
.timeline-btn.active .timeline-label { color: #9c3d42; }

.rules-display-card { width: 75%; background-color: #ffffff; border-radius: 20px; border: 2px solid #F5BEBF; box-shadow: 0 20px 40px rgba(156, 61, 66, 0.08); overflow: hidden; min-height: 420px; position: relative; }
.rule-panel { display: none; width: 100%; height: 100%; opacity: 0; transform: translateY(20px); transition: opacity 0.4s ease, transform 0.4s ease; }
.rule-panel.active { display: flex; flex-direction: row; opacity: 1; transform: translateY(0); animation: fadeUpPanel 0.5s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes fadeUpPanel { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.rule-visual-side { width: 45%; background-color: #f8f8f8; border-right: 2px solid #F5BEBF; display: flex; justify-content: center; align-items: center; padding: 0; }
.rule-text-side { width: 55%; padding: 50px 40px; display: flex; flex-direction: column; justify-content: center; text-align: left; }
.rule-step-subtitle { font-family: 'Space Grotesk', sans-serif; font-size: 0.95rem; color: #A6DDE5; font-weight: 800; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 12px; }
.rule-text-side h3 { font-family: 'Space Grotesk', sans-serif; color: #9c3d42; font-size: 2.2rem; line-height: 1.1; margin-bottom: 20px; text-transform: none; letter-spacing: -1px; }
.rule-text-side p { font-size: 1.1rem; color: #000000; line-height: 1.6; }

.rule-video { width: 100%; height: 100%; object-fit: cover; border-radius: 0; box-shadow: none; }

/* === FRANJA DE LA CITA === */
.quote-band { position: relative; width: 100%; background-color: #ffffff; border-top: 2px solid #F5BEBF; border-bottom: 2px solid #F5BEBF; padding: 50px 20px; margin-top: 20px; margin-bottom: 40px; display: flex; justify-content: center; align-items: center; overflow: hidden; }
.quote-band::before { content: '"'; position: absolute; font-family: 'Space Grotesk', sans-serif; font-size: 20rem; color: rgba(166, 221, 229, 0.4); top: -60px; left: 50%; transform: translateX(-50%); z-index: 1; line-height: 1; }
.quote-text { position: relative; z-index: 2; font-family: 'Space Grotesk', sans-serif; font-size: 1.8rem; font-weight: 700; color: #9c3d42; text-align: center; max-width: 800px; line-height: 1.4; font-style: normal; }
.falling-shapes-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; z-index: 0; pointer-events: none; }
.falling-shape { position: absolute; opacity: 0; top: -150px; animation: shapeFall 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards; }
@keyframes shapeFall {
    0% { top: -150px; opacity: 0; transform: rotate(0deg) scale(0.5); }
    50% { opacity: 0.35; }
    100% { top: var(--final-y); left: var(--final-x); transform: rotate(var(--final-rot)) scale(var(--final-scale)); opacity: 0.35; }
}
.shape-rect { border-radius: 6px; }
.shape-hex { clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%); }

/* === MECÁNICAS FÍSICAS === */
.mechanics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; width: 100%; max-width: 100%; margin-top: 30px; }
.mechanic-card { background-color: #ffffff; border: 2px solid #F5BEBF; padding: 30px 25px; border-radius: 12px; text-align: left; transition: transform 0.3s; }
.interactive-card { cursor: pointer; position: relative; overflow: hidden; }
.interactive-card::after { content: "▶"; position: absolute; bottom: 20px; right: 25px; font-size: 1.5rem; color: #9c3d42; opacity: 0; transition: opacity 0.3s, transform 0.3s; transform: translateY(10px) scale(0.8); }
.interactive-card:hover::after { opacity: 1; transform: translateY(0) scale(1); }
.mechanic-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(166, 221, 229, 0.3); border-color: #A6DDE5; }
.mechanic-card h3 { color: #9c3d42; font-family: 'Space Grotesk', sans-serif; font-size: 1.1rem; margin-bottom: 15px; word-wrap: break-word; overflow-wrap: break-word; hyphens: none; text-transform: none; }
.mechanic-card p { color: #000000; font-size: 1.05rem; line-height: 1.6; }

/* === REPRODUCTOR DE VIDEO EN LÍNEA === */
.inline-video-container { width: 100%; max-width: 900px; margin: 0 auto; max-height: 0; opacity: 0; overflow: hidden; background-color: #ffffff; border-radius: 16px; transition: max-height 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.5s ease, margin 0.5s ease; box-shadow: 0 20px 40px rgba(156, 61, 66, 0.15); border: 2px solid transparent; }
.inline-video-container.active { max-height: 800px; opacity: 1; margin-top: 40px; margin-bottom: 20px; }
.inline-video-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 25px; background-color: #ffffff; border-bottom: 2px solid #F5BEBF; }
.inline-video-title { color: #9c3d42; font-family: 'Space Grotesk', sans-serif; font-size: 1.1rem; font-weight: 700; transition: color 0.3s; }
.close-inline-video { background: transparent; border: none; color: #000000; font-size: 2rem; cursor: pointer; line-height: 1; transition: color 0.3s; }
.close-inline-video:hover { color: #9c3d42; }
.inline-video-wrapper { padding: 20px; display: flex; justify-content: space-between; align-items: center; gap: 20px; background-color: #ffffff; }
.video-nav-btn { background: transparent; border: none; color: #9c3d42; font-size: 2.5rem; cursor: pointer; transition: color 0.3s, transform 0.2s; padding: 10px; }
.video-nav-btn:hover { transform: scale(1.1); }
.video-nav-btn:active { transform: scale(0.9); }
.video-screen-frame { flex: 1; display: flex; justify-content: center; align-items: center; }
.video-screen-frame video { width: 100%; max-height: 500px; border-radius: 8px; outline: none; box-shadow: 0 10px 20px rgba(156, 61, 66, 0.15); }

/* === PIEZAS 3D CSS === */
.components-showcase { display: flex; justify-content: center; gap: 60px; margin-top: 30px; flex-wrap: wrap; }
.components-showcase.grid-layout { display: flex; flex-direction: column; gap: 40px; align-items: center; }
.components-group { display: flex; justify-content: center; gap: 60px; flex-wrap: wrap; width: 100%; max-width: 900px; }
.component-item { display: flex; flex-direction: column; align-items: center; gap: 15px; width: 220px; flex-shrink: 0; position: relative; }

.scene3d { width: 140px; height: 260px; perspective: 1000px; display: flex; justify-content: center; align-items: center; margin-bottom: 10px; user-select: none; cursor: pointer; transition: transform 0.3s ease; }
.scene3d:hover { transform: scale(1.1); }
.piece3d { position: relative; transform-style: preserve-3d; animation: spin3d 8s linear infinite; }
@keyframes spin3d { 0% { transform: rotateX(-20deg) rotateY(0deg); } 100% { transform: rotateX(-20deg) rotateY(360deg); } }
@keyframes spin-flat { 0% { transform: rotateX(-20deg) rotateY(0deg) rotateX(90deg); } 100% { transform: rotateX(-20deg) rotateY(360deg) rotateX(90deg); } }

.piece-std, .piece-spc { width: 60px; height: 180px; --piece-color: #A6DDE5; }
.piece-spc { height: 220px; } 
.face-std, .piece-spc .face-spc { position: absolute; width: 60px; height: 180px; background-color: var(--piece-color); border: 1px solid rgba(0,0,0,0.1); transition: background-color 0.3s; }
.piece-spc .face-spc { top: 40px; height: 180px; }
.face-std.front, .piece-spc .face-spc.front { transform: rotateY(0deg) translateZ(30px); filter: brightness(1); }
.face-std.back, .piece-spc .face-spc.back { transform: rotateY(180deg) translateZ(30px); filter: brightness(0.8); }
.face-std.left, .piece-spc .face-spc.left { transform: rotateY(-90deg) translateZ(30px); filter: brightness(0.9); }
.face-std.right, .piece-spc .face-spc.right { transform: rotateY(90deg) translateZ(30px); filter: brightness(0.75); }
.face-std.top { height: 60px; top: -30px; transform: rotateX(90deg) translateZ(0); filter: brightness(1.1); }
.piece-spc .face-spc.top { height: 60px; top: 10px; transform: rotateX(90deg) translateZ(0); filter: brightness(1.1); }
.face-std.bottom { height: 60px; top: calc(100% - 30px); transform: rotateX(-90deg) translateZ(0); filter: brightness(0.4); }
.piece-spc .face-spc.bottom { height: 60px; top: calc(100% - 30px); transform: rotateX(-90deg) translateZ(0); filter: brightness(0.4); }
.roof-face { position: absolute; width: 60px; height: 50px; top: -10px; background-color: var(--piece-color); clip-path: polygon(50% 0%, 0% 100%, 100% 100%); transform-origin: bottom center; transition: background-color 0.3s; }
.roof-front { transform: rotateY(0deg) translateZ(30px) rotateX(36.87deg); filter: brightness(1.2); }
.roof-right { transform: rotateY(90deg) translateZ(30px) rotateX(36.87deg); filter: brightness(1.1); }
.roof-back { transform: rotateY(180deg) translateZ(30px) rotateX(36.87deg); filter: brightness(0.9); }
.roof-left { transform: rotateY(-90deg) translateZ(30px) rotateX(36.87deg); filter: brightness(1); }

.piece-hex { width: 140px; height: 140px; animation: spin-flat 8s linear infinite; }
.piece-base { width: 120px; height: 120px; animation: spin-flat 8s linear infinite; }
.face-hex { position: absolute; width: 140px; height: 140px; clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%); background-color: #FEFBF2; background-image: repeating-conic-gradient(#F5BEBF 0% 25%, transparent 0% 50%); background-size: 40px 20px; }
.face-circle { position: absolute; width: 120px; height: 120px; border-radius: 50%; background-color: #FEFBF2; }
.hex-front, .circle-front { transform: translateZ(2px); filter: brightness(1); }
.hex-back, .circle-back { transform: rotateY(180deg) translateZ(2px); filter: brightness(0.8); }
.center-connector { position: absolute; width: 44px; height: 44px; top: 50%; left: 50%; margin-top: -22px; margin-left: -22px; transform-style: preserve-3d; }
.connector-front { transform: translateZ(6px); }
.connector-back { transform: rotateY(180deg) translateZ(6px); }
.connector-layer { position: absolute; width: 100%; height: 100%; background-color: #e5e3db; clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%); }
.w0 { transform: translateZ(0px); background-color: #f1ebd8; } 
.w1 { transform: translateZ(-1px); background-color: #d1cfc7; } 
.w2 { transform: translateZ(-2px); background-color: #d1cfc7; }
.w3 { transform: translateZ(-3px); background-color: #d1cfc7; }
.w4 { transform: translateZ(-4px); background-color: #d1cfc7; } 
.connector-hole { position: absolute; width: 16px; height: 16px; top: 50%; left: 50%; margin-top: -8px; margin-left: -8px; transform: rotate(45deg) translateZ(0.5px); box-shadow: inset 0 0 6px rgba(0,0,0,0.5); }
.hole-hex { background-color: #F5BEBF; } 
.hole-base { background-color: #FEFBF2; } 

.piece-pillar { width: 20px; height: 120px; --wood-color: #FAF8ED; --wood-grain: #E8D5B1; }
.face-pillar { position: absolute; width: 20px; height: 120px; background-color: var(--wood-color); border: 1px solid rgba(0,0,0,0.05); }
.face-grain { background-image: repeating-linear-gradient(to right, transparent 0% 12%, rgba(232, 213, 177, 0.4) 12% 14%, transparent 14% 30%, rgba(232, 213, 177, 0.4) 30% 32%); }
.face-pillar.front { transform: rotateY(0deg) translateZ(10px); filter: brightness(1); }
.face-pillar.back { transform: rotateY(180deg) translateZ(10px); filter: brightness(0.9); }
.face-pillar.left { transform: rotateY(-90deg) translateZ(10px); filter: brightness(0.95); }
.face-pillar.right { transform: rotateY(90deg) translateZ(10px); filter: brightness(0.85); }
.face-pillar.top { height: 20px; width: 20px; top: -10px; transform: rotateX(90deg) translateZ(0); filter: brightness(1.2); }
.face-pillar.bottom { height: 20px; width: 20px; top: calc(100% - 10px); transform: rotateX(-90deg) translateZ(0); filter: brightness(0.6); }

.cana-container { position: relative; width: 140px; height: 260px; margin-bottom: 10px; }
.piece-cana { width: 140px; height: 140px; position: relative; transform-style: preserve-3d; animation: spin3d 8s linear infinite; }
.piece-stick { position: absolute; transform-style: preserve-3d; --wood-color: #E8D5B1; }
.stick-base { width: 100px; height: 8px; top: 60px; left: 20px; }
.stick-ext { width: 100px; height: 6px; top: 61px; left: 40px; transform: translateZ(8px); }
.stick-ext.ext-opened { left: 90px; }
.face-stick { position: absolute; background-color: var(--wood-color); border: 1px solid rgba(0,0,0,0.05); }
.base-f.front { width: 100px; height: 8px; transform: rotateY(0deg) translateZ(4px); filter: brightness(1); }
.base-f.back { width: 100px; height: 8px; transform: rotateY(180deg) translateZ(4px); filter: brightness(0.8); }
.base-f.top { width: 100px; height: 8px; transform: rotateX(90deg) translateZ(4px); filter: brightness(1.1); }
.base-f.bottom { width: 100px; height: 8px; transform: rotateX(-90deg) translateZ(4px); filter: brightness(0.6); }
.base-f.left { width: 8px; height: 8px; left: -4px; transform: rotateY(-90deg) translateZ(4px); filter: brightness(0.9); }
.base-f.right { width: 8px; height: 8px; left: 96px; transform: rotateY(90deg) translateZ(4px); filter: brightness(0.85); }
.ext-f.front { width: 100px; height: 6px; transform: rotateY(0deg) translateZ(3px); filter: brightness(1); }
.ext-f.back { width: 100px; height: 6px; transform: rotateY(180deg) translateZ(3px); filter: brightness(0.8); }
.ext-f.top { width: 100px; height: 6px; transform: rotateX(90deg) translateZ(3px); filter: brightness(1.1); }
.ext-f.bottom { width: 100px; height: 6px; transform: rotateX(-90deg) translateZ(3px); filter: brightness(0.6); }
.ext-f.left { width: 6px; height: 6px; left: -3px; transform: rotateY(-90deg) translateZ(3px); filter: brightness(0.9); }
.ext-f.right { width: 6px; height: 6px; left: 97px; transform: rotateY(90deg) translateZ(3px); filter: brightness(0.85); }
.cana-string { position: absolute; width: 2px; height: 60px; background-color: #d1cfc7; top: 6px; left: 95px; transform-style: preserve-3d; }
.bola-3d { position: absolute; width: 24px; height: 24px; top: 66px; left: 84px; transform-style: preserve-3d; cursor: pointer; transition: transform 0.2s; }
.bola-3d:hover { transform: scale(1.2); }
.bola-face-1, .bola-face-2 { position: absolute; width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #b8b8b8); transition: background 0.3s; }
.bola-face-2 { transform: rotateY(90deg); }
.bola-negra .bola-face-1, .bola-negra .bola-face-2 { background: radial-gradient(circle at 35% 35%, #555, #1a0a0b); }

.piece-assembled { position: relative; width: 140px; height: 140px; transform-style: preserve-3d; animation: spin3d 8s linear infinite; }
.piece-assembled .piece3d { position: absolute; animation: none !important; }
.as-hex { top: 0; left: 0; transform: translateY(-60px) rotateX(90deg) !important; }
.as-pillar { top: 10px; left: 60px; transform: translateY(0) !important; }
.as-base { top: 10px; left: 10px; transform: translateY(60px) rotateX(90deg) !important; }

.component-item h4 { font-family: 'Space Grotesk', sans-serif; font-size: 1rem; color: #9c3d42; margin-top: 10px; text-align: center; text-transform: none;} 
.component-item p { font-size: 0.9rem; color: #000000; line-height: 1.4; text-align: center; } 

/* === GALERÍA MARQUEE === */
.marquee-wrapper { width: 100%; overflow: hidden; position: relative; padding: 20px 0; margin-top: 10px; -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent); mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent); }
.marquee-track { display: flex; width: max-content; animation: scroll-marquee 35s linear infinite; }
.marquee-track:hover { animation-play-state: paused; }
.marquee-group { display: flex; gap: 30px; padding-right: 30px; }
@keyframes scroll-marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.gallery-item { width: 320px; height: 220px; border-radius: 12px; overflow: hidden; cursor: pointer; position: relative; border: 2px solid #F5BEBF; background-color: #ffffff; flex-shrink: 0; transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.3s; }
.gallery-item:hover { transform: scale(1.05); box-shadow: 0 15px 30px rgba(166, 221, 229, 0.4); border-color: #A6DDE5; z-index: 2; }
.gallery-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-item:hover .gallery-img { transform: scale(1.15); }

/* === MODAL LIGHTBOX === */
.image-modal { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.95); z-index: 3000; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.image-modal.active { opacity: 1; pointer-events: auto; }
.image-modal-content { max-width: 90%; max-height: 90vh; position: relative; transform: scale(0.9); transition: transform 0.3s ease; }
.image-modal.active .image-modal-content { transform: scale(1); }
.image-modal-content img { max-width: 100%; max-height: 90vh; object-fit: contain; border-radius: 10px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); border: 2px solid #A6DDE5; }
.close-image-modal { position: absolute; top: -40px; right: 0; color: #ffffff; font-size: 2.5rem; cursor: pointer; z-index: 10; transition: color 0.3s; line-height: 1; }
.close-image-modal:hover { color: #A6DDE5; }

/* === SECCIÓN PIX MATRIZ === */
.pix-container { display: flex; flex-direction: column; align-items: center; width: 100%; }
.pix-description { margin: 0 auto 30px auto !important; }
.pix-highlight-box { width: 100%; background-color: #ffffff; padding: 50px 30px; border-radius: 20px; display: flex; flex-direction: column; align-items: center; box-shadow: 0 20px 40px rgba(156, 61, 66, 0.2); margin-top: 20px; }

/* ESTILOS CLASE BOTONES GHOST (CONTORNEADOS) */
.btn-ghost-style {
    background-color: transparent; 
    border: 2px solid #9c3d42; 
    color: #9c3d42; 
    font-family: 'Space Grotesk', sans-serif; 
    font-weight: 800; 
    border-radius: 12px; 
    cursor: pointer; 
    transition: all 0.4s ease; 
    text-transform: uppercase; 
    position: relative; 
    overflow: hidden; 
    z-index: 1; 
    display: block;
    margin: 0 auto;
}
.btn-ghost-style::before { 
    content: ''; 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background-color: #9c3d42; 
    z-index: -1; 
    transform: scaleX(0); 
    transform-origin: right; 
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}
.btn-ghost-style:hover { 
    color: #ffffff; 
    box-shadow: 0 10px 25px rgba(156, 61, 66, 0.3); 
}
.btn-ghost-style:hover::before { 
    transform: scaleX(1); 
    transform-origin: left; 
}

.pix-trigger-btn { font-size: 1.2rem; padding: 15px 40px; }
.cta-experiencia-btn { font-size: 1.3rem; padding: 18px 45px; letter-spacing: 1px; }

.pix-matrix-wrapper { width: 100%; max-height: 0; overflow: hidden; transition: max-height 1s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.5s ease, margin-top 0.5s ease; opacity: 0; visibility: hidden; }
.pix-matrix-wrapper.open { max-height: 2500px; opacity: 1; visibility: visible; margin-top: 40px; }
.pix-raw-code { width: 100%; background-color: #ffffff; border-radius: 12px; padding: 30px; font-family: 'Consolas', 'Courier New', monospace; font-size: 0.9rem; color: #9c3d42; white-space: pre-wrap; word-break: break-all; text-align: left; box-shadow: inset 0 5px 15px rgba(0,0,0,0.05); border: 2px solid #F5BEBF; overflow-x: auto; }

/* === FUNDAMENTO SECCIÓN === */
.fundamento-article { width: 100%; margin-top: 50px; display: flex; flex-direction: column; gap: 30px; }
.fundamento-section-title { color: #9c3d42; font-family: 'Space Grotesk', sans-serif; font-size: 1.5rem; margin-top: 20px; margin-bottom: 5px; border-bottom: 2px solid #F5BEBF; padding-bottom: 10px; text-transform: none; }
.fundamento-article p { font-size: 1.15rem; color: #000000; line-height: 1.8; }
.fundamento-article strong, .fundamento-article em { color: #9c3d42; }

.fundamento-img-borderless { 
    width: 100%; 
    height: auto; 
    display: block;
    border: none !important; 
    box-shadow: none !important; 
    margin: 40px 0;
}

/* === AJUSTE FORZADO PARA ESQUEMA Y COMPARATIVA === */
.gravedad-img {
    width: 70% !important; 
    max-width: 665px !important; 
    margin: 50px auto !important; 
}

/* === MAPA CONCEPTUAL (GRAVEDAD) EN HTML NATIVO EXACTO === */
.mapa-gravedad-container {
    width: 100%;
    overflow-x: auto;
    padding: 30px 0;
    margin: 20px 0;
    scrollbar-width: thin;
    scrollbar-color: #9c3d42 #F5BEBF;
}
.mg-grid {
    display: grid;
    grid-template-columns: auto auto auto auto auto auto auto;
    row-gap: 15px;
    align-items: center;
    width: max-content;
    margin: 0 auto;
    font-family: 'Space Grotesk', sans-serif;
}
.mg-item { font-size: 1.15rem; line-height: 1.4; font-weight: 600; }
.mg-col { display: flex; flex-direction: column; }
.mg-red { color: #c46868; }
.mg-black { color: #444; font-size: 0.9rem; margin-bottom: 3px; font-weight: 600; }
.mg-bold { color: #9c3d42; font-weight: 800; font-size: 1.3rem; margin: 4px 0; }
.mg-center { text-align: center; align-items: center; }
.mg-arr { font-size: 1.5rem; color: #444; font-weight: bold; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.mg-label { font-size: 0.8rem; font-weight: 600; color: #555; white-space: nowrap; margin-bottom: -5px;}
.mg-down { font-size: 1.5rem; color: #444; font-weight: bold; display: flex; flex-direction: column; justify-content: center; }

.mg-line-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding-right: 25px; 
}
.mg-line-txt {
    font-size: 0.9rem;
    font-weight: 600;
    color: #444;
    margin-left: 15px;
    margin-bottom: 5px;
    align-self: flex-start;
}
.mg-line {
    width: calc(100% - 15px);
    margin-left: 15px;
    height: 2px;
    background: #444;
    position: relative;
}
.mg-line::after {
    content: '';
    position: absolute;
    right: -10px;
    top: -5px;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 10px solid #444;
}

/* === GRILLAS PARA ESTRUCTURAR EL TEXTO EN FUNDAMENTO === */
.fundamento-grid-4 { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 40px; 
    margin-top: 30px; 
    align-items: start;
}

.fundamento-grid-3 { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 40px; 
    align-items: start;
}

.fundamento-grid-2 { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); 
    gap: 40px; 
    margin-top: 30px; 
}

.fundamento-step h4 { font-family: 'Space Grotesk', sans-serif; font-size: 1.2rem; color: #000000; margin-bottom: 12px; }
.fundamento-step p { font-size: 1rem !important; line-height: 1.6; color: #333333; margin: 0; }

/* === TABLA COMPARATIVA HTML === */
.comparativa-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 40px 0 60px 0;
    align-items: stretch;
}
.comp-col {
    border-right: 2px solid #9c3d42;
    display: flex;
    flex-direction: column;
}
.comp-col:last-child {
    border-right: none;
}
.comp-header {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #000;
    text-align: center;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    margin-right: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.comp-col:last-child .comp-header {
    margin-right: 0;
}
.comp-body {
    padding-right: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: center;
}
.comp-col:last-child .comp-body {
    padding-right: 0;
}
.comp-body p {
    font-size: 0.95rem !important;
    line-height: 1.4;
    color: #333;
    margin: 0;
}
.comp-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
    border: none !important;
    box-shadow: none !important;
}

/* === MAPA HORIZONTAL HTML REDUCIDO === */
.horizontal-flow-wrapper {
    width: 100%;
    margin-top: 30px;
    overflow-x: auto;
    padding-bottom: 20px;
    scrollbar-width: thin;
    scrollbar-color: #9c3d42 #F5BEBF;
}
.horizontal-flow-wrapper::-webkit-scrollbar { height: 10px; }
.horizontal-flow-wrapper::-webkit-scrollbar-track { background: #F5BEBF; border-radius: 5px; }
.horizontal-flow-wrapper::-webkit-scrollbar-thumb { background-color: #9c3d42; border-radius: 5px; }

.flow-row {
    display: flex;
    flex-direction: column;
}

.flow-track-label {
    font-family: 'Space Grotesk', sans-serif;
    color: #9c3d42;
    font-size: 1.4rem;
    margin-bottom: 20px;
    padding-left: 15px;
    border-left: 5px solid #F5BEBF;
}

.horizontal-flow-track {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 10px; 
    width: 100%;
}

.flow-card {
    background: #ffffff;
    border: 2px solid #F5BEBF;
    border-radius: 12px;
    padding: 15px 12px; 
    flex: 1; 
    width: auto;
    box-shadow: 0 5px 15px rgba(156, 61, 66, 0.05);
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.flow-card:hover {
    transform: translateY(-5px);
    border-color: #A6DDE5;
}
.digital-card { border-color: #A6DDE5; }

.flow-card h4 {
    color: #9c3d42;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem; 
    margin-bottom: 10px;
    border-bottom: 2px solid #F5BEBF;
    padding-bottom: 8px;
    line-height: 1.3;
}
.digital-card h4 { border-color: #A6DDE5; }

.flow-card h4 small {
    font-size: 0.75rem; 
    color: #333;
    display: block;
    margin-top: 6px;
    font-weight: 400;
    font-family: 'Segoe UI', sans-serif;
}

.flow-card ul { list-style: none; padding: 0; margin: 0; text-align: left; }
.flow-card li {
    font-size: 0.8rem !important; 
    color: #444;
    margin-bottom: 8px;
    line-height: 1.3;
    position: relative;
    padding-left: 10px;
}
.flow-card li::before { content: '•'; color: #9c3d42; position: absolute; left: 0; font-weight: bold; }
.digital-card li::before { color: #A6DDE5; }
.flow-card li strong { color: #000; }

.flow-arrow {
    display: flex;
    align-items: center;
    font-size: 1.5rem; 
    color: #F5BEBF;
    font-weight: bold;
    height: auto; 
}


/* === PRE-FOOTER CTA === */
.pre-footer-cta {
    position: relative; 
    width: 100%; 
    background-color: #ffffff !important; 
    border-top: 2px solid #F5BEBF; 
    border-bottom: 2px solid #F5BEBF; 
    padding: 50px 20px; 
    margin-top: 20px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    overflow: hidden; 
}

.cta-title { 
    position: relative; 
    z-index: 2; 
    font-family: 'Space Grotesk', sans-serif; 
    font-size: 1.8rem; 
    font-weight: 700; 
    color: #9c3d42; 
    text-align: center; 
    max-width: 800px; 
    line-height: 1.4; 
    margin-bottom: 30px;
    text-transform: none;
    letter-spacing: normal;
}

/* === FOOTER COMPACTO A 4 COLUMNAS === */
.site-footer { 
    background-color: #9c3d42; 
    padding: 60px 20px; 
    border-top: 4px solid #A6DDE5; 
    width: 100%; 
}

.footer-container { 
    max-width: 1050px; 
    margin: 0 auto; 
    display: grid; 
    grid-template-columns: 1.7fr 1fr 1.2fr 1.2fr; 
    gap: 40px; 
}

.footer-col h4 { 
    font-family: 'Space Grotesk', sans-serif; 
    font-size: 1.1rem; 
    color: #ffffff; 
    margin-bottom: 15px; 
    text-transform: none; 
}

.footer-col p { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    font-size: 0.95rem; 
    color: #ffffff; 
    line-height: 1.6; 
}

.footer-link { 
    color: #A6DDE5; 
    text-decoration: none; 
    transition: color 0.3s ease, text-shadow 0.3s ease; 
    display: inline-block; 
    margin-bottom: 5px; 
}

.footer-link:hover { 
    color: #ffffff; 
    text-shadow: 0 0 10px rgba(166, 221, 229, 0.6); 
}

.footer-logos-col {
    display: flex;
    flex-direction: column;
    gap: 25px; 
    align-items: flex-start;
}

.footer-logos-col img { 
    width: auto; 
    height: auto;
    opacity: 0.9; 
    transition: opacity 0.3s; 
}

.footer-logos-col img:first-of-type { max-width: 180px; }
.footer-logos-col img:last-of-type { max-height: 55px; }
.footer-logos-col img:hover { opacity: 1; }

.back-btn { margin-top: 50px; padding: 10px 25px; border: 2px solid #9c3d42; background: transparent; cursor: pointer; font-weight: bold; color: #9c3d42; transition: 0.3s; margin: 0 auto 60px auto; display: block; font-family: 'Space Grotesk', sans-serif; text-transform: uppercase; border-radius: 12px;}
.back-btn:hover { background-color: #9c3d42; color: #ffffff; }

/* === REFERENCIAS Y QR (Ajuste a problema de tamaño gigante) === */
.qr-showcase { width: 100%; background-color: #ffffff; padding: 80px 20px; display: flex; flex-direction: column; gap: 80px; margin-top: 40px; }
.qr-row { display: flex; align-items: center; justify-content: center; gap: 80px; max-width: 1000px; margin: 0 auto; width: 100%; }

.qr-box-mockup { 
    background-color: #ffffff; 
    padding: 30px; 
    border-radius: 12px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    width: 280px;  
    height: 280px; 
    flex-shrink: 0; 
    box-shadow: 0 15px 35px rgba(156, 61, 66, 0.15); 
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    text-decoration: none; 
    cursor: pointer; 
    border: 2px solid #F5BEBF; 
}
.qr-box-mockup:hover { transform: scale(1.05) rotate(2deg); border-color: #A6DDE5; }

.qr-box-mockup img { 
    width: 100%; 
    height: 100%; 
    border-radius: 10px; 
    object-fit: contain; 
}

.qr-text { flex: 1; max-width: 400px; display: flex; flex-direction: column; gap: 20px; }
.qr-text p { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; font-size: 1.2rem; line-height: 1.4; color: #000000; margin: 0; } 
.scan-text { font-family: 'Space Grotesk', sans-serif; font-weight: 800; font-size: 1.8rem; color: #9c3d42; text-transform: uppercase; letter-spacing: 1px; } 

.tools-image-grid { display: flex; justify-content: center; align-items: flex-start; gap: 50px; flex-wrap: wrap; margin-top: 30px; max-width: 850px; }
.tool-item-container { display: flex; flex-direction: column; align-items: center; gap: 15px; cursor: pointer; }
.tool-img-wrapper { width: 75px; height: 75px; transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); display: flex; justify-content: center; align-items: center; }
.tool-img-wrapper img { width: 100%; height: 100%; object-fit: contain; }
.tool-label { font-family: 'Space Grotesk', sans-serif; font-size: 1.4rem; color: #9c3d42; font-weight: 800; opacity: 0; transform: translateY(10px); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); pointer-events: none; }
.tool-item-container:hover .tool-img-wrapper { transform: scale(1.15) translateY(-5px); }
.tool-item-container:hover .tool-label { opacity: 1; transform: translateY(0); }


.scroll-anim { opacity: 0; transform: translateY(60px); transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.scroll-anim.visible { opacity: 1; transform: translateY(0); }

/* Adaptación a dispositivos móviles */
@media (max-width: 900px) {
    .interactive-rules-wrapper { flex-direction: column; gap: 30px; }
    .rules-timeline { width: 100%; flex-direction: row; flex-wrap: wrap; justify-content: center; padding: 0; gap: 10px;}
    .timeline-line { display: none; }
    .timeline-btn { flex-direction: column; gap: 10px; text-align: center; width: 45%; }
    .timeline-label { font-size: 1rem; }
    .rules-display-card { width: 100%; min-height: auto; }
    .rule-panel.active { flex-direction: column; }
    .rule-visual-side { width: 100%; height: 250px; border-right: none; border-bottom: 2px solid #F5BEBF; }
    .rule-text-side { width: 100%; padding: 30px; }
    
    .fundamento-img-borderless { max-width: 100%; margin: 30px 0; }
    .gravedad-img { width: 100% !important; margin: 30px auto !important; } /* Ajuste para mantener legibilidad en móvil */
    .footer-container { grid-template-columns: 1fr 1fr; }
    .fundamento-grid-4, .fundamento-grid-3, .comparativa-grid { grid-template-columns: 1fr 1fr; }
    
    .horizontal-flow-track { flex-direction: column; width: 100%; }
    .flow-card { width: 100%; }
    .flow-arrow { transform: rotate(90deg); margin: 10px auto; }
    .comp-col { border-right: none; border-bottom: 2px solid #9c3d42; padding-bottom: 20px; margin-bottom: 20px;}
    .comp-col:last-child { border-bottom: none;}
    .mg-grid { display: flex; flex-direction: column; gap: 15px; align-items: center; text-align: center;}
    .mg-line-wrap { display: none; }
}

@media (max-width: 768px) {
    .home-grid { display: flex; flex-direction: column; justify-content: center; padding: 40px 20px; }
    .nav-container { flex-direction: column; height: auto; padding: 15px 0; gap: 15px;}
    .main-nav { flex-wrap: wrap; gap: 15px; padding: 10px 20px; border-radius: 20px; justify-content: center;}
    .nav-link { font-size: 0.9rem; }
    .nav-brand-text { display: none; }
    .main-title-container { padding: 0; align-items: center; text-align: center; margin-top: 15vh; }
    .main-title { font-size: clamp(2rem, 12vw, 4rem); white-space: normal; } 
    .section-indicator { top: 150px; right: 20px; padding: 4px 14px; }
    .indicator-text { font-size: 0.8rem; }
    .pix-raw-code { font-size: 0.75rem; padding: 15px; }
    .qr-row { flex-direction: column !important; text-align: center; gap: 40px; }
    .qr-text { align-items: center !important; text-align: center !important; }
    .tools-image-grid { gap: 30px; }
    .tool-img-wrapper { width: 60px; height: 60px; }
    .components-group { flex-direction: column; gap: 40px; align-items: center; }
    .footer-container { grid-template-columns: 1fr; text-align: center; }
    .footer-logos-col { align-items: center; }
    .fundamento-grid-4, .fundamento-grid-3, .comparativa-grid { grid-template-columns: 1fr; }
}