/* style/index.css */

/* General page styling */
.page-index {
  font-family: Arial, sans-serif;
  color: #FFF5E1; /* Main text color for dark body background */
  background-color: #B71C1C; /* Body background color from shared.css */
}

.page-index__spacing-medium {
  height: 30px;
  width: 100%;
}

/* Module 1: Hero Slider */
.page-index__hero-slider {
  position: relative;
  width: 100%;
  padding-top: 10px; /* Small top padding, relying on body for header offset */
  overflow: hidden;
  max-width: 1920px; /* Max width for large screens */
  margin: 0 auto;
}

.page-index__hero-slider-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.page-index__hero-slider-slide {
  flex: 0 0 100%;
  position: relative;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.page-index__hero-slider-slide.is-active {
  opacity: 1;
}

.page-index__hero-slider-slide img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  min-width: 200px; /* Minimum size requirement */
  min-height: 200px; /* Minimum size requirement */
}

.page-index__hero-slider-prev,
.page-index__hero-slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  z-index: 10;
  font-size: 24px;
  border-radius: 4px;
}

.page-index__hero-slider-prev {
  left: 10px;
}

.page-index__hero-slider-next {
  right: 10px;
}

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

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

.page-index__hero-slider-dot.is-active {
  background-color: #fff;
}


/* Module 3: Promo Duo + CTA */
.page-index__promo-duo {
  max-width: 1250px;
  margin: 0 auto 30px auto;
  padding: 0 16px;
  box-sizing: border-box;
}

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

.page-index__promo-duo-col {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

.page-index__promo-duo-col img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  min-width: 200px; /* Minimum size requirement */
  min-height: 200px; /* Minimum size requirement */
}

.page-index__promo-cta {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px 20px;
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Button color from custom palette */
  color: #7A0E0E; /* Deep Red for text on gold button */
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
  max-width: 100%; /* Ensure button doesn't overflow */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  transition: background-color 0.3s ease;
}

.page-index__promo-cta:hover {
  filter: brightness(1.1);
}

.page-index__promo-cta--alert {
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Button color from custom palette */
  color: #7A0E0E; /* Deep Red for text on gold button */
}


/* Module 4: Decorative Main Title (h1) */
.page-index__section-title {
  text-align: center;
  margin: 30px auto;
  max-width: 1250px;
  padding: 0 16px;
  box-sizing: border-box;
}

.page-index__section-title h1 {
  font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size for H1 */
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #F4D34D; /* Gold color for H1 */
  margin: 0;
  padding: 0;
  max-width: 100%;
}


/* Module 5: Long SEO Content (home_content) */
.page-index__home-content {
  max-width: 900px;
  margin: 24px auto;
  height: 700px; /* Fixed height for desktop */
  padding: 10px;
  box-sizing: border-box;
  border: 5px solid #F2B544; /* Border color from custom palette */
  border-radius: 15px;
  box-shadow: 0 0 20px #FFCC66; /* Glow color from custom palette */
  background: #D32F2F; /* Card BG color from custom palette */
  color: #FFF5E1; /* Text Main color for content */
}

.page-index__home-content-inner {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 16px;
  text-align: justify;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

.page-index__home-content-inner::-webkit-scrollbar {
  width: 10px;
}

.page-index__home-content-inner::-webkit-scrollbar-thumb {
  background-color: #F4D34D; /* Gold color for scrollbar thumb */
  border-radius: 20px;
  border: 3px solid #7A0E0E; /* Deep Red for scrollbar border */
}

.page-index__home-content-inner h2 {
  color: #F4D34D; /* Gold color for H2 */
  margin-top: 30px;
  margin-bottom: 15px;
  font-size: 1.8em;
  text-align: left;
}

.page-index__home-content-inner h3 {
  color: #FFD86A; /* Lighter gold for H3 */
  margin-top: 25px;
  margin-bottom: 10px;
  font-size: 1.4em;
  text-align: left;
}

.page-index__home-content-inner figure {
  max-width: 800px;
  margin: 20px auto;
  text-align: center;
}

.page-index__home-content-inner figure img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  min-width: 200px; /* Minimum size requirement */
  min-height: 200px; /* Minimum size requirement */
}

.page-index__home-content-inner figcaption {
  font-style: italic;
  font-size: 0.9em;
  color: #FFF5E1; /* Text Main color */
  margin-top: 8px;
}

.page-index__home-content-inner p {
  line-height: 1.7;
  margin-bottom: 15px;
  color: #FFF5E1; /* Text Main color */
}

.page-index__home-content-inner ul,
.page-index__home-content-inner ol {
  list-style-position: inside;
  margin-bottom: 15px;
  padding-left: 20px;
  color: #FFF5E1; /* Text Main color */
}

.page-index__home-content-inner ul li,
.page-index__home-content-inner ol li {
  margin-bottom: 8px;
}

.page-index__home-content-inner a {
  color: #FFD86A; /* Gold for links */
  text-decoration: underline;
}

.page-index__home-content-inner a:hover {
  color: #FFCC66; /* Lighter gold on hover */
}

.page-index__table-wrapper {
  overflow-x: auto;
  margin-bottom: 20px;
}

.page-index__home-content-inner table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #F2B544; /* Border color */
  min-width: 600px; /* Ensure table is wide enough for content */
}

.page-index__home-content-inner th,
.page-index__home-content-inner td {
  border: 1px solid #F2B544; /* Border color */
  padding: 12px 15px;
  text-align: left;
  color: #FFF5E1; /* Text Main color */
}

.page-index__home-content-inner th {
  background: #7A0E0E; /* Deep Red for table headers */
  font-weight: bold;
  color: #FFF5E1;
}


/* Module 6: Latest Articles / Blog Card Slider */
.page-index__blog-slider {
  max-width: 1250px;
  margin: 30px auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.page-index__blog-slider-title {
  text-align: center;
  color: #FFD86A; /* Gold color for blog title */
  text-transform: uppercase;
  margin-bottom: 25px;
  font-size: 2em;
}

.page-index__blog-slider-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-index__blog-slider-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  width: 100%;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 15px; /* Space for scrollbar */
}

.page-index__blog-slider-track::-webkit-scrollbar {
  height: 8px;
}

.page-index__blog-slider-track::-webkit-scrollbar-thumb {
  background-color: rgba(255, 216, 106, 0.6); /* Lighter gold for scrollbar thumb */
  border-radius: 10px;
}

.page-index__blog-slider-track::-webkit-scrollbar-track {
  background: rgba(122, 14, 14, 0.2); /* Deep Red transparent for track */
  border-radius: 10px;
}

.page-index__blog-slider-prev,
.page-index__blog-slider-next {
  background-color: rgba(255, 216, 106, 0.8); /* Gold for buttons */
  color: #7A0E0E; /* Deep Red for text */
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 20px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: background-color 0.3s ease;
}

.page-index__blog-slider-prev:hover,
.page-index__blog-slider-next:hover {
  background-color: #FFCC66; /* Glow color on hover */
}

.page-index__post-item {
  flex: 0 0 calc((100% - 40px) / 3); /* 3 cards on desktop */
  scroll-snap-align: start;
  box-sizing: border-box;
  background: #D32F2F; /* Card BG color */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
  min-width: 280px; /* Ensure minimum card width */
}

.page-index__post-item:hover {
  transform: translateY(-5px);
}

.page-index__post-item a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.page-index__post-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9; /* Fixed 16:9 ratio */
  overflow: hidden;
  border-radius: 4px;
}

.page-index__post-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-width: 200px; /* Minimum size requirement */
  min- /* 16:9 aspect for 200px width */
}

.page-index__post-date {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  background: #FFF5E1; /* Text Main color as background */
  border: 2px solid #C91F17; /* Main color for border */
  border-radius: 4px;
  padding: 4px 8px;
  text-align: center;
  line-height: 1.2;
  color: #C91F17; /* Main color for text */
  font-size: 0.9em;
}

.page-index__post-date-day {
  display: block;
  font-weight: 700;
  font-size: 16px;
}

.page-index__post-date-month {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
}

.page-index__post-item h5 {
  text-align: center;
  color: #FFD86A; /* Gold for card titles */
  margin: 12px 8px 6px;
  font-size: 1.1em;
  line-height: 1.4;
}

.page-index__post-item p {
  text-align: center;
  color: #FFF5E1; /* Text Main color for summary */
  font-size: 14px;
  margin: 0 8px 12px;
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.page-index__blog-view-all {
  text-align: center;
  margin-top: 30px;
}

.page-index__blog-view-all-btn {
  display: inline-block;
  padding: 12px 25px;
  font-size: 1.1em;
  border-radius: 6px;
  text-transform: uppercase;
}

/* Responsive styles for mobile (max-width: 768px) */
@media (max-width: 768px) {
  /* General mobile text and container adjustments */
  .page-index {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-index__section,
  .page-index__card,
  .page-index__container,
  .page-index__promo-duo,
  .page-index__home-content,
  .page-index__blog-slider {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}