/* =====================
   Variables & Resets
   ===================== */
:root {
  /* Colors */
  --purple: #5a00a5;
  --purple-dark: #3b0070;
  --orange: #ff7a00;
  --text: #141414;
  --muted: #666;
  --border: #e9e9ee;
  --bg: #ffffff;
  --white: #ffffff;
  --black: #000000;

  /* Typography */
  --font-primary: "Poppins", system-ui, -apple-system, sans-serif;

  /* Spacing */
  --spacing-xs: 2px;
  --spacing-sm: 4px;
  --spacing-md: 8px;
  --spacing-lg: 12px;
  --spacing-xl: 16px;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Shadows */
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* =====================
   Base Styles
   ===================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-primary);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

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

a {
  color: var(--purple);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--purple-dark);
}

/* Loading States */
.loading {
  min-height: 1em;
  position: relative;
  color: transparent !important;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: var(--radius-sm);
  pointer-events: none;
  user-select: none;
  overflow: hidden;
}

.loading::after {
  content: '';
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Hero Card Loading */
#tech-featured .loading {
  min-height: 400px;
  border-radius: var(--radius-md);
}

/* News Grid Loading */
#tech-news-grid .loading {
  min-height: 300px;
  border-radius: var(--radius-md);
}

/* Sidebar List Loading */
#tech-trending .loading,
#tech-categories .loading {
  min-height: 1.5em;
  margin: 0.5em 0;
}

/* Hide loading elements when content is loaded */
.loaded .loading {
  display: none;
}

/* =====================
   Layout & Structure
   ===================== */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.container--small {
  max-width: 800px;
}

.container--medium {
  max-width: 900px;
}

.site-body {
  width: 100%;
  padding: var(--spacing-md) 0;
}

.content-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--spacing-xl);
  align-items: start;
}

.main-content {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

/* Card Components */
.hero-card {
  width: 100%;
  margin-bottom: var(--spacing-xl);
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.hero-card .cover {
  display: block;
  width: 100%;
  height: 400px;
  overflow: hidden;
}

.hero-card .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.hero-card .content {
  padding: var(--spacing-lg);
}

.hero-card .category {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-md);
  background: var(--purple);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--spacing-md);
}

.hero-card .title {
  font-size: 32px;
  line-height: 1.3;
  margin: 0 0 16px;
}

.hero-card .excerpt {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 16px;
}

.hero-card .date {
  font-size: 14px;
  color: var(--muted);
  display: block;
}

/* =====================
   Sidebar Components
   ===================== */
.sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.sidebar .card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-lg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sidebar .card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.sidebar h3 {
  font-size: 1.125rem;
  margin: 0 0 var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--border);
  color: var(--purple);
  font-weight: 600;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.sidebar li:last-child {
  border-bottom: none;
}

.sidebar a {
  color: var(--text);
  transition: color 0.2s ease;
  display: block;
  line-height: 1.4;
}

.sidebar a:hover {
  color: var(--purple);
}

/* Regions list specific styles */
#ghana-regions li {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#ghana-regions strong {
  color: var(--purple);
}

#ghana-regions .read-more {
  font-size: 12px;
  color: var(--purple);
  text-decoration: underline;
  margin-top: 4px;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .content-wrap {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    margin-top: 30px;
  }
}

/* =====================
   Page Specific Styles
   ===================== */
body.page {
  text-align: center;
}

body.page .grid {
  justify-items: center;
  align-items: start;
}

body.page .post-card {
  text-align: left;
}

body.page .post-card .meta {
  text-align: center;
}

body.page .sidebar {
  text-align: center;
}

body.page .card {
  text-align: left;
  margin: 0 auto;
}

body.page .page-header {
  text-align: center;
}

/* This duplicate anchor style is removed as it conflicts with the base anchor styles */

/* Header */
.site-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px 16px;
  border-bottom: 1px solid var(--border)
}

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  min-width: 180px
}

.brand-text {
  font-size: 24px;
  font-weight: 600;
  color: var(--purple);
  white-space: nowrap
}

.site-header .logo {
  height: 64px;
  width: auto;
  object-fit: contain;
  max-width: 100%
}

.main-nav {
  display: flex;
  gap: 14px;
  flex-wrap: nowrap;
  flex: 1;
  justify-content: center;
  margin: 0 16px;
  transition: all 0.3s ease;
}

/* Hamburger Menu Toggle Button */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.menu-toggle span {
  width: 100%;
  height: 3px;
  background: var(--text);
  border-radius: 3px;
  transition: all 0.3s ease;
  transform-origin: center;
  pointer-events: none;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

.menu-toggle:hover span,
.menu-toggle:focus span {
  background: var(--purple);
}

.menu-toggle:focus {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
  border-radius: 4px;
}

.main-nav a {
  position: relative;
  padding: 6px 0;
  color: #222;
  font-weight: 500;
  font-size: 15px;
  white-space: nowrap
}

.main-nav a.active {
  color: var(--orange)
}

/* underline indicator for nav links: hidden by default, expands on hover/focus
   and stays visible for .active links */
.main-nav a::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  right: 50%;
  height: 3px;
  background: var(--orange);
  border-radius: 2px;
  transition: left 180ms ease, right 180ms ease, opacity 160ms ease;
  opacity: 0;
}

.main-nav a:hover::after,
.main-nav a:focus::after {
  left: 0;
  right: 0;
  opacity: 1;
}

/* keep underline visible when link is the active page */
.main-nav a.active::after {
  /* hide the underline for active links but keep the link text orange */
  left: 50%;
  right: 50%;
  opacity: 0;
}

/* also ensure hovering an active link does not reveal the underline */
.main-nav a.active:hover::after,
.main-nav a.active:focus::after {
  left: 50%;
  right: 50%;
  opacity: 0;
}

.search {
  margin-left: auto
}

.search input {
  width: 210px;
  max-width: 38vw;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fafafa
}

/* Layout */
.home .hero {
  display: grid;
  /* slightly wider sidebar/hero column to match the increased container */
  grid-template-columns: 1fr 380px;
  gap: 24px;
  margin: 20px 0
}

.hero-card {
  position: relative;
  min-height: 360px;
  border: 1px solid var(--border);
  background: #fff;
  margin-bottom: 32px;
}

.hero-card .cover {
  position: absolute;
  inset: 0;
  background: #d9d9df
}

.hero-card .content {
  position: relative;
  padding: 18px;
  text-align: left;
}

.category {
  display: inline-block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--purple);
  font-weight: 600;
  margin-bottom: 8px
}

.title {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.3
}

.excerpt {
  margin: 0;
  color: var(--muted)
}

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

.ad {
  background: #f0f0f0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
}

.ad-label {
  font-size: 12px;
  color: #666;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ad-rect {
  height: 220px;
}

.ad-banner {
  height: 160px;
  margin: 20px 0;
}

.ad-slot {
  background: #f0f0f0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ad-slot.visible {
  opacity: 1;
}

/* Make top banner ad visible immediately since it's always in view */
#ad-banner-top {
  opacity: 1;
}

.ad-slot .ad-placeholder {
  font-size: 14px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 6px
}

.card h3 {
  margin: 0;
  padding: 12px 16px;
  background: var(--purple);
  color: #fff;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px
}

.card ul {
  list-style: none;
  margin: 0;
  padding: 10px 16px
}

.card li+li {
  border-top: 1px solid var(--border)
}

.card li a {
  display: block;
  padding: 12px 0;
  color: #222
}

.section {
  margin: 26px 0 32px
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-header .section-title {
  margin: 0;
}

.section-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 16px;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--purple);
  text-decoration: none;
  padding: 8px 18px;
  border: 1px solid var(--purple);
  border-radius: 999px;
}

.section-link__arrow {
  color: var(--purple);
  transition: transform 0.2s ease;
}

.section-link:hover .section-link__arrow {
  transform: translateX(4px);
}

.section-grid {
  display: grid;
  gap: 24px;
}

.section-grid .section-ad {
  grid-column: 1 / -1;
  padding: 24px;
  margin: 8px 0;
}

.grid {
  display: grid
}

.grid-2 {
  grid-template-columns: 2fr 1fr
}

.grid-3 {
  /* make primary content grids 5 columns to show 5 cards per row */
  grid-template-columns: repeat(5, 1fr)
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr)
}

.gap-lg {
  gap: 22px
}

.gap-md {
  gap: 18px
}

.post-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: #fff
}

.post-card .thumb {
  display: block;
  height: 160px;
  background: #ededf3
}

.post-card.large .thumb {
  height: 200px
}

.post-card .meta {
  padding: 12px 14px
}

.post-card .title {
  font-size: 18px
}

.post-tile .tile {
  display: block;
  height: 160px;
  border: 1px solid var(--border);
  background: #efeff5;
  border-radius: 6px
}

/* Home sections */
.section-title {
  margin: 0 0 12px;
  font-size: 18px;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #222
}

.mini-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: center
}

.mini-thumb {
  display: block;
  height: 80px;
  background: #eee;
  border: 1px solid var(--border);
  border-radius: 6px
}

.mini-title {
  margin: 0;
  font-size: 15px
}

.stack {
  display: grid;
  gap: 18px
}

/* Cookie consent banner */
.cookie-consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 18px;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.cookie-inner {
  width: 100%;
  max-width: 1100px;
  background: #111;
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  align-items: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.cookie-text {
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
}

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

.cookie-actions .cookie-manage {
  color: #fff9;
  padding: 8px 10px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.06)
}

.cookie-actions .cookie-accept {
  background: var(--purple);
  color: #fff;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer
}

.cookie-consent.hide {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s
}


/* Share Bar Styles */
.page-path {
  color: var(--purple);
  text-align: left;
  size: 12px;
}


.post-meta-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 0.5rem;
  flex-wrap: nowrap;
}

.post-meta {
  display: flex-start;
  text-align: left;
  gap: 12px;
  flex-shrink: 0;
  align-items: center;
}

.post-meta span {
  font-size: 14px;
  color: var(--purple);
}

.share-top {
  display: flex-end;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  margin: 0;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.share-bar {
  position: relative;
  right: 12px;
  display: flex;
  gap: 8px;

}

.share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  border-radius: 8px;
  font-size: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.share-button i {
  font-size: larger;
}

/* Shared button base styles */
.share-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(90, 0, 165, 0.08);
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.share-button:hover::before,
.share-button:focus::before {
  opacity: 1;
}

/* Brand color buttons for inline share */
.share-top .share-button {
  width: 36px;
  height: 36px;
  font-size: 18px;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  box-shadow: none;
  transition: all 0.2s ease;
}

.share-top .share-button:hover {
  transform: scale(1.15);
  box-shadow: none;
}

.share-top .share-button:focus {
  outline: 2px solid var(--purple);
  outline-offset: 1px;
}

.share-top .share-button[data-network="facebook"] {
  color: #1877F2;
}

.share-top .share-button[data-network="twitter"] {
  color: #1DA1F2;
}

.share-top .share-button[data-network="whatsapp"] {
  color: #25D366;
}

.share-top .share-button[data-network="telegram"] {
  color: #0088cc;
}

.share-top .share-button.copy-link {
  color: var(--orange);
}

.share-inline .share-button {
  width: 56px;
  height: 56px;
  font-size: 24px;
  font-weight: 600;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  color: #fff;
}

.share-inline .share-button:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.share-inline .share-button:focus {
  outline: 2px solid rgba(90, 0, 165, 0.4);
  outline-offset: 2px;
}

.share-inline .share-button:active {
  transform: translateY(-2px) scale(1.02);
}

/* Individual network brand colors */
.share-inline .share-button[data-network="facebook"] {
  background: linear-gradient(135deg, #1877F2 0%, #0A66C2 100%);
}

.share-inline .share-button[data-network="facebook"]:hover {
  box-shadow: 0 6px 20px rgba(24, 119, 242, 0.4);
}

.share-inline .share-button[data-network="twitter"] {
  background: linear-gradient(135deg, #1DA1F2 0%, #1991DA 100%);
}

.share-inline .share-button[data-network="twitter"]:hover {
  box-shadow: 0 6px 20px rgba(29, 161, 242, 0.4);
}

.share-inline .share-button[data-network="whatsapp"] {
  background: linear-gradient(135deg, #25D366 0%, #20BA58 100%);
}

.share-inline .share-button[data-network="whatsapp"]:hover {
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.share-inline .share-button[data-network="telegram"] {
  background: linear-gradient(135deg, #0088cc 0%, #0077B5 100%);
}

.share-inline .share-button[data-network="telegram"]:hover {
  box-shadow: 0 6px 20px rgba(0, 136, 204, 0.4);
}

.share-inline .share-button.copy-link {
  background: linear-gradient(135deg, var(--orange) 0%, #E66A00 100%);
}

.share-inline .share-button.copy-link:hover {
  box-shadow: 0 6px 20px rgba(255, 122, 0, 0.4);
}

/* Featured overlay share bar styles */
.featured--with-share .share-bar .share-button {
  width: 38px;
  height: 38px;
  font-size: 16px;
  border-radius: 6px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.featured--with-share .share-bar .share-button:hover {
  transform: translateY(-3px);
}

/* Toast notification for copy feedback */
.copy-toast {
  position: fixed;
  left: 50%;
  top: 20px;
  transform: translateX(-50%);
  background: rgba(20, 20, 20, 0.95);
  color: #fff;
  padding: 14px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9999;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.copy-toast.hide {
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.copy-toast .toast-close {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  padding: 0;
  margin-left: auto;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.copy-toast .toast-close:hover {
  opacity: 1;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  to {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
}

/* Footer */
.site-footer {
  margin-top: 36px;
  background: var(--purple);
  color: #fff
}

.footer-grid {
  display: grid;
  grid-template-columns: 220px 1fr 1fr 1fr;
  gap: 28px;
  padding: 28px 16px
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand .logo {
  height: 72px;
  width: auto;
  object-fit: contain;
  max-width: 100%
}

/* Footer brand text should be white */
.footer-brand .brand-text {
  color: #fff;
}

.footer-col h4 {
  margin: 0 0 10px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: center;
  color: var(--orange);
}

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

/* Footer grid layout */
.footer-grid {
  display: grid;
  grid-template-columns: 220px 1fr 1fr 1fr;
  gap: 28px;
  padding: 28px 16px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Footer brand/logo */
.footer-brand {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  width: 100%;
}

.footer-brand .logo {
  height: 72px;
  width: auto;
  object-fit: contain;
  max-width: 100%;
}

/* Footer columns */
.footer-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

/* Footer headings */
.footer-col h4 {
  margin: 0 0 16px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--orange);
  width: 100%;
  text-align: center;
}

/* Footer links */
.footer-col a {
  display: flex;
  color: #fff9;
  padding: 6px 0;
  justify-content: center;
  align-items: center;
  transition: color 0.2s ease;
  width: 100%;
}

.footer-col a:hover {
  color: var(--orange);
}

/* Links grid for site sections */
.links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
}

.links-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Social icons */
.footer-col:has(.socials) {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.socials {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 0 auto;
}

/* Who We Are section */
.footer-who {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

/* Copyright */
.copyright {
  text-align: center;
  padding: 16px;
  background: var(--purple-dark);
  color: #fff9;
  font-size: 14px;
}

/* Three-column grid for footer site links */
.links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 4px;
}

.links-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-col a:hover,
body.home .footer-who a:hover {
  color: var(--orange)
}

.socials {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  justify-items: center;
  justify-content: center;
}

/* Footer links: default single-column (restored) */

.socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transition: all 0.3s ease;
}

.socials i {
  font-size: 18px;
}

.socials a:hover {
  color: var(--orange);
  transform: translateY(-2px);
}

/* Ensure icon color follows the link color and turns orange on hover */
.socials a i {
  color: inherit;
  /* icon inherits the anchor color */
  transition: color 0.18s ease, transform 0.18s ease;
}

.socials a:hover i {
  color: var(--orange);
}

.copyright {
  text-align: center;
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, .2);
  font-size: 13px
}

/* Shared page layout */
.page-header {
  padding: 20px 0;
  border-bottom: 1px solid var(--border)
}

.page h1 {
  margin: 0;
  font-size: 28px
}

.content-wrap {
  display: grid;
  /* keep main column fluid and give slightly more room to the sidebar */
  grid-template-columns: 1fr 360px;
  gap: 24px;
  margin: 18px auto;
  text-align: center
}

.content-wrap .post-card {
  margin: 0 auto;
  text-align: left;
  /* Keep article text readable */
}

.content-wrap .grid {
  justify-items: center;
}

.content-wrap .section {
  text-align: center;
}

.content-wrap .sidebar {
  margin: 0 auto;
}

.wide-ad {
  height: 220px;
  margin: 40px auto;
  display: block;
}

/* Centering is achieved via .container max-width and auto margins like homepage */

/* Single post */
.single .post-title {
  margin: 10px 0 6px;
  font-size: 24px
}

.single .post-meta {
  color: var(--muted);
  font-size: 14px;
  display: flex;
  gap: 12px;
  align-items: center
}

.single .featured {
  height: 240px;
  background: #e4e2ee;
  border: 1px solid var(--border);
  border-radius: 4px
}

.single .article {
  line-height: 1.7;
  padding: 20px;
  margin-bottom: 40px;
}

.also-read {
  color: var(--purple);
  font-weight: 600
}



/* Responsive Design - Professional & Mobile-First */

/* Large Tablets and Small Desktops */
@media (max-width: 1200px) {
  .container {
    max-width: 1100px;
    padding: 0 20px;
  }

  /* Reduce 5-column grids to 3 columns for better readability */
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Reduce 4-column grids to 3 columns */
  .grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }

  .home .hero {
    grid-template-columns: 1fr 320px;
    gap: 20px;
  }

  .content-wrap {
    grid-template-columns: 1fr 320px;
    gap: 20px;
  }

  .section-grid {
    gap: 20px;
  }
}

/* Tablets */
@media (max-width: 992px) {
  .container {
    max-width: 100%;
    padding: 0 16px;
  }

  .section-grid .section-ad {
    grid-column: 1 / -1;
    padding: 20px;
  }

  /* 3-column grids become 2 columns on tablets */
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .home .hero {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .home .hero .sidebar {
    order: -1;
  }

  .content-wrap {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .content-wrap .sidebar {
    max-width: 100%;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .section-link {
    align-self: flex-end;
  }

  .hero-card {
    min-height: 300px;
  }

  .hero-card .content {
    padding: 16px;
  }

  .title {
    font-size: 20px;
  }

  .post-card .thumb {
    height: 180px;
  }

  .post-card.large .thumb {
    height: 200px;
  }
}

/* Small Tablets and Large Phones */
@media (max-width: 768px) {

  .container,
  .container--small,
  .container--medium {
    max-width: 100%;
    padding: 0 16px;
  }

  /* Header adjustments */
  .site-header {
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    position: relative;
  }

  .site-header .brand {
    padding: 4px 0;
    min-width: auto;
    flex: 0 0 auto;
    order: 1;
  }

  .site-header .logo {
    height: 50px;
  }

  /* Show hamburger menu button - positioned on the right */
  .menu-toggle {
    display: flex !important;
    order: 2;
    flex: 0 0 auto;
    margin-left: auto;
    position: relative;
    z-index: 1002;
  }

  /* Hide search on mobile initially, show when menu is open */
  .search {
    order: 4;
    width: 100%;
    margin-left: 0;
    margin-top: 12px;
    display: none;
    flex-basis: 100%;
  }

  .site-header.menu-open .search {
    display: block;
  }

  .search input {
    width: 100%;
  }

  /* Mobile Navigation Menu */
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-top: 1px solid var(--border);
    z-index: 1000;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    order: 3;
    flex-basis: 100%;
  }

  .site-header.menu-open {
    flex-wrap: wrap;
  }

  .site-header.menu-open .main-nav {
    display: flex;
    max-height: 500px;
    padding: 12px 0;
  }

  .main-nav a {
    display: block;
    padding: 14px 20px;
    font-size: 15px;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
  }

  .main-nav a:last-child {
    border-bottom: none;
  }

  .main-nav a:hover,
  .main-nav a:focus {
    background-color: #f8f8f8;
    color: var(--purple);
  }

  .main-nav a.active {
    background-color: rgba(90, 0, 165, 0.05);
    color: var(--purple);
    font-weight: 600;
  }

  .main-nav a::after {
    display: none;
  }

  /* Overlay background when menu is open */
  .site-header.menu-open::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999;
    animation: fadeIn 0.3s ease;
  }

  @keyframes fadeIn {
    from {
      opacity: 0;
    }

    to {
      opacity: 1;
    }
  }

  /* Footer adjustments */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .site-footer {
    font-size: 14px;
    text-align: center;
  }

  .footer-brand {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .footer-col,
  .footer-who {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
  }


  .footer-col h4,
  .footer-who h4 {
    text-align: center;
    width: 100%;
  }

  .links-grid {
    justify-content: center;
    text-align: center;
  }

  .links-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .links-col {
    gap: 8px;
  }

  .socials {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    justify-items: center;
    justify-content: center;
  }

  .socials a {
    width: 40px;
    height: 40px;
  }

  .socials i {
    font-size: 18px;
  }

  .footer-col:has(.socials) {
    align-items: center;
  }

  .footer-col h4 {
    text-align: center;
  }

  /* Content adjustments */
  .page-header {
    padding: 16px 0;
    font-size: 24px;
  }

  .content-wrap {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 16px 0;
  }

  .sidebar {
    margin: 0;
    gap: 16px;
    max-width: 100%;
  }

  /* Hero card adjustments */
  .hero-card {
    min-height: 280px;
    margin-bottom: 24px;
  }

  .hero-card .content {
    padding: 16px;
  }

  .hero-card .title {
    font-size: 20px;
    line-height: 1.3;
  }

  .hero-card .excerpt {
    font-size: 14px;
  }

  /* Post cards */
  .post-card,
  .card,
  .ad {
    margin: 0;
    width: 100%;
    min-width: 0;
  }

  .post-card .thumb {
    height: 200px;
  }

  .post-card.large .thumb {
    height: 220px;
  }

  .post-card .meta {
    padding: 14px 16px;
  }

  .post-card .title {
    font-size: 16px;
    line-height: 1.4;
  }

  /* Post tiles */
  .post-tile .tile {
    height: 200px;
  }

  /* Grid adjustments */
  .grid-2 {
    grid-template-columns: 1fr;
  }

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

  .section-grid {
    gap: 16px;
  }

  .section-grid .section-ad {
    padding: 16px;
    margin: 12px 0;
  }

  /* Section adjustments */
  .section {
    margin: 24px 0;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
  }

  .section-header .section-title {
    font-size: 22px;
  }

  .section-footer {
    padding-top: 12px;
  }

  .section-link {
    padding: 10px 20px;
    font-size: 14px;
  }

  /* Mini cards */
  .mini-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .mini-thumb {
    height: 120px;
  }

  .mini-title {
    font-size: 14px;
  }

  /* Gaps */
  .gap-lg,
  .gap-md {
    gap: 16px;
  }

  /* Ad adjustments */
  .ad-banner {
    height: 120px;
    margin: 16px 0;
  }

  .ad-slot {
    min-height: 100px;
  }

  .ad-rect {
    height: 200px;
  }

  /* Single post adjustments */
  .single .post-title {
    font-size: 24px;
    line-height: 1.3;
  }

  .single .post-meta {
    font-size: 13px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .single .featured {
    height: 200px;
    margin: 16px 0;
  }

  .single .article {
    font-size: 16px;
    line-height: 1.7;
  }

  .single .article img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
  }

  /* Quick picks */
  .quick-picks .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Mobile Phones */
@media (max-width: 600px) {

  .container,
  .container--small,
  .container--medium {
    padding: 0 16px;
    max-width: 100%;
  }

  .content-wrap {
    left: 0 !important;
    padding: 0 16px !important;
    margin: 0 auto;
  }

  /* Ensure all section containers have consistent padding */
  .trending-section,
  .quick-picks,
  .section,
  .main-content,
  .single .article,
  .post-content,
  .article-body,
  .post-meta-wrap {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Header */
  .site-header {
    padding: 12px 16px !important;
    gap: 10px;
  }

  .site-header .logo {
    height: 44px;
  }

  .menu-toggle {
    width: 28px;
    height: 28px;
    z-index: 1002;
  }

  .main-nav a {
    font-size: 14px;
    padding: 12px 16px;
  }

  .search input {
    font-size: 14px;
    padding: 10px 12px;
  }

  /* Footer - Mobile */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px 16px;
  }

  .footer-brand {
    justify-content: center;
    margin-bottom: 16px;
  }

  .footer-brand .logo {
    height: 60px;
  }

  .footer-col,
  .footer-who {
    align-items: center;
    text-align: center;
  }

  .links-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    max-width: 300px;
    margin: 0 auto;
  }

  .socials {
    grid-template-columns: repeat(4, 40px);
    justify-content: center;
  }

  .socials {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    justify-items: center;
    justify-content: center;
  }

  .socials a {
    width: 36px;
    height: 36px;
  }

  .socials i {
    font-size: 16px;
  }

  .footer-col:has(.socials) {
    align-items: center;
  }

  .footer-col h4 {
    text-align: center;
  }

  /* Content */
  .page-header {
    font-size: 20px;
    padding: 12px 0;
  }

  .content-wrap {
    margin: 12px 0;
    gap: 16px;
  }

  /* Hero card */
  .hero-card {
    min-height: 240px;
    margin-bottom: 20px;
  }

  .hero-card .content {
    padding: 14px;
  }

  .hero-card .title {
    font-size: 18px;
  }

  .hero-card .excerpt {
    font-size: 13px;
  }

  /* Post cards */
  .post-card .thumb {
    height: 180px;
  }

  .post-card.large .thumb {
    height: 200px;
  }

  .post-card .meta {
    padding: 12px 14px;
  }

  .post-card .title {
    font-size: 15px;
  }

  /* Post tiles */
  .post-tile .tile {
    height: 180px;
  }

  /* Grids - single column on mobile */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .section-grid {
    gap: 12px;
  }

  .section-grid .section-ad {
    padding: 12px;
    margin: 8px 0;
  }

  /* Section headers */
  .section-header .section-title {
    font-size: 20px;
  }

  .section-link {
    padding: 8px 16px;
    font-size: 13px;
  }

  /* Mini cards */
  .mini-thumb {
    height: 100px;
  }

  .mini-title {
    font-size: 13px;
  }

  /* Gaps */
  .gap-lg,
  .gap-md {
    gap: 12px;
  }

  /* Ads */
  .ad-banner {
    height: 100px;
    margin: 12px 0;
  }

  .ad-slot {
    min-height: 80px;
  }

  .ad-rect {
    height: 180px;
  }

  /* Single post */
  .single .post-title {
    font-size: 20px;
    line-height: 1.3;
  }

  .single .post-meta {
    font-size: 12px;
  }

  .single .featured {
    height: 180px;
  }

  .single .article {
    font-size: 15px;
  }

  /* Share buttons on mobile */
  .share-top {
    margin: 0;
    justify-content: flex-end;
    gap: 6px;
  }

  .share-top .share-button {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .share-inline {
    position: static;
    justify-content: center;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
    padding: 4px;
    margin: 8px 0;
    flex-wrap: wrap;
  }

  .share-inline .share-button {
    width: 44px;
    height: 44px;
    font-size: 18px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  }

  .share-inline .share-button:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  }

  .copy-toast {
    top: 12px;
    padding: 12px 16px;
    font-size: 13px;
  }

  .single .article p {
    margin-bottom: 16px;
  }

  /* Category badges */
  .category {
    font-size: 11px;
    padding: 6px 10px;
  }

  /* Card adjustments */
  .card {
    padding: 14px;
  }

  .card h3 {
    font-size: 16px;
  }

  .card li a {
    font-size: 13px;
    padding: 10px 0;
  }
}

/* Extra Small Phones */
@media (max-width: 400px) {

  .container,
  .container--small,
  .container--medium {
    padding: 0 12px !important;
  }

  .site-header {
    padding: 10px;
  }

  .site-header .logo {
    height: 40px;
  }

  .menu-toggle {
    width: 26px;
    height: 26px;
    z-index: 1002;
  }

  .main-nav a {
    font-size: 13px;
    padding: 10px 14px;
  }

  .hero-card {
    min-height: 200px;
  }

  .hero-card .title {
    font-size: 16px;
  }

  .post-card .thumb,
  .post-tile .tile {
    height: 160px;
  }

  .section-header .section-title {
    font-size: 18px;
  }

  .single .post-title {
    font-size: 18px;
  }

  .single .featured {
    height: 160px;
  }
}

.section-grid>* {
  min-width: 0;
}

/* Responsive Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Ensure all background images are responsive */
[style*="background-image"] {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Touch-friendly tap targets on mobile */
@media (max-width: 768px) {

  a,
  button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .menu-toggle {
    min-height: 44px;
    min-width: 44px;
  }

  .main-nav a {
    min-height: 44px;
  }
}

/* Prevent horizontal scroll */
html,
body {
  overflow-x: hidden;
  width: 100%;
}

/* Smooth scrolling */
/* Removed duplicate scroll-behavior property */

/* Better text rendering on mobile */
@media (max-width: 768px) {
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
  }
}

/* Cookie consent modal styles */
.cookie-modal {
  display: none;
  position: fixed;
  left: 16px;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999999;
  max-width: 720px;
}

.cookie-modal-inner {
  background: #ffffff;
  color: #111;
  padding: 18px;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.cookie-modal h3 {
  margin-top: 0;
}

.cookie-modal label {
  display: block;
  margin: 8px 0;
}

.cookie-modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  justify-content: flex-end;
}

.ad-banner,
.ad-slot,
.ad-rect,
.ad-label,
.ad-placeholder {
  display: none;
}

/* === Layout Fixes === */
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  line-height: 1.28;
}

.site-body {
  flex: 1 0 auto;
  width: 100%;
}

footer {
  flex-shrink: 0;
  width: 100%;
}

/* === Ultra Compact Layout === */

/* Smaller gaps */
.grid,
.section-grid,
.sidebar,
.stack {
  gap: 6px !important;
}

/* Compress sections */
.section {
  margin: 10px 0 !important;
}

.section-header {
  margin-bottom: 6px !important;
}

/* Cards closer together */
.post-card,
.card,
.hero-card {
  margin-bottom: 10px !important;
}

/* Reduce internal padding of cards */
.post-card .meta,
.card ul,
.card h3,
.hero-card .content {
  padding: 6px !important;
}

/* Compress hero */
.hero {
  margin: 6px 0 !important;
  gap: 8px !important;
}

.hero-card .title {
  font-size: 18px;
  margin: 4px 0 !important;
}

/* Tighter sidebar */
.sidebar li {
  padding: 4px 0 !important;
}

/* Header/nav tighter */
.site-header {
  padding: 6px 10px !important;
  gap: 8px !important;
}

.main-nav {
  gap: 6px !important;
}

/* Search compact */
.search input {
  padding: 4px 8px !important;
  width: 160px;
}

/* Hide search on mobile */
/* Hide search on mobile and tablet devices */
@media (max-width: 992px) {
  .search-icon-link {
    display: none !important;
  }

  .container .content-wrap {
    padding: 0 !important;
  }

  /* Small mobile adjustments */
  .footer-grid {
    padding: 20px 12px;
    gap: 20px;
  }

  .footer-brand {
    justify-content: flex-start;
    margin-bottom: 8px;
  }

  .footer-brand .logo {
    height: 48px;
  }

  .footer-col h4 {
    margin-bottom: 12px;
    font-size: 15px;
  }

  .container .content-wrap {
    left: 0;
    align-items: center;
    padding-left: 0;
  }

}

.main-nav a {
  padding: 0 10px !important;
}

.content-wrap .post-img {
  width: 100%;
  height: 200px;
  background-color: #f1f1f1;
  justify-content: center;

}

.content-wrap {
  left: 50px;
  align-items: left;
  padding-left: 40px;
}