/* ==========================================================================
   AGRI-AI — Smart Agricultural Guide
   Modern, professional design system
   ========================================================================== */

:root {
    /* Brand palette */
    --primary-green: #12693a;
    --secondary-green: #1f9d55;
    --light-green: #56c596;
    --dark-green: #0b3d22;
    --accent: #a3d977;
    --accent-strong: #7cb342;

    /* Neutrals */
    --bg: #f4f7f5;
    --bg-soft: #eef4ef;
    --surface: #ffffff;
    --text-dark: #1a2b22;
    --text: #33403a;
    --text-light: #6b7a72;
    --border-color: #e4ebe6;

    /* Brand gradients */
    --grad-brand: linear-gradient(135deg, #1f9d55 0%, #12693a 55%, #0b3d22 100%);
    --grad-brand-soft: linear-gradient(135deg, #e9f7ef 0%, #dcefe3 100%);
    --grad-hero: radial-gradient(120% 120% at 0% 0%, #1f9d55 0%, #12693a 45%, #0b3d22 100%);

    /* Radii */
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --radius-pill: 999px;

    /* Shadows (layered, soft) */
    --shadow-xs: 0 1px 2px rgba(11, 61, 34, 0.06);
    --shadow: 0 4px 16px rgba(11, 61, 34, 0.08);
    --shadow-md: 0 10px 30px rgba(11, 61, 34, 0.10);
    --shadow-lg: 0 20px 50px rgba(11, 61, 34, 0.16);
    --ring: 0 0 0 4px rgba(31, 157, 85, 0.18);

    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --container: 1180px;
}

/* Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background:
        radial-gradient(60rem 60rem at 110% -10%, rgba(86, 197, 150, 0.12), transparent 60%),
        radial-gradient(50rem 50rem at -10% 10%, rgba(18, 105, 58, 0.08), transparent 55%),
        var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--primary-green);
}

img {
    max-width: 100%;
}

:focus-visible {
    outline: 3px solid var(--secondary-green);
    outline-offset: 2px;
    border-radius: 6px;
}

/* ==========================================================================
   Top header bar
   ========================================================================== */
.top-header-bar {
    background: var(--dark-green);
    color: #eaf6ee;
    padding: 0.6rem 0;
    font-size: 0.9rem;
}

.top-header-content {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.top-brand {
    font-weight: 600;
    color: #bfe3cd;
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0;
    flex-shrink: 0;
}

.lang-link-top {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff !important;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.12);
    padding: 0.4rem 0.95rem;
    border-radius: var(--radius-pill);
    transition: background var(--transition), transform var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.lang-link-top:hover {
    background: rgba(255, 255, 255, 0.24);
    transform: translateY(-1px);
    text-decoration: none !important;
}

.lang-link-top .globe {
    font-size: 0.95rem;
}

/* ==========================================================================
   Banner
   ========================================================================== */
header {
    background: linear-gradient(180deg, #ffffff 0%, #f7fbf8 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 1.75rem 0;
    position: relative;
}

.header-content {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 2rem;
}

.banner-section {
    display: grid;
    grid-template-columns: 190px 1fr 150px;
    gap: 2rem;
    align-items: center;
}

.banner-logo,
.banner-emblem {
    display: flex;
    align-items: center;
}

.banner-logo {
    justify-content: flex-start;
}

.banner-emblem {
    justify-content: flex-end;
}

.main-logo {
    height: 118px;
    width: auto;
    max-width: 190px;
    object-fit: contain;
    transition: transform var(--transition);
    filter: drop-shadow(0 6px 14px rgba(11, 61, 34, 0.12));
}

.main-logo:hover {
    transform: scale(1.04);
}

.emblem-logo {
    height: 96px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(11, 61, 34, 0.12));
}

.banner-title-section {
    text-align: center;
}

.organization-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.35rem;
}

.site-title {
    font-size: 2.35rem;
    font-weight: 900;
    line-height: 1.2;
    background: var(--grad-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0.15rem 0;
}

.tagline {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--secondary-green);
    background: var(--grad-brand-soft);
    border: 1px solid rgba(31, 157, 85, 0.25);
    padding: 0.25rem 0.9rem;
    border-radius: var(--radius-pill);
    margin-top: 0.5rem;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
nav {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-xs);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 0.35rem;
    margin: 0;
    width: 100%;
}

nav li {
    position: relative;
}

nav a {
    display: block;
    padding: 0.95rem 1.25rem;
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.98rem;
    border-radius: var(--radius-sm);
    margin: 0.4rem 0;
    transition: color var(--transition), background var(--transition);
}

nav a::after {
    content: '';
    position: absolute;
    left: 1.25rem;
    right: 1.25rem;
    bottom: 0.15rem;
    height: 3px;
    border-radius: 3px;
    background: var(--grad-brand);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform var(--transition);
}

nav a:hover {
    color: var(--primary-green);
    background: var(--bg-soft);
}

nav a.active {
    color: var(--primary-green);
}

nav a.active::after {
    transform: scaleX(1);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-color);
    background: var(--surface);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    width: 22px;
    margin: 0 auto;
    background: var(--primary-green);
    border-radius: 2px;
}

/* ==========================================================================
   Layout
   ========================================================================== */
.container {
    max-width: var(--container);
    margin: 2.5rem auto;
    padding: 0 2rem;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero-section {
    background: var(--grad-hero);
    color: #fff;
    padding: 4.5rem 2.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 3rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(30rem 30rem at 85% -20%, rgba(163, 217, 119, 0.25), transparent 60%),
        radial-gradient(24rem 24rem at 0% 120%, rgba(86, 197, 150, 0.3), transparent 55%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 820px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-pill);
    margin-bottom: 1.4rem;
    backdrop-filter: blur(6px);
}

.hero-title {
    font-size: 2.9rem;
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: 1.25rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
    color: #fff;
}

.hero-text {
    font-size: 1.18rem;
    line-height: 1.85;
    margin-bottom: 2rem;
    opacity: 0.96;
    color: #eefaf1;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.85rem 1.9rem;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
    text-decoration: none;
    text-align: center;
    line-height: 1.2;
}

.btn-primary {
    background: var(--grad-brand);
    color: #fff;
    box-shadow: 0 8px 20px rgba(18, 105, 58, 0.28);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(18, 105, 58, 0.38);
    color: #fff;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-hero {
    background: #fff;
    color: var(--primary-green);
    font-size: 1.08rem;
    padding: 1rem 2.5rem;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

.btn-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.3);
    color: var(--dark-green);
}

.btn-large {
    font-size: 1.12rem;
    padding: 1.05rem 3rem;
}

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card h2 {
    color: var(--text-dark);
    margin-bottom: 1.25rem;
    font-size: 1.65rem;
    font-weight: 800;
    padding-bottom: 0.75rem;
    position: relative;
}

.card h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    inset-inline-start: 0;
    width: 64px;
    height: 4px;
    border-radius: 4px;
    background: var(--grad-brand);
}

.section-title {
    color: var(--text-dark);
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 800;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    border-radius: 4px;
    background: var(--grad-brand);
}

/* ==========================================================================
   Categories
   ========================================================================== */
.categories-card {
    padding: 2.5rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.category-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    padding: 2rem 1.75rem;
    border-radius: var(--radius);
    text-align: center;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    cursor: default;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: var(--grad-brand);
    opacity: 0.9;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: rgba(31, 157, 85, 0.35);
}

.category-icon {
    font-size: 2.6rem;
    margin: 0 auto 1rem;
    width: 76px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--grad-brand-soft);
    box-shadow: inset 0 0 0 1px rgba(31, 157, 85, 0.18);
}

.category-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.6rem;
    color: var(--text-dark);
}

.category-desc {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text-light);
}

/* Accent stripe variants */
.category-livestock::before { background: linear-gradient(135deg, #66bb6a, #2e7d32); }
.category-soil::before { background: linear-gradient(135deg, #8d6e63, #5d4037); }
.category-pest::before { background: linear-gradient(135deg, #9ccc65, #558b2f); }
.category-irrigation::before { background: linear-gradient(135deg, #4dd0e1, #0097a7); }
.category-other::before { background: linear-gradient(135deg, #b0bec5, #607d8b); }

/* ==========================================================================
   Get started
   ========================================================================== */
.get-started-card {
    background: var(--grad-brand-soft);
    border: 1px solid rgba(31, 157, 85, 0.22);
    text-align: center;
    padding: 3rem 2rem;
}

.get-started-content {
    max-width: 700px;
    margin: 0 auto;
}

.get-started-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: var(--text);
}

/* ==========================================================================
   Forms
   ========================================================================== */
.limit-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-green);
    background: var(--grad-brand-soft);
    border: 1px solid rgba(31, 157, 85, 0.22);
    padding: 0.45rem 1rem;
    border-radius: var(--radius-pill);
    margin-bottom: 1.5rem;
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    filter: grayscale(0.3);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.55rem;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.85rem 1.1rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-dark);
    background: #fbfdfc;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.form-control::placeholder {
    color: #9aa8a1;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-green);
    background: #fff;
    box-shadow: var(--ring);
}

textarea.form-control {
    min-height: 130px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2312693a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.75rem;
}

[dir="rtl"] select.form-control {
    background-position: left 1rem center;
    padding-right: 1.1rem;
    padding-left: 2.75rem;
}

/* ==========================================================================
   Question items
   ========================================================================== */
.question-item {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-inline-start: 4px solid var(--secondary-green);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    transition: transform var(--transition), box-shadow var(--transition);
}

.question-item:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.question-text {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    flex: 1;
    min-width: 200px;
}

.category-badge {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    background: var(--grad-brand-soft);
    color: var(--primary-green);
    border: 1px solid rgba(31, 157, 85, 0.25);
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.question-meta {
    display: flex;
    gap: 1.25rem;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.question-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.question-meta strong {
    color: var(--text);
    font-weight: 700;
}

/* Collapse toggle */
.collapse-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: var(--bg-soft);
    color: var(--primary-green);
    border: 1.5px solid rgba(31, 157, 85, 0.28);
    border-radius: var(--radius-pill);
    padding: 0.55rem 1.15rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), transform var(--transition);
    font-family: inherit;
    font-size: 0.95rem;
}

.collapse-toggle:hover {
    background: var(--grad-brand);
    color: #fff;
    transform: translateY(-1px);
}

.collapse-icon {
    font-size: 0.7rem;
}

.answer-section {
    background: var(--bg-soft);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    border-radius: var(--radius-sm);
    margin-top: 1rem;
    animation: fadeIn 0.35s ease-out;
}

.answer-label {
    color: var(--primary-green);
    font-weight: 800;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.answer-text {
    color: var(--text);
    line-height: 1.85;
    white-space: pre-wrap;
}

.ai-typing-text {
    min-height: 1.5em;
    position: relative;
}

.typing-cursor {
    display: inline-block;
    color: var(--secondary-green);
    font-weight: bold;
    animation: blink 1s infinite;
    margin-inline-start: 2px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.no-answer {
    color: var(--text-light);
    font-style: italic;
}

/* Status chips */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.85rem;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 700;
}

.status-answered {
    background: #dcf5e4;
    color: #147a3e;
}

.status-pending {
    background: #fff3cd;
    color: #b7791f;
}

/* AI badge */
.ai-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.7rem;
    background: linear-gradient(135deg, #6a5cff 0%, #8f4fe0 100%);
    color: #fff;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(120, 80, 230, 0.3);
}

/* ==========================================================================
   Alerts
   ========================================================================== */
.alert {
    padding: 1rem 1.35rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.alert-success {
    background: #dcf5e4;
    color: #146c39;
    border: 1px solid #a7e0bd;
    border-inline-start: 4px solid var(--secondary-green);
}

.alert-error {
    background: #fde3e3;
    color: #b3261e;
    border: 1px solid #f3b4b1;
    border-inline-start: 4px solid #e5484d;
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.paging-controls {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.paging-info {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-light);
    font-size: 0.92rem;
}

.paging-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.btn-paging {
    min-width: 42px;
    padding: 0.5rem 0.85rem;
    background: var(--surface);
    color: var(--primary-green);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.92rem;
    transition: all var(--transition);
}

.btn-paging:hover {
    background: var(--bg-soft);
    border-color: var(--secondary-green);
    transform: translateY(-1px);
}

.btn-paging.active {
    background: var(--grad-brand);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 14px rgba(18, 105, 58, 0.28);
}

.page-numbers {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.page-ellipsis {
    padding: 0.5rem 0.25rem;
    color: var(--text-light);
    font-weight: 700;
    user-select: none;
}

[dir="rtl"] .paging-buttons,
[dir="rtl"] .page-numbers {
    flex-direction: row-reverse;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    background: var(--dark-green);
    color: #cfe7d8;
    text-align: center;
    padding: 2.5rem 2rem;
    margin-top: 4rem;
}

.footer-inner {
    max-width: var(--container);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    height: 54px;
    width: auto;
    opacity: 0.9;
    filter: brightness(0) invert(1);
}

footer p {
    font-size: 0.92rem;
    max-width: 640px;
}

/* ==========================================================================
   Motion
   ========================================================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.75; }
}

.card,
.hero-section,
.question-item {
    animation: fadeIn 0.5s ease-out both;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   RTL refinements
   ========================================================================== */
[dir="rtl"] body {
    font-family: 'Cairo', 'Segoe UI', 'Tahoma', 'Arial', sans-serif;
}

[dir="rtl"] .question-item:hover {
    transform: translateY(-2px);
}

[dir="rtl"] .hero-title,
[dir="rtl"] .hero-text,
[dir="rtl"] .section-title {
    text-align: center;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
    .banner-section {
        grid-template-columns: 120px 1fr 90px;
        gap: 1rem;
    }

    .main-logo { height: 90px; }
    .emblem-logo { height: 70px; }
    .site-title { font-size: 1.9rem; }
}

@media (max-width: 768px) {
    .top-brand { display: none; }
    .top-header-content { justify-content: flex-end; }

    .header-content,
    .nav-inner,
    .top-header-content,
    .container {
        padding-inline: 1.15rem;
    }

    .banner-section {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1rem;
    }

    .banner-logo,
    .banner-emblem {
        justify-content: center;
    }

    .organization-title { font-size: 1.1rem; }
    .site-title { font-size: 1.75rem; }

    /* Mobile nav */
    .nav-toggle { display: flex; }

    nav ul {
        flex-direction: column;
        gap: 0;
        display: none;
        padding: 0.5rem 0 0.75rem;
    }

    nav ul.open {
        display: flex;
    }

    nav a {
        margin: 0.15rem 0;
    }

    nav a::after { display: none; }

    nav a.active {
        background: var(--bg-soft);
    }

    .hero-section { padding: 3rem 1.5rem; }
    .hero-title { font-size: 2rem; }
    .hero-text { font-size: 1.02rem; }

    .card,
    .categories-card { padding: 1.5rem; }

    .categories-grid { grid-template-columns: 1fr; }

    .question-header { flex-direction: column; }

    .section-title { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .site-title { font-size: 1.5rem; }
    .hero-title { font-size: 1.65rem; }

    .paging-buttons { gap: 0.3rem; }
    .btn-paging {
        min-width: 36px;
        padding: 0.4rem 0.55rem;
        font-size: 0.85rem;
    }
}
