/* ============================================
   TREE SOBHAN TRADING L.L.C
   Complete Professional Stylesheet
   ============================================ */

:root {
    --primary-orange: #F59E0B;
    --secondary-orange: #FB923C;
    --dark-bg: #1F2937;
    --darker-bg: #111827;
    --gray-dark: #374151;
    --gray-medium: #6B7280;
    --gray-light: #E5E7EB;
    --white: #FFFFFF;
    --accent-gold: #FBBF24;
}

/* ============================================
   BASE STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--gray-dark);
    background-color: #F9FAFB;
    line-height: 1.6;
    overflow-x: hidden;
}

body[dir="rtl"] {
    font-family: 'Cairo', sans-serif;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-orange);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 9999;
    border-radius: 0 0 4px 0;
}

.skip-to-main:focus {
    top: 0;
}

/* ============================================
   LANGUAGE SWITCHER
   ============================================ */

.language-switcher {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 1000;
    background: linear-gradient(135deg, var(--primary-orange), var(--secondary-orange));
    border-radius: 50px;
    padding: 10px 24px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

body[dir="rtl"] .language-switcher {
    right: auto;
    left: 20px;
}

.language-switcher:hover,
.language-switcher:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.5);
    outline: 2px solid var(--accent-gold);
}

.language-switcher i {
    color: white;
    width: 20px;
    height: 20px;
}

.language-switcher span {
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
}

/* ============================================
   NAVIGATION
   ============================================ */

.navbar-custom {
    background-color: rgba(31, 41, 55, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    padding: 0.75rem 0;
    transition: all 0.3s ease;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.navbar-custom.scrolled {
    background-color: rgba(17, 24, 39, 0.98);
    padding: 0.5rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Navbar Brand */
.navbar-brand {
    padding: 0;
    margin: 0;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-brand img {
    height: 50px;
    width: auto;
    max-width: 100%;
    transition: all 0.3s ease;
}

.navbar-custom.scrolled .navbar-brand img {
    height: 45px;
}

/* Nav Links */
.navbar-nav {
    align-items: center;
}

.navbar-nav .nav-item {
    position: relative;
    margin: 0 0.25rem;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 8px;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    color: var(--primary-orange);
    background: rgba(245, 158, 11, 0.1);
    outline: none;
}

.navbar-nav .nav-link.active {
    color: var(--primary-orange) !important;
    background: rgba(245, 158, 11, 0.15);
    position: relative;
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-orange), var(--secondary-orange));
    border-radius: 2px 2px 0 0;
}

.navbar-nav .dropdown-toggle.active {
    color: var(--primary-orange) !important;
}

.navbar-nav .dropdown-toggle.active::after {
    color: var(--primary-orange);
}

.navbar-nav .nav-link i {
    width: 18px;
    height: 18px;
    color: var(--secondary-orange);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.navbar-nav .nav-link:hover i {
    transform: scale(1.1);
}

/* ============================================
   DROPDOWN MENU
   ============================================ */

.navbar-nav .dropdown {
    position: relative;
}

.navbar-custom .dropdown-menu {
    background: rgba(31, 41, 55, 0.98);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    padding: 0.75rem 0;
    margin-top: 0.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: block !important;
    pointer-events: none;
}

.navbar-custom .dropdown:hover .dropdown-menu,
.navbar-custom .dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.navbar-custom .dropdown-item {
    color: rgba(255, 255, 255, 0.9);
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    font-weight: 500;
    border-radius: 8px;
    margin: 0.25rem 0.75rem;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-custom .dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, var(--primary-orange), var(--secondary-orange));
    border-radius: 0 2px 2px 0;
    transition: height 0.3s ease;
}

.navbar-custom .dropdown-item:hover,
.navbar-custom .dropdown-item:focus {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(251, 146, 60, 0.2));
    color: var(--primary-orange);
    transform: translateX(5px);
    outline: none;
}

.navbar-custom .dropdown-item:hover::before,
.navbar-custom .dropdown-item:focus::before {
    height: 60%;
}

.navbar-custom .dropdown-toggle::after {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
    border: none;
    content: '▼';
    font-size: 0.7rem;
    color: var(--secondary-orange);
}

.navbar-custom .dropdown:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

.navbar-custom .dropdown:hover > .nav-link {
    background: rgba(245, 158, 11, 0.1);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
}

/* ============================================
   MOBILE NAVIGATION
   ============================================ */

.navbar-toggler {
    border: 2px solid var(--primary-orange);
    padding: 0.5rem 0.75rem;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.navbar-toggler:hover {
    background: rgba(245, 158, 11, 0.2);
    transform: scale(1.05);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(245, 158, 11, 0.3);
    outline: none;
}

.navbar-toggler i {
    color: var(--primary-orange);
    width: 24px;
    height: 24px;
}

@media (max-width: 991.98px) {
    .navbar-nav {
        padding: 1rem 0;
        background: rgba(31, 41, 55, 0.98);
        border-radius: 12px;
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-item {
        margin: 0.25rem 0.5rem;
    }
    
    .navbar-nav .nav-link {
        padding: 1rem;
        border-radius: 8px;
    }
    
    .navbar-custom .dropdown-menu {
        background: rgba(17, 24, 39, 0.98);
        border: none;
        border-left: 3px solid var(--primary-orange);
        margin-left: 1.5rem;
        margin-top: 0.5rem;
        border-radius: 8px;
        box-shadow: none;
        position: static !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }
    
    .navbar-custom .dropdown-menu.show {
        display: block;
        animation: mobileDropdownSlide 0.3s ease;
    }
    
    @keyframes mobileDropdownSlide {
        from {
            opacity: 0;
            transform: translateX(-10px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
    
    .navbar-custom .dropdown-item {
        padding: 0.875rem 1.25rem;
        margin: 0.25rem 0.5rem;
    }
    
    .navbar-custom .dropdown-item:hover {
        transform: translateX(8px);
    }
    
    .navbar-custom .dropdown-toggle::after {
        float: right;
        margin-top: 0.25rem;
    }
    
    .navbar-collapse {
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .navbar-collapse::-webkit-scrollbar {
        width: 6px;
    }
    
    .navbar-collapse::-webkit-scrollbar-track {
        background: rgba(31, 41, 55, 0.5);
        border-radius: 10px;
    }
    
    .navbar-collapse::-webkit-scrollbar-thumb {
        background: var(--primary-orange);
        border-radius: 10px;
    }
    .navbar-nav .nav-link.active {
        border-left: 3px solid var(--primary-orange);
        border-radius: 0 8px 8px 0;
    }
    
    body[dir="rtl"] .navbar-nav .nav-link.active {
        border-left: none;
        border-right: 3px solid var(--primary-orange);
        border-radius: 8px 0 0 8px;
    }
    
    .navbar-nav .nav-link.active::after {
        display: none;
    }
}

/* ============================================
   RTL SUPPORT
   ============================================ */

body[dir="rtl"] .navbar-nav .nav-link i {
    order: 2;
}

body[dir="rtl"] .navbar-custom .dropdown-toggle::after {
    margin-right: 0.5rem;
    margin-left: 0;
}

body[dir="rtl"] .navbar-custom .dropdown-item {
    text-align: right;
}

body[dir="rtl"] .navbar-custom .dropdown-item::before {
    left: auto;
    right: 0;
    border-radius: 2px 0 0 2px;
}

body[dir="rtl"] .navbar-custom .dropdown-item:hover,
body[dir="rtl"] .navbar-custom .dropdown-item:focus {
    transform: translateX(-5px);
}

@media (max-width: 991.98px) {
    body[dir="rtl"] .navbar-custom .dropdown-menu {
        border-left: none;
        border-right: 3px solid var(--primary-orange);
        margin-right: 1.5rem;
        margin-left: 0;
    }
    
    body[dir="rtl"] .navbar-custom .dropdown-item:hover {
        transform: translateX(-8px);
    }
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.95), rgba(17, 24, 39, 0.9));
    color: white;
    padding: 100px 0 60px;
    position: relative;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(60deg, transparent, transparent 60px, rgba(245, 158, 11, 0.05) 60px, rgba(245, 158, 11, 0.05) 120px),
        repeating-linear-gradient(-60deg, transparent, transparent 60px, rgba(245, 158, 11, 0.05) 60px, rgba(245, 158, 11, 0.05) 120px);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-tagline {
    color: var(--accent-gold);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero-buttons {
    margin-top: 2rem;
}

/* ============================================
   SECTIONS
   ============================================ */

section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--darker-bg);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-orange), var(--secondary-orange));
}

body[dir="rtl"] .section-title::after {
    left: auto;
    right: 0;
}

.section-subtitle {
    color: var(--gray-medium);
    font-size: 1.125rem;
    margin-bottom: 3rem;
}

/* ============================================
   CARDS
   ============================================ */

.feature-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid var(--gray-light);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-orange), var(--secondary-orange));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

body[dir="rtl"] .feature-card::before {
    transform-origin: right;
}

.feature-card:hover,
.feature-card:focus-within {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(245, 158, 11, 0.2);
}

.feature-card:hover::before,
.feature-card:focus-within::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 60px;
    height: 60px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: linear-gradient(135deg, var(--primary-orange), var(--secondary-orange));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-icon i {
    color: white;
    width: 28px;
    height: 28px;
}

/* ============================================
   STATS
   ============================================ */

.stats-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 60px, rgba(245, 158, 11, 0.03) 60px, rgba(245, 158, 11, 0.03) 120px);
    pointer-events: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 3rem 2rem;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.1), transparent);
    transition: left 0.6s ease;
}

.stat-item:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.stat-item:hover::before {
    left: 100%;
}

.stat-number {
    display: block;
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #F59E0B, #FB923C, #FBBF24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    margin-bottom: 1rem;
    font-family: 'Inter', sans-serif;
}

.stat-label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .stats-section {
        padding: 60px 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .stat-item {
        padding: 2.5rem 2rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .stat-label {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.875rem;
    }
}

/* ============================================
   FORMS
   ============================================ */

.form-control,
.form-select {
    border: 2px solid var(--gray-light);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 0.2rem rgba(245, 158, 11, 0.1);
    outline: none;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-primary {
    background: linear-gradient(135deg, var(--primary-orange), var(--secondary-orange));
    border: none;
    padding: 0.875rem 2rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover,
.btn-primary:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(245, 158, 11, 0.4);
}

.btn-outline-light {
    border: 2px solid white;
    color: white;
    padding: 0.875rem 2rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-outline-light:hover,
.btn-outline-light:focus {
    background: white;
    color: var(--primary-orange);
    border-color: white;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
    background-color: var(--darker-bg);
    color: var(--gray-light);
    padding: 3rem 0 1rem;
}

footer a {
    color: var(--gray-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover,
footer a:focus {
    color: var(--primary-orange);
    outline: none;
}

footer h5, footer h6 {
    color: var(--primary-orange);
}

/* ============================================
   BACK TO TOP
   ============================================ */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, var(--primary-orange), var(--secondary-orange));
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

body[dir="rtl"] .back-to-top {
    right: auto;
    left: 30px;
}

.back-to-top:hover,
.back-to-top:focus {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.5);
}

/* ============================================
   BREADCRUMBS
   ============================================ */

.breadcrumb {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    display: inline-flex;
    backdrop-filter: blur(10px);
    margin-bottom: 1.5rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: rgba(255, 255, 255, 0.6);
}

.breadcrumb-item a {
    color: #FBBF24;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: #F59E0B;
}

.breadcrumb-item.active {
    color: white;
}

body[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before {
    content: "‹";
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .hero-section {
        padding: 80px 0 60px;
        min-height: 500px;
    }
    
    .hero-tagline {
        font-size: 1.25rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .language-switcher {
        top: 70px;
        right: 15px;
        padding: 6px 16px;
    }
    
    body[dir="rtl"] .language-switcher {
        right: auto;
        left: 15px;
    }
    
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
    
    body[dir="rtl"] .back-to-top {
        right: auto;
        left: 20px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 60px 0 40px;
    }
    
    .hero-tagline {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.navbar-custom .nav-link:focus-visible,
.navbar-custom .dropdown-item:focus-visible {
    outline: 2px solid var(--primary-orange);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}