/* Poppins Font moved to header.php for better performance */

/* Tajawal Font Localization */
@font-face {
    font-family: 'Tajawal';
    src: url('../fonts/Tajawal/Tajawal-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Tajawal';
    src: url('../fonts/Tajawal/Tajawal-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Tajawal';
    src: url('../fonts/Tajawal/Tajawal-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Tajawal';
    src: url('../fonts/Tajawal/Tajawal-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Tajawal';
    src: url('../fonts/Tajawal/Tajawal-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Tajawal';
    src: url('../fonts/Tajawal/Tajawal-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Light Mode */
    --primary: #e6004d;
    /* Darkened to #e6004d to satisfy 4.5:1 contrast ratio for accessibility */
    --primary-hover: #c40041;
    --primary-light: rgba(230, 0, 77, 0.05);
    --primary-soft: rgba(230, 0, 77, 0.1);
    --bg-main: #fcfcfc;
    --bg-card: #ffffff;
    --bg-sidebar: #f8f9fa;
    --text-main: #000000;
    --text-muted: #222222;
    --border-color: #ebebeb;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --sidebar-width: 280px;
    --glass-bg: rgba(255, 255, 255, 0.85);

    /* Fonts */
    --font-ar: 'Tajawal', sans-serif;
    --font-en: 'Poppins', system-ui, -apple-system, sans-serif;
}

/* Dark Mode Overrides */
body.dark-mode {
    --primary-light: rgba(255, 28, 93, 0.1);
    --primary-soft: rgba(255, 28, 93, 0.2);
    --bg-main: #0a0a0b;
    --bg-card: #151517;
    --bg-sidebar: #1a1a1c;
    --text-main: #f8f9fa;
    --text-muted: #adb5bd;
    --border-color: #2d2d30;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    --glass-bg: rgba(10, 10, 11, 0.85);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-ar);
}

body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

html,
body {
    width: 100%;
    margin: 0;
    overflow-x: hidden;
    position: relative;
    /* Sometimes helps with positioning context */
}

/* Font Awesome Fixes */
.fa-solid,
.fas,
.fa-regular,
.far,
.fa-light,
.fa-thin,
.fa-duotone {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
}

.fa-brands,
.fab {
    font-family: "Font Awesome 6 Brands" !important;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 14px;
    overflow-x: hidden;
    background-image: radial-gradient(circle at 10% 20%, var(--primary-light) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, var(--primary-light) 0%, transparent 40%);
    background-attachment: fixed;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    /* Reduced from 20px */
}

/* Header & Nav */
header {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    /* Space above and below header content */
}

.nav-wrapper {
    height: 55px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: none;
    /* Hidden as per request to move into icon */
    list-style: none;
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    /* Spacing for the icon */
    transition: 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a i {
    font-size: 1rem;
    opacity: 0.8;
}

.theme-toggle {
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--primary);
    background: none;
    border: none;
    padding: 5px;
}

/* Hero Section (App Info Card) */
.hero-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 30px;
    padding: 15px 25px;
    margin-top: 40px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    position: relative;
    overflow: hidden;
}

body.dark-mode .hero-card {
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-main-info {
    display: flex;
    align-items: center;
    gap: 30px;
}

.app-icon {
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.1));
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.app-info-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Sticks to right in RTL */
    text-align: right;
}

.app-info-content h1 {
    font-size: 1.4rem;
    font-weight: 900;
    margin-bottom: 5px;
    color: var(--text-main);
    letter-spacing: -0.5px;
    font-family: 'Tajawal', sans-serif;
}

.app-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 5px;
    font-weight: 500;
}

.app-meta .interactive-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-sidebar);
    padding: 4px 12px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.app-meta .interactive-rating:hover {
    border-color: var(--primary-soft);
    background: #fff;
}

body.dark-mode .app-meta .interactive-rating:hover {
    background: rgba(255, 255, 255, 0.05);
}

.interactive-rating .stars {
    display: flex;
    gap: 3px;
}

.interactive-rating .stars i {
    font-size: 0.85rem;
    color: #cbd5e0;
    transition: all 0.2s ease;
}

.interactive-rating .stars i.active,
.interactive-rating .stars i:hover,
.interactive-rating .stars i.hover {
    color: #f1c40f;
    transform: scale(1.1);
}

.interactive-rating .stars i.selected {
    color: #f1c40f;
}

.interactive-rating .rating-count {
    font-weight: 800;
    font-size: 0.78rem;
    color: var(--text-main);
}

.interactive-rating.voted {
    pointer-events: none;
    background: var(--primary-soft) !important;
    border-color: var(--primary) !important;
}

.interactive-rating.voted .rating-count {
    color: var(--primary);
}

/* Premium App Meta Styling (Google Play / App Store Style) */
.app-meta-new {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 5px;
}

.meta-row-1 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    font-weight: 700;
}

.meta-free {
    color: #2ecc71;
}

.meta-rating {
    color: #f1c40f;
    display: flex;
    align-items: center;
    gap: 5px;
}

.meta-rating i {
    font-size: 0.75rem;
}

.meta-rating span {
    color: #8e8e93;
    font-weight: 500;
    font-size: 0.75rem;
}

.meta-downloads {
    color: #3498db;
}

.meta-sep {
    width: 4px;
    height: 4px;
    background: #d1d1d6;
    border-radius: 50%;
}

.meta-row-2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.meta-row-3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.trusted-badge {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid #c8e6c9;
}

body.dark-mode .trusted-badge {
    background: rgba(46, 125, 50, 0.1);
    border-color: rgba(46, 125, 50, 0.2);
}

/* Moved Rating Section Styling */
.visitor-rating-box {
    background: var(--bg-sidebar);
    border-radius: 25px;
    padding: 30px;
    text-align: center;
    border: 1px solid var(--border-color);
    margin-top: 40px;
}

.visitor-rating-box h2 {
    font-size: 1.1rem;
    font-weight: 900;
    margin-bottom: 20px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.rating-widget {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: #fff;
    padding: 10px 25px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.02);
}

body.dark-mode .rating-widget {
    background: #1a1a1c;
}

.hero-actions-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Centered for better balance */
    gap: 12px;
    width: 100%;
    max-width: 280px;
}

.btn-download {
    background: linear-gradient(135deg, var(--primary), #ff407d);
    color: white;
    padding: 12px 25px;
    width: 100%;
    border-radius: 18px;
    text-decoration: none;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 25px rgba(255, 28, 93, 0.3);
}

.btn-download:hover {
    background: linear-gradient(135deg, #ff407d, var(--primary));
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(255, 28, 93, 0.4);
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    align-self: center;
    /* Centered under the button */
}

.security-badge i {
    color: #2ecc71;
    font-size: 1.1rem;
}

/* Two-Column Layout */
.main-layout {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: 30px;
    margin-top: 30px;
    padding-bottom: 20px;
    align-items: start;
}

/* Sidebar Styling */
.sidebar {
    position: relative;
    height: auto;
    align-self: start;
}

.sidebar-card {
    background: var(--bg-sidebar);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 22px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02);
}

body.dark-mode .sidebar-card {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.sidebar-title {
    font-size: 0.85rem;
    font-weight: 900;
    margin-bottom: 18px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-title::before {
    content: '';
    width: 4px;
    height: 18px;
    background: linear-gradient(to bottom, var(--primary), #ff6b9d);
    border-radius: 10px;
}

.info-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

body.dark-mode .info-item {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
}

.info-item:hover {
    background: #fff;
    border-color: var(--primary-soft);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

body.dark-mode .info-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-label {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.75rem;
}

.info-label i {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-soft), #fff);
    color: var(--primary);
    border-radius: 10px;
    font-size: 0.9rem;
    box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.8);
}

body.dark-mode .info-label i {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    box-shadow: none;
}

.info-value {
    color: var(--text-muted);
    font-weight: 800;
    font-size: 0.82rem;
    text-align: left;
}

[dir="rtl"] .info-value {
    text-align: left;
}

[dir="ltr"] .info-value {
    text-align: right;
}

/* Similar Apps Premium Styling */
.similar-apps-list {
    margin-top: 5px;
}

.similar-app-item {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    padding: 12px;
    background: rgba(var(--primary-rgb, 230, 0, 77), 0.03);
    border: 1px solid rgba(var(--primary-rgb, 230, 0, 77), 0.05);
    border-radius: 18px;
    transition: all 0.3s ease;
}

.similar-app-item:hover {
    background: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
    border-color: var(--primary-soft);
}

body.dark-mode .similar-app-item {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .similar-app-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.app-mini-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    display: block;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    background: #fff;
    padding: 2px;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    border-color: var(--primary-soft);
    background: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.03);
}

body.dark-mode .feature-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.feature-icon-box {
    width: 38px !important;
    height: 38px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #fff1f2 !important;
    color: #ff1c5d !important;
    border-radius: 12px !important;
    font-size: 1.1rem !important;
    flex-shrink: 0 !important;
    box-shadow: 0 4px 10px rgba(255, 28, 93, 0.05) !important;
}

.feature-icon-box i {
    color: #ff1c5d !important;
    display: block !important;
}

body.dark-mode .feature-icon-box {
    background: rgba(255, 255, 255, 0.05) !important;
}

.feature-item strong {
    display: block;
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 4px;
}

.whats-new-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: var(--bg-sidebar);
    padding: 25px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.content-section {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 35px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

body.dark-mode .content-section {
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.section-badge {
    display: inline-block;
    padding: 6px 15px;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 15px;
}

/* Main Content & Article Typography */
.download-page .main-content,
.content-section {
    background: var(--bg-card) !important;
    border-radius: 28px !important;
    padding: 45px 35px !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04) !important;
    margin-bottom: 30px;
    position: relative;
    z-index: 10;
    text-align: inherit;
}

[dir="rtl"] .content-section,
[dir="rtl"] .main-content {
    text-align: right;
}

[dir="ltr"] .content-section,
[dir="ltr"] .main-content {
    text-align: left;
}

.download-page .main-content h2 {
    border: none !important;
    padding: 0 !important;
    justify-content: center;
}

.content-section h2,
.main-content h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 35px 0 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

[dir="rtl"] .content-section h2,
[dir="rtl"] .main-content h2 {
    border-right: 5px solid var(--primary);
    padding-right: 15px;
}

[dir="ltr"] .content-section h2,
[dir="ltr"] .main-content h2 {
    border-left: 5px solid var(--primary);
    padding-left: 15px;
}

.content-section h3,
.main-content h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 30px 0 15px;
}

[dir="rtl"] .content-section h3,
[dir="rtl"] .main-content h3 {
    border-right: 4px solid var(--primary-soft);
    padding-right: 12px;
}

[dir="ltr"] .content-section h3,
[dir="ltr"] .main-content h3 {
    border-left: 4px solid var(--primary-soft);
    padding-left: 12px;
}

.content-section p,
.main-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.download-page .main-content {
    text-align: center;
}

.content-section p {
    text-align: justify;
}

.content-section ul,
.main-content ul,
.content-section ol,
.main-content ol {
    margin-bottom: 25px;
}

[dir="rtl"] .content-section ul,
[dir="rtl"] .main-content ul,
[dir="rtl"] .content-section ol,
[dir="rtl"] .main-content ol {
    padding-right: 25px;
}

[dir="ltr"] .content-section ul,
[dir="ltr"] .main-content ul,
[dir="ltr"] .content-section ol,
[dir="ltr"] .main-content ol {
    padding-left: 25px;
}

.content-section li,
.main-content li {
    margin-bottom: 12px;
    line-height: 1.7;
    color: var(--text-muted);
}

.info-card-accent {
    display: flex;
    gap: 20px;
    padding: 25px;
    background: var(--bg-sidebar);
    border-radius: 20px;
    border-right: 5px solid var(--primary);
    margin-top: 20px;
}

.info-card-accent i {
    font-size: 1.8rem;
    color: var(--primary);
}

.section-title-alt {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title-alt i {
    color: var(--primary);
}

/* Features List (Alternative style from images) */
.features-list {
    display: grid;
    gap: 15px;
}

.feature-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 15px;
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
}

.feature-item strong {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 3px;
}

.feature-item p {
    font-size: 0.78rem !important;
    margin: 0 !important;
}

.feature-check {
    color: var(--primary);
    font-size: 1rem;
}

/* FAQ Accordion (Clean Style) */
.accordion {
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.accordion-tab {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}

.accordion-tab:last-child {
    border-bottom: none;
}

.accordion-trigger {
    width: 100%;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
    cursor: pointer;
    text-align: right;
}

.accordion-content {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 0.82rem;
    transition: 0.3s ease-out;
    text-align: right;
}

.active .accordion-content {
    padding: 10px 20px 20px 20px;
    max-height: 500px;
}

/* Language Selector */
.lang-selector {
    position: relative;
    user-select: none;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 50px;
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.2s;
}

.lang-btn:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    box-shadow: var(--shadow);
    width: 180px;
    max-height: 400px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: 0.3s;
    z-index: 1001;
}

/* Nav Menu Dropdown */
.nav-menu-container {
    position: relative;
    user-select: none;
}

.nav-menu-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: 0.2s;
}

.nav-menu-btn:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    box-shadow: var(--shadow);
    width: 220px;
    list-style: none;
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: 0.3s;
    z-index: 1001;
}

.nav-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu li {
    margin-bottom: 5px;
}

.nav-dropdown-menu li:last-child {
    margin-bottom: 0;
}

.nav-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.9rem;
    transition: 0.2s;
}

.nav-dropdown-menu a i {
    width: 20px;
    text-align: center;
    color: var(--primary);
}

.nav-dropdown-menu a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

/* Custom scrollbar for lang menu */
.lang-dropdown::-webkit-scrollbar {
    width: 6px;
}

.lang-dropdown::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

.lang-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* RTL Positioning */
/* RTL Positioning: Align to left since button is on the left side */
[dir="rtl"] .lang-dropdown,
[dir="rtl"] .nav-dropdown-menu {
    left: 0;
    right: auto;
}

/* LTR Positioning: Align to right since button is on the right side */
[dir="ltr"] .lang-dropdown,
[dir="ltr"] .nav-dropdown-menu {
    left: auto;
    right: 0;
}

.lang-option {
    padding: 12px 20px;
    display: block;
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 500;
    transition: 0.2s;
}

.lang-option:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

/* Feature Item Hover */
.feature-item:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

/* Refined Footer - Minimalist Horizontal */
footer {
    background: #0c0c0d;
    padding: 15px 0;
    color: #94a3b8;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
}

body.dark-mode footer {
    background: #060606;
}

.footer-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-links-simple {
    display: flex;
    gap: 20px;
    list-style: none;
}

.footer-links-simple a {
    color: inherit;
    text-decoration: none;
    transition: 0.2s;
}

.footer-links-simple a:hover {
    color: var(--primary);
}

/* Versions Page Styles */
.versions-header {
    text-align: center;
    padding: 60px 0 40px;
}

.versions-header .app-icon-large {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
}

.versions-header h1 {
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 10px;
}

.versions-header p {
    color: var(--text-muted);
}

.version-list {
    max-width: 900px;
    margin: 0 auto 60px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.version-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.version-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
    border-color: var(--primary);
}

.version-info-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.v-icon {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

.v-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.v-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.v-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.v-title-row strong {
    font-size: 1.1rem;
    color: var(--text-main);
}

.badge-v {
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
}

.badge-latest {
    background: var(--primary);
    color: #fff;
}

.v-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.v-meta-tag {
    background: var(--bg-sidebar);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    color: var(--primary);
}

.v-download-wrapper {
    flex-shrink: 0;
}

.v-download-btn-wide {
    background: linear-gradient(135deg, var(--primary), #ff407d);
    color: white;
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(255, 28, 93, 0.2);
}

.v-download-btn-wide:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(255, 28, 93, 0.3);
    color: white;
}

.v-download-btn-wide i {
    font-size: 1.1rem;
}

@media (max-width: 600px) {
    .version-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 20px;
    }

    .v-download-wrapper {
        width: 100%;
    }

    .v-download-btn-wide {
        justify-content: center;
        width: 100%;
    }
}

/* Instructions Section */
.instructions-box {
    background: var(--bg-sidebar);
    border-radius: 25px;
    padding: 40px;
    margin-bottom: 80px;
}

.instructions-box h2 {
    font-size: 1.4rem;
    margin-bottom: 25px;
    font-weight: 800;
}

.instructions-list {
    list-style: none;
    padding: 0;
}

.instructions-list li {
    position: relative;
    padding-right: 35px;
    margin-bottom: 15px;
    line-height: 1.7;
    font-size: 0.95rem;
}

.instructions-list li::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 0;
    top: 0;
    color: var(--primary);
}

@media (max-width: 600px) {
    .version-item {
        padding: 15px;
        gap: 10px;
    }

    .version-info-wrapper {
        gap: 12px;
    }

    .v-icon {
        width: 40px;
        height: 40px;
    }

    .v-title-row strong {
        font-size: 0.95rem;
    }

    .v-meta-row {
        font-size: 0.75rem;
        gap: 8px;
    }
}

.dl-card {
    background: var(--bg-card);
    border-radius: 30px;
    padding: 50px 30px;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.dl-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--primary);
}

.loader-ring {
    width: 80px;
    height: 80px;
    border: 4px solid var(--primary-light);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    margin: 30px auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.dl-badges {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.dl-badge-item {
    background: var(--bg-sidebar);
    padding: 15px 25px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border-color);
}

.dl-badge-item i {
    color: #2ecc71;
}

.sidebar-step {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.step-num {
    width: 32px;
    height: 32px;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
}

.step-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.similar-app-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: var(--bg-sidebar);
    border-radius: 15px;
    text-decoration: none;
    color: var(--text-main);
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    transition: 0.2s;
}

.similar-app-btn:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.similar-app-btn img {
    width: 45px;
    height: 45px;
    border-radius: 12px;
}

/* Responsive Improvements */
* {
    box-sizing: border-box;
}

@media (max-width: 992px) {
    .nav-links {
        display: none !important;
    }

    .main-layout {
        grid-template-columns: 1fr !important;
        gap: 20px;
        margin-top: 15px;
        /* Reduced from 30px */
    }

    .sidebar {
        position: static;
        order: 2;
    }

    /* Compact Hero for Mobile */
    .hero-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 25px 20px;
        gap: 15px;
        margin-top: 20px;
        border-radius: 25px;
    }

    .hero-main-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }

    .app-icon {
        width: 85px;
        height: 85px;
        padding: 8px;
    }

    .app-icon img {
        width: 100%;
        height: 100%;
    }

    .app-info-content h1 {
        font-size: 1.3rem;
        margin-bottom: 5px;
    }

    .app-meta {
        justify-content: center;
        gap: 8px;
        font-size: 0.8rem;
    }

    .hero-actions-container {
        align-items: center;
        width: 100%;
        gap: 10px;
        max-width: 100%;
    }

    .btn-download {
        width: 100%;
        height: 52px;
        font-size: 1.05rem;
        padding: 10px 20px;
    }

    .security-badge {
        align-self: center;
        font-size: 0.85rem;
    }

    /* Content Section adjustments */
    .content-section {
        padding: 25px 20px !important;
        border-radius: 22px !important;
    }

    .content-section p {
        font-size: 0.95rem;
        text-align: right;
        line-height: 1.7;
    }

    /* Technical Info Card on Mobile */
    .sidebar-card {
        padding: 20px;
        border-radius: 22px;
    }

    .info-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding-bottom: 10px;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 12px;
    }

    .info-item:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }

    .info-label {
        margin-bottom: 0;
        font-size: 0.85rem;
        color: var(--text-muted);
    }

    .info-value {
        font-size: 0.85rem;
        font-weight: 700;
        color: var(--text-main);
    }

    /* Feature Items on Mobile */
    .features-list {
        gap: 10px;
    }

    .feature-item {
        padding: 15px;
        align-items: center;
    }

    .feature-item strong {
        font-size: 0.9rem;
    }

    .header-actions {
        gap: 8px !important;
    }

    .lang-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .faq-nav-tab {
        display: none !important;
    }

    .whats-new-container,
    .install-steps-list {
        background: var(--bg-sidebar);
        border: 1px solid var(--border-color);
        border-radius: 20px;
        padding: 15px;
        /* Reduced for mobile */
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .hero-card {
        padding: 20px 15px;
    }

    .app-icon {
        width: 75px;
        height: 75px;
    }

    .app-info-content h1 {
        font-size: 1.2rem;
    }

    /* Smaller Navigation Tabs */
    .article-nav {
        gap: 8px;
        padding: 8px 5px;
    }

    .article-nav-item {
        padding: 6px 10px;
        font-size: 0.78rem;
        gap: 6px;
    }

    .btn-download {
        width: 100%;
        justify-content: center;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .footer-wrapper {
        flex-direction: column-reverse;
        text-align: center;
    }

    .footer-links-simple {
        justify-content: center;
        width: 100%;
    }
}

/* Download Page Premium Styling */
.download-page .main-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 900px;
    margin: 50px auto;
    padding: 0 20px;
}

.dl-card {
    background: var(--bg-card);
    border-radius: 30px;
    padding: 50px 30px;
    box-shadow: var(--shadow-soft);
    border-top: 6px solid var(--primary);
    text-align: center;
}

.dl-badges {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 40px;
}

.dl-badge-item {
    background: var(--bg-body);
    padding: 15px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.dl-badge-item:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.sidebar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.sidebar-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 25px;
    box-shadow: var(--shadow-soft);
}

.sidebar-step {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.step-num {
    width: 35px;
    height: 35px;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.step-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.similar-app-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--bg-body);
    border-radius: 18px;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.similar-app-btn:hover {
    border-color: var(--primary);
    background: var(--bg-card);
    transform: translateX(5px);
}

/* RTL Specific adjustments */
[dir="rtl"] .similar-app-btn:hover {
    transform: translateX(-5px);
}

@media (max-width: 768px) {
    .sidebar-grid {
        grid-template-columns: 1fr;
    }

    .dl-badges {
        grid-template-columns: 1fr;
    }
}

/* AOS Optimization: Only apply opacity/transform if AOS JS is loaded */
[data-aos].aos-init {
    opacity: 0;
    visibility: hidden;
    transition-property: opacity, transform, visibility;
}

[data-aos='fade-up'] {
    transform: translateY(30px);
}

[data-aos].aos-init.aos-animate {
    opacity: 1;
    visibility: visible;
    transform: translate(0);
}

/* Main Content Sections Styling */
.whats-new-container,
.install-steps-list {
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Article Navigation Tabs */
.article-nav {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    padding: 10px 5px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    justify-content: flex-start;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
    white-space: nowrap;
}

.article-nav::-webkit-scrollbar {
    display: none;
}

.article-nav-item {
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    background: none;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    /* Prevents items from squashing in Firefox */
    min-width: max-content;
    /* Critical for Firefox consistency */
}

body.dark-mode .article-nav-item {
    background: #1a1a1c;
}

.article-nav-item:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.article-nav-item.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(255, 28, 93, 0.2);
}

/* Read More Content Toggle */
.read-more-wrapper {
    position: relative;
    max-height: 250px;
    overflow: hidden;
    transition: max-height 0.6s ease;
}

.read-more-wrapper.expanded {
    max-height: 5000px;
}

.read-more-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(to top, var(--bg-card), transparent);
    pointer-events: none;
}

.read-more-wrapper.expanded .read-more-overlay {
    display: none;
}

.read-more-btn {
    display: block;
    color: var(--primary);
    font-weight: 800;
    cursor: pointer;
    margin-top: 10px;
    font-size: 1rem;
    width: 100%;
}

[dir="rtl"] .read-more-btn {
    text-align: right;
}

/* Versions Page Download Button */
.v-download-btn-wide {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--primary);
    font-weight: 800;
    font-size: 0.9rem;
    padding: 8px 15px;
    border-radius: 12px;
    background: transparent;
    transition: all 0.3s ease;
}

.v-download-btn-wide i {
    width: 36px;
    height: 36px;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.v-download-btn-wide:hover {
    background: var(--primary-soft);
}

.v-download-btn-wide:hover i {
    background: var(--primary);
    color: #fff;
    transform: scale(1.1) rotate(-10deg);
}

/* Mobile Only Styles - Center App Header */
@media (max-width: 768px) {
    .app-info-header {
        flex-direction: column !important;
        text-align: center !important;
        align-items: center !important;
        gap: 15px;
    }

    .app-info-content {
        align-items: center !important;
        text-align: center !important;
        width: 100%;
        display: flex;
        flex-direction: column;
    }

    .app-info-content h1 {
        text-align: center !important;
        justify-content: center !important;
        width: 100%;
        display: flex;
    }

    .app-meta {
        justify-content: center !important;
        width: 100%;
    }

    .app-actions {
        justify-content: center !important;
        width: 100%;
        /* Ensure actions take full width to center buttons */
    }
}

/* Read More Functionality (Restored Old Design) */
.read-more-wrapper {
    position: relative;
    max-height: 250px;
    overflow: hidden;
    transition: max-height 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.read-more-wrapper.expanded {
    max-height: 20000px !important;
    /* Force expansion with !important */
}

.read-more-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to top, var(--bg-main), transparent);
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 2;
}

.read-more-wrapper.expanded .read-more-overlay {
    opacity: 0;
}

.read-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 35px;
    background: #fce7f3;
    /* Darker pink background */
    color: #9d174d;
    /* Darker pink text for better contrast */
    border-radius: 50px;
    margin: 20px auto 0;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(157, 23, 77, 0.1);
    width: fit-content;
    box-shadow: 0 4px 15px rgba(255, 28, 93, 0.05);
}

.read-more-btn:hover {
    background: #fbcfe8;
    color: #831843;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 28, 93, 0.1);
}

.read-more-btn i {
    font-size: 0.9rem;
    transition: transform 0.4s;
}

/* Technical Info - Old Design */
.tech-info-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.tech-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.tech-info-item:first-child {
    padding-top: 0;
}

.tech-info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.tech-label {
    font-size: 0.85rem;
    color: #333;
    font-weight: 600;
}

.tech-value {
    font-size: 0.8rem;
    color: #666;
    font-weight: 400;
}

body.dark-mode .tech-label {
    color: var(--text-main);
}

body.dark-mode .tech-value {
    color: var(--text-muted);
}

body.dark-mode .tech-info-item {
    border-bottom-color: var(--border-color);
}

.sidebar-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e0e0e0;
    position: relative;
}

[dir="rtl"] .sidebar-title::before {
    content: '';
    position: absolute;
    right: 0;
    bottom: -2px;
    width: 50px;
    height: 2px;
    background: #ff1c5d;
}

[dir="ltr"] .sidebar-title::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 50px;
    height: 2px;
    background: #ff1c5d;
}

body.dark-mode .sidebar-title {
    border-bottom-color: var(--border-color);
}

/* Sticky Sidebar on Desktop */
@media (min-width: 992px) {
    .main-layout {
        display: flex;
        gap: 30px;
        align-items: flex-start;
    }

    .main-content {
        flex: 1;
        min-width: 0;
    }

    .sidebar {
        position: relative;
        /* Changed from sticky to allow full content display */
        width: var(--sidebar-width, 280px);
        flex-shrink: 0;
        height: auto;
        align-self: start;
    }

    /* Hide scrollbar but keep functionality */
    .sidebar::-webkit-scrollbar {
        width: 4px;
    }

    .sidebar::-webkit-scrollbar-track {
        background: transparent;
    }

    .sidebar::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 10px;
    }

    .sidebar::-webkit-scrollbar-thumb:hover {
        background: var(--text-muted);
    }
}

/* Mobile Layout */
@media (max-width: 991px) {
    .main-layout {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .sidebar {
        width: 100%;
    }
}

/* Mobile Font Adjustments */
@media (max-width: 768px) {

    /* What's New, Features, FAQ titles */
    #whats-new h2,
    #features-dynamic h2,
    #faq h2,
    .article-content h2,
    .faq-title {
        font-size: 1.4rem !important;
        line-height: 1.3;
        margin-bottom: 15px;
    }
}

/* Ad Container Fixes */
.ad-container {
    max-width: 100%;
    overflow: hidden;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    justify-content: center;
}

.ad-container img,
.ad-container iframe,
.ad-container ins {
    max-width: 100% !important;
    height: auto !important;
}

/* Accordion Styles - Compact & Elegant */
.accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.accordion-tab {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-tab.active {
    border-color: #fbcfe8;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.04);
}

.accordion-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    /* Slightly reduced padding for compactness */
    background: none;
    border: none;
    font-size: 0.9rem;
    /* Reduced from 1rem */
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    text-align: inherit;
    transition: background 0.2s;
}

.accordion-tab:not(.active) .accordion-trigger:hover {
    background: #f8fafc;
}

.accordion-trigger i {
    color: #db2777;
    background: #fdf2f8;
    width: 24px;
    /* Slightly smaller icon container */
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.75rem;
    /* Smaller icon */
    transition: transform 0.3s ease, background 0.3s;
    flex-shrink: 0;
    margin-left: 12px;
}

[dir="rtl"] .accordion-trigger i {
    margin-left: 0;
    margin-right: 12px;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
}

.accordion-inner {
    padding: 0 18px 18px;
    color: #64748b;
    line-height: 1.6;
    font-size: 0.9rem;
    /* Matched to trigger size */
}

.accordion-tab.active .accordion-trigger i {
    background: #db2777;
    color: #fff;
    transform: rotate(180deg);
}

.accordion-tab.active .accordion-trigger {
    color: #0f172a;
}

/* RTL Support for Accordion */
[dir="rtl"] .accordion-trigger {
    text-align: right;
}

/* Ensure section is visible */
#faq {
    display: block !important;
}

/* Global SEO Article Styling */
.seo-article {
    line-height: 1.6;
    color: #444;
    font-size: 0.9rem;
    max-width: 900px;
    margin: 0 auto;
}

.seo-article[dir="rtl"] {
    text-align: right;
}

.seo-article[dir="ltr"] {
    text-align: left;
}

.seo-article h2,
.seo-article h3,
.seo-article h4 {
    color: #111;
    margin-top: 20px;
    margin-bottom: 12px;
    font-weight: 700;
    line-height: 1.3;
}

.seo-article[dir="rtl"] h2 {
    border-right: 4px solid var(--primary);
    padding-right: 12px;
    border-left: none;
}

.seo-article[dir="ltr"] h2 {
    border-left: 4px solid var(--primary);
    padding-left: 12px;
    border-right: none;
}

.seo-article h2 {
    font-size: 1.4rem;
}

.seo-article h3 {
    font-size: 1.15rem;
    color: var(--primary);
}

.seo-article p {
    margin-bottom: 12px;
}

.seo-article ul {
    list-style: none;
    padding: 0;
    margin-bottom: 15px;
}

.seo-article ul li {
    position: relative;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.seo-article[dir="rtl"] ul li {
    padding-right: 25px;
    padding-left: 0;
}

.seo-article[dir="ltr"] ul li {
    padding-left: 25px;
    padding-right: 0;
}

.seo-article ul li::before {
    content: "\f058";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 2px;
    color: #10b981;
    font-size: 0.9rem;
}

.seo-article[dir="rtl"] ul li::before {
    right: 0;
    left: auto;
}

.seo-article[dir="ltr"] ul li::before {
    left: 0;
    right: auto;
}

.seo-article strong {
    color: #000;
    font-weight: 700;
}

/* --- Premium Downloader Pages Styling --- */
.downloader-section {
    padding: 40px 0 60px;
    font-family: 'Tajawal', sans-serif;
    background: radial-gradient(circle at top, #fff5f8 0%, #ffffff 100%);
}

/* Tab Navigation */
.dl-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    border-radius: 50rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    max-width: 950px;
    margin: 0 auto 30px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

.dl-tabs::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.dl-tab-btn {
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 50rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    text-decoration: none;
}

.dl-tab-btn:hover {
    background: rgba(236, 72, 153, 0.05);
    color: #db2777;
    transform: translateY(-1px);
}

.dl-tab-btn.active {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(236, 72, 153, 0.3);
}

/* Downloader Card */
.downloader-card {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 30px;
    padding: 40px 30px;
    text-align: center;
    color: white;
    box-shadow: 0 25px 60px rgba(30, 41, 59, 0.25);
    position: relative;
    overflow: hidden;
    max-width: 850px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.downloader-card h1 {
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.downloader-card p {
    font-size: 1.1rem;
    opacity: 0.85;
    margin-bottom: 30px;
    font-weight: 500;
    max-width: 550px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

.dl-input-group {
    background: white;
    border-radius: 18px;
    padding: 8px;
    display: flex;
    align-items: center;
    max-width: 700px;
    margin: 0 auto;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.dl-input {
    flex: 1;
    border: none;
    padding: 0 20px;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    color: #1e293b;
    background: transparent;
    height: 54px;
}

.dl-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
}

.action-btn-small {
    background: #f1f5f9;
    border: none;
    color: #475569;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 1.1rem;
}

.btn-submit {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    border: none;
    padding: 0 35px;
    height: 54px;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 20px rgba(14, 165, 233, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(14, 165, 233, 0.4);
}

/* Section Title */
.section-title {
    font-size: 2rem;
    font-weight: 900;
    color: #0f172a;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 5px;
    background: linear-gradient(90deg, #ec4899, #db2777);
    margin: 0 auto;
    border-radius: 50px;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* Steps Section */
.steps-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    max-width: 1000px;
    margin: 40px auto;
    flex-wrap: wrap;
    direction: rtl;
    /* Ensure visual order matches image for Arabic */
}

.step-item {
    background: white;
    padding: 30px 20px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #f8f9fa;
    /* Very subtle border */
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 250px;
    max-width: 320px;
}

.step-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.06);
}

.step-num {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ff0055 0%, #ff4081 100%);
    color: white;
    border-radius: 10px;
    /* Squircle shape */
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    box-shadow: 0 4px 10px rgba(255, 0, 85, 0.25);
}

.step-item h3 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: #1e293b;
}

.step-item p {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
    max-width: 220px;
    /* Force text wrapping for neater look */
}

/* Features Grid */
.features-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    max-width: 1100px;
    margin: 0 auto;
}

.feat-box {
    background: white;
    padding: 35px;
    border-radius: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #f1f5f9;
    display: flex;
    gap: 25px;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
}

.feat-box:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    border-color: rgba(236, 72, 153, 0.3);
}

.feat-icon {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    background: #fdf2f8;
    color: #db2777;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    transition: 0.4s;
    border: 2px solid #fbcfe8;
}

.feat-box:hover .feat-icon {
    background: #db2777;
    color: white;
    transform: rotate(10deg);
    box-shadow: 0 10px 20px rgba(219, 39, 119, 0.25);
    border-color: #db2777;
}

.feat-text h3 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: #0f172a;
    transition: 0.3s;
}

.feat-box:hover .feat-text h3 {
    color: #db2777;
}

.feat-text p {
    color: #64748b;
    line-height: 1.6;
    font-size: 1rem;
    margin: 0;
}

@media (max-width: 768px) {
    .downloader-card h1 {
        font-size: 1.8rem;
    }

    .dl-input-group {
        flex-direction: column;
        padding: 10px;
        gap: 10px;
    }

    .dl-input {
        width: 100%;
        text-align: center;
        height: 50px;
    }

    .btn-submit {
        width: 100%;
    }

    .feat-box {
        flex-direction: column;
        text-align: center;
    }
}

/* Glassmorphism Utility */
.card-glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}

.seo-article.card-glass {
    padding: 40px;
    border-radius: 30px;
}

@media (max-width: 768px) {
    .seo-article.card-glass {
        padding: 25px;
    }

    .dl-tabs {
        padding: 8px 10px;
        gap: 8px;
        border-radius: 15px;
        /* Less rounded for better use of space */
    }

    .dl-tab-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

/* Result Card Styling */
.result-card {
    background: white;
    border-radius: 24px;
    padding: 35px;
    margin-top: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    display: none;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.result-header h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #10b981;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.result-header h3::before {
    content: '\f058';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

.result-thumb {
    max-width: 100%;
    width: 300px;
    margin: 0 auto 30px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border: 4px solid #fff;
    position: relative;
}

.result-thumb img {
    width: 100%;
    display: block;
    transform: scale(1.02);
    transition: 0.5s;
}

.result-thumb:hover img {
    transform: scale(1.08);
}

.dl-options-grid {
    display: grid;
    gap: 12px;
    max-width: 400px;
    margin: 0 auto;
}

.dl-btn-final {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 30px;
    border-radius: 16px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.05rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.dl-btn-final.primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.25);
}

.dl-btn-final.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(16, 185, 129, 0.35);
}

.dl-btn-final:not(.primary) {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.dl-btn-final:not(.primary):hover {
    background: #f1f5f9;
    color: #0f172a;
    transform: translateY(-2px);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RTL Alignment Fixes */
[dir="rtl"] .prose,
[dir="rtl"] .entry,
[dir="rtl"] .soft-content,
[dir="rtl"] .article-content,
[dir="rtl"] .read-more-wrapper {
    text-align: right !important;
}

[dir="rtl"] .prose h1,
[dir="rtl"] .prose h2,
[dir="rtl"] .prose h3,
[dir="rtl"] .prose h4,
[dir="rtl"] .prose p,
[dir="rtl"] .prose ul,
[dir="rtl"] .prose ol,
[dir="rtl"] .prose li {
    text-align: right !important;
}