/* =============================================================
   HEADER — Top Bar, Main Header, Navigation, Hamburger, Sidebar
   ============================================================= */

/* ── Top Bar ───────────────────────────────────────────────── */

.top-bar {
    position: fixed;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1100px;
    background: rgba(var(--brand-black-rgb), 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--gold);
    border-radius: 50px;
    padding: 8px 25px;
    z-index: 10001;
    direction: rtl;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.top-bar-hidden {
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -100%);
    pointer-events: none;
}

.top-bar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-info-block {
    display: flex;
    gap: 20px;
}

.top-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: 0.3s;
}
.top-info-item:hover { transform: translateY(-2px); }
.top-info-item:hover span { color: var(--gold); }

.icon-circle {
    width: 30px;
    height: 30px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 12px;
    box-shadow: 0 0 10px rgba(225, 169, 115, 0.2);
    transition: all 0.3s ease;
}

.top-info-item:hover .icon-circle {
    background: var(--gold);
    color: #fff;
    box-shadow: 0 0 15px rgba(225, 169, 115, 0.35);
}

.top-info-item span {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
}

/* ── Main Header ───────────────────────────────────────────── */

.main-header {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    background: rgba(var(--brand-black-rgb), 0.88);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(225, 169, 115, 0.18);
    padding: 10px 0;
    z-index: 10000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-header.header-scrolled {
    top: 10px;
    width: 95%;
    max-width: 1200px;
    background: rgba(var(--brand-black-rgb), 0.96);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    direction: rtl;
}

/* ── Logo ──────────────────────────────────────────────────── */

.logo img {
    height: 68px;
    width: auto;
    transition: all 0.3s ease;
}

.main-header.header-scrolled .logo img {
    height: 58px;
}

/* ── Desktop Navigation ────────────────────────────────────── */

.nav-menu { display: block; }

.nav-menu ul {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.nav-menu ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: 0.3s;
    position: relative;
    padding: 5px 0;
}

.nav-menu ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--brand-bronze-dark), var(--brand-bronze-light));
    transition: width 0.3s ease;
}

.nav-menu ul li a:hover { color: var(--gold); }
.nav-menu ul li a:hover::after { width: 100%; }

/* ── Header CTA Button ─────────────────────────────────────── */

.btn-quote {
    background: linear-gradient(135deg, var(--brand-bronze-dark), var(--brand-bronze), var(--brand-bronze-light));
    color: #fff;
    padding: 10px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 13px;
    box-shadow: 0 4px 15px rgba(225, 169, 115, 0.3);
}

.btn-quote-premium {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--brand-bronze-dark) 0%, var(--brand-bronze) 45%, var(--brand-bronze-light) 100%);
    background-size: 200% 200%;
    color: #fff;
    padding: 12px 28px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    box-shadow: var(--shadow-bronze);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.btn-quote-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.btn-quote-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 34px rgba(225, 169, 115, 0.34);
    background-position: 100% 0;
}

.btn-quote-premium:hover::before {
    left: 100%;
}

.btn-quote-premium .arrow-icon {
    transition: transform 0.3s ease;
}

.btn-quote-premium:hover .arrow-icon {
    transform: translateX(-5px);
}

/* ── Hamburger ─────────────────────────────────────────────── */

.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    gap: 6px;
    cursor: pointer;
    background: transparent;
    border: 2px solid rgba(225, 169, 115, 0.32);
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.hamburger-menu:hover {
    border-color: var(--gold);
    background: rgba(225, 169, 115, 0.12);
}

.hamburger-menu span {
    width: 22px;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ── Sidebar ───────────────────────────────────────────────── */

.sidebar {
    height: 100vh;
    width: 0;
    position: fixed;
    z-index: 99999;
    top: 0;
    right: 0;
    background: var(--brand-black);
    overflow: hidden;
    transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

/* Gold accent line on top */
.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--brand-bronze), var(--brand-bronze-light), var(--brand-bronze), transparent);
    z-index: 1;
}

/* ── Sidebar Header (logo + close) ─────────────────────────── */

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 28px 24px;
    border-bottom: 1px solid rgba(225, 169, 115, 0.12);
    min-width: 300px;
    flex-shrink: 0;
}

.sidebar-logo img {
    height: 44px;
    width: auto;
    opacity: 0.95;
}

/* Close button — two lines forming an X */
.sidebar .closebtn {
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: rgba(225, 169, 115, 0.08);
    border: 1px solid rgba(225, 169, 115, 0.25);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    flex-shrink: 0;
}

.sidebar .closebtn span {
    position: absolute;
    width: 18px;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.sidebar .closebtn span:nth-child(1) {
    transform: rotate(45deg);
}

.sidebar .closebtn span:nth-child(2) {
    transform: rotate(-45deg);
}

.sidebar .closebtn:hover {
    background: var(--gold);
    border-color: var(--gold);
}

.sidebar .closebtn:hover span {
    background: var(--brand-black);
}

/* ── Sidebar Nav Links ──────────────────────────────────────── */

.sidebar-links {
    display: flex;
    flex-direction: column;
    min-width: 300px;
    padding: 12px 0;
    flex-shrink: 0;
}

.sidebar-links a {
    display: flex;
    flex-direction: row;          /* icon right, text left in RTL */
    align-items: center;
    gap: 14px;
    padding: 16px 28px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    color: #d0d0d0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.25s ease;
    position: relative;
    white-space: nowrap;
    direction: rtl;               /* icon first (right), text flows left */
}

/* Right accent bar */
.sidebar-links a::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 3px;
    background: var(--gold);
    border-radius: 3px 0 0 3px;
    transform: scaleY(0);
    transition: transform 0.25s ease;
}

.sidebar-links a:hover {
    color: #fff;
    background: rgba(225, 169, 115, 0.08);
}

.sidebar-links a:hover::after {
    transform: scaleY(1);
}

.sidebar-links a i {
    color: var(--gold);
    font-size: 15px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    opacity: 0.8;
    transition: opacity 0.25s ease;
}

.sidebar-links a span {
    flex: 1;
    text-align: right;
}

.sidebar-links a:hover i {
    opacity: 1;
}

/* ── Sidebar CTA ────────────────────────────────────────────── */

.sidebar-cta {
    padding: 24px 28px;
    min-width: 300px;
    flex-shrink: 0;
}

.sidebar-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--brand-bronze-dark) 0%, var(--brand-bronze) 50%, var(--brand-bronze-light) 100%);
    background-size: 200% 100%;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    border-radius: 14px;
    transition: all 0.35s ease;
    box-shadow: 0 6px 24px rgba(225, 169, 115, 0.3);
    position: relative;
    overflow: hidden;
}

.sidebar-cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    transition: left 0.5s ease;
}

.sidebar-cta-btn:hover {
    background-position: 100% 0;
    box-shadow: 0 10px 35px rgba(225, 169, 115, 0.34);
    transform: translateY(-2px);
}

.sidebar-cta-btn:hover::before {
    left: 100%;
}

.sidebar-cta-btn i {
    font-size: 16px;
}

/* ── Sidebar Contact Info ───────────────────────────────────── */

.sidebar-contact-info {
    padding: 20px 28px 32px;
    border-top: 1px solid rgba(225, 169, 115, 0.1);
    min-width: 300px;
    flex-shrink: 0;
    margin-top: auto;
}

.sidebar-contact-item {
    display: flex;
    flex-direction: row;          /* icon on right, text on left */
    align-items: center;
    gap: 14px;
    padding: 11px 0;
    color: #888;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.25s ease;
    direction: rtl;               /* icon first (right), text flows left */
}

.sidebar-contact-item:hover {
    color: var(--gold);
}

.sidebar-contact-icon {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(225, 169, 115, 0.25);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 13px;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.sidebar-contact-item:hover .sidebar-contact-icon {
    background: rgba(225, 169, 115, 0.12);
    border-color: var(--gold);
}

.sidebar-contact-item span {
    flex: 1;
    text-align: right;
}

/* ── Sidebar Overlay ────────────────────────────────────────── */

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    z-index: 99998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 991px) {
    .top-bar {
        width: 95%;
        padding: 6px 15px;
    }

    .top-info-block {
        gap: 15px;
    }

    .top-info-item span {
        font-size: 12px;
    }

    .icon-circle {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }
}

@media (max-width: 768px) {
    /* Hide top bar on mobile */
    .top-bar {
        display: none;
    }

    /* Header pill */
    .main-header {
        top: 10px;
        width: 92%;
        border-radius: 16px;
        padding: 0;
    }

    .main-header.header-scrolled {
        top: 10px;
        width: 95%;
        background: rgba(0, 0, 0, 0.98);
        border-radius: 16px;
    }

    /* Simple flex row: hamburger on right, logo centered, spacer on left */
    .header-container {
        padding: 10px 16px;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        direction: rtl;
    }

    /* Hide desktop nav */
    .nav-menu { display: none !important; }

    /* Hide CTA button completely on mobile */
    .header-actions .btn-quote-premium {
        display: none !important;
    }

    /* header-actions is just a flex wrapper for the hamburger */
    .header-actions {
        display: flex;
        align-items: center;
        order: 3; /* leftmost in RTL */
    }

    /* Logo — flush to the right end in RTL */
    .logo {
        order: 1;
        flex: 0 0 auto;
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }

    .logo img {
        height: 54px;
        width: auto;
    }

    /* Spacer fills the middle gap between logo and hamburger */
    .header-container::after {
        content: '';
        display: block;
        flex: 1;
        order: 2;
    }

    /* Hamburger */
    .hamburger-menu {
        display: flex !important;
        width: 42px;
        height: 42px;
        border-radius: 10px;
        margin: 0;
        flex-shrink: 0;
    }

    .hamburger-menu span {
        width: 20px;
        height: 2px;
    }
}

@media (max-width: 480px) {
    .main-header {
        width: 94%;
        border-radius: 14px;
    }

    .header-container {
        padding: 9px 14px;
    }

    .logo img {
        height: 48px;
    }

    .hamburger-menu {
        width: 38px;
        height: 38px;
    }

    .hamburger-menu span {
        width: 18px;
    }

    .header-container::after {
        order: 2;
    }

    .sidebar-header,
    .sidebar-links,
    .sidebar-cta,
    .sidebar-contact-info {
        min-width: 280px;
    }

    .sidebar-links a {
        padding: 15px 22px;
        font-size: 0.95rem;
    }

    .sidebar-cta {
        padding: 20px 22px;
    }

    .sidebar-contact-info {
        padding: 18px 22px 28px;
    }
}
