/* ==========================================================================
   Luxuria Safes - Language switch, social buttons, RTL (Arabic) support
   ========================================================================== */

/* Arabic font (loaded only from Google Fonts; falls back gracefully) */
:root[lang="ar"] body,
html[lang="ar"] body {
    font-family: 'Noto Kufi Arabic', 'Cairo', var(--font-primary);
}
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] h5,
html[lang="ar"] h6 {
    font-family: 'Cairo', 'Noto Kufi Arabic', var(--font-secondary);
    font-weight: 600;
}

/* ---- Header utility bar (social icons + language toggle) ---- */
@media (min-width: 992px) {
    .main-navigation {
        display: flex;
        align-items: center;
    }
}

.header-utility {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    margin-inline-start: 2rem;
}

.social-icons {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: var(--color-gold);
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.social-icon svg {
    width: 16px;
    height: 16px;
}

.social-icon:hover {
    background: var(--color-gold);
    color: var(--color-black);
    border-color: var(--color-gold);
}

.header-social .social-icon {
    width: 30px;
    height: 30px;
}

.header-social .social-icon svg {
    width: 14px;
    height: 14px;
}

/* ---- Floating social buttons ---- */
.floating-social {
    position: fixed;
    bottom: 1.75rem;
    inset-inline-end: 1.75rem;
    z-index: 999;
    flex-direction: column;
    gap: 0.75rem;
}

.floating-social .social-icon {
    width: 46px;
    height: 46px;
    background: var(--color-black);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--color-gold);
}

.floating-social .social-icon svg {
    width: 20px;
    height: 20px;
}

.floating-social .social-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.6);
}

@media (max-width: 768px) {
    .floating-social {
        bottom: 1rem;
        inset-inline-end: 1rem;
    }

    .floating-social .social-icon {
        width: 42px;
        height: 42px;
    }
}

/* ---- Language toggle ---- */
.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 20px;
    padding: 0.4rem 0.9rem;
    color: var(--color-text-main);
    font-family: var(--font-primary);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: border-color 0.25s ease;
    flex-shrink: 0;
}

.lang-toggle:hover {
    border-color: var(--color-gold);
}

.lang-toggle .lang-en,
.lang-toggle .lang-ar {
    opacity: 0.5;
    transition: opacity 0.25s ease, color 0.25s ease;
}

.lang-toggle .lang-en.active,
.lang-toggle .lang-ar.active {
    opacity: 1;
    color: var(--color-gold);
    font-weight: 600;
}

.lang-toggle .lang-sep {
    opacity: 0.35;
}

/* Mobile menu: keep utility bar visible and tidy inside the open nav panel */
@media (max-width: 991px) {
    .main-navigation.nav-open {
        flex-direction: column;
    }

    .header-utility {
        margin-inline-start: 0;
        margin-top: 2.5rem;
        flex-direction: column;
        gap: 1.5rem;
        justify-content: center;
    }
}

/* ==========================================================================
   RTL (Arabic) layout adjustments
   ========================================================================== */
html[dir="rtl"] {
    direction: rtl;
}

html[dir="rtl"] body {
    text-align: right;
}

/* Flip row-based flex layouts so content order still reads naturally */
html[dir="rtl"] .flex-row {
    flex-direction: row-reverse;
}

html[dir="rtl"] .main-navigation ul {
    padding-inline-start: 0;
}

html[dir="rtl"] .text-link {
    display: inline-flex;
    flex-direction: row-reverse;
}

/* Numerals, model codes and standards codes should stay LTR even in RTL flow */
html[dir="rtl"] .keep-ltr,
html[dir="rtl"] table {
    direction: rtl;
}

html[dir="rtl"] .legal-links a:not(:last-child)::after {
    content: "";
}

/* Icons that visually imply direction (arrows) get mirrored in RTL */
html[dir="rtl"] .text-link,
html[dir="rtl"] .btn.hover-fill {
    transform: scaleX(1);
}
