/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    line-height: 1.6;
    background-color: #333;
}

/* ตั้งค่า Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

/* เมนู Dropdown */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #444;
    min-width: 200px;
    padding: 10px 0;
    border-radius: 5px;
    list-style: none;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
    text-align: left;
}

/* เมนูที่อยู่ใน Dropdown */
.dropdown-menu li {
    padding: 10px 20px;
    border-bottom: 1px solid #666;
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

/* ปรับสไตล์ของลิงก์ */
.dropdown-menu a {
    color: white;
    text-decoration: none;
    display: block;
}

.dropdown-menu a:hover {
    background-color: #555;
}

/* แสดงเมนูเมื่อมี class show */
.dropdown.show .dropdown-menu {
    display: block;
}

/*Schedule Section*/
.schedule-section{
  padding: 120px 20px 60px;
  background: #f4f6fb;
  color: #1f2937;
}
.schedule-wrap{max-width: 1100px; margin: 0 auto;}
.schedule-header h1{font-size: 2rem; color:#0f172a; margin-bottom: .25rem;}
.schedule-header .muted{color:#6b7280; margin-bottom: 1rem;}
.day-chips{display:flex; gap:.5rem; flex-wrap:wrap; margin-bottom:1.25rem;}
.day-chips .chip{
  display:inline-block; padding:.4rem .7rem; border-radius:999px;
  background:#e5e7eb; color:#111827; text-decoration:none; font-weight:700;
  border:1px solid #cbd5e1;
}
.day-chips .chip:hover{background:#dbeafe; border-color:#93c5fd;}

.day-card{
  background:#ffffff; border:1px solid #e5e7eb; border-radius:14px;
  padding:18px 20px; margin-bottom:18px; box-shadow:0 6px 20px rgba(17,24,39,.05);
}
.day-card h2{margin:0 0 10px; font-size:1.25rem;}
.day-card .muted{color:#6b7280; font-weight:500}

.events{list-style:none; padding:0; margin:0; display:grid; gap:10px}
.event{
  display:grid; grid-template-columns: 140px 130px 1fr; align-items:center;
  gap:10px; padding:10px 12px; border-radius:10px; border:1px dashed #e5e7eb;
  background:#fafafa;
}
.time{font-variant-numeric: tabular-nums; color:#475569}
.badge{
  display:inline-block; font-size:.78rem; font-weight:800; padding:.25rem .55rem;
  border-radius:999px; color:#0b0f14; text-align:center;
}
.event .badge{justify-self:start}

/* สีหมวด */
.event.plenary   {background:#E0E7FF}
.event.concurrent {background:#EDE9FE}
.event.break     {background:#E0F2FE}
.event.lunch     {background:#DCFCE7}
.event.poster    {background:#FFE4E6}
.event.social    {background:#FEF3C7}
.event.ceremony  {background:#FFEDD5}
.event.reg       {background:#ECFCCB}

/* สำหรับมือถือ */
@media (max-width: 800px) {
    .dropdown-menu {
        position: relative;
        width: 100%;
        left: 0;
        transform: none;
        box-shadow: none;
    }
}


/* Navbar Container */
.navbar-container {
    position: fixed; /* Navbar ยังคงติดบนสุด */
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: #333;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 15px 20px;
    color: white;
    position: relative;
    z-index: 1002; /* ให้ navbar อยู่บนสุด */
}

/* โลโก้ */
.navbar .logo a {
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
}

/* เมนูปกติ */
.nav-links {
    list-style: none;
    display: flex;
    transition: transform 0.3s ease-in-out;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-size: 1rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #00bcd4;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1100;
    position: absolute;
    right: 10px;
    top: 15px;
}

.hamburger .bar {
    background-color: white;
    height: 3px;
    width: 25px;
    margin: 4px 0;
    transition: all 0.3s ease;
}

/* Hero Section */
.home {
    padding: 0;
}
.hero {
    height: 100vh; /* ทำให้พื้นที่เต็มหน้าจอ */
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5)),
                      url(https://pbs.twimg.com/media/FWAVMdnUcAEbFK9.jpg:large);
    background-size: cover; /* ทำให้ภาพครอบคลุมพื้นที่ */
    background-position: center; /* จัดให้ภาพอยู่กึ่งกลาง */
    background-attachment: fixed; /* ทำให้ภาพพื้นหลังคงที่ */
    position: relative;
    display: flex;
    justify-content: center; /* จัดข้อความให้อยู่กึ่งกลางแนวนอน */
    align-items: center; /* จัดข้อความให้อยู่กึ่งกลางแนวตั้ง */
    text-align: center; /* จัดข้อความตรงกลาง */
}

/* Hero Content */
.hero-content {
    color: white; /* สีข้อความ */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7); /* เพิ่มเงาให้ข้อความอ่านง่ายขึ้น */
}

.hero-content h1 {
    font-size: 3rem; /* ขนาดตัวอักษรสำหรับ h1 */
    margin-bottom: 20px;
    font-weight: bold;
}

.hero-content h3 {
    font-size: 1.5rem; /* ขนาดตัวอักษรสำหรับ h3 */
    margin-bottom: 10px;
    font-weight: normal;
}

.hero-content h3 sup {
    font-size: 1rem; /* ทำให้ <sup> เล็กลง */
}


/* footer */

footer {
    color: #fff;
}

footer p {
    text-align: center;
}




/* Responsive Navbar */
@media screen and (max-width: 800px) {
    .hamburger {
        display: flex;
    }

    .navbar {
        flex-direction: column;
        text-align: center;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: rgba(34, 34, 34, 0.95);
        position: absolute;
        top: 60px;
        left: 0;
        z-index: 1001;
        padding: 10px 0;
    }

    .nav-links.show {
        display: flex;
    }

    .nav-links li {
        padding: 15px 0;
        width: 100%;
    }

    .about-container {
        flex-direction: column;
        text-align: center;
    }
    .about-content {
        text-align: center;
    }
    .about-image img {
        max-width: 80%;
        margin-bottom: 20px;
    }

    .navbar-container {
        flex-direction: column;
        text-align: center;
    }

    .publication-grid {
        grid-template-columns: repeat(2, 1fr); /* 4 คอลัมน์ */
    }
}

@media (max-width: 1024px) {
    .speakers-grid {
        grid-template-columns: repeat(3, 1fr); /* 2 กล่องต่อแถว */
    }
}

@media (max-width: 768px) {
    .speakers-grid {
        grid-template-columns: 1fr; /* 1 กล่องต่อแถว */
    }
}

@media (max-width: 400px) {
    .publication-grid {
        grid-template-columns: repeat(1, 1fr); /* 4 คอลัมน์ */
    }
}


#home {
    background: #f4f4f4;
}

#about {
    background: #e4e4e4;
}

#services {
    background: #d4d4d4;
}

#contact {
    background: #c4c4c4;
}


#schedule .day-card { scroll-margin-top: 80px; }

#schedule .day-chips{
  display:flex; gap:.5rem; flex-wrap:wrap;
  overflow:auto; -webkit-overflow-scrolling: touch;
}
#schedule .day-chips::-webkit-scrollbar{ display:none; }


/* เวลาจัดรูปแบบเลขอ่านง่าย */
#schedule .time{ font-variant-numeric: tabular-nums; color:#334155; }

/* Tablet ลงมา */
@media (max-width: 800px){
  #schedule { padding: 100px 16px 50px; } /* เฉพาะ section นี้ */
  #schedule .event{ grid-template-columns: 100px 1fr; }
}

/* มือถือเล็ก */
@media (max-width: 560px){
  #schedule .event{ grid-template-columns: 88px 1fr; padding:12px; }
}
