/* ============================================================
   index.css — Index Pages Only (EN / TC / SC)
   ============================================================
   Load AFTER variables.css and style.css, on index pages only:

     <link rel="stylesheet" href="css/variables.css">
     <link rel="stylesheet" href="css/style.css">
     <link rel="stylesheet" href="css/index.css">  ← index only

   Do NOT load this file on any non-index page.

   Sections
   ────────
    1. Base Typography overrides
    2. Banner Icons (Flickity)
    3. Wrapper Components (News / IM / Feature)
    4. View More button
    5. News section
    6. Important Message section
    7. Mobile navbar overrides
    8. Swiper — shared setup
    9. Swiper — navigation buttons
   10. Swiper — pagination
   11. Page sections (hero, feature, hot, d-stage)
   12. D-Stage section
   13. Tabs (#im-tab, #news-tab)
   14. Media Queries (index-specific)

   NOTES
   ─────
   • --color-accent is unified to #801f6c (from variables.css).
     Original index file had #7e1d6b — change --color-accent
     in variables.css if you need to adjust the index shade.
   • .swiper-navigation-icon "color: rotate(180deg)" is a known
     bug preserved from the original.
   • div[id$="-items"] had two height values (470px vs 500px);
     500px is used here as the later/intended value.
   ============================================================ */


/* ============================================================
   1. BASE TYPOGRAPHY OVERRIDES (index pages)
   ============================================================ */

h2 {
  color: var(--color-black);
  font-size: 1.5rem;
  margin-bottom: 0;
  font-weight: bold;
  white-space: nowrap;
  padding-right: 0.5em;
}

h3 {
  font-size: 1.2rem;
}

h3.news-title {
  padding-top: 0.5rem;
}

/* Hide section header on index (shown on inner pages via style.css) */
.section-header {
  display: none;
}

.nav-tabs {
  border: 0 !important;
}


/* ============================================================
   2. BANNER ICONS (Flickity)
   ============================================================ */

#banner-icons-wrapper {
  display: block;
  background: #ccc;
  padding: 0.5em 0;
}

.banner-icons {
  width: 60%;
  margin: 0 auto;
}

.banner-icons a {
  display: inline-block;
}

.banner-icon {
  padding: 0.5em 1em;
}

.flickity-slider {
  display: flex;
  align-items: center;
}

.flickity-slider::after {
  content: "";
  min-height: inherit;
  font-size: 0;
}

.flickity-prev-next-button {
  width: 30px;
  height: 30px;
}

.flickity-prev-next-button.previous { left: -4em; }
.flickity-prev-next-button.next     { right: -4em; }


/* ============================================================
   3. WRAPPER COMPONENTS (News / Featured / IM)
   ============================================================ */

div[id$="-wrapper"] .header {
  padding: 0;
  display: flex;
  align-items: baseline;
  width: 100%;
}

div[id$="-wrapper"] .header hr {
  border-top: 0.2em solid var(--color-primary);
  width: inherit;
}

div[id$="-wrapper"] div {
  list-style: none;
}

div[id$="-wrapper"] .link-icon {
  width: 70%;
}

div[id$="-wrapper"] .feature-link {
  padding: 0;
  font-weight: bolder;
  color: var(--color-black);
}

/* NOTE: Original had two copies with heights 470px and 500px.
   Using 500px (later copy) as the intended value. */
div[id$="-items"] {
  height: 500px;
  overflow-y: scroll;
  box-shadow: none;
  border-bottom-left-radius: 0.3em;
  border-bottom-right-radius: 0.3em;
}

div[id$="-items"] .news {
  padding: 0.5em 0.3em 1.5em;
  margin: 0 0 1em 0;
  box-shadow: none;
  align-items: start;
}

div[id$="-items"] .news .news-header {
  padding: 0;
}


/* ============================================================
   4. VIEW MORE BUTTON
   ============================================================ */

.view-more {
  white-space: nowrap;
  padding: 0 0.5em;
  font-weight: bold;
  background: var(--color-white);
  transition: ease-in-out 0.3s background-color;
  border: 1px solid var(--color-primary);
}

.view-more:hover {
  background: var(--color-primary);
}

.view-more a {
  color: var(--color-primary);
  transition: ease-in-out 0.3s color;
}

.view-more a:hover {
  color: var(--color-white);
  text-decoration: none;
}

.news a {
  font-size: 1em;
}

.news-date {
  font-size: 1.3em;
  color: var(--color-accent);
  font-weight: bold;
  margin-bottom: 0.5em;
}


/* ============================================================
   5. NEWS SECTION
   ============================================================ */

#news-wrapper h2 {
  color: var(--color-primary);
}

#news-items .news {
  border-color: var(--color-teal) !important;
}


/* ============================================================
   6. IMPORTANT MESSAGE SECTION
   ============================================================ */

#im-wrapper h2    { color: var(--color-danger); }
#im-wrapper hr    { border-color: var(--color-danger); }

#im-wrapper .view-more       { border-color: var(--color-danger); }
#im-wrapper .view-more:hover { background: var(--color-danger); }
#im-wrapper .view-more a     { color: var(--color-danger); }
#im-wrapper .view-more a:hover { color: var(--color-white); }

/* ⚠ #im-news-wrapper uses two heights intentionally:
   height: 30cqw → floating overlay at wide viewports (≥1400px)
   height: 450px → stacked layout at ≤1400px (see media query below)
   Do not merge without testing both layouts. */
#im-news-wrapper {
  position: absolute;
  top: 40px;
  right: 80px;
  width: 500px;
  height: 30cqw;
  z-index: 100;
  padding: 1em 0.5em;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 1em;
  transition: var(--transition-default);
  overflow: hidden;
}

#im-news-wrapper h2[class='display-3']{
    padding: .5em;
    text-align: center;
    background: #6184d8;
    color: #fff;
    font-weight: 900;
}


#im-items {
  scrollbar-width: none;
  height: 24cqw;
  padding: 1em;
  margin-top: -1em;
}

#im-items h2 {
  padding-left: 0;
  padding-bottom: 0.5em;
  margin-bottom: 0.5em;
  border-bottom: 1px solid var(--color-accent);
  color: var(--color-text-dark);
  text-align: left;
}


/* ============================================================
   7. MOBILE NAVBAR OVERRIDES (index pages)
   ============================================================ */

#navbar-mobile .icon-youtube:hover,
#navbar-mobile .icon-search:hover {
  background: var(--color-accent);
}

#navbar-mobile .icon-youtube:hover path {
  fill: var(--color-white);
}

#navbar-mobile .icon-search:hover path {
  fill: var(--color-accent);
  stroke: white;
}

#navbar-mobile .top-nav {
  border-top: 2px solid var(--color-accent);
  border-bottom: 2px solid var(--color-accent);
  background: white;
}

#nav-bar .mang-active {
  background: var(--color-accent);
}

#nav-bar .mang-active a {
  color: var(--color-white);
}


/* ============================================================
   8. SWIPER — SHARED SETUP
   ============================================================ */

#hero-swiper,
#f-swiper,
#ht-swiper,
#icon-swiper {
  overflow: hidden;
  container-type: inline-size;
  position: relative;
}

#f-swiper,
#ht-swiper,
#icon-swiper {
  padding: 4em 0 6em;
}

/* icon-swiper overrides */
#icon-swiper {
  background: var(--color-dark);
  padding: 4em 10em;
}

#f-swiper .swiper-slide,
#ht-swiper .swiper-slide,
#icon-swiper .swiper-slide {
  width: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#f-swiper .swiper-slide img,
#ht-swiper .swiper-slide img,
#icon-swiper .swiper-slide img {
  width: auto;
  transition: all 5s ease;
  padding: 0.5em;
  background: var(--color-white);
  border-radius: 1em;
}

/* icon-swiper image override */
#icon-swiper .swiper-slide img {
  padding: 0.1em;
}

#f-swiper .swiper-slide img:hover,
#ht-swiper .swiper-slide img:hover,
#icon-swiper .swiper-slide img:hover {
  transform: scale(0.9);
}

#f-swiper .swiper-slide-active img,
#ht-swiper .swiper-slide-active img,
#icon-swiper .swiper-slide-active img {
  transform: scale(1.1);
  /* box-shadow: 0 0 10px rgba(255, 255, 255, 1);*/
  border-radius: 1em;
  z-index: 10;
}

#f-swiper .swiper-slide-active img:hover,
#ht-swiper .swiper-slide-active img:hover,
#icon-swiper .swiper-slide-active img:hover {
  transform: scale(1.3);
}

#f-swiper .swiper-slide:not(.swiper-slide-active),
#ht-swiper .swiper-slide:not(.swiper-slide-active),
#icon-swiper .swiper-slide:not(.swiper-slide-active) {
  opacity: 1;
}


/* ============================================================
   9. SWIPER — NAVIGATION BUTTONS
   ============================================================ */

/* Shared base color */
.swiper-button-next,
.swiper-button-prev {
  color: var(--color-blue);
}

.swiper-horizontal {
    .swiper-button-next, .swiper-button-prev, ~.swiper-button-next, ~.swiper-button-prev {
        top: var(--swiper-navigation-top-offset, 45%);
    }
}

/* Shared base layout */
.swiper-button-prev,
.swiper-button-next {
  padding: 0.5em;
  font-size: 5em;
  background-repeat: no-repeat;
  background-size: 50%;
  background-position: center;
  transition: var(--transition-default);
}

.swiper-button-prev {
  background-image: var(--svg-arrow-left) !important;
}

.swiper-button-next {
  background-image: var(--svg-arrow-right) !important;
}

.swiper-button-prev:hover {
  background-image: var(--svg-arrow-left-hover) !important;
}

.swiper-button-next:hover {
  background-image: var(--svg-arrow-right-hover) !important;
}


/* ============================================================
   10. SWIPER — PAGINATION
   ============================================================ */

.swiper-pagination {
  bottom: 0 !important;
  padding: 1em 0 0.5em; 
}

.swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  opacity: 1;
  background: var(--color-dark);
}

.swiper-pagination-bullet-active {
  background: var(--color-white);
}


/* ============================================================
   11. PAGE SECTIONS
   ============================================================ */

#hero-section {
  position: relative;
  /* box-shadow: var(--shadow-glow-white); */
}

#feature-section,
#hot-section,
#d-stage-section {
  padding: 1em 0;
}

#feature-section  { background-color: var(--color-yellow); }
#hot-section      { background-color: var(--color-blue); }
#d-stage-section  { background-color: var(--color-teal); background-size: cover; }

#feature-section h1,
#hot-section h1,
#d-stage-section h1,
#main-footer h1 {
  width: fit-content;
  margin: 0 auto;
  padding: 0.5em;
  color: var(--color-accent-dark);
  font-weight: 900;
  border-radius: 3em;
  background: none;;
}

#feature-section p,
#hot-section p,
#d-stage-section p {
  width: fit-content;
  margin: 0.5em auto;
  color: var(--color-accent);
  font-size: medium;
  background: var(--color-white);
  /* box-shadow: var(--shadow-nav); */
  padding: 0.5em;
}

#feature-section h1,
#hot-section h1,
#d-stage-section h1,
#main-footer h1,
.section-header h1 {
  width: 100%;
}

#hot-section h1, #footer-sitemap-wrapper h1{
  color: var(--color-white);
}


/* ============================================================
   12. D-STAGE SECTION
   ============================================================ */

#d-stage-section .row {
  max-width: 1400px;
}

#d-stage-section .ds-icon {
  text-align: center;
  padding: 1em 0 2em;
}

#d-stage-section .ds-icon .img {
  padding: 0.5em;
  background: var(--color-white);
  /* box-shadow: var(--shadow-glow-white); */
  transition: 0.2s all ease;
}

#d-stage-section .ds-icon .img:hover {
  transform: rotate(2deg);
  /* box-shadow: 0 0 0 rgba(255, 255, 255, 0.6); */
}


#d-stage-section .ds-icon h2 {
  margin: 0.5em 0 0;
  color: var(--color-accent-dark);
  background: var(--color-white);
  padding: 0.5em 0;
  /* box-shadow: var(--shadow-glow-white); */
  transition: 0.2s ease all;
  border:none;
}

#d-stage-section .ds-icon h2 a {
  display: block;
}

#d-stage-section .ds-icon h2:hover a {
  color: var(--color-white);
}

#d-stage-section .ds-icon a:hover {
  text-decoration: none;
}


/* ============================================================
   13. TABS (#im-tab, #news-tab)
   ============================================================ */

#myTab li {
  width: 50%;
}

#im-tab,
#news-tab {
  width: 100%;
  text-align: center;
  font-weight: 900;
  background: var(--color-dark);
  transition: var(--transition-default);
}

#im-tab {
  color: var(--color-blue-light);
  border: none;
}

#im-tab.active {
  background: var(--color-blue);
  color: var(--color-white);
  transform: translate(0, -20px) scale(1.1);
  /* box-shadow: var(--shadow-nav); */
  border-radius: 1em 1em 0 0;
}

#news-tab {
  color: var(--color-teal);
}

#news-tab.active {
  background: var(--color-teal);
  color: var(--color-white);
}


/* ============================================================
   14. MEDIA QUERIES — Index-specific
   ============================================================ */

/* Desktop min-width */
@media (min-width: 768px) {
  .container {
    max-width: 1140px;
  }
}

/* Mobile */
@media (min-width: 200px) and (max-width: 768px) {
  .container {
    max-width: 100%;
    margin-top: 0;
    padding: 0;
  }

  .view-more {
    border: none;
  }

  .view-more.d-sm-block {
    text-align: center;
    padding: 0;
    font-size: 1.2em;
  }

  .view-more.d-sm-block a {
    padding: 0.5em;
    display: inline-block;
    margin: 0.5em 0;
  }

  h2 {
    padding-right: 0;
  }

  div[id$="-wrapper"] .header {
    align-items: center;
    padding: 1em 0;
  }
}

/* Small mobile */
@media (min-width: 200px) and (max-width: 576px) {
  div[id$="-wrapper"] h2 {
    font-size: 1.3rem;
  }

  div[id$="-wrapper"] hr {
    display: none;
  }

  #im-news-wrapper{
    height:300px !important;
  }

  .img-fluid{
    max-width:150%;
  }

  #f-swiper, #ht-swiper, #icon-swiper {
    padding: 1em 0 3em;
  }

  #feature-section, #hot-section, #d-stage-section {
    padding: 0;
  }

    #f-swiper .swiper-slide img:hover,
    #ht-swiper .swiper-slide img:hover,
    #icon-swiper .swiper-slide img:hover {
      transform: scale(0.4);
  }

    #f-swiper .swiper-slide-active img,
    #ht-swiper .swiper-slide-active img,
    #icon-swiper .swiper-slide-active img {
      transform: scale(1);
      /* box-shadow: 0 0 10px rgba(255, 255, 255, 1);*/
      border-radius: 1em;
      z-index: 10;
  }

    #f-swiper .swiper-slide-active img:hover,
    #ht-swiper .swiper-slide-active img:hover,
    #icon-swiper .swiper-slide-active img:hover {
      transform: scale(1);
  }
}

@media (min-width: 200px) and (max-width: 1200px) {
  #im-news-wrapper h1{
    font-weight:900;
    text-align: center;
    background: var(--color-blue);
    color: var(--color-white);
    padding:.5em 0;
    position: sticky;
    top: 0;
    z-index: 99999;
  }
  .navbar-brand img{
    width:90%;
  }

}

/* Tablet */
@media (min-width: 576px) and (max-width: 1199px) {
  #right-column {
    align-items: flex-start;
    justify-content: space-around;
  }

  #im-news-wrapper{
    height:450px !important;
  }

  .img-fluid{
    max-width:130%;
  }

}

/* ⚠ #im-news-wrapper intentionally switches from floating overlay
   to stacked layout at ≤1400px. Both heights are by design. */
@media (max-width: 1400px) {
  #im-news-wrapper {
    position: relative;
    top: 0;
    right: 0;
    width: 100%;
    height: 450px;
    padding: 0;
    box-shadow: none;
    overflow-y: scroll;
    background-color: var(--color-white);
    border-radius: 0;
  }

  #im-tab.active {
    transform: none;
    border-radius: 0;
  }

  #im-tab {
    transform: none;
    border-radius: 0;
  }

  #im-items {
    height: fit-content;
    padding: 1em;
    margin-top: 0;
  }

  #im-items h2 {
    text-align: left;
  }
}

/* Ultra-wide */
@media (min-width: 1921px) {
  #im-news-wrapper {
    height: 650px;
  }

  div[id$="-items"] {
    height: 570px;
  }
}
