/* ========================================
   HOME PAGE
   home.css
======================================== */

/* ========================================
   HERO SECTION
======================================== */

.hero {

  min-height: 100vh;

  position: relative;

  overflow: hidden;

  padding-top: var(--nav-height);

  /* พื้นหลังรูป */
  background:
    linear-gradient(
      rgba(26,5,51,0.55),
      rgba(58,0,87,0.65)
    ),
    url("../assets/image/hero/team-bg.jpeg");

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

}

/* ลบ overlay เดิม */
.hero::before {
  display: none;
}

/* กล่อง content */
.hero-container {

  max-width: 1200px;
  margin: auto;

  min-height: calc(100vh - var(--nav-height));

  display: flex;
  align-items: center;
  justify-content: flex-start;

  padding: 0 24px;

  position: relative;
  z-index: 2;

}

/* ซ้าย */
.hero-content {

  max-width: 620px;

  color: white;

}

/* ซ่อนรูปด้านขวาเดิม */
.hero-image {
  display: none;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
}

/* LEFT */
.hero-content {
  color: var(--white);
}

.hero-number {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;

  font-size: 0.95rem;
  font-weight: var(--fw-medium);

  color: rgba(255,255,255,0.7);
}

.hero-number span {
  width: 54px;
  height: 54px;

  border-radius: var(--radius-full);

  background: var(--gold);

  color: var(--purple-dark);

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 1.4rem;
  font-weight: var(--fw-black);

  box-shadow: var(--shadow-gold);
}

.hero-title {
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: var(--fw-black);
  line-height: 1;
  margin-bottom: 20px;
}

.hero-title span {
  color: var(--purple-light);
}

.hero-subtitle {
  font-size: 1.1rem;
  font-weight: var(--fw-light);

  color: rgba(255,255,255,0.75);

  max-width: 520px;

  line-height: 1.8;
  margin-bottom: 40px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* RIGHT */
.hero-image {
  position: relative;
}

.hero-image img {
  width: 100%;
  object-fit: contain;

  filter:
    drop-shadow(0 30px 60px rgba(0,0,0,0.35));

  animation: floatImage 5s ease-in-out infinite;
}

@keyframes floatImage {
  0%   { transform: translateY(0px); }
  50%  { transform: translateY(-12px); }
  100% { transform: translateY(0px); }
}

/* ========================================
   INTRO SECTION
======================================== */
.intro-section {
  padding: 120px 0;
  background: var(--white);
}

.intro-heading {
  margin-bottom: 64px;
}

.intro-layout {
  display: grid;
  grid-template-columns: 70% 30%;
  gap: 32px;
}
.intro-side {
  display: grid;
  grid-template-columns: 30% 70%;
  gap: 24px;
}

/* IMAGE */
.video-frame {

  position: relative;

  width: 100%;

  aspect-ratio: 16/9;

  border-radius: var(--radius-lg);

  overflow: hidden;

  background: var(--purple-dark);

  box-shadow: var(--shadow-lg);
}

.video-frame img {

  width: 100%;

  height: 100%;

  object-fit: cover;

  display: block;
}

/* SIDE */
.intro-side {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* CARDS */
.glass-card {
  background: rgba(255,255,255,0.75);

  border: 1px solid rgba(107,33,168,0.08);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  border-radius: var(--radius-lg);

  box-shadow: var(--shadow-sm);
}

.hover-lift {
  transition: var(--transition);
}

.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

/* STATS */
.stats-card {
  padding: 28px;
}

.stats-card h3 {
  font-size: 1.1rem;
  margin-bottom: 28px;
  color: var(--purple-main);
}

.stat-item {
  padding: 16px 0;
  border-bottom: 1px solid rgba(107,33,168,0.08);
}

.stat-item:last-child {
  border-bottom: none;
}

.stat-item span {
  display: block;

  font-size: 2rem;
  font-weight: var(--fw-black);

  color: var(--purple-mid);
}

.stat-item p {
  font-size: 0.9rem;
  color: var(--gray);
}

.works-card {
  padding: 24px;
  overflow: hidden;

  grid-column: 1 / 3;

  width: calc(100% + 840px);

    margin-left: -840px;
}

.works-card h3 {
  margin-bottom: 20px;
  color: var(--purple-main);
}

.works-slider {
  display: flex;
  gap: 16px;

  width: max-content;

  animation: scrollWorks 45s linear infinite;

  will-change: transform;
}

.works-slider::-webkit-scrollbar {
  display: none;
}

.works-slider img {
  min-width: 90px;
  height: 90px;

  object-fit: cover;

  border-radius: var(--radius-md);

  transition: var(--transition);
}

.works-slider img:hover {
  transform: scale(1.05);
}
.works-slider:hover {
  animation-play-state: paused;
}

/* ========================================
   WHY US
======================================== */
.why-us-section {
  padding: 120px 0;
  background: var(--off-white);
}

.why-heading {
  margin-bottom: 56px;
}

.faq-list {
  max-width: 900px;
  margin: 0 auto;

  display: flex;
  flex-direction: column;
  gap: 20px;
}

.faq-item {
  background: var(--white);

  border-radius: var(--radius-lg);

  overflow: hidden;

  box-shadow: var(--shadow-sm);
}

.faq-question {
  width: 100%;

  padding: 26px 32px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  font-size: 1rem;
  font-weight: var(--fw-semibold);

  color: var(--purple-main);

  cursor: pointer;
}

.faq-question i {
  font-size: 1.2rem;
  transition: var(--transition);
}

.faq-item.active i {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;

  transition: max-height 0.4s ease;
}

.faq-answer p {
  padding: 0 32px 28px;
  color: var(--gray);
  line-height: 1.8;
}

/* ========================================
   MEMBERS
======================================== */
.members-preview {
  padding: 120px 0;
  background: var(--purple-dark);
  color: var(--white);
}

.members-heading {
  margin-bottom: 56px;
}

.members-slider {
  display: flex;
  gap: 24px;

  overflow-x: auto;

  scrollbar-width: none;
}

.members-slider::-webkit-scrollbar {
  display: none;
}

.member-card {
  min-width: 260px;

  background: rgba(255,255,255,0.06);

  border: 1px solid rgba(255,255,255,0.08);

  border-radius: var(--radius-xl);

  overflow: hidden;

  backdrop-filter: blur(12px);

  transition: var(--transition);
}

.member-card:hover {
  transform: translateY(-8px);
}

.member-card img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.member-card h3 {
  font-size: 1.1rem;
  padding: 20px 20px 4px;
}

.member-card p {
  padding: 0 20px 24px;
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
}

.members-cta {
  margin-top: 48px;
  text-align: center;
}

/* ========================================
   POLICY
======================================== */
.policy-preview {
  padding: 120px 0;
  background: var(--white);
}

.policy-heading {
  margin-bottom: 64px;
}

.policy-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 24px;
}

.policy-card {
  padding: 36px;
}

.policy-card i {
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 20px;
}

.policy-card h3 {
  margin-bottom: 20px;
  color: var(--purple-main);
}

.policy-card ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.policy-card li {
  color: var(--gray);
}

.policy-cta {
  margin-top: 56px;
  text-align: center;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 992px) {

  .hero-container,
  .intro-layout,
  .policy-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 140px 0 80px;
  }

  .hero-content {
    text-align: center;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-image {
    max-width: 520px;
    margin: 0 auto;
  }

  .intro-side {
    flex-direction: row;
  }
}

@media (max-width: 768px) {

  .intro-side {
    flex-direction: column;
  }

  .section-title {
    line-height: 1.3;
  }

  .faq-question {
    font-size: 0.95rem;
    padding: 22px 24px;
  }

  .faq-answer p {
    padding: 0 24px 24px;
  }

  .policy-card {
    padding: 28px;
  }

  .member-card {
    min-width: 220px;
  }
}

@media (max-width: 480px) {

  .hero-title {
    font-size: 2.8rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
/* ========================================
   AUTO MEMBERS SLIDER
======================================== */

.members-slider {
  overflow: hidden;
  width: 100%;
  position: relative;
  margin-top: 48px;
}

.members-track {
  display: flex;
  gap: 24px;
  width: max-content;

  animation: scrollMembers 40s linear infinite;
}

.members-track:hover {
  animation-play-state: paused;
}

.member-card {
  width: 280px;
  flex-shrink: 0;

  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 32px;
  overflow: hidden;

  transition: 0.4s ease;
}

.member-card:hover {
  transform: translateY(-8px);
}

.member-card img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  display: block;
}

.member-card h3 {
  font-size: 1.5rem;
  color: white;
  padding: 20px 20px 0;
}

.member-card p {
  color: rgba(255,255,255,0.7);
  padding: 8px 20px 24px;
}

/* AUTO MOVE */
@keyframes scrollMembers {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}
@keyframes scrollWorks {

  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }

}
@media (max-width: 992px) {
  .intro-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  
  .video-frame {
    width: 100%;
  }
}
/* ========================================
   MOBILE FIX - INTRO SECTION
======================================== */

@media (max-width: 768px) {

  .intro-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .intro-video,
  .intro-side {
    width: 100%;
  }

  .intro-video iframe {
    width: 100%;
    height: 220px;
  }

  .intro {
    overflow: hidden;
  }

}/* ========================================
   MOBILE FIX - WORKS SECTION
======================================== */

@media (max-width: 768px) {

  .works-wrapper,
  .works-box,
  .works-container {
    width: 100%;
    overflow: hidden;
  }

  .works-track,
  .works-slider,
  .works-gallery {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 10px;

    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }

  .works-track img,
  .works-slider img,
  .works-gallery img {
    width: 110px;
    height: 110px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 16px;
  }

}/* ========================================
   GLOBAL MOBILE OVERFLOW FIX
======================================== */

html,
body {
  overflow-x: hidden;
  max-width: 100%;
}
/* ========================================
   FINAL MOBILE FIX - WORKS CARD
======================================== */

@media (max-width: 1024px) {

  .works-card {
    width: 100% !important;
    margin-left: 0 !important;
    grid-column: auto !important;
    padding: 24px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .works-slider {
    display: flex !important;
    gap: 12px !important;
    width: max-content !important;

    /* ให้ animation ยังทำงานปกติ */
    animation: scrollWorks 45s linear infinite !important;
    will-change: transform !important;
    overflow: visible !important;
  }

}
/* ========================================
   IPAD PORTRAIT FIX
======================================== */

@media screen and (max-width: 1024px) {

  .intro-layout {

    display: flex !important;
    flex-direction: column !important;

    width: 100%;

    gap: 24px;
  }

  .intro-side {

    display: flex !important;
    flex-direction: column !important;

    width: 100%;
  }

  .video-frame,
  .stats-card,
  .works-card {

    width: 100% !important;
    max-width: 100% !important;

    margin-left: 0 !important;

    box-sizing: border-box;
  }

  .works-card {

    grid-column: auto !important;
  }

}
/* ========================================
   HERO MOBILE FIX
======================================== */

@media (max-width: 768px) {

  .hero {

    min-height: auto;

    padding-top: 120px;
    padding-bottom: 80px;

    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;

  }

  .hero-container {

    min-height: auto;

    grid-template-columns: 1fr;

    text-align: center;
  }

}