/* style/index.css */

/* Root variables for consistent theming */
:root {
  --primary-color: #F2C14E;
  --secondary-color: #FFD36B;
  --background-dark: #0A0A0A;
  --card-background: #111111;
  --text-main: #FFF6D6;
  --border-color: #3A2A12;
  --glow-color: #FFD36B;
  --button-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
}

.page-index {
  color: var(--text-main); /* Default text color for the page */
  background-color: var(--background-dark); /* Ensure contrast with body background */
}

/* 🚨 Module A: Promo Hero Section (Left image, Right content + CTA) */
.page-index__promo-hero-section {
  position: relative;
  padding-top: var(--header-offset, 120px); /* Fixed header spacing for desktop */
  padding-bottom: 60px;
  background-color: var(--background-dark);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.page-index__promo-hero-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  max-width: 1200px; /* Limit content width */
  width: 100%;
  margin: 0 20px;
}

.page-index__promo-hero-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  background-color: var(--card-background);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-index__promo-hero-media {
  width: 100%;
  height: 100%;
}

.page-index__promo-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-index__promo-hero-content {
  padding: 30px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 15px;
}

.page-index__promo-hero-title {
  font-size: clamp(2.2rem, 3.5vw, 3.2rem); /* H1 rules: clamp for responsive font size */
  font-weight: 700;
  margin: 0;
  color: var(--primary-color);
  line-height: 1.2;
  text-shadow: 0 0 8px rgba(255, 211, 107, 0.4);
}

.page-index__promo-hero-subtitle {
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  font-weight: 500;
  color: var(--text-main);
  margin: 0;
}

.page-index__promo-hero-desc {
  font-size: 1rem;
  color: #cccccc;
  line-height: 1.6;
  margin: 0;
}

.page-index__promo-hero-cta {
  display: inline-block;
  background: var(--button-gradient);
  color: #000000; /* Ensure high contrast for button text */
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 211, 107, 0.4);
}

.page-index__promo-hero-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 211, 107, 0.6);
}

/* 🚨 Module B: Carousel Section (Full-width) */
.page-index__hero-carousel-section {
  position: relative;
  width: 100vw; /* 🚨 Carousel must be full screen width */
  overflow: hidden;
  margin-bottom: 60px; /* Spacing between modules */
}

.page-index__hero-carousel {
  position: relative;
  width: 100%;
}

.page-index__hero-slides {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 40%; /* 1920x768 = 2.5 aspect ratio, 100/2.5 = 40% */
  overflow: hidden;
}

.page-index__hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: translateX(100%);
  transition: transform 0.6s ease;
  z-index: 0;
}

.page-index__hero-slide.active {
  transform: translateX(0);
  z-index: 1;
}

.page-index__hero-slide.prev {
  transform: translateX(-100%);
  z-index: 0;
}

.page-index__hero-slide a {
  display: block;
  width: 100%;
  height: 100%;
}

.page-index__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-index__hero-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 2;
}

.page-index__hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.3s ease;
}

.page-index__hero-dot.active {
  background: #ffffff;
}

.page-index__hero-dot:hover {
  background: rgba(255, 255, 255, 0.8);
}

/* Module 1: Article Categories Section */
.page-index__articles-section {
  padding: 60px 20px;
  background-color: var(--background-dark);
}

.page-index__articles-container {
  max-width: 1200px;
  margin: 0 auto;
}

.page-index__articles-main-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  margin-bottom: 40px;
  text-align: left;
}

.page-index__articles-title-small {
  font-size: 16px;
  font-weight: 900;
  color: var(--secondary-color);
  text-transform: uppercase;
}

.page-index__articles-title-large {
  font-size: 36px;
  font-weight: 900;
  color: var(--primary-color);
  text-transform: uppercase;
  line-height: 1.2;
  text-shadow: 0 0 8px rgba(255, 211, 107, 0.4);
}

.page-index__category-section {
  margin-bottom: 60px;
  padding: 30px;
  background-color: var(--card-background);
  border-radius: 20px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-index__category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.page-index__category-title-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 1;
  min-width: 0;
}

.page-index__category-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.page-index__category-title {
  font-size: 24px;
  font-weight: 600;
  margin: 0;
  color: var(--text-main);
}

.page-index__category-read-more {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.page-index__category-read-more:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

.page-index__articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.page-index__article-card {
  display: flex;
  flex-direction: column;
  background: transparent;
  transition: transform 0.3s ease;
}

.page-index__article-card:hover {
  transform: translateY(-5px);
}

.page-index__article-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.page-index__article-thumbnail {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  overflow: hidden;
  background: #222222;
  border-radius: 8px;
  margin-bottom: 0;
}

.page-index__article-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.page-index__article-provider-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  z-index: 1;
}

.page-index__article-title-link {
  display: block;
  text-decoration: none;
  color: inherit;
  margin-top: 12px;
}

.page-index__article-title {
  margin: 0;
  padding: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-main);
  transition: color 0.3s ease;
}

.page-index__article-title-link:hover .page-index__article-title {
  color: var(--primary-color);
}

/* Module 2: Media Partners/Sponsors Section */
.page-index__partners-section {
  padding: 60px 20px;
  background-color: var(--background-dark);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.page-index__partners-container {
  max-width: 1200px;
  margin: 0 auto;
}

.page-index__partners-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 20px;
  align-items: center;
  justify-items: center;
}

.page-index__partner-item {
  background-color: var(--card-background);
  border-radius: 10px;
  padding: 9px 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: auto;
  box-sizing: border-box;
  border: 1px solid var(--border-color);
}

.page-index__partner-logo {
  width: 167px;
  height: 127px;
  object-fit: contain;
  display: block;
}

/* Module 3: Info Text Area (Collapsible) */
.page-index__info-section {
  padding: 60px 20px;
  background-color: var(--background-dark);
}

.page-index__info-container {
  max-width: 1200px;
  margin: 0 auto;
}

.page-index__info-main-title {
  font-size: 36px;
  font-weight: 600;
  text-align: left;
  margin-bottom: 40px;
  color: var(--primary-color);
  line-height: 1.3;
  text-shadow: 0 0 8px rgba(255, 211, 107, 0.4);
}

.page-index__info-content {
  line-height: 1.8;
  color: #cccccc;
}

.page-index__info-subsection {
  margin-bottom: 40px;
}

.page-index__info-subtitle {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.page-index__info-content h4 {
  font-size: 22px;
  font-weight: 600;
  margin-top: 25px;
  margin-bottom: 15px;
  color: var(--text-main);
}

.page-index__info-content p {
  margin-bottom: 15px;
  font-size: 16px;
  line-height: 1.8;
  color: #cccccc;
}

.page-index__info-list {
  margin: 20px 0;
  padding-left: 30px;
  list-style-type: disc;
}

.page-index__info-list li {
  margin-bottom: 10px;
  font-size: 16px;
  line-height: 1.8;
  color: #cccccc;
}

.page-index__info-first-section {
  margin-bottom: 40px;
}

.page-index__info-expandable {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
}

.page-index__info-expandable.expanded {
  max-height: 5000px; /* Sufficiently large value */
}

.page-index__load-less-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 40px auto 0;
  padding: 0;
  background: transparent;
  border: none;
  font-size: 16px;
  font-weight: normal;
  cursor: pointer;
  transition: color 0.3s ease;
  text-decoration: none;
}

.page-index__load-less-text {
  color: var(--primary-color);
  transition: color 0.3s ease;
}

.page-index__load-less-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--primary-color);
  transition: color 0.3s ease;
}

.page-index__load-less-arrow {
  font-size: 14px;
  line-height: 1;
  display: block;
}

.page-index__load-less-btn.collapsed .page-index__load-less-text {
  color: var(--primary-color);
}

.page-index__load-less-btn.collapsed .page-index__load-less-icon {
  color: var(--primary-color);
}

.page-index__load-less-btn.collapsed .page-index__load-less-arrow {
  display: block;
}

.page-index__load-less-btn.collapsed .page-index__load-less-arrow:nth-child(3) {
  display: block;
}

.page-index__load-less-btn.expanded .page-index__load-less-text {
  color: var(--secondary-color);
}

.page-index__load-less-btn.expanded .page-index__load-less-icon {
  color: var(--secondary-color);
}

.page-index__load-less-btn.expanded .page-index__load-less-arrow {
  display: block;
}

.page-index__load-less-btn.expanded .page-index__load-less-arrow:nth-child(3) {
  display: none;
}

/* --- Responsive Design for all modules --- */

/* All images basic responsive style */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* All buttons basic responsive style */
.page-index__promo-hero-cta,
.page-index__load-less-btn,
.page-index a[class*="button"],
.page-index a[class*="btn"] {
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

/* All button containers basic responsive style */
.page-index__cta-buttons,
.page-index__button-group,
.page-index__btn-container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

@media (max-width: 1024px) {
  .page-index__promo-hero-card {
    gap: 20px;
    margin: 0 15px;
  }

  .page-index__promo-hero-content {
    padding: 20px;
  }

  .page-index__promo-hero-title {
    font-size: clamp(2rem, 3vw, 2.8rem);
  }

  .page-index__promo-hero-subtitle {
    font-size: clamp(1.2rem, 1.8vw, 1.6rem);
  }

  .page-index__articles-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .page-index__partners-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
  }
}

@media (max-width: 768px) {
  /* 🚨 Important: HERO main area padding-top for mobile */
  .page-index__promo-hero-section {
    padding-top: var(--header-offset, 100px) !important; /* Mobile: controlled by shared's media query */
    padding-bottom: 40px;
  }

  .page-index__promo-hero-card {
    grid-template-columns: 1fr; /* Mobile: stacked layout */
    gap: 15px;
    margin: 0 15px;
  }

  .page-index__promo-hero-content {
    padding: 20px;
    align-items: center;
    text-align: center;
  }

  .page-index__promo-hero-title {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
  }

  .page-index__promo-hero-subtitle {
    font-size: clamp(1rem, 3.5vw, 1.4rem);
  }

  .page-index__promo-hero-cta {
    padding: 10px 20px;
    font-size: 1rem;
  }

  .page-index__hero-carousel-section {
    margin-bottom: 40px;
  }

  .page-index__hero-slides {
    padding-bottom: 56.25%; /* Mobile adjustment for 16:9 aspect ratio */
  }

  .page-index__hero-indicators {
    bottom: 15px;
  }

  .page-index__hero-dot {
    width: 10px;
    height: 10px;
  }

  .page-index__articles-section {
    padding: 40px 15px;
  }

  .page-index__articles-main-title {
    margin-bottom: 30px;
  }

  .page-index__articles-title-small {
    font-size: 14px;
  }

  .page-index__articles-title-large {
    font-size: 28px;
  }

  .page-index__category-section {
    margin-bottom: 40px;
    padding: 20px 15px;
    border-radius: 15px;
  }

  .page-index__category-header {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 10px;
  }

  .page-index__category-title {
    font-size: 20px;
  }

  .page-index__category-read-more {
    font-size: 14px;
    align-self: flex-end;
  }

  .page-index__articles-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .page-index__article-title {
    font-size: 16px;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .page-index__article-title-link {
    margin-top: 10px;
  }

  .page-index__partners-section {
    padding: 40px 15px;
  }

  .page-index__partners-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }

  .page-index__partner-item {
    padding: 8px 15px;
  }

  .page-index__partner-logo {
    width: 100%;
    max-width: 120px;
    height: 90px;
  }

  .page-index__info-section {
    padding: 40px 15px;
  }

  .page-index__info-main-title {
    font-size: 28px;
  }

  .page-index__info-subtitle {
    font-size: 24px;
  }

  .page-index__info-content p,
  .page-index__info-list li {
    font-size: 15px;
  }

  .page-index__load-less-btn {
    margin-top: 30px;
  }

  /* 🚨 Mobile mandatory image responsiveness */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-index__articles-section,
  .page-index__category-section,
  .page-index__articles-grid,
  .page-index__article-card,
  .page-index__partners-section,
  .page-index__partners-container,
  .page-index__partner-item,
  .page-index__info-section,
  .page-index__info-container,
  .page-index__promo-hero-section,
  .page-index__promo-hero-card-link,
  .page-index__promo-hero-card,
  .page-index__hero-carousel-section,
  .page-index__hero-carousel {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0 !important; /* Remove padding for full width modules */
    padding-right: 0 !important; /* Remove padding for full width modules */
  }

  .page-index__articles-container,
  .page-index__partners-container,
  .page-index__info-container {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  /* 🚨 Mobile mandatory button responsiveness */
  .page-index__promo-hero-cta,
  .page-index__load-less-btn,
  .page-index a[class*="button"],
  .page-index a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
  .page-index__cta-buttons,
  .page-index__button-group,
  .page-index__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    flex-wrap: wrap !important;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .page-index__promo-hero-section {
    padding-bottom: 30px;
  }
  .page-index__promo-hero-card {
    margin: 0 10px;
  }
  .page-index__promo-hero-title {
    font-size: clamp(1.6rem, 6vw, 2.2rem);
  }
  .page-index__promo-hero-subtitle {
    font-size: clamp(0.9rem, 4vw, 1.2rem);
  }

  .page-index__hero-carousel-section {
    margin-bottom: 30px;
  }

  .page-index__articles-section {
    padding: 30px 10px;
  }
  .page-index__articles-main-title {
    margin-bottom: 25px;
  }
  .page-index__articles-title-small {
    font-size: 12px;
  }
  .page-index__articles-title-large {
    font-size: 22px;
  }
  .page-index__category-section {
    margin-bottom: 30px;
    padding: 15px 10px;
  }
  .page-index__category-title {
    font-size: 18px;
  }
  .page-index__category-read-more {
    font-size: 13px;
  }
  .page-index__articles-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .page-index__article-title {
    font-size: 15px;
  }
  .page-index__partners-section {
    padding: 30px 10px;
  }
  .page-index__partners-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .page-index__partner-item {
    padding: 5px 10px;
  }
  .page-index__partner-logo {
    max-width: 100px;
    height: 70px;
  }
  .page-index__info-section {
    padding: 30px 10px;
  }
  .page-index__info-main-title {
    font-size: 24px;
  }
  .page-index__info-subtitle {
    font-size: 20px;
  }
  .page-index__info-content h4 {
    font-size: 18px;
  }
  .page-index__info-content p,
  .page-index__info-list li {
    font-size: 14px;
  }
  .page-index__info-list {
    padding-left: 20px;
  }
  .page-index__load-less-btn {
    margin-top: 25px;
  }
  .page-index__articles-container,
  .page-index__partners-container,
  .page-index__info-container {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}