/*
 Theme Name: LP Portfolio - Service Marketplace
 Theme URI: https://yoursite.com
 Author: Your Name
 Description: Enterprise FINAL Platform - المنصة النهائية الشاملة
 Version: 27.0.0
*/

/* =========================================
   1. SPACE COLOR PALETTE
   =========================================/* CSS Variables - Light Professional Theme */
:root {
    /* Primary Colors - Professional & Clean */
    --color-primary: #2563eb;
    /* Blue */
    --color-secondary: #7c3aed;
    /* Purple */
    --color-accent: #0891b2;
    /* Cyan */

    /* Text Colors */
    --text-dark: #1f2937;
    /* Almost Black */
    --text-medium: #4b5563;
    /* Medium Gray */
    --text-light: #6b7280;
    /* Light Gray */

    /* Background Colors */
    --bg-white: #ffffff;
    --bg-light: #f9fafb;
    --bg-gray: #f3f4f6;

    /* Border Colors */
    --border-light: #e5e7eb;
    --border-medium: #d1d5db;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* =========================================
   2. RESET & BASE
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    color: var(--text-dark);
    background: var(--bg-white);
    line-height: 1.6;
    direction: rtl;
    text-align: right;
    position: relative;
    overflow-x: hidden;
    padding-top: 80px;
    /* Space for fixed header */
}

/* Stars background removed from body - will be applied to hero section only */

/* =========================================
   3. TYPOGRAPHY
   ========================================= */
h1,
h2,
h3,
h4 {
    font-family: 'Cairo', sans-serif;
    color: var(--text-dark);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: var(--color-primary);
    transition: 0.3s;
}

a:hover {
    color: var(--color-secondary);
}

p {
    color: var(--text-medium);
    line-height: 1.7;
}

/* =========================================
   4. PROFESSIONAL BUTTONS
   ========================================= */
.btn-glow,
.btn-primary {
    display: inline-block;
    padding: 14px 35px;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    background: var(--color-primary);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.btn-glow:hover,
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: #1d4ed8;
}

.btn-outline {
    display: inline-block;
    padding: 14px 35px;
    border-radius: 8px;
    font-weight: 600;
    border: 2px solid var(--color-primary);
    background: transparent;
    color: var(--color-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
}

/* =========================================
   5. HEADER - CLEAN & PROFESSIONAL
   ========================================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 80px;
    position: relative;
    z-index: 1;
}

/* Logo */
.site-logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.site-logo a:hover {
    transform: scale(1.05);
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Desktop Navigation */
.main-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav a,
.nav-link {
    color: var(--text-medium);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--color-primary);
}

.nav-link:hover::after {
    width: 100%;
}

/* CTA Button */
.header-cta .btn {
    padding: 12px 28px;
    font-size: 1rem;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--color-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active .hamburger:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active .hamburger:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
    z-index: 999;
    box-shadow: var(--shadow-md);
}

.mobile-nav.active {
    max-height: 500px;
    opacity: 1;
}

.mobile-nav ul {
    list-style: none;
    margin: 0;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-nav-link {
    display: block;
    color: var(--text-medium);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 12px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-nav-link:hover {
    background: var(--bg-light);
    color: var(--color-primary);
    transform: translateX(5px);
}

/* Responsive Breakpoints */
@media (max-width: 968px) {

    .desktop-nav,
    .desktop-only {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: flex !important;
    }

    .header-container {
        padding: 0 1.5rem;
        height: 70px;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }

    .logo-text {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 1rem;
        height: 60px;
    }

    .logo-icon {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }

    .logo-text {
        font-size: 1.1rem;
    }

    .mobile-nav ul {
        padding: 1.5rem 1rem;
    }
}


/* =========================================
   6. HERO SECTION
   ========================================= */
.hero-premium {
    /* Dark space background for hero only */
    background: linear-gradient(135deg, #0a0f1e 0%, #1a1f3e 100%);
    padding: 180px 20px 120px;
    text-align: center;
    position: relative;
    z-index: 1;
    overflow: hidden;
    border-bottom: 1px solid var(--border-light);
}

/* Stars canvas container - hero only */
.hero-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 60%, white, transparent),
        radial-gradient(1px 1px at 33% 85%, white, transparent),
        radial-gradient(1px 1px at 15% 95%, white, transparent);
    background-size: 200% 200%;
    animation: stars 60s linear infinite;
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

@keyframes stars {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 100% 100%;
    }
}

.hero-title-premium {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: white;
    position: relative;
    z-index: 2;
    text-shadow: 0 0 40px rgba(0, 212, 255, 0.5);
}

.hero-desc-premium {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto 40px;
    position: relative;
    z-index: 2;
    line-height: 1.8;
}

.hero-cta-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

/* =========================================
   7. CLEAN PROFESSIONAL CARDS
   ========================================= */
.premium-card,
.project-card-3d,
.template-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 30px;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.premium-card:hover,
.project-card-3d:hover,
.template-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.premium-card h3,
.project-card-3d h3,
.template-card h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.premium-card p,
.project-card-3d p,
.template-card p {
    color: var(--text-medium);
}

.card-icon {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 20px;
    filter: drop-shadow(var(--glow-cyan));
}

/* =========================================
   8. GRIDS
   ========================================= */
.services-grid-premium,
.portfolio-grid-premium,
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    position: relative;
    z-index: 1;
}

/* =========================================
   9. SECTIONS
   ========================================= */
.section-padding {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-align: center;
}

.section-subtitle {
    color: var(--text-gray);
    font-size: 1.1rem;
    margin-bottom: 50px;
    text-align: center;
}

.text-center {
    text-align: center;
}

.bg-section {
    background: rgba(124, 58, 237, 0.05);
}

/* =========================================
   10. FOOTER
   ========================================= */
.site-footer-premium {
    background: rgba(10, 10, 15, 0.95);
    border-top: 1px solid rgba(0, 217, 255, 0.2);
    color: var(--text-gray);
    padding: 60px 0 30px;
    margin-top: 100px;
    position: relative;
    z-index: 1;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

/* =========================================
   11. RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
    .hero-title-premium {
        font-size: 2rem;
    }

    .services-grid-premium,
    .portfolio-grid-premium,
    .templates-grid {
        grid-template-columns: 1fr;
    }

    .main-nav {
        display: none;
    }
}

/* =========================================
   12. ANIMATIONS
   ========================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

[data-aos] {
    animation: fadeInUp 0.6s ease-out;
}

/* =========================================
   13. UTILITIES
   ========================================= */
.highlight-text {
    color: var(--color-primary);
    text-shadow: var(--glow-cyan);
}

/* =========================================
   14. 🆕 SCROLL ANIMATIONS
   ========================================= */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   15. 🆕 TOAST NOTIFICATIONS
   ========================================= */
#toast-container {
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    min-width: 300px;
    max-width: 500px;
}

.toast {
    padding: 15px 25px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.toast-error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.toast-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

/* =========================================
   16. RESPONSIVE ADJUSTMENTS FOR HEADER
   ========================================= */
@media (max-width: 968px) {
    body {
        padding-top: 70px;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 60px;
    }
}

/* =========================================
   17. CONTAINER & LAYOUT UTILITIES
   ========================================= */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 1200px) {
    .container {
        max-width: 1140px;
        padding: 0 1.5rem;
    }
}

@media (max-width: 968px) {
    .container {
        max-width: 960px;
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 720px;
        padding: 0 1.25rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
}

/* Grid System */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 968px) {

    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* =========================================
   18. TYPOGRAPHY RESPONSIVE
   ========================================= */
h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

p {
    font-size: clamp(1rem, 1.5vw, 1.125rem);
}

/* =========================================
   19. SPACING UTILITIES
   ========================================= */
.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mt-5 {
    margin-top: 3rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.pt-1 {
    padding-top: 0.5rem;
}

.pt-2 {
    padding-top: 1rem;
}

.pt-3 {
    padding-top: 1.5rem;
}

.pt-4 {
    padding-top: 2rem;
}

.pt-5 {
    padding-top: 3rem;
}

.pb-1 {
    padding-bottom: 0.5rem;
}

.pb-2 {
    padding-bottom: 1rem;
}

.pb-3 {
    padding-bottom: 1.5rem;
}

.pb-4 {
    padding-bottom: 2rem;
}

.pb-5 {
    padding-bottom: 3rem;
}

/* =========================================
   20. DISPLAY UTILITIES
   ========================================= */
.d-none {
    display: none;
}

.d-block {
    display: block;
}

.d-flex {
    display: flex;
}

.d-grid {
    display: grid;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-column {
    flex-direction: column;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.gap-3 {
    gap: 1.5rem;
}

.gap-4 {
    gap: 2rem;
}

/* =========================================
   21. TEXT UTILITIES
   ========================================= */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.text-primary {
    color: var(--color-primary);
}

.text-secondary {
    color: var(--color-secondary);
}

.text-white {
    color: var(--text-white);
}

.text-gray {
    color: var(--text-gray);
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.font-normal {
    font-weight: 400;
}

/* =========================================
   22. CARD ENHANCEMENTS
   ========================================= */
.card {
    background: rgba(20, 25, 45, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(0, 217, 255, 0.1);
    padding: 2rem;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 217, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 217, 255, 0.2);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-white);
}

.card-text {
    color: var(--text-gray);
    line-height: 1.7;
}

/* =========================================
   23. SECTION IMPROVEMENTS
   ========================================= */
section {
    padding: 5rem 0;
}

@media (max-width: 968px) {
    section {
        padding: 4rem 0;
    }
}

@media (max-width: 640px) {
    section {
        padding: 3rem 0;
    }
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    background: linear-gradient(135deg, #00d4ff, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* =========================================
   24. BUTTON IMPROVEMENTS
   ========================================= */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-sm {
    padding: 10px 24px;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 18px 40px;
    font-size: 1.1rem;
}

@media (max-width: 640px) {
    .btn {
        padding: 12px 28px;
        font-size: 0.95rem;
    }

    .btn-lg {
        padding: 14px 32px;
        font-size: 1rem;
    }
}

/* =========================================
   25. IMAGE OPTIMIZATION
   ========================================= */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.img-fluid {
    width: 100%;
    height: auto;
}

.img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================================
   26. LOADING STATES
   ========================================= */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--color-primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================
   27. ACCESSIBILITY IMPROVEMENTS
   ========================================= */
.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-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* =========================================
   28. PRINT STYLES
   ========================================= */
@media print {

    .no-print,
    .site-header,
    .mobile-nav,
    .stars-background,
    #stars-canvas {
        display: none !important;
    }

    body {
        padding-top: 0;
        background: white;
        color: black;
    }
}