/* Global Styles */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    --secondary-color: #f3f4f6;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --white: #ffffff;
    --background: #f8fafc;
    /* Slightly cooler grey for premium feel */
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --container-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Cairo", sans-serif;
    background-color: var(--background);
    color: var(--text-color);
    line-height: 1.6;
    direction: rtl;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    width: 100%;
}

/* Base Layout Scale */
html {
    overflow-x: hidden;
    font-size: 15px;
    /* Compact base size */
}

/* Removed excessive upscaling for large screens to maintain natural look */

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    /* Ensure it doesn't exceed parent */
}

/* Global Typography & Responsiveness */
h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-color);
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.6rem;
}

h3 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    h3 {
        font-size: 1.3rem;
    }

    p {
        font-size: 0.95rem;
    }
}

/* Header */
.main-header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

/* Responsive Utilities */
@media (min-width: 769px) {
    .d-md-none {
        display: none !important;
    }

    /* Desktop Navigation Fix */
    .mobile-menu-toggle {
        display: none !important;
    }

    .main-nav {
        display: block !important;
        position: static;
        width: auto;
        background: transparent;
        box-shadow: none;
        border: none;
        backdrop-filter: none;
        padding: 0;
        animation: none;
        transform: none !important;
        /* Override potential inline styles from JS */
        opacity: 1 !important;
    }

    .main-nav ul {
        flex-direction: row;
        gap: 15px;
        padding: 0;
        margin: 0;
        background: transparent;
    }

    .main-nav ul li {
        width: auto;
    }

    .main-nav ul li a {
        padding: 8px 16px;
        justify-content: center;
        background: transparent;
        font-size: 0.9rem;
        border-radius: 8px;
    }

    .main-nav ul li a::after {
        /* Keep icons but adjust size/spacing if needed */
        font-size: 1rem;
    }

    .logo {
        order: 2;
        /* Ensure logo is strictly at the end (left in RTL) if needed */
    }

    .main-nav {
        order: 1;
        /* Nav at start (right in RTL) */
    }
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    max-width: 1400px;
    /* Increased width for long menu items */
}

.logo {
    /* Removed grid properties */
}

.logo h1 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 800;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    letter-spacing: -0.5px;
}

.main-nav {
    /* Removed grid properties */
}

.main-nav ul {
    display: flex;
    gap: 15px;
    /* Optimize gap */
}

.main-nav ul li a {
    color: #4b5563;
    /* Softer dark grey */
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 8px;
    white-space: nowrap;
    font-size: 1rem;
    /* Standard nav size */
    transition: all 0.2s ease;
    position: relative;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
    color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.08);
    /* Subtle tint instead of solid block */
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    padding: 10px;
    /* Boost touch target */
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 40px 0;
}

/* Hero Section (Common) */
.hero {
    text-align: center;
    margin-bottom: 50px;
    padding: 30px 15px;
    background: white;
    background-image: radial-gradient(#e5e7eb 1px, transparent 1px);
    background-size: 20px 20px;
    border-bottom: 1px solid var(--border-color);
}

.hero h2 {
    font-size: 2.25rem;
    margin-bottom: 15px;
    color: var(--text-color);
    font-weight: 800;
    letter-spacing: -0.025em;
}

.hero p {
    color: var(--text-light);
    font-size: 1.2rem;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Platform Grid (Migrated from index.php) */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    padding-bottom: 40px;
}

.platform-card {
    background: var(--white);
    padding: 25px 20px;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.platform-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.mobile-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #6b7280;
    gap: 6px;
    flex: 1;
    position: relative;
    background: transparent;
    transition: all 0.2s ease;
    min-width: 0;
    direction: ltr;
    /* Isolation: Prevent RTL shift on internal elements */
}

.platform-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
    line-height: 1;
}

.platform-card .platform-icon {
    color: #666;
}

/* Default fallback */
.platform-card.brand-youtube .platform-icon {
    color: #fe0000;
}

.platform-card.brand-tiktok .platform-icon {
    color: #010101;
}

.platform-card.brand-instagram .platform-icon {
    color: #E1306C;
}

.platform-card.brand-x .platform-icon {
    color: #000000;
}

.platform-card.brand-facebook .platform-icon {
    color: #1877F2;
}

.platform-card.brand-pinterest .platform-icon {
    color: #E60023;
}

.platform-card.brand-snapchat .platform-icon {
    color: #FFFC00;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
    transform: translateX(-5px);
    /* Move slightly left */
}

.platform-card:hover .platform-icon {
    transform: scale(1.1);
}

.platform-card.brand-youtube:hover {
    border-color: #fe0000;
    box-shadow: 0 10px 25px rgba(254, 0, 0, 0.1);
}

.platform-card.brand-tiktok:hover {
    border-color: #010101;
    box-shadow: 0 10px 25px rgba(1, 1, 1, 0.1);
}

.platform-card.brand-instagram:hover {
    border-color: #E1306C;
    box-shadow: 0 10px 25px rgba(225, 48, 108, 0.1);
}

.platform-card.brand-x:hover {
    border-color: #000000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.platform-card.brand-facebook:hover {
    border-color: #1877F2;
    box-shadow: 0 10px 25px rgba(24, 119, 242, 0.1);
}

.platform-card.brand-pinterest:hover {
    border-color: #E60023;
    box-shadow: 0 10px 25px rgba(230, 0, 35, 0.1);
}

.platform-card.brand-snapchat:hover {
    border-color: #FFFC00;
    box-shadow: 0 10px 25px rgba(255, 252, 0, 0.15);
}

.platform-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-color);
}

.btn-link {
    display: inline-block;
    padding: 10px 24px;
    background-color: var(--secondary-color);
    color: var(--text-color);
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
}

.platform-card:hover .btn-link {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

/* Input Section */
.downloader-box {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    max-width: 800px;
    margin: 0 auto 40px;
}

.input-group {
    display: flex;
    gap: 12px;
    /* Increased padding */
    margin-bottom: 20px;
}

.input-group input {
    flex: 1;
    padding: 16px 20px;
    /* Increased padding for touch */
    border: 2px solid var(--border-color);
    border-radius: 12px;
    /* Smooth corners */
    font-family: inherit;
    font-size: 1.1rem;
    /* Readable text */
    outline: none;
    transition: var(--transition);
}

.input-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    /* Focus ring */
}

.btn-primary {
    background: var(--primary-gradient);
    background-size: 200% auto;
    color: var(--white);
    border: none;
    padding: 16px 30px;
    /* Large touch target */
    border-radius: 12px;
    font-family: inherit;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 180px;
    /* Min width for stability */
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.btn-primary:disabled {
    background-color: #93c5fd;
    /* Lighter blue */
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Result Section */
.result-container {
    max-width: 800px;
    margin: 0 auto;
    display: none;
    /* Hidden by default */
    margin-top: 30px;
}

.result-card {
    background: var(--white);
    padding: 20px;
    border-radius: 24px;
    /* Mobile rounded corners */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 360px;
    /* Mobile width constraint */
    margin: 0 auto;
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    /* Stack vertically */
    gap: 15px;
}

.result-thumb {
    margin: 0;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    width: 100%;
    aspect-ratio: 9 / 16;
    /* TikTok Portrait Ratio */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.result-thumb img,
.result-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Remove black bars */
    display: block;
    border-radius: 16px;
}

.result-info {
    width: 100%;
}

.result-title {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 15px;
    line-height: 1.4;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.download-options {
    display: flex;
    flex-direction: column;
    /* Stack buttons */
    gap: 10px;
    width: 100%;
}

.btn-download {
    background-color: #10b981;
    color: var(--white);
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-download:hover {
    background-color: #059669;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    font-weight: 600;
    /* Bold alert text */
}

.alert-error {
    background-color: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* Footer */
/* Footer */
.main-footer {
    background-color: #111827;
    /* Dark elegant background */
    border-top: 5px solid var(--primary-color);
    /* Accent top border */
    padding: 60px 0 30px;
    margin-top: auto;
    color: #f3f4f6;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    margin-bottom: 50px;
    justify-content: space-between;
}

.footer-section h3 {
    margin-bottom: 25px;
    color: var(--white);
    font-size: 1.3rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    /* Center horizontally */
    transform: translateX(-50%);
    /* Adjust for own width */
    width: 40px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.footer-section p {
    color: #ffffff;
    /* Bright white text */
    line-height: 1.8;
    max-width: 400px;
}

.footer-section.links ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-section.links ul li a {
    color: #ffffff;
    /* Bright white links */
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-section.links ul li a::before {
    content: '\f104';
    /* FontAwesome chevron-left */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.8rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.footer-section.links ul li a:hover {
    color: var(--primary-color);
    /* Or accent color */
    transform: translateX(-5px);
}

.footer-section.links ul li a:hover::before {
    transform: translateX(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    /* Bright white text */
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 768px) {
    .main-header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 15px;
        /* Reduced padding */
        position: relative;
        /* For absolute logo */
        height: 50px;
        /* Define height to contain floats/absolute if needed */
    }

    .container {
        padding: 0 15px;
        /* Consistent small padding */
    }

    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        width: max-content;
        margin: 0;
        grid-column: auto;
    }

    .logo h1 {
        font-size: 1.2rem;
        /* Optimal size */
        margin: 0;
    }

    .main-nav {
        display: none;
        /* JS toggles to block */
        position: absolute;
        top: 75px;
        left: auto;
        /* Not full width */
        right: 15px;
        /* Anchor to right */
        width: 250px;
        /* Fixed elegant width */
        background-color: rgba(255, 255, 255, 0.98);
        box-shadow: -10px 20px 40px rgba(0, 0, 0, 0.15);
        /* Shadow to left since it's on right */
        z-index: 999;
        border-radius: 16px;
        border: 1px solid rgba(255, 255, 255, 0.5);
        backdrop-filter: blur(20px);
        overflow: hidden;
        transform-origin: top right;
        animation: scaleIn 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }

    @keyframes scaleIn {
        from {
            opacity: 0;
            transform: scale(0.95) translateY(-10px);
        }

        to {
            opacity: 1;
            transform: scale(1) translateY(0);
        }
    }

    .main-nav ul {
        flex-direction: column;
        gap: 5px;
        padding: 10px;
    }

    .main-nav ul li {
        width: 100%;
    }

    .main-nav ul li a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        /* Text right, Icon left */
        padding: 12px 20px;
        border-radius: 10px !important;
        border: none;
        font-weight: 700;
        color: #1f2937;
        transition: all 0.2s ease;
        background: transparent;
        font-size: 0.95rem;
    }

    .main-nav ul li a:hover {
        background-color: #f3f4f6;
        color: var(--primary-color);
        padding-right: 25px;
        /* Subtle slide */
    }

    /* Add Icons via CSS ::after (Left in RTL context) */
    .main-nav ul li a::after {
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        width: 20px;
        text-align: center;
        color: #1f2937;
        /* Dark and Clear */
        transition: color 0.2s;
        font-size: 1.1rem;
        /* Slightly larger */
    }

    .main-nav ul li a:hover::after {
        color: var(--primary-color);
    }

    /* Map Icons */
    /* Map Icons using strict classes */
    .main-nav ul li a.nav-home::after {
        content: "\f015";
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
    }

    .main-nav ul li a.nav-tiktok::after {
        content: "\e07b";
        font-family: "Font Awesome 6 Brands";
    }

    .main-nav ul li a.nav-instagram::after {
        content: "\f16d";
        font-family: "Font Awesome 6 Brands";
    }

    .main-nav ul li a.nav-x::after {
        content: "\e61b";
        font-family: "Font Awesome 6 Brands";
    }

    .main-nav ul li a.nav-facebook::after {
        content: "\f09a";
        font-family: "Font Awesome 6 Brands";
    }

    .main-nav ul li a.nav-youtube::after {
        content: "\f167";
        font-family: "Font Awesome 6 Brands";
    }

    .main-nav ul li a.nav-pinterest::after {
        content: "\f0d2";
        font-family: "Font Awesome 6 Brands";
    }

    .main-nav ul li a.nav-snapchat::after {
        content: "\f2ab";
        font-family: "Font Awesome 6 Brands";
    }

    .mobile-menu-toggle {
        display: block;
        cursor: pointer;
        font-size: 1.5rem;
        padding: 5px;
    }

    .downloader-box {
        padding: 20px 15px;
        /* Maximize width */
        margin: 0 -15px 30px;
        /* Neutralize container padding for edge-to-edge feel */
        border-radius: 0;
        /* Flat look on mobile or keep rounded if prefer card */
        box-shadow: none;
        /* Flatter design for performance */
        border: none;
        border-bottom: 1px solid #eee;
    }

    /* Or keep card style but compact */
    .downloader-box {
        padding: 20px;
        margin: 0 auto 30px;
        border-radius: 12px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
        /* Lighter shadow */
        border: 1px solid #f0f0f0;
    }

    .input-group {
        flex-direction: column;
        gap: 10px;
    }

    .input-group input {
        width: 100%;
        text-align: center;
        /* Center placeholder on mobile */
        font-size: 16px;
        /* Prevent iOS Zoom */
        padding: 14px;
    }

    /* Improve spacing for 'Download from' prefix */
    .main-nav ul li a span {
        /* margin removed to avoid double spacing with &nbsp; */
    }

    .btn-primary {
        width: 100%;
        justify-content: center;
        padding: 14px;
        font-size: 1rem;
    }

    .result-container {
        margin-top: 20px;
    }

    .result-card {
        width: 100%;
        max-width: 360px;
        /* Keep constraint */
        margin: 0 auto;
        border-radius: 20px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        /* Single column on mobile */
        gap: 20px;
    }

    .feature-card {
        padding: 15px;
    }

    /* Footer Mobile */
    .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    .footer-section.links ul {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    /* --- Mobile Typography & Spacing Fixes --- */
    .hero {
        padding: 30px 15px;
        margin-bottom: 30px;
    }

    .hero h2 {
        font-size: 1.7rem;
        /* Reduced from 2.75rem */
        line-height: 1.3;
    }

    .hero p {
        font-size: 1rem;
        padding: 0 10px;
    }

    .platform-card {
        padding: 20px;
        gap: 10px;
    }

    .platform-icon {
        font-size: 2.5rem;
        /* Reduced from 4rem */
        margin-bottom: 10px;
    }

    .platform-name {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .btn-link {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    /* General Headers on Mobile */
    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }
}

/* Extra Small Devices (iPhone SE, etc) */
@media (max-width: 375px) {
    .hero h2 {
        font-size: 1.8rem;
        /* Smaller title */
    }

    .logo h1 {
        font-size: 1.2rem;
    }
}

/* History Section */
/* History Section */
.history-container {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px dashed var(--border-color);
}

.history-container h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.history-item {
    display: flex;
    gap: 15px;
    align-items: center;
    background: var(--white);
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.history-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-color: var(--primary-color);
}

.history-thumb {
    width: 60px;
    height: 80px;
    /* Portrait ratio hint */
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: #000;
}

.history-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.history-info {
    flex: 1;
    overflow: hidden;
}

.history-info h4 {
    font-size: 0.95rem;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #333;
}

.history-info .date {
    display: block;
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 2px;
}

.history-info .action-hint {
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.2s;
}

.history-item:hover .action-hint {
    opacity: 1;
}

.arrow-icon {
    color: #ccc;
    font-size: 0.9rem;
    margin-left: 5px;
}

.history-item:hover .arrow-icon {
    color: var(--primary-color);
}

/* Page Features & Content */
.content-section {
    max-width: 1100px;
    /* Increased to fit 4 cards */
    margin: 60px auto 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
    text-align: center;
}

.feature-card {
    padding: 20px;
    background: #fdfdfd;
    border-radius: 12px;
    border: 1px solid #eee;
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature-card h3 {
    margin-bottom: 10px;
    color: #333;
}

.feature-card p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
}

.how-to-section,
.faq-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.how-to-section h3,
.faq-section h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.how-to-section ol {
    margin-right: 20px;
    line-height: 2;
    color: #444;
}

.faq-item {
    margin-bottom: 20px;
}

.faq-item h4 {
    font-weight: 700;
    margin-bottom: 8px;
    color: #222;
}

.faq-item p {
    color: #555;
    line-height: 1.6;
}

/* Play Button Overlay */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.play-overlay:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: var(--primary-color);
    border-color: white;
}

/* Static Pages (Terms, Privacy, Contact) */
.static-page-container {
    padding: 60px 0;
    min-height: 70vh;
}

.static-card-premium {
    background: var(--white);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.08);
    /* Deeper shadow */
    border: 1px solid var(--border-color);
    border-top: 6px solid var(--primary-color);
    /* Premium accent */
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

/* Watermark effect (optional, subtle) */
.static-card-premium::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.static-page-content {
    text-align: right;
    direction: rtl;
    position: relative;
    z-index: 1;
    padding: 10px;
    /* Slight inner padding */
}

.static-page-content h3 {
    color: #1e293b;
    font-size: 1.5rem;
    /* Larger headers */
    margin-top: 50px;
    /* More space before section */
    margin-bottom: 25px;
    /* More space after header */
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
    /* Stronger separator */
}

/* Decorative marker for H3 */
.static-page-content h3::before {
    content: '';
    display: block;
    width: 6px;
    height: 30px;
    /* Taller marker */
    background: var(--primary-color);
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
    /* Glow effect */
}

.static-page-content p {
    color: #334155;
    /* Darker grey for better contrast */
    line-height: 1.7;
    /* Natural reading height */
    margin-bottom: 30px;
    /* More breathing room between blocks */
    font-size: 1.1rem;
    /* Slightly larger text */
    text-align: right;
    padding-left: 20px;
    letter-spacing: 0.01em;
    /* Subtle character spacing */
}

.static-page-content ul {
    margin-bottom: 40px;
    padding-right: 15px;
    display: grid;
    gap: 15px;
    /* More space between list items */
}

.static-page-content ul li {
    position: relative;
    padding-right: 35px;
    color: #334155;
    background: #f8fafc;
    /* Card-like list items */
    padding: 12px 35px 12px 15px;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
    transition: transform 0.2s;
}

.static-page-content ul li:hover {
    transform: translateX(-5px);
    background: #fff;
    border-color: #e2e8f0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.static-page-content ul li::before {
    content: '\f00c';
    /* FontAwesome Check */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--primary-color);
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
}

/* Contact Specific Enhancements */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.contact-card {
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.contact-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--primary-color);
}

.contact-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    background: rgba(37, 99, 235, 0.1);
    width: 80px;
    height: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.contact-card:hover .contact-icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--primary-color);
    color: white;
}

@media (max-width: 768px) {
    .static-page-card {
        padding: 30px 20px;
        border-radius: 16px;
    }

    .static-card-premium h3 {
        font-size: 1.25rem;
    }
}
}

.result-thumb:hover .play-overlay {
    background: var(--primary-color);
}

/* Unified Marketing Content Styles (2026 Refinement) */
.seo-intro {
    text-align: center;
    margin-bottom: 70px;
}

.seo-intro h2 {
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 30px;
    color: var(--text-color);
    line-height: 1.4;
}

.seo-intro .lead-text {
    font-size: 1.15rem;
    color: #4b5563;
    line-height: 2;
    max-width: 1000px;
    margin: 0 auto;
    text-align: right;
    padding: 0 15px;
}

.seo-content-block h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 800;
    margin: 40px 0 20px;
}

.seo-content-block p {
    margin-bottom: 25px;
    font-size: 1.15rem;
    /* Consistent reading size */
    color: #4b5563;
    line-height: 1.8;
}

.seo-list {
    list-style: none;
    padding-right: 20px;
    margin-bottom: 30px;
}

.seo-list li {
    margin-bottom: 10px;
    position: relative;
    font-size: 1.1rem;
    color: #374151;
}

.seo-list li i {
    color: var(--primary-color);
    margin-left: 10px;
}

.tech-specs {
    margin-top: 100px;
    background: #2d3748;
    color: white;
    padding: 50px;
    border-radius: 20px;
}

.tech-specs h2 {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.tech-specs table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}

.tech-specs th {
    padding: 15px;
    border-bottom: 1px solid #4a5568;
    background: rgba(255, 255, 255, 0.05);
}

.tech-specs td {
    padding: 15px;
    border-bottom: 1px solid #4a5568;
}

.intent-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 25px;
    border-radius: 12px;
    margin-top: 40px;
}

.intent-box h3 {
    font-size: 1.4rem;
    color: #166534;
    font-weight: 800;
    margin-bottom: 15px;
    margin-top: 0 !important;
    /* Override standard H3 margin */
}

.intent-box p {
    color: #15803d;
    margin-bottom: 15px;
    font-size: 1.05rem;
}

/* Feature Grid Adjustments for SEO Content */
.features-grid-seo {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.platform-detail-card {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    border-right: 4px solid var(--primary-color);
}

/* Force Right Alignment for Static Pages - Universal Fix */
.static-page-content {
    text-align: right !important;
}

.static-page-content * {
    text-align: right !important;
    text-align: start !important;
    text-justify: none !important;
}

/* Defensive fix for FAQ Tips Checkmarks */
.tips-box ul li {
    list-style: none !important;
    list-style-type: none !important;
}

.tips-box ul li::before,
.tips-box ul li::after {
    content: none !important;
    display: none !important;
}

/* Contact Grid & Card Styles - Forced Right Alignment */

/* Contact Grid & Card Styles - Forced Right Alignment */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.contact-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    /* Default center for icon */
    border: 1px solid #eee;
    transition: transform 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
}

.contact-card h3,
.contact-card p,
.contact-card a {
    text-align: right !important;
    /* Force text to right */
}

.contact-card .contact-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-align: center !important;
    /* Icon stays centered */
}


/* Base styles for the new container class */
.faq-container {
    background: #fff8e1;
    /* Slightly warmer background */
    border: 2px solid #ca8a04 !important;
    /* clear dark amber frame */
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 50px;
    text-align: center !important;
    /* Center all text */
    box-shadow: 0 8px 20px rgba(202, 138, 4, 0.15) !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Contact Page FAQ Button Fix */
.faq-btn-custom,
.faq-btn-custom:link,
.faq-btn-custom:visited,
.faq-btn-custom:hover,
.faq-btn-custom:active,
.faq-btn-custom:focus {
    background-color: #b45309 !important;
    background-image: none !important;
    color: #ffffff !important;
    border: 2px solid #92400e !important;
    box-shadow: 0 4px 10px rgba(180, 83, 9, 0.3) !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: inline-block !important;
    /* Reset to inline-block for better control inside flex */
    margin: 20px auto 0 !important;
    outline: none !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    padding: 12px 35px !important;
    border-radius: 12px !important;
    font-weight: 800 !important;
    font-size: 1.1rem !important;
    width: auto !important;
}

.faq-btn-custom:hover {
    background-color: #92400e !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(180, 83, 9, 0.4) !important;
}

.faq-btn-custom:active {
    transform: scale(0.95) !important;
    box-shadow: 0 2px 5px rgba(180, 83, 9, 0.3) !important;
}

@media (max-width: 768px) {
    .faq-container {
        padding: 20px 10px !important;
        /* Balanced padding */
    }

    .faq-btn-custom {
        width: 100% !important;
        /* Full width on mobile */
        max-width: 300px !important;
        /* But not TOO wide */
        display: block !important;
        margin: 15px auto 0 !important;
        padding: 12px 5px !important;
        font-size: clamp(0.8rem, 4vw, 1rem) !important;
    }

    .faq-header-nowrap {
        white-space: nowrap !important;
        font-size: clamp(0.9rem, 4.5vw, 1.2rem) !important;
    }
}

/* -------------------------------------------
   Mobile Bottom Navigation
------------------------------------------- */
/* -------------------------------------------
   Mobile Bottom Navigation (Circular Brand Style)
------------------------------------------- */
/* -------------------------------------------
   Mobile Bottom Navigation (Circular Brand Style)
------------------------------------------- */
/* -------------------------------------------
   Mobile Bottom Navigation (Refined Sizes & Font)
------------------------------------------- */
.mobile-bottom-nav {
    display: none;
    /* Hidden on desktop */
    position: fixed !important;
    bottom: 0 !important;
    left: 0;
    width: 100%;
    height: 65px;
    /* Slightly more compact */
    background-color: #ffffff;
    border-top: 1px solid #f3f4f6;
    z-index: 2147483647;
    padding: 0;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.06);
    direction: rtl;
    font-family: 'Cairo', sans-serif !important;
}

/* Icons Container */
.mobile-bottom-nav-item i {
    font-size: 1.5rem;
    /* Clear Size */
    width: 100%;
    /* Force full width to respect text-align */
    height: auto;
    line-height: 1;
    /* Reset line height for icon */
    display: block;
    margin: 0;
    /* Removing margins for perfect centering */
    padding: 0;
    text-align: center;
    /* Explicitly center icon glyph */
    background-color: transparent !important;
    box-shadow: none !important;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Text Styling */
.mobile-bottom-nav-item span {
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'Cairo', sans-serif !important;
    letter-spacing: 0;
    /* Normal spacing for Arabic */
    margin: 0;
    /* Removing margins */
    padding: 0;
    width: 100%;
    /* Force full width */
    text-align: center;
    /* Enforce text centering */
    line-height: 1.2;
    display: block;
}

/* Home (App Identity) */
.mobile-bottom-nav-item i.fas.fa-home {
    color: var(--primary-color);
    font-size: 1.7rem;
    /* Slightly larger emphasis */
    margin-bottom: -2px;
    /* Visual optical alignment if needed, but keeping 0 is safer usually. Let's stick to 0 or minimal adjustment */
    margin: 0;
}

/* TikTok */
.mobile-bottom-nav-item.brand-tiktok i {
    color: #000000;
}

/* Instagram */
.mobile-bottom-nav-item.brand-instagram i {
    background: -webkit-linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* YouTube */
.mobile-bottom-nav-item.brand-youtube i {
    color: #ff0000;
}

/* Facebook */
.mobile-bottom-nav-item.brand-facebook i {
    color: #1877F2;
}

/* Snapchat */
.mobile-bottom-nav-item.brand-snapchat i {
    color: #FFFC00;
    text-shadow: 0 0 1px #b6a000;
    /* Better visibility styling */
}

/* Active State General Animation */
.mobile-bottom-nav-item.active i {
    transform: translateY(-4px) scale(1.15);
    /* Stronger Lift & Scale */
    /* Premium Glow: Depth Shadow + Colored Bloom */
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1)) drop-shadow(0 0 12px currentColor);
}

.mobile-bottom-nav-item.active span {
    color: var(--primary-color);
    font-weight: 800;
}

/* Link Brand Text on Active */
.mobile-bottom-nav-item.brand-tiktok.active span {
    color: #000;
}

.mobile-bottom-nav-item.brand-instagram.active span {
    color: #d6249f;
}

.mobile-bottom-nav-item.brand-youtube.active span {
    color: #ff0000;
}

.mobile-bottom-nav-item.brand-facebook.active span {
    color: #1877F2;
}

.mobile-bottom-nav-item.brand-snapchat.active span {
    color: #d97706;
}

/* Darker Orange/Yellow for readable text */

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }

    /* Push content up so nav doesn't overlap footer */
    body {
        padding-bottom: 70px;
    }

    .footer-bottom {
        padding-bottom: 20px;
    }
}