:root{
  --red:#C41412; 
  --red-darker:#A10F0E;
  --beige:#F6EFD8;
  --beige-soft:#FAF4E3;
  --ink:#3A2B21;
  --muted:#8C7A67;
  --radius-pill:999px;
  --radius-lg:20px;
}

.wrap{
  max-width: 420px;
  margin: 0 auto;
  padding: 16px 16px 24px;
  font-family: 'Noto Sans Thai', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
}

/* โลโก้บนสุด */
.brand{
  display:flex;
  justify-content:center;
  align-items:center;
  padding: 9px 0 12px;
}
.brand .logo{
  width: 90px;
  height: auto;
  display:block;
  margin: 0 auto 6px;
}
.brand .brand-text{
  text-align:center;
}

.service-dropdown {
  position: relative;
  width: 92%;
  margin: 8px auto 18px;
  /* margin-top: 14rem; */
}

.dropdown-toggle {
  background: var(--red);
  color: #fff;
  text-align: center;
  font-weight: 400;
  font-size: 20px;
  padding: 18px 18px;
  border-radius: var(--radius-pill);
  width: 100%;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  font-family: "Kanit", system-ui, -apple-system, Segoe UI, Arial, sans-serif;
}

.dropdown-toggle:hover {
    background: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.dropdown-arrow {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.dropdown-toggle.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 8px;
    overflow: hidden;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: 16px 20px;
    color: #333;
    text-decoration: none;
    display: block;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: var(--red);
    padding-left: 25px;
}

.dropdown-item:active {
    background: #e9ecef;
}

/* Animation for smooth opening */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu.show {
    animation: slideDown 0.3s ease;
}

.hero-cta{
  background: var(--red);
  color: #fff;
  text-align: center;
  font-weight: 400;
  font-size: 20px;
  padding: 14px 18px;
  border-radius: var(--radius-pill);
  width: 92%;
  margin: 8px auto 18px;
  margin-top: 2rem;
}

.time-select-wrapper{
  width: 110%;
  margin-left: -5%;
  background: #fdfae9;
  padding: 10px 20px;
}

.section{
    margin-bottom: 2.5rem;
}

.section-title{
  font-weight: 200;
  font-size: 18px;
  padding: 6px 6px 10px;
  border-left: 2px solid #f9c56f;
  margin-left: 4px;
  margin-bottom: 8px;
}

.date-strip{
    position: relative;
    background: #fdfae9;
    border-radius: 12px;
    padding: 10px 44px;
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    width: 110%;
    margin-left: -5%;
}

.date-header{
  display:flex;
  gap: 10px;
  align-items:center;
  font-size: 14px;
  color: var(--muted);
  padding: 6px 0 10px;
}
.date-header .today{
  font-weight: 700;
  color: var(--ink);
}
.date-header .month{
  font-weight: 600;
}

.date-nav{
  position: absolute;
  top: 50%;
  transform: translateY(-10%);
  width: 36px;
  height: 36px;
  display:flex;
  justify-content:center;
  align-items:center;
  background-color: transparent;
  outline: none !important;
  border: 0;
}
.date-nav .chev img{ width: 13px; }
.date-nav.prev{ left: 6px; }
.date-nav.next{ right: 6px; }

.date-list {
  display: flex;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-top: 30px;
  
  /* ซ่อน scrollbar แต่ยังเลื่อนได้ */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

/* ซ่อน scrollbar ใน Chrome, Safari และ Opera */
.date-list::-webkit-scrollbar {
  display: none;
}
.date-item{ flex: 0 0 auto; position: relative; text-align: center; }
.date-item .label {
  font-size: 18px;
  width: 50px;
  left: 50%;
  top: -20%;
  transform: translate(-50%, -50%);
  position: absolute;
  font-weight: 200;
}
.date-item
.date-pill{
  width: 75px;
  height: 75px;
  border-radius: 50%;
  border: 2px solid var(--red);
  background: transparent;
  display:flex;
  flex-direction: column;
  justify-content:center;
  align-items:center;
  line-height: 0.9;
  font-family: "Kanit";
  font-weight: 300;
}
.date-pill .dow{
  font-size: 20px;
  color: var(--ink);
}
.date-pill .dom{
  font-size: 30px;
  color: var(--ink);
}
.date-item.is-active .date-pill{
  background: var(--red);
  border-color: var(--red);
}

.date-item.is-active .label{
  font-size: 20px;
}
.date-item.is-active .date-pill .dow,
.date-item.is-active .date-pill .dom{
  color: #fff;
}

.section-time{ padding-bottom: 6px; }
.time-grid{
  display: grid;
  grid-template-columns: 1fr 1fr 1fr; 
  gap: 14px 12px;
  list-style:none;
  padding: 6px 4px 0;
  margin: 0;
}
.time-item{
  text-align: center;
}

.time-item .remain{
  font-size: 14px;
  margin-top: 3px;
  font-weight: 400;
}
.time-btn{
  width: 100%;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--red);
  padding: 10px 6px 8px;
  text-align:center;
  cursor: pointer;
  font-family: "Kanit";
}
.time-btn:disabled{
  background-color: #9c9c9c;
}
.time-btn.is-active{
  background-color: #720a0a;
}
.time-btn .time{
  color: #fff;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.1;
}
.time-btn .remain{
  color: #fff;
  opacity: .9;
  font-size: 12px;
  margin-top: 4px;
}
.disclaimer{
  font-size: 12px;
  color: var(--red);
  margin: 10px 6px 0;
  text-align: center;
}

/* ปุ่มถัดไปใหญ่ */
.cta-row{
  display:flex;
  justify-content:center;
  margin: 18px 0 10px;
  width: 100%;
}
.btn-next{
  display:inline-block;
  background: var(--red);
  color:#fff;
  text-decoration:none;
  font-weight: 400;
  font-size: 20px;
  width: 100%;
  padding: 12px 28px;
  text-align: center;
  border-radius: var(--radius-pill);
  border: 0;
  font-family: "Kanit", system-ui, -apple-system, Segoe UI, Arial, sans-serif;
}

/* การ์ดหมอ 2x2 */
.section-doctors{
  background: #F7F0DE;
  padding-top: 16px;
}
.doctor-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  list-style:none;
  padding: 0 4px 10px;
  margin: 0;
}
.doctor-name{
  font-weight: 800;
  font-size: 16px;
  color: var(--ink);
}
.doctor-tags{
  display:flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content:center;
}
.doctor-tags span{
  background: var(--red);
  color:#fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  padding: 3px 8px;
  letter-spacing: .5px;
}

/* พื้นหลังส่วนการ์ดหมอให้เป็นโทนครีมลาย (ตามภาพ) */
.section-doctors.section-doctors--red{
  background: transparent;          /* พื้นหลังหลักอยู่ที่ body แล้ว */
  padding-top: 8px;
}

/* การ์ดหมอ: พื้นแดง, มุมโค้ง, เงาขอบเหมือนในภาพ */
.doctor-card--red{
    background: var(--red);
    border-radius: 20px;
    padding: 9px 9px;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05) inset;
}

/* ชื่อหมอ สีขาว หนัก */
.doctor-name--white{
  color:#fff;
  font-weight: 400;
  font-size: 20px;
  text-align:center;
}

.day-pill{
  display:flex;
  justify-content:center;
  align-items:center;
  gap: 10px;
  background: #FCEDCE;
background: linear-gradient(275deg, rgba(252, 237, 206, 1) 0%, rgba(255, 249, 231, 1) 52%, rgba(252, 237, 206, 1) 100%);
  border-radius: 999px;
  padding: 6px 16px;
  color: var(--red);
  font-weight: 400;
  font-size: 16px;
  letter-spacing: -1.5px;
}

/* ตัวอักษรแต่ละช่อง ให้จัดกึ่งกลางและไม่ยุบ */
.day-pill span{
  display:inline-block;
  line-height: 1;
  padding-top: 1px;   /* ดันตัวอักษรลงนิดให้บาลานซ์กับ gradient */
}

/* กริดการ์ด 2x2 ตามภาพ */
.doctor-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  list-style:none;
  padding: 0 4px 10px;
  margin: 12px 0 0;
}

.resource-info{
  display: none !important;
}

/* ปรับขนาดจอเล็ก */
@media (max-width: 360px){
  .time-grid{ grid-template-columns: 1fr 1fr; }
  .date-pill{ width: 64px; height: 64px; }
  .hero-cta{ font-size: 18px; }
}


