/* Base Styles */
:root {
    /* Enhanced shadow variables */
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
    /* Enhanced color scheme with better contrast */
    --primary-color: #FF6B35;
    --primary-color-v:#FF6B35;
    --primary-hover: #9e3310;
    --secondary-color: #121539;
    --accent-color: #222222;
    --background-color: #F7F9FC;
    --text-color: #2E294E;
    --header-bg: #ffffff;
    --footer-bg: #121539;
    --border-color: #E1E5EA;
    --light-bg: #FFFFFF;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --success-color: #10b981;
    --error-color: #ef4444;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));

    /* Font families */
    --font-primary-en: 'Inter', sans-serif;
    --font-primary-ar: 'Cairo', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--background-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

main {
    flex: 1 0 auto;
    padding: 2rem 0;
}

/* Service Card Styles */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.service-card {
    background: var(--light-bg);
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card p {
    color: var(--text-color);
    margin: 1.5rem 0;
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0.85;
    text-align: center;
}

.service-card h3 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin: 1.5rem 0 1rem;
    font-weight: 600;
}

.service-features {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    text-align: center;
}

.service-features li {
    margin: 1rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 1.1rem;
    color: var(--text-color);
    opacity: 0.9;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

[dir="rtl"] .service-card p {
    padding-left: 0;
    padding-right: 0.5rem;
}

/* Calculator Styles */
.calculator-section {
    padding: 2rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.calculator-form-wrapper {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.calculator-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--secondary-color);
}

.form-group select,
.form-group input {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group select:focus,
.form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.loading-spinner,
.loading-text {
    display: none;
    text-align: center;
    margin: 1rem 0;
}

.loading-spinner.active,
.loading-text.active {
    display: block;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    margin: 1rem auto;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.result-card {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-top: 2rem;
}

.result-card h3 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.result-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.result-item.total {
    font-weight: 700;
    font-size: 1.2rem;
    border-bottom: none;
    margin-top: 1rem;
}

.delivery-info {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-color);
    opacity: 0.8;
}

.text-center {
    text-align: center;
}

[dir="rtl"] .result-item {
    flex-direction: row-reverse;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Main Content Styles */
.main-content {
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--background-color) 0%, rgba(247, 249, 252, 0.8) 100%);
    position: relative;
    overflow: hidden;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.section-title h1 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.section-title h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

.section-title p {
    font-size: 1.2rem;
    color: var(--text-color);
    opacity: 0.8;
    max-width: 600px;
    margin: 1rem auto 0;
}

.main-content::before,
.main-content::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: var(--gradient);
    opacity: 0.03;
    z-index: 0;
}

.main-content::before {
    top: -100px;
    left: -100px;
}

.main-content::after {
    bottom: -100px;
    right: -100px;
}

.main-content > * {
    position: relative;
    z-index: 1;
}

[dir="rtl"] .main-content::before {
    left: auto;
    right: -100px;
}

[dir="rtl"] .main-content::after {
    right: auto;
    left: -100px;
}

/* Alert Styles */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert i {
    font-size: 1.25rem;
}

[dir="rtl"] .alert {
    flex-direction: row-reverse;

}

/* Accessibility Helpers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for better accessibility */
:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Layout & Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
    width: 100%;
}

@media (max-width: 576px) {
    .container {
        padding: 0 1rem;
    }
}

.footer-content.container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    padding: 4rem 1.25rem;
    margin: 0 auto;
    max-width: 1200px;
    text-align: left;
    direction: ltr;
}

[dir="rtl"] .footer-content.container {
    text-align: right;
    direction: rtl;
    grid-auto-flow: dense;
}

[dir="rtl"] .footer-section:nth-child(1) { grid-column: 4; }
[dir="rtl"] .footer-section:nth-child(2) { grid-column: 3; }
[dir="rtl"] .footer-section:nth-child(3) { grid-column: 2; }
[dir="rtl"] .footer-section:nth-child(4) { grid-column: 1; }

@media (max-width: 1024px) {
    [dir="rtl"] .footer-section:nth-child(1) { grid-column: 2; }
    [dir="rtl"] .footer-section:nth-child(2) { grid-column: 1; }
    [dir="rtl"] .footer-section:nth-child(3) { grid-column: 2; }
    [dir="rtl"] .footer-section:nth-child(4) { grid-column: 1; }
}

.footer-section h1 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-section h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
}

[dir="rtl"] .footer-section h1::after {
    left: auto;
    right: 0;
}

@media (max-width: 768px) {
    .footer-content.container {
        gap: 2.5rem;
        padding: 3rem 1.25rem;
    }
}

@media (max-width: 1024px) {
    .footer-content.container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .footer-content.container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 1rem;
        text-align: center;
    }
    
    .footer-section h1 {
        margin-bottom: 1rem;
        font-size: 1.5rem;
    }

    .footer-section h1::after {
        left: 50%;
        transform: translateX(-50%);
    }

    [dir="rtl"] .footer-section h1::after {
        right: 50%;
        left: auto;
        transform: translateX(50%);
    }
    
    .footer-section p {
        margin-bottom: 1.5rem;
    }
    
    .footer-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .social-links {
        justify-content: center;
        margin-top: 1.5rem;
    }
    
    [dir="rtl"] .footer-content.container {
        text-align: center;
    }
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

/* Section Spacing */
section {
    margin: 4rem 0;
    padding: 2rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--gradient);
    border-radius: 3px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    background-color: var(--primary-color);
}

[dir="rtl"] .section-title.animate-fade-up {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-title p {
    color: var(--text-color);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.2rem;
    line-height: 1.6;
    opacity: 0.85;
}

/* Card Styles */
.card {
    background: var(--header-bg);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.1);
}

/* Responsive Grid */
@media (max-width: 1024px) {
    .container {
        max-width: 90%;
    }

    .section-title h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: 1fr;
    }

    section {
        margin: 2rem 0;
        padding: 1rem 0;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin: 0 auto;
    max-width: 1200px;
    padding: 0 1rem;
}

@media (max-width: 1024px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.feature-item {
    background: var(--light-bg);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    overflow: hidden;
}

.feature-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

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

.feature-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    background: rgba(255, 107, 53, 0.1);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    transition: all 2s cubic-bezier(0.22, 1, 0.36, 1);
}

.feature-item:hover i {
    transform: rotateY(720deg);
    background: var(--primary-color);
    color: white;
}

.feature-item h3 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 0.5rem;
    transition: color 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.feature-item:hover h3 {
    color: var(--primary-color);
}

.feature-item h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--primary-color);
    opacity: 0;
    transition: all 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.feature-item:hover h3::after {
    opacity: 1;
    width: 60px;
}

.feature-item p {
    color: var(--text-color);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    opacity: 0.8;
    transform: translateY(0);
    transition: all 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.feature-item:hover p {
    opacity: 1;
    transform: translateY(-5px);
}

/* Feature item animations */
.feature-item.animate-visible {
    animation: featureCardIn 1.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

[dir="rtl"] .feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

@keyframes featureCardIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .features {
        padding: 3rem 0;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .feature-grid {
        gap: 2rem;
    }

    .feature-item {
        padding: 2rem 1.5rem;
    }

    .feature-item i {
        font-size: 2rem;
        width: 60px;
        height: 60px;
    }
}

/* CTA Section */
.cta.low-content {
    background-color: var(--light-bg);
    text-align: center;
    padding: 4rem 2rem;
    border-radius: 1rem;
    margin: 4rem auto;
    max-width: 1200px;
}

.cta h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta .btn {
    background-color: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}

.cta .btn-outline {
    background-color: transparent;
    color: var(--primary-color);
}

.cta .btn:hover {
    background-color: transparent;
    color: var(--primary-color);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mt-4 { margin-top: 4rem; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.mb-4 { margin-bottom: 4rem; }

.py-1 { padding-top: 1rem; padding-bottom: 1rem; }
.py-2 { padding-top: 2rem; padding-bottom: 2rem; }
.py-3 { padding-top: 3rem; padding-bottom: 3rem; }
.py-4 { padding-top: 4rem; padding-bottom: 4rem; }

.px-1 { padding-left: 1rem; padding-right: 1rem; }
.px-2 { padding-left: 2rem; padding-right: 2rem; }
.px-3 { padding-left: 3rem; padding-right: 3rem; }
.px-4 { padding-left: 4rem; padding-right: 4rem; }

/* Header */
.header {
    background-color: var(--header-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.header.scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 0.8rem 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

/* Login Dropdown */
.login-dropdown {
    position: relative;
    display: inline-block;
}

.login-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: var(--background-color);
    min-width: 160px;
    box-shadow: var(--shadow-md);
    z-index: 1000;
    border-radius: 8px;
    overflow: hidden;
}

.login-dropdown:hover .login-dropdown-content {
    display: block;
}

.login-dropdown-content a {
    color: var(--text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s;
}

.login-dropdown-content a:hover {
    background-color: var(--primary-color);
    color: white;
}

.login-dropdown-content a i {
    margin-right: 8px;
    width: 16px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links a i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
    background-color: rgba(255, 107, 53, 0.1);
}

.nav-links a:hover i {
    transform: scale(1.1);
}

.nav-links a.active {
    color: var(--primary-color);
    background-color: rgba(255, 107, 53, 0.15);
    font-weight: 600;
}

.nav-links a.active i {
    transform: scale(1.1);
}

/* Mobile Navigation */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.menu-toggle:hover {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--header-bg);
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        gap: 0.5rem;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        width: 100%;
        padding: 0.75rem 1rem;
    }

    [dir="rtl"] .nav-links {
        left: 0;
        right: 0;
    }
}

/* RTL Navigation Support */
[dir="rtl"] .nav-links {
    gap: 2rem;
}

[dir="rtl"] .nav-links a {
    flex-direction: row-reverse;
}

[dir="rtl"] .nav-links a i {
    margin-left: 0;
    margin-right: 0;
}

/* Hero Banner */
.hero.banner {
    background: linear-gradient(135deg, var(--secondary-color) 70%, var(--secondary-color) 90%, var(--primary-color) 100%);
    color: var(--primary-color);
    text-align: center;
    padding: 3rem 0;
    margin: 2rem auto;
    border-radius: 1rem;
    max-width: 1200px;
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .hero.banner {
        padding: 2rem 0;
    }
}

.hero.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        var(--background-color),
        transparent
    );
    animation: shine 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes shine {
    to {
        left: 200%;
    }
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    max-width: 800px;
    margin: 0 auto 2.5rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    cursor: pointer;
    background-color: var(--primary-color);
    color: white;
    border: 2px solid transparent;
}

.btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

.btn-outline {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.hero .btn {
    background-color: white;
    color: var(--primary-color);
    border: 2px solid white;
}

.hero .btn:hover {
    background-color: transparent;
    color: white;
}

.hero .btn-outline {
    background-color: transparent;
    color: white;
}

.hero .btn-outline:hover {
    background-color: white;
    color: var(--primary-color);
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* Features Section */
.features {
    padding: 4rem 0;
    background: linear-gradient(to bottom, var(--background-color) 0%, rgba(247, 249, 252, 0.8) 100%);
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--primary-color);
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.feature-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

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

.feature-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    background: rgba(255, 107, 53, 0.1);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    transition: all 2s cubic-bezier(0.22, 1, 0.36, 1);
}

.feature-item:hover i {
    transform: rotateY(720deg);
    background: var(--primary-color);
    color: white;
}

.feature-item h3 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 0.5rem;
    transition: color 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.feature-item:hover h3 {
    color: var(--primary-color);
}

.feature-item h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--primary-color);
    opacity: 0;
    transition: all 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.feature-item:hover h3::after {
    opacity: 1;
    width: 60px;
}

.feature-item p {
    color: var(--text-color);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    opacity: 0.8;
    transform: translateY(0);
    transition: all 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.feature-item:hover p {
    opacity: 1;
    transform: translateY(-5px);
}

/* Feature item animations */
.feature-item.animate-visible {
    animation: featureCardIn 1.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

[dir="rtl"] .feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

@keyframes featureCardIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .features {
        padding: 3rem 0;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .feature-grid {
        gap: 2rem;
    }

    .feature-item {
        padding: 2rem 1.5rem;
    }

    .feature-item i {
        font-size: 2rem;
        width: 60px;
        height: 60px;
    }
}

/* CTA Section */
.cta.low-content {
    background-color: var(--light-bg);
    text-align: center;
    padding: 4rem 2rem;
    border-radius: 1rem;
    margin: 4rem auto;
    max-width: 1200px;
}

.cta h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta .btn {
    background-color: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}

.cta .btn-outline {
    background-color: transparent;
    color: var(--primary-color);
}

.cta .btn:hover {
    background-color: transparent;
    color: var(--primary-color);
}

.cta .btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Footer */
/* Footer Desktop Styles */
.footer {
    background: linear-gradient(135deg, var(--footer-bg) 80%, #191c3a 100%);
    color: #fff;
    padding: 4rem 0 0;
    margin-top: auto;
    width: 100%;
    box-shadow: 0 -4px 24px 0 rgba(0,0,0,0.12);
    border-top-left-radius: 2rem;
    border-top-right-radius: 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem 2rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem 2.5rem;
}

.footer-section:nth-child(2) {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: flex-start;
}

.footer-section:nth-child(2) h3 {
    text-align: center;
    border-bottom-color: transparent;
    position: relative;
}

.footer-section:nth-child(2) h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-section:nth-child(2) .footer-links {
    align-items: center;
}

[dir="rtl"] .footer-section:nth-child(2),
[dir="rtl"] .footer-section:nth-child(2) .footer-links {
    align-items: center;
    text-align: center;
}

[dir="rtl"] .footer-section:nth-child(2) h3::after {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
}

@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
}
.footer-section {
    padding: 0 1.5rem;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-section > p,
.footer-section > ul,
.footer-section .footer-links {
    width: 100%;
    text-align: center;
}

.footer-section p a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section p a:hover {
    color: var(--primary-color);
}

.footer-section p i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

[dir="rtl"] .footer-section p i {
    margin-right: 0;
    margin-left: 0.5rem;
}
.footer-section h1 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding-bottom: 0.5rem;
    width: 100%;
    text-align: center;
    position: relative;
}

.footer-section h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background-color: var(--primary-color);
}

[dir="rtl"] .footer-section h1::after {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1.2rem;
    font-size: 1.04rem;
    line-height: 1.7;
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    align-items: center;
}

.footer-links li {
    margin-bottom: 0;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
    display: block;
    padding: 0.3rem 0;
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

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

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1.2rem;
}

/* RTL Support for footer */
html[dir="rtl"] .footer-section {
    align-items: flex-end;
    text-align: right;
}
html[dir="rtl"] .footer-section h3 {
    border-bottom: 2px solid var(--primary-color);
    border-left: none;
    border-right: 2px solid var(--primary-color);
    direction: rtl;

}
html[dir="rtl"] .footer-links a {
    text-align: right;
}

.footer-social {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
    justify-content: center;
    width: 100%;
}

.footer-social a {
    color: #fff;
    font-size: 1.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer-social a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 1rem;
    text-align: center;
}
.footer-bottom p {
    color: #fff;
    font-size: 0.9rem;
}

/* Footer Mobile Styles */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
    .footer-section {
        text-align: center;
    }
    .footer-social {
        justify-content: center;
    }
}
/* About Page Styles */
.about-section {
    padding: 3rem 0;
    max-width: 1000px;
    margin: 0 auto;
}

.about-section h1 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.about-item {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.about-item h2 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.values-section {
    margin-top: 4rem;
}

.values-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--secondary-color);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.value-item {
    text-align: center;
    padding: 2rem;
    background: var(--light-bg);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.value-item:hover {
    transform: translateY(-5px);
}

.value-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.value-item h3 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

/* Services Page Styles */
.services-section {
    padding: 3rem 0;
}

.service-card {
    background: var(--light-bg);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

/* Contact Page Styles */
.contact-section {
    padding: 4rem 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width:100%;
    margin: 0 auto;
    padding: 0 1rem;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.info-card {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.info-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.info-card h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.info-card p {
    color: var(--text-color);
    opacity: 0.8;
    line-height: 1.6;
}

.contact-form {
    background: var(--light-bg);
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
}

.contact-form h2 {
    color: var(--secondary-color);
    margin-bottom: 2rem;
    text-align: center;
    font-size: 1.8rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--background-color);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
    outline: none;
}

.contact-form button {
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.contact-form button:hover {
    background: var(--primary-hover);
}

.contact-form button i {
    font-size: 1.1rem;
}

.map-section {
    padding: 4rem 0;
    background: var(--background-color);
}

.map-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.map-container iframe {
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    width: 100%;
    height: 450px;
}

/* Responsive Contact Page */
@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-info {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .contact-info {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 2rem;
    }

    .map-container iframe {
        height: 350px;
    }
}

@media (max-width: 480px) {
    .contact-form {
        padding: 1.5rem;
    }

    .info-card {
        padding: 1.5rem;
    }

    .map-container iframe {
        height: 300px;
    }
}

/* RTL Support for Contact Page */
[dir="rtl"] .contact-form button i {
    margin-left: 0;
    margin-right: 0.5rem;
}

[dir="rtl"] .form-group label {
    text-align: right;
}

/* Calculator Page Styles */
.calculator-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.calculator-form-wrapper {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.calculator-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--secondary-color);
}

.form-group select,
.form-group input {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group select:focus,
.form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* RTL Support */
[dir="rtl"] body {
    font-family: var(--font-primary-ar);
}

[dir="rtl"] .calculator-form {
    text-align: right;
}

[dir="rtl"] .form-group label {
    text-align: right;
}

[dir="rtl"] .result-item {
    flex-direction: row-reverse;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .calculator-section {
        padding: 1rem;
    }

    .calculator-form-wrapper {
        padding: 1.5rem;
    }

    .form-group select,
    .form-group input {
        padding: 0.875rem;
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .result-card {
        padding: 1rem;
    }

    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    [dir="rtl"] .result-item {
        align-items: flex-end;
    }

    .result-item.total {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    [dir="rtl"] .result-item.total {
        flex-direction: row-reverse;
    }
}

/* Tracking Page Styles */
.tracking-section {
    padding: 4rem 0;
    background: var(--background-color);
}

.tracking-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.tracking-form-wrapper {
    background: var(--light-bg);
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.tracking-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.tracking-form .form-group {
    margin-bottom: 0;
}

.tracking-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    font-weight: 500;
}

.tracking-form input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--background-color);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-size: 1rem;
}

.tracking-form input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
    outline: none;
}

.tracking-form .help-text {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.9rem;
}

.tracking-form button {
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tracking-form button:hover {
    background: var(--primary-hover);
}

.tracking-form button i {
    font-size: 1.1rem;
}

.tracking-result {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    margin-top: 2rem;
    display: none;
}

.tracking-result.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* RTL Support for Tracking Page */
[dir="rtl"] .tracking-form button i {
    margin-left: 0;
    margin-right: 0.5rem;
}

[dir="rtl"] .tracking-form label,
[dir="rtl"] .tracking-form .help-text {
    text-align: right;
}

/* Responsive Tracking Page */
@media (max-width: 768px) {
    .tracking-section {
        padding: 2rem 0;
    }

    .tracking-form-wrapper {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .tracking-form-wrapper {
        padding: 1.5rem;
    }

    .tracking-result {
        padding: 1.5rem;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .about-section h1 {
        font-size: 2rem;
    }

    .values-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-section {
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }
}

/* Quick Links Styles */
.left-aside {
    position: fixed;
    left: 20px;
    bottom: 120px;
    z-index: 90;
    background: var(--light-bg);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    max-width: 200px;
    transition: transform 0.3s ease;
}

.quick-links {
    width: 100%;
}

.quick-links h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.quick-links ul {
    list-style: none;
}

.quick-links li {
    margin-bottom: 0.75rem;
}

.quick-links a {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.quick-links a:hover {
    color: var(--primary-color);
}

@media (max-width: 1200px) {
    .left-aside {
        display: none;
    }
}

/* Chat Widget */
.chat-widget {
    display: none; /* Temporarily disabled */
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    font-family: var(--font-family);
}

.chat-container {
    position: absolute;
    bottom: calc(100% + 1rem);
    right: 0;
    width: 300px;
    background: var(--background-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.chat-container.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chat-header {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chat-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.chat-header p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.chat-messages {
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--background-color);
}

.message {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    max-width: 80%;
    word-wrap: break-word;
}

.user-message {
    background: var(--primary-color);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.bot-message {
    background: var(--light-bg);
    color: var(--text-color);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-input {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--background-color);
    border-top: 1px solid var(--border-color);
}

.chat-input input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.3s;
}

.chat-input input:focus {
    border-color: var(--primary-color);
}

.chat-input button {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s, background-color 0.3s;
}

.chat-input button:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.chat-toggle {
    background: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s, background-color 0.3s;
    box-shadow: var(--shadow-md);
}

.chat-toggle:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.chat-toggle i {
    font-size: 1.5rem;
}

.animate-fade-in {
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #121539 !important;
    text-decoration: none !important;
    border-bottom: none !important;
    transition: color 0.2s;
}

.brand-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

[dir="rtl"] .brand-label {
    gap: 0.5rem;
}

[dir="rtl"] .brand-label {
    flex-direction: row;
}

.nav-brand span,
.footer-brand h3,
.footer-content .footer-section h3 {
    color: #121539 !important;
    text-decoration: none !important;
    border-bottom: none !important;
}

.nav-brand span,
.footer-brand h3,
.footer-content .footer-section h3 {
    text-decoration: none !important;
    border-bottom: none !important;
}

.chat-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 2rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-toggle:hover {
    transform: translateY(-2px);
}

.chat-toggle span {
    font-weight: 500;
}

.chat-container {
    position: absolute;
    bottom: calc(100% + 1rem);
    right: 0;
    width: 300px;
    background: var(--light-bg);
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.chat-container.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chat-header {
    background: var(--gradient);
    color: white;
    padding: 1rem;
    font-size: 1.1rem;
}

.chat-messages {
    height: 300px;
    padding: 1rem;
    overflow-y: auto;
}

.chat-input {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.chat-input input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    font-size: 0.95rem;
}

.chat-input button {
    padding: 0.75rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-input button:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .banner {
        padding: 3rem 1rem;
        margin: 0 0 1rem 0;
        border-radius: 0;
    }

    .cta {
        margin: 1rem;
        padding: 2rem 1rem;
    }

    .chat-widget {
        bottom: 1rem;
        right: 1rem;
    }

    .chat-toggle span {
        display: none;
    }

    .chat-toggle {
        width: 50px;
        height: 50px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }

    .chat-container {
        width: calc(100vw - 2rem);
        right: -1rem;
    }
}

/* Animation Keyframes */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

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

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-scale-in {
    animation: scaleIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-float {
    animation: float 2.5s ease-in-out infinite;
}

/* Navigation Transitions */
.nav-links a {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a::after {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile Menu Animation */
@media (max-width: 768px) {
    .nav-links {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-links a {
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        transition-delay: calc(var(--item-index) * 0.05s);
    }
}

/* Service Cards */
.service-card {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card.visible {
    transition-delay: calc(var(--card-index, 0) * 0.1s);
}

.feature-icon {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Button Animations */
.btn {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn::before {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Chat Widget */
.chat-toggle {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-container {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading Screen */
.loader-wrapper {
    transition: opacity 0.4s ease-out;
}

.loader {
    animation: float 2.5s ease-in-out infinite;
}

.loader-circle {
    animation: spin 1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.loader-logo {
    animation: pulse 2s ease-in-out infinite;
}
/* Page Loading Animation */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.page-loader.active {
    opacity: 1;
    visibility: visible;
}

.page-loader .loader-content {
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.5s ease;
}

.page-loader.active .loader-content {
    transform: translateY(0);
}

.page-loader .loading-icon {
    width: 80px;
    height: 80px;
    position: relative;
    margin-bottom: 1.5rem;
}

.page-loader .loading-icon:before,
.page-loader .loading-icon:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
}

.page-loader .loading-icon:before {
    border-top-color: var(--primary-color);
    border-right-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

.page-loader .loading-icon:after {
    border-bottom-color: var(--secondary-color);
    border-left-color: var(--secondary-color);
    animation: spin 1.5s linear reverse infinite;
}

.page-loader .loading-text {
    color: var(--secondary-color);
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.9;
    margin-top: 1rem;
}

.page-loader .loading-progress {
    width: 200px;
    height: 3px;
    background: var(--border-color);
    border-radius: 3px;
    margin-top: 1rem;
    overflow: hidden;
}

.page-loader .loading-progress-bar {
    width: 0;
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    animation: progress 2s ease infinite;
}

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

@keyframes progress {
    0% { width: 0; }
    50% { width: 100%; }
    100% { width: 0; }
}

[dir="rtl"] .page-loader .loading-text {
    font-family: var(--font-primary-ar);
}

/* Loading Animation */
.loading-spinner {
    display: none;
    width: 40px;
    height: 40px;
    margin: 20px auto;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-spinner.active {
    display: block;
}

.loading-text {
    display: none;
    text-align: center;
    color: var(--secondary-color);
    margin: 10px 0;
    font-size: 0.9rem;
}

.loading-text.active {
    display: block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Hide result while loading */
.calculator-form.loading .result-card {
    display: none;
}

/* Services Page Styles */
.services-hero {
    background: linear-gradient(rgba(46, 41, 78, 0.8), rgba(46, 41, 78, 0.8)), url('../assets/services-hero.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 4rem 1rem;
    margin-bottom: 3rem;
    border-radius: 0.5rem;
}

.services-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.services-hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

.service-section {
    margin-bottom: 4rem;
    padding: 2rem;
    background: var(--header-bg);
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.service-section:hover {
    transform: translateY(-5px);
}

.service-section h2 {
    color: var(--secondary-color);
    font-size: 2rem;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.service-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

.service-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.service-info {
    padding-right: 2rem;
}

.service-info p {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.service-features {
    list-style: none;
    padding: 0;
}

.service-features li {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.service-features li i {
    color: var(--primary-color);
    margin-right: 1rem;
    font-size: 1.2rem;
}

.service-image {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 1rem;
    transition: transform 0.3s ease;
}

.service-image:hover img {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .services-hero {
        padding: 3rem 1rem;
    }

    .services-hero h1 {
        font-size: 2.5rem;
    }

    .service-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .service-info {
        padding-right: 0;
    }

    .service-image {
        height: 300px;
    }
}

/* Calculator Mobile Styles */
@media (max-width: 768px) {
    .calculator-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1rem;
    }

    .calculator-form-wrapper {
        padding: 1rem;
    }

    .calculator-form {
        padding: 1rem;
    }

    .info-grid {
        gap: 1rem;
    }

    .info-card {
        padding: 1.5rem;
    }

    .calculator-section {
        padding: 2rem 0;
    }

    /* Improved typography for mobile */
    .section-title h1 {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }

    .section-title p {
        font-size: 1rem;
        padding: 0 1rem;
    }
}

/* Ensure form elements are touch-friendly on mobile */
@media (max-width: 480px) {
    .form-group select,
    .form-group input,
    .btn-primary {
        padding: 0.75rem;
        min-height: 44px; /* Minimum touch target size */
    }

    .result-item {
        font-size: 0.9rem;
    }

    .result-item.total {
        font-size: 1rem;
    }

    .result-item.total span:last-child {
        font-size: 1.2rem;
    }
}

/* RTL Support */
[dir="rtl"] {
    font-family: var(--font-primary-ar);
}

[dir="rtl"] .nav-brand {
    flex-direction: row-reverse;
}

[dir="rtl"] .nav-links a i,
[dir="rtl"] .nav-links button i {
    margin-left: 0.5rem;
    margin-right: 0;
}

[dir="rtl"] .feature-item i {
    margin-left: 0.5rem;
    margin-right: 0;
}

[dir="rtl"] .footer-links li::before {
    transform: rotate(180deg);
}

[dir="rtl"] .chat-widget {
    left: 2rem;
    right: auto;
}

[dir="rtl"] .chat-input button {
    right: auto;
    left: 0.5rem;
}

[dir="rtl"] .chat-input input {
    padding-right: 1rem;
    padding-left: 3rem;
}

[dir="rtl"] .btn i {
    margin-left: 0.5rem;
    margin-right: 0;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
}

.language-switcher button {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.language-switcher button:hover {
    color: var(--primary-color);
}

.language-switcher button.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Auth Section */
.auth-section {
    padding: 4rem 1rem;
    min-height: calc(100vh - 400px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
}

.auth-container {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
}

.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.auth-tab {
    flex: 1;
    padding: 1rem;
    text-align: center;
    background: none;
    border: none;
    color: var(--text-color);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-tab.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="tel"] {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.auth-form input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.password-input {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 0;
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-password:hover {
    text-decoration: underline;
}

.auth-form .btn {
    width: 100%;
    margin-top: 1rem;
}

/* RTL Support for Auth Forms */
html[dir="rtl"] .toggle-password {
    right: auto;
    left: 1rem;
}

html[dir="rtl"] .auth-form label {
    text-align: right;
}

/* Mobile RTL Adjustments */
@media (max-width: 768px) {
    [dir="rtl"] .nav-links {
        left: -100%;
        right: auto;
    }

    [dir="rtl"] .nav-links.active {
        left: 0;
        right: auto;
    }

    [dir="rtl"] .menu-toggle {
        margin-left: 0;
        margin-right: auto;
    }

    [dir="rtl"] .language-switcher {
        margin-right: 1rem;
        margin-left: 0;
    }
}

/* Loading Animation */
.loading-spinner {
    display: none;
    width: 40px;
    height: 40px;
    margin: 20px auto;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-spinner.active {
    display: block;
}

.loading-text {
    display: none;
    text-align: center;
    color: var(--secondary-color);
    margin: 10px 0;
    font-size: 0.9rem;
}

.loading-text.active {
    display: block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Hide result while loading */
.calculator-form.loading .result-card {
    display: none;
}

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
}

[dir="rtl"] .nav-links {
    margin-left: 0;
    margin-right: 0;
    justify-content: center;
    flex: 1 1 auto;
    display: flex !important;
}
/* Remove RTL flex order overrides so order matches English */


[dir="rtl"] .navbar .nav-links a i,
[dir="rtl"] .navbar .nav-links button i {
    margin-right: 0;
    margin-left: 0.5rem;
}

[dir="rtl"] .contact-form label {
    text-align: right;
}

[dir="rtl"] .form-group {
    text-align: right;
}

[dir="rtl"] .info-card i {
    margin-right: 0;
    margin-left: 0.5rem;
}

[dir="rtl"] .footer-content {
    text-align: right;
}

[dir="rtl"] .social-links a {
    margin-right: 0;
    margin-left: 1rem;
}

[dir="rtl"] .chat-widget {
    left: 2rem;
    right: auto;
}

[dir="rtl"] .chat-input button {
    right: auto;
    left: 0.5rem;
}

[dir="rtl"] .chat-input input {
    padding-right: 1rem;
    padding-left: 3rem;
}

[dir="rtl"] .btn i {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* Language Toggle Button */
.language-toggle {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    margin-left: 1rem;
}

.language-toggle:hover {
    background: var(--primary-color);
    color: white;
}

.language-toggle i {
    font-size: 1rem;
}
