/*
  IE Network | SU 2026 - Main Stylesheet
  --- TABLE OF CONTENTS ---
  1. SETTINGS & GLOBAL STYLES
     - CSS Variables (Colors, Fonts)
     - Global Reset & Typography (body, a, h1, etc.)
  2. LAYOUT & HELPERS
     - .taincontainer
     - Background Helpers (.bg-light, .bg-dark)
  3. HEADER & NAVIGATION
     - Header bar
     - Logo styles
     - Navigation menu
  4. HERO SECTION (หน้าแรก)
     - Hero background and layout
     - Hero content (logo, text, buttons)
  5. REUSABLE COMPONENTS
     - Buttons (.btn, .btn-accent, .btn-outline)
     - Section Titles (.section-title)
     - Tables (.dates-table)
     - Speaker Cards (.speakers-grid, .speaker-card)
  6. PAGE-SPECIFIC SECTIONS
     - Page Header (สำหรับหน้าย่อย)
  7. FOOTER (ดีไซน์ใหม่)
  8. RESPONSIVE DESIGN (สำหรับมือถือ)
*/

/* --- 1. SETTINGS & GLOBAL STYLES --- */
:root {
    /* Color Palette */
    --primary-dark: #0f2b3e;
    --primary-light: #1a415a;
    --accent-color: #00d4a1;
    --accent-hover: #00b085;
    --text-light: #ffffff;
    --text-grey: #cccccc;
    --text-dark: #333333;
    --bg-light: #f4f7f9;
    --bg-white: #ffffff;
    
    /* Layout */
    --container-width: 1200px; /* ปรับความกว้างให้เหมาะสมกับเว็บส่วนใหญ่ */
    --header-height: 100px;
}



* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
    display: flex;
    flex-direction: column;
    min-width: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

h1, h2, h3 {
    font-weight: 800;
}

/* --- 2. LAYOUT & HELPERS --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;   /* ✅ สำคัญมาก */
    margin-top: 40px;
    
}

.bg-light {
    background-color: var(--bg-light);
}

.bg-dark {
    background-color: var(--primary-dark);
    color: var(--text-light);
}

.bg-dark .section-title h2 {
    color: var(--text-light);
}

/* --- 3. HEADER & NAVIGATION --- */
header {
    background-color: var(--primary-dark);
    color: var(--text-light);
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.header-content {
    display: flex;
    justify-content: space-between; /* แยกซ้าย-ขวา */
    align-items: center;

    width: 100%;
    max-width: none;   /* ❗ เอา 1200px ออก */
    margin: 0;
    padding: 0 24px;   /* ระยะหายใจนิดหน่อย */
} 

.logo-link {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo-img {
  height: 45px;
  width: auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

.logo-text span {
    color: var(--text-light);
    font-weight: 400;
}

nav ul {
    display: flex;
    gap: 25px;
    align-items: center;
}

nav a {
    font-size: 1rem;
    color: var(--text-light);
    opacity: 0.8;
}

nav a.active {
    color: var(--accent-color);
    position: relative;
}
nav a.active::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background-color: var(--accent-color);
}

/* --- 4. HERO SECTION (หน้าแรก) --- */
.hero {
    height: calc(100vh - var(--header-height));
    background: linear-gradient(rgba(15, 43, 62, 0.85), rgba(15, 43, 62, 0.7)), url("Image/NewBG.png");
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    padding: 20px;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-logo {
    height: 350px;
    width: auto;
    margin-bottom: 20px;
}

.hero-content h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.hero-content .tagline {
    font-size: 3.5rem;
    color: var(--accent-color);
    margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  margin-top: 1rem;
}

/* --- 5. REUSABLE COMPONENTS --- */
section {
    padding: 80px 0;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    border: none;
}

.btn-accent {
    background-color: var(--accent-color);
    color: var(--primary-dark);
}

.btn-accent:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-outline {
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    background: transparent;
}

.btn-outline:hover {
    background: var(--accent-color);
    color: var(--primary-dark);
}

.section-title {
    text-align: center;
    margin-bottom: 10px;
}

.section-title h2 {
    font-size: 2.2rem;
    color: var(--primary-dark);
    display: inline-block;
    position: relative;
    padding-bottom: 15px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--accent-color);
}

.dates-table {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    border-collapse: collapse;
    background: var(--bg-white);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
}

.dates-table th, .dates-table td {
    padding: 20px 30px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.dates-table thead th {
    background-color: var(--primary-light);
    color: var(--text-light);
}

.dates-table tbody th {
    width: 70%;
}

.dates-table tbody td {
    font-weight: 600;
    color: var(--primary-dark);
}

.speakers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.speaker-card {
    background-color: var(--primary-light);
    border-radius: 10px;
    padding: 30px 20px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
    color: var(--text-light);
}

.speaker-img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 20px;
    border: 3px solid var(--accent-color);
}

/* --- 6. PAGE-SPECIFIC SECTIONS --- */
.page-header {
    background-color: var(--primary-light);
    padding: 60px 0;
    text-align: center;
    color: var(--text-light);
}

#about-section {
    padding: 80px 0;
}

.content-box {
    background-color: #f8f9fa;
    padding: 40px;
    border-radius: 8px;
    border-left: 7px solid var(--accent-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

#about-section .section-title {
    padding-top: 0;
    text-align: left;
}
#about-section .section-title::after {
    margin-left: 0;
}

#about-section p {
    color: #555;
    line-height: 1.8;
}


/*
========================================
    7. FOOTER (ดีไซน์ใหม่)
========================================
*/

.contact-footer {
    background-color: var(--primary-dark);
    color: #e0f2f1;
    padding: 60px 0 40px;
    flex-shrink: 0;
}

.footer-title {
    text-align: center;
    margin-bottom: 50px;
}

.footer-title h2 {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.footer-title .university-name {
    font-size: 1.1rem;
    color: var(--accent-color);
    font-weight: 600;
}

.footer-title .address {
    font-size: 1rem;
    color: #b0bec5;
    max-width: 600px;
    margin: 5px auto 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
    margin-top: 40px;
}

.contact-item {
    padding: 20px;
    text-align: center
}

.contact-item i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.contact-item h5 {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-item p {
    font-size: 1rem;
    color: #b0bec5;
    line-height: 1.7;
}

.contact-item a {
    color: #b0bec5;
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-item a:hover {
    color: var(--text-light);
    text-decoration: underline;
}


/* --- 8. RESPONSIVE DESIGN (สำหรับมือถือ) --- */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    section { padding: 50px 0; }

    header { height: auto; padding: 15px 0; }
    .header-content { flex-direction: column; gap: 15px; }
    nav ul { flex-wrap: wrap; justify-content: center; gap: 15px; }

    .hero-logo { height: 200px; }
    .hero-content h1 { font-size: 2.5rem; }
    .hero-content .tagline { font-size: 1.2rem; }

    .dates-table thead { display: none; }
    .dates-table, .dates-table tbody, .dates-table tr, .dates-table th, .dates-table td {
      display: block;
      width: 100%;
    }
    .dates-table tr {
      margin-bottom: 15px;
      border: 1px solid #eee;
      border-radius: 8px;
    }
    .dates-table th {
      background-color: var(--primary-light);
      color: var(--text-light);
      text-align: center;
      border-bottom: 1px solid #eee;
    }
    .dates-table td {
      text-align: right;
      padding-left: 50%;
      position: relative;
    }
    .dates-table td::before {
      content: attr(data-label);
      position: absolute;
      left: 15px;
      width: 45%;
      text-align: left;
      font-weight: bold;
      color: var(--text-dark);
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-title h2 {
        font-size: 1.8rem;
    }
}
.info-section + .info-section {
    padding-top: 40px; 
}

.info-section {
    background-color: #FAFCFE ;
    padding-top: 0;      /* ลบ padding ด้านบนออกทั้งหมด */
    padding-bottom: 60px; /* กำหนดให้มีแค่ padding ด้านล่าง */
}

/* 2. กำหนดให้ info-section "อันแรก" ที่อยู่ต่อจาก hero มี padding-top กลับมา */
.hero + .info-section {
    padding-top: 60px;
}
/* ============ Sticky Footer Solution ============ */

/* ทำให้ body เป็น flex container และสูงเต็มหน้าจอ */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* vh = viewport height */
}

/* สั่งให้ main (พื้นที่เนื้อหา) ยืดเพื่อเติมที่ว่าง */
main {
    flex: 1 0 auto;
}
/* ======================== */
/* 5. TOPICS SECTION        */
/* ======================== */
.topics-section {
    padding: 80px 0;
    background-color: #f4f7f9;
}

.topics-grid-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* สร้าง 2 คอลัมน์ */
    gap: 25px; /* ระยะห่างระหว่างการ์ด */
    margin-top: 30px;
    background-color: #f4f7f9;
}

.topic-card {
    background-color: #f4f7f9;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 5px solid transparent; /* สร้างเส้นขอบด้านซ้ายแบบโปร่งใส */
}

.topic-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-left-color: var(--accent-color); /* แสดงเส้นขอบเมื่อ hover */
    cursor: pointer;
}

.topic-card i {
    font-size: 2rem;
    color: var(--accent-color);
    width: 40px; /* กำหนดความกว้างให้ไอคอน */
    text-align: center;
    background-color: #f4f7f9;
}

.topic-card h5 {
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin: 0;
    font-weight: 600;
}

/* ปรับเป็น 1 คอลัมน์เมื่อหน้าจอเล็ก */
@media (max-width: 768px) {
    .topics-grid-cards {
        grid-template-columns: 1fr;
    }
}
/* Scroll Reveal Animations - รองรับ prefers-reduced-motion */
@media (prefers-reduced-motion: no-preference) {
  
  /* Hero Section Reveal */
  .hero-content {
    animation: fadeInUp linear both;
    animation-timeline: view();
    animation-range: entry 20% cover 50%;
  }

  /* Info Sections (หลักการและเหตุผล, วัตถุประสงค์) */
  .info-section .content-box {
    animation: slideInLeft linear both;
    animation-timeline: view();
    animation-range: entry 30% cover 60%;
  }

  /* Topics Cards - เฉพาะเจาะจง */
  .topics-grid-cards {
    animation: fadeInUp linear both;
    animation-timeline: view();
    animation-range: entry 20% cover 50%;
  }

  /* Topic Cards แยกแต่ละใบ - Cascade effect */
  .topic-card {
    animation: scaleInUp linear both;
    animation-timeline: view();
    animation-range: entry 40% cover 70%;
  }

  /* Footer Reveal */
  .contact-footer {
    animation: fadeInUp linear both;
    animation-timeline: view();
    animation-range: entry 10% cover 40%;
  }
}
/* อันนี้ส่วนข้อความ */
.welcome-section {
    padding: 4rem 0; 
}

.welcome-text {
    max-width: 850px;
    margin: 2rem auto 0;
}

.welcome-text p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    text-indent: 2em;
    text-align: left; /* ค่าเริ่มต้นสำหรับจอแคบ (มือถือ) */

    /* เพิ่มการตัดคำอัตโนมัติเพื่อช่วยให้ justify สวยขึ้น */
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
}

/* Media Query: เมื่อหน้าจอกว้างกว่า 768px ขึ้นไป */
@media (min-width: 768px) {
    .welcome-text p {
        text-align: justify; /* เปลี่ยนเป็น justify สำหรับจอใหญ่ */
    }
}

/* ============================================
   🎨 SCROLL REVEAL ANIMATIONS (ปรับปรุงใหม่)
============================================ */

/* ============================================
   🎨 SMOOTH SCROLL REVEAL ANIMATIONS
   (ไหลลื่นออกมาจากขอบจอ)
============================================ */

@media (prefers-reduced-motion: no-preference) {
  
  /* --- Hero Section --- */
  .hero-content {
    opacity: 0;
    transform: translateY(80px);
    animation: smoothFadeUp 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
  }

  /* --- หลักการและเหตุผล (Slide จากซ้าย) --- */
  .info-section:nth-of-type(1) .content-box {
    opacity: 0;
    transform: translateX(-100%);
    animation: smoothSlideInLeft 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-timeline: view();
    animation-range: entry 0% cover 35%;
  }

  /* --- วัตถุประสงค์ (Slide จากขวา) --- */
  .info-section:nth-of-type(2) .content-box {
    opacity: 0;
    transform: translateX(100%);
    animation: smoothSlideInRight 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-timeline: view();
    animation-range: entry 0% cover 35%;
  }

  /* --- Section Title (ลอยลงจากบน) --- */
  .info-section .section-title h2 {
    opacity: 0;
    transform: translateY(-60px);
    animation: smoothDropDown 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-timeline: view();
    animation-range: entry 10% cover 40%;
  }

  /* --- เนื้อหา Paragraph (ค่อยๆ ขึ้น) --- */
  .info-section .welcome-text p {
    opacity: 0;
    transform: translateY(40px);
    animation: smoothFadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-timeline: view();
    animation-range: entry 15% cover 50%;
  }

  .info-section .welcome-text p:nth-child(2) {
    animation-delay: 0.15s;
  }

  .info-section .welcome-text p:nth-child(3) {
    animation-delay: 0.25s;
  }

  /* --- Conference Topics Section --- */
  .topics-section .content-box {
    opacity: 0;
    transform: scale(0.9) translateY(30px);
    animation: smoothScaleIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-timeline: view();
    animation-range: entry 0% cover 35%;
  }

  /* --- Topic Cards (ไหลขึ้นมาทีละใบ) --- */
  .topic-card {
    opacity: 0;
    transform: translateY(60px) scale(0.92);
    animation: smoothCardPop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-timeline: view();
    animation-range: entry 20% cover 60%;
  }

  /* Cascade Delay (ทีละใบแบบค่อยเป็นค่อยไป) */
  .topic-card:nth-child(1)  { animation-delay: 0s; }
  .topic-card:nth-child(2)  { animation-delay: 0.08s; }
  .topic-card:nth-child(3)  { animation-delay: 0.16s; }
  .topic-card:nth-child(4)  { animation-delay: 0.24s; }
  .topic-card:nth-child(5)  { animation-delay: 0.32s; }
  .topic-card:nth-child(6)  { animation-delay: 0.40s; }
  .topic-card:nth-child(7)  { animation-delay: 0.48s; }
  .topic-card:nth-child(8)  { animation-delay: 0.56s; }
  .topic-card:nth-child(9)  { animation-delay: 0.64s; }
  .topic-card:nth-child(10) { animation-delay: 0.72s; }

  /* --- Footer (ไหลขึ้นจากด้านล่าง) --- */
  .contact-footer {
    opacity: 0;
    transform: translateY(60px);
    animation: smoothFadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-timeline: view();
    animation-range: entry 0% cover 30%;
  }

}

/* ============================================
   📐 KEYFRAMES (ปรับให้ Smooth ขึ้น)
============================================ */

/* Fade Up (ลอยขึ้นอย่างนุ่มนวล) */
@keyframes smoothFadeUp {
  0% {
    opacity: 0;
    transform: translateY(80px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slide จากซ้ายสุด (นอกจอ → เข้ามา) */
@keyframes smoothSlideInLeft {
  0% {
    opacity: 0;
    transform: translateX(-100%);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Slide จากขวาสุด (นอกจอ → เข้ามา) */
@keyframes smoothSlideInRight {
  0% {
    opacity: 0;
    transform: translateX(100%);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Drop Down (ลอยลงจากบน + Bounce นิดหน่อย) */
@keyframes smoothDropDown {
  0% {
    opacity: 0;
    transform: translateY(-60px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scale In (ค่อยๆ ขยาย + ขึ้น) */
@keyframes smoothScaleIn {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(30px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Card Pop (ลอยขึ้น + ขยาย + Elastic) */
@keyframes smoothCardPop {
  0% {
    opacity: 0;
    transform: translateY(60px) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
/* ============================================
   🎨 FOOTER ANIMATIONS (แบบเรียบง่าย)
============================================ */

@media (prefers-reduced-motion: no-preference) {

/* ใส่ในส่วน @media (prefers-reduced-motion: no-preference) */
.footer-wave-container svg {
  opacity: 0;
  transform: translateY(30px);
  animation: smoothFadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-timeline: view();
  animation-range: entry 0% cover 30%;
}

.contact-footer {
  opacity: 0;
  transform: translateY(80px);
  animation: smoothFadeUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-timeline: view();
  animation-range: entry 0% cover 35%;
}

.contact-item:hover {
  transform: translateY(-8px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.contact-item:hover i {
  transform: scale(1.15);
  color: var(--text-light);
  transition: all 0.3s ease;
}

/* ใส่ในส่วน Keyframes */
@keyframes smoothFadeUp {
  0% {
    opacity: 0;
    transform: translateY(80px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
}

/* --- CSS สำหรับจัดวางรูปภาพ --- */

/* 1. จัดการ Container หลัก (.reason-images) */
.reason-images {
    display: flex;             /* เปิดใช้งาน Flexbox */
    justify-content: center;   /* จัดเรียง item ทั้งหมดให้อยู่แนวนอนตรงกลาง */
    align-items: center;       /* จัดเรียง item ทั้งหมดให้อยู่แนวตั้งตรงกลาง (เผื่อรูปสูงไม่เท่ากัน) */
    gap: 2rem;                 /* สร้างระยะห่างระหว่างรูปภาพแต่ละรูป (เช่น 32px) */
    padding: 2rem 0;           /* เพิ่มระยะห่างบน-ล่าง ให้ดูไม่ติดกับส่วนอื่น */
}

/* 2. กำหนดขนาดรูปภาพที่อยู่ข้างใน */
.reason-images img {
    height: 200px;     /* ปรับขนาดความสูงของรูป (ปรับค่าได้ตามต้องการ) */
    width: auto;       /* ให้ความกว้างปรับตามอัตโนมัติเพื่อไม่ให้รูปบิดเบี้ยว */
    object-fit: contain; /* ทำให้รูปแสดงผลเต็มขนาดภายในพื้นที่ที่กำหนดโดยไม่ถูกตัด */
}

/* ======================== */
/* 9. SUBMISSION BANNER     */
/* ======================== */
.submission-banner {
    background-color: var(--primary-light);
    padding: 60px 0;
    color: var(--text-light);
}

.submission-wrapper {
    background-color: var(--primary-dark);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    padding: 50px 40px;
    
    /* --- ✨ จุดเปลี่ยนสำคัญ: จัดทุกอย่างตรงกลาง --- */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* --- ลบโค้ดเก่าของ .submission-cta และ .submission-info ออก --- */
/* (เพราะเราจะรวมสไตล์ไว้ใน wrapper เลย) */

.banner-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-color);
    margin: 0 0 1rem 0;
    line-height: 1.1;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* --- ปรับปุ่ม CTA ใหม่ --- */
.submission-cta {
    margin: 20px 0 30px 0; /* ระยะห่าง บน-ล่าง */
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.btn-submit {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--primary-dark);
    font-size: 1.5rem;
    font-weight: 700;
    padding: 20px 60px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 20px rgba(0, 212, 161, 0.3);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin-bottom: 20px;
}

.btn-submit:hover {
    background-color: var(--accent-hover);
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 8px 30px rgba(0, 212, 161, 0.4);
}

.cta-manual {
    font-size: 0.9rem;
    color: var(--text-grey);
}

.cta-manual a {
    color: var(--accent-color);
    text-decoration: underline;
    font-weight: 600;
}

/* --- ดีไซน์ใหม่สำหรับ Template Section --- */
.submission-info {
    width: 100%;
    max-width: 700px; /* จำกัดความกว้างไม่ให้ยาวเกินไปบนจอใหญ่ */
    margin-top: 25px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.15); /* เส้นคั่นสวยๆ */
}

.submission-info h3 {
    font-size: 1.3rem;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 20px;
    opacity: 0.9;
}

.template-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 20px; /* ระยะห่างระหว่างปุ่ม */
    flex-wrap: wrap; /* ให้ปุ่มขึ้นบรรทัดใหม่ได้บนจอมือถือ */
}



/* เปลี่ยนลิงก์ให้เป็นปุ่ม (Ghost Button) */
.template-links a {
    display: inline-block;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    background: transparent;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.template-links a:hover {
    background: var(--accent-color);
    color: var(--primary-dark);
}

/* ซ่อนข้อความ "Click here" และตัวเลขเดิม */
.template-links li a {
    font-size: 0; /* ซ่อนข้อความทั้งหมดใน a */
}
.template-links li a::after {
    font-size: 1rem; /* แสดงเฉพาะข้อความที่เราต้องการ */
    content: "Template (Thai)"; /* ทำให้สั้นลง */
}
.template-links li:nth-child(2) a::after {
    content: "Template (English)"; /* ทำให้สั้นลง */
}


/* --- Responsive สำหรับมือถือ --- */
@media (max-width: 768px) {
    .banner-title {
        font-size: 2rem;
    }

    .btn-submit {
        font-size: 1.2rem;
        padding: 18px 40px;
        width: 90%; /* ทำให้ปุ่มใหญ่เกือบเต็มความกว้าง */
        max-width: 400px;
    }

    .template-links {
        flex-direction: column; /* เรียงเป็นแนวตั้งบนจอมือถือ */
        align-items: center;
        gap: 15px;
    }

    .template-links a {
        width: 90%; /* ทำให้ปุ่มใหญ่เกือบเต็มความกว้าง */
        max-width: 400px;
    }
}
/* ======================================= */
/* 10. IMPORTANT DATES (ดีไซน์ Timeline)  */
/* ======================================= */

/* --- Container หลักของการ์ด --- */
.dates-card {
    max-width: 900px;
    margin: 0 auto;
    background-color: var(--bg-white);
    padding: 50px 40px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #eef2f5;
}

/* --- หัวข้อ "Important Dates" --- */
.card-title {
    text-align: center;
    font-size: 2.2rem;
    color: var(--primary-dark);
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 15px;
}

.card-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--accent-color);
}

/* --- ตัวจัดการ List และเส้น Timeline --- */
.dates-list {
    position: relative;
    padding-left: 45px; /* เว้นที่ให้เส้น Timeline */
}

/* --- สร้างเส้น Timeline แนวตั้งด้วย Pseudo-element --- */
.dates-list::before {
    content: '';
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 20px; /* จัดให้อยู่ตรงกลางของพื้นที่ไอคอน */
    width: 3px;
    background-color: #e9ecef;
    border-radius: 2px;
}

/* --- แถวของแต่ละวัน --- */
.date-row {
    display: flex;
    align-items: center;
    position: relative;
    padding: 15px 0;
    transition: background-color 0.3s ease;
    border-radius: 8px;
    margin-left: -45px; /* ดึงกลับมาให้เต็มพื้นที่ */
}

.date-row:not(:last-child) {
    margin-bottom: 10px;
}

.date-row:hover {
    background-color: #f8faff;
}

/* --- คอลัมน์ไอคอน --- */
.icon-column {
    flex: 0 0 45px; /* กำหนดความกว้างคงที่ */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2; /* ทำให้ไอคอนอยู่ทับเส้น Timeline */
}

.icon-wrapper {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--accent-color);
    border: 3px solid var(--bg-white);
    box-shadow: 0 0 0 3px var(--accent-color);
    transition: transform 0.3s ease;
}

.date-row:hover .icon-wrapper {
    transform: scale(1.1);
}

.icon-wrapper i {
    color: var(--text-light);
    font-size: 1.1rem;
}


/* --- คอลัมน์คำอธิบาย --- */
.description-column {
    flex: 1; /* ให้ยืดเต็มพื้นที่ที่เหลือ */
    padding: 0 25px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-dark);
}

/* --- คอลัมน์วันที่ --- */
.date-column {
    flex-shrink: 0;
    padding-right: 20px;
}

.date-column p {
    display: inline-block; /* ทำให้ background พอดีกับข้อความ */
    margin: 0;
    background-color: #eef2f5; /* ✅ ใส่พื้นหลังสีเทาอ่อน */
    color: var(--primary-dark);     /* ✅ ใช้สีเข้ม */
    font-size: 1.1rem;              /* ✅ เพิ่มขนาด */
    font-weight: 600;               /* ✅ เพิ่มความหนา */
    padding: 8px 18px;              /* ✅ เพิ่มระยะห่างภายใน */
    border-radius: 50px;            /* ✅ ทำให้ขอบมนเหมือนแคปซูล */
    white-space: nowrap;
}

/* --- Responsive สำหรับมือถือ --- */
@media (max-width: 768px) {
    .dates-card {
        padding: 40px 20px;
    }

    .date-row {
        flex-wrap: wrap; /* อนุญาตให้ตัดขึ้นบรรทัดใหม่ */
        padding-bottom: 20px;
    }

    .dates-list {
        padding-left: 35px;
    }
    
    .dates-list::before {
        left: 15px;
    }
    
    .icon-column {
        flex-basis: 35px;
    }

    .description-column {
        flex-basis: calc(100% - 35px); /* ทำให้คำอธิบายอยู่บรรทัดเดียวกับไอคอน */
        padding: 0 0 0 20px;
        font-size: 1rem;
    }
    
    .date-column {
        flex-basis: 100%;
        padding-left: 55px;
        padding-top: 8px;
        padding-right: 0;
        text-align: left;
    }
    
    .date-column p {
        font-size: 0.95rem; /* ปรับขนาดให้เหมาะกับมือถือ */
        padding: 6px 15px;
    }
}
/* ================================== */
/*      REGISTRATION FEE SECTION      */
/* ================================== */

/* --- Pricing Table Container --- */
.pricing-table {
    max-width: 900px;
    margin: 50px auto 40px;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 2px solid rgba(11, 29, 42, 0.1);
}

/* --- Table Header --- */
.pricing-header {
    background: var(--primary-gradient);
    display: grid;
    grid-template-columns: 2fr 1fr;
    padding: 25px 35px;
    gap: 20px;
    border-bottom: 3px solid var(--accent-color);
}

.pricing-header .pricing-category,
.pricing-header .pricing-price {
    color: var(--text-main);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.pricing-header .pricing-price {
    text-align: right;
    margin-right: 50px;
}

/* --- Table Body --- */
.pricing-body {
    background: white;
}

/* --- Pricing Row --- */
.pricing-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    padding: 28px 35px;
    gap: 20px;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    position: relative;
}

.pricing-row:last-child {
    border-bottom: none;
}

.pricing-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.pricing-row:hover {
    background: rgba(20, 184, 166, 0.03);
}

.pricing-row:hover::before {
    transform: scaleY(1);
}

/* --- Category Name --- */
.pricing-category-name {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #334155;
    font-size: 1.05rem;
    font-weight: 500;
}

.pricing-category-name i {
    font-size: 1.4rem;
    color: var(--accent-color);
    min-width: 28px;
}

/* --- Price Amount --- */
.pricing-amount {
    text-align: right;
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 8px;
}

.price-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.price-currency {
    font-size: 1.1rem;
    font-weight: 600;
    color: #64748b;
}

/* --- Registration Note --- */
.registration-note {
    max-width: 900px;
    margin: 30px auto;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.1), rgba(14, 165, 233, 0.1));
    border-left: 4px solid var(--accent-color);
    border-radius: 12px;
    padding: 25px 30px;
}

.note-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.note-header i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.note-header h4 {
    color: var(--primary-dark);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

.registration-note p {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
    font-weight: 500;
}

/* --- CTA Button --- */
.registration-cta {
    text-align: center;
    margin-top: 50px;
}

.btn-large {
    padding: 18px 45px;
    font-size: 1.15rem;
    font-weight: 700;
    gap: 12px;
}

.btn-large i {
    font-size: 1.3rem;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .pricing-header,
    .pricing-row {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 20px 25px;
    }

    .pricing-header .pricing-price {
        text-align: left;
    }

    .pricing-amount {
        justify-content: flex-start;
    }

    .pricing-category-name {
        font-size: 0.95rem;
    }

    .pricing-category-name i {
        font-size: 1.2rem;
        min-width: 24px;
    }

    .price-number {
        font-size: 1.5rem;
    }

    .price-currency {
        font-size: 1rem;
    }

    .registration-note {
        padding: 20px;
    }

    .registration-note p {
        font-size: 0.9rem;
    }

    .btn-large {
        width: 100%;
        padding: 16px 30px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .pricing-table {
        margin: 30px 0;
    }

    .pricing-header .pricing-category,
    .pricing-header .pricing-price {
        font-size: 1.1rem;
    }

    .pricing-row {
        padding: 18px 20px;
    }
}

/* ===== Slider Section ===== */
.image-slider-section {
    position: relative;
    width: 100%;
    height: 520px;
    margin-top: 100px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.slider-wrapper {
    width: 100%;
    max-width: 1400px;
    overflow: hidden;
}

.slider {
    display: flex;
    transition: transform 0.6s ease;
}

.slide {
    min-width: 420px;
    margin: 0 30px;
    transform: scale(0.85);
    opacity: 0.4;
    transition: 0.5s;
    cursor: pointer;
}

.slide.active {
    transform: scale(1);
    opacity: 1;
}

.slide img {
    width: 100%;
    border-radius: 12px;
}

/* arrows */
.image-slider-section .arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #555;
    color: #fff;
    border: none;
    width: 46px;
    height: 46px;
    font-size: 22px;
    cursor: pointer;
    border-radius: 6px;
    z-index: 10;
}

.arrow.left { left: 30px; }
.arrow.right { right: 30px; }

/* ===== Modal ===== */
.image-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);

    z-index: 99999;

    /* 🔑 เปลี่ยนจาก center เป็น flex-start */
    align-items: flex-start;
    justify-content: center;

    /* 🔑 ดันลงเท่าความสูง header */
    padding-top: var(--header-height);
    box-sizing: border-box;
}

.image-modal img {
    max-width: 90%;
    max-height: calc(100vh - var(--header-height) - 40px);
    border-radius: 10px;
}

.image-modal .close {
    position: absolute;
    top: 25px;
    right: 40px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
}

body.modal-open {
    overflow: hidden;
}

