/* ========================================
   Header Minimize: Icon Bar, Lock, Tooltips
   ur2val.com public site
   ======================================== */

/* ---------- Animation Timing ---------- */
:root {
    --hm-speed: 0.3s;
    --hm-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Persistent Logo ---------- */
.hm-logo-float {
    position: fixed;
    top: -4px;
    left: 10px;
    z-index: 10000;
    pointer-events: auto;
}

.hm-logo-float img {
    height: 140px;
    width: auto;
    filter: drop-shadow(0 0 20px var(--accent-glow, rgba(0,160,176,0.15)));
    transition: filter 0.3s;
}

.hm-logo-float:hover img {
    filter: drop-shadow(0 0 30px rgba(0, 160, 176, 0.4));
}

/* Hide original logo when float is active */
.site-header .site-logo {
    visibility: hidden;
}

/* ---------- Icon Bar ---------- */
.header-icon-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    height: 34px;
    background: linear-gradient(135deg, #0A0A0A 0%, #141414 100%);
    border-top: 3px solid #00A0B0;
    border-bottom: 2px solid #00A0B0;
    display: flex;
    align-items: center;
    padding: 0 56px 0 20px;
    transform: translateY(-100%);
    transition: transform var(--hm-speed) var(--hm-ease);
}

.header-icon-bar.visible {
    transform: translateY(0);
}

.icon-bar-spacer {
    flex: 1;
}

.icon-bar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.icon-bar-separator {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.12);
    margin: 0 6px;
    flex-shrink: 0;
}

.icon-bar-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 28px;
    border-radius: 6px;
    color: #666666;
    font-size: 1rem;
    text-decoration: none;
    transition: color 0.12s, background 0.12s;
    position: relative;
}

.icon-bar-item:hover {
    color: #00A0B0;
    background: rgba(0, 160, 176, 0.1);
}

.icon-bar-item.active {
    color: #00A0B0;
}

.icon-bar-item.icon-bar-cta {
    color: #00C4D6;
}

.icon-bar-item.icon-bar-cta:hover {
    color: #fff;
    background: rgba(0, 196, 214, 0.15);
}

/* ---------- Tooltips ---------- */
.icon-bar-item::after,
.header-lock-btn::after {
    content: attr(title);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: linear-gradient(135deg, #0A0A0A 0%, #141414 100%);
    color: #00A0B0;
    font-size: 0.7rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(0, 160, 176, 0.3);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.12s;
    z-index: 10000;
}

.icon-bar-item::before,
.header-lock-btn::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-bottom-color: rgba(0, 160, 176, 0.3);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.12s;
    z-index: 10000;
}

.icon-bar-item:hover::after,
.icon-bar-item:hover::before,
.header-lock-btn:hover::after,
.header-lock-btn:hover::before {
    opacity: 1;
}

/* ---------- Single Lock Button (fixed, rides the border) ---------- */
.header-lock-btn {
    position: fixed;
    right: 20px;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    background: rgba(10, 10, 10, 0.9);
    color: #666666;
    font-size: 0.7rem;
    cursor: pointer;
    transition: top var(--hm-speed) var(--hm-ease), color 0.15s, border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.header-lock-btn:hover {
    color: #00A0B0;
    border-color: #00A0B0;
}

.header-lock-btn.locked {
    color: #00C4D6;
    border-color: #00C4D6;
    background: rgba(0, 196, 214, 0.12);
    box-shadow: 0 0 8px rgba(0, 196, 214, 0.25);
}

/* ---------- Header Transition ---------- */
.site-header {
    transition: transform var(--hm-speed) var(--hm-ease);
    border-bottom: 2px solid #00A0B0 !important;
}

.site-header.hm-collapsed {
    transform: translateY(-100%);
}

.site-header.hm-expanded {
    transform: translateY(0);
}

/* ---------- Spacer ---------- */
.header-spacer {
    transition: height var(--hm-speed) var(--hm-ease);
}

/* Override page padding-top since spacer handles offset */
.hm-active .hero {
    padding-top: 0;
}

.hm-active main > section:first-child,
.hm-active main > .content-page:first-child,
.hm-active main > div:first-child {
    padding-top: 0;
}

/* ---------- No-Transition Helper ---------- */
.hm-no-transition .site-header,
.hm-no-transition .header-icon-bar,
.hm-no-transition .header-spacer,
.hm-no-transition .header-lock-btn {
    transition: none !important;
}

/* ---------- Responsive: Disable at 900px ---------- */
@media (max-width: 900px) {
    .header-icon-bar {
        display: none !important;
    }

    .header-spacer {
        display: none !important;
    }

    .header-lock-btn {
        display: none !important;
    }

    .site-header {
        transform: none !important;
        position: fixed !important;
    }

    .hm-logo-float {
        display: none !important;
    }

    .hero {
        padding-top: var(--header-height) !important;
    }

    .site-header .site-logo {
        visibility: visible !important;
    }
}
