/*
 * Hero — Magazine Editorial Grid (Concept C v2)
 * Vachira Phuket Hospital Child Theme
 * Left: Open typographic panel | Center: Smart Slider 3 embed | Right: Quick shortcuts
 */

/* ============================================================
   AVADA / FUSION BUILDER HARD RESET
   ป้องกัน Avada inject padding/margin/display ทับ layout ของเรา
   ============================================================ */

/* ซ่อน page title bar บน front page */
.vachira-home .fusion-page-title-bar,
body.home .fusion-page-title-bar { display: none !important; }

/* Fusion Builder container ที่ wrap .hero-mag — เอา padding ออก */
.fusion-fullwidth:has(.hero-mag),
.fusion-builder-row:has(.hero-mag),
.fusion-layout-column:has(.hero-mag),
.fusion-column-wrapper:has(.hero-mag) {
  padding: 0 !important;
  margin: 0 !important;
}

/* กันทุกกรณี — ถ้า Avada ใส่ padding ใน parent ก็ negative margin ออก */
.hero-mag {
  margin-left: calc(-1 * var(--awb-section-padding-left, 0px)) !important;
  margin-right: calc(-1 * var(--awb-section-padding-right, 0px)) !important;
}

/* ============================================================
   HERO WRAPPER
   ============================================================ */
.hero-mag {
  display: grid !important;
  grid-template-columns: 260px 1fr 180px !important;
  background: #00464F !important; /* fallback ถ้า CSS var ไม่ทำงาน */
  background: var(--primary) !important;
  min-height: 0;
  border-bottom: 3px solid #B48B2D !important;
  border-bottom: 3px solid var(--accent) !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  width: 100% !important;
  font-family: 'Sarabun', sans-serif !important;
}

/* ============================================================
   LEFT PANEL — typographic, open, no box
   ============================================================ */
.hero-left {
  background: #00464F !important;
  background: var(--primary) !important;
  box-shadow: inset -32px 0 48px -12px rgba(0,30,34,0.55) !important;
  padding: 36px 28px 36px 32px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  position: relative !important;
  overflow: hidden !important;
}

.hero-left::before {
  content: '';
  position: absolute; top: -80px; left: -60px;
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(180,139,45,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-left-eyebrow {
  font-size: 9px; font-weight: 700; letter-spacing: 3px;
  color: var(--accent); text-transform: uppercase;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.hero-left-eyebrow::before {
  content: '';
  display: inline-block; width: 18px; height: 1.5px;
  background: var(--accent);
}

.hero-left-eyebrow,
.hero-left-title,
.hero-left-sub,
.hero-left-stat-num,
.hero-left-stat-label { font-family: 'Sarabun', sans-serif !important; }

.hero-left-title {
  font-size: clamp(22px, 2.2vw, 34px) !important;
  font-weight: 800 !important; color: #fff !important; line-height: 1.18 !important;
  margin-bottom: 12px !important;
}
.hero-left-title em { color: #B48B2D !important; color: var(--accent) !important; font-style: normal !important; }

.hero-left-sub {
  font-size: 12px !important; color: rgba(255,255,255,0.6) !important;
  line-height: 1.75 !important; margin-bottom: 24px !important;
}

.hero-left-cta {
  display: inline-flex !important; align-items: center !important; gap: 8px !important;
  background: #B48B2D !important; background: var(--accent) !important;
  color: #fff !important;
  padding: 10px 20px !important; border-radius: 6px !important;
  font-size: 13px !important; font-weight: 700 !important;
  text-decoration: none !important;
  align-self: flex-start !important;
  box-shadow: 0 3px 16px rgba(180,139,45,0.38) !important;
  transition: background 0.15s, transform 0.15s !important;
  margin-bottom: 24px !important;
  border: none !important;
}
.hero-left-cta:hover { background: #9A7220 !important; transform: translateY(-1px) !important; }

/* Stats */
.hero-left-stats {
  display: flex !important; flex-direction: column !important; gap: 10px !important;
  border-top: 1px solid rgba(255,255,255,0.1) !important;
  padding-top: 20px !important; margin-top: auto !important;
}
.hero-left-stat { display: flex !important; align-items: baseline !important; gap: 6px !important; }
.hero-left-stat-num {
  font-size: 20px !important; font-weight: 800 !important;
  color: #B48B2D !important; color: var(--accent) !important; line-height: 1 !important;
}
.hero-left-stat-label { font-size: 11px !important; color: rgba(255,255,255,0.5) !important; font-weight: 400 !important; }

/* ============================================================
   CENTER — Smart Slider 3 container
   ============================================================ */
.hero-slider-wrap {
  position: relative !important;
  aspect-ratio: 16 / 9 !important;
  min-height: 260px !important;
  max-height: 520px !important;
  overflow: hidden !important;
  background: #001E22 !important;
  /* ป้องกัน Avada ยัด padding ใน column */
  padding: 0 !important;
}

/* Smart Slider 3 — force ให้เต็ม container */
.hero-slider-wrap > div,
.hero-slider-wrap .n2-ss-slider-wrapper,
.hero-slider-wrap .n2-ss-slider,
.hero-slider-wrap .n2-ss-slide-wrapper,
.hero-slider-wrap .n2-ss-slide-limiter,
.hero-slider-wrap [class*="n2-ss-"] {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-width: 100% !important;
}

/* ============================================================
   RIGHT — Quick Access Shortcuts
   ============================================================ */
.hero-shortcuts {
  background: #fff !important; background: var(--white) !important;
  display: flex !important; flex-direction: column !important;
  border-left: 1px solid #E0DDD8 !important; border-left: 1px solid var(--border) !important;
}

.hero-svc-item {
  flex: 1 !important;
  display: flex !important; flex-direction: column !important;
  align-items: center !important; justify-content: center !important;
  gap: 5px !important; padding: 0 10px !important;
  border-bottom: 1px solid #E0DDD8 !important;
  text-decoration: none !important;
  color: #302E2F !important;
  transition: background 0.15s !important;
  min-height: 0 !important;
}
.hero-svc-item:last-child { border-bottom: none !important; }
.hero-svc-item:hover      { background: #F7F5F2 !important; }

.hero-svc-icon {
  width: 34px !important; height: 34px !important; border-radius: 8px !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  font-size: 16px !important; flex-shrink: 0 !important;
}
.svc-blue   { background: #EAF3FF !important; }
.svc-red    { background: #FDECEA !important; }
.svc-teal   { background: #E6F3F4 !important; }
.svc-green  { background: #EDF5EA !important; }
.svc-orange { background: #FEF3EE !important; }
.svc-gray   { background: #F7F5F2 !important; }

.hero-svc-label {
  font-size: 11px !important; font-weight: 700 !important; color: #302E2F !important;
  text-align: center !important; line-height: 1.2 !important;
  font-family: 'Sarabun', sans-serif !important;
}
.hero-svc-label.blue  { color: #1A56A8 !important; }
.hero-svc-label.red   { color: #961A23 !important; }
.hero-svc-label.green { color: #417735 !important; }

.hero-svc-sub {
  font-size: 9.5px; color: var(--muted);
  text-align: center; line-height: 1.2;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* ── Tablet ≤ 1024px ── */
@media (max-width: 1024px) {
  .hero-mag {
    grid-template-columns: 1fr 160px !important;
  }
  .hero-left { display: none !important; }
  .hero-slider-wrap { max-height: 380px; }
  .hero-svc-item:nth-child(n+4) { display: none !important; }
}

/* ── Mobile ≤ 640px ── */
@media (max-width: 640px) {
  .hero-mag {
    display: flex !important;
    flex-direction: column !important;
  }
  .hero-left      { display: none !important; }
  .hero-shortcuts { display: none !important; }
  .hero-slider-wrap {
    aspect-ratio: unset !important;
    min-height: 220px !important;
    max-height: 280px !important;
    width: 100%;
  }
}

/* ── ลด font size slide บน tablet ── */
@media (max-width: 1024px) {
  .slide-1-content { grid-template-columns: 1fr !important; }
  .slide-1-visual  { display: none !important; }
}
