/* EnviroGate - Premium Modern Design 2024 */

/* ========================================
   CSS VARIABLES - Design System
   ======================================== */
:root {
    /* Primary Colors */
    --primary: #14664c;
    --primary-dark: #0d5940;
    --primary-light: #1a8a68;
    --primary-gradient: linear-gradient(135deg, #14664c 0%, #1a8a68 50%, #20a676 100%);

    /* Secondary & Accent */
    --secondary: #3498db;
    --accent: #10b981;
    --accent-glow: rgba(16, 185, 129, 0.3);

    /* Status Colors */
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 40px rgba(20, 102, 76, 0.3);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Typography - Premium Arabic Fonts */
    --font-primary: 'Almarai', 'Readex Pro', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Almarai', 'IBM Plex Sans Arabic', sans-serif;

    /* Spacing */
    --container-max: 1280px;
    --section-padding: 100px;
}

/* ========================================
   RESET & BASE
   ======================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-primary);
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.7;
    font-size: 16px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography - Display Font for Headings */
h1,
h2,
h3,
h4,
h5,
h6,
.hero-title,
.section-title,
.cta-title,
.feature-title,
.step-title {
    font-family: var(--font-display);
    font-weight: 700;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* ========================================
   CONTAINER
   ======================================== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* ========================================
   TOPBAR - Language & User Menu
   ======================================== */
.topbar {
    background: var(--gray-900);
    color: var(--gray-300);
    font-size: 13px;
    border-bottom: 1px solid var(--gray-800);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.topbar-content {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 40px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Language Switcher in Topbar */
.topbar-language-switcher {
    display: flex;
    gap: 4px;
    align-items: center;
}

.topbar-language-switcher .lang-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--gray-300);
    font-size: 12px;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid transparent;
}

.topbar-language-switcher .lang-btn:hover {
    background: var(--gray-800);
    color: var(--white);
}

.topbar-language-switcher .lang-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.topbar-language-switcher .lang-flag {
    font-size: 14px;
}

.topbar-language-switcher .lang-code {
    font-weight: 600;
}

/* User Menu */
.topbar-user-menu {
    position: relative;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    background: transparent;
    border: none;
    color: var(--gray-300);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: var(--transition);
    font-size: 13px;
    font-family: inherit;
}

.user-menu-toggle:hover {
    background: var(--gray-800);
    color: var(--white);
}

.user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--gray-700);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    font-size: 12px;
}

.user-name {
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-toggle i {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.user-menu-toggle.active i {
    transform: rotate(180deg);
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1001;
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.user-menu-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.user-menu-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-menu-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-menu-info {
    flex: 1;
    min-width: 0;
}

.user-menu-name {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 14px;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-type {
    font-size: 12px;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 4px;
}

.user-menu-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 8px 0;
}

.user-menu-items {
    padding: 8px 0;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--gray-700);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.user-menu-item:hover {
    background: var(--gray-50);
    color: var(--primary);
}

.user-menu-item i {
    width: 18px;
    text-align: center;
    font-size: 16px;
}

.user-menu-item.user-menu-logout {
    color: var(--danger);
}

.user-menu-item.user-menu-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Auth Links in Topbar */
.topbar-auth-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    color: var(--gray-300);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.topbar-link:hover {
    background: var(--gray-800);
    color: var(--white);
}

.topbar-link-primary {
    background: var(--primary);
    color: var(--white);
}

.topbar-link-primary:hover {
    background: var(--primary-dark);
}

/* Responsive Topbar */
@media (max-width: 768px) {
    .topbar {
        display: none;
        /* Hide topbar on mobile, show language switcher in main header instead */
    }

    .language-switcher.mobile-only {
        display: flex !important;
        margin-left: 0;
        margin-top: 15px;
        width: 100%;
        justify-content: center;
    }

    .language-switcher.mobile-only a {
        flex: 1;
        justify-content: center;
    }
}

/* ========================================
   HEADER - Premium Navigation
   ======================================== */
.header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 40px;
    /* Account for topbar height */
    left: 0;
    right: 0;
    z-index: 999;
    transition: var(--transition);
}

@media (max-width: 768px) {
    .header {
        top: 0;
        /* No topbar on mobile */
        position: fixed;
    }
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
}

.header-content {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 26px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {

    height: 70px;
    object-fit: cover;
    border-radius: var(--radius-lg);
}

.logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary);
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: var(--shadow-md);
}

.logo-text {
    font-weight: 700;
    font-size: 24px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav a {
    color: var(--gray-700);
    padding: 10px 18px;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.nav a:hover {
    color: var(--primary);
    background: var(--gray-100);
}

.nav a.active {
    color: var(--primary);
    background: rgba(20, 102, 76, 0.08);
}

/* User Menu in Header */
.header-user-menu {
    position: relative;
    margin-left: 12px;
}

.header-user-menu .user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: transparent;
    border: 2px solid var(--gray-200);
    color: var(--gray-700);
    cursor: pointer;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    font-size: 14px;
    font-family: inherit;
}

.header-user-menu .user-menu-toggle:hover {
    background: var(--gray-50);
    border-color: var(--primary);
    color: var(--primary);
}

.header-user-menu .user-menu-toggle.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.header-user-menu .user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-user-menu .user-name {
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-user-menu .user-menu-toggle i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.header-user-menu .user-menu-toggle.active i {
    transform: rotate(180deg);
}

.header-user-menu .user-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1001;
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.header-user-menu .user-menu-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 6px;
    margin-left: 15px;
}

.language-switcher a {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
    font-family: inherit;
    cursor: pointer;
    border: 2px solid transparent;
}

.language-switcher a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(20, 102, 76, 0.15);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius-md);
    color: var(--gray-700);
    font-size: 22px;
    cursor: pointer;
    transition: var(--transition);
    align-items: center;
    justify-content: center;
}

.menu-toggle:hover {
    background: var(--gray-200);
}

/* ========================================
   BUTTONS - Premium Styles
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn:active {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(20, 102, 76, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(20, 102, 76, 0.4);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--white);
}

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

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

.btn-white {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-md);
}

.btn-white:hover {
    box-shadow: var(--shadow-xl);
}

.btn-lg {
    padding: 18px 36px;
    font-size: 17px;
    border-radius: var(--radius-xl);
}

.btn-icon {
    font-size: 20px;
}

/* ========================================
   PAGINATION - Modern Design
   ======================================== */
.pagination {
    display: flex;
    padding-left: 0;
    list-style: none;
    border-radius: var(--radius-md);
    gap: 8px;
    margin-top: 40px;
}

.page-item {
    display: inline-block;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    color: var(--gray-600);
    text-decoration: none;
    background-color: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    transition: all var(--transition-fast);
}

.page-link:hover {
    color: var(--primary);
    background-color: var(--gray-100);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.page-item.active .page-link {
    z-index: 3;
    color: var(--white);
    background: var(--primary-gradient);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(20, 102, 76, 0.2);
}

.page-item.disabled .page-link {
    color: var(--gray-400);
    pointer-events: none;
    cursor: default;
    background-color: var(--white);
    border-color: var(--gray-200);
}

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

/* ========================================
   HERO SECTION - Stunning Design
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(16, 185, 129, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(20, 102, 76, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(52, 152, 219, 0.1) 0%, transparent 50%);
    animation: heroGlow 10s ease-in-out infinite;
}

@keyframes heroGlow {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-particles span {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: float 15s infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
    color: var(--white);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-full);
    font-size: 21px;
    font-weight: 500;
    color: #10b981;
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease;
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.hero-title {
    font-size: clamp(40px, 6vw, 72px);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease 0.1s backwards;
}

.hero-title span {
    background: linear-gradient(135deg, #10b981, #14b8a6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: clamp(18px, 2.5vw, 22px);
    color: rgba(255, 255, 255, 0.8);
    max-width: 650px;
    margin: 0 auto 40px;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.3s backwards;
}

/* ========================================
   HERO PROJECT CTA BUTTON - Inline Design
   ======================================== */
.hero-project-cta {
    margin: 20px auto 0;
    display: flex;
    justify-content: center;
    animation: fadeInUp 0.8s ease 0.35s backwards;
}

.btn-project-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    font-size: 15px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: var(--radius-xl);
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-project-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn-project-cta:hover::before {
    left: 100%;
}

.btn-project-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.btn-project-cta:active {
    transform: translateY(-1px);
}

.btn-project-cta i:first-child {
    font-size: 18px;
}

.btn-project-cta .cta-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 4px;
}

.btn-project-cta .bi-stars {
    font-size: 14px;
    opacity: 0.9;
}

.btn-project-cta .cta-sub-text {
    font-weight: 500;
    opacity: 0.95;
    font-size: 14px;
}

/* Responsive adjustments for CTA button */
@media (max-width: 768px) {
    .hero-project-cta {
        padding: 0 16px;
    }

    .btn-project-cta {
        padding: 14px 24px;
        font-size: 14px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .btn-project-cta .cta-divider {
        display: none;
    }

    .btn-project-cta .cta-sub-text {
        width: 100%;
        text-align: center;
        font-size: 12px;
        margin-top: 4px;
        opacity: 0.85;
    }

    .btn-project-cta .bi-stars {
        display: none;
    }
}

@media (max-width: 480px) {
    .btn-project-cta {
        padding: 12px 20px;
        font-size: 13px;
        width: 100%;
    }
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

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

.hero-stat-number {
    font-size: 42px;
    font-weight: 700;
    background: linear-gradient(135deg, #10b981, #14b8a6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.hero-stat-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   FEATURES SECTION
   ======================================== */
.features {
    padding: var(--section-padding) 0;
    background: var(--white);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(20, 102, 76, 0.08);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-title {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 20px;
    line-height: 1.2;
}

.section-description {
    font-size: 18px;
    color: var(--gray-500);
    line-height: 1.8;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: var(--transition);
}

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

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(20, 102, 76, 0.1), rgba(16, 185, 129, 0.1));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 24px;
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    background: var(--primary-gradient);
    transform: scale(1.1) rotate(-5deg);
}

.feature-card:hover .feature-icon span {
    filter: brightness(10);
}

.feature-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.feature-description {
    color: var(--gray-500);
    line-height: 1.7;
    font-size: 15px;
}

/* ========================================
   HOW IT WORKS SECTION
   ======================================== */
.how-it-works {
    padding: var(--section-padding) 0;
    background: var(--gray-50);
}

.steps-container {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    position: relative;
}

.steps-container::before {
    content: '';
    position: absolute;
    top: 50px;
    left: 100px;
    right: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 50%, var(--primary) 100%);
    border-radius: 10px;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 100px;
    height: 100px;
    background: var(--white);
    border: 4px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
    margin: 0 auto 24px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.step:hover .step-number {
    background: var(--primary-gradient);
    color: var(--white);
    border-color: transparent;
    transform: scale(1.1);
}

.step-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.step-description {
    color: var(--gray-500);
    font-size: 15px;
    max-width: 250px;
    margin: 0 auto;
}

/* ========================================
   STATS SECTION
   ======================================== */
.stats-section {
    padding: 80px 0;
    background: var(--primary-gradient);
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    position: relative;
    z-index: 1;
}

.stat-item {
    text-align: center;
    color: var(--white);
}

.stat-number {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.stat-label {
    font-size: 16px;
    opacity: 0.9;
    font-weight: 500;
}

/* ========================================
   PROJECTS PREVIEW
   ======================================== */
.projects-preview {
    padding: var(--section-padding) 0;
    background: var(--white);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.project-card-header {
    padding: 24px;
    border-bottom: 1px solid var(--gray-100);
}

.project-category {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(20, 102, 76, 0.08);
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: 12px;
}

.project-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
    line-height: 1.4;
}

.project-title a {
    color: inherit;
}

.project-title a:hover {
    color: var(--primary);
}

.project-excerpt {
    color: var(--gray-500);
    font-size: 14px;
    line-height: 1.6;
}

.project-card-body {
    padding: 20px 24px;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.project-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--gray-600);
}

.project-meta-item i {
    color: var(--primary);
}

.project-card-footer {
    padding: 16px 24px;
    background: var(--gray-50);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-budget {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.project-quotes {
    font-size: 13px;
    color: var(--gray-500);
}

/* ========================================
   EXPERTS PREVIEW
   ======================================== */
.experts-preview {
    padding: var(--section-padding) 0;
    background: var(--gray-50);
}

.experts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.expert-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 30px;
    text-align: center;
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.expert-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.expert-avatar {
    width: 100px;
    height: 100px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 40px;
    color: var(--white);
    box-shadow: 0 10px 30px rgba(20, 102, 76, 0.3);
}

.expert-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.expert-specialty {
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
}

.expert-rating {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 20px;
}

.expert-rating span {
    color: #fbbf24;
    font-size: 18px;
}

.expert-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-100);
}

.expert-stats div {
    text-align: center;
}

.expert-stats strong {
    display: block;
    font-size: 20px;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.expert-stats small {
    color: var(--gray-500);
    font-size: 12px;
}

/* ========================================
   CTA SECTION
   ======================================== */
.cta-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.2), transparent 70%);
    border-radius: 50%;
}

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

.cta-title {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    color: var(--white);
    margin-bottom: 20px;
}

.cta-description {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    line-height: 1.8;
}

/* ========================================
   FOOTER - Premium Design
   ======================================== */
.footer {
    background: var(--gray-900);
    color: var(--white);
    padding-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.footer-logo-icon {
    width: 45px;
    height: 45px;
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.footer-logo-text {
    font-size: 24px;
    font-weight: 700;
}

.footer-description {
    color: var(--gray-400);
    line-height: 1.8;
    margin-bottom: 24px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-column h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--white);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-links a {
    color: var(--gray-400);
    font-size: 15px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
    padding-right: 8px;
}

.footer-bottom {
    padding: 30px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--gray-400);
    font-size: 14px;
}

/* ========================================
   FORMS - Premium Styling
   ======================================== */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition);
    background: var(--white);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(20, 102, 76, 0.1);
}

.form-control::placeholder {
    color: var(--gray-400);
}

textarea.form-control {
    resize: vertical;
    min-height: 140px;
}

/* ========================================
   BADGES
   ======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

.badge-primary {
    background: rgba(20, 102, 76, 0.1);
    color: var(--primary);
}

/* ========================================
   RESPONSIVE - Mobile First
   ======================================== */
@media (max-width: 1024px) {
    :root {
        --section-padding: 80px;
    }

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

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

@media (max-width: 768px) {
    :root {
        --section-padding: 60px;
    }

    .header-content {
        height: 70px;
    }

    .menu-toggle {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        bottom: 0;
        background: #ffffff !important;
        flex-direction: column;
        padding: 24px;
        gap: 8px;
        transform: translateX(-100%);
        transition: var(--transition);
        z-index: 1100;
        height: calc(100vh - 70px);
        width: 100%;
    }

    .nav.active {
        transform: translateX(0);
    }

    .nav a {
        width: 100%;
        padding: 16px;
        text-align: center;
        border-radius: var(--radius-lg);
        background: var(--gray-50);
    }

    .nav a:hover {
        background: var(--gray-100);
    }

    .header-user-menu {
        margin-left: 0;
        margin-top: 12px;
        width: 100%;
    }

    .header-user-menu .user-menu-toggle {
        width: 100%;
        justify-content: center;
    }

    .header-user-menu .user-menu-dropdown {
        position: fixed;
        top: 80px;
        bottom: 80px;
        right: 12px;
        left: 12px;
        width: calc(100% - 24px);
        max-width: 320px;
        max-height: calc(100vh - 160px);
        margin: 0 auto;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        z-index: 1101;
    }
    
    .header-user-menu .user-menu-items {
        padding-bottom: 20px;
    }

    .language-switcher {
        margin-left: 0;
        margin-top: 15px;
        width: 100%;
        justify-content: center;
    }

    .language-switcher a {
        flex: 1;
        justify-content: center;
    }

    .hero {
        padding: 100px 0 60px;
        min-height: auto;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 30px;
    }

    .hero-stat {
        flex: 1;
        min-width: 120px;
    }

    .steps-container {
        flex-direction: column;
        gap: 40px;
    }

    .steps-container::before {
        display: none;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .stat-number {
        font-size: 40px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .features-grid,
    .projects-grid,
    .experts-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ========================================
   RTL SUPPORT
   ======================================== */
[dir="rtl"] .footer-links a:hover {
    padding-right: 0;
    padding-left: 8px;
}

[dir="rtl"] .project-meta-item i,
[dir="rtl"] .feature-icon {
    margin-left: 0;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fadeIn {
    animation: fadeInUp 0.6s ease;
}

.animate-slideIn {
    animation: slideInRight 0.6s ease;
}

.animate-scaleIn {
    animation: scaleIn 0.6s ease;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary);
}

.text-muted {
    color: var(--gray-500);
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mt-4 {
    margin-top: 32px;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.mb-4 {
    margin-bottom: 32px;
}

.d-flex {
    display: flex;
}

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

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

.gap-1 {
    gap: 8px;
}

.gap-2 {
    gap: 16px;
}

.gap-3 {
    gap: 24px;
}