/**
 * MahmoudHssn Ghost Theme
 * Apple-inspired minimalism with Ghost elegance
 * 
 * Table of Contents:
 * 1. Design Tokens (CSS Variables)
 * 2. Reset & Base
 * 3. Typography
 * 4. Layout & Container
 * 5. Header & Navigation
 * 6. Hero Section
 * 7. Sections & Content
 * 8. Cards (Projects, Products, Blog)
 * 9. Services Page
 * 10. Buttons & Forms
 * 11. Footer
 * 12. Post & Page Content
 * 13. Components (Testimonials, FAQ, etc.)
 * 14. Animations
 * 15. Dark Mode
 * 16. RTL Support
 * 17. Responsive Design
 * 18. Utilities
 */

/* ============================================
   1. DESIGN TOKENS (CSS Variables)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Alexandria:wght@100;200;300;400;500;600;700;800;900&display=swap');

:root {
    /* Typography */
    --font-primary: 'Alexandria', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    
    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;
    --text-7xl: 4.5rem;
    
    /* Font Weights */
    --weight-thin: 100;
    --weight-light: 300;
    --weight-regular: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;
    --weight-black: 900;
    
    /* Colors - Light Mode */
    --color-bg: #ffffff;
    --color-bg-secondary: #f5f5f7;
    --color-bg-tertiary: #fbfbfd;
    --color-text: #1d1d1f;
    --color-text-secondary: #6e6e73;
    --color-text-tertiary: #86868b;
    --color-border: #d2d2d7;
    --color-border-light: #e8e8ed;
    
    /* Accent Colors */
    --color-accent: #0071e3;
    --color-accent-hover: #0077ed;
    --color-accent-light: rgba(0, 113, 227, 0.1);
    --color-success: #34c759;
    --color-warning: #ff9f0a;
    --color-error: #ff3b30;
    
    /* Gradients */
    --gradient-hero: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-secondary) 100%);
    --gradient-card: linear-gradient(135deg, var(--color-bg) 0%, var(--color-bg-secondary) 100%);
    --gradient-accent: linear-gradient(135deg, #0071e3 0%, #00c7be 100%);
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.06);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
    --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Z-Index */
    --z-dropdown: 100;
    --z-header: 200;
    --z-modal: 300;
    --z-toast: 400;
    
    /* Container */
    --container-max: 1200px;
    --container-narrow: 720px;
    --container-wide: 1400px;
    --container-padding: 1.5rem;
    
    /* Header */
    --header-height: 64px;
}

/* ============================================
   2. RESET & BASE
   ============================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--weight-regular);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    min-height: 100vh;
    overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

/* ============================================
   3. TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: var(--weight-semibold);
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-4);
}

strong {
    font-weight: var(--weight-semibold);
}

small {
    font-size: var(--text-sm);
}

.text-gradient {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   4. LAYOUT & CONTAINER
   ============================================ */

.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    flex: 1;
    padding-top: var(--header-height);
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.container-narrow {
    max-width: var(--container-narrow);
}

.container-wide {
    max-width: var(--container-wide);
}

.section {
    padding: var(--space-24) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-16);
}

.section-title {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-4);
}

.section-subtitle {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.section-cta {
    text-align: center;
    margin-top: var(--space-12);
}

/* ============================================
   5. HEADER & NAVIGATION
   ============================================ */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    z-index: var(--z-header);
    border-bottom: 1px solid var(--color-border-light);
    transition: background var(--transition-base), box-shadow var(--transition-base);
}

.header-wrapper {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    height: 100%;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: var(--space-4);
}

.site-logo .logo-link {
    display: flex;
    align-items: center;
}

.site-logo .logo-image {
    height: 32px;
    width: auto;
}

.site-logo .logo-text {
    font-size: var(--text-xl);
    font-weight: var(--weight-bold);
    letter-spacing: -0.02em;
}

.badge-experimental {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    margin-inline-start: var(--space-2);
    padding: 4px 10px;
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    color: var(--color-accent);
    background: var(--color-accent-light);
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.badge-experimental::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
}

.main-nav {
    display: none;
}

@media (min-width: 768px) {
    .main-nav {
        display: block;
    }
}

.nav-list {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    justify-content: flex-start;
}

.nav-link {
    display: block;
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--color-text-secondary);
    border-radius: var(--radius-full);
    transition: color var(--transition-fast), background var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-text);
    background: var(--color-bg-secondary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.language-switcher {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
}

.lang-btn {
    padding: var(--space-1) var(--space-2);
    font-weight: var(--weight-medium);
    color: var(--color-text-secondary);
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background var(--transition-fast);
}

.lang-btn:hover,
.lang-btn.active {
    color: var(--color-text);
    background: var(--color-bg-secondary);
}

.lang-divider {
    color: var(--color-border);
}

.dark-mode-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    color: var(--color-text-secondary);
    transition: color var(--transition-fast), background var(--transition-fast);
}

.dark-mode-toggle:hover {
    color: var(--color-text);
    background: var(--color-bg-secondary);
}

.dark-mode-toggle .icon-moon {
    display: none;
}

.dark-mode .dark-mode-toggle .icon-sun {
    display: none;
}

.dark-mode .dark-mode-toggle .icon-moon {
    display: block;
}

.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    gap: 5px;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none;
    }
}

.mobile-menu-toggle:hover {
    background: var(--color-bg-secondary);
}

.hamburger-line {
    width: 18px;
    height: 2px;
    background: var(--color-text);
    border-radius: var(--radius-full);
    transition: transform var(--transition-base), opacity var(--transition-base);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg);
    padding: var(--space-8);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity var(--transition-base), visibility var(--transition-base), transform var(--transition-base);
    z-index: calc(var(--z-header) - 1);
}

.mobile-nav.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-nav-inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.mobile-nav-link {
    display: block;
    padding: var(--space-4);
    font-size: var(--text-lg);
    font-weight: var(--weight-medium);
    border-radius: var(--radius-lg);
    transition: background var(--transition-fast);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: var(--color-bg-secondary);
}

.mobile-nav-footer {
    margin-top: auto;
    padding-top: var(--space-8);
    border-top: 1px solid var(--color-border-light);
}

/* ============================================
   6. HERO SECTION
   ============================================ */

.hero {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-12);
    align-items: center;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--space-16) var(--container-padding);
}

@media (min-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr 1fr;
    }
}

.hero-text {
    text-align: center;
}

@media (min-width: 1024px) {
    .hero-text {
        text-align: left;
    }
}

.hero-title {
    font-size: clamp(var(--text-4xl), 8vw, var(--text-7xl));
    font-weight: var(--weight-bold);
    line-height: 1.1;
    margin-bottom: var(--space-6);
}

.hero-title .greeting {
    display: block;
    font-size: var(--text-xl);
    font-weight: var(--weight-regular);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-2);
}

.hero-title .name {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: var(--text-xl);
    font-weight: var(--weight-medium);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-4);
}

.hero-description {
    font-size: var(--text-lg);
    color: var(--color-text-tertiary);
    max-width: 500px;
    margin: 0 auto var(--space-8);
}

@media (min-width: 1024px) {
    .hero-description {
        margin: 0 0 var(--space-8);
    }
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    justify-content: center;
}

@media (min-width: 1024px) {
    .hero-cta {
        justify-content: flex-start;
    }
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image {
    max-width: 100%;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
}

.hero-abstract {
    position: relative;
    width: 400px;
    height: 400px;
}

.abstract-shape {
    position: absolute;
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, rgba(0, 113, 227, 0.3) 0%, rgba(0, 199, 190, 0.1) 100%);
    top: 0;
    left: 50px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(0, 199, 190, 0.3) 0%, rgba(0, 113, 227, 0.1) 100%);
    bottom: 0;
    right: 0;
    animation-delay: -2s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, rgba(255, 159, 10, 0.2) 0%, rgba(255, 45, 85, 0.1) 100%);
    top: 50%;
    left: 0;
    animation-delay: -4s;
}

.hero-scroll-indicator {
    position: absolute;
    bottom: var(--space-8);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-text-tertiary);
    font-size: var(--text-sm);
    animation: bounce 2s ease-in-out infinite;
}

/* ============================================
   7. SECTIONS & CONTENT
   ============================================ */

.section-projects .projects-grid,
.section-products .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-8);
}

.products-grid.products-filterable {
    grid-template-columns: repeat(auto-fit, minmax(260px, 360px));
    justify-content: center;
}

.section-services .services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-6);
}

.service-card {
    padding: var(--space-8);
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    text-align: center;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin-bottom: var(--space-6);
    background: var(--color-accent-light);
    color: var(--color-accent);
    border-radius: var(--radius-xl);
}

.service-title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-3);
}

.service-description {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: 0;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-8);
}

.blog-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.blog-card-image {
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: var(--space-6);
}

.blog-card-tag {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    color: var(--color-accent);
    background: var(--color-accent-light);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-3);
}

.blog-card-title {
    font-size: var(--text-lg);
    margin-bottom: var(--space-3);
}

.blog-card-title a:hover {
    color: var(--color-accent);
}

.blog-card-excerpt {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-4);
}

.blog-card-date {
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
}

/* CTA Banner */
.section-cta-banner {
    background: var(--gradient-accent);
    padding: var(--space-16) 0;
}

.cta-banner {
    text-align: center;
    color: white;
}

.cta-title {
    font-size: var(--text-4xl);
    color: white;
    margin-bottom: var(--space-4);
}

.cta-description {
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--space-8);
}

.cta-banner .btn-primary {
    background: white;
    color: var(--color-accent);
}

.cta-banner .btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* ============================================
   8. CARDS (Projects, Products, Blog)
   ============================================ */

/* Project Card */
.project-card {
    position: relative;
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.project-card-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--color-bg-secondary);
}

.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.project-card:hover .project-card-image img {
    transform: scale(1.05);
}

.project-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--color-text-tertiary);
}

.project-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.project-card:hover .project-card-overlay {
    opacity: 1;
}

.project-links {
    display: flex;
    gap: var(--space-3);
}

.project-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: white;
    border-radius: var(--radius-full);
    color: var(--color-text);
    transition: transform var(--transition-spring);
}

.project-link:hover {
    transform: scale(1.1);
}

.project-card-content {
    padding: var(--space-6);
}

.project-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.tech-tag {
    padding: var(--space-1) var(--space-2);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    color: var(--color-text-secondary);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-sm);
}

.project-card-title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-2);
}

.project-card-title a:hover {
    color: var(--color-accent);
}

.project-card-excerpt {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-4);
}

.project-card-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--color-accent);
    transition: gap var(--transition-base);
}

.project-card-link:hover {
    gap: var(--space-3);
}

/* Product Card */
.product-card {
    position: relative;
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.product-card-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--color-bg-secondary);
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.product-card:hover .product-card-image img {
    transform: scale(1.05);
}

.product-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--color-text-tertiary);
}

.product-badge {
    position: absolute;
    top: var(--space-4);
    left: var(--space-4);
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    color: white;
    background: var(--color-accent);
    border-radius: var(--radius-full);
}

.product-card-content {
    padding: var(--space-6);
}

.product-category {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-2);
}

.product-card-title {
    font-size: var(--text-lg);
    margin-bottom: var(--space-2);
}

.product-card-title a:hover {
    color: var(--color-accent);
}

.product-card-excerpt {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-4);
}

.product-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.feature-tag {
    padding: var(--space-1) var(--space-2);
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-sm);
}

.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border-light);
}

.product-price .price-value {
    font-size: var(--text-lg);
    font-weight: var(--weight-bold);
    color: var(--color-text);
}

/* Product Detail Layout */
.product-detail-hero {
    padding: var(--space-16) 0 var(--space-12);
}

.product-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: var(--space-10);
    align-items: center;
}

.product-detail-media img,
.product-detail-media .product-placeholder {
    width: 100%;
    border-radius: var(--radius-xl);
    background: var(--color-bg-secondary);
}

.product-detail-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.product-detail-category {
    display: inline-block;
    color: var(--color-accent);
    font-weight: var(--weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-detail-title {
    font-size: clamp(28px, 4vw, 40px);
    margin: 0;
}

.product-detail-excerpt {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    margin: 0 0 var(--space-2);
}

.product-detail-meta {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    font-weight: var(--weight-semibold);
}

.product-detail-price {
    font-size: clamp(22px, 3vw, 28px);
    color: var(--color-accent);
}

.product-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: center;
}

.product-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

@media (max-width: 992px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .product-detail-hero {
        padding: var(--space-12) 0 var(--space-8);
    }
}

/* ============================================
   9. SERVICES PAGE
   ============================================ */

.page-hero {
    padding: var(--space-20) 0 var(--space-12);
    text-align: center;
    background: var(--gradient-hero);
}

.page-hero-title {
    font-size: clamp(var(--text-4xl), 6vw, var(--text-6xl));
    margin-bottom: var(--space-4);
}

.page-hero-subtitle {
    font-size: var(--text-xl);
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.filter-section {
    padding: var(--space-8) 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border-light);
    position: sticky;
    top: var(--header-height);
    z-index: calc(var(--z-header) - 10);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2);
}

.filter-btn {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--color-text-secondary);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
    color: white;
    background: var(--color-accent);
    border-color: var(--color-accent);
}

.service-detail {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-12);
    padding: var(--space-16) 0;
    align-items: center;
    border-bottom: 1px solid var(--color-border-light);
}

@media (min-width: 1024px) {
    .service-detail {
        grid-template-columns: 1fr 1fr;
    }
    
    .service-detail.reverse {
        direction: rtl;
    }
    
    .service-detail.reverse > * {
        direction: ltr;
    }
}

.service-detail:last-child {
    border-bottom: none;
}

.service-detail-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: var(--color-accent-light);
    color: var(--color-accent);
    border-radius: var(--radius-2xl);
    margin-bottom: var(--space-6);
}

.service-detail-title {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-4);
}

.service-detail-description {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-6);
}

.service-features {
    margin-bottom: var(--space-6);
}

.service-features li {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) 0;
    color: var(--color-text-secondary);
}

.service-features li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--color-accent);
    border-radius: var(--radius-full);
}

.service-pricing {
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
}

.price-label {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.price-value {
    font-size: var(--text-2xl);
    font-weight: var(--weight-bold);
    color: var(--color-text);
}

.service-detail-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.visual-mockup {
    width: 100%;
    max-width: 400px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.mockup-header {
    display: flex;
    gap: var(--space-2);
    padding: var(--space-3);
    background: var(--color-bg-secondary);
    border-bottom: 1px solid var(--color-border-light);
}

.mockup-header .dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    background: var(--color-border);
}

.mockup-content {
    padding: var(--space-4);
}

.mockup-nav {
    height: 8px;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-4);
}

.mockup-hero {
    height: 80px;
    background: var(--gradient-accent);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
    opacity: 0.3;
}

.mockup-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
}

.mockup-card {
    height: 60px;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
}

.visual-code {
    width: 100%;
    max-width: 400px;
    padding: var(--space-6);
    background: #1d1d1f;
    border-radius: var(--radius-xl);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    line-height: 1.8;
    overflow-x: auto;
}

.visual-code code {
    color: #f5f5f7;
}

.code-keyword { color: #ff7b72; }
.code-class { color: #79c0ff; }
.code-function { color: #d2a8ff; }
.code-this { color: #ff7b72; }
.code-string { color: #a5d6ff; }
.code-comment { color: #8b949e; }

.visual-api {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.api-endpoint {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.api-endpoint .method {
    padding: var(--space-1) var(--space-2);
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    border-radius: var(--radius-sm);
    color: white;
}

.method.get { background: var(--color-success); }
.method.post { background: var(--color-accent); }
.method.put { background: var(--color-warning); }
.method.delete { background: var(--color-error); }

.api-endpoint .path {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.visual-diagram {
    position: relative;
    width: 300px;
    height: 300px;
}

.diagram-node {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

.diagram-node.central {
    width: 100px;
    height: 100px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
    z-index: 1;
}

.diagram-node:nth-child(2) { top: 0; left: 50%; transform: translateX(-50%); }
.diagram-node:nth-child(3) { top: 50%; right: 0; transform: translateY(-50%); }
.diagram-node:nth-child(4) { bottom: 0; left: 50%; transform: translateX(-50%); }
.diagram-node:nth-child(5) { top: 50%; left: 0; transform: translateY(-50%); }

/* Process Timeline */
.process-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-8);
    position: relative;
}

.process-step {
    text-align: center;
    position: relative;
}

.step-number {
    font-size: var(--text-4xl);
    font-weight: var(--weight-black);
    color: var(--color-accent-light);
    margin-bottom: var(--space-4);
}

.step-title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-2);
}

.step-description {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

/* ============================================
   10. BUTTONS & FORMS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-primary {
    color: white;
    background: var(--color-accent);
}

.btn-primary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    color: var(--color-accent);
    background: var(--color-accent-light);
}

.btn-secondary:hover {
    background: rgba(0, 113, 227, 0.15);
}

.btn-outline {
    color: var(--color-text);
    background: transparent;
    border: 1px solid var(--color-border);
}

.btn-outline:hover {
    background: var(--color-bg-secondary);
    border-color: var(--color-text);
}

.btn-large {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
}

.btn-small {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
}

.btn-full {
    width: 100%;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea,
select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    color: var(--color-text);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-light);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

.newsletter-form {
    display: flex;
    gap: var(--space-3);
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
}

/* ============================================
   11. FOOTER
   ============================================ */

.site-footer {
    background: var(--color-bg-secondary);
    padding: var(--space-16) 0 var(--space-8);
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1.4fr) repeat(2, minmax(200px, 1fr)) minmax(200px, 1fr);
    gap: var(--space-10) var(--space-12);
    align-items: start;
    margin-bottom: var(--space-12);
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.footer-logo {
    display: inline-flex;
}

.footer-logo img {
    height: 32px;
}

.footer-logo span {
    font-size: var(--text-xl);
    font-weight: var(--weight-bold);
}

.footer-description {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-4);
    max-width: 300px;
}

@media (max-width: 640px) {
    .footer-description {
        max-width: none;
    }
}

.footer-social {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-2);
}

@media (max-width: 640px) {
    .footer-social {
        justify-content: center;
    }
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--color-text-secondary);
    background: var(--color-bg);
    border-radius: var(--radius-full);
    transition: color var(--transition-fast), background var(--transition-fast);
}

.social-link:hover {
    color: var(--color-accent);
    background: var(--color-accent-light);
}

.footer-title {
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-3);
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    align-items: flex-start;
}

.footer-nav a {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}

.footer-nav a:hover {
    color: var(--color-accent);
}

body.rtl .footer-grid {
    text-align: right;
}

body.rtl .footer-nav {
    align-items: flex-end;
}

body.rtl .footer-brand {
    align-items: flex-end;
}

body.rtl .footer-grid {
    direction: rtl;
}

body.rtl .footer-bottom {
    flex-direction: row-reverse;
    text-align: right;
}

body.rtl .footer-legal {
    justify-content: flex-start;
}

body.rtl .footer-links,
body.rtl .footer-contact {
    text-align: right;
}

.footer-email a {
    font-size: var(--text-base);
    color: var(--color-text);
    font-weight: var(--weight-medium);
}

.footer-email a:hover {
    color: var(--color-accent);
}

.footer-contact .btn {
    margin-top: var(--space-4);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-8);
    border-top: 1px solid var(--color-border-light);
}

@media (max-width: 640px) {
    .footer-bottom {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }
}

.copyright {
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
    margin: 0;
}

.footer-legal {
    display: flex;
    gap: var(--space-6);
    flex-wrap: wrap;
}

.footer-legal a {
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
    transition: color var(--transition-fast);
}

.footer-legal a:hover {
    color: var(--color-text);
}

/* ============================================
   12. POST & PAGE CONTENT
   ============================================ */

.post-header,
.page-header {
    padding: var(--space-16) 0;
    text-align: center;
}

.post-tag {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    color: var(--color-accent);
    background: var(--color-accent-light);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-4);
}

.post-title,
.page-title {
    font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
    margin-bottom: var(--space-4);
}

.post-excerpt,
.page-excerpt {
    font-size: var(--text-xl);
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-6);
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: var(--space-6);
    margin-top: var(--space-6);
}

.post-author {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.author-link {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.author-name {
    font-weight: var(--weight-medium);
}

.post-info {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.post-info .separator {
    color: var(--color-border);
}

.post-feature-image,
.page-feature-image {
    margin: var(--space-8) auto;
    max-width: var(--container-wide);
}

.post-feature-image img,
.page-feature-image img {
    width: 100%;
    border-radius: var(--radius-xl);
}

.post-feature-image figcaption {
    text-align: center;
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
    margin-top: var(--space-3);
}

/* Post Content */
.post-content,
.page-content {
    padding-bottom: var(--space-16);
}

.post-content h2,
.page-content h2 {
    margin-top: var(--space-12);
    margin-bottom: var(--space-4);
}

.post-content h3,
.page-content h3 {
    margin-top: var(--space-8);
    margin-bottom: var(--space-3);
}

.post-content p,
.page-content p {
    font-size: var(--text-lg);
    line-height: 1.8;
    margin-bottom: var(--space-6);
}

.post-content a,
.page-content a {
    color: var(--color-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.post-content a:hover,
.page-content a:hover {
    text-decoration: none;
}

.post-content ul,
.post-content ol,
.page-content ul,
.page-content ol {
    margin-bottom: var(--space-6);
    padding-left: var(--space-6);
}

.post-content li,
.page-content li {
    margin-bottom: var(--space-2);
    font-size: var(--text-lg);
    line-height: 1.7;
    color: var(--color-text-secondary);
}

.post-content ul li,
.page-content ul li {
    list-style-type: disc;
}

.post-content ol li,
.page-content ol li {
    list-style-type: decimal;
}

.post-content blockquote,
.page-content blockquote {
    margin: var(--space-8) 0;
    padding: var(--space-6) var(--space-8);
    background: var(--color-bg-secondary);
    border-left: 4px solid var(--color-accent);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    font-size: var(--text-xl);
    font-style: italic;
    color: var(--color-text);
}

.post-content pre,
.page-content pre {
    margin: var(--space-8) 0;
    padding: var(--space-6);
    background: #1d1d1f;
    border-radius: var(--radius-lg);
    overflow-x: auto;
}

.post-content code,
.page-content code {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

.post-content p code,
.page-content p code {
    padding: var(--space-1) var(--space-2);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-sm);
    color: var(--color-accent);
}

.post-content img,
.page-content img {
    border-radius: var(--radius-lg);
    margin: var(--space-6) 0;
}

.post-content figure {
    margin: var(--space-8) 0;
}

.post-content figcaption {
    text-align: center;
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
    margin-top: var(--space-3);
}

/* Post Footer */
.post-footer {
    padding: var(--space-8) 0;
    border-top: 1px solid var(--color-border-light);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
}

.tag-link {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.tag-link:hover {
    color: var(--color-accent);
    background: var(--color-accent-light);
}

.post-share {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.share-label {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.share-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--color-text-secondary);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.share-link:hover {
    color: var(--color-accent);
    background: var(--color-accent-light);
}

/* Related Posts */
.related-posts {
    padding: var(--space-16) 0;
    background: var(--color-bg-secondary);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
    margin-top: var(--space-8);
}

.related-card {
    background: var(--color-bg);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.related-card-image {
    display: block;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.related-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-card-content {
    padding: var(--space-5);
}

.related-card-title {
    font-size: var(--text-base);
    margin-bottom: var(--space-2);
}

.related-card-title a:hover {
    color: var(--color-accent);
}

.related-card time {
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
}

/* Product Purchase Section */
.product-purchase-section {
    padding: var(--space-12) 0;
    background: var(--color-bg-secondary);
}

.product-purchase-card {
    padding: var(--space-8);
    background: var(--color-bg);
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.product-purchase-card h3 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-6);
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
}

.btn-purchase {
    margin-bottom: var(--space-4);
}

.purchase-note {
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
    margin-bottom: 0;
}

/* ============================================
   13. COMPONENTS
   ============================================ */

/* Testimonials */
.section-testimonials {
    background: var(--color-bg-secondary);
}

.testimonials-slider {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-6);
}

.testimonial-card {
    padding: var(--space-8);
    background: var(--color-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
}

.testimonial-quote {
    font-size: var(--text-lg);
    font-style: italic;
    color: var(--color-text);
    margin-bottom: var(--space-6);
    position: relative;
}

.testimonial-quote::before {
    content: '"';
    font-size: var(--text-5xl);
    color: var(--color-accent-light);
    position: absolute;
    top: -20px;
    left: -10px;
    font-family: Georgia, serif;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: var(--weight-semibold);
    font-style: normal;
}

.author-role {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

/* FAQ */
.section-faq {
    padding: var(--space-16) 0;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.faq-item {
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-5) var(--space-6);
    font-weight: var(--weight-medium);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.faq-question:hover {
    background: var(--color-bg-secondary);
}

.faq-question::after {
    content: '+';
    font-size: var(--text-xl);
    color: var(--color-text-secondary);
    transition: transform var(--transition-base);
}

.faq-item[open] .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 var(--space-6) var(--space-6);
}

.faq-answer p {
    margin: 0;
    color: var(--color-text-secondary);
}

/* Newsletter */
.section-newsletter {
    padding: var(--space-16) 0;
}

.newsletter-box {
    padding: var(--space-12);
    background: var(--gradient-accent);
    border-radius: var(--radius-2xl);
    text-align: center;
    color: white;
}

.newsletter-box h2 {
    color: white;
    margin-bottom: var(--space-3);
}

.newsletter-box p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--space-6);
}

.newsletter-box .newsletter-form {
    max-width: 500px;
}

.newsletter-box input {
    background: white;
    border-color: white;
}

.newsletter-box .btn-primary {
    background: var(--color-text);
    color: white;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-6);
}

.feature-card {
    padding: var(--space-6);
    text-align: center;
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: var(--space-4);
    color: var(--color-accent);
    background: var(--color-accent-light);
    border-radius: var(--radius-xl);
}

.feature-card h3 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-2);
}

.feature-card p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin: 0;
}

/* Pricing Card */
.pricing-card {
    padding: var(--space-8);
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    text-align: center;
    position: relative;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.pricing-card.featured {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px var(--color-accent-light);
}

.pricing-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: var(--space-1) var(--space-4);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    color: white;
    background: var(--color-accent);
    border-radius: var(--radius-full);
}

.pricing-header {
    margin-bottom: var(--space-6);
}

.pricing-title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-2);
}

.pricing-description {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin: 0;
}

.pricing-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: var(--space-1);
    margin-bottom: var(--space-6);
}

.pricing-price .currency {
    font-size: var(--text-xl);
    font-weight: var(--weight-medium);
}

.pricing-price .amount {
    font-size: var(--text-5xl);
    font-weight: var(--weight-bold);
    line-height: 1;
}

.pricing-price .period {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
}

.pricing-features {
    margin-bottom: var(--space-8);
    text-align: left;
}

.pricing-feature {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) 0;
    font-size: var(--text-sm);
}

.pricing-feature.included svg {
    color: var(--color-success);
}

.pricing-feature.excluded {
    color: var(--color-text-tertiary);
}

.pricing-feature.excluded svg {
    color: var(--color-text-tertiary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-16) 0;
    color: var(--color-text-tertiary);
}

.empty-state svg {
    margin-bottom: var(--space-4);
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-2);
}

/* Error Page */
.error-page {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-16);
}

.error-page .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-16);
    flex-wrap: wrap;
}

.error-content {
    text-align: center;
    max-width: 400px;
}

.error-code {
    font-size: clamp(var(--text-6xl), 15vw, 10rem);
    font-weight: var(--weight-black);
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: var(--space-4);
}

.error-message {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-4);
}

.error-description {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-8);
}

.error-actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
}

.error-visual {
    color: var(--color-text-tertiary);
    opacity: 0.5;
}

/* Tag & Author Headers */
.tag-header,
.author-header {
    padding: var(--space-16) 0;
    text-align: center;
    background: var(--color-bg-secondary);
}

.tag-image,
.author-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-full);
    object-fit: cover;
    margin: 0 auto var(--space-6);
    border: 4px solid var(--color-bg);
    box-shadow: var(--shadow-lg);
}

.tag-title,
.author-name {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-4);
}

.tag-description,
.author-bio {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-4);
}

.tag-meta,
.author-stats {
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
}

.author-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
}

@media (min-width: 768px) {
    .author-profile {
        flex-direction: row;
        text-align: left;
    }
    
    .author-avatar-large {
        margin: 0;
    }
}

.author-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-4);
    margin-top: var(--space-4);
}

@media (min-width: 768px) {
    .author-meta {
        justify-content: flex-start;
    }
}

.author-location,
.author-link {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.author-link:hover {
    color: var(--color-accent);
}

/* Posts Grid (for tag/author pages) */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-8);
}

.post-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.post-card-image {
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}

.post-card-content {
    padding: var(--space-6);
}

.post-card-tag {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    color: var(--color-accent);
    background: var(--color-accent-light);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-3);
}

.post-card-title {
    font-size: var(--text-lg);
    margin-bottom: var(--space-3);
}

.post-card-title a:hover {
    color: var(--color-accent);
}

.post-card-excerpt {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-4);
}

.post-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-8);
    margin-top: var(--space-12);
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--color-text);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.pagination-link:hover {
    background: var(--color-bg-secondary);
    border-color: var(--color-text);
}

.pagination-info {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

/* ============================================
   14. ANIMATIONS
   ============================================ */

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-fade-up {
    animation: fadeUp 0.6s ease forwards;
    opacity: 0;
}

.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
    opacity: 0;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ============================================
   15. DARK MODE
   ============================================ */

.dark-mode,
@media (prefers-color-scheme: dark) {
    .dark-mode-enabled {
        --color-bg: #1d1d1f;
        --color-bg-secondary: #2d2d2f;
        --color-bg-tertiary: #252527;
        --color-text: #f5f5f7;
        --color-text-secondary: #a1a1a6;
        --color-text-tertiary: #6e6e73;
        --color-border: #424245;
        --color-border-light: #38383a;
        --color-accent: #2997ff;
        --color-accent-hover: #0a84ff;
        --color-accent-light: rgba(41, 151, 255, 0.15);
        
        --gradient-hero: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-secondary) 100%);
        --gradient-card: linear-gradient(135deg, var(--color-bg-secondary) 0%, var(--color-bg-tertiary) 100%);
        
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
        --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.25);
        --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.35), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
        --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.35);
        --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.25), 0 8px 24px rgba(0, 0, 0, 0.3);
    }
    
    .dark-mode-enabled .site-header {
        background: rgba(29, 29, 31, 0.72);
    }
    
    .dark-mode-enabled .visual-code {
        background: #000000;
    }
}

/* ============================================
   16. RTL SUPPORT
   ============================================ */

[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .header-inner,
[dir="rtl"] .nav-list,
[dir="rtl"] .hero-cta,
[dir="rtl"] .footer-social,
[dir="rtl"] .author-meta,
[dir="rtl"] .post-tags,
[dir="rtl"] .post-share,
[dir="rtl"] .product-card-tags,
[dir="rtl"] .project-card-tags,
[dir="rtl"] .filter-buttons {
    flex-direction: row-reverse;
}

[dir="rtl"] .hero-text {
    text-align: right;
}

@media (min-width: 1024px) {
    [dir="rtl"] .hero-content {
        direction: rtl;
    }
}

[dir="rtl"] .service-features li::before {
    margin-left: var(--space-3);
    margin-right: 0;
}

[dir="rtl"] .mobile-nav-inner {
    text-align: right;
}

[dir="rtl"] .footer-grid {
    direction: rtl;
}

[dir="rtl"] .footer-description,
[dir="rtl"] .footer-title,
[dir="rtl"] .footer-nav a,
[dir="rtl"] .footer-email a,
[dir="rtl"] .copyright,
[dir="rtl"] .footer-legal a {
    text-align: right;
}

[dir="rtl"] .project-card-link svg,
[dir="rtl"] .pagination-link svg {
    transform: scaleX(-1);
}

[dir="rtl"] blockquote {
    border-left: none;
    border-right: 4px solid var(--color-accent);
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

[dir="rtl"] ul,
[dir="rtl"] ol {
    padding-left: 0;
    padding-right: var(--space-6);
}

/* ============================================
   17. RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    :root {
        --container-padding: 1.25rem;
    }
    
    .section {
        padding: var(--space-16) 0;
    }
    
    h1 { font-size: var(--text-4xl); }
    h2 { font-size: var(--text-3xl); }
    
    .section-title {
        font-size: var(--text-3xl);
    }
}

@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
        --header-height: 56px;
    }
    
    .section {
        padding: var(--space-12) 0;
    }
    
    .section-header {
        margin-bottom: var(--space-10);
    }
    
    h1 { font-size: var(--text-3xl); }
    h2 { font-size: var(--text-2xl); }
    h3 { font-size: var(--text-xl); }
    
    .hero {
        min-height: auto;
        padding: var(--space-12) 0;
    }
    
    .hero-content {
        padding: var(--space-8) var(--container-padding);
    }
    
    .hero-abstract {
        width: 280px;
        height: 280px;
    }
    
    .shape-1 {
        width: 200px;
        height: 200px;
    }
    
    .shape-2 {
        width: 140px;
        height: 140px;
    }
    
    .shape-3 {
        width: 100px;
        height: 100px;
    }
    
    .service-detail {
        padding: var(--space-10) 0;
    }
    
    .visual-mockup,
    .visual-code,
    .visual-api,
    .visual-diagram {
        max-width: 100%;
    }
    
    .cta-banner .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
    }
    
    .hero-cta .btn {
        width: 100%;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .error-actions {
        flex-direction: column;
    }
    
    .error-actions .btn {
        width: 100%;
    }
    
    .pagination {
        flex-direction: column;
        gap: var(--space-4);
    }
}

/* ============================================
   18. UTILITIES
   ============================================ */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

.hidden { display: none !important; }

/* Ghost Specific Classes */
.kg-width-wide {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    max-width: var(--container-wide);
}

.kg-width-full {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    width: 100vw;
}

.kg-gallery-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.kg-gallery-row {
    display: flex;
    gap: var(--space-4);
}

.kg-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
}

.kg-bookmark-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.kg-bookmark-container {
    display: flex;
    text-decoration: none;
}

.kg-bookmark-content {
    flex: 1;
    padding: var(--space-6);
}

.kg-bookmark-title {
    font-weight: var(--weight-semibold);
    margin-bottom: var(--space-2);
}

.kg-bookmark-description {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-3);
}

.kg-bookmark-metadata {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
}

.kg-bookmark-icon {
    width: 20px;
    height: 20px;
}

.kg-bookmark-thumbnail {
    width: 160px;
    min-width: 160px;
}

.kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .post-share,
    .related-posts,
    .section-cta-banner {
        display: none;
    }
    
    .site-main {
        padding-top: 0;
    }
    
    a {
        text-decoration: underline;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: var(--text-sm);
    }
}

/* ============================================
   19. SHOPPING CART
   ============================================ */

/* Cart Icon in Header */
.cart-wrapper {
    position: relative;
}

.cart-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--color-text);
    transition: background var(--transition);
    position: relative;
}

.cart-toggle:hover {
    background: var(--color-bg-secondary);
}

.cart-count {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--color-accent);
    color: white;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: var(--weight-bold);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mini Cart Dropdown */
.mini-cart {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: auto;
    width: min(360px, 90vw);
    max-height: 480px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition);
    z-index: var(--z-dropdown);
    overflow: hidden;
}

.mini-cart.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .cart-wrapper {
        position: static;
    }
    .mini-cart {
        position: fixed;
        top: calc(var(--header-height) + 8px);
        right: var(--space-3);
        left: var(--space-3);
        width: auto;
        max-height: calc(100vh - var(--header-height) - 24px);
        transform: none;
    }
    .mini-cart.open {
        transform: none;
    }
}

.mini-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--color-border);
}

.mini-cart-header h4 {
    margin: 0;
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
}

.mini-cart-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--color-text-secondary);
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.mini-cart-close:hover {
    color: var(--color-text);
}

.mini-cart-items {
    max-height: 280px;
    overflow-y: auto;
    padding: var(--space-3);
}

.mini-cart-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border-radius: var(--radius-lg);
    transition: background var(--transition);
}

.mini-cart-item:hover {
    background: var(--color-bg-secondary);
}

.mini-cart-item .item-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--radius-md);
    background: var(--color-bg-secondary);
}

.mini-cart-item .item-details {
    flex: 1;
    min-width: 0;
}

.mini-cart-item .item-name {
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    margin: 0 0 var(--space-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-cart-item .item-price {
    font-size: var(--text-sm);
    color: var(--color-accent);
    font-weight: var(--weight-semibold);
}

.mini-cart-item .item-remove {
    background: none;
    border: none;
    padding: var(--space-2);
    color: var(--color-text-tertiary);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.mini-cart-item .item-remove:hover {
    background: var(--color-error-light, rgba(255,59,48,0.1));
    color: var(--color-error, #ff3b30);
}

.mini-cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-8);
    color: var(--color-text-tertiary);
    text-align: center;
}

.mini-cart-empty svg {
    margin-bottom: var(--space-3);
    opacity: 0.5;
}

.mini-cart-empty p {
    margin: 0;
    font-size: var(--text-sm);
}

.mini-cart-footer {
    padding: var(--space-4) var(--space-5);
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-secondary);
}

.mini-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
    font-weight: var(--weight-semibold);
}

.mini-cart-total .total-amount {
    font-size: var(--text-lg);
    color: var(--color-accent);
}

.mini-cart-footer .btn {
    width: 100%;
    margin-bottom: var(--space-2);
}

.mini-cart-footer .btn:last-child {
    margin-bottom: 0;
}

/* Cart Page */
.cart-page {
    padding: var(--space-16) 0;
    min-height: 60vh;
}

.cart-page .page-header {
    text-align: center;
    margin-bottom: var(--space-12);
}

.cart-page .page-title {
    font-size: var(--text-4xl);
    font-weight: var(--weight-bold);
    margin-bottom: var(--space-4);
}

/* Cart Empty State */
.cart-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-16) var(--space-6);
    text-align: center;
}

.cart-empty-state svg {
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-6);
    opacity: 0.5;
}

.cart-empty-state h2 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-3);
}

.cart-empty-state p {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-6);
}

/* Cart Grid */
.cart-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: var(--space-8);
    align-items: start;
}

@media (max-width: 1024px) {
    .cart-grid {
        grid-template-columns: 1fr;
    }
}

/* Cart Items List */
.cart-items-section {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.cart-items-header {
    display: grid;
    grid-template-columns: 1fr 100px 50px;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-6);
    background: var(--color-bg-secondary);
    border-bottom: 1px solid var(--color-border);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--color-text-secondary);
}

.cart-items-list {
    padding: var(--space-4) var(--space-6);
}

.cart-item {
    display: grid;
    grid-template-columns: 1fr 100px 50px;
    gap: var(--space-4);
    align-items: center;
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--color-border-light);
}

.cart-item:last-child {
    border-bottom: none;
}

.item-product {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.cart-item .item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    background: var(--color-bg-secondary);
}

.item-info {
    flex: 1;
    min-width: 0;
}

.item-info .item-name {
    font-weight: var(--weight-medium);
    margin: 0 0 var(--space-1);
}

.item-info .item-link {
    font-size: var(--text-sm);
    color: var(--color-accent);
}

.cart-item .item-price {
    font-weight: var(--weight-semibold);
    color: var(--color-accent);
}

.item-remove-btn {
    background: none;
    border: none;
    padding: var(--space-2);
    color: var(--color-text-tertiary);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.item-remove-btn:hover {
    background: var(--color-error-light, rgba(255,59,48,0.1));
    color: var(--color-error, #ff3b30);
}

.cart-actions {
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid var(--color-border);
}

/* Cart Summary */
.cart-summary-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    position: sticky;
    top: 100px;
}

.cart-summary-card h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-6);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: var(--space-3) 0;
    color: var(--color-text-secondary);
}

.summary-row.summary-total {
    border-top: 1px solid var(--color-border);
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    font-size: var(--text-lg);
    font-weight: var(--weight-bold);
    color: var(--color-text);
}

.summary-row.summary-total span:last-child {
    color: var(--color-accent);
}

.cart-summary-card .btn-full {
    width: 100%;
    margin-top: var(--space-6);
}

.checkout-features {
    margin-top: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.checkout-features .feature {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.checkout-features .feature svg {
    color: var(--color-success, #34c759);
}

.powered-by {
    margin-top: var(--space-6);
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border);
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    justify-content: center;
}

/* Product Card Quick Add Button */
.product-card-image {
    position: relative;
}

.quick-add-btn {
    position: absolute;
    bottom: var(--space-3);
    right: var(--space-3);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(10px);
    transition: all var(--transition);
    color: var(--color-text);
    box-shadow: var(--shadow-md);
}

.product-card:hover .quick-add-btn {
    opacity: 1;
    transform: translateY(0);
}

.quick-add-btn:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
}

.quick-add-btn.in-cart {
    opacity: 1;
    background: var(--color-success, #34c759);
    border-color: var(--color-success, #34c759);
    color: white;
}

/* Add to Cart Button in Card */
.add-to-cart-btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.add-to-cart-btn.in-cart {
    background: var(--color-success, #34c759);
    border-color: var(--color-success, #34c759);
}

/* Checkout Success Page */
.checkout-success-page {
    padding: var(--space-16) 0;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.success-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-2xl);
    padding: var(--space-12);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.success-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto var(--space-6);
    background: var(--color-success-light, rgba(52,199,89,0.1));
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-icon svg {
    color: var(--color-success, #34c759);
}

.success-title {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-3);
}

.success-message {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-8);
}

.downloads-section {
    background: var(--color-bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    margin-bottom: var(--space-8);
    text-align: left;
}

.downloads-section h2 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-4);
}

.downloads-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.download-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4);
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}

.download-info h4 {
    font-size: var(--text-base);
    margin: 0 0 var(--space-1);
}

.download-info p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin: 0;
}

.download-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-6);
    color: var(--color-text-secondary);
}

.order-details {
    text-align: left;
    margin-bottom: var(--space-6);
}

.order-details h3 {
    font-size: var(--text-base);
    margin-bottom: var(--space-3);
}

.order-info {
    background: var(--color-bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: var(--space-2) 0;
    font-size: var(--text-sm);
}

.info-row span:first-child {
    color: var(--color-text-secondary);
}

.help-section {
    margin-bottom: var(--space-6);
}

.help-section p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin: var(--space-2) 0;
}

.success-actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
}

/* Spinner */
.spinner,
.spinner-small {
    width: 24px;
    height: 24px;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-small {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* RTL Cart Adjustments */
body.rtl .mini-cart {
    right: 0;
    left: auto;
}

body.rtl .cart-count {
    right: auto;
    left: 2px;
}

body.rtl .quick-add-btn {
    right: auto;
    left: var(--space-3);
}

body.rtl .cart-items-header,
body.rtl .cart-item {
    direction: rtl;
}

body.rtl .item-product {
    flex-direction: row-reverse;
}

body.rtl .downloads-section,
body.rtl .order-details {
    text-align: right;
}

/* ============================================
   RTL COMPLETE SUPPORT - Header, Footer, Layout
   ============================================ */

/* RTL Header */
body.rtl .header-inner {
    flex-direction: row-reverse;
}

body.rtl .nav-list {
    flex-direction: row-reverse;
}

body.rtl .header-actions {
    flex-direction: row-reverse;
}

body.rtl .language-switcher {
    flex-direction: row-reverse;
}

body.rtl .main-nav {
    margin-right: auto;
    margin-left: 0;
}

body.rtl .site-logo {
    order: 0;
}

/* RTL Mobile Navigation */
body.rtl .mobile-nav {
    text-align: right;
}

body.rtl .mobile-nav-inner {
    align-items: flex-end;
}

body.rtl .mobile-nav-link {
    text-align: right;
}

body.rtl .mobile-nav-footer {
    text-align: right;
}

/* RTL Footer - Complete Fix */
body.rtl .footer-grid {
    direction: rtl;
    text-align: right;
}

body.rtl .footer-brand {
    align-items: flex-start;
    text-align: right;
}

body.rtl .footer-description {
    text-align: right;
}

body.rtl .footer-social {
    justify-content: flex-start;
}

body.rtl .footer-links {
    text-align: right;
}

body.rtl .footer-nav {
    align-items: flex-start;
    text-align: right;
}

body.rtl .footer-contact {
    text-align: right;
    align-items: flex-start;
}

body.rtl .footer-contact .btn {
    align-self: flex-start;
}

body.rtl .footer-bottom {
    flex-direction: row-reverse;
}

body.rtl .footer-legal {
    flex-direction: row-reverse;
}

body.rtl .copyright {
    text-align: right;
}

/* RTL Footer Mobile */
@media (max-width: 640px) {
    body.rtl .footer-grid {
        text-align: center;
    }
    
    body.rtl .footer-brand {
        align-items: center;
    }
    
    body.rtl .footer-social {
        justify-content: center;
    }
    
    body.rtl .footer-nav {
        align-items: center;
    }
    
    body.rtl .footer-contact {
        align-items: center;
        text-align: center;
    }
    
    body.rtl .footer-contact .btn {
        align-self: center;
    }
    
    body.rtl .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    body.rtl .footer-legal {
        flex-direction: row;
        justify-content: center;
    }
    
    body.rtl .copyright {
        text-align: center;
    }
}

/* RTL General Layout */
body.rtl .container {
    direction: rtl;
}

body.rtl .section-header {
    text-align: right;
}

body.rtl .page-hero {
    text-align: right;
}

@media (max-width: 640px) {
    body.rtl .section-header,
    body.rtl .page-hero {
        text-align: center;
    }
}

/* RTL Cards and Content */
body.rtl .product-card-content,
body.rtl .project-card-content,
body.rtl .post-card-content {
    text-align: right;
}

body.rtl .product-card-footer {
    flex-direction: row-reverse;
}

body.rtl .filter-buttons {
    flex-direction: row-reverse;
}

/* RTL Forms */
body.rtl input,
body.rtl textarea,
body.rtl select {
    text-align: right;
}

body.rtl .form-group {
    text-align: right;
}

body.rtl label {
    text-align: right;
}

/* ============================================
   RTL RESPONSIVE - Mobile & Tablet
   ============================================ */

/* RTL Header Mobile */
@media (max-width: 768px) {
    body.rtl .header-inner {
        flex-direction: row-reverse;
    }
    
    body.rtl .header-actions {
        flex-direction: row-reverse;
        gap: var(--space-2);
    }
    
    body.rtl .mobile-menu-toggle {
        margin-right: 0;
        margin-left: 0;
    }
    
    body.rtl .cart-toggle {
        margin: 0;
    }
}

/* RTL Mini Cart Mobile */
@media (max-width: 768px) {
    body.rtl .mini-cart {
        right: auto;
        left: 0;
        right: 0;
    }
}

/* RTL Mobile Navigation */
@media (max-width: 768px) {
    body.rtl .mobile-nav {
        text-align: right;
    }
    
    body.rtl .mobile-nav-inner {
        align-items: stretch;
    }
    
    body.rtl .mobile-nav-link {
        text-align: right;
        padding-right: var(--space-4);
    }
}

/* RTL Products Grid Mobile */
@media (max-width: 640px) {
    body.rtl .products-grid,
    body.rtl .projects-grid {
        direction: rtl;
    }
    
    body.rtl .filter-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* RTL Services Section Mobile */
@media (max-width: 768px) {
    body.rtl .service-detail {
        text-align: right;
    }
    
    body.rtl .service-features {
        text-align: right;
    }
}

/* RTL Cart Page Mobile */
@media (max-width: 768px) {
    body.rtl .cart-items-header {
        display: none;
    }
    
    body.rtl .cart-item {
        flex-direction: column;
        text-align: right;
    }
    
    body.rtl .item-product {
        flex-direction: row-reverse;
    }
}

