/* ===== REUSABLE iOS LIQUID GLASS CLASS ===== */
/* Use .ios-glass on any element for the iOS liquid glass effect */

.ios-glass {
    position: relative;
    
    /* iOS-style translucent base with subtle blue tint */
    background: rgb(255 255 255 / 44%);
    
    /* iOS Liquid Glass - blur with saturation and brightness */
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    
    /* Ultra-soft shadow (iOS depth) */
    box-shadow:
        0 4px 30px rgba(0, 0, 0, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    
    /* Hairline glass edge */
    border: 1px solid rgba(255, 255, 255, 0.6);
}

/* iOS Liquid Highlight Layer - mimics Apple's material gloss reflection */
.ios-glass::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.45) 0%,
        rgba(255, 255, 255, 0.15) 35%,
        rgba(255, 255, 255, 0.05) 100%
    );
    pointer-events: none;
    z-index: 0;
}

/* iOS Inner Frost Layer - Apple glass is layered, not flat */
.ios-glass::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
    z-index: 0;
}

/* Ensure content inside .ios-glass is above the pseudo-elements */
.ios-glass > * {
    position: relative;
    z-index: 1;
}

/* ===== iOS GLASS VARIANTS ===== */

/* Dark variant for dark backgrounds */
.ios-glass-dark {
    position: relative;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(15px) saturate(200%) brightness(1.0);
    -webkit-backdrop-filter: blur(15px) saturate(200%) brightness(1.0);
    box-shadow:
        0 4px 30px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    color: white;
}

/* Subtle variant with less opacity */
.ios-glass-subtle {
    position: relative;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(3px) saturate(100%);
    -webkit-backdrop-filter: blur(3px) saturate(100%);
    box-shadow:
        0 2px 20px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border: 0.5px solid rgba(255, 255, 255, 0.3);
}

/* ===================================================== */

/* ===== NAVBAR STYLING WITH FREIGHT COLORS ===== */
/* Primary: #006699, Secondary: #ff6347, Accent: #88B1A1 */

/* Nav link styling */
.navbar.ios-glass .nav-link {
    color: #2D3E46 !important;
    font-weight: 600;
    padding: 8px 16px !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

/* Hover effect with glass */
.navbar.ios-glass .nav-link:hover {
    color: #015884 !important;
    background: rgba(0, 102, 153, 0.1);
}

/* Active state with primary color - ONLY main menu, not submenu */
.navbar.ios-glass > .container-fluid > .navbar-collapse > .navbar-nav > .nav-item > .nav-link.active,
.navbar.ios-glass > .container-fluid > .navbar-nav > .nav-item > .nav-link.active {
    color: #015884 !important;
    font-family: var(--main-font-bold);
}

/* Dropdown menu with iOS glass effect */
.navbar.ios-glass .dropdown-menu {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.12),
        0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 8px;
    margin-top: 8px;
}

/* Dropdown items - normal weight */
.navbar.ios-glass .dropdown-menu .nav-link,
.navbar.ios-glass .dropdown-menu .dropdown-item {
    color: #2D3E46 !important;
    padding: 10px 16px !important;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

/* Dropdown item hover */
.navbar.ios-glass .dropdown-menu .nav-link:hover,
.navbar.ios-glass .dropdown-menu .dropdown-item:hover {
    color: #006699 !important;
    background: rgba(0, 102, 153, 0.1);
}

/* Dropdown item active state - theme color */
.navbar.ios-glass .dropdown-menu .dropdown-item.active,
.navbar.ios-glass .dropdown-menu .dropdown-item:active {
    color: #fff !important;
    background: linear-gradient(135deg, #0099cc 0%, #006699 100%);
}

.navbar.ios-glass .dropdown-menu .nav-link.active {
    color: #006699 !important;
    background: rgba(0, 102, 153, 0.1);
    font-weight: 600;
}

/* Dropdown toggle arrow */
.navbar.ios-glass .dropdown-toggle::after {
    margin-left: 6px;
    vertical-align: middle;
}

/* Navbar brand */
.navbar.ios-glass .navbar-brand img {
    height: 35px;
}

/* Navbar toggler */
.navbar.ios-glass .navbar-toggler {
    border: 1px solid rgba(0, 102, 153, 0.3);
    padding: 6px 10px;
    border-radius: 8px;
}

.navbar.ios-glass .navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(0, 102, 153, 0.2);
}

/* Create Account / Primary Nav Button */
.btn-primary-nav {
    background: linear-gradient(135deg, #0099cc 0%, #006699 100%);
    color: #fff !important;
    padding: 6px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 102, 153, 0.3);
}

.btn-primary-nav:hover {
    background: linear-gradient(135deg, #006699 0%, #004d73 100%);
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 153, 0.4);
}

/* Language dropdown styling */
.navbar.ios-glass #langDropdown {
    font-size: 14px;
    font-weight: 500;
}

.navbar.ios-glass #langDropdown svg {
    opacity: 0.8;
}

/* ===== USER PROFILE DROPDOWN STYLES ===== */
/* Uses freight.css theme: Primary #006699, Secondary #ff6347, Accent #88B1A1 */

/* User avatar in navbar toggle */
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0099cc 0%, #006699 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

/* User avatar large (in dropdown header) */
.user-avatar-lg {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0099cc 0%, #006699 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 20px;
    flex-shrink: 0;
}

/* User dropdown menu */
.user-dropdown {
    min-width: 280px;
    padding: 0;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

/* User dropdown header */
.user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px !important;
    background: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 16px;
    color: #2D3E46;
}

.user-email {
    font-size: 13px;
    color: #6c757d;
}

/* Dropdown items */
.user-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #2D3E46;
    transition: all 0.2s ease;
}

.user-dropdown .dropdown-item svg {
    color: #6c757d;
    transition: color 0.2s ease;
}

.user-dropdown .dropdown-item:hover {
    background: rgba(0, 102, 153, 0.08);
    color: #006699;
}

.user-dropdown .dropdown-item:hover svg {
    color: #006699;
}

/* Badge in dropdown */
.user-dropdown .dropdown-item .badge {
    font-size: 11px;
    padding: 4px 8px;
}

/* Dropdown dividers */
.user-dropdown .dropdown-divider {
    margin: 0;
    border-color: rgba(0, 0, 0, 0.06) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
    opacity: 1;
    background: transparent;
}

/* Logout item - red styling */
.user-dropdown .dropdown-item.text-danger {
    color: #dc3545 !important;
}

.user-dropdown .dropdown-item.text-danger svg {
    color: #dc3545;
}

.user-dropdown .dropdown-item.text-danger:hover {
    background: rgba(220, 53, 69, 0.08);
}

/* Profile toggle arrow */
.user-profile-toggle::after {
    margin-left: 8px;
}

/* ===== RTL (Arabic) Support for User Dropdown ===== */
[dir="rtl"] .user-dropdown .dropdown-item,
html[lang="ar"] .user-dropdown .dropdown-item {
    flex-direction: row-reverse;
    text-align: right;
}

[dir="rtl"] .user-dropdown .dropdown-item svg,
html[lang="ar"] .user-dropdown .dropdown-item svg {
    margin-right: 0;
    margin-left: 8px;
}

[dir="rtl"] .user-dropdown-header,
html[lang="ar"] .user-dropdown-header {
    flex-direction: row-reverse;
    text-align: right;
}

[dir="rtl"] .user-info,
html[lang="ar"] .user-info {
    align-items: flex-end;
}

[dir="rtl"] .user-profile-toggle::after,
html[lang="ar"] .user-profile-toggle::after {
    margin-left: 0;
    margin-right: 8px;
}

[dir="rtl"] .user-dropdown .dropdown-item .badge,
html[lang="ar"] .user-dropdown .dropdown-item .badge {
    margin-left: 0;
    margin-right: auto;
}

/* Mobile collapse menu */
@media (max-width: 991.98px) {
    .navbar.ios-glass .navbar-collapse {
        background: #ffffff;
        border-radius: 12px;
        padding: 15px;
        margin-top: 10px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
        position: relative;
        z-index: 1000;
    }
    
    .navbar.ios-glass .navbar-collapse .navbar-nav {
        background: #ffffff;
        width: 100%;
    }
    
    .navbar.ios-glass .navbar-collapse .nav-item {
        background: #ffffff;
        width: 100%;
    }
    
    /* Mobile nav links */
    .navbar.ios-glass .navbar-collapse .nav-link {
        padding: 12px 16px !important;
        border-radius: 8px;
        margin-bottom: 4px;
    }
    
    .navbar.ios-glass .dropdown-menu {
        background: #f8f9fa;
        box-shadow: none;
        border: none;
        padding-left: 15px;
        margin: 0;
        position: static !important;
        transform: none !important;
    }
    
    .navbar.ios-glass .dropdown-menu .nav-link,
    .navbar.ios-glass .dropdown-menu .dropdown-item {
        background: transparent;
    }
    
    /* Mobile user dropdown styling */
    .navbar.ios-glass .user-dropdown {
        position: static !important;
        transform: none !important;
        width: 100%;
        border-radius: 12px;
        box-shadow: none;
        border: 1px solid rgba(0, 0, 0, 0.06);
        margin-top: 8px;
    }
    
    /* Mobile notification bell */
    .navbar.ios-glass .navbar-nav .nav-item.me-3 {
        margin-right: 0 !important;
        width: 100%;
    }
    
    /* Mobile user avatar section */
    .navbar.ios-glass .user-profile-toggle {
        width: 100%;
        justify-content: flex-start;
    }
    
    .navbar.ios-glass .user-profile-toggle .d-none.d-lg-inline {
        display: inline !important;
    }
    
    /* Mobile language dropdown */
    .navbar.ios-glass #langDropdown {
        width: 100%;
        justify-content: flex-start;
    }
    
    /* Stack items vertically on mobile */
    .navbar.ios-glass .navbar-collapse .navbar-nav.ms-auto {
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid rgba(0, 0, 0, 0.06);
    }
    
    /* Mobile button styling */
    .navbar.ios-glass .btn-primary-nav {
        width: 100%;
        text-align: center;
        display: block;
        margin-top: 8px;
    }
}

/* Navbar iOS-Style Glass Styles (UIKit-like) */
/* ===== Banner/Video Section Styles ===== */
/* Remove any top padding from sections to allow content to start from top */
.home-header-banner {
    padding-top: 0 !important;
    margin-top: 0 !important;
    background: transparent !important;
}

/* Override home-page background where navbar is */
.home-page {
    background-color: transparent !important;
}

/* Make navbar fixed so it overlays content and glass effect is visible */
nav.navbar.ios-glass {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
}

/* Add padding to content to prevent overlap with fixed navbar */
/* Navbar height is 75px + some margin */
.home-header-banner {
    padding-top: 75px !important;
}

/* Mobile: navbar not sticky/fixed */
@media (max-width: 991.98px) {
    nav.navbar.ios-glass {
        position: relative !important;
    }
    
    /* Remove sticky-top behavior on mobile */
    nav.navbar.sticky-top {
        position: relative !important;
    }
    
    /* No extra padding needed on mobile since navbar is not fixed */
    .home-header-banner {
        padding-top: 0 !important;
    }
}

/* Video banner should start from the very top */
.home-page-slider-banner {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.home-page-slider-banner .video-banner {
    margin-top: -75px !important;
    position: relative;
    top: 0;
}

/* Ensure the home-page wrapper starts from top */
.home-page {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* ===== Toggler Styling ===== */
.navbar.glassmorphism-nav .navbar-toggler {
    border-color: rgba(0, 0, 0, 0.2);
}

.navbar.glassmorphism-nav .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.7%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ===== Language Toggle Styling ===== */
.navbar.glassmorphism-nav .toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.navbar.glassmorphism-nav .toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.navbar.glassmorphism-nav .slider {
    width: 40px;
    margin-top: 11px;
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 26px;
}

.navbar.glassmorphism-nav .slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 0px;
    bottom: 0px;
    background-color: #628CA5;
    transition: .4s;
    border-radius: 50%;
}

.navbar.glassmorphism-nav input:checked + .slider {
    background-color: #628CA5;
}

.navbar.glassmorphism-nav input:checked + .slider:before {
    transform: translateX(24px);
    background-color: white;
    border: 1px solid;
}

/* ===== Mobile Responsive ===== */
@media (max-width: 991.98px) {
    .navbar.glassmorphism-nav {
        padding: 10px 15px;
    }
    
    .navbar.glassmorphism-nav .container-fluid {
        padding: 8px 15px;
    }
    
    .navbar.glassmorphism-nav .navbar-collapse {
        background: rgba(255, 255, 255, 0.95);
        border-radius: 12px;
        padding: 15px;
        margin-top: 10px;
    }
}

