/* ============================================
   PDFit - Professional PDF Tools
   Modern 2026 Design System
   ============================================ */

/* CSS Custom Properties */
:root {
    /* Colors - Dark Theme (Default) */
    --bg-primary: #2f2c2c;
    --bg-secondary: #3d3b3b;
    --bg-tertiary: #4a4747;
    --bg-card: rgba(61, 59, 59, 0.6);
    --bg-card-hover: rgba(74, 71, 71, 0.6);

    --text-primary: #fafafa;
    --text-secondary: #c4c0c0;
    --text-tertiary: #9e9a9a;
    --text-muted: #787474;

    --accent-primary: #ff9800;
    --accent-secondary: #ffb74d;
    --accent-tertiary: #ffc947;
    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    --accent-rose: #f43f5e;
    --accent-amber: #ff9800;

    --gradient-primary: linear-gradient(135deg, #ff9800, #ffc947, #ff9800);
    --gradient-secondary: linear-gradient(135deg, #ff9800, #ffb74d);
    --gradient-mesh: radial-gradient(ellipse at 20% 50%, rgba(255, 152, 0, 0.1), transparent 50%),
                     radial-gradient(ellipse at 80% 20%, rgba(255, 183, 77, 0.07), transparent 50%),
                     radial-gradient(ellipse at 50% 80%, rgba(255, 201, 71, 0.05), transparent 50%);

    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(255, 255, 255, 0.15);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(255, 152, 0, 0.15);

    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --border-radius-full: 9999px;

    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Space Grotesk', 'Inter', sans-serif;

    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

    --nav-height: 72px;
    --container-max: 1280px;
    --section-gap: 120px;
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #fafafa;
    --bg-secondary: #f4f4f5;
    --bg-tertiary: #e4e4e7;
    --bg-card: rgb(255 255 255);
    --bg-card-hover: rgba(255, 255, 255, 0.9);
    --text-primary: #09090b;
    --text-secondary: #52525b;
    --text-tertiary: #71717a;
    --text-muted: #a1a1aa;
    --glass-bg: rgb(231 227 227);
    --glass-border: rgba(0, 0, 0, 0.06);
    --glass-border-hover: rgba(0, 0, 0, 0.12);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 40px rgba(255, 152, 0, 0.1);
    --gradient-mesh: radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.08), transparent 50%),
                     radial-gradient(ellipse at 80% 20%, rgba(168, 85, 247, 0.06), transparent 50%),
                     radial-gradient(ellipse at 50% 80%, rgba(6, 182, 212, 0.05), transparent 50%);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
}

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

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
}

ul {
    list-style: none;
}

/* ============================================
   Animated Background
   ============================================ */
.bg-mesh {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.mesh-gradient {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    animation: meshFloat 20s ease-in-out infinite;
}

.mesh-1 {
    width: 600px;
    height: 600px;
    background: rgba(99, 102, 241, 0.12);
    top: -200px;
    left: -100px;
    animation-delay: 0s;
}

.mesh-2 {
    width: 500px;
    height: 500px;
    background: rgba(168, 85, 247, 0.08);
    top: 40%;
    right: -150px;
    animation-delay: -7s;
}

.mesh-3 {
    width: 400px;
    height: 400px;
    background: rgba(6, 182, 212, 0.06);
    bottom: -100px;
    left: 30%;
    animation-delay: -14s;
}

.grain-overlay {
    position: absolute;
    inset: 0;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    pointer-events: none;
}

@keyframes meshFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

[data-theme="light"] .grain-overlay {
    opacity: 0.03;
}

[data-theme="light"] .mesh-1 {
    background: rgba(99, 102, 241, 0.06);
}
[data-theme="light"] .mesh-2 {
    background: rgba(168, 85, 247, 0.04);
}
[data-theme="light"] .mesh-3 {
    background: rgba(6, 182, 212, 0.03);
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    transition: var(--transition-base);
    border-bottom: 1px solid var(--glass-border);
}

.navbar.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10;
}

.logo-icon {
    display: flex;
    align-items: center;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo-accent {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-link {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--glass-bg);
}

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

.theme-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.theme-toggle:hover {
    color: var(--text-primary);
    background: var(--glass-bg);
}

[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--border-radius-md);
    transition: var(--transition-base);
    white-space: nowrap;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-secondary);
    color: white;
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.45);
    transform: translateY(-1px);
}

.btn-ghost {
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--glass-bg);
}

.btn-glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    backdrop-filter: blur(12px);
}

.btn-glass:hover {
    border-color: var(--glass-border-hover);
    background: var(--bg-card-hover);
}

.btn-white {
    background: white;
    color: #09090b;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.3);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 15px;
    border-radius: var(--border-radius-lg);
}

.btn-block {
    width: 100%;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 24px;
    padding: 4px 0;
    z-index: 10;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-base);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: calc(var(--nav-height) + 40px) 24px 0;
    text-align: center;
    position: relative;
}

.hero-container {
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-full);
    margin-bottom: 32px;
    backdrop-filter: blur(12px);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #ff9800;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(40px, 7vw, 50px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 10px;
}

html[lang="ar"] .hero-title {
    font-family: 'Cairo', sans-serif;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-suffix {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-primary);
}

.stat-label {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--glass-border);
}

/* Hero Visual */
.hero-visual {
    margin-top: 60px;
    position: relative;
    height: 280px;
    width: 100%;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-card-stack {
    position: relative;
    width: 100%;
    height: 100%;
}

.floating-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 22px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    backdrop-filter: blur(20px);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
    animation: floatCard 6s ease-in-out infinite;
    white-space: nowrap;
}

.fc-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fc-icon-merge { background: rgba(99, 102, 241, 0.15); color: #6366f1; }
.fc-icon-compress { background: rgba(6, 182, 212, 0.15); color: #06b6d4; }
.fc-icon-convert { background: rgba(168, 85, 247, 0.15); color: #a855f7; }
.fc-icon-sign { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.fc-icon-protect { background: rgba(244, 63, 94, 0.15); color: #f43f5e; }

.card-1 { top: 0; left: 5%; animation-delay: 0s; }
.card-2 { top: 15%; right: 5%; animation-delay: -1.5s; }
.card-3 { top: 50%; left: 10%; animation-delay: -3s; }
.card-4 { top: 55%; right: 10%; animation-delay: -4.5s; }
.card-5 { bottom: 5%; left: 30%; animation-delay: -2s; }

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

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

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--bg-card);
    background: #ff9800;
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--border-radius-full);
    margin-bottom: 20px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 16px;
}

.section-desc {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ============================================
   Tools Section
   ============================================ */
.tools-section {
    padding-bottom: 0px;
}

.tool-categories {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-full);
    transition: var(--transition-base);
    cursor: pointer;
}

.category-btn:hover {
    color: var(--text-primary);
    border-color: var(--glass-border-hover);
}

.category-btn.active {
    color: white;
    background: var(--gradient-secondary);
    border-color: transparent;
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.3);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.tool-card {
    position: relative;
    padding: 15px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    backdrop-filter: blur(12px);
    transition: var(--transition-base);
    overflow: hidden;
    cursor: pointer;
    height: 260px;
}

.tool-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--border-radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: var(--transition-base);
}

.tool-card:hover {
    transform: translateY(-4px);
    border-color: var(--glass-border-hover);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

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

.tool-card.hidden {
    display: none;
}

.tool-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.tool-icon-merge { background: rgba(255, 152, 0, 0.12); color: #ff9800; }
.tool-icon-split { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.tool-icon-compress { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.tool-icon-word { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.tool-icon-image { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.tool-icon-edit { background: rgba(99, 102, 241, 0.12); color: #6366f1; }
.tool-icon-sign { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.tool-icon-rotate { background: rgba(6, 182, 212, 0.12); color: #06b6d4; }
.tool-icon-pages { background: rgba(20, 184, 166, 0.12); color: #14b8a6; }
.tool-icon-watermark { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.tool-icon-lock { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.tool-icon-unlock { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.tool-icon-w2p { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.tool-icon-i2p { background: rgba(236, 72, 153, 0.12); color: #ec4899; }
.tool-icon-convert { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.tool-icon-organize { background: rgba(99, 102, 241, 0.12); color: #6366f1; }
.tool-icon-flatten { background: rgba(20, 184, 166, 0.12); color: #14b8a6; }
.tool-icon-compare { background: rgba(6, 182, 212, 0.12); color: #06b6d4; }
.tool-icon-remove-pages { background: rgba(249, 115, 22, 0.12); color: #f97316; }
.tool-icon-add-pages { background: rgba(6, 182, 212, 0.12); color: #06b6d4; }
.tool-icon-ocr { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.tool-icon-word-to-pdf { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.tool-icon-epub-to-pdf { background: rgba(168, 85, 247, 0.12); color: #a855f7; }
.tool-icon-image-to-pdf { background: rgba(236, 72, 153, 0.12); color: #ec4899; }
.tool-icon-pdf-to-image { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.tool-icon-pdfToPpt { background: rgba(239, 68, 68, 0.12); color: #ef4444; }

[data-theme="light"] .tool-icon-merge { background: rgba(255, 152, 0, 0.08); color: #ff9800; }
[data-theme="light"] .tool-icon-split { background: rgba(239, 68, 68, 0.08); color: #ef4444; }
[data-theme="light"] .tool-icon-compress { background: rgba(16, 185, 129, 0.08); color: #10b981; }
[data-theme="light"] .tool-icon-word { background: rgba(59, 130, 246, 0.08); color: #3b82f6; }
[data-theme="light"] .tool-icon-image { background: rgba(139, 92, 246, 0.08); color: #8b5cf6; }
[data-theme="light"] .tool-icon-edit { background: rgba(99, 102, 241, 0.08); color: #6366f1; }
[data-theme="light"] .tool-icon-sign { background: rgba(16, 185, 129, 0.08); color: #10b981; }
[data-theme="light"] .tool-icon-rotate { background: rgba(6, 182, 212, 0.08); color: #06b6d4; }
[data-theme="light"] .tool-icon-pages { background: rgba(20, 184, 166, 0.08); color: #14b8a6; }
[data-theme="light"] .tool-icon-watermark { background: rgba(139, 92, 246, 0.08); color: #8b5cf6; }
[data-theme="light"] .tool-icon-lock { background: rgba(239, 68, 68, 0.08); color: #ef4444; }
[data-theme="light"] .tool-icon-unlock { background: rgba(16, 185, 129, 0.08); color: #10b981; }
[data-theme="light"] .tool-icon-w2p { background: rgba(59, 130, 246, 0.08); color: #3b82f6; }
[data-theme="light"] .tool-icon-i2p { background: rgba(236, 72, 153, 0.08); color: #ec4899; }
[data-theme="light"] .tool-icon-convert { background: rgba(245, 158, 11, 0.08); color: #f59e0b; }
[data-theme="light"] .tool-icon-organize { background: rgba(99, 102, 241, 0.08); color: #6366f1; }
[data-theme="light"] .tool-icon-flatten { background: rgba(20, 184, 166, 0.08); color: #14b8a6; }
[data-theme="light"] .tool-icon-compare { background: rgba(6, 182, 212, 0.08); color: #06b6d4; }
[data-theme="light"] .tool-icon-remove-pages { background: rgba(249, 115, 22, 0.08); color: #f97316; }
[data-theme="light"] .tool-icon-add-pages { background: rgba(6, 182, 212, 0.08); color: #06b6d4; }
[data-theme="light"] .tool-icon-ocr { background: rgba(16, 185, 129, 0.08); color: #10b981; }
[data-theme="light"] .tool-icon-word-to-pdf { background: rgba(59, 130, 246, 0.08); color: #3b82f6; }
[data-theme="light"] .tool-icon-epub-to-pdf { background: rgba(168, 85, 247, 0.08); color: #a855f7; }
[data-theme="light"] .tool-icon-image-to-pdf { background: rgba(236, 72, 153, 0.08); color: #ec4899; }
[data-theme="light"] .tool-icon-pdf-to-image { background: rgba(139, 92, 246, 0.08); color: #8b5cf6; }
[data-theme="light"] .tool-icon-pdfToPpt { background: rgba(239, 68, 68, 0.08); color: #ef4444; }
.tool-icon-create { background: rgba(16, 185, 129, 0.12); color: #10b981; }
[data-theme="light"] .tool-icon-create { background: rgba(16, 185, 129, 0.08); color: #10b981; }

.tool-name {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.tool-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.tool-link {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-primary);
    transition: var(--transition-fast);
}

.tool-link:hover svg {
    transform: translateX(4px);
}

.tool-link svg {
    transition: var(--transition-fast);
}

/* ============================================
   Features Section
   ============================================ */
.features-section {
    padding: var(--section-gap) 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.feature-card {
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    backdrop-filter: blur(12px);
    transition: var(--transition-base);
}

.feature-card:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-2px);
}

.feature-card-large {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    align-items: center;
    padding: 40px;
}

.feature-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.speedometer {
    width: 200px;
    height: 200px;
}

.speed-ring {
    position: relative;
    width: 100%;
    height: 100%;
}

.speed-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.speed-progress {
    animation: speedAnim 2s ease-out forwards;
}

@keyframes speedAnim {
    from { stroke-dashoffset: 327; }
    to { stroke-dashoffset: 33; }
}

.speed-value {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.speed-num {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.speed-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius-md);
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    margin-bottom: 20px;
}

.feature-content h3 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.feature-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.feature-list li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
    flex-shrink: 0;
}

/* ============================================
   How It Works
   ============================================ */
.how-section {
    padding: var(--section-gap) 0;
}

.steps-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.step-card {
    text-align: center;
    padding: 32px;
    flex: 1;
    max-width: 300px;
}

.step-number {
    font-family: var(--font-display);
    font-size: 64px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.5;
    line-height: 1;
    margin-bottom: 20px;
}

.step-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: var(--accent-primary);
    transition: var(--transition-base);
}

.step-card:hover .step-icon-wrapper {
    border-color: var(--accent-primary);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.2);
}

.step-connector {
    display: flex;
    align-items: center;
    padding-bottom: 60px;
}

.step-card h3 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.step-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ============================================
   Testimonials
   ============================================ */
.testimonials-section {
    padding: var(--section-gap) 0;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.testimonial-card {
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    backdrop-filter: blur(12px);
    transition: var(--transition-base);
}

.testimonial-card:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-2px);
}

.testimonial-stars {
    display: flex;
    gap: 3px;
    margin-bottom: 16px;
}

.testimonial-text {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gradient-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.author-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

.author-role {
    display: block;
    font-size: 13px;
    color: var(--text-tertiary);
}

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
    padding: 0 0 20px;
}

.cta-card {
    position: relative;
    padding: 80px 40px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-xl);
    backdrop-filter: blur(12px);
    text-align: center;
    overflow: hidden;
}

.cta-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.cta-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
}

.cta-orb-1 {
    width: 300px;
    height: 300px;
    background: #ff98003b;
    top: -100px;
    right: -50px;
}

.cta-orb-2 {
    width: 250px;
    height: 250px;
    background: #ff98003b;
    bottom: -80px;
    left: -30px;
}

.cta-title {
    font-family: var(--font-display);
    font-size: clamp(24px, 3.5vw, 40px);
    font-weight: 800;
    margin-bottom: 16px;
    position: relative;
}

.cta-desc {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 32px;
    position: relative;
}

.cta-actions {
    position: relative;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    border-top: 1px solid var(--glass-border);
    padding: 64px 0 32px;
}

.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand .nav-logo {
    margin-bottom: 16px;
}

.footer-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 8px;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.social-link:hover {
    color: var(--text-primary);
    border-color: var(--glass-border-hover);
}

.footer-links h4 {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

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

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--glass-border);
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: var(--text-tertiary);
}

/* ============================================
   Toast
   ============================================ */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 24px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition-spring);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
}

/* ============================================
   Animations
   ============================================ */
[data-animate] {
    opacity: 1;
    transform: none;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .feature-card-large {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }

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

@media (max-width: 768px) {
    :root {
        --section-gap: 80px;
        --nav-height: 64px;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-primary);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        opacity: 0;
        visibility: hidden;
        transition: var(--transition-base);
        z-index: 5;
    }

    .nav-links.open {
        opacity: 1;
        visibility: visible;
    }

    .nav-links .nav-link {
        font-size: 20px;
        padding: 12px 24px;
    }

    .nav-actions .btn-ghost,
    .nav-actions .btn-primary {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

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

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

    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }

    .stat-divider {
        width: 40px;
        height: 1px;
    }

    .steps-grid {
        flex-direction: column;
        gap: 0;
    }

    .step-connector {
        transform: rotate(90deg);
        padding-bottom: 0;
        margin: -20px 0;
    }

    .floating-card {
        font-size: 12px;
        padding: 10px 16px;
    }

    .fc-icon {
        width: 32px;
        height: 32px;
    }

    .fc-icon svg {
        width: 18px;
        height: 18px;
    }

    .hero-visual {
        height: 200px;
    }

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

    .tool-categories {
        gap: 6px;
    }

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

    .cta-card {
        padding: 48px 24px;
    }

    .tool-card {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 32px;
    }

    .category-btn {
        padding: 6px 14px;
        font-size: 12px;
    }
}

/* ============================================
   Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* ============================================
   Selection
   ============================================ */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: var(--text-primary);
}

/* ============================================
   Language Switcher
   ============================================ */
.lang-switcher {
    position: relative;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.lang-toggle:hover {
    color: var(--text-primary);
    border-color: var(--glass-border-hover);
}

.lang-toggle .lang-icon {
    display: block;
    flex-shrink: 0;
}

.lang-code {
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 130px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition-base);
    z-index: 100;
}

.lang-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: none;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: left;
}

.lang-option:hover {
    color: var(--text-primary);
    background: var(--glass-bg);
}

.lang-option.active {
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.08);
}

.lang-option-label {
    flex: 1;
}

.lang-option svg {
    flex-shrink: 0;
}

[dir="rtl"] .lang-option {
    text-align: right;
}

[dir="rtl"] .lang-dropdown {
    right: auto;
    left: 0;
}

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

[dir="rtl"] body {
    text-align: right;
}

/* Text alignment */
[dir="rtl"] p,
[dir="rtl"] li,
[dir="rtl"] span,
[dir="rtl"] label,
[dir="rtl"] td,
[dir="rtl"] th {
    text-align: right;
}

/* Navbar */
[dir="rtl"] .nav-container {
    flex-direction: row-reverse;
}

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

[dir="rtl"] .nav-actions {
    margin-right: 0;
    margin-left: 20px;
}

[dir="rtl"] .logo-text {
    margin-right: 0;
    margin-left: 8px;
}

/* Hero */
[dir="rtl"] .hero-badge svg {
    margin-left: 0;
    margin-right: 8px;
}

[dir="rtl"] .hero-actions .btn svg {
    margin-left: 0;
    margin-right: 8px;
}

[dir="rtl"] .hero-actions .btn-outline svg {
    margin-right: 0;
    margin-left: 8px;
}

/* Stats */
[dir="rtl"] .stats-grid {
    direction: ltr;
}

[dir="rtl"] .stat-number {
    direction: rtl;
}

/* Footer */
[dir="rtl"] .footer-grid {
    direction: rtl;
}

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

/* Tool page */
[dir="rtl"] .tool-header {
    text-align: right;
}

[dir="rtl"] .upload-zone-text svg {
    margin-left: 0;
    margin-right: 12px;
    transform: scaleX(-1);
}

[dir="rtl"] .step-number {
    margin-right: 0;
    margin-left: 12px;
}

[dir="rtl"] .how-to-step {
    flex-direction: row-reverse;
    text-align: right;
}

[dir="rtl"] .how-to-step p {
    text-align: right;
}

[dir="rtl"] .feature-item {
    text-align: right;
}

[dir="rtl"] .feature-item svg {
    margin-left: 0;
    margin-right: 12px;
}

/* Social proof */
[dir="rtl"] .social-proof {
    direction: rtl;
}

[dir="rtl"] .sp-avatars {
    margin-left: 0;
    margin-right: -8px;
}

[dir="rtl"] .sp-avatars .sp-avatar {
    margin-left: 0;
    margin-right: -8px;
}

[dir="rtl"] .sp-text {
    margin-left: 16px;
    margin-right: 0;
}

/* Sections */
[dir="rtl"] .section-tag svg {
    margin-left: 0;
    margin-right: 8px;
}

/* CTA */
[dir="rtl"] .cta-actions .btn svg {
    margin-left: 0;
    margin-right: 8px;
    transform: scaleX(-1);
}

/* Editor sidebar */
[dir="rtl"] .editor-sidebar {
    direction: rtl;
}

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

[dir="rtl"] .color-presets {
    direction: ltr;
}

/* Editor topbar */
[dir="rtl"] .editor-topbar {
    direction: ltr;
}

/* Blog */
[dir="rtl"] .blog-link svg {
    margin-left: 0;
    margin-right: 8px;
    transform: scaleX(-1);
}

[dir="rtl"] .post-back svg {
    margin-left: 0;
    margin-right: 6px;
    transform: scaleX(-1);
}

[dir="rtl"] .post-nav-link.next {
    text-align: left;
}

[dir="rtl"] .post-nav-link.prev {
    text-align: right;
}

/* Page numbers */
[dir="rtl"] .page-content {
    text-align: right;
}

