/* Base */
body {
  margin: 0;
  background: #f3f4f6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #111827;
}

.header {
  padding: 1.2rem 1rem 1.4rem;
  border-bottom-left-radius: 1.25rem;
  border-bottom-right-radius: 1.25rem;
}

.header-inner {
  max-width: 480px;
  margin: 0 auto;
}

.header h1 {
  font-size: 1.35rem;
}
.header p {
  font-size: 0.85rem;
}

.container {
  width: 100%;
  max-width: 420px;     /* ปรับลงจาก 480 → 420 เพื่อกันพื้นที่ล้น */
  margin: -0.8rem auto 2rem;
  padding: 0 0.75rem;   /* ลด padding ซ้ายขวานิด */
  box-sizing: border-box;
}


/* Card */
.card {
  background: white;
  padding: 1.2rem 1.2rem 1.3rem;
  border-radius: 1.1rem;
  margin-bottom: 1rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.card-main {
  border-top: 3px solid #38bdf8;
}

.card-result {
  border-top: 3px solid #22c55e;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}

.card-body {
  margin: 0;
}

/* Section title */
.section-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0.4rem 0 0.6rem;
  color: #0f172a;
}

.section-title.mt {
  margin-top: 1.2rem;
}

.section-title.no-margin {
  margin: 0;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
}

.badge-soft {
  background: #dcfce7;
  color: #15803d;
}

/* Form */
.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.85rem;
}

.form-group label {
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
  color: #4b5563;
}

input {
  padding: 0.6rem 0.7rem;
  border-radius: 0.75rem;
  border: 1px solid #d1d5db;
  font-size: 0.95rem;
  background: #f9fafb;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input:focus {
  outline: none;
  border-color: #38bdf8;
  background: #ffffff;
  box-shadow: 0 0 0 2px #bae6fd;
}

/* Buttons */
.btn-primary,
.btn-secondary {
  width: 100%;
  padding: 0.8rem;
  border-radius: 999px;
  font-size: 0.95rem;
  border: none;
  margin-top: 0.7rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.btn-primary {
  background: linear-gradient(135deg, #0f172a, #1f2937);
  color: #f9fafb;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.35);
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.3);
}

.btn-secondary {
  background: #e5e7eb;
  color: #111827;
}

.btn-secondary:active {
  background: #d1d5db;
  transform: translateY(1px);
}

/* Result */
.result-highlight {
  background: #e0f2fe;
  padding: 0.55rem 0.7rem;
  border-radius: 0.75rem;
  text-align: center;
  font-weight: 600;
  color: #0369a1;
  font-size: 0.9rem;
  margin-top: 0.4rem;
}

.result-box {
  margin-top: 0.8rem;
  font-size: 0.9rem;
  border-left: 3px solid #93c5fd;
  padding-left: 0.6rem;
  color: #374151;
}

.result-box p {
  margin: 0.05rem 0;
}

.result-total {
  margin-top: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.95rem;
  color: #4b5563;
}

.result-total strong {
  font-size: 1.25rem;
  color: #111827;
}

.note {
  margin-top: 0.8rem;
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.5;
}

/* Toggle cards */
.toggle-card {
  padding: 0;
  overflow: hidden;
}

.toggle-header {
  width: 100%;
  background: #0f172a;
  color: white;
  padding: 0.9rem 1rem;
  text-align: left;
  border: none;
  font-size: 0.95rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toggle-icon {
  font-size: 0.85rem;
  opacity: 0.85;
}

.toggle-content {
  padding: 0.9rem 1rem 1.1rem;
  border-top: 1px solid #e5e7eb;
}

/* Rate list */
.rate-title {
  margin: 0.1rem 0 0.3rem;
  font-weight: 600;
  color: #0f172a;
  font-size: 0.95rem;
}

.rate-list {
  margin: 0 0 0.6rem;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: #374151;
}

.rate-list li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0;
}

/* Pills */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: #0ea5e9;
  color: white;
  font-size: 0.75rem;
  font-weight: 500;
}

.pill-light {
  background: #e5f3ff;
  color: #1d4ed8;
}

/* Rules section */
.rules-list {
  margin: 0.3rem 0 0;
  padding-left: 1.2rem;
  font-size: 0.9rem;
}

.rules-list li {
  margin-bottom: 0.7rem;
}

.rules-list li strong {
  display: block;
  font-weight: 600;
  margin-bottom: 0.18rem;
  color: #111827;
}

.rules-list li p {
  margin: 0;
  color: #4b5563;
  line-height: 1.5;
}

/* Scroll to top button */
.scroll-top-btn {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  border: none;
  background: #0f172a;
  color: #fff;
  font-size: 1.3rem;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.15s ease;
  z-index: 50;
}

.scroll-top-btn.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Utility */
.hidden {
  display: none;
}

/* Widget dashboard – home menu */
.widget-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  margin-top: 0.6rem;
}

/* จอใหญ่ขึ้นค่อยแบ่ง 2 คอลัมน์ */
@media (min-width: 500px) {
  .widget-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.widget-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 0.9rem;
  border-radius: 1rem;
  text-decoration: none;
  background: #f9fafb;
  color: inherit;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  border: 1px solid #e5e7eb;
  transition:
    transform 0.08s ease,
    box-shadow 0.08s ease,
    background 0.12s ease,
    border-color 0.12s ease;
}

.widget-card:hover,
.widget-card:active {
  transform: translateY(1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
  background: #ffffff;
  border-color: #d1d5db;
}

.widget-card.widget-primary {
  background: linear-gradient(135deg, #0ea5e9, #38bdf8);
  color: #f9fafb;
  border-color: transparent;
}

.widget-card.widget-primary .widget-text p {
  color: #e0f2fe;
}

.widget-card.widget-accent {
  background: linear-gradient(135deg, #fed7aa, #fdba74);
  border-color: transparent;
}

/* วงกลมไอคอน */
.widget-icon-circle {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.08);
  flex-shrink: 0;
}

.widget-icon-circle.soft-blue {
  background: rgba(59, 130, 246, 0.12);
}

.widget-icon-circle.soft-green {
  background: rgba(34, 197, 94, 0.14);
}

.widget-icon-circle.soft-orange {
  background: rgba(249, 115, 22, 0.16);
}

.widget-icon {
  font-size: 1.4rem;
}

.widget-text h3 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
  color: #0f172a;
}

.widget-text p {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: #6b7280;
}

/* ปรับสีข้อความให้เหมาะกับพื้นหลังเข้ม */
.widget-card.widget-primary .widget-text h3 {
  color: #f9fafb;
}
.widget-card.widget-accent .widget-text h3 {
  color: #7c2d12;
}
.widget-card.widget-accent .widget-text p {
  color: #7c2d12;
}

/* Badge เล็ก ๆ มุมขวา */
.widget-badge {
  position: absolute;
  top: 0.55rem;
  right: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  background: rgba(15, 23, 42, 0.85);
  color: #f9fafb;
}

.badge-outline {
  background: transparent;
  border: 1px solid rgba(15, 23, 42, 0.35);
  color: #111827;
}
.home-btn {
  display: inline-block;
  margin: 1rem 0 0 0.8rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.88rem;
  background: #e0f2fe;
  color: #0f172a;
  border-radius: 0.75rem;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
  transition: background 0.15s;
}

.home-btn:hover {
  background: #bae6fd;
}

/* ปรับ widget ให้กระชับขึ้นบนหน้าจอเล็ก */
@media (max-width: 400px) {
  .widget-card {
    padding: 0.75rem 0.8rem;
    gap: 0.55rem;
  }

  .widget-icon-circle {
    width: 2.1rem;
    height: 2.1rem;
  }

  .widget-icon {
    font-size: 1.25rem;
  }

  .widget-text h3 {
    font-size: 0.9rem;
  }

  .widget-text p {
    font-size: 0.72rem;
  }
}
/* ===================== */
/* 🔧 FIX: Mobile Full-Fit */
/* ===================== */

/* จำกัดความกว้าง header ให้เท่ากับ container */
.header {
  max-width: 420px;
  margin: 0 auto;
  padding: 1.1rem 1rem 1.2rem;
  box-sizing: border-box;
}

/* ปรับ margin บน container ให้ไม่ล้น header */
.container {
  margin: 0.6rem auto 2rem !important;
}

/* ลด padding card เล็กน้อยบนมือถือ */
.card {
  padding: 1rem 1rem 1.1rem;
}

/* ปรับขนาด icon + spacing ให้ไม่ดันแนวนอน */
.widget-icon-circle {
  width: 2.2rem;
  height: 2.2rem;
}

.widget-card {
  padding: 0.8rem 0.85rem;
  gap: 0.6rem;
}

/* ปรับ grid ให้พอดีมือถือจริง ๆ */
.widget-grid {
  grid-template-columns: 1fr;
}

@media (min-width: 430px) {
  .widget-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ปรับ services amenities ให้ไม่ล้นซ้าย-ขวา */
.amenity-grid {
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

@media (min-width: 430px) {
  .amenity-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ป้องกันหน้าเลื่อนซ้าย-ขวา */
body, html {
  overflow-x: hidden;
}
/* ======================= */
/*  บริการ & สิ่งอำนวยความสะดวก (Premium) */
/* ======================= */

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 0.8rem;
}

@media (min-width: 480px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  text-align: center;
}

.service-icon-circle {
  width: 52px;
  height: 52px;
  background: #e8f4ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.4rem;
  font-size: 1.4rem;
}

.service-card p {
  font-size: 0.86rem;
  color: #374151;
  line-height: 1.25rem;
}
.logo {
  width: 90px;
  height: auto;
  display: block;
  margin: 0 auto 0.6rem;
}
.header {
  text-align: center;
  margin-top: 0.8rem;
  padding: 0.5rem 1rem 0;
}

.logo {
  width: 95px;
  height: 95px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  padding: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: block;
  margin: 0 auto 0.7rem;
}

.header h1 {
  font-size: 1.45rem;
  font-weight: 700;
  margin: 0;
  color: #1f2937;
}

.header p {
  margin: 0.3rem 0 1.2rem;
  font-size: 0.95rem;
  color: #6b7280;
}
