/* ===================================
   SISTEMA DE ANIMACIÓN PROFESIONAL v3
   ===================================

   ARQUITECTURA DE CAPAS (orden visual):

   z-index: 1    → Background (::before en paneles, .hero-bg)
   z-index: 2    → canvas-layer (fixed) - SVGs animados con GSAP
   z-index: 5    → Contenido (.panel-content, .hero-content)
   z-index: 100  → Indicadores laterales
   z-index: 1000 → Navegación
   z-index: 2000 → Modal

   REGLAS CRÍTICAS:
   - #main NO tiene z-index (evitar stacking context)
   - Los backgrounds son ::before o divs separados
   - El contenido siempre z-index: 5+ para estar sobre SVGs
   - Los SVGs (canvas-layer) tienen will-change/filter para GSAP
     (crean stacking context propio, por eso z-index: 2 es suficiente)

   ESTADOS DE HERRAMIENTA (controlados por GSAP):
   - hero:    Formación inicial con techo
   - active:  Protagonista grande y centrada
   - idle:    Pequeña, baja opacidad

   =================================== */

/* ===================================
   VARIABLES CSS
   =================================== */
:root {
    /* Tamaños de herramientas */
    --tool-size-hero: 220px;
    --tool-size-active: 350px;
    --tool-size-idle: 60px;

    /* Posiciones hero (formación inicial) */
    --hero-tools-bottom: -6%;
    --hero-techo-bottom: 45%;

    /* Opacidades */
    --opacity-active: 0.25;
    --opacity-idle: 0;

    /* Colores de glow por herramienta */
    --glow-brocha: rgba(255, 193, 7, 0.6);
    --glow-pinzas: rgba(33, 150, 243, 0.6);
    --glow-llave: rgba(76, 175, 80, 0.6);
    --glow-destornillador: rgba(244, 67, 54, 0.6);
    --glow-cinzel: rgba(156, 39, 176, 0.6);

    /* Timing */
    --transition-fast: 0.3s;
    --transition-normal: 0.5s;
    --transition-slow: 0.8s;
}

/* ===================================
   CANVAS - CAPA FIJA DE HERRAMIENTAS
   =================================== */
.canvas-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

/* Techo del logo */
.canvas-techo {
    position: absolute;
    left: 50%;
    bottom: var(--hero-techo-bottom);
    transform: translateX(-50%);
    width: clamp(1000px, 60vw, 200px);
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
    opacity: 1;
    will-change: transform, opacity;
}

/* Herramientas SVG base */
.canvas-tool {
    position: absolute;
    width: var(--tool-size-hero);
    height: auto;
    opacity: 1;
    will-change: transform, opacity, filter;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
}

/* Llave más grande */
.canvas-tool[data-tool="llave"] {
    width: calc(var(--tool-size-hero) * 1.3);
}

/* Posiciones iniciales (formación hero) */
#tool-brocha {
    left: calc(50% - 450px);
    bottom: var(--hero-tools-bottom);
    transform: translateY(0);
    width: calc(var(--tool-size-hero) * 0.8); /* Ajusta el multiplicador: 0.8 = más pequeña, 1.2 = más grande */
}

#tool-pinzas {
    left: calc(50% - 240px);
    bottom: var(--hero-tools-bottom);
    transform: translateY(0);
}

#tool-llave {
    left: 56%;
    bottom: var(--hero-tools-bottom);
    transform: translateX(-50%) translateY(0);
}

#tool-destornillador {
    left: calc(50% + 150px);
    bottom: var(--hero-tools-bottom);
    transform: translateY(0);
}

#tool-cinzel {
    left: calc(50% + 320px);
    bottom: var(--hero-tools-bottom);
    transform: translateY(0);
}

/* ===================================
   INDICADOR LATERAL
   =================================== */
.tools-indicator {
    position: fixed;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal) ease, visibility var(--transition-normal) ease;
}

.tools-indicator.visible {
    opacity: 1;
    visibility: visible;
}

.indicator-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all var(--transition-fast) ease;
    padding: 0;
}

.indicator-dot:hover {
    background: rgba(0, 0, 0, 0.4);
    transform: scale(1.2);
}

.indicator-dot.active {
    background: var(--color-accent, #3b82f6);
    border-color: var(--color-accent, #3b82f6);
    transform: scale(1.3);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
}

/* Colores específicos por herramienta */
.indicator-dot[data-tool="brocha"].active {
    background: #ffc107;
    border-color: #ffc107;
    box-shadow: 0 0 12px var(--glow-brocha);
}

.indicator-dot[data-tool="pinzas"].active {
    background: #2196f3;
    border-color: #2196f3;
    box-shadow: 0 0 12px var(--glow-pinzas);
}

.indicator-dot[data-tool="llave"].active {
    background: #4caf50;
    border-color: #4caf50;
    box-shadow: 0 0 12px var(--glow-llave);
}

.indicator-dot[data-tool="destornillador"].active {
    background: #f44336;
    border-color: #f44336;
    box-shadow: 0 0 12px var(--glow-destornillador);
}

.indicator-dot[data-tool="cinzel"].active {
    background: #9c27b0;
    border-color: #9c27b0;
    box-shadow: 0 0 12px var(--glow-cinzel);
}

/* ===================================
   MAIN - CONTENIDO PRINCIPAL
   NO crear stacking context aquí para que
   los hijos puedan competir globalmente
   =================================== */
#main {
    position: relative;
    /* NO z-index aquí - dejar que los paneles compitan globalmente */
}

/* ===================================
   PANELES
   =================================== */
.panel {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.panel-content {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 5; /* Por encima del canvas-layer (z-index: 2) */
}

/* ===================================
   PANEL HERO - Estructura de 3 capas hermanas

   JERARQUÍA GLOBAL:
   - bg-layer (z-index: 1) - Fondo
   - canvas-layer (z-index: 2) - SVGs GSAP (fixed)
   - content-layer (z-index: 5) - Contenido interactivo

   =================================== */
.panel-hero {
    position: relative;
    overflow: hidden;
    /* NO isolation - permitir competencia global de z-index */
}

/* CAPA 1: Background - Patrón de cuadrados estilo plano arquitectónico */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    /* Base blanca */
    background-color: #fafafa;
    /* Sin propiedades que creen stacking context */
}

/* Capa de patrón de cuadrados */
.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    /* Patrón de cuadrados con líneas grises */
    background-image:
        /* Líneas verticales principales */
        linear-gradient(
            90deg,
            transparent 0px,
            transparent 49px,
            rgba(180, 180, 180, 0.4) 49px,
            rgba(180, 180, 180, 0.4) 50px,
            transparent 50px
        ),
        /* Líneas horizontales principales */
        linear-gradient(
            0deg,
            transparent 0px,
            transparent 49px,
            rgba(180, 180, 180, 0.4) 49px,
            rgba(180, 180, 180, 0.4) 50px,
            transparent 50px
        ),
        /* Líneas verticales secundarias (subdivisión) */
        linear-gradient(
            90deg,
            transparent 0px,
            transparent 24px,
            rgba(200, 200, 200, 0.2) 24px,
            rgba(200, 200, 200, 0.2) 25px,
            transparent 25px
        ),
        /* Líneas horizontales secundarias (subdivisión) */
        linear-gradient(
            0deg,
            transparent 0px,
            transparent 24px,
            rgba(200, 200, 200, 0.2) 24px,
            rgba(200, 200, 200, 0.2) 25px,
            transparent 25px
        );
    background-size: 50px 50px, 50px 50px, 25px 25px, 25px 25px;
    background-position: 0 0;
}

/* Capa de sombras y profundidad */
.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        /* Viñeta suave en las esquinas */
        radial-gradient(
            ellipse 120% 120% at 50% 50%,
            transparent 40%,
            rgba(0, 0, 0, 0.03) 70%,
            rgba(0, 0, 0, 0.08) 100%
        ),
        /* Luz desde arriba izquierda */
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.5) 0%,
            transparent 50%
        ),
        /* Sombra sutil abajo derecha */
        linear-gradient(
            315deg,
            rgba(0, 0, 0, 0.02) 0%,
            transparent 50%
        );
    pointer-events: none;
}

/* CAPA 2: canvas-layer (z-index: 2, fixed en body)
   Los SVGs animados con GSAP están ahí, no necesitan wrapper aquí */

/* CAPA 3: Contenido - DEBE estar por encima del canvas-layer */
.panel-hero .hero-content {
    position: relative;
    z-index: 5; /* Mayor que canvas-layer (z-index: 2) */
    text-align: center;
    padding-bottom: 20vh;
    /* Permitir ancho completo para el título */
    width: 100%;
    max-width: 100vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* NO usar transform, filter, opacity < 1, will-change aquí */
}

.panel-hero .hero-title {
    font-size: clamp(2.5rem, 8vw, 6rem);
    font-weight: 700;
    color: var(--color-text, #1a1a2e);
    margin-bottom: 0.75rem;
    opacity: 0;
    /* Espaciado entre letras que se adapta al ancho */
    letter-spacing: clamp(0.5rem, 3vw, 0rem);
    /* Ocupar todo el ancho */
    width: 100%;
    max-width: 100vw;
    padding: 0 2rem;
    box-sizing: border-box;
    /* Opcional: justificar texto para distribuir uniformemente */
    text-align: center;
    /* Ajuste para que el espaciado no desplace el texto */
    margin-left: auto;
    margin-right: auto;
    /* Sombra blanca difusa detrás del texto */

}
.panel-hero .hero-title-shadow {
    font-size: clamp(2.5rem, 8vw, 6rem);
    font-weight: 700;
    color: var(--color-text, #1a1a2e);

    /* Sombra blanca difusa detrás del texto */
    text-shadow:
        /* Capas de glow blanco expandido */
        0 0 10px #ffffff,
        0 0 20px #ffffff,
        0 0 30px #ffffff,
        0 0 40px rgba(255, 255, 255, 0.95),
        0 0 60px rgba(255, 255, 255, 0.9),
        0 0 80px rgba(255, 255, 255, 0.8),
        0 0 100px rgba(255, 255, 255, 0.6);

}


.panel-hero .hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: var(--color-text-secondary, #4a4a68);
    margin-bottom: 0.5rem;
    opacity: 0;
}

.panel-hero .hero-description {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: var(--color-text-secondary, #4a4a68);
    margin-bottom: 1.5rem;
    opacity: 0;
}

.panel-hero .hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: #01093b;
    font-size: 0.85rem;
    opacity: 0;
   
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin: 10px auto 0;
    color: #01093b;
    animation: scrollBounce 2s ease-in-out infinite;
    /* Sombra suave para la flecha */
    filter:
        drop-shadow(0 0 8px rgba(255, 255, 255, 0.9))
        drop-shadow(0 0 16px rgba(255, 255, 255, 0.6));
}

@keyframes scrollBounce {
    0%, 100% { transform: rotate(45deg) translateY(0); }
    50% { transform: rotate(45deg) translateY(8px); }
}

/* ===================================
   PANELES DE HERRAMIENTAS
   Estructura de 3 capas igual que hero
   =================================== */
.panel-tool {
    position: relative;
    overflow: hidden;
}

/* CAPA 1: Background de panel-tool - Patrón de cuadrados */
.panel-tool::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background-color: #fafafa;
    /* Patrón de cuadrados con líneas grises */
    background-image:
        /* Líneas verticales principales */
        linear-gradient(
            90deg,
            transparent 0px,
            transparent 49px,
            rgba(180, 180, 180, 0.35) 49px,
            rgba(180, 180, 180, 0.35) 50px,
            transparent 50px
        ),
        /* Líneas horizontales principales */
        linear-gradient(
            0deg,
            transparent 0px,
            transparent 49px,
            rgba(180, 180, 180, 0.35) 49px,
            rgba(180, 180, 180, 0.35) 50px,
            transparent 50px
        ),
        /* Líneas verticales secundarias */
        linear-gradient(
            90deg,
            transparent 0px,
            transparent 24px,
            rgba(200, 200, 200, 0.15) 24px,
            rgba(200, 200, 200, 0.15) 25px,
            transparent 25px
        ),
        /* Líneas horizontales secundarias */
        linear-gradient(
            0deg,
            transparent 0px,
            transparent 24px,
            rgba(200, 200, 200, 0.15) 24px,
            rgba(200, 200, 200, 0.15) 25px,
            transparent 25px
        );
    background-size: 50px 50px, 50px 50px, 25px 25px, 25px 25px;
    pointer-events: none;
}

/* Sombras y profundidad para panel-tool */
.panel-tool::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image:
        /* Viñeta suave */
        radial-gradient(
            ellipse 100% 100% at 50% 50%,
            transparent 50%,
            rgba(0, 0, 0, 0.02) 80%,
            rgba(0, 0, 0, 0.05) 100%
        );
    pointer-events: none;
}

/* CAPA 2: El canvas-layer fixed ocupa z-index: 2 */

/* CAPA 3: Contenido por encima de SVGs */
.panel-tool .panel-content {
    position: relative;
    z-index: 5; /* Por encima del canvas-layer */
    padding-left: 100px; /* Espacio para indicador */
}

/* ===================================
   PANEL FINAL
   =================================== */
.panel-final::before {
    background-color: #f5f7f9;
    /* Patrón de cuadrados más sutil para el final */
    background-image:
        linear-gradient(
            90deg,
            transparent 0px,
            transparent 49px,
            rgba(180, 180, 180, 0.25) 49px,
            rgba(180, 180, 180, 0.25) 50px,
            transparent 50px
        ),
        linear-gradient(
            0deg,
            transparent 0px,
            transparent 49px,
            rgba(180, 180, 180, 0.25) 49px,
            rgba(180, 180, 180, 0.25) 50px,
            transparent 50px
        ),
        linear-gradient(
            90deg,
            transparent 0px,
            transparent 24px,
            rgba(200, 200, 200, 0.1) 24px,
            rgba(200, 200, 200, 0.1) 25px,
            transparent 25px
        ),
        linear-gradient(
            0deg,
            transparent 0px,
            transparent 24px,
            rgba(200, 200, 200, 0.1) 24px,
            rgba(200, 200, 200, 0.1) 25px,
            transparent 25px
        ),
        /* Gradiente suave encima */
        linear-gradient(135deg, rgba(248, 249, 250, 0.8) 0%, rgba(226, 232, 240, 0.6) 100%);
    background-size: 50px 50px, 50px 50px, 25px 25px, 25px 25px, 100% 100%;
}

.final-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    text-align: center;
}

.final-content {
    max-width: 600px;
    padding: 3rem;
}

.final-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--color-text, #1a1a2e);
    margin-bottom: 1rem;
}

.final-text {
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    color: var(--color-text-secondary, #4a4a68);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.final-cta p {
    font-size: 1rem;
    color: var(--color-text-secondary, #6c757d);
    margin-bottom: 1rem;
}

/* ===================================
   RESPONSIVE - TABLET
   =================================== */
@media (max-width: 1024px) {
    :root {
        --tool-size-hero: 110px;
        --tool-size-active: 280px;
    }

    .panel-hero .hero-title {
        font-size: clamp(2rem, 6vw, 4rem);
        letter-spacing: clamp(0.3rem, 2vw, 2rem);
    }

    #tool-brocha { left: calc(50% - 250px); }
    #tool-pinzas { left: calc(50% - 125px); }
    #tool-destornillador { left: calc(50% + 80px); }
    #tool-cinzel { left: calc(50% + 200px); }

    .canvas-techo {
        width: clamp(350px, 55vw, 550px);
    }

    .panel-tool .panel-content {
        padding-left: 80px;
    }

    .tools-indicator {
        left: 20px;
    }
}

/* ===================================
   RESPONSIVE - MÓVIL
   =================================== */
@media (max-width: 768px) {
    :root {
        --tool-size-hero: 70px;
        --tool-size-active: 200px;
        --hero-tools-bottom: 40%;
        --hero-techo-bottom: 58%;
    }

    .canvas-techo {
        width: clamp(280px, 70vw, 400px);
    }

    /* Herramientas más juntas en móvil */
    #tool-brocha { left: calc(50% - 150px); }
    #tool-pinzas { left: calc(50% - 75px); }
    #tool-destornillador { left: calc(50% + 50px); }
    #tool-cinzel { left: calc(50% + 125px); }

    .canvas-tool[data-tool="llave"] {
        width: calc(var(--tool-size-hero) * 1.25);
    }

    /* Indicador en la parte inferior */
    .tools-indicator {
        left: 50%;
        top: auto;
        bottom: 20px;
        transform: translateX(-50%);
        flex-direction: row;
        gap: 20px;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 12px 20px;
        border-radius: 30px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }

    .panel-tool .panel-content {
        padding: 1.5rem;
        padding-bottom: 80px; /* Espacio para indicador inferior */
        /* z-index: 5 heredado de la regla base */
    }

    .panel-hero .hero-content {
        padding-top: 8vh;
    }

    .panel-hero .hero-title {
        font-size: clamp(1.5rem, 5vw, 2.5rem);
        letter-spacing: clamp(0.2rem, 1.5vw, 1rem);
        padding: 0 1rem;
    }

    .panel-hero .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
}

/* ===================================
   RESPONSIVE - MÓVIL PEQUEÑO
   =================================== */
@media (max-width: 480px) {
    :root {
        --tool-size-hero: 55px;
        --tool-size-active: 150px;
    }

    .canvas-techo {
        width: clamp(220px, 80vw, 320px);
    }

    #tool-brocha { left: calc(50% - 120px); }
    #tool-pinzas { left: calc(50% - 60px); }
    #tool-destornillador { left: calc(50% + 40px); }
    #tool-cinzel { left: calc(50% + 100px); }

    .indicator-dot {
        width: 10px;
        height: 10px;
    }

    .tools-indicator {
        gap: 16px;
        padding: 10px 16px;
    }
}

/* ===================================
   TARJETAS DE SERVICIOS - FLIP 3D
   =================================== */

/* Contenedor con perspectiva */
.service-card {
    perspective: 1000px;
    cursor: pointer;
    /* Sobrescribir el hover de styles-light.css que interfiere */
    transform: none !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.service-card:hover {
    /* Anular el transform del hover original */
    transform: none !important;
}

/* Elemento que rota */
.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 280px;
    transform-style: preserve-3d;
    transition: box-shadow 0.3s ease;
}

.card-inner:hover {
    box-shadow: var(--shadow-lg, 0 10px 25px rgba(15, 23, 42, 0.15));
}

/* Caras de la tarjeta */
.card-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: var(--border-radius, 8px);
    padding: var(--spacing-md, 2rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Cara frontal */
.card-front {
    background-color: white;
    border: 1px solid var(--color-border, #cbd5e1);
    box-shadow: var(--shadow-sm, 0 2px 4px rgba(0,0,0,0.1));
}

/* Cara trasera */
.card-back {
    background: linear-gradient(135deg, var(--color-accent, #3b82f6) 0%, var(--color-accent-dark, #2563eb) 100%);
    color: white;
    transform: rotateY(180deg);
}

.card-back h3 {
    color: white;
    margin-bottom: 0.75rem;
}

.card-back p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

.card-back .service-icon {
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

/* Botón en la cara trasera */
.btn-card {
    margin-top: auto;
    background: white;
    color: var(--color-accent, #3b82f6);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius, 8px);
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    pointer-events: auto;
}

.btn-card:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: var(--color-accent-dark, #2563eb);
}

/* Indicador visual de interactividad */
.card-front::after {
    content: 'Toca para ver más';
    position: absolute;
    bottom: 12px;
    right: 12px;
    font-size: 0.7rem;
    color: var(--color-text-secondary, #6c757d);
    opacity: 0.6;
}

/* Desktop: cambiar texto del indicador */
@media (min-width: 769px) {
    .card-front::after {
        content: 'Click para ver más';
    }
}

/* Responsive: altura mínima en móvil */
@media (max-width: 768px) {
    .card-inner {
        min-height: 250px;
    }

    .card-face {
        padding: var(--spacing-sm, 1rem);
    }
}

/* ===================================
   UTILIDADES
   =================================== */
.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
}

.no-scroll {
    overflow: hidden;
}

/* ===================================
   ESTADOS DE ANIMACIÓN (GSAP controla)
   Estas clases son referencias, GSAP
   anima directamente los valores
   =================================== */

/* Estado: Herramienta activa (protagonista) */
.canvas-tool.is-active {
    /* GSAP animará a estos valores */
}

/* Estado: Herramienta idle */
.canvas-tool.is-idle {
    /* GSAP animará a estos valores */
}

/* Estado: Modo hero (formación inicial) */
.canvas-tool.is-hero {
    /* Posición inicial por defecto */
}

/* ===================================
   OBRERO MAURI - PROTAGONISTA
   Acompaña al usuario durante el scroll
   =================================== */
.obrero-protagonist {
    position: fixed;
    left: -7%;
    bottom: -17%;
    width: clamp(600px, 72vw, 1120px);
    height: auto;
    z-index: 9999;
    opacity: 1;
    will-change: transform;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.2));
    transform-origin: bottom center;
    pointer-events: none;
}

/* Animación de "respiración" sutil cuando está quieto */
@keyframes obreroIdle {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-5px) scale(1.01);
    }
}

.obrero-protagonist.idle {
    animation: obreroIdle 3s ease-in-out infinite;
}

/* Estado caminando (usado durante scroll) */
.obrero-protagonist.walking {
    animation: none;
}

/* Responsive: Tablet */
@media (max-width: 1024px) {
    .obrero-protagonist {
        left: 3%;
        bottom: 8%;
        width: clamp(480px, 60vw, 800px);
    }
}

/* Responsive: Móvil */
@media (max-width: 768px) {
    .obrero-protagonist {
        left: 2%;
        bottom: 12%;
        width: clamp(400px, 100vw, 600px);
    }
}

/* Responsive: Móvil pequeño */
@media (max-width: 480px) {
    .obrero-protagonist {
        left: 2%;
        bottom: 15%;
        width: clamp(320px, 88vw, 480px);
    }
}
