/* =====================================================
   KEMBANG.ASIA
   SECTION ASEAN
   Fail: CSS/asean.css

   Fungsi:
   1. Reka bentuk khusus ASEAN
   2. Grid enam kad berita
   3. Navigasi halaman kiri dan kanan
   4. Paparan desktop, tablet dan telefon

   Semua selector dihadkan kepada #asean-component.
   ===================================================== */


/* =====================================================
   MULA: ASEAN ROOT
   ===================================================== */

#asean-component {
  --asean-bg: #08080a;
  --asean-card: #121217;
  --asean-border: rgba(255, 255, 255, 0.09);
  --asean-text: #f5f5f7;
  --asean-muted: #a5a5b0;
  --asean-accent: #b96cff;

  width: 100%;
  padding: 32px 0 24px;
  color: var(--asean-text);
  background: transparent;
  box-sizing: border-box;
}

#asean-component *,
#asean-component *::before,
#asean-component *::after {
  box-sizing: border-box;
}

#asean-component .asean-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =====================================================
   TAMAT: ASEAN ROOT
   ===================================================== */


/* =====================================================
   MULA: ASEAN HEADER
   ===================================================== */

#asean-component .asean-header {
  margin-bottom: 24px;
}

#asean-component .asean-header h2 {
  margin: 0;
  color: var(--asean-text);
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.2px;
}

/* =====================================================
   TAMAT: ASEAN HEADER
   ===================================================== */


/* =====================================================
   MULA: ASEAN NEWS WRAPPER
   ===================================================== */

#asean-component .asean-news-wrapper {
  position: relative;
  width: 100%;
}

/* =====================================================
   TAMAT: ASEAN NEWS WRAPPER
   ===================================================== */


/* =====================================================
   MULA: ASEAN NEWS GRID
   Desktop: 3 kolum x 2 baris
   ===================================================== */

#asean-component .asean-news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px 22px;
  width: 100%;
  min-width: 0;
}

#asean-component .asean-status {
  grid-column: 1 / -1;
  margin: 0;
  padding: 28px 0;
  color: var(--asean-muted);
  font-size: 14px;
  text-align: center;
}

/* =====================================================
   TAMAT: ASEAN NEWS GRID
   ===================================================== */


/* =====================================================
   MULA: ASEAN NEWS CARD
   ===================================================== */

#asean-component .asean-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;

  color: var(--asean-text);
  background: var(--asean-card);

  border: 1px solid var(--asean-border);
  border-radius: 14px;

  text-decoration: none;

  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

#asean-component .asean-card:hover {
  transform: translateY(-4px);
  border-color: rgba(185, 108, 255, 0.45);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

#asean-component .asean-card:focus-visible {
  outline: 2px solid var(--asean-accent);
  outline-offset: 4px;
}

/* =====================================================
   TAMAT: ASEAN NEWS CARD
   ===================================================== */


/* =====================================================
   MULA: ASEAN IMAGE
   ===================================================== */

#asean-component .asean-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #1a1a21;
}

#asean-component .asean-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;

  transition: transform 0.35s ease;
}

#asean-component .asean-card:hover .asean-image {
  transform: scale(1.04);
}

#asean-component .asean-image-fallback {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 100%;

  color: var(--asean-accent);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 2px;
}

/* =====================================================
   TAMAT: ASEAN IMAGE
   ===================================================== */


/* =====================================================
   MULA: ASEAN CARD CONTENT
   ===================================================== */

#asean-component .asean-card-content {
  display: flex;
  flex-direction: column;
  flex: 1;

  padding: 16px;
  gap: 10px;
}

#asean-component .asean-card-title {
  margin: 0;

  color: var(--asean-text);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;

  overflow-wrap: anywhere;
}

#asean-component .asean-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;

  margin-top: auto;
  padding-top: 4px;

  color: var(--asean-muted);
  font-size: 12px;
  line-height: 1.5;
}

#asean-component .asean-card-source {
  color: var(--asean-accent);
  font-weight: 700;
}

#asean-component .asean-card-date {
  color: var(--asean-muted);
}

/* =====================================================
   TAMAT: ASEAN CARD CONTENT
   ===================================================== */


/* =====================================================
   MULA: ASEAN PAGE BUTTONS
   ===================================================== */

#asean-component .asean-page-button {
  position: absolute;
  top: 50%;
  z-index: 5;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 52px;
  height: 52px;
  padding: 0;

  color: #ffffff;
  font-size: 20px;

  background: rgba(28, 28, 36, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;

  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  cursor: pointer;

  transform: translateY(-50%);

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    opacity 0.2s ease,
    transform 0.2s ease;
}

#asean-component .asean-prev {
  left: -26px;
}

#asean-component .asean-next {
  right: -26px;
}

#asean-component .asean-prev:hover:not(:disabled) {
  transform: translate(-3px, -50%);
}

#asean-component .asean-next:hover:not(:disabled) {
  transform: translate(3px, -50%);
}

#asean-component .asean-page-button:hover:not(:disabled) {
  background: rgba(185, 108, 255, 0.9);
  border-color: rgba(185, 108, 255, 0.9);
}

#asean-component .asean-page-button:focus-visible {
  outline: 2px solid var(--asean-accent);
  outline-offset: 4px;
}

#asean-component .asean-page-button:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

/* =====================================================
   TAMAT: ASEAN PAGE BUTTONS
   ===================================================== */


/* =====================================================
   MULA: ASEAN PAGE INFO
   ===================================================== */

#asean-component .asean-page-info {
  margin-top: 24px;

  color: var(--asean-muted);
  font-size: 13px;
  font-weight: 600;

  text-align: center;
}

/* =====================================================
   TAMAT: ASEAN PAGE INFO
   ===================================================== */


/* =====================================================
   MULA: ASEAN TABLET
   ===================================================== */

@media (max-width: 900px) {
  #asean-component .asean-news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  #asean-component .asean-prev {
    left: -14px;
  }

  #asean-component .asean-next {
    right: -14px;
  }

  #asean-component .asean-page-button {
    width: 44px;
    height: 44px;
    font-size: 17px;
  }
}

/* =====================================================
   TAMAT: ASEAN TABLET
   ===================================================== */


/* =====================================================
   MULA: ASEAN MOBILE
   ===================================================== */

@media (max-width: 600px) {
  #asean-component {
    padding-top: 26px;
  }

  #asean-component .asean-container {
    padding: 0 14px;
  }

  #asean-component .asean-header {
    margin-bottom: 18px;
  }

  #asean-component .asean-news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  #asean-component .asean-card {
    border-radius: 10px;
  }

  #asean-component .asean-card-content {
    padding: 10px;
    gap: 7px;
  }

  #asean-component .asean-card-title {
    font-size: 13px;
    line-height: 1.45;
  }

  #asean-component .asean-card-meta {
    gap: 4px;
    font-size: 10px;
  }

  #asean-component .asean-page-button {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  #asean-component .asean-prev {
    left: -10px;
  }

  #asean-component .asean-next {
    right: -10px;
  }

  #asean-component .asean-page-info {
    margin-top: 18px;
    font-size: 12px;
  }
}

/* =====================================================
   TAMAT: ASEAN MOBILE
   ===================================================== */
