/* ============================================
   ICON SAFE LIFE GROUP - Main Stylesheet
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;500;600;700&family=Kanit:wght@400;500;600;700&display=swap');

:root {
  /* ── Accent / Gold ───────────── */
  --gold:        #c8a832;
  --gold-light:  #e8cc60;
  --gold-dark:   #927820;

  /* ── Green-Black Theme ───────── */
  --navy:        #080f09;   /* darkest – page bg */
  --navy-mid:    #0d1a0f;   /* nav, footer */
  --navy-light:  #153319;   /* hover, borders */
  --navy-card:   #0f2012;   /* card bg */

  /* ── Text ────────────────────── */
  --text-light:  #d8eed8;
  --text-muted:  #7a9a7f;

  /* ── Utility ─────────────────── */
  --white:       #ffffff;
  --green-bright:#3fa84a;   /* bright green accent */
  --success:     #2d8a4e;
  --danger:      #c0392b;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Sarabun', 'Kanit', sans-serif;
  background: var(--navy);
  color: var(--text-light);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── SCROLLBAR ─────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--navy-mid); }
::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 4px; }

/* ── NAVIGATION ────────────────────────────── */
.main-nav {
  background: linear-gradient(90deg, var(--navy) 0%, var(--navy-light) 50%, var(--navy) 100%);
  border-bottom: 2px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-img {
  height: 54px;
  width: auto;
  border-radius: 8px;
  background: rgba(255,255,255,0.94);
  padding: 3px 7px;
  transition: box-shadow 0.3s;
}

.nav-logo:hover .nav-logo-img {
  box-shadow: 0 0 14px rgba(63,168,74,0.55);
}

/* ซ่อน div เดิม (ถ้ายังมีอยู่) */
.nav-logo-text { display: none; }

/* ชื่อแบรนด์ข้างโลโก้ */
.nav-brand-name {
  color: var(--gold);
  font-family: 'Kanit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
  text-shadow: 0 0 18px rgba(200,168,50,0.4);
  line-height: 1;
}

@media (max-width: 480px) {
  .nav-brand-name { font-size: 0.92rem; letter-spacing: 0; }
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2px;
  align-items: center;
}

.nav-menu li a {
  color: var(--text-light);
  text-decoration: none;
  padding: 8px 11px;
  border-radius: 5px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.25s;
  white-space: nowrap;
  display: block;
}

.nav-menu li a:hover,
.nav-menu li a.active {
  color: var(--gold);
  background: rgba(212,175,55,0.12);
}

.nav-menu .btn-member {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--navy) !important;
  font-weight: 700 !important;
  border-radius: 20px;
  padding: 7px 16px !important;
  margin-left: 6px;
}

.nav-menu .btn-member:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-light)) !important;
  color: var(--navy) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212,175,55,0.4);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ── PAGE TITLE BAR ────────────────────────── */
.page-title-bar {
  background: linear-gradient(90deg, var(--navy) 0%, var(--navy-light) 50%, var(--navy) 100%);
  text-align: center;
  padding: 28px 20px 18px;
  border-bottom: 1px solid rgba(212,175,55,0.25);
}

.page-title-bar h1 {
  color: var(--gold);
  font-family: 'Kanit', sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  text-shadow: 0 0 20px rgba(212,175,55,0.4);
}

.page-title-bar p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 6px;
}

/* ── GOLD DIVIDER ──────────────────────────── */
.gold-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0 auto;
  width: 60%;
  border: none;
}

/* ── HOME PAGE ─────────────────────────────── */
.home-hero {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-light) 50%, var(--navy) 100%);
  padding: 0 20px 10px;   /* ไม่ต้องการ padding-top เพราะ slideshow-bg-section อยู่ด้านบน */
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* sub-banner ให้ full-width */
.home-hero .home-sub-banner {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-bottom: 10px;
}

.home-banner-wrap {
  max-width: 1100px;
  width: 100%;
  border: 2px solid var(--gold);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(212,175,55,0.25), 0 10px 40px rgba(0,0,0,0.6);
  cursor: pointer;
}

.home-banner-wrap img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.3s;
}

.home-section-title {
  text-align: center;
  margin: 35px 0 20px;
}

.home-section-title h2 {
  color: var(--gold);
  font-family: 'Kanit', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
}

.home-section-title p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* Business Cards */
.biz-grid {
  display: flex;
  gap: 14px;
  max-width: 1100px;
  width: 100%;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0 0 40px;
}

.biz-card {
  flex: 1;
  min-width: 180px;
  max-width: 205px;
  background: linear-gradient(145deg, var(--navy-card), var(--navy-mid));
  border: 2px solid rgba(212,175,55,0.5);
  border-radius: 12px;
  padding: 22px 15px 18px;
  text-align: center;
  text-decoration: none;
  color: var(--text-light);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.biz-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.biz-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: 0 12px 35px rgba(212,175,55,0.35);
}

.biz-card:hover::before { opacity: 1; }

.biz-card-icon {
  font-size: 2.8rem;
  margin-bottom: 12px;
  display: block;
}

.biz-card h3 {
  color: var(--gold);
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}

.biz-card p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.biz-card .card-img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 12px;
  border: 1px solid rgba(212,175,55,0.3);
}

/* ── CONTENT PAGE IMAGE ────────────────────── */
.page-content {
  padding: 30px 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.content-image-wrap {
  max-width: 1100px;
  width: 100%;
  border: 2px solid var(--gold);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(212,175,55,0.2), 0 10px 40px rgba(0,0,0,0.5);
}

.content-image-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

/* Info box below image */
.info-box {
  max-width: 1100px;
  width: 100%;
  background: var(--navy-card);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 12px;
  padding: 24px 28px;
}

.info-box h3 {
  color: var(--gold);
  font-family: 'Kanit', sans-serif;
  font-size: 1.1rem;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(212,175,55,0.2);
}

.info-box p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.8;
}

/* ── TEAM PAGE ─────────────────────────────── */
.team-link-wrap {
  max-width: 1100px;
  width: 100%;
  position: relative;
}

.team-overlay-btn {
  display: block;
  margin: 16px auto 0;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--navy);
  font-family: 'Kanit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  padding: 12px 32px;
  border-radius: 30px;
  text-decoration: none;
  text-align: center;
  max-width: 280px;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(212,175,55,0.35);
}

.team-overlay-btn:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212,175,55,0.5);
}

/* ── COMING SOON ───────────────────────────── */
.coming-soon-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 40px 20px;
  text-align: center;
}

.coming-soon-icon { font-size: 4rem; margin-bottom: 20px; }

.coming-soon-wrap h2 {
  color: var(--gold);
  font-family: 'Kanit', sans-serif;
  font-size: 2rem;
  margin-bottom: 12px;
}

.coming-soon-wrap p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 500px;
  line-height: 1.7;
  margin-bottom: 30px;
}

.btn-back {
  display: inline-block;
  padding: 10px 28px;
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
  border-radius: 25px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-back:hover {
  background: var(--gold);
  color: var(--navy);
}

/* ── MEMBER PAGES (Login / Register) ──────── */
.member-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 68px - 70px);
  padding: 40px 20px;
}

.member-card {
  background: var(--navy-card);
  border: 2px solid rgba(212,175,55,0.4);
  border-radius: 16px;
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.member-card h2 {
  color: var(--gold);
  font-family: 'Kanit', sans-serif;
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 6px;
}

.member-card .subtitle {
  color: var(--text-muted);
  text-align: center;
  font-size: 0.85rem;
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  color: var(--text-light);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--navy-mid);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text-light);
  font-size: 0.9rem;
  font-family: 'Sarabun', sans-serif;
  transition: border-color 0.25s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.1);
}

.form-group input::placeholder { color: var(--text-muted); }

.btn-submit {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--navy);
  border: none;
  border-radius: 30px;
  font-family: 'Kanit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 6px;
}

.btn-submit:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  box-shadow: 0 6px 20px rgba(212,175,55,0.4);
  transform: translateY(-1px);
}

.member-footer-link {
  text-align: center;
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.member-footer-link a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
}

.member-footer-link a:hover { text-decoration: underline; }

/* Divider OR */
.or-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.or-divider::before,
.or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(212,175,55,0.2);
}

/* ── FLOATING CONTACT ──────────────────────── */
.contact-float {
  position: fixed;
  right: 16px;
  bottom: 90px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 900;
}

.contact-float a {
  display: block;
  text-decoration: none;
  transition: transform 0.25s, filter 0.25s;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,0.45));
}

.contact-float a:hover {
  transform: scale(1.12);
  filter: drop-shadow(0 4px 12px rgba(63,168,74,0.5));
}

/* รูปภาพปุ่ม */
.contact-float .c-phone img,
.contact-float .c-email img {
  width: 52px;
  height: 52px;
  display: block;
}

/* Line – ยังใช้ emoji แต่ style ให้เข้ากัน */
.contact-float .c-line {
  width: 52px;
  height: 52px;
  background: #00b900;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 3px 8px rgba(0,0,0,0.4);
}

/* Back-to-top */
.btn-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  background: var(--gold-dark);
  color: var(--navy);
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.btn-top:hover { background: var(--gold); transform: translateY(-2px); }

/* ── FOOTER ────────────────────────────────── */
footer.main-footer {
  background: linear-gradient(90deg, #040d1a, var(--navy-mid), #040d1a);
  border-top: 2px solid var(--gold);
  text-align: center;
  padding: 20px 20px;
}

footer.main-footer .footer-logo {
  color: var(--gold);
  font-family: 'Kanit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
}

footer.main-footer p {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.6;
}

footer.main-footer a {
  color: var(--gold);
  text-decoration: none;
}

/* ── NOTICE BADGE ──────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: 6px;
  vertical-align: middle;
}
.badge-soon { background: rgba(212,175,55,0.15); color: var(--gold); border: 1px solid var(--gold-dark); }
.badge-new  { background: rgba(45,138,78,0.2);   color: #5fcc80;    border: 1px solid #2d8a4e; }

/* ── RESPONSIVE ────────────────────────────── */
@media (max-width: 900px) {
  .hamburger { display: flex; }

  .nav-menu {
    display: none;
    position: absolute;
    top: 68px;
    left: 0; right: 0;
    background: var(--navy-mid);
    flex-direction: column;
    padding: 10px 14px 16px;
    border-bottom: 2px solid var(--gold);
    gap: 2px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  }
  .nav-menu.open { display: flex; }
  .nav-menu li a { padding: 11px 14px; font-size: 0.95rem; }
  .nav-menu .btn-member { margin-left: 0; border-radius: 8px; }
}

@media (max-width: 600px) {
  .biz-card { min-width: 150px; max-width: 175px; }
  .page-title-bar h1 { font-size: 1.2rem; }
  .member-card { padding: 28px 20px; }
}

/* ── SLIDESHOW ──────────────────────────────── */

/* Section พื้นหลังภาพ bgslide.png */
.slideshow-bg-section {
  width: 100%;
  background: url('../images/bgslide.png') center/cover no-repeat;
  padding: 36px 20px 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* overlay เพื่อให้สไลด์ดูเด่น */
.slideshow-bg-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(5, 12, 6, 0.22);
  pointer-events: none;
}

.slideshow-wrap {
  max-width: 860px;   /* เล็กลงจาก 1100px ให้เห็นฉากด้านข้าง */
  width: 88%;
  border: 2px solid var(--gold);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(63,168,74,0.2), 0 10px 40px rgba(0,0,0,0.6);
  position: relative;
  z-index: 1;
}

.slide {
  display: none;
  width: 100%;
}

.slide.active {
  display: block;
  animation: slideIn 0.6s ease;
}

@keyframes slideIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.slide img {
  width: 100%;
  height: auto;
  display: block;
}

/* Dots */
.slideshow-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 10px 0 8px;
  background: rgba(0,0,0,0.55);
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  border: 1px solid rgba(255,255,255,0.25);
  cursor: pointer;
  transition: all 0.3s;
}

.dot.active {
  background: var(--gold);
  border-color: var(--gold);
  transform: scale(1.2);
}

/* Prev/Next arrows */
.slide-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-60%);
  background: rgba(0,0,0,0.45);
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 1.4rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}
.slide-arrow:hover { background: rgba(63,168,74,0.6); }
.slide-arrow.prev { left: 10px; }
.slide-arrow.next { right: 10px; }
