/* File: public/assets/css/site.css | Updated: 2025-12-18 01:30:00 UTC */

/* =========================
   Design Tokens
   ========================= */

:root {
    --bg: #0b0e14;
    --panel: #0f1420;
    --panel2: rgba(255, 255, 255, 0.03);
    --text: #e7eaf0;
    --muted: #aab2c5;
    --line: rgba(255, 255, 255, 0.08);
    --link: #9bd1ff;
    --link2: #c7e5ff;
    --shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
    --radius: 14px;

    --input-bg: rgba(255, 255, 255, 0.03);
    --input-bg-focus: rgba(255, 255, 255, 0.06);
    --danger: #ff6b6b;
    --success: #58d68d;

    --focus-ring: 0 0 0 3px rgba(155, 209, 255, 0.18);
}

/* =========================
   Base / Reset
   ========================= */

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    direction: rtl;
    font-family:
        ui-sans-serif,
        system-ui,
        -apple-system,
        "Segoe UI",
        Roboto,
        Arial;
    background:
        radial-gradient(
            1200px 700px at 20% -10%,
            rgba(155, 209, 255, 0.12),
            transparent 60%
        ),
        radial-gradient(
            900px 600px at 100% 0%,
            rgba(255, 255, 255, 0.06),
            transparent 60%
        ),
        var(--bg);
    color: var(--text);
    line-height: 1.7;
}

a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    color: var(--link2);
}

img {
    max-width: 100%;
}

.container {
    width: min(1040px, calc(100% - 32px));
    margin: 0 auto;
}

main.container {
    padding: 18px 0 40px;
}

:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: 10px;
}

::selection {
    background: rgba(155, 209, 255, 0.22);
}

hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 18px 0;
}

/* =========================
   Header / Navigation
   ========================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(10px);
    background: rgba(11, 14, 20, 0.65);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 0;
}

.brand {
    font-size: 18px;
    letter-spacing: 0.2px;
    font-weight: 650;
    color: var(--text);
    white-space: nowrap;
}

.nav {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.nav a {
    color: var(--muted);
}

.nav a:hover {
    color: var(--text);
}

.nav-inline {
    display: inline;
    margin: 0;
}

.nav-link-button {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    padding: 0;
    font: inherit;
    line-height: inherit;
}

.nav-link-button:hover {
    color: var(--text);
}

.search {
    min-width: 220px;
    max-width: 340px;
    width: 100%;
}

.search input[type="search"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--input-bg);
    color: var(--text);
}

.search input[type="search"]::placeholder {
    color: rgba(170, 178, 197, 0.75);
}

.header-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.02);
}

.user-name {
    color: var(--text);
    font-size: 13px;
}

.logout {
    margin: 0;
}

/* =========================
   Footer
   ========================= */

.site-footer {
    margin-top: 52px;
    border-top: 1px solid var(--line);
    background: rgba(15, 20, 32, 0.35);
}

.footer-inner {
    padding: 18px 0;
    color: var(--muted);
    font-size: 13px;
}

/* =========================
   Page Head
   ========================= */

.page-head {
    padding: 28px 0 14px;
}

.page-title {
    margin: 0;
    font-size: 32px;
    line-height: 1.2;
}

.page-subtitle {
    margin: 8px 0 0;
    color: var(--muted);
}

/* =========================
   Buttons
   ========================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
    cursor: pointer;
    line-height: 1;
    font-size: 14px;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.04);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: rgba(155, 209, 255, 0.1);
    border-color: rgba(155, 209, 255, 0.25);
}

.btn-primary:hover {
    background: rgba(155, 209, 255, 0.14);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.02);
}

.btn-danger {
    background: rgba(255, 107, 107, 0.1);
    border-color: rgba(255, 107, 107, 0.25);
}

.btn-danger:hover {
    background: rgba(255, 107, 107, 0.14);
}

.btn-link {
    background: transparent;
    border-color: transparent;
    padding: 9px 10px;
    color: var(--muted);
}

.btn-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--line);
}

/* =========================
   Forms (Global)
   ========================= */

.field {
    margin-bottom: 12px;
}

.label {
    display: block;
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 13px;
}

.input,
.select,
.textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--input-bg);
    color: var(--text);
    transition:
        background 120ms ease,
        border-color 120ms ease,
        box-shadow 120ms ease,
        transform 120ms ease;
}

.input:focus,
.select:focus,
.textarea:focus {
    background: var(--input-bg-focus);
    border-color: rgba(155, 209, 255, 0.28);
}

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

.hint {
    margin-top: 6px;
    font-size: 12px;
    color: rgba(170, 178, 197, 0.85);
}

.actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 12px;
}

.check {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    color: rgba(231, 234, 240, 0.9);
}

.check input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

/* Make default form elements look good even without .input/.textarea */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="search"],
input[type="date"],
input[type="number"],
select,
textarea {
    font: inherit;
    color: var(--text);
    background: var(--input-bg);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
}

select {
    cursor: pointer;
}

textarea {
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: rgba(170, 178, 197, 0.75);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    background: var(--input-bg-focus);
    border-color: rgba(155, 209, 255, 0.28);
    box-shadow: var(--focus-ring);
}

/* Feedback blocks */
.form-errors {
    margin-bottom: 12px;
    border: 1px solid rgba(255, 107, 107, 0.35);
    background: rgba(255, 107, 107, 0.08);
    border-radius: var(--radius);
    padding: 12px;
}

.form-errors-list {
    margin: 0;
    padding: 0 18px 0 0;
}

.form-errors-item {
    color: rgba(255, 220, 220, 0.95);
    font-size: 13px;
}

.form-flash {
    margin-bottom: 12px;
    border: 1px solid rgba(88, 214, 141, 0.35);
    background: rgba(88, 214, 141, 0.08);
    border-radius: var(--radius);
    padding: 12px;
    color: rgba(210, 255, 230, 0.95);
    font-size: 13px;
}

/* =========================
   Auth / Profile Pages
   ========================= */

.auth-otp,
.profile-edit {
    padding: 16px 0 6px;
}

.auth-otp {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.otp-card,
.profile-card {
    padding: 16px;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.05),
        rgba(255, 255, 255, 0.02)
    );
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* center cards on auth/profile flows */
.auth-otp .otp-card,
.profile-edit .profile-card {
    max-width: 560px;
    margin: 0 auto;
}

.profile-form,
.otp-form {
    display: grid;
    gap: 12px;
}

.field-inline {
    display: flex;
    align-items: center;
}

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(231, 234, 240, 0.92);
}

.checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: rgba(155, 209, 255, 0.75);
}

.otp-help {
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.auth-otp .otp-help {
    max-width: 560px;
    margin: 0 auto;
}

.otp-help-title {
    margin: 0 0 10px;
    font-size: 16px;
}

.otp-help-list {
    margin: 0;
    padding: 0 18px 0 0;
    color: rgba(231, 234, 240, 0.92);
}

.otp-help-note {
    margin: 12px 0 0;
    color: rgba(170, 178, 197, 0.9);
    font-size: 12px;
}

.otp-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.otp-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.avatar-preview {
    margin-top: 10px;
}

.avatar-img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
}

/* =========================
   News List / Card
   ========================= */

.news-list {
    padding: 18px 0 6px;
    display: grid;
    gap: 14px;
}

.news-card {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 14px;
    padding: 14px;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.04),
        rgba(255, 255, 255, 0.02)
    );
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.thumb img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: calc(var(--radius) - 6px);
    border: 1px solid var(--line);
    display: block;
}

.news-card-body {
    min-width: 0;
}

.news-card-title {
    margin: 2px 0 6px;
    font-size: 18px;
    line-height: 1.35;
}

.news-card-title a {
    color: var(--text);
}

.news-card-title a:hover {
    color: var(--link2);
}

.meta {
    display: inline-block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.excerpt {
    margin: 0;
    color: #d5d9e5;
}

.read-more {
    margin-top: 10px;
}

.read-more a {
    display: inline-block;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
}

.read-more a:hover {
    background: rgba(255, 255, 255, 0.04);
}

/* =========================
   Pagination
   ========================= */

.pagination {
    padding: 18px 0 34px;
}

.pagination nav {
    display: flex;
    justify-content: center;
}

.pagination .text-sm {
    color: var(--muted);
}

.pagination a,
.pagination span {
    border: 1px solid var(--line);
    padding: 8px 10px;
    border-radius: 10px;
    margin: 0 4px;
}

.pagination a {
    background: rgba(255, 255, 255, 0.02);
}

.pagination a:hover {
    background: rgba(255, 255, 255, 0.04);
}

.pagination svg {
    width: 18px;
    height: 18px;
    vertical-align: middle;
}

/* Tailwind pagination compatibility helpers */
.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.inline-flex {
    display: inline-flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.flex-1 {
    flex: 1 1 0%;
}

.relative {
    position: relative;
}

.z-0 {
    z-index: 0;
}

@media (min-width: 640px) {
    .sm\:hidden {
        display: none !important;
    }

    .sm\:flex {
        display: flex !important;
    }

    .sm\:inline-flex {
        display: inline-flex !important;
    }

    .sm\:items-center {
        align-items: center !important;
    }

    .sm\:justify-between {
        justify-content: space-between !important;
    }

    .sm\:justify-center {
        justify-content: center !important;
    }

    .sm\:flex-1 {
        flex: 1 1 0% !important;
    }
}

.pagination nav > div {
    gap: 10px;
}

.pagination nav .leading-5,
.pagination nav .leading-6 {
    line-height: 1.4;
}

/* =========================
   Breadcrumbs
   ========================= */

.breadcrumbs {
    padding: 18px 0 6px;
    color: var(--muted);
    font-size: 13px;
}

.breadcrumbs .sep {
    margin: 0 8px;
    color: rgba(255, 255, 255, 0.22);
}

/* =========================
   Article
   ========================= */

.article {
    margin-top: 8px;
    padding: 18px;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.05),
        rgba(255, 255, 255, 0.02)
    );
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.article-title {
    margin: 0;
    font-size: 34px;
    line-height: 1.2;
}

.article-subtitle {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 16px;
}

.article-meta {
    margin-top: 10px;
    color: rgba(231, 234, 240, 0.75);
    font-size: 13px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.article-meta .dot {
    color: rgba(255, 255, 255, 0.22);
}

.article-figure {
    margin: 16px 0 0;
}

.article-figure img {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: calc(var(--radius) - 6px);
    border: 1px solid var(--line);
    display: block;
}

.article-body {
    margin-top: 16px;
    color: #e7eaf0;
}

.article-body p {
    margin: 0 0 14px;
}

.article-body a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-foot {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.tag-row {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    align-items: baseline;
    flex-wrap: wrap;
}

.tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    font-size: 12px;
    color: #d7dced;
    border: 1px solid var(--line);
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.02);
}

.share-row {
    margin-top: 14px;
}

.share {
    display: inline-block;
    padding: 9px 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(155, 209, 255, 0.08);
    color: var(--text);
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 900px) {
    .header-inner {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .search {
        order: 3;
        max-width: none;
        min-width: 100%;
    }

    .header-actions {
        margin-right: auto;
    }
}

@media (max-width: 760px) {
    .news-card {
        grid-template-columns: 1fr;
    }

    .thumb img {
        height: 200px;
    }

    .article-title {
        font-size: 28px;
    }

    .page-title {
        font-size: 28px;
    }
}

@media (min-width: 900px) {
    .auth-otp {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }

    .auth-otp .otp-card,
    .auth-otp .otp-help {
        max-width: none;
    }
}

/* File: public/assets/css/site.css | Updated: 2025-12-18 01:30:00 UTC */
