/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Tablee Business Colors */
    --primary-black: #111111;
    --accent-gold: #F4B400;
    --dark-bg: #1A1A1A;
    --card-bg: #2A2A2A;
    --white: #FFFFFF;
    --grey: #9E9E9E;
    --light-grey: #3A3A3A;
    --dark-grey: #424242;
    --error: #D32F2F;
    --success: #4CAF50;
    
    /* Tablee User Colors */
    --user-yellow: #FEEB5D;
    --user-yellow-alt: #F4EA64;
    --dark-blue: #2D3238;
    --light-blue: #1976D2;
    
    /* Saudi Arabia Colors */
    --saudi-green: #006233;
    
    /* Font */
    --font-family: 'Almarai', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Transitions */
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--dark-bg);
    color: var(--white);
    line-height: 1.8;
    overflow-x: hidden;
    direction: rtl;
}

body[dir="ltr"] {
    direction: ltr;
}

/* Premium Header Styles */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(17, 17, 17, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    z-index: 1000;
    padding: 1.25rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
    border-bottom: 1px solid rgba(244, 180, 0, 0.1);
}

header.scrolled {
    padding: 0.75rem 0;
    background: rgba(17, 17, 17, 0.98);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    text-decoration: none;
    color: inherit;
}

.logo-img {
    height: 45px;
    width: auto;
    animation: fadeInDown 0.8s ease-out;
    filter: drop-shadow(0 2px 8px rgba(244, 180, 0, 0.3));
}


.flag-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1.25rem;
    background: rgba(244, 180, 0, 0.1);
    border-radius: 50px;
    border: 1px solid rgba(244, 180, 0, 0.2);
    transition: var(--transition);
    white-space: nowrap;
}

.flag-container:hover {
    background: rgba(244, 180, 0, 0.15);
    border-color: rgba(244, 180, 0, 0.4);
    transform: translateY(-2px);
}

.saudi-flag {
    width: 32px;
    height: 24px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    background: var(--saudi-green);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
    padding: 0.75rem 0;
    letter-spacing: 0.3px;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-gold), var(--user-yellow));
    transition: var(--transition);
    border-radius: 2px;
}

nav a:hover::after {
    width: 100%;
}

nav a:hover {
    color: var(--accent-gold);
}

.cta-button {
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--user-yellow) 100%);
    color: var(--primary-black);
    padding: 0.875rem 2.25rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(244, 180, 0, 0.4);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cta-button:hover::before {
    width: 300px;
    height: 300px;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(244, 180, 0, 0.6);
}

.cta-button span {
    position: relative;
    z-index: 1;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 28px;
    height: 3px;
    background: var(--accent-gold);
    border-radius: 3px;
    transition: var(--transition);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Premium Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 8rem 2rem 4rem;
    overflow: hidden;
    background: linear-gradient(135deg, var(--dark-bg) 0%, #0f0f0f 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(244, 180, 0, 0.15) 0%, transparent 70%);
    animation: rotate-bg 20s linear infinite;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(244, 180, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(254, 235, 93, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-logo {
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease-out;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-logo-img {
    max-width: 400px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 40px rgba(244, 180, 0, 0.4));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.4s backwards;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--user-yellow) 100%);
    color: var(--primary-black);
    padding: 1.25rem 3rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 8px 30px rgba(244, 180, 0, 0.5);
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 400px;
    height: 400px;
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(244, 180, 0, 0.7);
}

.btn-primary span {
    position: relative;
    z-index: 1;
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    padding: 1.25rem 3rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid var(--accent-gold);
    cursor: pointer;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-gold), var(--user-yellow));
    transition: var(--transition);
    z-index: -1;
}

.btn-secondary:hover::before {
    left: 0;
}

.btn-secondary:hover {
    color: var(--primary-black);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(244, 180, 0, 0.4);
}

/* Premium Features Section */
.features {
    padding: 8rem 2rem;
    background: linear-gradient(180deg, var(--card-bg) 0%, var(--dark-bg) 100%);
    position: relative;
}

.features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
}

.features-container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--user-yellow) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

.section-subtitle {
    text-align: center;
    color: var(--grey);
    font-size: 1.3rem;
    margin-bottom: 5rem;
    font-weight: 400;
    line-height: 1.8;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 4rem;
}

.feature-card {
    background: linear-gradient(135deg, var(--dark-bg) 0%, #222222 100%);
    padding: 3rem;
    border-radius: 24px;
    transition: var(--transition);
    border: 1px solid rgba(244, 180, 0, 0.1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-gold), var(--user-yellow));
    transform: scaleX(0);
    transition: var(--transition);
    transform-origin: right;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(244, 180, 0, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: var(--transition);
}

.feature-card:hover::after {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 60px rgba(244, 180, 0, 0.3);
    border-color: rgba(244, 180, 0, 0.4);
}

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 2rem;
    display: block;
    color: var(--accent-gold);
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    color: var(--user-yellow);
}

.feature-card h3 {
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
    color: var(--white);
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.feature-card p {
    color: var(--grey);
    line-height: 1.9;
    font-size: 1.05rem;
    position: relative;
    z-index: 1;
}

/* Premium Footer */
footer {
    background: linear-gradient(180deg, var(--primary-black) 0%, #000000 100%);
    padding: 5rem 2rem 2rem;
    border-top: 1px solid rgba(244, 180, 0, 0.2);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-section h4 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--accent-gold);
    font-weight: 700;
    position: relative;
    padding-bottom: 1rem;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-gold), var(--user-yellow));
    border-radius: 2px;
}

.footer-section p {
    color: var(--grey);
    margin-bottom: 1.5rem;
    line-height: 1.9;
    font-size: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--grey);
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.footer-links a:hover {
    color: var(--accent-gold);
    transform: translateX(-8px);
}

.footer-links a i {
    font-size: 0.85rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 3rem;
    border-top: 1px solid rgba(244, 180, 0, 0.1);
    color: var(--grey);
    font-size: 0.95rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
    justify-content: center;
}

.social-links a {
    color: var(--grey);
    font-size: 1.5rem;
    transition: var(--transition);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(244, 180, 0, 0.05);
    border: 1px solid rgba(244, 180, 0, 0.1);
}

.social-links a:hover {
    color: var(--accent-gold);
    transform: translateY(-5px) scale(1.1);
    background: rgba(244, 180, 0, 0.15);
    border-color: rgba(244, 180, 0, 0.4);
    box-shadow: 0 8px 20px rgba(244, 180, 0, 0.3);
}

/* Premium Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rotate-bg {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Scroll animations */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Language Toggle */
.language-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(244, 180, 0, 0.1);
    border-radius: 50px;
    border: 1px solid rgba(244, 180, 0, 0.2);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    color: var(--white);
}

.language-toggle:hover {
    background: rgba(244, 180, 0, 0.15);
    border-color: rgba(244, 180, 0, 0.4);
}

.language-toggle i {
    color: var(--accent-gold);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header-container {
        padding: 0 2rem;
    }
    
    .desktop-flag {
        display: none;
    }
    
    .hero-logo-img {
        max-width: 300px;
    }
    
    .section-title {
        font-size: 2.8rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }
}

@media (min-width: 769px) {
    .desktop-flag {
        display: flex !important;
    }
    
    .mobile-flag-item {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .desktop-flag {
        display: none !important;
    }
    
    nav {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 80%;
        max-width: 300px;
        background: rgba(17, 17, 17, 0.98);
        backdrop-filter: blur(20px);
        padding: 2.5rem;
        transition: var(--transition);
        box-shadow: -4px 0 30px rgba(0, 0, 0, 0.5);
        border-left: 1px solid rgba(244, 180, 0, 0.2);
        height: calc(100vh - 80px);
        overflow-y: auto;
    }
    
    nav.active {
        right: 0;
    }
    
    nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }
    
    .hero-logo-img {
        max-width: 250px;
    }
    
    .btn-primary, .btn-secondary {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .section-subtitle {
        font-size: 1.1rem;
    }
    
    .header-container {
        padding: 0 1.5rem;
    }
    
    .desktop-flag {
        display: none;
    }
    
    .mobile-flag-item {
        display: block;
        margin-bottom: 1.5rem;
        padding-bottom: 1.5rem;
        border-bottom: 1px solid rgba(244, 180, 0, 0.1);
    }
}

/* RTL Support */
body[dir="ltr"] nav {
    left: -100%;
    right: auto;
    border-left: none;
    border-right: 1px solid rgba(244, 180, 0, 0.2);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.5);
}

body[dir="ltr"] nav.active {
    left: 0;
    right: auto;
}

body[dir="ltr"] .footer-links a:hover {
    transform: translateX(8px);
}

body[dir="ltr"] nav a::after {
    right: auto;
    left: 0;
}

body[dir="ltr"] .footer-section h4::after {
    right: auto;
    left: 0;
}

body[dir="ltr"] .feature-card::before {
    transform-origin: left;
}

