/* Custom Styles */
:root {
    --esom-blue: #0d1b2a;
    --esom-orange: #f97316;
    --soft-bg: #f8fafc;
}

body {
    font-family: 'Inter', sans-serif;
    color: #1e293b;
    /* Ajuste global a un gris oscuro legible */
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
}

/* Custom Blue Color */
.bg-esom-blue {
    background-color: var(--esom-blue);
}

.text-esom-blue {
    color: var(--esom-blue);
}

/* Smooth scroll for anchor links */
html {
    scroll-behavior: smooth;
}

/* FAQ Accordion Arrow */
details>summary {
    list-style: none;
}

details>summary::-webkit-details-marker {
    display: none;
}

details[open] summary .arrow-down {
    transform: rotate(180deg);
}

/* Hero Section Styles */
.hero-section {
    background-image: linear-gradient(135deg, rgba(13, 27, 42, 0.85) 0%, rgba(13, 27, 42, 0.7) 100%), url('../img/fondo-hero-esom.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.text-gray-300 {
    color: #e2e8f0 !important;
    /* Aclarado: de gray-300 (cbd5e1) a slate-200 (e2e8f0) para mejor contraste */
}

.text-gray-400 {
    color: #f1f5f9 !important;
    /* Aclarado: de gray-400 (94a3b8) a slate-100 (f1f5f9) para fondos oscuros */
}

/* Card & Glass Effects */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
}

.platform-gradient {
    background: linear-gradient(135deg, #0d1b2a 0%, #1e293b 100%);
}

.feature-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    background-color: #ffffff;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: var(--esom-orange);
}

/* Animations & Utilities */
.pulse-orange {
    box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(249, 115, 22, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0);
    }
}

.hover-lift {
    transition: transform 0.3s ease;
}

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

/* 3D Image Effect */
.perspective-container {
    perspective: 1000px;
}

.img-3d {
    transform: rotateY(-10deg) rotateX(5deg) rotateZ(1deg);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.4);
}

.img-3d:hover {
    transform: rotateY(0deg) rotateX(0deg) rotateZ(0deg) scale(1.05);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
}

/* --- Estilos Específicos de Páginas --- */
:root {
    --esom-orange-hover: #ea580c;
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(255, 255, 255, 0.2);
}

.hero-altura {
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.75) 100%), url('../img/trabajo-altura-hero.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-espacios-confinados {
    background-image: linear-gradient(rgba(13, 27, 42, 0.85), rgba(13, 27, 42, 0.75)), url('../img/espacio-confinado.webp');
    background-size: cover;
    background-position: center;
}

/* Tab and FAQ styles defined below in the extended section */

.hero-operadores-maquinaria {
    background-image: linear-gradient(rgba(17, 24, 39, 0.8), rgba(17, 24, 39, 0.8)), url('../img/fondo-hero.webp');
    background-size: cover;
    background-position: center;
}

.hero-test-sustancias {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../img/test-sustancias.webp');
    background-size: cover;
    background-position: center;
}

.hero-transporte {
    background-image: linear-gradient(rgba(13, 27, 42, 0.8), rgba(13, 27, 42, 0.8)), url('../img/header-transporte.webp');
    background-size: cover;
    background-position: center;
}

.hero-sobre-nosotros {
    background-color: #0d1b2a;
}

.confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99;
}

.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

/* --- Estilos movidos de altura/index.php --- */
.hero-altura {
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.75) 100%), url('../img/trabajo-altura-hero.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-altura-glass {
    background: var(--glass-bg, rgba(255, 255, 255, 0.9));
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.2));
    border-radius: 1.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.tab-btn {
    transition: all 0.3s ease;
    position: relative;
    color: #64748b;
    /* Gray-500 for better visibility than old gray-400 */
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--esom-orange, #f97316);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.tab-btn.tab-active::after {
    width: 100%;
}

.tab-active {
    color: var(--esom-orange, #f97316) !important;
    font-weight: 700;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0, 1, 0, 1);
    opacity: 0;
}

.faq-answer.open {
    max-height: 1000px;
    transition: all 0.5s cubic-bezier(1, 0, 1, 0);
    opacity: 1;
    padding-bottom: 1.5rem;
}

.step-number {
    background: linear-gradient(135deg, var(--esom-orange, #f97316) 0%, #fb923c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade {
    animation: fadeIn 0.8s ease forwards;
}