/* ================= ROOT / BASE ================= */

:root {
  --color-primary: #2e6f54;
  --color-primary-light: #b7e4c7;
  --color-bg: #fafaf7;
  --color-surface: #f4ede4;
  --color-muted: #cbd5c0;
  --color-text: #1e1e1e;
  --color-text-muted: #4a4a4a;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-title {
  font-size: 1.4rem;
  margin-bottom: 18px;
  color: var(--color-primary);
}

/* ================= HERO (RESTORED) ================= */

.hero-editorial {
  position: relative;
  min-height: 560px;
  margin-bottom: 84px;
}

.hero-bg {
  position: relative;
  min-height: 560px;
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(
    180deg,
    rgba(14, 30, 24, 0.65),
    rgba(14, 30, 24, 0.15)
  );
}

/* Vertical side nav */
.hero-side-nav {
  position: absolute;
  top: 140px;
  left: 36px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-link {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  position: relative;
}

.side-link.active,
.side-link:hover {
  color: white;
}

.side-link.active::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 50%;
  width: 6px;
  height: 6px;
  background: var(--color-primary-light);
  border-radius: 50%;
  transform: translateY(-50%);
}

.hero-inner {
  position: relative;
  z-index: 4;
  padding: 140px 20px 0;
  max-width: 720px;
  color: white;
  display: flex;
  flex-direction: column;
  min-height: 420px;
}

.hero-cta-text {
  align-self: flex-start;
}

.hero-notice {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  transform: translateY(50%);
  z-index: 5;
}

.hero-notice-inner {
  background: var(--color-surface);
  border-radius: 12px;
  padding: 14px 20px;
  border: 1px solid var(--color-muted);
}

.hero-notice-text {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.hero-notice-text strong {
  color: var(--color-primary);
}
.hero-notice-text a {
  color: var(--color-primary);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.hero-notice-text a:hover {
  border-color: var(--color-primary);
}

.hero-editorial[data-hero-rotator] .hero-inner {
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.hero-editorial[data-hero-rotator].is-fading .hero-inner {
  opacity: 0.35;
  transform: translateY(6px);
}

.hero-editorial[data-hero-rotator].is-entering .hero-inner {
  opacity: 1;
  transform: translateY(0);
}

.hero-dots {
  position: absolute;
  right: 32px;
  bottom: 28px;
  display: flex;
  gap: 10px;
  z-index: 6;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  cursor: pointer;
  transition: transform 0.25s ease, background-color 0.25s ease,
    border-color 0.25s ease;
}

.hero-dot.is-active {
  background: white;
  border-color: white;
  transform: scale(1.15);
}

.hero-bg.is-swapping {
  animation: heroFade 0.45s ease;
}

@keyframes heroFade {
  0% {
    opacity: 0.7;
  }
  100% {
    opacity: 1;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .hero-notice {
    transform: translateY(40%);
  }
  .hero-notice-text {
    font-size: 0.9rem;
  }
}

/* ------------------ Responsive: Hero & Carousel ------------------ */
@media (max-width: 1250px) {
  .hero-editorial {
    min-height: 420px;
    margin-bottom: 60px;
  }
  .hero-notice{
    margin-left: 30px;
  }
  .hero-bg {
    min-height: 420px;
    background-position: center top;
  }
  .hero-inner {
    padding: 80px 20px 0;
    max-width: 640px;
  }
  .hero-eyebrow {
    font-size: 0.82rem;
  }
  .hero-title {
    font-size: clamp(2.2rem, 6vw, 3.2rem);
  }
  .hero-notice {
    transform: translateY(35%);
  }
  .hero-side-nav {
    display: none;
  }

  .carousel-editorial .carousel-track {
    gap: 16px;
    padding: 8px 2px;
  }
  .carousel-editorial .carousel-slide {
    flex: 0 0 72%;
    min-width: 72%;
  }
  .carousel-editorial .carousel-slide img {
    height: 140px;
  }
}

@media (max-width: 640px) {
  .hero-editorial {
    min-height: 320px;
    margin-bottom: 44px;
  }
  .hero-bg {
    min-height: 320px;
    background-position: center center;
  }
  .hero-inner {
    padding: 28px 14px;
    max-width: 100%;
  }
  .hero-eyebrow {
    font-size: 0.78rem;
    opacity: 0.95;
  }
  .hero-title {
    font-size: 1.6rem;
    line-height: 1.12;
  }
  .hero-cta-text {
    display: inline-block;
    margin-top: 8px;
  }

  .hero-notice {
    position: static;
    transform: none;
    margin-top: 18px;
  }
  .hero-notice-inner {
    margin: 0 -20px;
    border-radius: 12px;
  }

  .hero-dots {
    position: static;
    margin: 12px 0 0 8px;
    justify-content: flex-start;
  }

  .carousel-editorial .carousel-track {
    gap: 10px;
    padding: 6px 6px;
  }
  .carousel-editorial .carousel-slide {
    flex: 0 0 88%;
    min-width: 88%;
    transform: none;
    opacity: 1;
  }
  .carousel-editorial .carousel-slide img {
    height: 180px;
    object-position: center;
  }

  .carousel-btn {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
  .carousel-btn.prev {
    left: 4px;
  }
  .carousel-btn.next {
    right: 4px;
  }

  .carousel-dots {
    margin-top: 14px;
  }
}

/* ================= CAROUSEL (UNCHANGED) ================= */

.carousel-editorial {
  position: relative;
  margin: 64px 0 28px;
}

.carousel-editorial .carousel-track {
  cursor: pointer;
  display: flex;
  gap: 24px;
  align-items: center;
  overflow: hidden;
  scroll-behavior: smooth;
  padding: 10px 4px;
}

.carousel-editorial .carousel-slide {
  flex: 0 0 36%;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.06);
  transform: scale(0.88);
  opacity: 0.55;
  transition: transform 0.6s ease, opacity 0.6s ease, box-shadow 0.6s ease;
}

.carousel-editorial .carousel-slide img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  transition: transform 0.8s ease;
}

.carousel-editorial .carousel-slide .meta {
  padding: 14px;
}

.carousel-editorial .carousel-slide.is-active {
  transform: scale(1);
  opacity: 1;
  z-index: 2;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.12);
}

.carousel-editorial .carousel-slide.is-active img {
  transform: scale(1.05);
}

.carousel-editorial .carousel-slide.is-prev,
.carousel-editorial .carousel-slide.is-next {
  transform: scale(0.94);
  opacity: 0.75;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: none;
  background: white;
  color: var(--color-primary);
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
  z-index: 5;
}

.carousel-btn.prev {
  left: -8px;
}
.carousel-btn.next {
  right: -8px;
}

/* ================= EDITORIAL LAYOUT ================= */

.editorial-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 36px;
  margin-top: 48px;
}

/* ---------- LEFT: LATEST POSTS ---------- */

.latest-posts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 1fr;
  gap: 22px;
}

.story-card {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.06);
  text-decoration: none;
  color: inherit;
  flex: 1;
  min-width: 0;
}

.story-card-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}

.story-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  flex-shrink: 0;
}

.story-content {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.story-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-primary);
}

.story-content h3 {
  margin: 8px 0;
  color: var(--color-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
  min-height: 2.6em;
  word-break: break-word;
}

.story-content p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: auto;
  line-height: 1.4;
  min-height: 2.8em;
  word-break: break-word;
}

/* ---------- PAGINATION ---------- */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--color-text);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.page-link:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.page-link.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
  pointer-events: none;
}

/* ---------- RIGHT: SIDEBAR ---------- */

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

/* Sidebar blocks - specific modifiers for easier control */

.sidebar-block {
  background: white;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.06);
}

.sidebar-block h4 {
  margin-bottom: 14px;
  color: var(--color-primary);
}

/* Follow us — gradient pill buttons */
.social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.social-btn .icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
}

.social-btn .meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.social-btn .meta strong {
  font-size: 0.95rem;
}

.social-btn .meta small {
  font-size: 0.72rem;
  opacity: 0.95;
}

.social-btn:hover {
  filter: brightness(1.03);
}

/* Platform gradients */
.social-facebook {
  background: linear-gradient(90deg, #2b69d9, #5aa2ff);
}
.social-instagram {
  background: linear-gradient(90deg, #feda75, #f09433, #d6249f, #4c68d7);
}
.social-youtube {
  background: linear-gradient(90deg, #ff4b4b, #ff0000);
}
.social-twitter {
  background: linear-gradient(90deg, #1da1f2, #73c8ff);
}
.social-tiktok {
  background: linear-gradient(90deg, #0f1724, #1f2937);
}
.social-pinterest {
  background: linear-gradient(90deg, #e74c3c, #ff7b7b);
}

/* Categories (image tiles like ref) */
.category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.category-tile {
  position: relative;
  height: 48px;
  border-radius: 999px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  text-decoration: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.category-tile::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.12));
  border-radius: inherit;
}

.category-tile span,
.category-tile em {
  position: static;
  z-index: 2;
  font-weight: 700;
}

.category-tile span {
  font-size: 0.95rem;
}

.category-tile em {
  font-style: normal;
  opacity: 0.92;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.12);
  padding: 4px 8px;
  border-radius: 999px;
}

.category-tile:hover {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}
.category-tile {
  cursor: pointer;
}

.category-tile--plain {
  background: var(--color-surface, #f4ede4);
  color: var(--color-text, #333);
  transition: background 0.3s ease;
}

.category-tile--plain::after {
  display: none;
}

.category-tile--plain:hover {
  background: var(--color-primary-light, #b7e4c7);
}

.category-tile--plain.is-active {
  background: var(--color-primary-light, #b7e4c7);
  font-weight: 600;
}

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

/* Most viewed posts mini list */
a.most-viewed-post {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  margin-bottom: 14px;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

a.most-viewed-post:hover {
  opacity: 0.75;
}

.most-viewed-post img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
}

.most-viewed-post h5 {
  margin: 0 0 4px;
  font-size: 0.9rem;
}

.most-viewed-post span {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}
.left-side {
  margin-bottom: 60px;
}
/* Responsive */

.hero-cta-text {
  display: inline-block;
  padding: 10px 28px;
  border-radius: 6px;
  background: var(--color-primary, #2e6f54);
  color: #fff;
  text-decoration: none;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  transition: background 0.2s ease;
}

.hero-cta-text:hover {
  background: #1f4d38;
  color: #fff;
}

.hero-cta-text:active {
  background: #174030;
  color: #fff;
}

/* ================= RESPONSIVE: EDITORIAL + ARTICLES ================= */

/* Tablet – sidebar drops below, articles go single-column */
@media (max-width: 980px) {
  .editorial-layout {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-top: 32px;
  }

  .latest-posts {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .editorial-sidebar {
    order: 2;
  }

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

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

/* Mobile – tighten spacing, full-width everything */
@media (max-width: 640px) {
  .editorial-layout {
    gap: 22px;
    margin-top: 20px;
  }

  .latest-posts {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .story-card {
    border-radius: 10px;
  }

  .story-card img {
    aspect-ratio: 16 / 9;
  }

  .story-content {
    padding: 14px;
  }

  .story-content h3 {
    font-size: 1rem;
  }

  .sidebar-block {
    border-radius: 10px;
    padding: 14px;
  }

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

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

  .admin-toolbar {
    margin-bottom: 12px;
  }
}