/* Reset and Base Styles - Yaqeen Institute Clone */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Yaqeen Color Palette */
  --primary-green: #1a4d3a;
  --primary-green-dark: #0f2e22;
  --primary-green-light: #2d6b52;

  /* Neutral Colors */
  --white: #ffffff;
  --off-white: #fafafa;
  --light-gray: #f5f5f5;
  --gray: #e5e5e5;
  --medium-gray: #9ca3af;
  --dark-gray: #374151;
  --text-primary: #111827;
  --text-secondary: #6b7280;

  /* Accent Colors */
  --accent-orange: #f59e0b;
  --accent-blue: #3b82f6;
  --accent-red: #ef4444;

  /* Typography */
  --font-primary: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --font-serif: "Source Serif Pro", Georgia, serif;

  /* Spacing */
  --container-max-width: 1200px;
  --section-padding: 80px 0;
  --element-spacing: 24px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

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

body {
  font-family: var(--font-primary);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--white);
  overflow-x: hidden;
}

.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Respect mobile safe areas */
@supports (padding: max(0px)) {
  .header .nav-container,
  .container,
  .footer .container {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }
}

/* Navigation */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--gray);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  padding: 16px 0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 16px;
  color: var(--primary-green);
  text-decoration: none;
}

.nav-logo img {
  height: 22px;
  width: auto;
  display: block;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  padding: 8px 0;
  transition: color 0.2s ease;
}

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

.search-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
  transition: color 0.2s ease;
}

.search-btn:hover {
  color: var(--primary-green);
}

.auth-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background-color: var(--primary-green);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--primary-green-dark);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--gray);
}

.btn-outline:hover {
  background-color: var(--light-gray);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  background: linear-gradient(
    135deg,
    var(--primary-green) 0%,
    var(--primary-green-dark) 100%
  );
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(
      circle at 25% 25%,
      rgba(255, 255, 255, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 75% 75%,
      rgba(255, 255, 255, 0.05) 0%,
      transparent 50%
    );
  background-size: 200px 200px, 150px 150px;
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(2deg);
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  width: 100%;
}

.hero-text {
  color: var(--white);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-badge i {
  color: var(--accent-orange);
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 24px;
  font-family: var(--font-serif);
  overflow-wrap: anywhere;
}

.hero-subtitle {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 40px;
  opacity: 0.9;
  max-width: 90%;
}

.search-container {
  position: relative;
  margin-bottom: 40px;
}

.search-box {
  position: relative;
  max-width: 600px;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.search-input-wrapper:hover {
  box-shadow: 0 16px 34px -18px rgba(0, 0, 0, 0.45);
}

.search-input-wrapper:focus-within {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.search-icon {
  position: absolute;
  left: 20px;
  color: var(--text-secondary);
  z-index: 3;
  font-size: 18px;
  transition: color 0.2s ease;
}

.search-input-wrapper:focus-within .search-icon {
  color: var(--primary-green);
}

.search-input {
  flex: 1;
  padding: 18px 20px 18px 50px;
  border: none;
  font-size: 16px;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  caret-color: var(--primary-green);
}

.search-input::placeholder {
  color: var(--text-secondary);
}

.search-button {
  /* Visual */
  background: linear-gradient(90deg, var(--accent-orange), #ffb14a);
  color: #1d2b23;
  border: none;
  border-radius: 12px;
  padding: 14px 18px;
  min-height: 44px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 10px 22px -12px rgba(255, 177, 74, 0.45);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
  will-change: transform, box-shadow;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Hover / active / focus states */
.search-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -18px rgba(255, 177, 74, 0.45);
  filter: brightness(1.03);
}

.search-button:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px -12px rgba(0, 0, 0, 0.2);
}

.search-button:focus-visible {
  outline: none;
  box-shadow: 0 12px 30px -18px rgba(255, 177, 74, 0.45),
    0 0 0 4px rgba(26, 77, 58, 0.12);
  border-radius: 12px;
}

/* Disabled / loading state */
.search-button:disabled,
.search-button[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  pointer-events: none;
}

/* Optional small loading indicator slot */
.search-button.loading {
  pointer-events: none;
  opacity: 0.9;
}
.search-button.loading .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(29, 43, 35, 0.15);
  border-top-color: rgba(29, 43, 35, 0.9);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

/* Icon micro-animation */
.search-button i,
.search-button .icon {
  display: inline-block;
  transition: transform 180ms ease;
}
.search-button:hover i,
.search-button:hover .icon {
  transform: translateX(3px);
}

/* Responsive sizing */
@media (max-width: 768px) {
  .search-button {
    padding: 12px 14px;
    min-height: 42px;
    font-size: 14px;
    border-radius: 10px;
  }
}

.search-button i {
  transition: transform 0.2s ease;
}

.search-button:hover {
  background: var(--primary-green-dark);
  transform: translateY(-1px);
}

.search-button:hover i {
  transform: translateX(2px);
}

.search-button:active {
  transform: translateY(0);
}

.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 10;
  margin-top: 8px;
  border: 1px solid var(--gray);
  max-height: 320px;
  overflow-y: auto;
  padding: 8px 0;
}

.category-topics {
  margin-bottom: 40px;
}

.category-label {
  display: block;
  font-weight: 500;
  margin-bottom: 16px;
  opacity: 0.8;
}

.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.category-tag.active {
  background: #ffffff;
  color: var(--primary-green);
  border-color: var(--primary-green);
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.35);
}

.category-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.category-tag:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

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

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 24px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--accent-orange);
}

.stat-label {
  font-size: 14px;
  opacity: 0.8;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image-container {
  position: relative;
  width: 400px;
  height: 400px;
}

.hero-decorations {
  position: absolute;
  width: 100%;
  height: 100%;
}

.decoration {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.decoration-1 {
  width: 80px;
  height: 80px;
  top: 20%;
  left: 10%;
  animation: float 6s ease-in-out infinite;
}

.decoration-2 {
  width: 60px;
  height: 60px;
  top: 60%;
  right: 15%;
  animation: float 8s ease-in-out infinite reverse;
}

.decoration-3 {
  width: 40px;
  height: 40px;
  bottom: 20%;
  left: 20%;
  animation: float 10s ease-in-out infinite;
}

.hero-main-visual {
  position: relative;
  width: 300px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.islamic-pattern {
  width: 100%;
  height: 100%;
  animation: rotate 30s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.trending-topics {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.trending-label {
  font-weight: 500;
  color: var(--text-secondary);
}

.trending-tag {
  background: var(--white);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--gray);
  transition: all 0.2s ease;
}

.trending-tag:hover {
  background: var(--primary-green);
  color: var(--white);
  border-color: var(--primary-green);
}

/* Section Headers */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 48px;
  gap: 24px;
}

.section-title-wrapper {
  flex: 1;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-green-light);
  color: var(--white);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.section-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-family: var(--font-serif);
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.6;
  max-width: 600px;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.view-all-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: transparent;
  color: var(--primary-green);
  border: 2px solid var(--primary-green);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.view-all-btn:hover {
  background: var(--primary-green);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Spotlight Section */
.spotlight {
  padding: var(--section-padding);
  background: var(--off-white);
  position: relative;
}

.spotlight::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gray), transparent);
}

.spotlight-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  position: relative;
  align-items: stretch;
}

/* Featured Content */
.spotlight-featured {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  align-self: center; /* vertical centering within grid height */
  padding: 10px 0;
}

.featured-card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  border: 1px solid var(--gray);
}

/* Enhanced main spotlight aesthetics */
.featured-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(26, 77, 58, 0.15),
    rgba(255, 255, 255, 0)
  );
  pointer-events: none;
  z-index: 1;
  opacity: 0.7;
}

.featured-card::after {
  content: "";
  position: absolute;
  top: -40%;
  left: -40%;
  width: 180%;
  height: 180%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.25),
    transparent 60%
  );
  transform: scale(0.9);
  transition: transform 0.8s ease, opacity 0.8s ease;
  pointer-events: none;
  z-index: 1;
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.featured-card:hover::after {
  transform: scale(1);
  opacity: 0.9;
}

.featured-image {
  position: relative;
  height: 480px; /* Larger hero */
  overflow: hidden;
  isolation: isolate;
  background: #0f271f;
}
.featured-card.enhanced {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
}

.featured-badges {
  position: absolute;
  top: 18px;
  left: 18px;
  display: flex;
  gap: 10px;
  z-index: 5;
  flex-wrap: wrap;
}

.featured-badge {
  background: linear-gradient(135deg, var(--primary-green), #2d6b52);
  color: #fff;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: 40px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
  text-transform: uppercase;
}

.featured-badge.alt {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.featured-cta-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.featured-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, var(--accent-orange), #ffbb55);
  color: #1a281f;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 50px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  font-size: 14px;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.3s ease;
}

.featured-cta-btn:hover {
  background: linear-gradient(90deg, #ffbb55, var(--accent-orange));
  transform: translateY(-2px);
}

.featured-metrics {
  display: flex;
  gap: 14px;
  font-size: 13px;
  opacity: 0.9;
}

.featured-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.featured-metrics i {
  opacity: 0.85;
}

.featured-content::before {
  /* adjust accent bar position due to new size */
  top: -16px;
}

.featured-card::before {
  mix-blend-mode: overlay;
}
.featured-card::after {
  filter: blur(8px);
}

@media (max-width: 1200px) {
  .featured-image {
    height: 430px;
  }
  .featured-title {
    font-size: 30px;
  }
}
@media (max-width: 992px) {
  .featured-image {
    height: 380px;
  }
}
@media (max-width: 768px) {
  .featured-image {
    height: 320px;
  }
  .featured-title {
    font-size: 26px;
  }
}

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

.featured-card:hover .featured-image img {
  transform: scale(1.05);
}

.featured-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0.65) 80%
    ),
    linear-gradient(45deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
  display: flex;
  align-items: flex-end;
  padding: 28px 28px 30px;
  z-index: 2;
}

.featured-content {
  color: var(--white);
  width: 100%;
  position: relative;
  z-index: 3;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  animation: fadeSlideUp 0.6s ease;
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.featured-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.featured-category {
  background: var(--accent-orange);
  color: var(--white);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.featured-type {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.featured-title {
  font-size: 34px;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.2;
  letter-spacing: 0.5px;
  overflow-wrap: anywhere;
}

.featured-excerpt {
  font-size: 18px;
  opacity: 0.95;
  line-height: 1.55;
  margin-bottom: 20px;
  max-width: 820px;
}

.featured-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  opacity: 0.8;
}

/* Decorative accent bar */
.featured-content::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  width: 70px;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-green),
    var(--accent-orange)
  );
  border-radius: 2px;
}

/* Responsive tweaks */
@media (max-width: 992px) {
  .featured-image {
    height: 320px;
  }
  .featured-title {
    font-size: 30px;
  }
}
@media (max-width: 768px) {
  .spotlight-container {
    grid-template-columns: 1fr;
  }
  .featured-image {
    height: 280px;
  }
  .featured-title {
    font-size: 26px;
  }
  .featured-excerpt {
    font-size: 16px;
  }
}

/* Secondary Content */
.spotlight-secondary {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.secondary-grid {
  display: grid;
  gap: 20px;
}

.secondary-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid var(--gray);
  transition: all 0.3s ease;
  cursor: pointer;
}

.secondary-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-green-light);
}

/* No Spotlight Message */
.no-spotlight-message {
  text-align: center;
  padding: 40px 20px;
  color: var(--gray);
  background: var(--off-white);
  border-radius: var(--radius-md);
  border: 1px dashed var(--gray);
}

.no-spotlight-message h3 {
  margin-bottom: 10px;
  color: var(--text-dark);
  font-size: 1.2em;
}

.no-spotlight-message p {
  margin: 0;
  font-style: italic;
}

.secondary-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.secondary-category {
  background: var(--primary-green-light);
  color: var(--white);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.secondary-type {
  color: var(--text-secondary);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 500;
}

.secondary-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.secondary-excerpt {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.secondary-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}

.secondary-author {
  font-weight: 500;
}

.secondary-date {
  opacity: 0.8;
}

/* Spotlight Navigation */
.spotlight-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

.nav-btn {
  width: 44px;
  height: 44px;
  border: 2px solid var(--gray);
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-secondary);
}

.nav-btn:hover {
  border-color: var(--primary-green);
  color: var(--primary-green);
  transform: translateY(-2px);
}

.nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.nav-indicators {
  display: flex;
  gap: 8px;
}

.nav-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray);
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-indicator.active {
  background: var(--primary-green);
  transform: scale(1.2);
}

/* Loading States */
.loading-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  background: var(--light-gray);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray);
}

.loading-animation {
  text-align: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray);
  border-top: 3px solid var(--primary-green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loading-animation p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0;
}

.card-category {
  display: inline-block;
  background: var(--accent-orange);
  color: var(--white);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.card-type {
  display: inline-block;
  background: var(--primary-green);
  color: var(--white);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.card-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.3;
}

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

.card-excerpt {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.card-image {
  margin-top: 20px;
}

.card-image img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

/* Compass Section */
.compass-section {
  padding: 60px 0;
  background: var(--light-gray);
}

.compass-card {
  display: flex;
  align-items: center;
  gap: 32px;
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.compass-icon {
  font-size: 48px;
  color: var(--primary-green);
}

.compass-content h3 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.compass-content p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.compass-buttons {
  display: flex;
  gap: 12px;
}

/* Content Categories */
.content-categories {
  padding: 40px 0;
  background: var(--white);
  border-bottom: 1px solid var(--gray);
}

.categories-nav {
  display: flex;
  gap: 32px;
  border-bottom: 1px solid var(--gray);
  padding-bottom: 16px;
}

.category-tab {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  padding: 12px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.category-tab.active,
.category-tab:hover {
  color: var(--primary-green);
  border-bottom-color: var(--primary-green);
}

/* Papers Section */
.trending-articles {
  padding: var(--section-padding);
  background: var(--white);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.article-card {
  background: var(--white);
  border: 1px solid var(--gray);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all 0.2s ease;
}

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

.article-category {
  display: inline-block;
  background: var(--light-gray);
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.article-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.article-excerpt {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* Larger article images on desktop within the articles section */
.articles-grid .article-card .article-image {
  margin: 12px 0 16px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--light-gray);
}
.articles-grid .article-card .article-image img {
  width: 100%;
  height: 260px; /* bigger on desktop */
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}
.articles-grid .article-card:hover .article-image img {
  transform: scale(1.02);
}
@media (max-width: 1024px) {
  .articles-grid .article-card .article-image img {
    height: 220px;
  }
}
@media (max-width: 768px) {
  .articles-grid .article-card .article-image img {
    height: 190px;
  }
}

.article-author {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

/* Videos Section */
.trending-videos {
  padding: var(--section-padding);
  background: var(--off-white);
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}

.video-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

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

.video-thumbnail {
  position: relative;
  overflow: hidden;
}

.video-thumbnail img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  color: var(--white);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.video-title {
  padding: 20px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

/* eBooks Section */
.ebooks-section {
  padding: var(--section-padding);
  background: var(--white);
}

.audio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}

.audio-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

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

.audio-cover {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.audio-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.audio-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: all 0.2s ease;
}

.audio-card:hover .audio-overlay {
  background: var(--primary);
  transform: translate(-50%, -50%) scale(1.1);
}

.audio-info {
  padding: 20px;
}

.audio-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 10px 0;
  color: var(--text-dark);
  line-height: 1.4;
}

.audio-excerpt {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 10px 0;
}

.audio-duration {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

/* Newsletter Section */
.newsletter-section {
  padding: var(--section-padding);
  background: var(--light-gray);
}

.newsletter-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.newsletter-content h3 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.newsletter-features,
.member-features {
  margin-bottom: 32px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.feature-item i {
  color: var(--primary-green);
  width: 20px;
}

.newsletter-form {
  display: flex;
  gap: 12px;
}

.newsletter-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--gray);
  border-radius: var(--radius-md);
  font-size: 16px;
  outline: none;
}

.newsletter-input:focus {
  border-color: var(--primary-green);
}

/* Footer */
.footer {
  background: var(--text-primary);
  color: var(--white);
  padding: 60px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 16px;
}

.footer-logo img {
  height: 22px;
  width: auto;
  display: block;
}

/* Make logos a touch larger on wide screens */
@media (min-width: 1200px) {
  .nav-logo img,
  .footer-logo img {
    height: 40px;
  }
  .nav-logo {
    font-size: 18px;
  }
  .footer-logo {
    font-size: 18px;
  }
}

/* Reduce logo size on very small screens to preserve space */
@media (max-width: 480px) {
  .nav-logo img,
  .footer-logo img {
    height: 40px;
  }
  .nav-logo {
    gap: 6px;
    font-size: 15px;
  }
}

.footer-section h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--white);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-section ul li a {
  color: var(--medium-gray);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-section ul li a:hover {
  color: var(--white);
}

.footer-section address {
  color: var(--medium-gray);
  font-style: normal;
  font-size: 14px;
  line-height: 1.6;
  margin-top: 16px;
}

.social-links {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.social-links a {
  color: var(--medium-gray);
  font-size: 20px;
  transition: color 0.2s ease;
}

.social-links a:hover {
  color: var(--white);
}

.app-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-links img {
  width: 120px;
  height: 40px;
  object-fit: contain;
}

.footer-bottom {
  border-top: 1px solid var(--dark-gray);
  padding-top: 20px;
}

.footer-links {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--medium-gray);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom p {
  color: var(--medium-gray);
  font-size: 14px;
  line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .spotlight-grid {
    grid-template-columns: 1fr;
  }

  .newsletter-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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


@media (max-width: 768px) {
  .hero-title {
    font-size: 32px;
  }

  .compass-card {
    flex-direction: column;
    text-align: center;
  }

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

  .footer-links {
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero {
    padding: 40px 0 60px;
  }

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

  .spotlight-card,
  .article-card {
    padding: 16px;
  }

  .compass-card {
    padding: 24px;
  }

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

/* Utility Classes */
.text-center {
  text-align: center;
}

/* Ensure media is responsive */
img,
svg,
video {
  max-width: 100%;
  height: auto;
}

.mb-24 {
  margin-bottom: 24px;
}

.mb-32 {
  margin-bottom: 32px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==================== NOTIFICATIONS ==================== */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  max-width: 400px;
  padding: 0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  backdrop-filter: blur(10px);
}

.notification.show {
  transform: translateX(0);
}

.notification-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-radius: 8px;
}

.notification-success .notification-content {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.notification-error .notification-content {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.notification-warning .notification-content {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.notification-info .notification-content {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
}

.notification-message {
  flex: 1;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
}

.notification-close {
  background: none;
  border: none;
  color: currentColor;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  margin-left: 12px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.notification-close:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* ==================== ADDITIONAL MODAL STYLES ==================== */
.content-modal-large {
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
}

.search-modal-large {
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
}

.content-modal-meta {
  flex: 1;
}

.content-modal-title {
  font-size: 28px;
  font-weight: 700;
  margin: 8px 0;
  color: var(--text-primary);
  line-height: 1.3;
}

.content-modal-category {
  display: inline-block;
  background: var(--accent-green);
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.content-modal-info {
  display: flex;
  gap: 20px;
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

.content-modal-author {
  font-weight: 600;
  color: var(--primary-green);
}

.content-modal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.content-modal-body {
  padding: 30px 40px;
}

.video-player {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  margin-bottom: 20px;
  border-radius: 8px;
  overflow: hidden;
}

.video-player iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.content-text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
}

.content-text p {
  margin-bottom: 16px;
}

.content-text h1,
.content-text h2,
.content-text h3 {
  margin: 24px 0 16px 0;
  color: var(--text-primary);
}

.content-text h1 {
  font-size: 24px;
}

.content-text h2 {
  font-size: 20px;
}

.content-text h3 {
  font-size: 18px;
}

/* Search Results */
.search-results-container {
  max-height: 500px;
  overflow-y: auto;
  padding: 20px 0;
}

.search-result-item {
  padding: 20px;
  border-bottom: 1px solid var(--gray);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.search-result-item:hover {
  background-color: var(--light-gray);
}

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

.search-result-type {
  display: inline-block;
  background: var(--accent-green);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.search-result-title {
  font-size: 18px;
  font-weight: 600;
  margin: 8px 0;
  color: var(--text-primary);
}

.search-result-excerpt {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.search-result-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--medium-gray);
}

.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.no-results i {
  font-size: 48px;
  color: var(--medium-gray);
  margin-bottom: 16px;
}

.no-results h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

/* Enhanced button loading states */
.btn-loading {
  display: none;
  align-items: center;
  gap: 8px;
}

.btn-loading .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Role badges */
.role-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.role-badge.user {
  background: #e5e7eb;
  color: #374151;
}

.role-badge.sheikh {
  background: #dbeafe;
  color: #1d4ed8;
}

.role-badge.admin {
  background: #fee2e2;
  color: #dc2626;
}

/* Responsive adjustments for notifications */
@media (max-width: 768px) {
  .notification {
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .content-modal-large,
  .search-modal-large {
    max-width: 95%;
    margin: 20px auto;
  }

  .content-modal-title {
    font-size: 24px;
  }

  .content-modal-info {
    flex-direction: column;
    gap: 8px;
  }
}

/* ==================== MODALS ==================== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 2;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  padding: 30px 30px 20px;
  border-bottom: 1px solid var(--gray);
  text-align: center;
  position: relative;
}

.modal-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.modal-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--light-gray);
  color: var(--text-primary);
}

/* Sticky header for better usability on long modals */
.modal-content .modal-header {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 3;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

/* ==================== BOOKMARKS MODAL ==================== */
.bm-modal {
  max-width: 800px;
  width: 100%;
}
.bookmarks-list {
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.bm-card {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  background: #fff;
  border: 1px solid var(--gray);
  border-radius: 10px;
  overflow: hidden;
  padding: 8px;
  gap: 12px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.bm-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.bm-thumb {
  width: 80px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
}
.bm-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bm-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bm-type {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.bm-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.3;
}
.bm-meta {
  display: flex;
  gap: 10px;
  color: var(--medium-gray);
  font-size: 12px;
}
.bm-open,
.bm-remove {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 8px;
}
.bm-open:hover,
.bm-remove:hover {
  background: var(--light-gray);
  color: var(--primary-green);
}

@media (max-width: 600px) {
  .bookmarks-list {
    grid-template-columns: 1fr;
  }
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Utility visibility helpers (CSP-friendly, avoid inline styles) */
.hidden {
  display: none !important;
}
.visually-hidden {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px);
  padding: 0 !important;
  border: 0 !important;
  height: 1px !important;
  width: 1px !important;
  overflow: hidden;
}

/* Auth Forms */
.auth-form {
  padding: 20px 30px 30px;
}

.form-group {
  position: relative;
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-size: 14px;
}

.form-group input {
  width: 100%;
  padding: 12px 40px 12px 16px;
  border: 2px solid var(--gray);
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.2s ease;
  background: white;
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(26, 77, 58, 0.1);
}

.form-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--medium-gray);
  margin-top: 14px;
}

.password-toggle {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--medium-gray);
  cursor: pointer;
  padding: 4px;
  margin-top: 14px;
}

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

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  font-size: 14px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 8px;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.forgot-password {
  color: var(--primary-green);
  text-decoration: none;
  font-weight: 500;
}

.forgot-password:hover {
  text-decoration: underline;
}

.btn-full {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
}

.auth-divider {
  text-align: center;
  margin: 20px 0;
  position: relative;
}

.auth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gray);
}

.auth-divider span {
  background: white;
  padding: 0 15px;
  color: var(--text-secondary);
  font-size: 14px;
}

.auth-switch {
  text-align: center;
  font-size: 14px;
}

.auth-switch a {
  color: var(--primary-green);
  text-decoration: none;
  font-weight: 600;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* Profile Modal */
.profile-content {
  padding: 20px 30px 30px;
}

.profile-avatar-section {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  align-items: center;
}

.profile-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary-green);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  flex-shrink: 0;
}

.profile-info h3 {
  margin: 0 0 8px 0;
  color: var(--text-primary);
  font-size: 20px;
}

.profile-info p {
  margin: 0 0 12px 0;
  color: var(--text-secondary);
}

.profile-join-date {
  font-size: 12px;
  color: var(--medium-gray);
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
  padding: 20px;
  background: var(--light-gray);
  border-radius: 8px;
}

.stat-item {
  text-align: center;
}

.stat-item i {
  font-size: 24px;
  color: var(--primary-green);
  margin-bottom: 8px;
  display: block;
}

.stat-number {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.profile-btn {
  padding: 10px 16px;
  font-size: 14px;
  text-align: center;
  white-space: nowrap;
}

/* ==================== ARTICLE PAGE ==================== */
/* Body scroll lock when overlays/modals are open */
body.modal-open {
  overflow: hidden !important;
  height: 100vh;
}
html.modal-open {
  overflow: hidden !important;
  height: 100vh;
}

.article-page {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent; /* allow overlay + card shape to be visible */
  z-index: 9998;
  overflow-y: auto;
  overscroll-behavior: contain; /* prevent scroll chaining to body */
  -webkit-overflow-scrolling: touch; /* smooth inertial scrolling on iOS */
}

.article-page.active {
  display: block;
}

.article-page-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.article-page-container {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  min-height: auto; /* don't force full height so corners aren't clipped */
}

/* Tablet and up: always show all four corners of the article container */
@media (min-width: 768px) {
  .article-page.active {
    /* Center the card with a guaranteed outer gap */
    padding: 40px 24px; /* top/bottom 40, left/right 24 */
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto; /* allow scrolling even when not hovering the card */
    background: transparent; /* let the overlay tint show around corners */
    height: 100vh; /* fallback */
  }
  .article-page-container {
    border-radius: 16px;
    box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.35);
    background: white;
    margin: 0 auto;
    width: min(
      1200px,
      calc(100% - 48px)
    ); /* ensure left/right space at 100% zoom */
    box-sizing: border-box;
    max-height: calc(100vh - 80px); /* account for outer padding */
    overflow: auto; /* internal scroll */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    min-height: auto; /* override base min-height */
  }

  /* Prefer dynamic viewport units where supported to avoid 100vh quirks */
  @supports (height: 100dvh) {
    .article-page.active {
      height: 100dvh;
    }
    .article-page-container {
      max-height: calc(100dvh - 80px);
    }
  }
}

.article-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--gray);
  background: white;
  position: sticky;
  top: 0;
  z-index: 10;
}

.article-back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--primary-green);
  font-size: 16px;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.article-back-btn:hover {
  background: var(--light-gray);
}

.article-nav-actions {
  display: flex;
  gap: 12px;
}

.article-main {
  padding: 24px 16px;
}

.article-hero {
  margin-bottom: 20px;
}

.article-category-badge {
  margin-bottom: 16px;
}

.article-category-badge span {
  background: var(--primary-green);
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.article-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 20px;
}

.article-meta-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 16px;
}

.article-author-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-green);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.author-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.author-name {
  font-weight: 600;
  color: var(--text-primary);
}

.article-date {
  font-size: 14px;
  color: var(--text-secondary);
}

.article-stats-info {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.article-stats-info .stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-image-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 520px;
  overflow: hidden;
  border-radius: 12px;
}

.article-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Constrain extreme heights on very wide screens */
@media (min-width: 1280px) {
  .article-image-container {
    max-height: 600px;
  }
}

/* Ensure reasonable height on small-to-medium screens */
@media (max-width: 1024px) {
  .article-image-container {
    min-height: 200px;
    max-height: 420px;
  }
}

.article-body {
  max-width: 800px;
  margin: 0 auto;
}

.article-content {
  font-size: 18px;
  line-height: 1.8;
  color: var(--text-primary);
}

.article-content p {
  margin-bottom: 20px;
}

.article-content h1,
.article-content h2,
.article-content h3 {
  margin: 30px 0 16px 0;
  color: var(--text-primary);
}

.article-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--gray);
}

.article-sidebar {
  padding: 20px;
  background: var(--light-gray);
}

/* Mobile responsiveness for modals and article page */
@media (max-width: 768px) {
  .modal {
    padding: env(safe-area-inset-top) 0 calc(10px + env(safe-area-inset-bottom));
    align-items: flex-end;
  }

  .modal-content {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 16px 16px 0 0;
    max-height: min(92svh, 92vh);
    animation: modalSlideUp 0.28s ease-out;
  }

  .modal-header,
  .auth-form,
  .profile-content {
    padding: 20px;
  }

  .modal-close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 22px;
  }

  .auth-form {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }

  .profile-avatar-section {
    flex-direction: column;
    text-align: center;
  }

  .profile-stats {
    grid-template-columns: 1fr;
    gap: 16px;
  }

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

  .article-meta-info {
    flex-direction: column;
    align-items: flex-start;
  }

  .article-image-container {
    max-height: 240px;
    border-radius: 10px;
  }

  .article-content {
    font-size: 16px;
  }
  .article-content p {
    margin-bottom: 16px;
  }

  .article-footer {
    margin-top: 24px;
  }

  .article-page-container {
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }

  .article-nav {
    flex-direction: column;
    gap: 12px;
  }

  .content-modal-body {
    padding: 20px 25px;
  }
}

@media (max-width: 480px) {
  .content-modal-body {
    padding: 15px 20px;
  }
}

/* ==================== USER PROFILE DROPDOWN ==================== */
.user-profile-dropdown {
  position: relative;
  display: none;
}

.profile-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.profile-trigger:hover {
  background: var(--light-gray);
  border-color: var(--gray);
}

.profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-green);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.profile-trigger:hover .profile-avatar {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(26, 77, 58, 0.3);
}

.profile-name {
  font-weight: 500;
  color: var(--text-primary);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.profile-trigger i.fas.fa-chevron-down {
  font-size: 12px;
  color: var(--text-secondary);
  transition: transform 0.2s ease;
}

.profile-trigger.active i.fas.fa-chevron-down {
  transform: rotate(180deg);
}

.profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border: 1px solid var(--gray);
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  min-width: 220px;
  z-index: 1000;
  display: none;
  padding: 8px 0;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.profile-menu.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 14px;
  border-radius: 0;
  margin: 0 8px;
}

.profile-menu-item:hover {
  background: var(--light-gray);
  border-radius: 8px;
  color: var(--primary-green);
}

.profile-menu-item i {
  width: 16px;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.profile-menu-item:hover i {
  color: var(--primary-green);
}

.profile-menu-item span {
  font-weight: 500;
}

.profile-menu-divider {
  border: none;
  border-top: 1px solid var(--gray);
  margin: 8px 16px;
}

.sheikh-only-menu {
  border-top: 1px solid var(--gray);
  margin-top: 8px;
  padding-top: 8px;
}

.sheikh-only-menu .profile-menu-item {
  color: var(--primary-green);
  font-weight: 500;
}

.sheikh-only-menu .profile-menu-item:hover {
  background: rgba(26, 77, 58, 0.1);
}

.admin-only {
  display: none;
}

.user-profile-dropdown.admin .admin-only {
  display: flex;
}

/* Responsive Profile Menu */
@media (max-width: 768px) {
  .profile-menu {
    min-width: 200px;
    right: -10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  }

  .profile-name {
    max-width: 100px;
  }

  .profile-trigger {
    padding: 6px 10px;
  }

  .profile-avatar {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
}

/* ==================== LOADING PLACEHOLDERS ==================== */
.loading-placeholder {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
  font-style: italic;
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--light-gray);
  border-radius: 50%;
  border-top-color: var(--primary-green);
  animation: spin 1s ease-in-out infinite;
  margin-right: 10px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.empty-state i {
  font-size: 48px;
  color: var(--medium-gray);
  margin-bottom: 20px;
  display: block;
}

.empty-state h3 {
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.empty-state p {
  margin-bottom: 24px;
}

/* ==================== CONTENT MANAGEMENT ==================== */
.content-grid {
  display: grid;
  gap: 24px;
  margin-top: 24px;
}

.articles-grid {
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.videos-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.audio-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.infographics-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.curriculum-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

/* Content Cards for different types */

/* Responsive Design */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-visual {
    order: -1;
  }

  .hero-image-container {
    width: 300px;
    height: 300px;
  }

  .hero-main-visual {
    width: 250px;
    height: 250px;
  }

  .spotlight-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .secondary-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }

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

@media (max-width: 768px) {
  .hero {
    min-height: 70vh;
    padding: 60px 0;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 16px;
    max-width: 100%;
  }

  .search-input-wrapper {
    flex-direction: column;
  }

  .search-input {
    padding: 16px 20px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
  }

  .search-button {
    padding: 16px 24px;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    justify-content: center;
  }

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

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

  .hero-image-container {
    width: 250px;
    height: 250px;
  }

  .hero-main-visual {
    width: 200px;
    height: 200px;
  }

  .decoration-1,
  .decoration-2,
  .decoration-3 {
    width: 30px;
    height: 30px;
  }

  .spotlight {
    padding: 60px 0;
  }

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

  .featured-image {
    height: 200px;
  }

  .featured-title {
    font-size: 22px;
  }

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

  .nav-menu {
    gap: 20px;
  }

  .hamburger {
    display: block;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

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

  .search-input,
  .search-button {
    padding: 14px 16px;
  }

  .category-tag {
    padding: 8px 12px;
    font-size: 12px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .stat-number {
    font-size: 20px;
  }

  .stat-label {
    font-size: 12px;
  }

  .hero-image-container {
    width: 200px;
    height: 200px;
  }

  .hero-main-visual {
    width: 150px;
    height: 150px;
  }

  .section-title {
    font-size: 24px;
  }

  .section-subtitle {
    font-size: 14px;
  }

  .featured-card {
    margin: 0 -20px;
    border-radius: 0;
  }

  .featured-image {
    height: 180px;
  }

  .featured-overlay {
    padding: 16px;
  }

  .featured-title {
    font-size: 18px;
  }

  .featured-excerpt {
    font-size: 14px;
  }

  .secondary-card {
    padding: 16px;
  }

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

  .secondary-excerpt {
    font-size: 12px;
  }

  .nav-container {
    padding: 0 16px;
  }

  .container {
    padding: 0 16px;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .hero {
    background: #000;
    color: #fff;
  }

  .category-tag,
  .hero-badge {
    border: 2px solid currentColor;
  }

  .search-input-wrapper {
    border: 2px solid #fff;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-pattern,
  .islamic-pattern,
  .decoration,
  .loading-spinner {
    animation: none;
  }

  .search-input-wrapper:focus-within,
  .category-tag:hover,
  .featured-card:hover,
  .secondary-card:hover {
    transform: none;
  }
}

/* === Hero Redesign Overrides (Appended) === */
/* === Mobile Navigation Enhancements === */
.hamburger {
  display: none;
  width: 38px;
  height: 34px;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  position: relative;
  z-index: 1001;
}
.hamburger span {
  display: block;
  height: 4px;
  /* Use text color for visibility on light header */
  background: var(--text-primary);
  border-radius: 3px;
  transition: transform 0.4s ease, opacity 0.3s ease, width 0.3s ease;
  width: 100%;
}
.hamburger.active span:nth-child(1) {
  transform: translateY(15px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-15px) rotate(-45deg);
}

.nav-menu {
  display: flex;
  gap: 28px;
}

/* Small screen content spacing adjustments */
@media (max-width: 640px) {
  .spotlight-container {
    gap: 32px;
  }
  .secondary-grid {
    grid-template-columns: 1fr 1fr;
  }
  .article-card,
  .video-card,
  .audio-card {
    padding: 18px 18px 22px;
  }
  .article-title {
    font-size: 18px;
  }
  .video-title {
    font-size: 16px;
  }
  .featured-excerpt {
    max-width: 100%;
  }
}
.hero {
  min-height: 88vh;
  padding: 120px 0 80px;
  background: radial-gradient(
    circle at 20% 25%,
    #215e47 0%,
    #163c2d 55%,
    #10271f 100%
  );
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
      120deg,
      rgba(255, 255, 255, 0.06) 0%,
      rgba(255, 255, 255, 0) 40%
    ),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
  mix-blend-mode: overlay;
}
.hero-pattern {
  opacity: 0.35;
  filter: blur(2px) saturate(1.2);
  animation: heroDrift 30s linear infinite;
}
@keyframes heroDrift {
  0% {
    transform: scale(1) rotate(0deg);
  }
  50% {
    transform: scale(1.05) rotate(2deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}
.hero-content {
  grid-template-columns: minmax(0, 640px) 1fr;
  gap: 56px;
  align-items: flex-start;
}
.hero-text {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.hero-badge {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.15),
    rgba(255, 255, 255, 0.05)
  );
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 10px 20px;
  font-size: 13px;
  letter-spacing: 0.5px;
}
.hero-title {
  font-size: clamp(2.7rem, 4.4vw, 4.2rem);
  font-weight: 800;
  letter-spacing: 0.6px;
  line-height: 1.15;
  margin: 0;
  max-width: 16ch;
}
.hero-subtitle {
  font-size: 19px;
  max-width: 42ch;
  margin: 0;
  opacity: 0.92;
  line-height: 1.55;
}
.hero .search-container {
  margin: 0;
}
.hero .search-box {
  max-width: 680px;
}
.hero .search-input-wrapper {
  border: 2px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
}
.hero .search-input-wrapper input {
  background: transparent;
  color: #fff;
  font-weight: 500;
}
.hero .search-input-wrapper input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}
.hero .search-button {
  background: linear-gradient(90deg, var(--accent-orange), #ffb14a);
  color: #1d2b23;
  font-weight: 600;
}
.hero .search-button:hover {
  background: linear-gradient(90deg, #ffb14a, var(--accent-orange));
}
.hero .category-topics {
  background: rgba(255, 255, 255, 0.06);
  padding: 18px 22px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
}
.category-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.75px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}
.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}
.category-tag {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 10px 14px;
  border-radius: 14px;
  color: #fff;
  font-weight: 500;
  font-size: 13px;
  transition: background 0.35s ease, transform 0.35s ease;
}
.category-tag:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-3px);
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 22px;
  padding: 28px 30px;
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  backdrop-filter: blur(12px);
}
.stat-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-number {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.stat-label {
  font-size: 12px;
  letter-spacing: 0.75px;
  text-transform: uppercase;
  opacity: 0.75;
  font-weight: 600;
}
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-image-container {
  position: relative;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 1/1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #1f5c45, #15372a 70%);
  box-shadow: 0 30px 120px -25px rgba(0, 0, 0, 0.55),
    0 8px 30px -6px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}
.hero-decorations .decoration {
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-orange), #ffcc73);
  opacity: 0.18;
  animation: pulseOrb 6s ease-in-out infinite;
}
@keyframes pulseOrb {
  0%,
  100% {
    transform: scale(1) translateY(0);
  }
  50% {
    transform: scale(1.15) translateY(-12px);
  }
}
.hero-decorations .decoration-1 {
  top: 6%;
  left: 10%;
}
.hero-decorations .decoration-2 {
  bottom: 8%;
  right: 14%;
  animation-delay: 1.5s;
}
.hero-decorations .decoration-3 {
  top: 40%;
  right: -4%;
  animation-delay: 0.8s;
}
.hero-main-visual {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-main-visual svg {
  width: 72%;
  height: 72%;
  filter: drop-shadow(0 8px 26px rgba(0, 0, 0, 0.4));
}

@media (max-width: 1100px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 60px;
  }
  .hero-visual {
    order: -1;
  }
  .hero {
    padding-top: 140px;
  }
}
@media (max-width: 780px) {
  .hero-title {
    font-size: clamp(2.2rem, 6vw, 3rem);
  }
  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero-image-container {
    max-width: 360px;
  }
}
@media (max-width: 520px) {
  .hero {
    padding: 100px 0 60px;
  }
  .hero-image-container {
    max-width: 300px;
  }
  .hero-badge {
    font-size: 12px;
    padding: 8px 14px;
  }
  .hero-stats {
    padding: 22px 22px;
    gap: 18px;
  }
  .stat-number {
    font-size: 26px;
  }
}

/* Print styles */
@media print {
  .hero {
    background: none;
    color: #000;
    min-height: auto;
    padding: 20px 0;
  }

  .hero-visual,
  .search-container,
  .category-topics,
  .hero-stats {
    display: none;
  }

  .spotlight-navigation,
  .section-actions {
    display: none;
  }
}

/* === Header Redesign Overrides (User Request) === */
.header {
  backdrop-filter: blur(18px) saturate(1.6);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 24px -8px rgba(0, 0, 0, 0.08);
  transition: background 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease,
    height 0.35s ease;
}
.header.scrolled {
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 6px 30px -10px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(22px) saturate(1.8);
}
.header .hamburger span {
  background: var(--text-primary);
}
.navbar {
  padding: 10px 0;
  transition: padding 0.35s ease;
}
.header.scrolled .navbar {
  padding: 6px 0;
}
.nav-container {
  gap: 42px;
}
.nav-logo span {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.nav-menu {
  gap: 26px;
}
.nav-link {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  opacity: 0.85;
}
.nav-link:hover {
  opacity: 1;
  color: var(--primary-green);
}
.nav-link::after {
  bottom: -4px;
  height: 3px;
  border-radius: 3px;
}
.nav-link.active {
  color: var(--primary-green);
}

@media (max-width: 820px) {
  .nav-menu {
    gap: 18px;
  }
  .nav-link {
    font-size: 13px;
  }
}
@media (max-width: 620px) {
  .navbar {
    padding: 12px 0;
  }
}

/* === Enhanced Header / Section / Category Presentation (Appended) === */
.header {
  backdrop-filter: blur(16px) saturate(1.4);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: 0 4px 18px -8px rgba(0, 0, 0, 0.12);
}
.nav-link {
  position: relative;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-orange), #ffb14a);
  transition: width 0.35s ease;
  border-radius: 2px;
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 60%;
}

.section-header {
  align-items: center;
  margin-bottom: 56px;
  position: relative;
}
.section-header::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -14px;
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0));
}
.section-title {
  font-size: clamp(1.8rem, 2.6vw, 2.4rem);
  font-weight: 800;
  letter-spacing: 0.5px;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.section-title::after {
  content: "";
  width: 60px;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-green),
    var(--accent-orange)
  );
  border-radius: 4px;
  display: inline-block;
}
.section-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.55;
}
.section-actions .btn {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.categories-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  position: relative;
  padding: 8px;
  background: linear-gradient(135deg, #f5f7f6, #eef3f1);
  border: 1px solid #dfe7e4;
  border-radius: 18px;
}
.category-tab {
  position: relative;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  border-radius: 14px;
  transition: color 0.3s ease, background 0.35s ease, transform 0.35s ease;
}
.category-tab:hover {
  color: var(--primary-green);
  background: rgba(26, 77, 58, 0.08);
}
.category-tab.active {
  background: linear-gradient(90deg, var(--primary-green), #2d6b52);
  color: #fff !important;
  box-shadow: 0 6px 16px -4px rgba(26, 77, 58, 0.35);
}
.category-tab.active::after {
  content: " ";
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  background: linear-gradient(
    135deg,
    var(--primary-green),
    var(--accent-orange)
  );
  border-radius: 50%;
  box-shadow: 0 0 0 4px #fff;
}
@media (max-width: 780px) {
  .categories-nav {
    padding: 6px;
  }
  .category-tab {
    padding: 8px 14px;
    font-size: 12px;
  }
}

/* ==================== CSP-COMPLIANT HOVER EFFECTS ==================== */

/* Social Share Button Hover Effects */
.social-share-btn:hover {
  transform: translateY(-2px);
  transition: all 0.3s ease;
}

.social-share-btn[style*="#1877f2"]:hover {
  box-shadow: 0 8px 20px rgba(24, 119, 242, 0.4);
}

.social-share-btn[style*="#1da1f2"]:hover {
  box-shadow: 0 8px 20px rgba(29, 161, 242, 0.4);
}

.social-share-btn[style*="#0077b5"]:hover {
  box-shadow: 0 8px 20px rgba(0, 119, 181, 0.4);
}

.social-share-btn[style*="#6b7280"]:hover {
  box-shadow: 0 8px 20px rgba(107, 114, 128, 0.4);
}

/* Load More Button Hover Effects */
.load-more-hover:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 30px rgba(234, 88, 12, 0.5) !important;
  transition: all 0.3s ease;
}

/* General Button Hover Reset */
.social-share-btn:not(:hover),
.load-more-hover:not(:hover) {
  transform: translateY(0) scale(1);
  transition: all 0.3s ease;
}

/* Related Article and Spotlight Card Cursors */
.related-article,
.spotlight-card {
  cursor: pointer;
}

.related-article:hover,
.spotlight-card:hover {
  transform: translateY(-2px);
  transition: all 0.3s ease;
}

/* Publisher Button Styles */
.btn-edit:hover,
.btn-delete:hover,
.cancel-btn:hover {
  transform: translateY(-1px);
  transition: all 0.2s ease;
}

/* Article Thumbnail Styles */
.article-content .article-image {
  width: 100%;
  height: 80px !important;
  max-height: 80px !important;
  background: var(--quaternary-dark);
  position: relative;
  overflow: hidden;
  display: block;
  border-radius: 8px;
  margin: 0.5rem 0;
  aspect-ratio: 16/9;
  min-width: 120px;
}

.article-content .article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  border-radius: 6px;
}

.article-content .article-image .fallback-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--gold);
  font-size: 1.5rem;
  z-index: 1;
  opacity: 0.7;
}

/* === Enhanced Content Card Overrides (Appended) === */
.article-card {
  background: var(--white);
  border: 1px solid var(--gray);
  border-radius: 20px;
  padding: 24px 24px 26px;
  transition: all 0.35s cubic-bezier(0.4, 0.2, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.article-card:hover {
  box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.15);
  transform: translateY(-6px);
  border-color: rgba(0, 0, 0, 0.08);
}
.article-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(26, 77, 58, 0.08),
    rgba(255, 255, 255, 0)
  );
  opacity: 0;
  transition: opacity 0.4s ease;
}
.article-card:hover::before {
  opacity: 1;
}
.article-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 14px;
  line-height: 1.35;
  letter-spacing: 0.3px;
}
.article-excerpt {
  color: var(--text-secondary);
  line-height: 1.58;
  margin: 0 0 18px;
  font-size: 15px;
}
.article-author {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}
.article-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: auto;
}
.article-meta {
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--off-white);
  border-radius: 40px;
  font-weight: 500;
}
.article-image {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin: 0 0 18px;
  background: #0f271f;
  height: 200px !important;
  max-height: 200px !important;
}
.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}
.article-card:hover .article-image img {
  transform: scale(1.07);
}
.article-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 40%,
    rgba(0, 0, 0, 0.35)
  );
  opacity: 0.6;
  mix-blend-mode: multiply;
}
.fallback-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--primary-green);
  font-size: 46px;
  opacity: 0.4;
}

.video-card {
  background: var(--white);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0.2, 0.2, 1);
  border: 1px solid var(--gray);
  position: relative;
}
.video-card:hover {
  box-shadow: 0 18px 42px -12px rgba(0, 0, 0, 0.25);
  transform: translateY(-6px);
  border-color: rgba(0, 0, 0, 0.1);
}
.video-thumbnail img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.video-card:hover .video-thumbnail img {
  transform: scale(1.08);
}
.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  backdrop-filter: blur(4px);
  box-shadow: 0 6px 18px -4px rgba(0, 0, 0, 0.4);
  transition: transform 0.45s ease, background 0.45s ease;
}
.video-card:hover .play-button {
  transform: translate(-50%, -50%) scale(1.12);
  background: rgba(0, 0, 0, 0.75);
}
.video-title {
  padding: 18px 20px 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin: 0;
}
.video-meta-row {
  display: flex;
  gap: 12px;
  padding: 12px 20px 20px;
  font-size: 12px;
  flex-wrap: wrap;
}
.video-meta {
  background: var(--off-white);
  padding: 4px 10px;
  border-radius: 40px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.audio-card {
  background: var(--white);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0.2, 0.2, 1);
  border: 1px solid var(--gray);
  position: relative;
}
.audio-card:hover {
  box-shadow: 0 18px 42px -12px rgba(0, 0, 0, 0.25);
  transform: translateY(-6px);
  border-color: rgba(0, 0, 0, 0.1);
}
.audio-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.audio-card:hover .audio-cover img {
  transform: scale(1.08);
}
.audio-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  transition: transform 0.45s ease, background 0.45s ease;
  backdrop-filter: blur(4px);
  box-shadow: 0 6px 18px -4px rgba(0, 0, 0, 0.4);
}
.audio-card:hover .audio-overlay {
  background: rgba(0, 0, 0, 0.75);
  transform: translate(-50%, -50%) scale(1.15);
}
.audio-info {
  padding: 18px 22px 22px;
}
.audio-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: var(--text-dark);
  line-height: 1.35;
}
.audio-excerpt {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 14px 0;
}
.audio-duration {
  display: inline-flex;
  background: var(--primary-green);
  color: #fff;
  padding: 6px 12px;
  border-radius: 40px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

@media (max-width: 600px) {
  .article-image {
    height: 160px !important;
  }
  .video-thumbnail img {
    height: 180px;
  }
}

/* === Content Modal Redesign === */
.cm-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 4rem 1rem 2rem;
  z-index: 2000;
  font-family: var(--font-primary);
  overscroll-behavior: contain; /* isolate modal scroll */
}
.cm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(18px) saturate(1.6);
}
.cm-wrapper {
  position: relative;
  background: linear-gradient(160deg, #ffffff 0%, #f7f9fb 100%);
  width: min(1100px, 100%);
  border-radius: 28px;
  box-shadow: 0 20px 70px -25px rgba(0, 0, 0, 0.35),
    0 8px 28px -6px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: cmPop 0.55s cubic-bezier(0.16, 0.84, 0.44, 1);
}
@keyframes cmPop {
  0% {
    transform: translateY(40px) scale(0.96);
    opacity: 0;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}
.cm-header {
  padding: 2.75rem 3rem 1.5rem;
  position: relative;
}
.cm-category {
  display: inline-block;
  background: linear-gradient(
    135deg,
    var(--primary-green),
    var(--primary-green-light)
  );
  color: #fff;
  padding: 0.45rem 0.95rem;
  border-radius: 14px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 4px 14px -4px rgba(26, 77, 58, 0.4);
}
.cm-title {
  margin: 1.1rem 0 1.25rem;
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.18;
  font-size: clamp(1.9rem, 3.3vw, 2.8rem);
  background: linear-gradient(90deg, #0f2e22, #1a4d3a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cm-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}
.cm-meta {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #475569;
  background: #f1f5f9;
  padding: 0.5rem 0.85rem;
  border-radius: 100px;
}
.cm-actions {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  display: flex;
  gap: 0.6rem;
}
.cm-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  font-size: 0.95rem;
  cursor: pointer;
  transition: 0.3s box-shadow, 0.3s transform, 0.3s background, 0.3s color;
}
.cm-btn:hover {
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.18);
  transform: translateY(-4px);
  color: var(--primary-green);
}
.cm-btn.cm-close {
  background: #f8fafc;
}
.cm-btn.cm-close:hover {
  background: #fee2e2;
  color: #b91c1c;
}
.cm-body {
  padding: 0 0 3rem;
  flex: 1 1 auto; /* allow body to grow and enable inner scroll */
  min-height: 0; /* fix flex overflow clipping */
  overflow-y: auto; /* scroll inside the modal */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.cm-scroll {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 3rem;
  padding: 0 3rem 0 3rem;
}
.cm-article {
  max-width: 780px;
  margin: 0 auto;
}
.cm-hero-img {
  margin: 0 0 2.2rem;
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  line-height: 0;
  background: #0f2e22;
}
.cm-hero-img img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.03);
  transition: transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.cm-hero-img:hover img {
  transform: scale(1.06);
}
.cm-hero-img figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.85rem 1.2rem;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.55) 95%
  );
  color: #fff;
  font-weight: 600;
}
.cm-prose {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.78;
  color: #24313b;
}
.cm-p {
  margin: 0 0 1.4rem;
}
.cm-lede {
  font-size: 1.25rem;
  line-height: 1.65;
  font-weight: 500;
  position: relative;
}
.cm-lede:first-letter {
  float: left;
  font-size: 3.3rem;
  line-height: 1;
  padding: 0.35rem 0.65rem 0.25rem 0.55rem;
  margin: 0.2rem 0.85rem 0.2rem 0;
  font-weight: 700;
  background: linear-gradient(
    135deg,
    var(--primary-green),
    var(--primary-green-light)
  );
  color: #fff;
  border-radius: 18px 6px 14px 6px;
  box-shadow: 0 4px 16px -6px rgba(26, 77, 58, 0.4);
}
.cm-tags {
  margin: 2.5rem 0 1rem;
}
.cm-tags-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #475569;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cm-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.cm-tag {
  background: #eef2f6;
  color: #1a4d3a;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: 0.3s background, 0.3s color, 0.3s transform;
  cursor: pointer;
}
.cm-tag:hover {
  background: var(--primary-green);
  color: #fff;
  transform: translateY(-3px);
}
.cm-aside {
  position: sticky;
  top: 1.5rem;
  height: fit-content;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.cm-aside-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  padding: 1.4rem 1.35rem;
  box-shadow: 0 4px 18px -6px rgba(0, 0, 0, 0.08);
}
.cm-aside-box h3 {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  font-weight: 700;
  text-transform: uppercase;
  color: #1e293b;
}
.cm-aside-box ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.8rem;
  color: #475569;
  font-weight: 500;
}
.cm-aside-box li i {
  color: var(--primary-green);
  margin-right: 0.45rem;
}

@media (max-width: 1050px) {
  .cm-scroll {
    grid-template-columns: 1fr;
  }
  .cm-aside {
    position: relative;
    top: 0;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }
  .cm-aside-box {
    min-width: 220px;
  }
}
@media (max-width: 640px) {
  .cm-header {
    padding: 2.2rem 1.5rem 1.2rem;
  }
  .cm-scroll {
    padding: 0 1.5rem;
    gap: 2.2rem;
  }
  .cm-title {
    font-size: clamp(1.75rem, 5.5vw, 2.4rem);
  }
  .cm-hero-img img {
    height: 300px;
  }
}

/* Phone-focused tweaks for content modal */
@media (max-width: 768px) {
  .cm-overlay {
    align-items: flex-end;
    padding: 0;
    overscroll-behavior: none; /* fully block background bounce */
  }
  .cm-wrapper {
    width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: min(92svh, 92vh);
    animation: modalSlideUp 0.28s ease-out;
  }
  .cm-header {
    position: sticky;
    top: 0;
    padding: 1rem 1rem 0.75rem;
    background: #fff;
    z-index: 3;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
  }
  .cm-title {
    font-size: clamp(1.2rem, 5.5vw, 1.6rem);
    margin: 0.6rem 0 0.8rem;
  }
  .cm-meta-row {
    gap: 0.5rem;
  }
  .cm-meta {
    font-size: 0.65rem;
    padding: 0.4rem 0.6rem;
  }
  .cm-actions {
    top: 0.5rem;
    right: 0.5rem;
  }
  .cm-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
  .cm-body {
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
  .cm-scroll {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 0 1rem 1rem 1rem;
  }
  .cm-hero-img {
    border-radius: 16px;
    margin-bottom: 1rem;
  }
  .cm-hero-img img {
    height: 220px;
  }
  .cm-article {
    max-width: 100%;
  }
  .cm-prose {
    font-size: 1rem;
    line-height: 1.7;
  }
  .cm-aside {
    position: relative;
    top: 0;
    flex-direction: row;
    overflow-x: auto;
    gap: 0.75rem;
  }
  .cm-aside-box {
    min-width: 220px;
    border-radius: 16px;
  }
}

/* === UX polish: Hero search + Spotlight sizing overrides === */
/* Cleaner, high-contrast hero search on dark background */
.hero .search-box {
  max-width: 720px;
}
.hero .search-input-wrapper {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(229, 231, 235, 0.7);
  backdrop-filter: blur(12px) saturate(1.25);
  box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.35);
  border-radius: 14px;
  transform: none;
}
.hero .search-input-wrapper:hover {
  box-shadow: 0 18px 38px -16px rgba(0, 0, 0, 0.45);
}
.hero .search-input-wrapper:focus-within {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 4px rgba(26, 77, 58, 0.12),
    0 20px 40px -18px rgba(0, 0, 0, 0.5);
}
.hero .search-icon {
  color: var(--medium-gray);
}
.hero .search-input-wrapper:focus-within .search-icon {
  color: var(--primary-green);
}
.hero .search-input {
  color: var(--text-primary);
  background: transparent;
  font-weight: 500;
  font-size: 17px;
  padding: 18px 20px 18px 52px;
}
.hero .search-input::placeholder {
  color: #9ca3af;
}
.hero .search-button {
  background: linear-gradient(90deg, var(--accent-orange), #ffb14a);
  color: #1d2b23;
  font-weight: 700;
  padding: 18px 24px;
  box-shadow: 0 10px 22px -12px rgba(255, 177, 74, 0.65);
}
.hero .search-button:hover {
  background: linear-gradient(90deg, #ffb14a, var(--accent-orange));
  transform: translateY(-1px);
}

/* Spotlight featured: larger image and more readable overlay content */
.spotlight .featured-image {
  height: clamp(420px, 58vh, 680px);
}
.spotlight .featured-image img {
  object-position: center top;
}
.spotlight .featured-overlay {
  padding: 32px 32px 36px;
  background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0.5) 80%
    ),
    linear-gradient(45deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
}
.spotlight .featured-title {
  font-size: clamp(1.8rem, 2.8vw, 2.6rem);
}
.spotlight .featured-excerpt {
  font-size: 1.05rem;
  max-width: 60ch;
}

/* Spotlight highlights: show more lines and slightly larger text */
.spotlight-secondary .secondary-title {
  font-size: 18px;
  line-clamp: 3;
  -webkit-line-clamp: 3;
}
.spotlight-secondary .secondary-excerpt {
  font-size: 15px;
  line-clamp: 3;
  -webkit-line-clamp: 3;
}

/* === Phone-focused layout polish (non-breaking, appended) === */
@media (max-width: 600px) {
  .header .nav-container {
    padding-inline: 12px;
  }
  .hero {
    padding: 56px 0 28px;
  }
  .hero .hero-content {
    gap: 14px;
  }
  .hero .hero-title {
    font-size: 28px;
    line-height: 1.2;
  }
  .hero .hero-subtitle {
    font-size: 14px;
    color: var(--text-muted, #6b7280);
  }
  .search-bar {
    flex-wrap: nowrap;
    gap: 8px;
  }
  .search-bar input[type="text"] {
    font-size: 14px;
    padding: 12px 12px;
    height: 42px;
    min-width: 0;
    flex: 1 1 auto;
  }
  .search-bar .btn {
    height: 42px;
    padding: 0 14px;
  }
  .category-tags {
    gap: 8px;
    row-gap: 10px;
  }
  .category-tags .tag {
    padding: 6px 10px;
    font-size: 12px;
  }
  .spotlight-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .content-card .card-title {
    font-size: 16px;
  }
  .content-card .card-meta {
    font-size: 12px;
  }
  .section-title {
    font-size: 20px;
    margin-bottom: 12px;
  }
}

@media (max-width: 380px) {
  .search-bar input[type="text"] {
    font-size: 13px;
    padding: 10px 10px;
  }
  .search-bar .btn {
    padding: 0 10px;
  }
  .content-card {
    padding: 10px;
  }
}

/* Results page spacing tweaks */
.results-main .container {
  padding-top: 12px;
  padding-bottom: 24px;
}
.results-main #results-summary {
  margin-bottom: 12px;
}

/* Active state for bookmark icon on article page */
.btn.btn-icon#bookmark-article-btn.active,
button#bookmark-article-btn.active {
  color: var(--accent-orange);
}

/* Bookmarks page layout */
.bm-page {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 16px;
}
.bm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.bm-header h1 {
  font-size: 1.5rem;
  margin: 0;
}
.bm-empty {
  padding: 32px;
  text-align: center;
  color: #666;
}
