/* ── Base ── */
html { scroll-behavior: smooth; }
body { font-family: 'Manrope', sans-serif; }
h1, h2, h3 { font-family: 'Manrope', sans-serif; }

[id] { scroll-margin-top: 80px; }

.material-symbols-outlined { vertical-align: middle; }

.glass-nav {
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(20px);
}

.hero-gradient {
    background: linear-gradient(135deg, #1E3A5F 0%, #022448 100%);
}

/* ── Colores personalizados (Tailwind custom colors fallback) ── */
.bg-primary { background-color: #1E3A5F; }
.bg-primary:hover { background-color: #1E3A5F; }
.text-primary { color: #1E3A5F; }
.border-primary { border-color: #1E3A5F; }
.text-on-primary { color: #ffffff; }
.ring-primary { --tw-ring-color: #1E3A5F; }
.focus\:ring-primary:focus { --tw-ring-color: rgba(30,58,95,1); box-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); }
.bg-surface { background-color: #f9f9f9; }
.bg-surface-container { background-color: #eeeeee; }
.bg-surface-container-low { background-color: #f3f3f3; }
.bg-surface-container-lowest { background-color: #ffffff; }
.bg-surface-container-high { background-color: #e8e8e8; }
.bg-surface-dim { background-color: #dadada; }
.bg-secondary-container { background-color: #d6e0f4; }
.text-on-surface { color: #1a1c1c; }
.text-on-surface-variant { color: #43474e; }
.text-on-background { color: #1a1c1c; }
.text-primary-fixed-dim { color: #adc8f5; }
.text-inverse-primary { color: #adc8f5; }
.text-outline { color: #74777f; }
.border-outline { border-color: #74777f; }
.border-outline-variant { border-color: #c4c6cf; }
.bg-inverse-surface { background-color: #2f3131; }
.text-inverse-on-surface { color: #f1f1f1; }
.bg-primary-container { background-color: #1e3a5f; }
.text-on-primary-fixed { color: #001c3b; }
.bg-surface-variant { background-color: #e2e2e2; }
.bg-surface-container-highest { background-color: #e2e2e2; }
.text-surface-variant { color: #e2e2e2; }
.border-surface-variant { border-color: #e2e2e2; }

/* ── Dropdown ── */
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    z-index: 100;
    margin-top: 0 !important;
    padding-top: 8px;
}
.dropdown.active .dropdown-content { display: block; }

@media (min-width: 769px) {
    .dropdown:hover .dropdown-content { display: block; }
}

@media (max-width: 768px) {
    .dropdown-content {
        position: static;
        transform: none;
        width: 100%;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
        overflow: hidden;
        max-height: 0;
        opacity: 0;
        transition: max-height 0.28s cubic-bezier(0.4,0,0.2,1), opacity 0.22s ease;
    }
    .dropdown.active .dropdown-content {
        max-height: 300px;
        opacity: 1;
    }
    .mobile-menu {
        overflow: hidden;
        max-height: 0;
        opacity: 0;
        pointer-events: none;
        transition: max-height 0.32s cubic-bezier(0.4,0,0.2,1), opacity 0.25s ease;
    }
    .mobile-menu.active {
        max-height: 600px;
        opacity: 1;
        pointer-events: auto;
    }
}

/* ── Botones ── */
.btn-primary {
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(30,58,95,0.25);
}
.btn-primary:active {
    transform: translateY(0) scale(0.97);
    box-shadow: 0 2px 8px rgba(30,58,95,0.15);
}
.btn-ghost {
    transition: transform 0.15s ease, background-color 0.15s ease;
}
.btn-ghost:hover  { transform: translateY(-2px); }
.btn-ghost:active { transform: translateY(0) scale(0.97); }

/* ── Dropdown links ── */
.dropdown-link {
    position: relative;
    transition: color 0.15s ease, padding-left 0.18s ease, background-color 0.15s ease;
    border-left: 2px solid transparent;
}
.dropdown-link:hover {
    color: #1E3A5F;
    padding-left: 1.25rem;
    border-left-color: #1E3A5F;
    background-color: #f3f3f3;
}

/* ── Mobile nav links ── */
.mobile-nav-link {
    transition: color 0.15s ease, padding-left 0.15s ease;
    display: block;
}
.mobile-nav-link:hover,
.mobile-nav-link:active { color: #1E3A5F; padding-left: 0.25rem; }

/* ── Inputs ── */
input, textarea, select {
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

/* ── Feature cards ── */
.feature-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(30,58,95,0.1);
}

/* ── Client cards ── */
.client-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.client-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

/* ── Type cards ── */
.type-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.type-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.10);
}

/* ── FAQ ── */
details.faq-item { transition: box-shadow 0.2s ease; }
details.faq-item[open] { box-shadow: 0 4px 16px rgba(30,58,95,0.08); }
details.faq-item summary { transition: background-color 0.15s ease; }
details.faq-item summary:hover { background-color: #f8f9fc; }

/* ── Nav link underline ── */
.nav-link { position: relative; }
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #1E3A5F;
    transition: width 0.2s ease;
}
.nav-link:hover::after { width: 100%; }
.nav-link-active::after { width: 100%; }

/* ── ASCENSOR SCROLLBAR ── */
@media (min-width: 769px) {
    html::-webkit-scrollbar { display: none; }
    html { scrollbar-width: none; -ms-overflow-style: none; }
}

#elevator-shaft { display: none !important; }
#elevator-cable { display: none !important; }
#elevator-cable-dynamic { display: none !important; }
#elevator-pulley { display: none !important; }

@media (min-width: 769px) {
    #elevator-shaft { display: block !important; }
    #elevator-shaft {
        display: block;
        position: fixed;
        right: 0;
        top: 0;
        bottom: 0;
        width: 46px;
        z-index: 9998;
        background: #0f2540;
        cursor: pointer;
        box-shadow: -3px 0 12px rgba(0,0,0,0.35);
        background-image: repeating-linear-gradient(
            to bottom,
            transparent 0px,
            transparent 59px,
            rgba(173,200,245,0.15) 59px,
            rgba(173,200,245,0.15) 60px
        );
    }
    #elevator-shaft::before,
    #elevator-shaft::after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        width: 3px;
        background: linear-gradient(to bottom,
            rgba(255,255,255,0.08) 0%,
            rgba(255,255,255,0.18) 50%,
            rgba(255,255,255,0.08) 100%
        );
    }
    #elevator-shaft::before { left: 8px; }
    #elevator-shaft::after  { right: 8px; }

    #elevator-cable {
        display: block !important;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        top: 0;
        width: 2px;
        background: repeating-linear-gradient(
            to bottom,
            rgba(173,200,245,0.5) 0px,
            rgba(173,200,245,0.5) 5px,
            transparent 5px,
            transparent 9px
        );
        pointer-events: none;
    }

    #elevator-pulley {
        display: block !important;
        position: absolute;
        top: 6px;
        left: 50%;
        transform: translateX(-50%);
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: radial-gradient(circle at 35% 35%, #7a9cc8, #1e3a5f);
        border: 2px solid rgba(255,255,255,0.3);
        box-shadow: 0 2px 6px rgba(0,0,0,0.5);
        pointer-events: none;
        z-index: 2;
    }

    #elevator-cabin {
        position: absolute;
        left: 5px;
        right: 5px;
        height: 64px;
        top: 30px;
        border-radius: 3px 3px 2px 2px;
        background: linear-gradient(160deg, #2d5a9e 0%, #1a3f7a 60%, #122d5c 100%);
        border: 1.5px solid rgba(173,200,245,0.55);
        box-shadow:
            0 6px 18px rgba(0,0,0,0.55),
            0 1px 0 rgba(255,255,255,0.18) inset,
            0 -1px 0 rgba(0,0,0,0.3) inset;
        cursor: grab;
        user-select: none;
        z-index: 3;
        transition: box-shadow 0.12s;
    }
    #elevator-cabin:active {
        cursor: grabbing;
        box-shadow:
            0 10px 28px rgba(0,0,0,0.7),
            0 1px 0 rgba(255,255,255,0.22) inset;
    }

    #elevator-floor-display {
        position: absolute;
        top: 4px;
        left: 0;
        right: 0;
        text-align: center;
        font-size: 8px;
        font-weight: 700;
        font-family: 'Courier New', monospace;
        letter-spacing: 0.5px;
        color: #7be0ff;
        text-shadow: 0 0 6px rgba(123,224,255,0.8);
        pointer-events: none;
    }

    #elevator-door-frame {
        position: absolute;
        top: 18px;
        left: 3px;
        right: 3px;
        bottom: 5px;
        border: 1px solid rgba(173,200,245,0.4);
        border-radius: 2px;
        overflow: hidden;
        pointer-events: none;
    }

    .elevator-door {
        position: absolute;
        top: 0;
        bottom: 0;
        width: 50%;
        background: linear-gradient(to right,
            rgba(255,255,255,0.04) 0%,
            rgba(255,255,255,0.10) 45%,
            rgba(255,255,255,0.02) 100%
        );
    }
    .elevator-door-left  { left: 0;  border-right: 1px solid rgba(173,200,245,0.5); }
    .elevator-door-right { right: 0; border-left:  1px solid rgba(173,200,245,0.5); }
    .elevator-door-left::after {
        content: '';
        position: absolute;
        top: 10%; left: 15%;
        width: 6px;
        bottom: 10%;
        background: rgba(255,255,255,0.10);
        border-radius: 3px;
    }

    #elevator-cabin-roof {
        position: absolute;
        top: 0; left: 0; right: 0;
        height: 17px;
        background: linear-gradient(to bottom, rgba(255,255,255,0.12), transparent);
        border-radius: 3px 3px 0 0;
        pointer-events: none;
    }

    #elevator-cable-dynamic {
        display: block !important;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        top: 22px;
        width: 2px;
        background: rgba(173,200,245,0.45);
        pointer-events: none;
        z-index: 2;
    }

    #elevator-solution-btn {
        position: absolute;
        right: 0;
        width: 96px;
        height: 44px;
        background: linear-gradient(135deg, #c8920a 0%, #f0c040 55%, #b87c08 100%);
        border: 1.5px solid rgba(255,230,120,0.85);
        border-radius: 6px 0 0 6px;
        border-right: none;
        cursor: pointer;
        z-index: 2;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 5px;
        box-shadow:
            -4px 0 14px rgba(240,192,64,0.5),
            -2px 3px 10px rgba(0,0,0,0.45),
            inset 0 1px 0 rgba(255,255,200,0.45);
        transition: box-shadow 0.18s, filter 0.18s, width 0.18s;
        padding: 0 10px 0 12px;
        outline: none;
        font-family: 'Manrope', sans-serif;
        overflow: hidden;
    }
    #elevator-solution-btn:hover {
        width: 100px;
        box-shadow:
            -6px 0 22px rgba(255,210,60,0.8),
            -2px 4px 14px rgba(0,0,0,0.5),
            inset 0 1px 0 rgba(255,255,200,0.55);
        filter: brightness(1.07);
    }
    #elevator-solution-btn:active {
        filter: brightness(0.91);
        box-shadow: -2px 0 8px rgba(240,192,64,0.4), 0 2px 5px rgba(0,0,0,0.5);
    }
    #elevator-solution-btn::before {
        content: '';
        flex-shrink: 0;
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: radial-gradient(circle at 35% 35%, #fffde0, #e67e00);
        box-shadow: 0 0 6px 2px rgba(255,200,0,0.85);
        animation: ledPulse 1.8s ease-in-out infinite;
    }
    @keyframes ledPulse {
        0%, 100% { opacity: 1;   box-shadow: 0 0 6px 2px rgba(255,200,0,0.85); }
        50%       { opacity: 0.6; box-shadow: 0 0 3px 1px rgba(255,160,0,0.4); }
    }
    #elevator-solution-btn .btn-label {
        font-size: 9px;
        font-weight: 800;
        color: #3a1f00;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        line-height: 1.25;
        text-align: left;
        white-space: nowrap;
    }
}

/* ── COOKIE BANNER ASCENSOR ── */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    pointer-events: none;
    font-family: 'Manrope', sans-serif;
}

#cookie-elevator-shaft {
    position: relative;
    max-width: 480px;
    margin: 0 auto 24px;
    pointer-events: auto;
    transform: translateY(120%);
    transition: transform 0.7s cubic-bezier(0.34, 1.2, 0.64, 1);
}

#cookie-banner.active #cookie-elevator-shaft {
    transform: translateY(0);
}

#cookie-banner.closing #cookie-elevator-shaft {
    transform: translateY(120%);
    transition: transform 0.5s cubic-bezier(0.55, 0, 1, 0.45);
}

#cookie-cabin {
    background: linear-gradient(160deg, #1a3f7a 0%, #0f2540 100%);
    border: 2px solid rgba(173, 200, 245, 0.4);
    border-radius: 10px 10px 4px 4px;
    box-shadow:
        0 -4px 30px rgba(15, 37, 64, 0.5),
        0 8px 32px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    position: relative;
}

#cookie-floor-indicator {
    text-align: center;
    padding: 6px 0 4px;
    font-size: 10px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 1.5px;
    color: #7be0ff;
    text-shadow: 0 0 8px rgba(123, 224, 255, 0.7);
    background: linear-gradient(to bottom, rgba(255,255,255,0.06), transparent);
    border-bottom: 1px solid rgba(173, 200, 245, 0.2);
}

#cookie-door-frame {
    position: relative;
    overflow: hidden;
    min-height: 160px;
}

.cookie-door {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    background: linear-gradient(160deg, #2d5a9e 0%, #1a3f7a 100%);
    border: none;
    z-index: 2;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: 0.5s;
}

.cookie-door-left {
    left: 0;
    border-right: 1px solid rgba(173, 200, 245, 0.35);
    background: linear-gradient(to right, rgba(45,90,158,0.95) 0%, rgba(30,58,95,0.98) 90%);
}

.cookie-door-right {
    right: 0;
    border-left: 1px solid rgba(173, 200, 245, 0.35);
    background: linear-gradient(to left, rgba(45,90,158,0.95) 0%, rgba(30,58,95,0.98) 90%);
}

.cookie-door-left::after,
.cookie-door-right::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 28px;
    background: rgba(173, 200, 245, 0.35);
    border-radius: 2px;
}
.cookie-door-left::after { right: 10px; }
.cookie-door-right::after { left: 10px; }

#cookie-banner.active .cookie-door-left {
    transform: translateX(-100%);
}
#cookie-banner.active .cookie-door-right {
    transform: translateX(100%);
}

#cookie-banner.closing .cookie-door-left,
#cookie-banner.closing .cookie-door-right {
    transform: translateX(0);
    transition-delay: 0s;
}

#cookie-content {
    padding: 20px 24px;
    background: #f9f9f9;
    position: relative;
    z-index: 1;
}

#cookie-content p.cookie-title {
    font-weight: 700;
    font-size: 15px;
    color: #1E3A5F;
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#cookie-content p.cookie-text {
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    margin: 0 0 16px;
}

#cookie-content a {
    color: #1E3A5F;
    font-weight: 600;
    text-decoration: underline;
}

#cookie-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

#cookie-buttons button {
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
    font-family: 'Manrope', sans-serif;
    border: none;
}

#cookie-buttons button:hover { transform: translateY(-1px); }
#cookie-buttons button:active { transform: translateY(0) scale(0.97); }

.cookie-btn-reject {
    background: #e8e8e8;
    color: #555;
    border: 1px solid #ccc !important;
}
.cookie-btn-reject:hover { background: #ddd; }

.cookie-btn-accept {
    background: linear-gradient(135deg, #1E3A5F 0%, #2d5a9e 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}
.cookie-btn-accept:hover {
    box-shadow: 0 6px 18px rgba(30, 58, 95, 0.4) !important;
    filter: brightness(1.08);
}

#cookie-cabin::after {
    content: '';
    display: block;
    height: 4px;
    background: linear-gradient(to right, #0f2540, #2d5a9e, #0f2540);
}

#cookie-cable {
    display: none !important;
    width: 2px;
    height: 24px;
    margin: 0 auto;
    background: repeating-linear-gradient(
        to bottom,
        rgba(173, 200, 245, 0.5) 0px,
        rgba(173, 200, 245, 0.5) 4px,
        transparent 4px,
        transparent 7px
    );
}

@media (max-width: 520px) {
    #cookie-elevator-shaft { margin: 0 12px 12px; max-width: none; }
    #cookie-content { padding: 16px 18px; }
    #cookie-buttons { flex-direction: column; }
    #cookie-buttons button { width: 100%; text-align: center; }
}
