/* =========================================
   THE DAILY CHRONICLE — MAIN STYLESHEET
   ========================================= */

/* 1. ROOT VARIABLES */
:root {
  --ink: #17123d;
  --navy: #17123d;
  --muted: #77758a;
  --paper: #f8f7fc;
  --white: #ffffff;
  --line: #e9e6f2;
  --accent: #7625ed;
  --accent-light: #f0e6ff;
  --purple: #a855f7;
  --shadow: 0 8px 28px rgba(35, 20, 75, 0.07);
}

/* 2. RESET & GLOBAL */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

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

/* 3. HEADER & NAVIGATION */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  color: var(--navy);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1.2px;
  white-space: nowrap;
}

.brand span {
  color: var(--accent);
}

nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #55516d;
  font-size: 14px;
  font-weight: 600;
}

nav a {
  transition: color 0.2s ease;
}

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

.nav-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 9px;
  padding: 12px 19px;
  background: var(--accent);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-cta:hover,
.button:hover {
  background: #5d16c7;
  color: var(--white);
  transform: translateY(-1px);
}

/* 4. HERO SECTION */
.hero {
  position: relative;
  overflow: hidden;
  margin-top: 28px;
  padding: 85px 55px;
  max-width: 100%;
  border-radius: 22px;
  background:
    linear-gradient(110deg, rgba(23, 18, 61, 0.96), rgba(67, 34, 125, 0.88)),
    linear-gradient(135deg, #25145b, #7625ed);
  color: var(--white);
}

.hero::after {
  content: "";
  position: absolute;
  width: 330px;
  height: 330px;
  right: -90px;
  top: -120px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  box-shadow:
    0 0 0 35px rgba(255, 255, 255, 0.035),
    0 0 0 75px rgba(255, 255, 255, 0.025);
  pointer-events: none;
}

.hero .eyebrow {
  color: #d6baff;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}

h1 {
  max-width: 750px;
  margin: 18px 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -2.5px;
}

h1 span {
  color: #d4b5ff;
  font-style: italic;
}

.hero-copy {
  max-width: 540px;
  margin: 20px 0 28px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
  line-height: 1.8;
}

/* 5. SEARCH FORM */
.search-form {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  max-width: 650px;
  margin: 25px 0;
}

.search-form input {
  flex: 1;
  min-width: 0;
  padding: 15px 18px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  outline: none;
  background: var(--white);
  color: var(--ink);
  font-size: 14px;
}

.search-form input:focus {
  border-color: #c084fc;
  box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.2);
}

.search-form .button {
  padding: 14px 24px;
  background: #a855f7;
}

.search-form .button:hover {
  background: #8b35df;
}

/* 6. TRENDING TOPICS */
.trending-topics {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  color: var(--white);
  font-size: 12px;
}

.trending-topics a {
  padding: 7px 13px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  transition: background 0.2s ease;
}

.trending-topics a:hover {
  background: var(--accent);
}

/* 7. CATEGORY STRIP */
.category-strip {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 42px;
}

.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 100px;
  padding: 14px 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--white);
  color: #514c68;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  color: var(--accent);
}

.category-icon {
  font-size: 25px;
}

/* 8. SECTIONS & HEADINGS */
.section {
  padding: 36px 0 55px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}

.section-heading h2 {
  margin: 7px 0 0;
  color: var(--navy);
  font-size: 29px;
  line-height: 1.3;
}

.section-heading>a {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.section-heading>a:hover {
  color: var(--purple);
}

/* 9. CONTENT LAYOUT */
.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 30px;
  align-items: start;
}

.main-content {
  min-width: 0;
}

/* 10. POST GRID & CARDS */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.post-card {
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--white);
  box-shadow: 0 3px 14px rgba(35, 20, 75, 0.035);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.post-image {
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.post-content {
  padding: 21px;
}

.post-content h3 {
  margin: 12px 0 9px;
  color: var(--navy);
  font-size: 19px;
  line-height: 1.4;
}

.post-content p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.post-category {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 20px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 18px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.post-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
}

.read-more {
  display: inline-block;
  margin-top: 13px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.read-more:hover {
  color: var(--purple);
}

/* 11. SIDEBAR */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 3px 14px rgba(35, 20, 75, 0.035);
}

.sidebar-title {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--navy);
  font-size: 14px;
  font-weight: 800;
}

.sidebar-content {
  padding: 17px 18px;
}

.sidebar-content h3 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 17px;
}

.sidebar-card p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.sidebar-card .button {
  margin-top: 10px;
}

/* 12. EMPTY STATES */
.empty-state {
  margin-top: 20px;
  padding: 32px;
  border: 1px dashed #c9c2dd;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.empty-state h3 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 19px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

/* 13. COMMUNITY STATISTICS */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin: 35px 0 55px;
  padding: 27px 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--white);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-align: center;
}

.stat-item strong {
  color: var(--accent);
  font-size: 25px;
}

.stat-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

/* 14. FOOTER */
.site-footer {
  margin-top: 35px;
  padding: 35px 0 20px;
  border-top: 1px solid var(--line);
  background: var(--white);
  color: var(--muted);
  font-size: 12px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-bottom {
  margin-top: 22px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  text-align: center;
}

/* 15. ERROR PAGES */
.error-page {
  padding: 100px 0;
  text-align: center;
}

.error-page h1 {
  margin-left: auto;
  margin-right: auto;
  color: var(--navy);
}

.error-page p {
  color: var(--muted);
}

/* 16. FORM ELEMENTS */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 7px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: var(--white);
  color: var(--ink);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(118, 37, 237, 0.1);
}

/* 17. RESPONSIVE DESIGN */
@media (max-width: 950px) {
  .category-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .content-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 20px;
  }

  .posts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .container {
    width: min(100% - 28px, 1160px);
  }

  .nav {
    flex-wrap: wrap;
    padding: 15px 0;
    gap: 14px;
  }

  nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
  }

  .hero {
    margin-top: 18px;
    padding: 55px 25px;
    border-radius: 16px;
  }

  h1 {
    font-size: clamp(38px, 10vw, 58px);
    letter-spacing: -1.5px;
  }

  .hero-copy {
    font-size: 14px;
  }

  .search-form {
    flex-direction: column;
  }

  .search-form .button {
    width: 100%;
  }

  .trending-topics {
    gap: 8px;
  }

  .trending-topics strong {
    width: 100%;
  }

  .category-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 20px 0 30px;
  }

  .category-item {
    min-height: 85px;
    font-size: 11px;
  }

  .content-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .section {
    padding: 30px 0 40px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .section-heading h2 {
    font-size: 25px;
  }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 380px) {
  .category-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .brand {
    font-size: 13px;
  }

  .nav-cta {
    padding: 10px 12px;
  }
}

/* HEADER USER NAVIGATION */

.nav-user {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.nav-link {
  color: #55516d;
  font-size: 13px;
  font-weight: 700;
}

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

.write-post-link {
  padding: 10px 14px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.logout-form {
  margin: 0;
}

.logout-button {
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.logout-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 700px) {
  .nav-user {
    width: 100%;
    justify-content: flex-start;
  }
}

/* =========================================
   PROFESSIONAL USER DASHBOARD
========================================= */

.dashboard-page {
  padding-top: 45px;
  padding-bottom: 75px;
  min-height: 70vh;
}

/* Dashboard Header */

.dashboard-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  margin-bottom: 32px;
  padding: 38px 40px;
  background: linear-gradient(120deg, #eef2ff, #f8faff);
  border: 1px solid #e3e9f5;
  border-radius: 20px;
  box-shadow: 0 8px 25px rgba(30, 50, 90, 0.05);
}

.dashboard-heading .eyebrow {
  color: #526c9a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2.5px;
  margin-bottom: 10px;
}

.dashboard-heading h1 {
  margin: 0 0 10px;
  color: #182b49;
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 750;
  line-height: 1.2;
}

.dashboard-heading p {
  margin: 0;
  color: #718096;
  font-size: 14px;
  line-height: 1.7;
}

.dashboard-heading>.button {
  flex-shrink: 0;
  padding: 13px 22px;
  border-radius: 10px;
  font-weight: 600;
  text-align: center;
}

/* Dashboard Sections */

.dashboard-content {
  margin-bottom: 28px;
  padding: 30px;
  background: #ffffff;
  border: 1px solid #e8edf4;
  border-radius: 17px;
  box-shadow: 0 5px 22px rgba(25, 45, 75, 0.045);
  min-width: 0;
}

.dashboard-content h2 {
  margin: 0 0 10px;
  color: #1c3353;
  font-size: 22px;
  font-weight: 700;
}

.dashboard-content>p {
  margin: 0 0 22px;
  color: #8793a3;
  font-size: 13px;
  line-height: 1.6;
}

/* Post List */

.dashboard-post-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

.dashboard-post {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 21px 23px;
  background: #fbfcfe;
  border: 1px solid #e8edf4;
  border-radius: 13px;
  transition: border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.dashboard-post:hover {
  border-color: #cbd8eb;
  box-shadow: 0 7px 18px rgba(30, 50, 80, 0.06);
  transform: translateY(-2px);
}

.dashboard-post-info {
  min-width: 0;
  flex: 1;
}

.dashboard-post-info h3 {
  margin: 0 0 9px;
  color: #253b59;
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.dashboard-post-info h3 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.dashboard-post-info h3 a:hover {
  color: #456ba5;
}

.dashboard-post-info p {
  margin: 0 0 5px;
  color: #8290a2;
  font-size: 13px;
  line-height: 1.7;
}

.dashboard-post-info p a {
  color: #496b9c;
  text-decoration: none;
}

.dashboard-post-info p a:hover {
  text-decoration: underline;
}

/* Post Actions */

.dashboard-post-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
  flex-shrink: 0;
}

.dashboard-post-actions form {
  margin: 0;
}

.dashboard-post .button,
.dashboard-post-actions .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

/* Post Status */

.post-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
  white-space: nowrap;
}

.status-pending {
  background: #fff4d9;
  color: #946200;
}

.status-published {
  background: #e3f7e9;
  color: #16753a;
}

.status-draft {
  background: #eeeef4;
  color: #55516d;
}

.status-rejected {
  background: #ffe7e7;
  color: #b42318;
}

/* Empty States */

.empty-state {
  padding: 48px 22px;
  text-align: center;
  background: #f8faff;
  border: 1px dashed #dce4ef;
  border-radius: 13px;
}

.empty-state h3 {
  margin: 0 0 10px;
  color: #253b59;
  font-size: 18px;
}

.empty-state p {
  margin: 0 0 20px;
  color: #8491a3;
  font-size: 13px;
  line-height: 1.7;
}

.empty-state .button {
  display: inline-block;
  padding: 11px 19px;
  border-radius: 9px;
}

/* Admin Panel */

.dashboard-content h2:only-child {
  margin-bottom: 18px;
}

/* Mobile and Tablet */

@media (max-width: 850px) {
  .dashboard-post {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-post-actions {
    justify-content: flex-start;
    width: 100%;
  }
}

@media (max-width: 650px) {
  .dashboard-page {
    padding-top: 28px;
    padding-bottom: 45px;
  }

  .dashboard-heading {
    align-items: flex-start;
    flex-direction: column;
    padding: 26px 22px;
    margin-bottom: 22px;
    border-radius: 15px;
  }

  .dashboard-heading h1 {
    font-size: 29px;
  }

  .dashboard-heading>.button {
    width: 100%;
    box-sizing: border-box;
  }

  .dashboard-content {
    padding: 21px 16px;
    margin-bottom: 20px;
    border-radius: 13px;
  }

  .dashboard-content h2 {
    font-size: 19px;
  }

  .dashboard-post {
    padding: 17px;
    gap: 15px;
  }

  .dashboard-post-info h3 {
    font-size: 15px;
  }

  .dashboard-post-actions {
    gap: 8px;
  }

  .dashboard-post-actions .button,
  .dashboard-post .button {
    white-space: normal;
  }

  .empty-state {
    padding: 35px 15px;
  }
}

/* Navbar Profile */
.nav-profile {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: inherit;
}

.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e5e7eb;
}

.nav-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #172554;
  color: white;
  font-weight: bold;
}

.nav-username {
  font-size: 14px;
  font-weight: 600;
}

/* =========================================
   EXPLORE PAGE — PREMIUM DESIGN
   ========================================= */

.explore-page {
  overflow: hidden;
}

/* Explore Hero */

.explore-page .explore-hero {
  position: relative;
  overflow: hidden;
  margin: 28px auto 0;
  width: min(1160px, calc(100% - 40px));
  max-width: 1160px;
  padding: 85px 55px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 85% 20%, rgba(168, 85, 247, 0.35), transparent 30%),
    linear-gradient(120deg, #17123d, #43227d);
  color: var(--white);
}

@media (max-width: 600px) {
  .explore-page .explore-hero {
    width: calc(100% - 28px);
    margin: 18px auto 0;
    padding: 55px 25px;
    border-radius: 16px;
  }

  .explore-categories .posts-grid,
  .explore-latest .posts-grid {
    grid-template-columns: 1fr;
  }

  .explore-category-card {
    min-height: auto;
  }

  .explore-category-card .post-content {
    padding: 22px;
  }
}

.explore-page .hero-label {
  display: inline-block;
  padding: 8px 15px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.1);
  color: #e0caff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
}

.explore-page .hero h1 {
  position: relative;
  z-index: 1;
}

.explore-page .hero p {
  position: relative;
  z-index: 1;
  max-width: 580px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  line-height: 1.9;
}

/* Section Labels */

.explore-page .section-label {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
}

/* Category Grid */

.explore-categories .posts-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.explore-category-card {
  position: relative;
  min-height: 205px;
  border-radius: 17px;
  transition: transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.explore-category-card:hover {
  transform: translateY(-7px);
  border-color: #c9a6ff;
  box-shadow: 0 15px 35px rgba(83, 39, 145, 0.13);
}

.explore-category-card .post-content {
  padding: 22px;
}

/* Category Icons */

.explore-category-card .post-content::before {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: var(--accent-light);
  font-size: 25px;
}

.explore-category-card:nth-child(1) .post-content::before {
  content: "🎬";
}

.explore-category-card:nth-child(2) .post-content::before {
  content: "🌍";
}

.explore-category-card:nth-child(3) .post-content::before {
  content: "🍕";
}

.explore-category-card:nth-child(4) .post-content::before {
  content: "🎮";
}

.explore-category-card:nth-child(5) .post-content::before {
  content: "✨";
}

.explore-category-card:nth-child(6) .post-content::before {
  content: "🌿";
}

.explore-category-card:nth-child(7) .post-content::before {
  content: "⚽";
}

.explore-category-card:nth-child(8) .post-content::before {
  content: "✈️";
}

.explore-category-card .post-category {
  font-size: 9px;
  letter-spacing: 1px;
}

.explore-category-card h3 {
  margin: 12px 0 7px;
  font-size: 19px;
}

.explore-category-card .post-content p {
  display: inline-block;
  margin-top: 5px;
  padding: 5px 10px;
  border-radius: 20px;
  background: #f5f1ff;
  color: #7625ed;
  font-size: 11px;
  font-weight: 700;
}

.explore-category-card .read-more {
  display: block;
  margin-top: 14px;
}

/* Latest Stories */

.explore-latest .posts-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.explore-latest .post-card {
  border-radius: 17px;
}

.explore-latest .post-card:hover {
  transform: translateY(-6px);
  border-color: #d6c0ff;
  box-shadow: 0 14px 30px rgba(35, 20, 75, 0.1);
}

.explore-latest .post-content {
  padding: 24px;
}

.explore-latest .post-content h3 {
  font-size: 20px;
  line-height: 1.5;
}

.explore-latest .post-content p {
  margin-top: 10px;
}

.explore-latest .post-meta {
  margin-top: 20px;
}

/* Responsive Explore Page */

@media (max-width: 950px) {
  .explore-categories .posts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .explore-latest .posts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .explore-page .explore-hero {
    padding: 55px 25px;
  }

  .explore-categories .posts-grid,
  .explore-latest .posts-grid {
    grid-template-columns: 1fr;
  }

  .explore-category-card {
    min-height: auto;
  }

  .explore-category-card .post-content {
    padding: 22px;
  }
}

/* =========================================
   SEARCH PAGE — PREMIUM DESIGN
   ========================================= */

.search-page {
  min-height: 65vh;
  padding-top: 55px;
  padding-bottom: 80px;
}

.search-page .section-heading {
  margin-bottom: 25px;
}

.search-page .section-heading h1 {
  margin-top: 12px;
  font-size: 38px;
  color: var(--ink);
}

.search-page .section-heading p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.7;
}

.search-page .search-form {
  max-width: 700px;
  margin: 30px 0 45px;
  display: flex;
  gap: 12px;
}

.search-page .search-form input {
  flex: 1;
  min-width: 0;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 15px;
  outline: none;
}

.search-page .search-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(118, 37, 237, 0.1);
}

.search-page .posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.search-page .post-card {
  border-radius: 16px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.search-page .post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 30px rgba(35, 20, 75, 0.1);
}

.search-page .post-content {
  padding: 24px;
}

.search-page .post-content h3 {
  margin: 12px 0;
  font-size: 20px;
  line-height: 1.5;
}

.search-page .post-content h3 a {
  color: var(--ink);
  text-decoration: none;
}

.search-page .post-content h3 a:hover {
  color: var(--accent);
}

.search-page .post-content p {
  color: var(--muted);
  line-height: 1.7;
}

.search-page .post-meta {
  margin-top: 18px;
}

.search-page .read-more {
  display: inline-block;
  margin-top: 18px;
}

.search-page .empty-state {
  max-width: 650px;
  padding: 45px 25px;
  margin: 30px 0;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.search-page .empty-state h2 {
  margin-bottom: 12px;
  color: var(--ink);
}

.search-page .empty-state p {
  margin-bottom: 20px;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 900px) {
  .search-page .posts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .search-page {
    padding-top: 35px;
  }

  .search-page .section-heading h1 {
    font-size: 30px;
  }

  .search-page .search-form {
    flex-direction: column;
  }

  .search-page .search-form button {
    width: 100%;
  }

  .search-page .posts-grid {
    grid-template-columns: 1fr;
  }
}

/* SEARCH PAGE PAGINATION */

.search-page .pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 45px;
}

.search-page .pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  transition: 0.3s ease;
}

.search-page .pagination-link:hover,
.search-page .pagination-link.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Floating Admin Dashboard Button */
.admin-dashboard-float {
  position: fixed;
  right: 25px;
  bottom: 25px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 18px;
  background: #29466f;
  color: #fff;
  text-decoration: none;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.20);
  transition: all 0.25s ease;
}

.admin-dashboard-float:hover {
  background: #1b304d;
  transform: translateY(-4px);
}

@media (max-width: 600px) {
  .admin-dashboard-float {
    right: 15px;
    bottom: 15px;
  }
}

/* LIVE SEARCH SUGGESTIONS */
.live-search-wrapper {
  position: relative;
  flex: 1;
  min-width: 0;
}

.live-search-wrapper input {
  width: 100%;
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 1000;
  background: #fff;
  border: 1px solid #e2e6ed;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.search-suggestions[hidden] {
  display: none;
}

.suggestion-item {
  display: block;
  padding: 13px 16px;
  color: #29466f;
  text-decoration: none;
  font-size: 14px;
  border-bottom: 1px solid #edf0f4;
  transition: background 0.2s ease;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background: #f1f5fa;
}

.suggestion-empty {
  padding: 14px 16px;
  color: #777;
  font-size: 14px;
}

/* =================================
   CREATE POST PAGE DESIGN
================================= */

.create-post-page {
  background: #f5f7fb;
  min-height: 80vh;
  padding: 55px 20px 70px;
}

.create-post-container {
  max-width: 1250px;
  margin: 0 auto;
}

.create-post-heading {
  margin-bottom: 35px;
}

.create-post-label {
  display: inline-block;
  color: #29466f;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.create-post-heading h1 {
  font-size: clamp(30px, 4vw, 42px);
  color: #182b45;
  margin: 0 0 12px;
  line-height: 1.2;
}

.create-post-heading p {
  color: #718096;
  font-size: 15px;
  margin: 0;
}

.create-post-form {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.85fr);
  gap: 25px;
  align-items: start;
}

.create-post-main,
.create-post-sidebar {
  min-width: 0;
}

.create-post-sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.create-post-card {
  background: #ffffff;
  border: 1px solid #e8edf3;
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 5px 20px rgba(25, 45, 75, 0.045);
}

.create-post-section-heading {
  margin-bottom: 25px;
  padding-bottom: 18px;
  border-bottom: 1px solid #edf0f4;
}

.create-post-section-heading h2 {
  color: #1d3555;
  font-size: 20px;
  margin: 0 0 7px;
}

.create-post-section-heading p {
  color: #8491a3;
  font-size: 13px;
  margin: 0;
}

.create-post-card .form-group {
  margin-bottom: 24px;
}

.create-post-card .form-group:last-child {
  margin-bottom: 0;
}

.create-post-card label {
  display: block;
  color: #263b56;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}

.create-post-card input[type="text"],
.create-post-card select,
.create-post-card textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 13px 15px;
  border: 1px solid #dce3ec;
  border-radius: 9px;
  background: #fbfcfe;
  color: #263b56;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.create-post-card textarea {
  resize: vertical;
  line-height: 1.7;
}

.create-post-card input:focus,
.create-post-card select:focus,
.create-post-card textarea:focus {
  border-color: #29466f;
  box-shadow: 0 0 0 3px rgba(41, 70, 111, 0.09);
  background: #ffffff;
}

.create-post-card input[type="file"] {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  border: 1px dashed #b9c7d9;
  border-radius: 9px;
  background: #f8faff;
  font-size: 13px;
  color: #52647b;
}

.create-post-card small {
  display: block;
  color: #8793a3;
  font-size: 12px;
  line-height: 1.6;
  margin-top: 10px;
}

.create-post-submit {
  background: #ffffff;
  padding: 23px;
  border: 1px solid #e8edf3;
  border-radius: 14px;
  box-shadow: 0 5px 20px rgba(25, 45, 75, 0.045);
}

.create-post-submit .button {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  padding: 14px 18px;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.create-post-submit p {
  color: #8491a3;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
  margin: 13px 0 0;
}

.create-post-page .form-error {
  margin-bottom: 22px;
}

/* Tablet and Mobile */

@media (max-width: 850px) {
  .create-post-form {
    grid-template-columns: 1fr;
  }

  .create-post-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .create-post-submit {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .create-post-page {
    padding: 35px 14px 45px;
  }

  .create-post-heading {
    margin-bottom: 25px;
  }

  .create-post-sidebar {
    display: flex;
    flex-direction: column;
  }

  .create-post-card {
    padding: 20px 16px;
    border-radius: 11px;
  }

  .create-post-submit {
    padding: 18px;
  }
}

/* =========================================
   PROFESSIONAL EDIT POST PAGE
========================================= */

.edit-post-page {
  background: #f5f7fb;
  min-height: 80vh;
  padding: 55px 20px 70px;
}

.edit-post-container {
  max-width: 1250px;
  margin: 0 auto;
}

.edit-post-heading {
  margin-bottom: 35px;
}

.edit-post-label {
  display: inline-block;
  color: #29466f;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.edit-post-heading h1 {
  font-size: clamp(30px, 4vw, 42px);
  color: #182b45;
  margin: 0 0 12px;
  line-height: 1.2;
}

.edit-post-heading p {
  color: #718096;
  font-size: 15px;
  margin: 0;
}

.edit-post-form {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.85fr);
  gap: 25px;
  align-items: start;
}

.edit-post-main,
.edit-post-sidebar {
  min-width: 0;
}

.edit-post-sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.edit-post-card {
  background: #ffffff;
  border: 1px solid #e8edf3;
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 5px 20px rgba(25, 45, 75, 0.045);
}

.edit-post-section-heading {
  margin-bottom: 25px;
  padding-bottom: 18px;
  border-bottom: 1px solid #edf0f4;
}

.edit-post-section-heading h2 {
  color: #1d3555;
  font-size: 20px;
  margin: 0 0 7px;
}

.edit-post-section-heading p {
  color: #8491a3;
  font-size: 13px;
  margin: 0;
  line-height: 1.6;
}

.edit-post-card .form-group {
  margin-bottom: 24px;
}

.edit-post-card .form-group:last-child {
  margin-bottom: 0;
}

.edit-post-card label {
  display: block;
  color: #263b56;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}

.edit-post-card input[type="text"],
.edit-post-card select,
.edit-post-card textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 13px 15px;
  border: 1px solid #dce3ec;
  border-radius: 9px;
  background: #fbfcfe;
  color: #263b56;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.edit-post-card textarea {
  resize: vertical;
  line-height: 1.7;
}

.edit-post-card input:focus,
.edit-post-card select:focus,
.edit-post-card textarea:focus {
  border-color: #29466f;
  box-shadow: 0 0 0 3px rgba(41, 70, 111, 0.09);
  background: #ffffff;
}

.edit-post-card input[type="file"] {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  border: 1px dashed #b9c7d9;
  border-radius: 9px;
  background: #f8faff;
  font-size: 13px;
  color: #52647b;
}

.edit-post-card small {
  display: block;
  color: #8793a3;
  font-size: 12px;
  line-height: 1.6;
  margin-top: 10px;
}

.edit-post-help {
  color: #8491a3;
  font-size: 13px;
  line-height: 1.6;
  margin: 0 0 12px;
}

.edit-post-no-images {
  padding: 20px;
  text-align: center;
  color: #8491a3;
  background: #f8faff;
  border: 1px dashed #dce4ef;
  border-radius: 9px;
  font-size: 13px;
}

/* Existing and New Image Grid */

.edit-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 13px;
  margin-top: 15px;
}

.edit-image-item {
  min-width: 0;
  padding: 8px;
  background: #fbfcfe;
  border: 1px solid #e4eaf2;
  border-radius: 11px;
  overflow: hidden;
}

.edit-image-item img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 7px;
}

.edit-image-item .delete-image-option {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 11px;
  color: #65748a;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
}

.edit-image-item .delete-image-option input {
  width: auto;
  margin: 2px 0 0;
  flex-shrink: 0;
}

#imagePreview .edit-image-item {
  position: relative;
}

.remove-new-image {
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  border: none;
  border-radius: 6px;
  background: #b42318;
  color: white;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.remove-new-image:hover {
  background: #8f1c14;
}

/* Save and Cancel */

.edit-post-submit {
  background: #ffffff;
  padding: 23px;
  border: 1px solid #e8edf3;
  border-radius: 14px;
  box-shadow: 0 5px 20px rgba(25, 45, 75, 0.045);
}

.edit-post-submit .button {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  padding: 13px 18px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.edit-post-submit .button+.button {
  margin-top: 10px;
}

/* Error */

.edit-post-page .form-error {
  margin-bottom: 22px;
}

/* Tablet */

@media (max-width: 850px) {
  .edit-post-form {
    grid-template-columns: 1fr;
  }

  .edit-post-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .edit-post-submit {
    grid-column: 1 / -1;
  }
}

/* Mobile */

@media (max-width: 600px) {
  .edit-post-page {
    padding: 35px 14px 45px;
  }

  .edit-post-heading {
    margin-bottom: 25px;
  }

  .edit-post-sidebar {
    display: flex;
    flex-direction: column;
  }

  .edit-post-card {
    padding: 20px 16px;
    border-radius: 11px;
  }

  .edit-image-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .edit-post-submit {
    padding: 18px;
  }
}

/* =====================================
   HOMEPAGE DESIGN IMPROVEMENTS
   Only affects the Homepage
===================================== */

.home-page .content-layout {
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
  align-items: start;
}

.home-page .main-content {
  min-width: 0;
}

.home-page .main-content>.section {
  margin-bottom: 42px;
}

.home-page .section-heading {
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e8eaf0;
  align-items: end;
}

.home-page .section-heading h2 {
  font-size: 25px;
  margin-top: 5px;
}

.home-page .section-heading>a {
  font-weight: 600;
  color: #5265d8;
  text-decoration: none;
  white-space: nowrap;
}

.home-page .section-heading>a:hover {
  color: #293da9;
}

/* Featured Posts */

.home-page .main-content>.section:first-child .posts-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.home-page .main-content>.section:first-child .post-card {
  border: 1px solid #e4e7f2;
  border-top: 4px solid #6878df;
  border-radius: 13px;
  background: linear-gradient(180deg, #f8f9ff 0%, #ffffff 45%);
  box-shadow: 0 5px 18px rgba(35, 45, 90, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-page .main-content>.section:first-child .post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(35, 45, 90, 0.11);
}

/* Latest Posts */

.home-page .main-content>.section:nth-child(2) .posts-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.home-page .main-content>.section:nth-child(2) .post-card {
  border: 1px solid #e8eaf0;
  border-radius: 13px;
  background: #ffffff;
  box-shadow: 0 4px 15px rgba(25, 35, 65, 0.045);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-page .main-content>.section:nth-child(2) .post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 9px 22px rgba(25, 35, 65, 0.09);
}

.home-page .post-content {
  padding: 20px;
}

.home-page .post-content h3 {
  line-height: 1.4;
  margin: 12px 0 9px;
}

.home-page .post-content p {
  line-height: 1.7;
  color: #626b7b;
}

.home-page .post-meta {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid #edf0f5;
  flex-wrap: wrap;
  gap: 8px;
}

/* Right Sidebar */

.home-page .sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.home-page .sidebar-card {
  overflow: hidden;
  border: 1px solid #e7e9f0;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 5px 18px rgba(25, 35, 65, 0.055);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-page .sidebar-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 9px 22px rgba(25, 35, 65, 0.09);
}

.home-page .sidebar-card:nth-child(1) {
  background: linear-gradient(145deg, #fff8ed, #ffffff 75%);
}

.home-page .sidebar-card:nth-child(2) {
  background: linear-gradient(145deg, #f0f5ff, #ffffff 75%);
}

.home-page .sidebar-card:nth-child(3) {
  background: linear-gradient(145deg, #f0fbf7, #ffffff 75%);
}

.home-page .sidebar-title {
  padding: 17px 19px;
  font-size: 17px;
  font-weight: 700;
  border-bottom: 1px solid rgba(120, 130, 150, 0.13);
}

.home-page .sidebar-content {
  padding: 18px 19px 21px;
}

.home-page .sidebar-content p {
  line-height: 1.7;
  color: #626b7b;
}

.home-page .sidebar-content h3 {
  margin-bottom: 9px;
  line-height: 1.4;
}

.home-page .sidebar-content .button {
  display: inline-block;
  margin-top: 10px;
}

.home-page .sidebar-content .read-more {
  display: inline-block;
  margin-top: 8px;
  font-weight: 600;
}

/* Homepage Statistics */

.home-page .stats-bar {
  margin-top: 12px;
  border-radius: 15px;
  border: 1px solid #e7eaf2;
  box-shadow: 0 5px 18px rgba(25, 35, 65, 0.045);
}

/* Responsive Design */

@media (max-width: 1100px) {
  .home-page .content-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 20px;
  }

  .home-page .main-content>.section:first-child .posts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 950px) {
  .home-page .content-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
}

@media (max-width: 700px) {
  .home-page .content-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .home-page .main-content>.section:first-child .posts-grid,
  .home-page .main-content>.section:nth-child(2) .posts-grid {
    grid-template-columns: 1fr;
  }

  .home-page .sidebar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .home-page .section-heading h2 {
    font-size: 21px;
  }

  .home-page .main-content>.section {
    margin-bottom: 32px;
  }
}

/* Latest Posts - Same Design as Featured Posts */

.home-page .main-content>.section:nth-child(2) .posts-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.home-page .main-content>.section:nth-child(2) .post-card {
  border: 1px solid #e4e7f2;
  border-top: 4px solid #6878df;
  border-radius: 13px;
  background: linear-gradient(180deg, #f8f9ff 0%, #ffffff 45%);
  box-shadow: 0 5px 18px rgba(35, 45, 90, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-page .main-content>.section:nth-child(2) .post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(35, 45, 90, 0.11);
}

/* Responsive */
@media (max-width: 1100px) {
  .home-page .main-content>.section:nth-child(2) .posts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .home-page .main-content>.section:nth-child(2) .posts-grid {
    grid-template-columns: 1fr;
  }
}

/* Homepage Community Highlights */

.home-page .stats-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 22px;
  margin-top: 35px;
  margin-bottom: 35px;
  background: linear-gradient(135deg, #f7f8ff, #ffffff);
  border: 1px solid #e5e8f3;
  border-radius: 17px;
  box-shadow: 0 6px 22px rgba(35, 45, 90, 0.06);
}

.home-page .stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 125px;
  padding: 18px 12px;
  text-align: center;
  background: #ffffff;
  border: 1px solid #e9ebf3;
  border-radius: 13px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-page .stat-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(35, 45, 90, 0.09);
}

.home-page .stat-item strong {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: #eef0ff;
  font-size: 25px;
}

.home-page .stat-item:nth-child(2) strong {
  background: #eaf5ff;
}

.home-page .stat-item:nth-child(3) strong {
  background: #eaf8f1;
}

.home-page .stat-item:nth-child(4) strong {
  background: #fff4e7;
}

.home-page .stat-item span {
  font-size: 14px;
  font-weight: 700;
  color: #394257;
}

@media (max-width: 700px) {
  .home-page .stats-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 14px;
    gap: 12px;
  }

  .home-page .stat-item {
    min-height: 110px;
  }
}

@media (max-width: 380px) {
  .home-page .stats-bar {
    grid-template-columns: 1fr;
  }
}

/* Stay Inspired - Homepage Sidebar */

.home-page .stay-inspired-card {
  background: linear-gradient(145deg, #f8f3ff, #ffffff 80%);
  border-color: #e9def8;
}

.home-page .stay-inspired-card .sidebar-title {
  color: #7045a5;
}

.home-page .stay-inspired-card .sidebar-content h3 {
  font-size: 20px;
  color: #37304a;
  margin-bottom: 10px;
}

.home-page .inspiration-tags {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 17px 0;
}

.home-page .inspiration-tags span {
  display: block;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #eee5f8;
  border-radius: 9px;
  font-size: 13px;
  color: #514665;
}

.home-page .stay-inspired-card .read-more {
  color: #7045a5;
  font-weight: 700;
}

/* =====================================
   THE DAILY CHRONICLE - RESPONSIVE FOOTER
===================================== */

.site-footer {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 35px 0 0;
  padding: 30px 20px 14px;
  background: #171d32;
  color: #d5d9e5;
  border-top: 4px solid #6878df;
  border-radius: 0;
  font-size: 14px;
}

.site-footer .footer-main {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}

.site-footer .footer-profile {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.site-footer .footer-avatar {
  width: 72px;
  height: 72px;
  margin: 0 0 9px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6878df, #9a65c9);
  color: #ffffff;
  font-size: 23px;
  font-weight: 800;
  border: 3px solid rgba(255, 255, 255, 0.18);
  box-sizing: border-box;
}

.site-footer .footer-profile h3 {
  color: #ffffff;
  font-size: 19px;
  margin: 0 0 5px;
}

.site-footer .developer-credit {
  color: #aeb8d0;
  font-size: 13px;
  margin: 0;
}

.site-footer .footer-social {
  flex: 1;
  min-width: 0;
  text-align: right;
}

.site-footer .footer-social h3 {
  color: #ffffff;
  font-size: 17px;
  margin: 0 0 13px;
}

.site-footer .social-icons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 11px;
}

.site-footer .social-icons a {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d5d9e5;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 11px;
  text-decoration: none;
  transition: 0.2s ease;
  box-sizing: border-box;
}

.site-footer .social-icons a:hover {
  color: #ffffff;
  background: #6878df;
  border-color: #6878df;
  transform: translateY(-3px);
}

.site-footer .social-icons svg {
  width: 21px;
  height: 21px;
  display: block;
}

.site-footer .social-icons .footer-portfolio {
  background: #6878df;
  color: #ffffff;
  border-color: #6878df;
}

.site-footer .social-icons .footer-portfolio:hover {
  background: #5264d0;
  border-color: #5264d0;
}

.site-footer .footer-bottom {
  width: 100%;
  max-width: 1100px;
  box-sizing: border-box;
  margin: 22px auto 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  text-align: center;
}

.site-footer .footer-bottom h3 {
  color: #ffffff;
  font-size: 19px;
  letter-spacing: 2px;
  margin: 0 0 5px;
}

.site-footer .footer-bottom p {
  color: #aeb8d0;
  margin: 4px 0;
  font-size: 13px;
}

/* Tablet */
@media (max-width: 850px) {
  .site-footer {
    padding: 26px 18px 13px;
  }

  .site-footer .footer-main {
    gap: 20px;
  }

  .site-footer .social-icons {
    gap: 9px;
  }

  .site-footer .social-icons a {
    width: 40px;
    height: 40px;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .site-footer {
    width: 100%;
    margin: 25px 0 0;
    padding: 25px 15px 14px;
  }

  .site-footer .footer-main {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 24px;
  }

  .site-footer .footer-profile {
    width: 100%;
    text-align: center;
  }

  .site-footer .footer-avatar {
    margin: 0 auto 10px;
  }

  .site-footer .footer-social {
    width: 100%;
    text-align: center;
  }

  .site-footer .social-icons {
    justify-content: center;
    gap: 10px;
    max-width: 100%;
  }

  .site-footer .social-icons a {
    width: 40px;
    height: 40px;
  }

  .site-footer .footer-bottom {
    margin-top: 22px;
    padding-top: 14px;
  }

  .site-footer .footer-bottom h3 {
    font-size: 17px;
    letter-spacing: 1.5px;
  }
}

/* Small Mobile */
@media (max-width: 360px) {
  .site-footer {
    padding-left: 10px;
    padding-right: 10px;
  }

  .site-footer .social-icons {
    gap: 8px;
  }

  .site-footer .social-icons a {
    width: 38px;
    height: 38px;
  }
}

/* Compact Footer Height */
.site-footer {
  padding-top: 18px;
  padding-bottom: 6px;
  margin-top: 22px;
}

.site-footer .footer-avatar {
  width: 65px;
  height: 65px;
  margin-bottom: 6px;
}

.site-footer .footer-social h3 {
  margin-bottom: 9px;
}

.site-footer .footer-bottom {
  margin-top: 12px;
  padding-top: 9px;
}

.site-footer .footer-bottom h3 {
  margin-bottom: 3px;
}

.site-footer .footer-bottom p {
  margin: 3px 0;
}

@media (max-width: 600px) {
  .site-footer .footer-main {
    gap: 16px;
  }

  .site-footer .footer-bottom {
    margin-top: 14px;
  }
}

/* Extra Compact Footer */
.site-footer {
  padding-top: 12px;
  padding-bottom: 4px;
  margin-top: 18px;
}

.site-footer .footer-avatar {
  width: 55px;
  height: 55px;
  font-size: 19px;
  margin-bottom: 4px;
}

.site-footer .footer-profile h3 {
  font-size: 17px;
  margin-bottom: 3px;
}

.site-footer .developer-credit {
  margin-bottom: 0;
}

.site-footer .footer-social h3 {
  margin-bottom: 7px;
}

.site-footer .social-icons a {
  width: 38px;
  height: 38px;
}

.site-footer .footer-bottom {
  margin-top: 9px;
  padding-top: 7px;
}

.site-footer .footer-bottom h3 {
  font-size: 17px;
  margin-bottom: 2px;
}

.site-footer .footer-bottom p {
  margin: 2px 0;
  font-size: 12px;
}

@media (max-width: 600px) {
  .site-footer .footer-main {
    gap: 12px;
  }

  .site-footer .footer-bottom {
    margin-top: 10px;
  }
}

/* =========================================
   RESPONSIVE HAMBURGER NAVIGATION
   Only affects the main site header
========================================= */

.site-header .nav {
  flex-wrap: nowrap;
}

.site-header .navigation-panel {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  gap: 28px;
  min-width: 0;
}

.site-header .main-navigation {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-header .menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.site-header .menu-toggle span {
  display: block;
  width: 21px;
  height: 2px;
  border-radius: 2px;
  background: var(--navy);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.site-header .menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header .menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.site-header .menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 900px) {
  .site-header .nav {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .site-header .menu-toggle {
    display: flex;
    margin-left: auto;
  }

  .site-header .navigation-panel {
    display: flex;
    flex: 0 0 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.35s ease;
  }

  .site-header .navigation-panel.is-open {
    max-height: 700px;
    padding-top: 12px;
    padding-bottom: 12px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .site-header .main-navigation {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 16px;
    font-size: 14px;
  }

  .site-header .nav-user {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    width: 100%;
    gap: 14px;
  }

  .site-header .nav-user>a,
  .site-header .nav-user>form {
    max-width: 100%;
  }

  .site-header .nav-user .logout-form {
    margin: 0;
  }
}

/* =========================================================
   MOBILE RESPONSIVE OVERRIDES — site-wide safety layer
   Covers content pages, author tools and admin screens.
========================================================= */
html {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  width: 100%;
  min-width: 320px;
  max-width: 100%;
  overflow-x: clip;
}

main, section, article, aside, header, footer, form,
.container, .content-layout, .main-content, .sidebar,
.dashboard-page, .dashboard-content, .profile-card,
.create-post-container, .edit-post-container {
  min-width: 0;
  max-width: 100%;
}

img, video, iframe, canvas, svg {
  max-width: 100%;
}

input, textarea, select, button {
  max-width: 100%;
}

input:not([type="checkbox"]):not([type="radio"]),
textarea, select {
  min-width: 0;
}

pre, code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

table {
  max-width: 100%;
}

@media (max-width: 900px) {
  .container {
    width: min(100% - 32px, 1160px);
  }

  .content-layout {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .main-content, .sidebar {
    width: 100%;
    min-width: 0;
  }

  .hero {
    padding: clamp(28px, 6vw, 56px) clamp(20px, 5vw, 40px);
  }

  .hero h1, h1 {
    overflow-wrap: anywhere;
  }

  .posts-grid, .post-grid, .category-grid, .explore-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-heading,
  .section-heading,
  .profile-header,
  .create-post-heading,
  .edit-post-heading {
    gap: 16px;
  }

  .admin-layout {
    min-width: 0;
  }

  .admin-main {
    min-width: 0;
  }
}

@media (max-width: 650px) {
  .container {
    width: calc(100% - 28px);
  }

  .nav {
    min-height: 64px;
  }

  .brand {
    max-width: calc(100% - 58px);
    white-space: normal;
    font-size: 14px;
    line-height: 1.25;
    letter-spacing: .7px;
  }

  .hero {
    margin-top: 16px;
    padding: 30px 20px;
    border-radius: 16px;
  }

  .hero h1, h1 {
    font-size: clamp(30px, 9vw, 44px);
    line-height: 1.12;
    letter-spacing: -1.2px;
  }

  h2 {
    font-size: clamp(20px, 6vw, 27px);
    overflow-wrap: anywhere;
  }

  .hero-copy {
    font-size: 15px;
  }

  .search-form {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .search-form input,
  .search-form button {
    width: 100%;
    min-width: 0;
  }

  .trending-topics {
    flex-wrap: wrap;
    gap: 8px;
  }

  .category-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .posts-grid, .post-grid, .category-grid, .explore-grid,
  .stats-grid, .dashboard-grid, .form-grid,
  .profile-grid, .create-post-main, .edit-post-main {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .post-card, .dashboard-card, .profile-card,
  .create-post-card, .edit-post-card {
    min-width: 0;
    width: 100%;
  }

  .dashboard-heading,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-heading > a,
  .dashboard-heading > form,
  .dashboard-heading button {
    width: 100%;
  }

  .profile-header {
    padding: 24px 16px;
  }

  .profile-header h1 {
    font-size: 25px;
  }

  .avatar {
    width: 96px;
    height: 96px;
  }

  .create-post-page, .edit-post-page {
    padding-left: 14px;
    padding-right: 14px;
  }

  .create-post-container, .edit-post-container {
    width: 100%;
    padding: 0;
  }

  .create-post-form, .edit-post-form {
    width: 100%;
  }

  .form-actions, .button-row, .post-actions {
    flex-wrap: wrap;
  }

  .form-actions > *, .button-row > * {
    flex: 1 1 100%;
    width: 100%;
  }

  .table-wrapper, .comments-table-wrapper, .users-table-wrapper,
  .recent-table-wrap, .table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 620px;
  }

  .admin-layout {
    flex-direction: column !important;
    width: 100%;
  }

  .admin-sidebar {
    position: static !important;
    width: 100% !important;
    max-width: 100%;
    padding: 18px 16px !important;
  }

  .admin-main {
    width: 100% !important;
    padding: 20px 14px !important;
  }

  .admin-topbar {
    align-items: stretch !important;
    flex-direction: column !important;
  }

  .admin-topbar h1 {
    font-size: 25px;
  }

  .admin-user {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .site-footer .footer-main {
    grid-template-columns: minmax(0, 1fr) !important;
    text-align: center;
  }

  .site-footer .footer-profile,
  .site-footer .footer-social {
    width: 100%;
  }

  .social-icons {
    justify-content: center;
    flex-wrap: wrap;
  }

  .admin-dashboard-float {
    right: 10px;
    bottom: 10px;
    max-width: calc(100vw - 20px);
  }
}

@media (max-width: 380px) {
  .container {
    width: calc(100% - 22px);
  }

  .brand {
    font-size: 12px;
  }

  .hero {
    padding: 24px 16px;
  }

  .hero h1, h1 {
    font-size: 29px;
  }

  .category-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .nav-avatar {
    flex-shrink: 0;
  }
}

/* Respect reduced-motion preferences on small devices too. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

.footer-avatar {
  width: 85px;
  height: 85px;
  margin: 0 auto 12px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #ffffff;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}

.footer-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
}

/* Notifications Mobile Responsive Fix */

@media (max-width: 600px) {

  .dashboard-heading {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
  }

  .dashboard-heading form,
  .dashboard-heading form .button {
    width: 100%;
  }

  .dashboard-post {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .dashboard-post-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .dashboard-post-actions form {
    flex: 1;
    min-width: 0;
  }

  .dashboard-post-actions .button {
    width: 100%;
    box-sizing: border-box;
  }

  .dashboard-post-info h3 {
    overflow-wrap: anywhere;
  }
}