/* ============================================================
   InfoShalaa — AI Article / Category Page Styles
   Split from styles.css. Pure CSS. Light/Dark theme via [data-theme] on <html>.
   ============================================================ */

:root,
[data-theme="light"] {
    --bg: #ffffff;
    --bg-soft: #f8fafc;
    --bg-hero: linear-gradient(180deg, #eef4ff 0%, #e2ecff 55%, #dbe7ff 100%);
    --text: #0b1220;
    --text-muted: #64748b;
    --text-soft: #475569;
    --border: #e5eaf3;
    --border-strong: #d5deee;
    --card: #ffffff;
    --card-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px -12px rgba(15, 23, 42, 0.08);
    --card-shadow-hover: 0 4px 8px rgba(15, 23, 42, 0.06), 0 24px 40px -18px rgba(37, 99, 235, 0.22);
    --primary: #2563eb;
    --primary-600: #1d4ed8;
    --primary-700: #1e40af;
    --primary-soft: #eef4ff;
    --primary-soft-2: #dbeafe;
    --tag-bg: #eaf1ff;
    --tag-text: #1d4ed8;
    --newsletter-bg: linear-gradient(150deg, #16205a 0%, #1e3a8a 55%, #4c1d95 110%);
    --newsletter-text: #ffffff;
    --toggle-bg: #f1f5f9;
    --toggle-active: #ffffff;
    --shadow-ring: 0 0 0 1px rgba(37, 99, 235, 0.08);
}

[data-theme="dark"] {
    --bg: #070b17;
    --bg-soft: #0b1226;
    --bg-hero: linear-gradient(180deg, #0b1226 0%, #0d1633 55%, #0f1a3f 100%);
    --text: #eef2f7;
    --text-muted: #8b98b3;
    --text-soft: #b6c1d8;
    --border: #1a2340;
    --border-strong: #223055;
    --card: #0e1730;
    --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 30px -14px rgba(0, 0, 0, 0.6);
    --card-shadow-hover: 0 4px 10px rgba(0, 0, 0, 0.35), 0 28px 40px -18px rgba(59, 130, 246, 0.35);
    --primary: #3b82f6;
    --primary-600: #60a5fa;
    --primary-700: #93c5fd;
    --primary-soft: #10214a;
    --primary-soft-2: #172a5e;
    --tag-bg: #172a5e;
    --tag-text: #93c5fd;
    --newsletter-bg: linear-gradient(150deg, #0f1a3f 0%, #1e3a8a 55%, #3b1d7a 110%);
    --newsletter-text: #ffffff;
    --toggle-bg: #101a35;
    --toggle-active: #1c2a52;
    --shadow-ring: 0 0 0 1px rgba(96, 165, 250, 0.15);
}

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

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.25s ease, color 0.25s ease;
}

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

::selection {
    background: var(--primary);
    color: #fff;
}

h1,
h2,
h3,
h4 {
    font-family: "Sora", "Manrope", sans-serif;
    color: var(--text);
    letter-spacing: -0.01em;
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.text-primary {
    color: var(--primary);
}

/* ============ NAVBAR ============ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .navbar {
    background: rgba(7, 11, 23, 0.75);
}

.navbar__inner {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 76px;
}

.logo {
    font-family: "Sora", sans-serif;
    font-weight: 800;
    font-size: 22px;
    color: var(--text);
    letter-spacing: -0.02em;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-img {

    width: 60px;

    height: 60px;

    object-fit: contain;

}

.logo > span span {

    color: var(--primary);

}


/* Logo Text */

.logo > span {
    color: var(--text);
}

.logo > span span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 40px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-soft);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.18s ease, background-color 0.18s ease;
}
.nav-link:hover {
    color: var(--primary);
    background: var(--primary-soft);
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}
.nav-link--dropdown .chev {
    transition: transform 0.2s ease;
}
.nav-dropdown:hover .nav-link--dropdown,
.nav-dropdown.is-open .nav-link--dropdown {
    color: var(--primary);
    background: var(--primary-soft);
}
.nav-dropdown:hover .nav-link--dropdown .chev,
.nav-dropdown.is-open .nav-link--dropdown .chev {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    min-width: 280px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 20px 40px -12px rgba(15, 23, 42, 0.18);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, transform 0.2s ease, visibility 0.18s;
    z-index: 100;
}
[data-theme="dark"] .dropdown-menu {
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.6);
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.is-open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
/* invisible hover bridge to prevent flicker between trigger and menu */
.dropdown-menu::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text-soft);
    font-weight: 500;
    font-size: 14px;
    transition: background 0.15s ease, color 0.15s ease;
}
.dropdown-item:hover,
.dropdown-item.is-active {
    background: var(--primary-soft);
    color: var(--primary);
}
[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item.is-active {
    color: var(--primary-600);
}
.dropdown-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary);
}
[data-theme="dark"] .dropdown-icon {
    background: var(--primary-soft-2) !important;
    color: var(--primary-600) !important;
}
.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 4px;
}
.dropdown-view-all {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    border-radius: 10px;
    transition: background 0.15s ease;
}
.dropdown-view-all:hover {
    background: var(--primary-soft);
}

/* Search */
.search-wrap {
    position: relative;
    flex: 1;
    max-width: 340px;
    margin-left: auto;
}
.search-ico {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}
.search-input {
    width: 100%;
    height: 44px;
    padding: 0 14px 0 42px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.search-input:focus {
    border-color: var(--primary);
    background: var(--card);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}
.search-input::placeholder {
    color: var(--text-muted);
}

/* Theme toggle */
.theme-toggle {
    display: inline-flex;
    background: var(--toggle-bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px;
    gap: 2px;
}
.theme-btn {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}
.theme-btn.is-active {
    background: var(--toggle-active);
    color: var(--primary);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}
[data-theme="dark"] .theme-btn.is-active {
    color: var(--primary-600);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.01em;
    transition: transform 0.15s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn--primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 6px 16px -4px rgba(37, 99, 235, 0.45);
}
.btn--primary:hover {
    background: var(--primary-600);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px -4px rgba(37, 99, 235, 0.55);
}
.btn--primary:active {
    transform: translateY(0);
}

.mobile-menu-btn {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--text);
    background: var(--bg-soft);
    border: 1px solid var(--border);
}

/* ============ HERO ============ */
.hero {
    background: var(--bg-hero);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(600px 300px at 20% 30%, rgba(255, 255, 255, 0.5), transparent 70%),
        radial-gradient(500px 260px at 90% 80%, rgba(59, 130, 246, 0.14), transparent 70%);
    pointer-events: none;
}
[data-theme="dark"] .hero::before {
    background:
        radial-gradient(600px 300px at 20% 30%, rgba(59, 130, 246, 0.14), transparent 70%),
        radial-gradient(500px 260px at 90% 80%, rgba(139, 92, 246, 0.18), transparent 70%);
}

.hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
    padding: 72px 24px 88px;
    position: relative;
}

.hero__badge {
    width: 62px;
    height: 62px;
    border-radius: 16px;
    background: var(--card);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    box-shadow: var(--card-shadow);
    margin-bottom: 26px;
}

.hero__title {
    font-size: clamp(30px, 4.2vw, 52px);
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.hero__desc {
    font-size: 16px;
    color: var(--text-soft);
    max-width: 560px;
    margin: 0 0 34px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    max-width: 620px;
}
.stat {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.stat > div {
    min-width: 0;
}
.stat:hover {
    transform: translateY(-2px);
    border-color: var(--primary-soft-2);
    box-shadow: var(--card-shadow);
}
.stat__ico {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--primary-soft);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
[data-theme="dark"] .stat__ico {
    color: var(--primary-600);
}
.stat__num {
    font-family: "Sora", sans-serif;
    font-weight: 700;
    font-size: 17px;
    color: var(--text);
    line-height: 1.15;
    white-space: nowrap;
}
.stat__label {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.hero__visual {
    position: relative;
    justify-self: end;
    width: 100%;
    max-width: 560px;
    aspect-ratio: 1 / 1;
}
.hero__visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
    filter: drop-shadow(0 30px 50px rgba(37, 99, 235, 0.25));
}
.hero__glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(400px 300px at 60% 50%, rgba(59, 130, 246, 0.18), transparent 70%);
    z-index: -1;
}

/* ============ CONTENT LAYOUT ============ */
.content {
    background: var(--bg);
    padding: 56px 0 80px;
}
.content__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 48px;
    align-items: start;
}

/* Toolbar */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 30px;
}
.toolbar__count {
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 500;
}
.filter-pills {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}
.pill {
    padding: 9px 20px;
    border-radius: 999px;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text-soft);
    font-weight: 600;
    font-size: 13px;
    transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.15s;
}
.pill:hover {
    color: var(--primary);
    border-color: var(--primary-soft-2);
}
.pill.is-active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 6px 14px -4px rgba(37, 99, 235, 0.45);
}

/* Sort */
.sort-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    position: relative;
}
.sort-label {
    color: var(--text-muted);
}
.sort-select {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    user-select: none;
    outline: none;
    transition: border-color 0.18s;
}
.sort-select:hover,
.sort-select:focus,
.sort-select.is-open {
    border-color: var(--primary);
}
.sort-options {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 170px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 20px 40px -12px rgba(15, 23, 42, 0.18);
    list-style: none;
    padding: 6px;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
    z-index: 20;
}
[data-theme="dark"] .sort-options {
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.7);
}
.sort-select.is-open .sort-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.sort-options li {
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--text-soft);
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
}
.sort-options li:hover,
.sort-options li.is-active {
    background: var(--primary-soft);
    color: var(--primary);
}
[data-theme="dark"] .sort-options li:hover,
[data-theme="dark"] .sort-options li.is-active {
    color: var(--primary-600);
}

/* Articles grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

/* Article card */
.article {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    animation: cardIn 0.4s ease both;
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.article:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
    border-color: var(--primary-soft-2);
}
.article__thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg-soft);
}
.article__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.article:hover .article__thumb img {
    transform: scale(1.04);
}
.article__body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}
.article__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--tag-bg);
    color: var(--tag-text);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.bookmark-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: background 0.15s, color 0.15s;
}
.bookmark-btn:hover {
    background: var(--primary-soft);
    color: var(--primary);
}
.bookmark-btn.is-saved {
    color: var(--primary);
}
.article__title {
    font-family: "Sora", sans-serif;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 700;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 46px;
}
.article__title:hover {
    color: var(--primary);
}
.article__excerpt {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}
.article__meta {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
}
.article__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    background: var(--card);
    border: 1px dashed var(--border-strong);
    border-radius: 18px;
}
.empty-state h3 {
    margin: 14px 0 6px;
    font-size: 18px;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}
.page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text-soft);
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.page-btn:hover:not(:disabled):not(.is-active):not(.ellipsis) {
    color: var(--primary);
    border-color: var(--primary-soft-2);
    background: var(--primary-soft);
}
.page-btn.is-active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 6px 14px -4px rgba(37, 99, 235, 0.45);
}
.page-btn.ellipsis {
    background: transparent;
    border-color: transparent;
    cursor: default;
}
.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ============ SIDEBAR ============ */
.content__sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: sticky;
    top: 96px;
}
.side-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
}
.side-card__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.side-ico {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--primary-soft);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
[data-theme="dark"] .side-ico {
    color: var(--primary-600);
}
.side-card h3 {
    font-size: 15px;
    font-weight: 700;
}
.side-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
}
.side-card p {
    color: var(--text-soft);
    font-size: 13.5px;
    line-height: 1.6;
    margin: 0 0 12px;
}
.side-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-weight: 600;
    font-size: 13px;
    transition: gap 0.2s ease;
}
.side-link:hover {
    gap: 10px;
}

/* Popular list */
.popular-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.popular-item {
    display: flex;
    gap: 12px;
    align-items: center;
    cursor: pointer;
    transition: transform 0.15s ease;
}
.popular-item:hover {
    transform: translateX(2px);
}
.popular-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}
.popular-item__title {
    font-family: "Sora", sans-serif;
    font-weight: 600;
    font-size: 13.5px;
    color: var(--text);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}
.popular-item:hover .popular-item__title {
    color: var(--primary);
}
.popular-item__meta {
    font-size: 11.5px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Newsletter card */
.side-card--newsletter {
    background: var(--newsletter-bg);
    color: var(--newsletter-text);
    border: none;
    position: relative;
    overflow: hidden;
}
.side-card--newsletter::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(240px 160px at 100% 0%, rgba(255, 255, 255, 0.15), transparent 70%),
        radial-gradient(200px 200px at 0% 100%, rgba(139, 92, 246, 0.28), transparent 70%);
    pointer-events: none;
}
.side-card--newsletter > * {
    position: relative;
}
.side-card--newsletter h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 8px;
}
.side-card--newsletter p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 13.5px;
}
.newsletter {
    display: flex;
    gap: 6px;
    background: rgba(255, 255, 255, 0.12);
    padding: 4px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
}
.newsletter__input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    padding: 10px 14px;
    color: #fff;
    font: inherit;
    font-size: 13px;
    outline: none;
}
.newsletter__input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}
.newsletter__btn {
    background: #fff;
    color: #1e3a8a;
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    transition: transform 0.15s, box-shadow 0.15s;
}
.newsletter__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px -4px rgba(0, 0, 0, 0.25);
}
.newsletter__msg {
    margin-top: 12px;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 8px 12px;
}

/* ============ FOOTER (basic) ============ */
.footer {
    border-top: 1px solid var(--border);
    background: var(--bg-soft);
    padding: 32px 0;
}
.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.footer p {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0;
}

/* ============ RESPONSIVE (category) ============ */
@media (max-width: 1100px) {
    .content__grid {
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 32px;
    }
    .articles-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .nav-links,
    .search-wrap,
    .theme-toggle,
    .btn--primary {
        display: none;
    }
    .mobile-menu-btn {
        display: inline-flex;
        margin-left: auto;
    }
    .hero__grid {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 48px 24px 64px;
    }
    .hero__visual {
        order: -1;
        max-width: 100%;
        aspect-ratio: 16 / 12;
    }
    .content__grid {
        grid-template-columns: 1fr;
    }
    .content__sidebar {
        position: static;
    }
    .toolbar {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }
    .stats {
        grid-template-columns: 1fr 1fr;
    }
    .navbar__inner {
        height: 66px;
    }
    .hero__title {
        font-size: 34px;
    }
    .container {
        padding: 0 18px;
    }
    .toolbar {
        gap: 12px;
    }
    .filter-pills {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }
    .pill {
        flex-shrink: 0;
    }
}


/* ================================================================
   UPDATED NAVBAR (Account dropdown, About/Contact, Mobile nav)
   Shared with Home so nav works identically.
   ================================================================ */

/* --- Navbar layout overrides --- */
.navbar__inner {
    gap: 14px;
}
.nav-links {
    margin-left: 32px;
    flex-wrap: wrap;
}
.nav-link.is-active {
    color: var(--primary);
    background: var(--primary-soft);
    position: relative;
}
.nav-link.is-active::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: -2px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.navbar__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}
.navbar__actions .search-wrap {
    max-width: 260px;
    margin-left: 0;
    flex: 0 1 260px;
}

/* Single-button theme toggle */
.icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--text-soft);
    transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.15s;
    flex-shrink: 0;
}
.icon-btn:hover {
    color: var(--primary);
    border-color: var(--primary-soft-2);
    background: var(--primary-soft);
}
.theme-single-btn .ico-moon { display: none; }
.theme-single-btn .ico-sun { display: inline-block; }
[data-theme="dark"] .theme-single-btn .ico-moon { display: inline-block; }
[data-theme="dark"] .theme-single-btn .ico-sun { display: none; }

/* Account dropdown */
.account-dropdown {
    position: relative;
    flex-shrink: 0;
}
.account-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 14px 0 8px;
    border-radius: 999px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 600;
    font-size: 13.5px;
    transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.account-btn:hover,
.account-dropdown.is-open .account-btn {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.account-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.18s;
}
.account-btn:hover .account-avatar,
.account-dropdown.is-open .account-avatar {
    background: rgba(255, 255, 255, 0.22);
}
.account-btn .chev {
    transition: transform 0.2s ease;
}
.account-dropdown.is-open .account-btn .chev {
    transform: rotate(180deg);
}
.account-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 260px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 20px 40px -12px rgba(15, 23, 42, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s, transform 0.2s, visibility 0.18s;
    z-index: 100;
}
[data-theme="dark"] .account-menu {
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.6);
}
.account-dropdown.is-open .account-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.account-menu__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--primary-soft);
    border-radius: 12px;
    margin-bottom: 6px;
}
.account-menu__avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.account-menu__name {
    font-family: "Sora", sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
    line-height: 1.2;
}
.account-menu__sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}
.account-menu__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text-soft);
    font-weight: 500;
    font-size: 13.5px;
    transition: background 0.15s, color 0.15s;
}
.account-menu__item:hover {
    background: var(--primary-soft);
    color: var(--primary);
}
.account-menu__divider {
    height: 1px;
    background: var(--border);
    margin: 6px 8px;
}

/* Mobile nav panel */
.mobile-nav {
    display: none;
    flex-direction: column;
    padding: 8px 24px 20px;
    background: var(--card);
    border-top: 1px solid var(--border);
    gap: 2px;
}
.mobile-nav__link {
    padding: 12px 14px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-soft);
    transition: background 0.15s, color 0.15s;
}
.mobile-nav__link:hover {
    background: var(--primary-soft);
    color: var(--primary);
}
.mobile-nav.is-open {
    display: flex;
    animation: slideDown 0.2s ease;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Site Footer (5 cols) --- */
.site-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-soft);
    padding: 60px 0 24px;
    margin-top: 40px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border);
}
.footer__brand .logo {
    display: inline-block;
    margin-bottom: 14px;
}
.footer__tagline {
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 20px;
    max-width: 260px;
}
.socials {
    display: flex;
    gap: 8px;
}
.social-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.18s, border-color 0.18s, background 0.18s, transform 0.15s;
}
.social-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-soft);
    transform: translateY(-2px);
}
.footer-col h4 {
    font-family: "Sora", sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
}
.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer-col ul a {
    color: var(--text-soft);
    font-size: 14px;
    transition: color 0.15s, padding-left 0.2s;
}
.footer-col ul a:hover {
    color: var(--primary);
    padding-left: 4px;
}
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding-top: 20px;
}
.footer-bottom p {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0;
}
.heart {
    color: #ef4444;
    display: inline-block;
    animation: heartBeat 1.4s ease-in-out infinite;
}
@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* ================================================================
   RESPONSIVE OVERRIDES (shared nav + footer)
   ================================================================ */

@media (max-width: 1200px) {
    .navbar__actions .search-wrap {
        max-width: 200px;
        flex-basis: 200px;
    }
    .nav-links {
        margin-left: 20px;
        gap: 2px;
    }
    .nav-link {
        padding: 8px 12px;
    }
}

@media (max-width: 1000px) {
    .footer-grid {
        grid-template-columns: 1.4fr 1fr 1fr;
        gap: 30px 24px;
    }
    .footer__brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .nav-links {
        display: none;
    }
    .navbar__actions .search-wrap {
        display: none;
    }
    .account-btn__label {
        display: none;
    }
    .account-btn {
        padding: 0 10px 0 8px;
    }
    .account-btn .chev {
        display: none;
    }
    .btn--primary {
        display: none;
    }
    .mobile-menu-btn {
        display: inline-flex;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .footer__brand {
        grid-column: auto;
    }
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .navbar__inner {
        gap: 10px;
    }
}
