/* =====================
   RESET & BASE
===================== */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: #f8fafc;
    color: #0d1b2e;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
}

:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
}

/* =====================
   CONTAINER
===================== */

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    color: #253c6e;
}

/* =====================
   HEADER & NAV
===================== */

.header {
    background: #fff;
    box-shadow: 0 2px 15px rgba(0,0,0,.08);
    padding: 15px 40px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    width: 120px;
    height: auto;
}

.logo span {
    font-size: 28px;
    font-weight: 700;
    color: #111;
}

.main-nav {
    max-width: 1400px;
    margin: 0 auto;
    border-top: 1px solid #eef1f6;
    margin-top: 12px;
    padding-top: 12px;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 35px;
    list-style: none;
}

.nav-links a {
    color: #222;
    font-weight: 600;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #2563eb;
}

.left-section {
    display: flex;
    align-items: center;
}

.right-section {
    display: flex;
    align-items: center;
    gap: 18px;
}

.search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.search-btn img {
    display: block;
}

.login-btn,
.signup-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: 0.2s;
}

.login-btn {
    color: #111;
}

.login-btn:hover {
    color: #2563eb;
}

.signup-btn {
    background: #253c6e;
    color: #fff;
}

.signup-btn:hover {
    background: #1a2d54;
}

/* =====================
   HERO
===================== */

.hero {
    max-width: 1100px;
    margin: 60px auto;
    padding: 100px 60px;
    text-align: center;
    background: linear-gradient(135deg, #ffffff, #f8f9fc);
    border-radius: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08), 0 5px 20px rgba(0,0,0,0.04);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(59,130,246,0.06);
    border-radius: 50%;
    top: -150px;
    left: -100px;
}

.hero::after {
    content: "";
    position: absolute;
    width: 250px;
    height: 250px;
    background: rgba(99,102,241,0.05);
    border-radius: 50%;
    bottom: -120px;
    right: -80px;
}

.hero h1 {
    font-size: 68px;
    font-weight: 800;
    color: #23365f;
    margin-bottom: 25px;
    line-height: 1.1;
    position: relative;
    z-index: 2;
}

.hero p {
    font-size: 22px;
    color: #6b7280;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    position: relative;
    z-index: 2;
}

.hero-btn {
    display: inline-block;
    margin-top: 35px;
    padding: 16px 35px;
    background: #253c6e;
    color: #fff;
    border-radius: 50px;
    font-weight: 600;
    transition: 0.3s;
    position: relative;
    z-index: 2;
}

.hero-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    background: #1a2d54;
}

/* =====================
   ADS
===================== */

.ad-space,
.ad-box {
    background: #e5e7eb;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    margin: 30px auto;
    font-weight: 600;
    color: #4b5563;
    max-width: 1200px;
}

/* =====================
   ARTICLES
===================== */

.top-articles,
.latest-articles {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
}

.top-articles h2,
.latest-articles h2 {
    font-size: 42px;
    font-weight: 800;
    color: #111827;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.top-articles h2::after,
.latest-articles h2::after {
    content: "";
    width: 80px;
    height: 4px;
    background: #253c6e;
    display: block;
    margin: 14px auto 0;
    border-radius: 20px;
}

.articles-grid,
.latest-grid,
.latest-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
}

.article-card,
.latest-post {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid #ececec;
    transition: all 0.3s ease;
}

.article-card:hover,
.latest-post:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.article-card img,
.latest-post img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

/* Top Article cards (.article-card) have no inner wrapper div,
   so h3/p/a are spaced with margins instead of a padded container */
.article-card h3 {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 20px 25px 10px;
}

.article-card p {
    font-size: 16px;
    color: #6b7280;
    line-height: 1.7;
    margin: 0 25px 18px;
}

.article-card a {
    display: inline-block;
    background: #253c6e;
    color: #fff;
    padding: 11px 22px;
    border-radius: 10px;
    font-weight: 600;
    transition: 0.3s;
    margin: 0 25px 22px;
}

.article-card a:hover {
    background: #1a2d54;
    transform: translateY(-2px);
}

/* Latest Post cards (.latest-post) DO have a .latest-post-content wrapper */
.latest-post-content {
    padding: 25px;
}

.latest-post h3 {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 10px;
}

.latest-post p {
    font-size: 16px;
    color: #6b7280;
    line-height: 1.7;
    margin-bottom: 18px;
}

.latest-post a {
    display: inline-block;
    background: #253c6e;
    color: #fff;
    padding: 11px 22px;
    border-radius: 10px;
    font-weight: 600;
    transition: 0.3s;
}

.latest-post a:hover {
    background: #1a2d54;
    transform: translateY(-2px);
}

/* =====================
   CATEGORIES PAGE
===================== */

.categories {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
}

.category-card {
    background: #ffffff;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid #ececec;
    text-align: center;
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.category-icon {
    font-size: 46px;
    margin-bottom: 15px;
}

.category-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 10px;
}

.category-desc {
    font-size: 15px;
    color: #6b7280;
    line-height: 1.7;
    margin-bottom: 22px;
}

.category-btn {
    display: inline-block;
    padding: 11px 24px;
    background: #253c6e;
    color: #fff;
    border-radius: 10px;
    font-weight: 600;
    transition: 0.3s;
}

.category-btn:hover {
    background: #1a2d54;
    transform: translateY(-2px);
}

/* =====================
   SEARCH PAGE
===================== */

.search-box {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
    position: relative;
    z-index: 2;
}

.search-box input {
    flex: 1;
    padding: 15px 18px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 16px;
    color: #0d1b2e;
}

.search-box input:focus {
    outline: none;
    border-color: #253c6e;
    box-shadow: 0 0 0 3px rgba(37,60,110,0.12);
}

.search-box button {
    padding: 15px 30px;
    background: #253c6e;
    border: none;
    color: #fff;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    transition: 0.3s;
}

.search-box button:hover {
    background: #1a2d54;
    transform: translateY(-2px);
}

.results {
    max-width: 1300px;
    margin: 60px auto;
    padding: 0 20px;
}

.results h2 {
    font-size: 34px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 30px;
    text-align: center;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
}

.article-content {
    padding: 22px 25px;
}

.article-category {
    color: #253c6e;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.article-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 10px;
}

.article-desc {
    font-size: 16px;
    color: #6b7280;
    line-height: 1.7;
    margin-bottom: 18px;
}

.read-btn {
    display: inline-block;
    padding: 11px 22px;
    background: #253c6e;
    color: #fff;
    border-radius: 10px;
    font-weight: 600;
    transition: 0.3s;
}

.read-btn:hover {
    background: #1a2d54;
    transform: translateY(-2px);
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    font-size: 20px;
    color: #6b7280;
}

/* =====================
   ABOUT PAGE
===================== */

.about-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 20px;
}

.about-section {
    background: #fff;
    padding: 35px;
    border-radius: 20px;
    margin-bottom: 28px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid #ececec;
}

.about-section h2 {
    margin-bottom: 20px;
    font-size: 30px;
    font-weight: 800;
    color: #111827;
}

.about-section p {
    margin-bottom: 15px;
    color: #475569;
    line-height: 1.8;
}

.about-section ul {
    padding-left: 25px;
    margin-bottom: 10px;
}

.about-section li {
    margin-bottom: 10px;
    color: #475569;
}

.about-contact-box {
    background: linear-gradient(135deg, #253c6e, #1a2d54);
    color: #fff;
    text-align: center;
    padding: 45px 30px;
    border-radius: 20px;
    margin-top: 20px;
}

.about-contact-box h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 12px;
}

.about-contact-box p {
    color: rgba(255,255,255,0.85);
    max-width: 500px;
    margin: 0 auto;
}

.about-contact-box a {
    display: inline-block;
    margin-top: 20px;
    padding: 13px 28px;
    background: #fff;
    color: #253c6e;
    font-weight: 700;
    border-radius: 10px;
    transition: 0.3s;
}

.about-contact-box a:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* =====================
   CONTACT PAGE
===================== */

.contact-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-card {
    background: #fff;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid #ececec;
}

.contact-card h2 {
    margin-bottom: 20px;
    font-size: 26px;
    font-weight: 800;
    color: #111827;
}

.contact-card p {
    margin-bottom: 15px;
    line-height: 1.7;
    color: #475569;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 15px;
    color: #0d1b2e;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #253c6e;
    box-shadow: 0 0 0 3px rgba(37,60,110,0.12);
}

.form-group textarea {
    resize: vertical;
}

.faq {
    margin-top: 50px;
}

.faq h2 {
    font-size: 30px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 20px;
}

.faq-item {
    background: #fff;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 1px solid #ececec;
}

.faq-item h3 {
    margin-bottom: 10px;
    font-size: 18px;
    color: #111827;
}

.faq-item p {
    color: #6b7280;
    line-height: 1.7;
}

/* =====================
   ARTICLE PAGE (single article view)
   Scoped under .article-container so these never collide
   with the similarly-named classes used on the search results page
===================== */

.article-container {
    max-width: 1000px;
    margin: 50px auto;
    padding: 0 20px;
}

.article-container .article-category {
    display: inline-block;
    background: #253c6e;
    color: #fff;
    padding: 6px 15px;
    border-radius: 30px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 600;
}

.article-container .article-title {
    font-size: 48px;
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: 800;
    color: #111827;
}

.article-container .article-meta {
    color: #64748b;
    margin-bottom: 30px;
}

.article-container .article-image {
    width: 100%;
    border-radius: 15px;
    margin-bottom: 30px;
    max-height: 500px;
    object-fit: cover;
}

.article-container .article-content {
    background: #fff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    color: #1e293b;
}

.article-container .article-content p {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.8;
    margin-bottom: 14px;
}

.article-container .article-content p:first-of-type {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

.article-container .article-content p:last-child {
    margin-bottom: 0;
}

.article-container .article-content .ad-box {
    margin: 14px 0;
    padding: 18px;
}

.article-subheading {
    font-size: 26px;
    font-weight: 800;
    color: #111827;
    margin: 30px 0 14px;
    padding-bottom: 8px;
    border-bottom: 3px solid #253c6e;
}

.article-content .article-subheading:first-child {
    margin-top: 0;
}

.related-posts {
    margin-top: 60px;
}

.related-posts h2 {
    margin-bottom: 25px;
    font-size: 30px;
    font-weight: 800;
    color: #111827;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.related-card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.related-card h3 {
    font-size: 18px;
    color: #111827;
    margin-bottom: 8px;
}

.related-card a {
    text-decoration: none;
    color: #253c6e;
    font-weight: 700;
}

.related-card a:hover {
    color: #1a2d54;
    text-decoration: underline;
}

/* =====================
   CATEGORY PAGE (browse by category)
===================== */

.category-banner {
    background: #fff;
    padding: 60px 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.category-banner h1 {
    font-size: 40px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 10px;
}

.category-banner p {
    color: #6b7280;
    font-size: 17px;
}

.posts-section {
    padding: 50px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
}

.post-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid #ececec;
    transition: 0.3s;
}

.post-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.post-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.post-content {
    padding: 22px 25px;
}

.post-category {
    color: #253c6e;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.post-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 10px;
}

.post-desc {
    color: #6b7280;
    margin-bottom: 18px;
    line-height: 1.7;
}

.read-more {
    display: inline-block;
    padding: 11px 22px;
    background: #253c6e;
    color: #fff;
    border-radius: 10px;
    font-weight: 600;
    transition: 0.3s;
}

.read-more:hover {
    background: #1a2d54;
    transform: translateY(-2px);
}

.empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    font-size: 20px;
    color: #6b7280;
}

/* =====================
   NEWSLETTER
===================== */

.newsletter {
    background: #fff;
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    text-align: center;
    margin: 60px auto;
    max-width: 800px;
}

.newsletter h2 {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
}

.newsletter p {
    color: #6b7280;
    margin-bottom: 25px;
}

.newsletter input {
    width: 65%;
    padding: 14px 18px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 16px;
}

.newsletter button {
    padding: 14px 24px;
    margin-left: 10px;
    background: #253c6e;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.newsletter button:hover {
    background: #1a2d54;
}

/* =====================
   FORMS (shared)
===================== */

input,
textarea,
select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s;
    background: #fff;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #253c6e;
    box-shadow: 0 0 0 3px rgba(37,60,110,0.1);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

/* =====================
   CONTACT
===================== */

.contact-section {
    background: #fff;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    margin: 60px auto;
    max-width: 800px;
}

.contact-section h2 {
    font-size: 36px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 8px;
}

.contact-section p {
    color: #6b7280;
    margin-bottom: 30px;
}

.contact-section form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.submit-btn,
#contact-form button[type="submit"],
.contact-section button[type="submit"] {
    padding: 14px;
    background: #253c6e;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.submit-btn:hover,
#contact-form button[type="submit"]:hover,
.contact-section button[type="submit"]:hover {
    background: #1a2d54;
    transform: translateY(-2px);
}

/* =====================
   AUTH PAGES (login & signup)
===================== */

.auth-wrapper {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-box {
    width: 100%;
    max-width: 480px;
    background: #fff;
    padding: 50px 45px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
}

.auth-box h1 {
    font-size: 36px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 8px;
}

.auth-box .auth-subtitle {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 32px;
}

.auth-box form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-box label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.auth-btn {
    width: 100%;
    padding: 15px;
    background: #253c6e;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    transition: 0.2s;
}

.auth-btn:hover {
    background: #1a2d54;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37,60,110,0.3);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: #9ca3af;
    font-size: 14px;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 15px;
    color: #6b7280;
}

.auth-footer a {
    color: #253c6e;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.forgot-link {
    text-align: right;
    font-size: 14px;
    margin-top: -8px;
}

.forgot-link a {
    color: #253c6e;
    font-weight: 600;
}

.google-btn {
    width: 100%;
    padding: 13px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: 0.2s;
}

.google-btn:hover {
    background: #f3f4f6;
    border-color: #c7cdd6;
}

.back-home {
    display: block;
    text-align: center;
    margin-top: 24px;
    color: #6b7280;
    font-size: 14px;
    transition: 0.2s;
}

.back-home:hover {
    color: #253c6e;
}

/* =====================
   404 / ERROR PAGE
   (also aliased for 500.html's class names below)
===================== */

.error-wrapper,
.error-page {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.error-box,
.error-container {
    text-align: center;
    background: #fff;
    padding: 60px 40px;
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
}

.error-code {
    font-size: 120px;
    font-weight: 900;
    color: #253c6e;
    line-height: 1;
    margin-bottom: 10px;
}

.error-title,
.error-container h1 {
    font-size: 36px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 15px;
}

.error-description,
.error-container p {
    font-size: 18px;
    color: #6b7280;
    line-height: 1.7;
    margin-bottom: 30px;
}

.error-buttons,
.error-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.error-btn,
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 14px 28px;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    transition: 0.3s;
}

.error-btn-home,
.btn-primary {
    background: #253c6e;
    color: #fff;
}

.error-btn-home:hover,
.btn-primary:hover {
    background: #1a2d54;
    transform: translateY(-2px);
}

.error-btn-browse,
.btn-secondary {
    background: #f3f4f6;
    color: #111827;
}

.error-btn-browse:hover,
.btn-secondary:hover {
    background: #e5e7eb;
}

.error-box .search-box {
    margin-top: 35px;
}

/* =====================
   STATIC PAGES
   (privacy, terms, disclaimer)
===================== */

.page-container {
    max-width: 900px;
    margin: 60px auto;
    padding: 55px 60px;
    background: #fff;
    border-radius: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
    transition: transform 0.3s, box-shadow 0.3s;
}

/* Legacy class aliases */
.policy-container,
.privacy-policy,
.policy-content,
.terms-page,
.terms-container,
.disclaimer-page,
.cookie-policy {
    max-width: 900px;
    margin: 60px auto;
    padding: 55px 60px;
    background: #fff;
    border-radius: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
    transition: transform 0.3s, box-shadow 0.3s;
}

.page-container:hover,
.policy-container:hover,
.privacy-policy:hover,
.terms-page:hover,
.terms-container:hover,
.disclaimer-page:hover,
.cookie-policy:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 55px rgba(0,0,0,0.12);
}

/* Page H1 */
.page-container h1,
.policy-container h1,
.privacy-policy h1,
.terms-page h1,
.terms-container h1,
.disclaimer-page h1,
.cookie-policy h1 {
    font-size: 50px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 4px solid #253c6e;
}

/* Page H2 */
.page-container h2,
.policy-container h2,
.privacy-policy h2,
.terms-page h2,
.terms-container h2,
.disclaimer-page h2,
.cookie-policy h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-top: 40px;
    margin-bottom: 14px;
    padding-left: 14px;
    border-left: 4px solid #253c6e;
}

/* Page paragraphs */
.page-container p,
.policy-container p,
.privacy-policy p,
.terms-page p,
.terms-container p,
.disclaimer-page p,
.cookie-policy p {
    font-size: 17px;
    color: #475569;
    line-height: 1.9;
    margin-bottom: 18px;
}

/* Page lists */
.page-container ul,
.policy-container ul,
.privacy-policy ul,
.terms-page ul,
.terms-container ul,
.disclaimer-page ul,
.cookie-policy ul {
    padding-left: 24px;
    margin-bottom: 20px;
}

.page-container li,
.policy-container li,
.privacy-policy li,
.terms-page li,
.terms-container li,
.disclaimer-page li,
.cookie-policy li {
    font-size: 17px;
    color: #475569;
    margin-bottom: 10px;
}

.page-container p:last-of-type.last-updated,
.policy-container p:last-of-type.last-updated,
.privacy-policy p:last-of-type.last-updated,
.terms-page p:last-of-type.last-updated,
.terms-container p:last-of-type.last-updated,
.disclaimer-page p:last-of-type.last-updated,
.cookie-policy p:last-of-type.last-updated {
    color: #9ca3af;
    font-size: 15px;
    margin-top: 30px;
}

/* Info box */
.page-box,
.policy-box,
.terms-box,
.disclaimer-box {
    background: #f0f4ff;
    border-left: 5px solid #253c6e;
    padding: 22px 25px;
    border-radius: 14px;
    margin: 24px 0;
}

/* Page links */
.page-container a,
.policy-container a,
.privacy-policy a,
.terms-page a,
.terms-container a,
.disclaimer-page a,
.cookie-policy a {
    color: #2563eb;
    font-weight: 600;
}

.page-container a:hover,
.policy-container a:hover,
.privacy-policy a:hover,
.terms-page a:hover,
.terms-container a:hover,
.disclaimer-page a:hover,
.cookie-policy a:hover {
    color: #1a2d54;
    text-decoration: underline;
}

/* =====================
   TABLES
===================== */

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

th, td {
    padding: 15px 18px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

th {
    background: #f3f4f6;
    font-weight: 700;
    color: #111827;
}

tr:last-child td {
    border-bottom: none;
}

/* =====================
   FOOTER
===================== */

footer {
    background: linear-gradient(135deg, #111827, #1e293b);
    color: #fff;
    text-align: center;
    padding: 55px 20px;
    margin-top: 80px;
    border-top: 4px solid #253c6e;
}

footer img {
    width: 80px;
    margin-bottom: 15px;
}

footer h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

footer p {
    color: #cbd5e1;
    font-size: 15px;
    line-height: 1.8;
}

footer a {
    color: #e2e8f0;
    margin: 0 12px;
    font-size: 15px;
    transition: color 0.3s;
}

footer a:hover {
    color: #93c5fd;
}

.footer-links {
    margin: 25px 0;
}

footer .copyright {
    margin-top: 25px;
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 20px;
    color: #94a3b8;
    font-size: 14px;
}

/* =====================
   RESPONSIVE
===================== */

@media (max-width: 768px) {

    .header {
        padding: 15px 20px;
    }

    .nav-links {
        display: none;
    }

    .hero {
        padding: 60px 25px;
        margin: 30px 15px;
        border-radius: 25px;
    }

    .hero h1 {
        font-size: 38px;
    }

    .hero p {
        font-size: 18px;
    }

    .newsletter input {
        width: 100%;
        margin-bottom: 12px;
    }

    .newsletter button {
        margin-left: 0;
        width: 100%;
    }

    .auth-box {
        padding: 35px 25px;
    }

    .page-container,
    .policy-container,
    .privacy-policy,
    .terms-page,
    .terms-container,
    .disclaimer-page,
    .cookie-policy {
        margin: 20px 15px;
        padding: 30px 25px;
    }

    .page-container h1,
    .policy-container h1,
    .privacy-policy h1,
    .terms-page h1,
    .terms-container h1,
    .disclaimer-page h1,
    .cookie-policy h1 {
        font-size: 34px;
    }

    .page-container h2,
    .policy-container h2,
    .privacy-policy h2,
    .terms-page h2,
    .terms-container h2,
    .disclaimer-page h2,
    .cookie-policy h2 {
        font-size: 22px;
    }

    .contact-section {
        padding: 30px 20px;
    }

    .top-articles h2,
    .latest-articles h2 {
        font-size: 30px;
    }

    .article-container .article-title {
        font-size: 32px;
    }

    .article-container .article-content {
        padding: 25px;
    }

    .categories {
        padding: 0 15px;
        margin: 40px auto;
    }

    .category-card {
        padding: 28px 20px;
    }

    .search-box {
        flex-direction: column;
    }

    .search-box button {
        width: 100%;
    }

    .results h2 {
        font-size: 26px;
    }

    .about-container {
        padding: 0 15px;
    }

    .about-section {
        padding: 25px 20px;
    }

    .about-section h2 {
        font-size: 24px;
    }

    .about-contact-box {
        padding: 35px 20px;
    }

    .contact-main {
        padding: 0 15px;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .contact-card {
        padding: 25px 20px;
    }

    .error-box,
    .error-container {
        padding: 40px 24px;
    }

    .error-code {
        font-size: 70px;
    }

    .error-title,
    .error-container h1 {
        font-size: 26px;
    }

    .error-description,
    .error-container p {
        font-size: 16px;
    }

    .category-banner {
        padding: 40px 20px;
    }

    .category-banner h1 {
        font-size: 28px;
    }

    .posts-section {
        padding: 30px 15px;
    }
}/* ============================================================
   MOBILE PATCH — paste this at the very bottom of style.css
   Matched to Inkora Media's actual HTML classes:
   .left-section / .right-section / .main-nav / .nav-links
   .top-ad / .small-ad / .large-ad / .mid-ad / .ad-box
   .footer / .footer-brand / .footer-links / .copyright
============================================================ */

/* ── HAMBURGER BUTTON (hidden on desktop) ─────────────────── */

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    flex-shrink: 0;
}

.hamburger span {
    display: block;
    height: 2.5px;
    background: #1a2f5e;
    border-radius: 10px;
    transition: transform 0.3s, opacity 0.3s, width 0.3s;
    width: 100%;
}

.hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ── MOBILE NAV DRAWER ────────────────────────────────────── */

.mobile-nav {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
}

.mobile-nav.open {
    display: block;
}

.mobile-nav-overlay {
    position: absolute;
    inset: 0;
    background: rgba(13, 27, 46, 0.45);
    backdrop-filter: blur(3px);
}

.mobile-nav-drawer {
    position: absolute;
    top: 0;
    right: 0;
    width: min(300px, 85vw);
    height: 100%;
    background: #fff;
    box-shadow: -8px 0 40px rgba(0,0,0,0.15);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav.open .mobile-nav-drawer {
    transform: translateX(0);
}

.mobile-nav-close {
    align-self: flex-end;
    margin-right: 18px;
    margin-bottom: 8px;
    background: #f4f7ff;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 17px;
    color: #1a2f5e;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    padding: 0 14px;
    gap: 4px;
}

.mobile-nav-links a {
    display: block;
    padding: 13px 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #0d1b2e;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.mobile-nav-links a:hover {
    background: #eff6ff;
    color: #1a2f5e;
}

.mobile-nav-links .divider {
    height: 1px;
    background: #e8edf8;
    margin: 8px 0;
}

.mobile-nav-auth {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid #e8edf8;
    margin-top: 10px;
}

.mobile-nav-auth a {
    display: block;
    text-align: center;
    padding: 12px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.mobile-nav-auth .login-btn {
    border: 1.5px solid #e2e8f0;
    color: #1a2f5e;
    background: #f4f7ff;
}

.mobile-nav-auth .signup-btn {
    background: #1a2f5e;
    color: #fff;
}

/* ═══════════════════════════════════════════════════════════
   BREAKPOINT: tablet & mobile (≤ 900px)
═══════════════════════════════════════════════════════════ */

@media (max-width: 900px) {

    /* ── Header / nav ── */
    .header { padding: 10px 16px; }

    .nav-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .left-section .logo img { width: 90px; }

    /* hide desktop horizontal menu, show hamburger instead */
    .main-nav { display: none; }
    .hamburger { display: flex; }

    /* hide text login/signup links in the top row, hamburger replaces them */
    .right-section .login-btn,
    .right-section .signup-btn {
        display: none;
    }

    .right-section {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .right-section .search-btn img {
        width: 19px;
    }

    /* ── Ad slots ── */
    .top-ad .ad-box,
    .small-ad .ad-box,
    .large-ad .ad-box,
    .mid-ad .ad-box {
        padding: 16px 12px;
        margin: 10px 12px;
        font-size: 12px;
        border-radius: 10px;
    }

    /* ── Hero ── */
    .hero {
        padding: 45px 22px;
        text-align: center;
    }

    .hero h1 {
        font-size: 30px;
        line-height: 1.2;
    }

    .hero p {
        font-size: 15px;
        margin-top: 12px;
    }

    /* ── Top articles ── */
    .top-articles,
    .latest-articles {
        padding: 0 14px;
        margin: 30px auto;
    }

    .top-articles h2,
    .latest-articles h2 {
        font-size: 24px;
        text-align: center;
        margin-bottom: 20px;
    }

    .articles-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .article-card {
        border-radius: 14px;
        overflow: hidden;
    }

    .article-card img {
        width: 100%;
        height: 180px;
        object-fit: cover;
    }

    .article-card h3 {
        font-size: 18px;
        margin: 12px 14px 6px;
    }

    .article-card p {
        font-size: 14px;
        margin: 0 14px 14px;
    }

    .article-card a {
        display: inline-block;
        margin: 0 14px 16px;
    }

    /* ── Latest posts ── */
    #latest-posts,
    .latest-articles {
        display: block;
    }

    .latest-post {
        display: flex;
        flex-direction: column;
        border-radius: 14px;
        overflow: hidden;
        margin-bottom: 18px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    }

    .latest-post img {
        width: 100%;
        height: 180px;
        object-fit: cover;
    }

    .latest-post-content {
        padding: 16px;
    }

    .latest-post-content h3 {
        font-size: 18px;
        margin-bottom: 6px;
    }

    .latest-post-content p {
        font-size: 14px;
        margin-bottom: 12px;
    }

    /* ── Contact section ── */
    .contact-section {
        padding: 26px 18px;
        margin: 30px 12px;
        border-radius: 16px;
    }

    .contact-section h2 {
        font-size: 24px;
        margin-bottom: 16px;
        text-align: center;
    }

    #contact-form {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    #contact-form input,
    #contact-form textarea {
        width: 100%;
        font-size: 16px;
        padding: 12px 14px;
    }

    #contact-form button {
        width: 100%;
        padding: 13px;
        font-size: 15px;
    }

    /* ── Footer ── */
    .footer {
        padding: 35px 16px 24px;
        margin-top: 40px;
        text-align: center;
    }

    .footer-brand h3 {
        font-size: 20px;
        margin-bottom: 14px;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: center;
        margin: 14px 0;
    }

    .footer-links a {
        font-size: 14px;
    }

    .copyright {
        font-size: 12px;
        margin-top: 16px;
    }
}

/* ═══════════════════════════════════════════════════════════
   BREAKPOINT: small phones (≤ 480px)
═══════════════════════════════════════════════════════════ */

@media (max-width: 480px) {

    .left-section .logo img { width: 75px; }

    .hero h1 { font-size: 25px; }
    .hero p  { font-size: 14px; }

    .top-articles h2,
    .latest-articles h2 { font-size: 21px; }

    .article-card img,
    .latest-post img { height: 160px; }
}

/* ═══════════════════════════════════════════════════════════
   GLOBAL TOUCH & READABILITY FIXES
═══════════════════════════════════════════════════════════ */

@media (max-width: 900px) {

    .login-btn,
    .signup-btn,
    .mobile-nav-links a,
    #contact-form button,
    .article-card a,
    .latest-post a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .article-card:active,
    .latest-post:active {
        transform: scale(0.98);
    }

    body {
        overflow-x: hidden;
        font-size: 15px;
    }

    input, textarea, select {
        font-size: 16px; /* prevents iOS auto-zoom on focus */
    }

    img {
        max-width: 100%;
        height: auto;
    }
}


/* ===== UPDATE 3: Smooth shrinking sticky header on scroll — DESKTOP only ===== */
@media (min-width: 901px) {
    .header {
        transition: padding 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .main-nav {
        transition: border-color 0.35s ease, margin-top 0.35s ease, padding-top 0.35s ease;
        will-change: transform;
    }

    .header.scrolled {
        padding: 10px 40px;
    }

    .header.scrolled .main-nav {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        border-top-color: transparent;
        margin-top: 0;
        padding-top: 0;
        z-index: 1;
    }
}

/* Respect users who prefer less motion */



html {
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    body { background: #0d1117; color: #e6edf3; }
    .container { color: #cbd5e1; }

    .header { background: #161b22; box-shadow: 0 2px 15px rgba(0,0,0,.4); }
    .logo span { color: #e6edf3; }
    .main-nav { border-top-color: #30363d; }
    .nav-links a { color: #e6edf3; }
    .nav-links a:hover { color: #5b8def; }
    .login-btn { color: #e6edf3; }
    .login-btn:hover { color: #5b8def; }

    .hero { background: linear-gradient(135deg, #161b22, #0d1117); }
    .hero h1 { color: #e6edf3; }
    .hero p { color: #9ba7b4; }

    .ad-space, .ad-box { background: #161b22; color: #9ba7b4; }

    .top-articles h2, .latest-articles h2 { color: #e6edf3; }

    .article-card, .latest-post {
        background: #161b22;
        border-color: #30363d;
        box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    }
    .article-card h3, .latest-post h3 { color: #e6edf3; }
    .article-card p, .latest-post p { color: #9ba7b4; }

    .newsletter { background: #161b22; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
    .newsletter h2 { color: #e6edf3; }
    .newsletter p { color: #9ba7b4; }
    .newsletter input { background: #0d1117; border-color: #30363d; color: #e6edf3; }

    input, textarea, select {
        background: #0d1117;
        border-color: #30363d;
        color: #e6edf3;
    }

    .contact-section { background: #161b22; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
    .contact-section h2 { color: #e6edf3; }
    .contact-section p { color: #9ba7b4; }

    .auth-box {
        background: #161b22;
        border-color: #30363d;
        box-shadow: 0 20px 60px rgba(0,0,0,.4);
    }
    .auth-box h1 { color: #e6edf3; }
    .auth-box .auth-subtitle { color: #9ba7b4; }
    .auth-box label { color: #cbd5e1; }
    .auth-divider { color: #9ba7b4; }
    .auth-divider::before, .auth-divider::after { background: #30363d; }
    .auth-footer { color: #9ba7b4; }

    .page-container, .policy-container, .privacy-policy,
    .terms-page, .terms-container, .disclaimer-page {
        background: #161b22;
        border-color: #30363d;
        box-shadow: 0 10px 40px rgba(0,0,0,.4);
    }
    .page-container h1, .policy-container h1, .privacy-policy h1,
    .terms-page h1, .terms-container h1, .disclaimer-page h1 { color: #e6edf3; }
    .page-container h2, .policy-container h2, .privacy-policy h2,
    .terms-page h2, .terms-container h2, .disclaimer-page h2 { color: #cbd5e1; }
    .page-container p, .policy-container p, .privacy-policy p,
    .terms-page p, .terms-container p, .disclaimer-page p,
    .page-container li, .policy-container li, .privacy-policy li,
    .terms-page li, .terms-container li, .disclaimer-page li { color: #9ba7b4; }
    .page-box, .policy-box, .terms-box, .disclaimer-box { background: #0d1b2e; }

    table { background: #161b22; }
    th, td { border-bottom-color: #30363d; }
    th { background: #0d1117; color: #e6edf3; }

    .hamburger span { background: #e6edf3; }
    .mobile-nav-drawer { background: #161b22; box-shadow: -8px 0 40px rgba(0,0,0,.5); }
    .mobile-nav-close { background: #0d1117; color: #e6edf3; }
    .mobile-nav-links a { color: #e6edf3; }
    .mobile-nav-links a:hover { background: #0d1117; color: #5b8def; }
    .mobile-nav-links .divider { background: #30363d; }
    .mobile-nav-auth { border-top-color: #30363d; }
    .mobile-nav-auth .login-btn {
        background: #0d1117;
        border-color: #30363d;
        color: #e6edf3;
    }
    .article-container .article-category { color: #fff; }
    .article-container .article-title { color: #e6edf3; }
    .article-container .article-meta { color: #9ba7b4; }
    .article-container .article-content {
        background: #161b22;
        color: #cbd5e1;
        box-shadow: 0 5px 20px rgba(0,0,0,0.4);
    }

    .related-posts h2 { color: #e6edf3; }
    .related-card {
        background: #161b22;
        box-shadow: 0 5px 15px rgba(0,0,0,0.4);
    }
    .related-card h3 { color: #e6edf3; }
    .related-card a { color: #5b8def; }
    /* Cookie Policy (uses its own class alongside page-container group) */
    .cookie-policy {
        background: #161b22;
        border-color: #30363d;
        box-shadow: 0 10px 40px rgba(0,0,0,.4);
    }
    .cookie-policy h1 { color: #e6edf3; }
    .cookie-policy h2 { color: #cbd5e1; }
    .cookie-policy p, .cookie-policy li { color: #9ba7b4; }

    /* About page */
    .about-section {
        background: #161b22;
        border-color: #30363d;
        box-shadow: 0 10px 30px rgba(0,0,0,.4);
    }
    .about-section h2 { color: #e6edf3; }
    .about-section p, .about-section li { color: #9ba7b4; }

    /* Categories page */
    .category-card {
        background: #161b22;
        border-color: #30363d;
        box-shadow: 0 10px 30px rgba(0,0,0,.4);
    }
    .category-title { color: #e6edf3; }
    .category-desc { color: #9ba7b4; }

    /* Contact page */
    .contact-card {
        background: #161b22;
        border-color: #30363d;
        box-shadow: 0 10px 30px rgba(0,0,0,.4);
    }
    .contact-card h2 { color: #e6edf3; }
    .contact-card p { color: #9ba7b4; }
    .form-group label { color: #cbd5e1; }
    .form-group input, .form-group textarea {
        background: #0d1117;
        border-color: #30363d;
        color: #e6edf3;
    }
    .faq h2 { color: #e6edf3; }
    .faq-item {
        background: #161b22;
        border-color: #30363d;}
        /* Search page results heading */
    .results h2 { color: #e6edf3; }

    /* Text selection (Ctrl+A / mouse select) stays readable in dark mode */
    ::selection {
        background: #3b82f6;
        color: #ffffff;

    }
    /* Search bar typed text */
    .search-box input { color: #e6edf3; }

    /* First paragraph of article (has its own special styling) */
    .article-container .article-content p:first-of-type { color: #e6edf3; }
  
@media (prefers-color-scheme: dark) {
    /* ... baaki dark mode rules ... */

    .logo img {
    filter: brightness(0);
}
.logo img {
    filter: brightness(0);
}

    .search-btn img {
        filter: invert(1);
    }

} }

html {
    color-scheme: light dark;
}

.logo img {
    filter: brightness(0);
}

@media (prefers-color-scheme: dark) {
    body { background: #0d1117; color: #e6edf3; }
    .container { color: #cbd5e1; }

    .header { background: #161b22; box-shadow: 0 2px 15px rgba(0,0,0,.4); }
    .logo span { color: #e6edf3; }
    .logo img { filter: brightness(0) invert(1); }
    .search-btn img { filter: invert(1); }
    .main-nav { border-top-color: #30363d; }
    .nav-links a { color: #e6edf3; }
    .nav-links a:hover { color: #5b8def; }
    .login-btn { color: #e6edf3; }
    .login-btn:hover { color: #5b8def; }

    .hero { background: linear-gradient(135deg, #161b22, #0d1117); }
    .hero h1 { color: #e6edf3; }
    .hero p { color: #9ba7b4; }

    .ad-space, .ad-box { background: #161b22; color: #9ba7b4; }

    .top-articles h2, .latest-articles h2 { color: #e6edf3; }

    .article-card, .latest-post {
        background: #161b22;
        border-color: #30363d;
        box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    }
    .article-card h3, .latest-post h3 { color: #e6edf3; }
    .article-card p, .latest-post p { color: #9ba7b4; }

    .newsletter { background: #161b22; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
    .newsletter h2 { color: #e6edf3; }
    .newsletter p { color: #9ba7b4; }
    .newsletter input { background: #0d1117; border-color: #30363d; color: #e6edf3; }

    input, textarea, select {
        background: #0d1117;
        border-color: #30363d;
        color: #e6edf3;
    }
    .search-box input { color: #e6edf3; }

    .auth-box {
        background: #161b22;
        border-color: #30363d;
        box-shadow: 0 20px 60px rgba(0,0,0,.4);
    }
    .auth-box h1 { color: #e6edf3; }
    .auth-box .auth-subtitle { color: #9ba7b4; }
    .auth-box label { color: #cbd5e1; }
    .auth-divider { color: #9ba7b4; }
    .auth-divider::before, .auth-divider::after { background: #30363d; }
    .auth-footer { color: #9ba7b4; }

    .page-container, .policy-container, .privacy-policy,
    .terms-page, .terms-container, .disclaimer-page, .cookie-policy {
        background: #161b22;
        border-color: #30363d;
        box-shadow: 0 10px 40px rgba(0,0,0,.4);
    }
    .page-container h1, .policy-container h1, .privacy-policy h1,
    .terms-page h1, .terms-container h1, .disclaimer-page h1, .cookie-policy h1 { color: #e6edf3; }
    .page-container h2, .policy-container h2, .privacy-policy h2,
    .terms-page h2, .terms-container h2, .disclaimer-page h2, .cookie-policy h2 { color: #cbd5e1; }
    .page-container p, .policy-container p, .privacy-policy p,
    .terms-page p, .terms-container p, .disclaimer-page p, .cookie-policy p,
    .page-container li, .policy-container li, .privacy-policy li,
    .terms-page li, .terms-container li, .disclaimer-page li, .cookie-policy li { color: #9ba7b4; }
    .page-box, .policy-box, .terms-box, .disclaimer-box { background: #0d1b2e; }

    table { background: #161b22; }
    th, td { border-bottom-color: #30363d; }
    th { background: #0d1117; color: #e6edf3; }

    .hamburger span { background: #e6edf3; }
    .mobile-nav-drawer { background: #161b22; box-shadow: -8px 0 40px rgba(0,0,0,.5); }
    .mobile-nav-close { background: #0d1117; color: #e6edf3; }
    .mobile-nav-links a { color: #e6edf3; }
    .mobile-nav-links a:hover { background: #0d1117; color: #5b8def; }
    .mobile-nav-links .divider { background: #30363d; }
    .mobile-nav-auth { border-top-color: #30363d; }
    .mobile-nav-auth .login-btn {
        background: #0d1117;
        border-color: #30363d;
        color: #e6edf3;
    }

    .article-container .article-category { color: #fff; }
    .article-container .article-title { color: #e6edf3; }
    .article-container .article-meta { color: #9ba7b4; }
    .article-container .article-content {
        background: #161b22;
        color: #cbd5e1;
        box-shadow: 0 5px 20px rgba(0,0,0,0.4);
    }
    .article-container .article-content p:first-of-type { color: #e6edf3; }
    .article-subheading {
        color: #e6edf3;
        border-bottom-color: #5b8def;
    }

    .related-posts h2 { color: #e6edf3; }
    .related-card {
        background: #161b22;
        box-shadow: 0 5px 15px rgba(0,0,0,0.4);
    }
    .related-card h3 { color: #e6edf3; }
    .related-card a { color: #5b8def; }

    .about-section {
        background: #161b22;
        border-color: #30363d;
        box-shadow: 0 10px 30px rgba(0,0,0,.4);
    }
    .about-section h2 { color: #e6edf3; }
    .about-section p, .about-section li { color: #9ba7b4; }

    .category-card {
        background: #161b22;
        border-color: #30363d;
        box-shadow: 0 10px 30px rgba(0,0,0,.4);
    }
    .category-title { color: #e6edf3; }
    .category-desc { color: #9ba7b4; }

    .contact-card {
        background: #161b22;
        border-color: #30363d;
        box-shadow: 0 10px 30px rgba(0,0,0,.4);
    }
    .contact-card h2 { color: #e6edf3; }
    .contact-card p { color: #9ba7b4; }
    .form-group label { color: #cbd5e1; }
    .form-group input, .form-group textarea {
        background: #0d1117;
        border-color: #30363d;
        color: #e6edf3;
    }
    .faq h2 { color: #e6edf3; }
    .faq-item {
        background: #161b22;
        border-color: #30363d;
        box-shadow: 0 5px 20px rgba(0,0,0,.4);
    }
    .faq-item h3 { color: #e6edf3; }
    .faq-item p { color: #9ba7b4; }

    .results h2 { color: #e6edf3; }

    ::selection {
        background: #3b82f6;
        color: #ffffff;
    }
}
/* ===== Cookie consent banner ===== */
.cookie-banner {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: 20px;
    max-width: 480px;
    margin: 0 auto;
    background: #0d1b2e;
    color: #f1f5f9;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    z-index: 9999;
    display: none;
    animation: cookieSlideUp 0.4s ease;
}

.cookie-banner.show {
    display: block;
}

.cookie-banner p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 14px;
}

.cookie-banner a {
    color: #5b8def;
    text-decoration: underline;
}

.cookie-banner-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.cookie-btn {
    padding: 8px 18px;
    border-radius: 6px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.cookie-btn-accept {
    background: #2563eb;
    color: #fff;
}

.cookie-btn-accept:hover {
    background: #1d4ed8;
}

.cookie-btn-reject {
    background: transparent;
    color: #cbd5e1;
    border: 1px solid #334155;
}

.cookie-btn-reject:hover {
    background: #1e293b;
}

@keyframes cookieSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
    .cookie-banner {
        left: 12px;
        right: 12px;
        bottom: 12px;
        padding: 16px;
    }
    .cookie-banner-buttons {
        justify-content: stretch;
    }
    .cookie-btn {
        flex: 1;
    }
}

/* Fix: Category page ka banner aur article cards bhi dark/light theme follow karenge */
@media (prefers-color-scheme: dark) {
    .category-banner {
        background: #161b22;
        box-shadow: 0 2px 15px rgba(0,0,0,.4);
    }
    .category-banner h1 {
        color: #e6edf3;
    }
    .category-banner p {
        color: #9ba7b4;
    }

    .post-card {
        background: #161b22;
        border-color: #30363d;
        box-shadow: 0 10px 30px rgba(0,0,0,.4);
    }
    .post-category {
        color: #5b8def;
    }
    .post-title {
        color: #e6edf3;
    }
    .post-desc {
        color: #9ba7b4;
    }
}