/*
 * JaimeDiaz.TV Portal Reboot
 * Floating header — v1.0.0
 */

.jdr-header-region {
    position: sticky;
    top: 14px;
    z-index: var(--jdr-z-header);
    height: 76px;
    pointer-events: none;
}

.jdr-floating-header {
    pointer-events: auto;
    transform: translateY(0);
    opacity: 1;
    transition:
        transform var(--jdr-duration-normal) var(--jdr-ease-standard),
        opacity var(--jdr-duration-normal) var(--jdr-ease-standard);
    will-change: transform;
}

.jdr-floating-header.is-hidden {
    transform: translateY(calc(-100% - 30px));
    opacity: 0;
    pointer-events: none;
}

.jdr-floating-header__surface {
    min-height: 70px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    padding: 10px 14px 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--jdr-radius-lg);
    background:
        linear-gradient(
            135deg,
            var(--jdr-navy-900),
            var(--jdr-navy-950)
        );
    color: var(--jdr-white);
    box-shadow: var(--jdr-shadow-header);
}

/* Brand */

.jdr-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.jdr-brand__mark {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background:
        linear-gradient(
            135deg,
            var(--jdr-orange-500),
            var(--jdr-orange-400)
        );
    color: var(--jdr-white);
    font-size: 0.85rem;
    font-weight: 900;
    box-shadow:
        0 8px 20px rgba(255, 119, 77, 0.24);
}

.jdr-brand__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.jdr-brand__name {
    color: var(--jdr-white);
    font-size: 1.05rem;
    font-weight: 850;
    letter-spacing: -0.045em;
    line-height: 1;
    white-space: nowrap;
}

.jdr-brand__name span {
    color: var(--jdr-orange-500);
}

.jdr-brand__tagline {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.56);
    font-size: 0.59rem;
    white-space: nowrap;
}

/* Navigation */

.jdr-navigation {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(16px, 2vw, 29px);
}

.jdr-navigation > a,
.jdr-navigation__more {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    transition:
        color var(--jdr-duration-fast) var(--jdr-ease-standard),
        transform var(--jdr-duration-fast) var(--jdr-ease-standard);
}

.jdr-navigation > a:hover,
.jdr-navigation__more:hover {
    color: var(--jdr-white);
    transform: translateY(-1px);
}

.jdr-navigation > a.is-active {
    color: var(--jdr-white);
}

.jdr-navigation > a.is-active::after {
    position: absolute;
    right: 0;
    bottom: 1px;
    left: 0;
    height: 2px;
    border-radius: var(--jdr-radius-pill);
    background: var(--jdr-orange-500);
    content: "";
}

.jdr-navigation__more {
    border: 0;
    background: transparent;
    cursor: pointer;
}

/* Actions */

.jdr-header-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.jdr-header-action {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding-inline: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--jdr-white);
    font-size: 0.72rem;
    font-weight: 750;
    cursor: pointer;
    transition:
        background var(--jdr-duration-fast) var(--jdr-ease-standard),
        border-color var(--jdr-duration-fast) var(--jdr-ease-standard),
        transform var(--jdr-duration-fast) var(--jdr-ease-standard);
}

.jdr-header-action:hover {
    border-color: rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.11);
    transform: translateY(-1px);
}

.jdr-header-action--live {
    border-color: transparent;
    background:
        linear-gradient(
            135deg,
            var(--jdr-orange-500),
            var(--jdr-orange-400)
        );
    box-shadow:
        0 8px 20px rgba(255, 119, 77, 0.2);
}

.jdr-header-action--live:hover {
    border-color: transparent;
    background:
        linear-gradient(
            135deg,
            var(--jdr-orange-600),
            var(--jdr-orange-500)
        );
}

.jdr-header-action__pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--jdr-red-500);
    box-shadow: 0 0 0 5px rgba(220, 48, 66, 0.17);
}

/* Mobile toggle */

.jdr-mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--jdr-white);
    cursor: pointer;
}

/* Tablet */

@media (max-width: 1049px) {
    .jdr-navigation {
        gap: 16px;
    }

    .jdr-navigation > a:nth-of-type(5) {
        display: none;
    }

    .jdr-header-action__label {
        display: none;
    }

    .jdr-header-action {
        width: 42px;
        padding-inline: 0;
    }

    .jdr-header-action--live {
        width: auto;
        padding-inline: 14px;
    }

    .jdr-header-action--live .jdr-header-action__label {
        display: inline;
    }
}

/* Mobile */

@media (max-width: 799px) {
    .jdr-header-region {
        top: 9px;
        height: 68px;
    }

    .jdr-floating-header__surface {
        min-height: 62px;
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 11px;
        padding: 8px 10px;
        border-radius: var(--jdr-radius-md);
    }

    .jdr-mobile-toggle {
        display: inline-flex;
    }

    .jdr-navigation {
        display: none;
    }

    .jdr-brand__mark {
        width: 40px;
        height: 40px;
    }

    .jdr-brand__name {
        font-size: 0.95rem;
    }

    .jdr-brand__tagline {
        display: none;
    }

    .jdr-header-action--search,
    .jdr-header-action--live .jdr-header-action__label {
        display: none;
    }

    .jdr-header-action--live {
        width: 42px;
        padding-inline: 0;
    }
}

@media (max-width: 399px) {
    .jdr-brand__text {
        display: none;
    }
}

/* =========================================================
   Official gold accent refinement — v1.1.0
   ========================================================= */

.jdr-brand__mark,
.jdr-header-action--live,
.jdr-mobile-menu__live {
    background:
        linear-gradient(
            135deg,
            var(--jdr-orange-400) 0%,
            var(--jdr-orange-500) 58%,
            var(--jdr-orange-600) 100%
        );
}

.jdr-brand__mark {
    color: #ffffff;
    box-shadow:
        0 8px 20px rgba(200, 154, 61, 0.22);
}

.jdr-header-action--live {
    color: #ffffff;
    box-shadow:
        0 8px 20px rgba(200, 154, 61, 0.19);
}

.jdr-header-action--live:hover {
    background:
        linear-gradient(
            135deg,
            #dfba68,
            var(--jdr-orange-500)
        );
}

.jdr-brand__name span {
    color: #e0bd72;
}

.jdr-navigation > a.is-active::after {
    background: var(--jdr-orange-400);
}

.jdr-utility-bar__dot {
    background: var(--jdr-orange-500);
}

/* =========================================================
   Scroll-direction visibility — v1.2.0
   ========================================================= */

.jdr-floating-header {
    transition:
        transform 260ms ease,
        opacity 200ms ease,
        visibility 200ms ease,
        box-shadow 260ms ease;
    will-change: transform;
}

.jdr-floating-header.jdr-floating-header--hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(calc(-100% - 28px));
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .jdr-floating-header {
        transition: none;
    }
}
