/* ============================================
   INDEX PAGE SPECIFIC STYLES
   Only styles unique to index.html
   ============================================ */

/* Hero Section - Unique to index page */
.hero {
  position: relative;
  width: 100%;
  height: 320px;
  background-image: url('../Images/banner.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.hero-container {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 2;
  gap: 2rem;
}

.hero-content {
  max-width: 28rem;
  color: var(--white);
  flex: 1;
}

.hero-title {
  color: var(--white);
  margin-bottom: 1rem;
}

.hero-text {
  font-size: 0.875rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.9);
}

.hero-image {
  display: none;
}

.hero-team-image {
  height: 256px;
  width: auto;
  border-radius: 0.5rem;
}

/* Services Section - Uses Common classes */
.services-header {
  margin-bottom: 3rem;
}

.service-card {
  text-align: center;
  padding: 0;
  border: none;
}

/* Remove hover effect from service cards */
.service-card:hover {
  box-shadow: none;
  transition: none;
}

.service-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 1rem;
}

.service-card p {
  margin-bottom: 1rem;
}

/* IP Importance Section - Uses Common classes */
.ip-importance-section {
  padding-top: 0;
  padding-bottom: 0;
  position: relative;
  overflow: visible;
  margin-bottom: 0;
}

/* Target sections directly - ensure no spacing between them on larger screens */
@media (min-width: 768px) {

  /* First section (IP Importance) - remove bottom spacing */
  section:has(.ip-importance-image:first-child) {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  /* Second section (Right Place) - remove top spacing */
  section:has(.right-place-content:first-child) {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  /* Ensure grid containers have no gap and sections touch */
  section:has(.ip-importance-image:first-child) .grid-2-col,
  section:has(.right-place-content:first-child) .grid-2-col {
    gap: 0;
    margin: 0;
  }
}

/* Add padding for small screens only */
@media (max-width: 767px) {

  .ip-importance-section,
  .right-place-section {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
}

/* Ensure no padding on larger screens for corner connection */
@media (min-width: 768px) {

  .ip-importance-section,
  .right-place-section {
    padding-top: 0;
    padding-bottom: 0;
  }

  /* Remove top/bottom padding from content on larger screens */
  .ip-importance-content,
  .right-place-content {
    padding-top: 0;
    padding-bottom: 0;
  }
}

.ip-importance-section .grid-2-col {
  grid-template-columns: 50% 50%;
  gap: 0;
}

.ip-importance-image {
  width: 100%;
  flex: 0 0 50%;
  position: relative;
  min-height: 400px;
}

.ip-importance-image img {
  border-radius: 0;
  width: 100%;
  height: 100%;
  min-height: 400px;
  object-fit: cover;
}

.ip-importance-content {
  padding: 0 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Align links to the right */
.ip-importance-content .link-orange,
.right-place-content .link-orange {
  align-self: flex-end;
  text-align: right;
}

.ip-importance-content h2 {
  margin-bottom: 1rem;
}

.ip-importance-content p {
  margin-bottom: 1rem;
}

/* Right Place Section - Uses Common classes */
.right-place-section {
  padding-top: 0;
  padding-bottom: 0;
  position: relative;
  overflow: visible;
  margin-top: 0;
}

.right-place-section .grid-2-col {
  grid-template-columns: 50% 50%;
  gap: 0;
}

.right-place-content {
  padding: 0 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.right-place-content h2 {
  margin-bottom: 1rem;
}

.right-place-content p {
  margin-bottom: 1rem;
}

.right-place-image {
  width: 100%;
  flex: 0 0 50%;
  position: relative;
  min-height: 400px;
}

/* Corner touch effect on larger screens - corners meet */
/* For screens 768px to 1023px - ensure both images have same min-height */
@media (min-width: 768px) and (max-width: 1023px) {

  /* Remove any spacing between sections */
  .ip-importance-section {
    margin-bottom: 0;
  }

  .right-place-section {
    margin-top: 0;
  }

  /* Position images so corners touch exactly */
  /* Top image extends to meet bottom image's corner */
  .ip-importance-image {
    position: relative;
    z-index: 1;
    min-height: 450px;
  }

  /* Bottom image extends to meet top image's corner */
  .right-place-image {
    position: relative;
    z-index: 1;
    min-height: 450px;
  }

  /* Ensure images align perfectly at corners - no gaps */
  .ip-importance-image img,
  .right-place-image img {
    display: block;
    min-height: 450px;
  }
}

/* For screens 768px and above - ensure corners connect */
@media (min-width: 768px) {

  /* Make images extend to meet at corners */
  /* Top section image (left) - bottom-right corner */
  section:has(.ip-importance-image:first-child) .ip-importance-image {
    position: relative;
    z-index: 2;
  }

  /* Bottom section image (right) - top-left corner */
  section:has(.right-place-content:first-child) .ip-importance-image {
    position: relative;
    z-index: 2;
    margin-top: 0;
  }

  /* Ensure images fill their containers completely and connect at corners */
  section:has(.ip-importance-image:first-child) .ip-importance-image img,
  section:has(.right-place-content:first-child) .ip-importance-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.right-place-image img {
  border-radius: 0;
  width: 100%;
  height: 100%;
  min-height: 400px;
  object-fit: cover;
}

/* Ensure both images have matching min-heights for mobile (up to 767px) */
@media (max-width: 767px) {

  .ip-importance-image,
  .right-place-image {
    min-height: 400px;
  }

  .ip-importance-image img,
  .right-place-image img {
    min-height: 400px;
  }
}

/* Corner touch effect on larger screens */
@media (min-width: 768px) {
  .ip-importance-image {
    margin-bottom: -1px;
  }

  .right-place-image {
    margin-top: -1px;
  }
}

/* Facts Section - Slick Slider Style - Horizontal Slide */
section.section-dark {
  background-color: var(--dark-bg);
  color: var(--white);
}

.facts-slider-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.facts-slider-track {
  display: flex;
  width: 100%;
  transition: transform 0.6s ease-in-out;
  will-change: transform;
}

.facts-slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  box-sizing: border-box;
}

.facts-quote {
  max-width: 42rem;
  margin: 0 auto 1.5rem;
}

/* News Section - Slick Slider Style - Horizontal Slide */
.news-section-title {
  margin-bottom: 3rem;
}

.news-carousel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.news-slider-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.news-slider-track {
  display: flex;
  width: 100%;
  transition: transform 0.6s ease-in-out;
  will-change: transform;
}

.news-slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  box-sizing: border-box;
}

.news-arrow {
  opacity: 0.8;
  transition: opacity 0.3s ease;
  flex-shrink: 0;
  z-index: 10;
}

.news-arrow:hover {
  opacity: 1;
}

.news-arrow img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 2rem;
}

/* Responsive adjustments for small screens */
@media (max-width: 768px) {
  .news-carousel {
    gap: 0.5rem;
  }

  .news-arrow {
    padding: 0.25rem;
  }

  .news-arrow img {
    max-height: 1.5rem;
  }
}

@media (max-width: 640px) {
  .news-carousel {
    gap: 0.25rem;
  }

  .news-arrow {
    padding: 0.25rem;
  }

  .news-arrow img {
    max-height: 1.25rem;
  }
}


.news-title {
  margin-bottom: 0.5rem;
}

.news-text {
  text-align: center;
  margin-bottom: 1rem;
}

.news-source {
  text-align: right;
  font-size: 0.75rem;
  color: var(--orange);
  margin-top: 1rem;
  font-style: italic;
}

/* HappiTO Section */
.happito-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding: 3rem 0;
  text-align: center;
}

.happito-logo {
  margin-bottom: 1rem;
}

.happito-logo-img {
  max-width: 200px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.happito-title {
  font-size: 2rem;
  font-weight: bold;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

.happito-description {
  color: var(--gray-600);
  font-size: 1rem;
  line-height: 1.6;
  text-align: center;
}

/* Responsive Design for HappiTO Section */
@media (min-width: 768px) {
  .happito-title {
    font-size: 2.5rem;
  }
}

/* Events Section - Responsive Carousel Slider */
.events-header {
  margin-bottom: 3rem;
}

.events-carousel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.events-slider-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.events-slider-track {
  display: flex;
  width: 100%;
  transition: transform 0.6s ease-in-out;
  will-change: transform;
  position: relative;
}

.events-arrow {
  opacity: 0.7;
  transition: opacity 0.3s ease;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.events-arrow:hover {
  opacity: 1;
}

.events-arrow img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 2rem;
}

.event-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.5rem;
}

/* Responsive Design */
@media (min-width: 768px) {
  .hero {
    height: 400px;
  }

  .hero-content {
    max-width: 32rem;
  }
}

@media (min-width: 1024px) {
  .hero {
    height: 500px;
  }

  .hero-image {
    display: block;
    flex-shrink: 0;
  }

  .hero-content {
    max-width: 36rem;
  }

  .hero-title {
    font-size: 3.5rem;
  }

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

  .ip-importance-content,
  .right-place-content {
    padding: 0 4rem;
  }

  /* Increase image height for larger screens to maintain corner connection */
  .ip-importance-image,
  .right-place-image {
    min-height: 500px;
  }

  .ip-importance-image img,
  .right-place-image img {
    min-height: 500px;
  }
}

@media (min-width: 1440px) {
  .hero {
    height: 600px;
  }

  .hero-content {
    max-width: 42rem;
  }

  .hero-title {
    font-size: 4rem;
  }

  .hero-text {
    font-size: 1.125rem;
  }

  /* Further increase image height for very large screens */
  .ip-importance-image,
  .right-place-image {
    min-height: 550px;
  }

  .ip-importance-image img,
  .right-place-image img {
    min-height: 550px;
  }
}

@media (max-width: 767px) {
  .hero {
    height: auto;
    min-height: 320px;
    padding: 2rem 0;
  }

  .hero-container {
    flex-direction: column;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
    margin-bottom: 2rem;
  }

  .ip-importance-section .grid-2-col,
  .right-place-section .grid-2-col {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .ip-importance-content,
  .right-place-content {
    padding: 1.5rem 1.5rem;
  }

  /* On mobile: Image first, then text for Right Place section */
  .right-place-image {
    order: -1;
  }

  .right-place-content {
    order: 1;
  }
}

/* -----------------------------
   Past Events - Clean Slider
   ----------------------------- */

.events-carousel {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.events-slider-wrapper {
  flex: 1;
  overflow: hidden;
  position: relative;

  /* Default slides per view (mobile) */
  --slides-to-show: 1;
}

.events-slider-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  will-change: transform;
}

.event-slide {
  /* Width adapts automatically based on slides-to-show */
  flex: 0 0 calc(100% / var(--slides-to-show));
  min-width: calc(100% / var(--slides-to-show));
  padding: 0.5rem;
  box-sizing: border-box;
}

.event-img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 0.5rem;
  cursor: pointer;
}

/* Responsive layout - EXACT SAME UI, only add variable */
@media (min-width: 640px) {
  .events-slider-wrapper {
    --slides-to-show: 2;
    /* 2 per slide */
  }
}

@media (min-width: 768px) {
  .events-slider-wrapper {
    --slides-to-show: 3;
    /* 3 per slide */
  }
}

@media (min-width: 1024px) {
  .events-slider-wrapper {
    --slides-to-show: 5;
    /* 5 per slide */
  }
}