/* Bootstrap Override and Dark Theme */
:root {
    --bs-body-bg: #000;
    --bs-body-color: #ccc;
    --bs-primary: #ff0000;
    --bs-secondary: #333;
    --bs-dark: #111;
    --bs-light: #222;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.4;
    color: #ccc;
    background: #000;
    min-height: 100vh;
}

/* Override Bootstrap defaults */
.btn {
    border-radius: 4px;
}

.card {
    background: #111;
    border: 1px solid #333;
    border-radius: 4px;
}

.card:hover {
    background: #1a1a1a;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: #000;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.desktop-lang-switcher {
    display: flex;
}

.mobile-lang-switcher {
    display: none;
}

.logo {
    font-size: 1.2rem;
    font-weight: 500;
    color: #ccc;
    text-decoration: none;
}

.language-switcher {
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    background: #333 !important;
    border: 1px solid #444 !important;
    color: #ccc !important;
    padding: 0.3rem 0.6rem;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

.lang-btn:hover {
    background: #444 !important;
    border-color: #555 !important;
}

.lang-btn.active {
    background: #555 !important;
    border-color: #666 !important;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 2rem 0;
    color: #e0e0e0;
}

.hero-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.8;
    max-width: 500px;
    margin: 0 auto;
}

/* Main Content */
.main-content {
    padding: 1rem 0;
}

.section {
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #ccc;
    text-align: center;
    margin-bottom: 0.8rem;
}

.support-title {
    font-weight: 700;
    font-size: 1.2rem;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* Card Wrapper Link */
.card-wrapper-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-wrapper-link:hover {
    text-decoration: none;
    color: inherit;
}

/* Card Styles */
.card {
    background: #111;
    border-radius: 4px;
    padding: 0.6rem;
    border: 1px solid #333;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-wrapper-link:hover .card {
    background: #1a1a1a;
}

.card-icon {
    width: 16px;
    height: 16px;
    background: #ff0000;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.4rem;
    color: #fff;
    font-size: 0.7rem;
}

.card-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: #ccc;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.card-description {
    color: #888;
    margin-bottom: 0.3rem;
    line-height: 1.3;
    font-size: 0.8rem;
    flex-grow: 1;
}

.card-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    background: #444;
    color: #ccc;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-weight: 400;
    font-size: 0.7rem;
    margin-top: auto;
}


/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }

    .header-content {
        display: block !important;
        text-align: center !important;
        padding: 1rem 0 0.5rem 0 !important;
    }

    .desktop-lang-switcher {
        display: none !important;
    }

    .mobile-lang-switcher {
        /* has to be in a new line */
        margin-top: 1rem !important;
        display: block !important;
        text-align: center !important;
        padding: 0 0 1rem 0 !important;
    }

    .mobile-lang-switcher .language-switcher {

        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        display: flex !important;
    }

    .section-title {
        font-size: 1rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 0.3rem;
    }

    .card {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 0.4rem;
    }
}

/* RTL Support (Persian, Arabic, Hebrew) */
[dir="rtl"] {
    text-align: right;
}

/* RTL Support - Keep existing RTL rules for desktop */
[dir="rtl"] .header-content {
    flex-direction: row-reverse;
}

[dir="rtl"] .language-switcher {
    flex-direction: row-reverse;
}

[dir="rtl"] .card-action {
    flex-direction: row-reverse;
}

[dir="rtl"] .card-title {
    flex-direction: row-reverse;
    text-align: center;
    justify-content: center;
}

[dir="rtl"] .card-title span {
    direction: rtl;
    display: inline-block;
    unicode-bidi: bidi-override;
}

[dir="rtl"] .card-icon {
    margin-right: 0;
    margin-left: 0.4rem;
}

[dir="rtl"] .card-description {
    text-align: right;
    direction: rtl;
    unicode-bidi: bidi-override;
}

[dir="rtl"] .card-action {
    text-align: center;
}

/* Smooth RTL transition */
html {
    transition: none;
}

body {
    transition: none;
}

.container {
    transition: none;
}

/* Animation for language switching */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading animation */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

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

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}