/* =========================================================
   PAKO — Protecting Animals in Kurdistan Organisation
   Custom theme. Brand color: #2cc2b9
   ========================================================= */

:root {
    --pako-teal: #2cc2b9;
    --pako-teal-dark: #1f998f;
    --pako-teal-light: #5fd5cd;
    --pako-teal-soft: #e6f8f6;

    --pako-accent: #f5a623;
    --pako-danger: #e63946;
    --pako-success: #2a9d8f;

    --bg: #ffffff;
    --bg-alt: #f7fafa;
    --bg-elevated: #ffffff;
    --surface-border: #e5ecec;
    --text: #1a2a2a;
    --text-muted: #5b6e6e;
    --text-soft: #8aa0a0;
    --link: var(--pako-teal-dark);

    --shadow-sm: 0 1px 2px rgba(15, 30, 30, .06);
    --shadow: 0 8px 24px rgba(15, 30, 30, .08);
    --shadow-lg: 0 24px 64px rgba(15, 30, 30, .12);

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;

    --container: 1200px;

    --transition: 200ms cubic-bezier(.4, 0, .2, 1);

    --font-base: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-display: 'Poppins', 'Inter', 'Segoe UI', sans-serif;
}

[data-theme="dark"] {
    --bg: #0e1718;
    --bg-alt: #15201f;
    --bg-elevated: #1b2828;
    --surface-border: #243333;
    --text: #e7f0ee;
    --text-muted: #a0b3b3;
    --text-soft: #6c8484;
    --link: var(--pako-teal-light);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 12px 28px rgba(0, 0, 0, .5);
    --shadow-lg: 0 30px 70px rgba(0, 0, 0, .6);

    --pako-teal-soft: rgba(44, 194, 185, .12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    overflow-x: clip; /* clips overflow without creating a scroll container — safe for sticky */
}

body {
    font-family: var(--font-base);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background var(--transition), color var(--transition);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100vw;
}

html[dir="rtl"] body { font-family: 'Noto Sans Arabic', 'Tahoma', var(--font-base); }

main { flex: 1; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text);
    margin: 0 0 .6em;
    line-height: 1.2;
}

h1 { font-size: clamp(2rem, 4vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }

p { margin: 0 0 1em; color: var(--text-muted); }

a { color: var(--link); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--pako-teal); }

img { max-width: 100%; display: block; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.25rem;
    box-sizing: border-box;
}

@media (max-width: 480px) {
    .container { padding: 0 1rem; }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .8rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: .95rem;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}

.btn-primary {
    background: var(--pako-teal);
    color: #fff;
    border-color: var(--pako-teal);
}
.btn-primary:hover {
    background: var(--pako-teal-dark);
    border-color: var(--pako-teal-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background: transparent;
    color: var(--pako-teal);
    border-color: var(--pako-teal);
}
.btn-outline:hover {
    background: var(--pako-teal);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--surface-border);
}
.btn-ghost:hover {
    background: var(--bg-alt);
    border-color: var(--pako-teal);
    color: var(--pako-teal);
}

.btn-danger {
    background: var(--pako-danger);
    color: #fff;
    border-color: var(--pako-danger);
}

.btn-sm { padding: .5rem 1rem; font-size: .85rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }
.btn-block { width: 100%; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--surface-border);
    transition: background var(--transition), border-color var(--transition);
}

[data-theme="dark"] .site-header {
    background: rgba(14, 23, 24, .85);
}

.nav-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 0;
    padding: .55rem 1.25rem 0;
    max-width: var(--container);
    margin: 0 auto;
}

/* Row 1: brand left, actions right */
.nav-wrap .brand       { grid-column: 1; grid-row: 1; justify-self: start; align-self: center; padding-bottom: .45rem; }
.nav-wrap .nav-actions { grid-column: 2; grid-row: 1; justify-self: end;   align-self: center; padding-bottom: .45rem; }

/* Row 2: nav links span full width, centered */
.nav-wrap nav {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    justify-content: center;
    border-top: 1px solid var(--surface-border);
}

/* Logo always appears to the left of the brand text, even in RTL */
html[dir="rtl"] .brand { flex-direction: row-reverse; }

.brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text);
    flex-shrink: 0;
}
.brand:hover { color: var(--pako-teal); }

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--pako-teal);
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 800;
    box-shadow: 0 6px 18px rgba(44, 194, 185, .35);
    overflow: hidden;
}

.brand-mark img { width: 100%; height: 100%; object-fit: cover; }

.brand-text { line-height: 1.1; }
.brand-text small {
    display: block;
    font-size: .7rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: .1rem;
    list-style: none;
    margin: 0;
    padding: .25rem 0;
    white-space: nowrap;
}

.nav-links a {
    display: block;
    padding: .45rem .75rem;
    border-radius: 8px;
    color: var(--text);
    font-weight: 500;
    font-size: .9rem;
    white-space: nowrap;
    transition: all var(--transition);
}
.nav-links a:hover, .nav-links a.active {
    background: var(--pako-teal-soft);
    color: var(--pako-teal-dark);
}
[data-theme="dark"] .nav-links a:hover,
[data-theme="dark"] .nav-links a.active {
    color: var(--pako-teal-light);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--surface-border);
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all var(--transition);
}
.icon-btn:hover {
    border-color: var(--pako-teal);
    color: var(--pako-teal);
}
.icon-btn svg { width: 20px; height: 20px; }

.lang-wrap { position: relative; }
.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--bg-elevated);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: .5rem;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition);
}
html[dir="rtl"] .lang-menu { right: auto; left: 0; }
.lang-wrap.open .lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.lang-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .6rem .8rem;
    border-radius: 8px;
    color: var(--text);
    font-size: .9rem;
}
.lang-menu a:hover, .lang-menu a.active {
    background: var(--pako-teal-soft);
    color: var(--pako-teal-dark);
}
.lang-menu .native { color: var(--text-muted); font-size: .82rem; }

/* ── Hamburger: hidden on desktop ── */
.nav-toggle { display: none; }

/* ── Mobile-only items: hidden on desktop ── */
.nav-mobile-only    { display: none; }
.nav-mobile-divider { display: none; height: 1px; background: var(--surface-border); margin: .5rem 0; list-style: none; }

/* ================================================================
   MOBILE NAV  ≤ 980px
   Strategy: nav-links drops down from the sticky header using
   position:absolute (header is the positioning context because
   it has position:sticky). Show/hide with display none→flex.
   No opacity/visibility tricks — simple and bulletproof.
   ================================================================ */
@media (max-width: 980px) {

    /* Nav bar becomes a simple flex row: brand | hamburger */
    .nav-wrap {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: .5rem;
        padding: .75rem 1rem;
    }

    /* Reset desktop two-row styles */
    .nav-wrap nav { display: block; border-top: none; justify-content: unset; }

    /* RTL: row-reverse cancels the RTL flex reversal, keeping brand left and actions right */
    html[dir="rtl"] .nav-wrap { flex-direction: row-reverse; }

    /* <nav> collapses to 0 — its only child is position:absolute */

    /* Show hamburger */
    .nav-toggle {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        width: 42px;
        height: 42px;
        border-radius: 10px;
        border: 1.5px solid var(--surface-border);
        background: var(--bg);
        cursor: pointer;
        flex-shrink: 0;
        transition: border-color var(--transition), background var(--transition);
    }
    .nav-toggle:hover { border-color: var(--pako-teal); background: var(--pako-teal-soft); }
    .nav-toggle span {
        display: block;
        width: 20px;
        height: 2px;
        background: var(--text);
        border-radius: 2px;
        transition: transform 250ms ease, opacity 250ms ease;
    }
    .nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
    .nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    /* Hide desktop account buttons — they live in the overlay */
    .nav-actions .btn { display: none !important; }

    /* Nav overlay: drops down from the header */
    .nav-links {
        position: absolute;   /* relative to .site-header (position:sticky) */
        top: 100%;
        left: 0;
        right: 0;
        display: none;        /* hidden by default */
        flex-direction: column;
        align-items: stretch;
        list-style: none;
        gap: 0;
        background: var(--bg-elevated);
        border-top: 1px solid var(--surface-border);
        padding: .5rem 1rem 1.5rem;
        box-shadow: 0 16px 40px rgba(0, 0, 0, .18);
        max-height: calc(100dvh - 60px);
        overflow-y: auto;
        z-index: 200;
    }
    .nav-links.open { display: flex; }

    /* Link rows inside the overlay */
    .nav-links > li > a {
        display: flex;
        align-items: center;
        padding: .85rem 1rem;
        border-radius: 10px;
        font-size: 1rem;
        font-weight: 500;
        color: var(--text);
        transition: background var(--transition), color var(--transition);
    }
    .nav-links > li > a:hover {
        background: var(--pako-teal-soft);
        color: var(--pako-teal-dark);
    }
    [data-theme="dark"] .nav-links > li > a:hover { color: var(--pako-teal-light); }

    /* Show account links inside overlay */
    .nav-mobile-only    { display: list-item; }
    .nav-mobile-divider { display: block; }

    /* Logout button */
    .nav-mobile-btn {
        display: flex;
        align-items: center;
        width: 100%;
        padding: .85rem 1rem;
        border: none;
        border-radius: 10px;
        background: none;
        font-family: inherit;
        font-size: 1rem;
        font-weight: 500;
        color: var(--pako-danger);
        cursor: pointer;
        text-align: start;
    }
    .nav-mobile-btn:hover { background: rgba(230, 57, 70, .08); }

    /* Hide tagline in brand on mobile */
    .brand-text small { display: none; }
}

section { padding: 4.5rem 0; overflow-x: hidden; }
@media (max-width: 768px) { section { padding: 3rem 0; } }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 3rem; }
.section-head .eyebrow {
    display: inline-block;
    color: var(--pako-teal-dark);
    font-weight: 700;
    font-size: .85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: .6rem;
}
[data-theme="dark"] .section-head .eyebrow { color: var(--pako-teal-light); }

.hero {
    position: relative;
    overflow: hidden;
    padding: 6rem 0 5rem;
    background:
        radial-gradient(80% 60% at 20% 20%, rgba(44, 194, 185, .18) 0%, transparent 60%),
        radial-gradient(60% 60% at 80% 90%, rgba(245, 166, 35, .12) 0%, transparent 60%),
        var(--bg);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-text h1 {
    font-size: clamp(2.4rem, 4.5vw, 3.8rem);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text) 0%, var(--pako-teal-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p.lede {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 540px;
}

.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

.hero-illustration {
    position: relative;
    aspect-ratio: 1;
    max-width: 520px;
    margin-left: auto;
    background:
        conic-gradient(from 0deg at 50% 50%,
            var(--pako-teal-light), var(--pako-teal), var(--pako-teal-dark), var(--pako-teal-light));
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    display: grid;
    place-items: center;
}
html[dir="rtl"] .hero-illustration { margin-left: 0; margin-right: auto; }

.hero-illustration::before {
    content: "";
    position: absolute;
    inset: 12px;
    background: var(--bg);
    border-radius: 50%;
}
.hero-illustration .paw {
    position: relative;
    width: 55%;
    color: var(--pako-teal);
    z-index: 1;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--surface-border);
}
.hero-stats .stat .num {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--pako-teal-dark);
    line-height: 1;
}
[data-theme="dark"] .hero-stats .stat .num { color: var(--pako-teal-light); }
.hero-stats .stat .label {
    font-size: .85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: .4rem;
}

@media (max-width: 900px) {
    .hero { padding: 3.5rem 0 3rem; }
    .hero-grid { grid-template-columns: 1fr; gap: 1.5rem; text-align: center; }
    .hero-text p.lede { margin: 0 auto 1.5rem; }
    .hero-actions { justify-content: center; }
    .hero-illustration { max-width: 220px; margin: 0 auto; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 2.5rem; padding-top: 2rem; }
    .hero-stats .stat .num { font-size: 1.8rem; }
}

@media (max-width: 480px) {
    .hero { padding: 2.5rem 0 2rem; }
    .hero-illustration { max-width: 160px; }
    .hero-text h1 { font-size: 2rem; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; justify-content: center; }
}

.card {
    background: var(--bg-elevated);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: all var(--transition);
}
.card:hover {
    border-color: var(--pako-teal);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--pako-teal-soft);
    color: var(--pako-teal-dark);
    display: grid;
    place-items: center;
    margin-bottom: 1.25rem;
}
[data-theme="dark"] .card-icon { color: var(--pako-teal-light); }
.card-icon svg { width: 28px; height: 28px; }

.card h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.card p { margin: 0; font-size: .95rem; }

.grid {
    display: grid;
    gap: 1.5rem;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.animal-card {
    background: var(--bg-elevated);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}
.animal-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--pako-teal);
}
.animal-card .photo {
    aspect-ratio: 4 / 3;
    background: var(--bg-alt);
    position: relative;
    overflow: hidden;
}
.animal-card .photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 400ms ease;
}
.animal-card:hover .photo img { transform: scale(1.05); }

.animal-card .badge-row {
    position: absolute;
    top: .75rem;
    left: .75rem;
    display: flex;
    gap: .35rem;
    flex-wrap: wrap;
}
html[dir="rtl"] .animal-card .badge-row { left: auto; right: .75rem; }

.animal-card .body { padding: 1.1rem 1.25rem 1.25rem; flex: 1; display: flex; flex-direction: column; }
.animal-card h4 { font-size: 1.1rem; margin: 0 0 .3rem; color: var(--text); }
.animal-card .meta { font-size: .85rem; color: var(--text-muted); margin-bottom: .9rem; }
.animal-card p { font-size: .9rem; margin-bottom: 1rem; flex: 1; }
.animal-card .footer-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .65rem;
    border-radius: 100px;
    font-size: .75rem;
    font-weight: 600;
    background: var(--pako-teal-soft);
    color: var(--pako-teal-dark);
    border: 1px solid transparent;
}
[data-theme="dark"] .badge { color: var(--pako-teal-light); }

.badge-pending { background: #fff3cd; color: #8a6500; }
.badge-approved { background: #d4edda; color: #1e6e3a; }
.badge-rejected { background: #f8d7da; color: #842029; }
.badge-adopted  { background: rgba(108, 117, 125, .15); color: #495057; }
.badge-lost     { background: #f8d7da; color: #842029; }
.badge-found    { background: #d1ecf1; color: #0c5460; }

[data-theme="dark"] .badge-pending  { background: rgba(255, 193, 7, .15); color: #ffd966; }
[data-theme="dark"] .badge-approved { background: rgba(40, 167, 69, .15); color: #7ed99a; }
[data-theme="dark"] .badge-rejected { background: rgba(220, 53, 69, .15); color: #f08a93; }
[data-theme="dark"] .badge-adopted  { background: rgba(173, 181, 189, .15); color: #adb5bd; }
[data-theme="dark"] .badge-lost     { background: rgba(220, 53, 69, .15); color: #f08a93; }
[data-theme="dark"] .badge-found    { background: rgba(23, 162, 184, .15); color: #6fc6d8; }

.form-card {
    background: var(--bg-elevated);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    font-size: .9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: .4rem;
}
.form-control, .form-select, textarea.form-control {
    width: 100%;
    padding: .7rem .9rem;
    border: 1.5px solid var(--surface-border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    font-size: .95rem;
    transition: all var(--transition);
}
.form-control:focus, .form-select:focus, textarea.form-control:focus {
    outline: none;
    border-color: var(--pako-teal);
    box-shadow: 0 0 0 3px var(--pako-teal-soft);
}

textarea.form-control { min-height: 110px; resize: vertical; }

.form-check {
    display: flex;
    align-items: center;
    gap: .55rem;
    cursor: pointer;
}
.form-check input { width: 18px; height: 18px; accent-color: var(--pako-teal); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.text-danger { color: var(--pako-danger); font-size: .82rem; }
.field-validation-error { color: var(--pako-danger); font-size: .82rem; display: block; margin-top: .3rem; }
.input-validation-error { border-color: var(--pako-danger); }

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    border-left: 4px solid;
    margin-bottom: 1.25rem;
    font-size: .92rem;
}
html[dir="rtl"] .alert { border-left: none; border-right: 4px solid; }
.alert-success { background: rgba(42, 157, 143, .1); border-color: var(--pako-success); color: var(--pako-success); }
.alert-danger  { background: rgba(230, 57, 70, .1);  border-color: var(--pako-danger);  color: var(--pako-danger); }
.alert-info    { background: var(--pako-teal-soft);  border-color: var(--pako-teal);    color: var(--pako-teal-dark); }
[data-theme="dark"] .alert-info { color: var(--pako-teal-light); }

.table-wrap {
    background: var(--bg-elevated);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    overflow: hidden;
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}
.table, .admin-table {
    width: 100%;
    min-width: 560px; /* forces horizontal scroll inside wrapper before content breaks layout */
    border-collapse: collapse;
    font-size: .92rem;
}
.table th, .table td,
.admin-table th, .admin-table td {
    padding: .85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--surface-border);
    white-space: nowrap;
}
html[dir="rtl"] .table th, html[dir="rtl"] .table td,
html[dir="rtl"] .admin-table th, html[dir="rtl"] .admin-table td { text-align: right; }
.table th, .admin-table th {
    background: var(--bg-alt);
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    font-size: .78rem;
    letter-spacing: .5px;
}
.table tr:last-child td, .admin-table tr:last-child td { border-bottom: none; }
.table tr:hover td, .admin-table tr:hover td { background: var(--bg-alt); }

.site-footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--surface-border);
    padding: 3.5rem 0 1.5rem;
    margin-top: 4rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2.5rem;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-col h4 {
    font-size: .9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text);
    margin-bottom: 1rem;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: .55rem; }
.footer-col a { color: var(--text-muted); font-size: .92rem; }
.footer-col a:hover { color: var(--pako-teal); }

.social-row { display: flex; gap: .6rem; margin-top: 1rem; }
.social-row a {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--surface-border);
    display: grid;
    place-items: center;
    color: var(--text);
    transition: all var(--transition);
}
.social-row a:hover {
    background: var(--pako-teal);
    color: #fff;
    border-color: var(--pako-teal);
    transform: translateY(-2px);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2.5rem;
    border-top: 1px solid var(--surface-border);
    color: var(--text-soft);
    font-size: .88rem;
}

.filters {
    background: var(--bg-elevated);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    align-items: end;
}
.filters .form-group { margin: 0; }
.filters label { font-size: .8rem; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); }

.pagination {
    display: flex;
    justify-content: center;
    gap: .35rem;
    margin-top: 2.5rem;
    list-style: none;
    padding: 0;
}
.pagination a, .pagination span {
    display: grid;
    place-items: center;
    min-width: 38px;
    height: 38px;
    padding: 0 .75rem;
    border-radius: 8px;
    border: 1px solid var(--surface-border);
    color: var(--text);
    font-weight: 500;
    text-decoration: none;
}
.pagination a:hover { background: var(--pako-teal-soft); color: var(--pako-teal-dark); border-color: var(--pako-teal); }
.pagination .active { background: var(--pako-teal); color: #fff; border-color: var(--pako-teal); }

.page-hero {
    background: var(--bg-alt);
    padding: 3.5rem 0;
    text-align: center;
    border-bottom: 1px solid var(--surface-border);
}
.page-hero h1 { margin-bottom: .5rem; }
.page-hero p { color: var(--text-muted); max-width: 700px; margin: 0 auto; font-size: 1.05rem; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2.5rem; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; }
.no-results { text-align: center; padding: 4rem 1rem; color: var(--text-muted); }
.no-results svg { width: 80px; height: 80px; opacity: .3; margin-bottom: 1rem; color: var(--pako-teal); }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 600ms cubic-bezier(.4, 0, .2, 1) both; }
.delay-1 { animation-delay: 100ms; }
.delay-2 { animation-delay: 200ms; }
.delay-3 { animation-delay: 300ms; }

.article-body {
    max-width: 760px;
    margin: 0 auto;
    line-height: 1.8;
    font-size: 1.05rem;
    color: var(--text);
}
.article-body h2 { margin-top: 2rem; }
.article-body p { color: var(--text); margin-bottom: 1.25rem; }
.article-body img { border-radius: var(--radius); margin: 1.5rem 0; }
.article-body blockquote {
    border-left: 4px solid var(--pako-teal);
    padding-left: 1.25rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-style: italic;
}
html[dir="rtl"] .article-body blockquote { border-left: none; border-right: 4px solid var(--pako-teal); padding-left: 0; padding-right: 1.25rem; }

.auth-shell {
    min-height: calc(100vh - 200px);
    display: grid;
    place-items: center;
    padding: 3rem 1.25rem;
}
.auth-card {
    width: 100%;
    max-width: 460px;
    background: var(--bg-elevated);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 1.6rem; text-align: center; margin-bottom: .5rem; }
.auth-card .auth-sub { text-align: center; color: var(--text-muted); margin-bottom: 2rem; font-size: .95rem; }

@media print {
    .site-header, .site-footer, .nav-actions, .filters { display: none !important; }
}
