/* -------------------------------------------------------
   Liqa — Arabic Poetry Community RTL & Typography
   لقاء الأمنيات — مجتمع الشعر العربي
------------------------------------------------------- */

/* -------------------------------------------------------
   Arabic Typography
------------------------------------------------------- */

body {
    font-family: 'Noto Naskh Arabic', 'Amiri', 'Tahoma', 'Arial', sans-serif !important;
    direction: rtl;
    text-align: right;
}

h1, h2, h3, h4, h5, h6,
.display-6, .page-title, .card-title {
    font-family: 'Amiri', 'Noto Naskh Arabic', Georgia, serif !important;
    letter-spacing: 0 !important;
}

/* Poetry body — larger, more elegant */
article, .poem-body {
    font-family: 'Amiri', 'Noto Naskh Arabic', serif !important;
    font-size: 1.25rem;
    line-height: 2.2;
    text-align: right;
}

/* -------------------------------------------------------
   RTL Layout Fixes
------------------------------------------------------- */

/* Navbar brand alignment */
.navbar .navbar-brand {
    font-family: 'Amiri', serif !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-size: 1.2rem;
}

/* Fix dropdown alignment for RTL */
.dropdown-menu {
    text-align: right;
}

/* Fix button close position in alerts */
.alert .btn-close {
    margin-left: 0;
    margin-right: auto;
}

/* Card image radius flip for RTL */
.mag-thumb {
    border-radius: 0 0.9rem 0.9rem 0 !important;
}

/* Text alignment helpers */
.text-md-end {
    text-align: left !important;
}

.text-md-start {
    text-align: right !important;
}

/* -------------------------------------------------------
   Form Styling for Arabic
------------------------------------------------------- */

input, textarea, select, .form-control, .form-select {
    font-family: 'Noto Naskh Arabic', 'Tahoma', sans-serif !important;
    text-align: right;
    direction: rtl;
}

/* Email and URL fields remain LTR */
input[type="email"],
input[type="url"],
input[name="username"] {
    direction: ltr;
    text-align: left;
}

label, .form-label {
    font-family: 'Noto Naskh Arabic', sans-serif !important;
    font-weight: 600;
}

/* -------------------------------------------------------
   Badge & Notification RTL
------------------------------------------------------- */

.badge {
    font-family: 'Noto Naskh Arabic', sans-serif !important;
}

/* -------------------------------------------------------
   AI Critique Section
------------------------------------------------------- */

.critique-section {
    font-family: 'Noto Naskh Arabic', sans-serif !important;
    direction: rtl;
    text-align: right;
}

/* -------------------------------------------------------
   Competition & Leaderboard
------------------------------------------------------- */

.leaderboard-rank {
    font-family: 'Amiri', serif !important;
    font-size: 1.5rem;
    font-weight: 700;
}

/* -------------------------------------------------------
   Footer RTL
------------------------------------------------------- */

footer {
    text-align: right;
}

/* -------------------------------------------------------
   Responsive RTL
------------------------------------------------------- */

@media (max-width: 767.98px) {
    .navbar-brand {
        font-size: 1rem;
    }

    article, .poem-body {
        font-size: 1.1rem;
        line-height: 2;
    }
}

/* -------------------------------------------------------
   Print Styles for Poetry
------------------------------------------------------- */

@media print {
    body {
        font-family: 'Amiri', serif !important;
    }

    .navbar, footer, .btn {
        display: none !important;
    }
}
