.kcenter-hero {
  background:#0d3d20;
  color: #ffffff;
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 300;
  text-align: center;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.hero-description {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.1);
}

.hero-description p {
  font-size: 1rem;
  line-height: 1.8;
  text-align: justify;
  color: rgba(255, 255, 255, 0.95);
}

/* ========================================
   Topics Section
   ======================================== */
.topics-section {
  padding: 4rem 2rem;
  background: #f9f9f9;
  min-height: 60vh;
}

.topics-container {
  max-width: 1400px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: #0d3d20;
  font-weight: 700;
  position: relative;
  padding-bottom: 1rem;
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 1rem 0;
}

.topic-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 1px 4px rgba(0, 0, 0, 0.06),
    0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.topic-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0d3d20, #a2c99d);
  transform: scaleX(0);
  transform-origin: left;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}

.topic-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.topic-card:hover::before {
  transform: scaleX(1);
}

.topic-card a {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: #1a1a1a;
  height: 100%;
  position: relative;
}

/* ========================================
   Topic Card Image
   ======================================== */
.topic-image-wrapper {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: #f6fff7;
}

.topic-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.topic-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.3) 100%
  );
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.topic-card:hover .topic-overlay {
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(15, 89, 55, 0.4) 100%
  );
}

/* ========================================
   Topic Card Content
   ======================================== */
.topic-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.topic-title {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  color: #0d3d20;
  margin-bottom: 0.75rem;
}

.topic-excerpt {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #666;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.topic-learn-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #0d3d20;
  margin-top: auto;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.topic-arrow {
  font-size: 1.2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
}

.topic-card:hover .topic-learn-more {
  color: #1a7a4f;
}

.topic-card:hover .topic-arrow {
  transform: translateX(4px);
}

/* ========================================
   Popup Modal
   ======================================== */
.popup-overlay {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  overflow-y: auto;
  padding: 2rem 1rem;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.popup-overlay.active {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.popup-modal {
  background: #ffffff;
  border-radius: 12px;
  max-width: 900px;
  width: 100%;
  position: relative;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 2rem auto;
}

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

.popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #ffffff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
  box-shadow:
    0 1px 4px rgba(0, 0, 0, 0.06),
    0 2px 8px rgba(0, 0, 0, 0.04);
  color: #666;
}

.popup-close:hover {
  background: #0d3d20;
  color: #ffffff;
  transform: rotate(90deg);
}

.popup-close:focus {
  outline: 2px solid #0d3d20;
  outline-offset: 2px;
}

/* ========================================
   Popup Header
   ======================================== */
.popup-header {
  padding: 2rem 2rem 1rem;
  border-bottom: 2px solid #f9f9f9;
}

.popup-title {
  color: #0d3d20;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.popup-intro {
  color: #666;
  font-size: 1rem;
  line-height: 1.7;
  text-align: justify;
}

/* ========================================
   Popup Body
   ======================================== */
.popup-body {
  padding: 2rem;
}

.popup-image-container {
  margin-bottom: 2rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.popup-image-container img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 400px;
}

.popup-content-section {
  margin-top: 2rem;
}

.content-heading {
  font-size: 1.3rem;
  color: #0d3d20;
  margin-bottom: 1rem;
  font-weight: 600;
  padding-left: 1rem;
  border-left: 4px solid #a2c99d;
}

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

.popup-list-item {
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: #f6fff7;
  border-radius: 8px;
  border-left: 3px solid #0d3d20;
  line-height: 1.7;
  color: #1a1a1a;
  font-size: 0.95rem;
  text-align: justify;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  padding-left: 2.5rem;
}

.popup-list-item::before {
  content: "◆";
  position: absolute;
  left: 1rem;
  color: #0d3d20;
  font-size: 0.8rem;
}

.popup-list-item:hover {
  background: #ffffff;
  box-shadow:
    0 1px 4px rgba(0, 0, 0, 0.06),
    0 2px 8px rgba(0, 0, 0, 0.04);
  transform: translateX(4px);
}

.popup-list-item.hidden {
  display: none;
}

.popup-link-item a {
  color: #0d3d20;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.popup-link-item a:hover {
  color: #1a7a4f;
  text-decoration: underline;
}

/* ========================================
   Popup Footer
   ======================================== */
.popup-footer {
  padding: 1.5rem 2rem 2rem;
  border-top: 2px solid #f9f9f9;
  margin-top: 1rem;
}

.popup-conclusion {
  color: #1a1a1a;
  font-size: 0.95rem;
  line-height: 1.7;
  text-align: justify;
  background: #f9f9f9;
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #a2c99d;
}

/* ========================================
   Scrollbar Styling
   ======================================== */
.popup-content-section::-webkit-scrollbar,
.popup-overlay::-webkit-scrollbar {
  width: 8px;
}

.popup-content-section::-webkit-scrollbar-track,
.popup-overlay::-webkit-scrollbar-track {
  background: #f9f9f9;
  border-radius: 4px;
}

.popup-content-section::-webkit-scrollbar-thumb,
.popup-overlay::-webkit-scrollbar-thumb {
  background: #a2c99d;
  border-radius: 4px;
}

.popup-content-section::-webkit-scrollbar-thumb:hover,
.popup-overlay::-webkit-scrollbar-thumb:hover {
  background: #0d3d20;
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablet - 2 columns */
@media (max-width: 1024px) {
  .topics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .topic-image-wrapper {
    height: 220px;
  }
}

/* Mobile - 1 column */
@media (max-width: 768px) {
  .kcenter-hero {
    padding: 3rem 1.5rem;
  }

  .hero-description {
    padding: 1.5rem;
  }

  .topics-section {
    padding: 3rem 1rem;
  }

  .topics-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .topic-image-wrapper {
    height: 200px;
  }

  .section-title {
    margin-bottom: 2rem;
  }

  .popup-overlay {
    padding: 1rem 0.5rem;
  }

  .popup-modal {
    margin: 1rem auto;
  }

  .popup-header,
  .popup-body,
  .popup-footer {
    padding: 1.5rem;
  }

  .popup-title {
    font-size: 1.5rem;
  }

  .content-heading {
    font-size: 1.1rem;
  }

  .popup-list-item {
    font-size: 0.9rem;
    padding: 0.85rem;
    padding-left: 2rem;
  }

  .popup-close {
    width: 36px;
    height: 36px;
    top: 0.75rem;
    right: 0.75rem;
  }
}

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

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-description p {
    font-size: 0.9rem;
  }

  .topic-content {
    padding: 1.25rem;
  }

  .topic-image-wrapper {
    height: 180px;
  }

  .popup-image-container img {
    max-height: 300px;
  }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
  .popup-overlay {
    display: none !important;
  }

  .topics-section {
    padding: 2rem 0;
  }

  .topic-card {
    break-inside: avoid;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #0d3d20;
  outline-offset: 2px;
}

/* Image loading state */
.topic-image {
  background: #f6fff7;
}

.topic-image[src=""],
.topic-image:not([src]) {
  background: linear-gradient(135deg, #f6fff7 0%, #f9f9f9 100%);
}
