/* ============================================
   FBDown CMS - Main Stylesheet
   Modern, Responsive, Fast
   ============================================ */

/* === CSS Variables === */
:root {
    --primary: #1877F2;
    --primary-dark: #1565C0;
    --primary-light: #E7F3FF;
    --primary-gradient: linear-gradient(135deg, #1877F2 0%, #0D47A1 100%);
    --secondary: #42b72a;
    --accent: #F7B928;
    
    --bg: #F0F2F5;
    --bg-white: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-dark: #18191A;
    
    --text: #1C1E21;
    --text-secondary: #65676B;
    --text-light: #8A8D91;
    --text-white: #FFFFFF;
    
    --border: #DADDE1;
    --border-light: #E4E6EB;
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
    
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition: all 0.2s ease;
    
    --container: 1200px;
    --header-h: 64px;
}

/* === Reset === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* === Utilities === */
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.dot { margin: 0 6px; opacity: 0.4; }

/* === Button === */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--primary-gradient);
    color: var(--text-white);
    font-weight: 600;
    font-size: 16px;
    border-radius: var(--radius);
    border: none;
    transition: var(--transition);
    white-space: nowrap;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(24,119,242,0.4); color: #fff; }
.btn-primary:active { transform: translateY(0); }

/* === Header === */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
}
.navbar { height: var(--header-h); }
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
}
.logo:hover { color: var(--primary); }
.logo-icon { font-size: 28px; }
.logo-text { background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.logo img { height: 36px; width: auto; }

.nav-menu { display: flex; align-items: center; gap: 8px; }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active { background: var(--primary-light); color: var(--primary); }

/* Tools Dropdown */
.nav-dropdown { position: relative; display: inline-block; }
.nav-dropdown-btn {
    display: inline-flex; align-items: center; gap: 4px; padding: 8px 16px;
    border-radius: var(--radius-full); color: var(--text-secondary); font-weight: 500;
    font-size: 14px; transition: var(--transition); background: none; border: none;
    cursor: pointer; font-family: inherit; white-space: nowrap;
}
.nav-dropdown-btn:hover, .nav-dropdown-btn.active { background: var(--primary-light); color: var(--primary); }
.nav-dropdown-menu {
    display: none; position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%);
    min-width: 260px; background: var(--bg-white); border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.15); border: 1px solid var(--border-light);
    padding: 6px; z-index: 1000;
}
.nav-dropdown-menu::before {
    content: ''; position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
    border-left: 6px solid transparent; border-right: 6px solid transparent;
    border-bottom: 6px solid var(--bg-white);
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
    display: block; padding: 10px 14px; color: var(--text); font-size: 14px;
    border-radius: 6px; transition: var(--transition); font-weight: 500;
    text-decoration: none; white-space: nowrap;
}
.nav-dropdown-menu a:hover { background: var(--primary-light); color: var(--primary); }
.nav-dropdown-menu a.active { background: var(--primary-light); color: var(--primary); }

/* Language Dropdown */
.lang-dropdown { position: relative; margin-left: 12px; }
.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg);
    transition: var(--transition);
}
.lang-btn:hover { background: var(--primary-light); color: var(--primary); }
.lang-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    min-width: 180px;
    padding: 6px;
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
}
.lang-dropdown:hover .lang-menu, .lang-dropdown.open .lang-menu { display: block; }
.lang-menu a {
    display: block;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    transition: var(--transition);
}
.lang-menu a:hover, .lang-menu a.active { background: var(--primary-light); color: var(--primary); }

/* Mobile Toggle */
.nav-toggle { display: none; width: 40px; height: 40px; position: relative; border-radius: var(--radius-sm); }
.hamburger, .hamburger::before, .hamburger::after {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transition: var(--transition);
}
.hamburger { top: 50%; transform: translate(-50%, -50%); }
.hamburger::before { content: ''; top: -7px; left: 0; }
.hamburger::after { content: ''; bottom: -7px; left: 0; }

/* === Hero Section === */
.hero {
    background: var(--primary-gradient);
    padding: 60px 0 80px;
    position: relative;
    overflow: hidden;
}
.hero-tool { padding: 50px 0 70px; }
.hero-bg-shape {
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg);
    clip-path: ellipse(55% 100% at 50% 100%);
}
.hero-content { text-align: center; position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.hero-title { font-size: 42px; font-weight: 800; color: var(--text-white); line-height: 1.2; margin-bottom: 12px; }
.hero-subtitle { font-size: 18px; color: rgba(255,255,255,0.85); margin-bottom: 32px; line-height: 1.5; }

/* Tool Badge */
.tool-badge {
    display: inline-block;
    padding: 6px 18px;
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius-full);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 16px;
    backdrop-filter: blur(10px);
}

/* Tool Tabs */
.tool-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 28px;
}
.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.8);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}
.tab-btn:hover, .tab-btn.active { background: rgba(255,255,255,0.95); color: var(--primary); }
.tab-icon { font-size: 18px; }

/* Download Form */
.download-form { margin: 0 auto; max-width: 640px; }
.input-group {
    display: flex;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 3px solid transparent;
    transition: var(--transition);
}
.input-group:focus-within { border-color: rgba(255,255,255,0.5); }
.input-group input {
    flex: 1;
    padding: 18px 24px;
    border: none;
    outline: none;
    font-size: 16px;
    background: transparent;
    color: var(--text);
    min-width: 0;
}
.input-group input::placeholder { color: var(--text-light); }
.input-group .btn-primary {
    border-radius: 0 calc(var(--radius-lg) - 3px) calc(var(--radius-lg) - 3px) 0;
    padding: 18px 32px;
    font-size: 16px;
}
.input-hint { font-size: 13px; color: rgba(255,255,255,0.6); margin-top: 12px; }

/* Download Result */
.download-result {
    margin-top: 24px;
    text-align: left;
}
.result-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}
.result-header { display: flex; gap: 16px; margin-bottom: 20px; align-items: center; }
.result-thumb-wrap { width: 80px; height: 80px; flex-shrink: 0; border-radius: var(--radius); overflow: hidden; background: var(--bg); display: flex; align-items: center; justify-content: center; position: relative; }
.result-thumb-placeholder { font-size: 36px; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.result-thumb { width: 100%; height: 100%; object-fit: cover; }
.result-thumb-fallback { font-size: 36px; line-height: 1; }
.result-info { flex: 1; min-width: 0; }
.result-source { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.result-type { font-size: 13px; color: var(--text-secondary); margin-bottom: 4px; }
.result-title { font-size: 13px; color: var(--text-light); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-links { display: flex; flex-direction: column; gap: 10px; }
.result-link {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 20px; background: var(--bg); border-radius: var(--radius); transition: var(--transition);
}
.result-link-hd { background: #FFF9E6; border: 1px solid #FFE082; }
.result-link:hover { background: var(--primary-light); }
.result-link-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.result-link-quality { font-weight: 700; font-size: 15px; color: var(--text); }
.result-link-hd .result-link-quality { color: #E65100; }
.result-link-format { font-size: 13px; color: var(--text-secondary); }
.result-link-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.result-download-btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 10px 22px;
    background: var(--primary-gradient); color: #fff !important; border-radius: var(--radius-full);
    font-weight: 700; font-size: 14px; transition: var(--transition); text-decoration: none;
    white-space: nowrap;
}
.result-download-btn:hover { box-shadow: 0 4px 15px rgba(24,119,242,0.35); transform: translateY(-1px); color: #fff !important; }
.result-download-btn svg { flex-shrink: 0; }
.result-play-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 50%; background: var(--bg-white);
    border: 1px solid var(--border); font-size: 14px; transition: var(--transition); text-decoration: none; color: var(--text);
}
.result-play-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.result-error {
    background: #FFF5F5; border: 1px solid #FFCDD2; border-radius: var(--radius);
    padding: 16px 20px; display: flex; align-items: center; gap: 10px;
    color: #c62828; font-weight: 500; font-size: 14px;
}
.result-error-icon { font-size: 20px; flex-shrink: 0; }

/* === Content Sections === */
.content-section { padding: 60px 0; }
.content-section:nth-child(even) { background: var(--bg-white); }
.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 40px;
    color: var(--text);
}
.section-content.has-image { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.section-image img { border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.section-body { font-size: 16px; line-height: 1.8; color: var(--text-secondary); }

/* Features Grid */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
    background: var(--bg-white);
    padding: 32px 24px;
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid var(--border-light);
    transition: var(--transition);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.feature-card h3 { font-size: 18px; margin-bottom: 10px; color: var(--text); }
.feature-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: center; }
.step { padding: 24px; }
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--primary-gradient);
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    border-radius: 50%;
    margin-bottom: 16px;
}
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* === FAQ Section === */
.faq-section { padding: 60px 0; background: var(--bg-white); }
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
    transition: var(--transition);
}
.faq-item[open] { box-shadow: var(--shadow); border-color: var(--primary-light); }
.faq-question {
    padding: 20px 24px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    transition: var(--transition);
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after { content: '+'; font-size: 24px; color: var(--primary); font-weight: 300; flex-shrink: 0; margin-left: 16px; }
.faq-item[open] .faq-question::after { content: '−'; }
.faq-question:hover { color: var(--primary); }
.faq-answer { padding: 0 24px 20px; font-size: 15px; color: var(--text-secondary); line-height: 1.7; }

/* === Page Content === */
.page-section { padding: 40px 0 60px; }
.page-content { max-width: 800px; margin: 0 auto; }
.page-title { font-size: 36px; font-weight: 800; margin-bottom: 32px; }

/* Prose */
.prose { font-size: 16px; line-height: 1.8; color: var(--text-secondary); }
.prose h2 { font-size: 28px; color: var(--text); margin: 32px 0 16px; font-weight: 700; }
.prose h3 { font-size: 22px; color: var(--text); margin: 24px 0 12px; font-weight: 600; }
.prose p { margin-bottom: 16px; }
.prose ul, .prose ol { margin: 16px 0; padding-left: 24px; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--primary); text-decoration: underline; }
.prose img { border-radius: var(--radius); margin: 24px 0; }
.prose blockquote {
    border-left: 4px solid var(--primary);
    padding: 16px 24px;
    margin: 24px 0;
    background: var(--primary-light);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* === Breadcrumb === */
.breadcrumb { padding: 16px 0; background: var(--bg-white); border-bottom: 1px solid var(--border-light); }
.breadcrumb ol { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.breadcrumb li { color: var(--text-light); }
.breadcrumb li:not(:last-child)::after { content: '›'; margin-left: 8px; opacity: 0.4; }
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--primary); }

/* === Blog === */
.blog-section { padding: 40px 0 60px; }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.blog-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: var(--transition);
}
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.blog-card-image img { width: 100%; height: 200px; object-fit: cover; }
.blog-card-body { padding: 20px; }
.blog-category {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}
.blog-card-body h2 { font-size: 18px; margin-bottom: 8px; line-height: 1.4; }
.blog-card-body h2 a { color: var(--text); }
.blog-card-body h2 a:hover { color: var(--primary); }
.blog-excerpt { font-size: 14px; color: var(--text-secondary); margin-bottom: 12px; line-height: 1.5; }
.blog-meta { font-size: 13px; color: var(--text-light); display: flex; align-items: center; }

/* Blog Single */
.blog-single { padding: 40px 0 60px; }
.blog-layout { display: grid; grid-template-columns: 1fr 320px; gap: 40px; }
.blog-header { margin-bottom: 28px; }
.blog-header h1 { font-size: 34px; font-weight: 800; line-height: 1.3; margin-bottom: 16px; }
.blog-featured-image { margin-bottom: 28px; }
.blog-featured-image img { width: 100%; border-radius: var(--radius-lg); }
.blog-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border-light); }
.tag { padding: 6px 14px; background: var(--bg); border-radius: var(--radius-full); font-size: 13px; color: var(--text-secondary); }
.blog-share { display: flex; align-items: center; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border-light); }
.share-btn {
    padding: 8px 20px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}
.share-fb { background: #1877F2; }
.share-tw { background: #1DA1F2; }
.share-btn:hover { opacity: 0.9; color: #fff; }

/* Sidebar */
.blog-sidebar { position: sticky; top: calc(var(--header-h) + 20px); }
.sidebar-widget { background: var(--bg-white); border-radius: var(--radius-lg); padding: 24px; border: 1px solid var(--border-light); margin-bottom: 20px; }
.sidebar-widget h3 { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.recent-posts li { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border-light); }
.recent-posts li:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.recent-posts a { display: block; }
.recent-title { display: block; font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 4px; line-height: 1.4; }
.recent-posts time { font-size: 12px; color: var(--text-light); }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 40px; }
.page-link {
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}
.page-link:hover, .page-link.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* === Contact Form === */
.contact-form-wrap { margin-top: 32px; }
.contact-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form .form-group { margin-bottom: 18px; }
.contact-form label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; color: var(--text); }
.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    transition: var(--transition);
    outline: none;
    background: var(--bg-white);
}
.contact-form input:focus, .contact-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(24,119,242,0.1);
}
.contact-form textarea { resize: vertical; min-height: 120px; }

/* Alerts */
.alert { padding: 14px 20px; border-radius: var(--radius); margin-bottom: 20px; font-size: 14px; font-weight: 500; }
.alert-success { background: #dcfce7; color: #16a34a; border: 1px solid #bbf7d0; }
.alert-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }

/* === 404 === */
.error-page { padding: 80px 0; text-align: center; }
.error-icon { font-size: 64px; margin-bottom: 16px; }
.error-content h1 { font-size: 80px; font-weight: 800; color: var(--primary); line-height: 1; }
.error-content h2 { font-size: 28px; margin-bottom: 12px; }
.error-content p { color: var(--text-secondary); margin-bottom: 24px; }

/* === Footer === */
.site-footer { background: var(--bg-dark); color: rgba(255,255,255,0.7); padding: 60px 0 0; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-brand .footer-logo { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 20px; font-weight: 700; margin-bottom: 14px; }
.footer-desc { font-size: 14px; line-height: 1.7; margin-bottom: 20px; }
.footer-social { display: flex; gap: 12px; }
.footer-social a { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.1); border-radius: 50%; color: rgba(255,255,255,0.7); transition: var(--transition); }
.footer-social a:hover { background: var(--primary); color: #fff; }
.footer-links h3 { color: #fff; font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.footer-links ul li { margin-bottom: 10px; }
.footer-links a { color: rgba(255,255,255,0.6); font-size: 14px; }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 20px 0; text-align: center; font-size: 13px; }
.footer-disclaimer { margin-top: 8px; font-size: 12px; opacity: 0.5; }

/* === Ads === */
.ad-container { margin: 16px auto; text-align: center; overflow: hidden; }
.ad-header, .ad-footer { max-width: var(--container); margin: 0 auto; padding: 10px 20px; }

/* === Empty State === */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-light); font-size: 16px; }

/* === RTL Support === */
.rtl { direction: rtl; text-align: right; }
.rtl .nav-links { flex-direction: row-reverse; }
.rtl .breadcrumb ol { flex-direction: row-reverse; }
.rtl .breadcrumb li:not(:last-child)::after { content: '‹'; margin-left: 0; margin-right: 8px; }
.rtl .prose { direction: rtl; }
.rtl .lang-menu { right: auto; left: 0; }

/* === Responsive === */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .blog-layout { grid-template-columns: 1fr; }
    .blog-sidebar { position: static; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    :root { --header-h: 60px; }
    
    .nav-toggle { display: flex; align-items: center; justify-content: center; }
    .nav-menu {
        display: none;
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: var(--bg-white);
        border-bottom: 1px solid var(--border-light);
        padding: 16px 20px;
        box-shadow: var(--shadow-lg);
        flex-direction: column;
        align-items: stretch;
    }
    .nav-menu.open { display: flex; }
    .nav-links { flex-direction: column; gap: 2px; }
    .nav-links a { display: block; padding: 12px 16px; border-radius: var(--radius-sm); }
    .nav-dropdown-btn { width: 100%; text-align: left; padding: 12px 16px; border-radius: var(--radius-sm); }
    .nav-dropdown-menu { position: static; box-shadow: none; border: none; padding: 0 0 0 16px; margin-top: 0; min-width: auto; background: transparent; }
    .nav-dropdown-menu a { padding: 10px 16px; font-size: 13px; color: var(--text-secondary); }
    .nav-dropdown.open .nav-dropdown-menu { display: block; }
    .lang-dropdown { margin: 8px 0 0; }
    .lang-menu { position: static; box-shadow: none; border: 1px solid var(--border-light); }
    
    .hero { padding: 40px 0 60px; }
    .hero-title { font-size: 28px; }
    .hero-subtitle { font-size: 15px; }
    
    .tool-tabs { flex-wrap: wrap; }
    .tab-btn { padding: 8px 16px; font-size: 13px; }
    
    .input-group { flex-direction: column; border-radius: var(--radius); }
    .input-group input { padding: 16px; }
    .input-group .btn-primary { border-radius: 0 0 calc(var(--radius) - 3px) calc(var(--radius) - 3px); padding: 16px; }
    
    .result-header { flex-direction: column; gap: 12px; }
    .result-thumb-wrap { width: 100%; height: 120px; }
    .result-link { flex-direction: column; gap: 10px; align-items: stretch; text-align: center; }
    .result-link-info { justify-content: center; }
    .result-link-actions { justify-content: center; }
    .result-download-btn { justify-content: center; }
    
    .section-title { font-size: 24px; margin-bottom: 28px; }
    .section-content.has-image { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; gap: 16px; }
    
    .blog-grid { grid-template-columns: 1fr; }
    .blog-header h1 { font-size: 26px; }
    
    .contact-form .form-row { grid-template-columns: 1fr; }
    
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .page-title { font-size: 28px; }
    .content-section { padding: 40px 0; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 24px; }
    .hero-subtitle { font-size: 14px; }
    .btn-primary { padding: 12px 24px; font-size: 14px; }
}

/* === Animations === */
@keyframes fadeIn { from { opacity:0; transform: translateY(10px); } to { opacity:1; transform: translateY(0); } }
.download-result { animation: fadeIn 0.3s ease; }

/* === Lazy Loading === */
img[loading="lazy"] { opacity: 0; transition: opacity 0.3s; }
img[loading="lazy"].loaded, img[loading="lazy"][complete] { opacity: 1; }

/* === Print === */
@media print {
    .site-header, .site-footer, .download-form, .tool-tabs, .ad-container, .blog-share, .nav-toggle { display: none !important; }
    .hero { background: none !important; color: var(--text) !important; padding: 20px 0; }
    .hero-title, .hero-subtitle { color: var(--text) !important; }
    body { background: #fff; }
}
