/* ══════════════════════════════════════════════════════
   KW HOME — Shared Styles  v4 (Luxury Upgrade)
   Hamburger nav · Rich footer · Mobile responsive
   + Grain texture · Depth shadows · Typography scale
   + Page transitions · Ornament system · Card polish
══════════════════════════════════════════════════════ */

/* ─── BASE FONT SIZE — comfortable reading scale ─── */
html {
  font-size: 17px;
}
@media (max-width: 900px) { html { font-size: 16px; } }
@media (max-width: 600px) { html { font-size: 15px; } }

/* ─── GRAIN TEXTURE OVERLAY (all pages) ─── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

/* ─── DEPTH: subtle warm vignette on dark bg ─── */
body {
  background-image: radial-gradient(ellipse at 50% 0%, rgba(196,150,58,0.04) 0%, transparent 70%);
}

/* ─── PAGE LOAD FADE ─── */
@keyframes kw-page-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
body { animation: kw-page-in 0.55s cubic-bezier(.4,0,.2,1) forwards; }

/* ─── INNER PAGE HERO POLISH ─── */
.page-hero,
.page-header,
.contact-hero {
  position: relative;
  overflow: hidden;
}
/* Parallax-style subtle zoom on hero images */
.page-hero .hero-bg-img,
.page-header,
.contact-hero {
  background-attachment: fixed;
}
/* Bottom ornament rule on all page heroes */
.page-hero::after,
.page-header::after,
.contact-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(196,150,58,0.35) 30%, rgba(196,150,58,0.35) 70%, transparent 100%);
}

/* ─── SECTION SPACING RHYTHM ─── */
/* Primary sections (services, portfolio) get more air */
#services, #portfolio, .services-main { padding-top: 9rem; padding-bottom: 9rem; }
/* Secondary sections get slightly less */
#news, #testimonials, #trending { padding-top: 7rem; padding-bottom: 7rem; }

/* ─── GOLD SHIMMER on buttons ─── */
.btn-primary,
.btn-gold,
.btn-submit,
.search-btn,
.drawer-cta {
  position: relative;
  overflow: hidden;
}
.btn-primary::before,
.btn-gold::before,
.btn-submit::before,
.search-btn::before,
.drawer-cta::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: skewX(-20deg);
  transition: left 0.55s ease;
  pointer-events: none;
}
.btn-primary:hover::before,
.btn-gold:hover::before,
.btn-submit:hover::before,
.search-btn:hover::before,
.drawer-cta:hover::before { left: 140%; }

/* ─── CARD DEPTH UPGRADE ─── */
/* All cards get subtle ambient shadow */
.trending-card,
.model-card,
.port-card,
.testimonial-card,
.service-card,
.news-card {
  box-shadow: 0 2px 20px rgba(0,0,0,0.35), 0 0 0 0 rgba(196,150,58,0);
  transition: transform 0.35s cubic-bezier(.4,0,.2,1),
              box-shadow 0.35s cubic-bezier(.4,0,.2,1),
              border-color 0.35s ease;
}
.trending-card:hover,
.model-card:hover,
.port-card:hover {
  box-shadow: 0 24px 60px rgba(0,0,0,0.55), 0 0 0 1px rgba(196,150,58,0.18);
  transform: translateY(-5px);
}
.testimonial-card:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(196,150,58,0.25);
}

/* ─── ISO STRIP REDESIGN ─── */
#iso-strip {
  background: var(--dark-2) !important;
  border-top: 1px solid rgba(196,150,58,0.15);
  border-bottom: 1px solid rgba(196,150,58,0.15);
  padding: 4.5rem 0 !important;
  position: relative;
}
#iso-strip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(196,150,58,0.05) 0%, transparent 70%);
  pointer-events: none;
}
/* Override gradient text to gold-on-dark */
#iso-strip .iso-text h2 { color: var(--white) !important; }
#iso-strip .iso-text p  { color: var(--gold) !important; opacity: 0.8; }
#iso-strip .iso-badge-num { color: var(--gold) !important; }
#iso-strip .iso-badge-label { color: var(--cream-dim) !important; }
#iso-strip .iso-divider { background: rgba(196,150,58,0.2) !important; }
/* CTA on iso strip */
#iso-strip .iso-inner { position: relative; z-index: 1; }

/* ─── NAV LINK UNDERLINE (all inner pages) ─── */
.nav-links a {
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.3s ease;
  /* reset any transform/rotation */
  transform: none !important;
  box-shadow: none !important;
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a:hover,
.nav-links a.active { color: var(--gold); }

/* ─── SECTION ORNAMENT LINE ─── */
.section-ornament {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.2rem 0 2.2rem;
}
.section-ornament::before {
  content: '';
  width: 48px; height: 1px;
  background: linear-gradient(90deg, var(--gold), rgba(196,150,58,0.3));
  flex-shrink: 0;
}
.section-ornament::after {
  content: '';
  flex: 1; height: 1px;
  background: linear-gradient(90deg, rgba(196,150,58,0.12), transparent);
}
.section-ornament-diamond {
  width: 5px; height: 5px;
  background: var(--gold);
  transform: rotate(45deg);
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(196,150,58,0.5);
}

/* ─── TYPOGRAPHY SCALE (inner pages) ─── */
h1, h2, h3, h4 {
  font-family: 'Noto Serif Thai', 'Cormorant Garamond', serif !important;
  font-weight: 300 !important;
  text-wrap: pretty;
}
em, .serif-en, .hero-en, blockquote p {
  font-family: 'Cormorant Garamond', serif !important;
}
.section-label {
  font-family: 'Montserrat', sans-serif !important;
  font-size: 0.7rem !important;
  letter-spacing: 0.28em !important;
  font-weight: 500;
}
/* Stat numbers: oldstyle look */
.stat-num, .stat-b-num, .iso-badge-num {
  font-variant-numeric: oldstyle-nums;
  letter-spacing: -0.02em;
}

/* ─── FORM INPUTS — elegant focus ─── */
input:focus, select:focus, textarea:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(196,150,58,0.08), 0 2px 12px rgba(196,150,58,0.1) !important;
  outline: none;
}
input, select, textarea {
  transition: border-color 0.25s, box-shadow 0.3s !important;
}

/* ─── CONTACT CTA CHANNELS ─── */
/* Replace emoji feel with structured SVG containers */
.cta-channel {
  position: relative;
  overflow: hidden;
  transition: background 0.3s, transform 0.3s !important;
}
.cta-channel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--copper));
  opacity: 0;
  transition: opacity 0.3s;
}
.cta-channel:hover { transform: translateY(-3px) !important; }
.cta-channel:hover::before { opacity: 1; }

/* ─── PROCESS STEP CONNECTORS ─── */
.steps-grid {
  position: relative;
}
.steps-grid::before {
  content: '';
  position: absolute;
  top: 2.8rem; left: calc(100% / 12);
  right: calc(100% / 12);
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(196,150,58,0.25) 10%,
    rgba(196,150,58,0.25) 90%,
    transparent
  );
  pointer-events: none;
}
.step {
  position: relative;
}
/* Step number glow on hover */
.step:hover .step-num {
  color: rgba(196,150,58,0.55) !important;
  text-shadow: 0 0 30px rgba(196,150,58,0.2);
}

/* ─── CEREMONY CARDS ─── */
.ceremony-card {
  border-bottom: 1px solid rgba(196,150,58,0.06) !important;
}
.ceremony-card:hover {
  background: rgba(196,150,58,0.04) !important;
}

/* ─── GOLD LINE UPGRADE ─── */
.gold-line {
  width: 50px; height: 1px;
  background: linear-gradient(90deg, var(--gold) 0%, rgba(196,150,58,0.15) 100%);
  margin: 1.4rem 0;
  position: relative;
  display: block;
}
.gold-line::after {
  content: '';
  display: block;
  width: 4px; height: 4px;
  background: var(--gold);
  transform: rotate(45deg);
  margin-top: -2.5px;
  box-shadow: 0 0 4px rgba(196,150,58,0.6);
  position: absolute;
  left: 0; top: 0;
}

/* ─── SECTION FULL-BLEED DIVIDER ─── */
.section-gold-rule {
  width: 100%; height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(196,150,58,0.3) 20%,
    rgba(196,150,58,0.3) 80%,
    transparent 100%
  );
  margin: 0;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark-2, #161410); }
::-webkit-scrollbar-thumb {
  background: rgba(196,150,58,0.3);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(196,150,58,0.55); }

/* ─── SELECTION COLOR ─── */
::selection {
  background: rgba(196,150,58,0.25);
  color: var(--white, #faf8f4);
}



/* ─── HAMBURGER BUTTON ─── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px 4px;
  background: none;
  border: none;
  z-index: 110;
}
.nav-hamburger span {
  display: block;
  width: 26px;
  height: 1px;
  background: var(--cream-dim);
  transition: transform 0.35s cubic-bezier(.4,0,.2,1), opacity 0.25s;
}
.nav-hamburger span:nth-child(2) { width: 18px; }
.nav-hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); width: 26px; }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: translateX(8px); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ─── MOBILE DRAWER ─── */
.nav-drawer {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10,9,8,0.98);
  backdrop-filter: blur(20px);
  z-index: 105;
  padding: 6rem 2.5rem 3rem;
  flex-direction: column;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(.4,0,.2,1);
}
.nav-drawer.ready { display: flex; }
.nav-drawer.open { transform: translateX(0); }

.drawer-links { list-style: none; flex: 1; }
.drawer-links li {
  border-bottom: 1px solid rgba(196,150,58,0.1);
  overflow: hidden;
}
.drawer-links li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream-dim);
  text-decoration: none;
  transition: color 0.2s;
}
.drawer-links li a::after {
  content: '→';
  color: rgba(196,150,58,0.3);
  font-size: 0.8rem;
  transition: color 0.2s, transform 0.2s;
}
.drawer-links li a:hover,
.drawer-links li a.active { color: var(--gold); }
.drawer-links li a:hover::after { color: var(--gold); transform: translateX(4px); }

.drawer-cta-wrap { padding-top: 2rem; }
.drawer-cta {
  display: block;
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dark);
  background: linear-gradient(135deg, var(--gold), var(--copper, #b5622e));
  padding: 1rem 2rem;
  text-decoration: none;
  transition: opacity 0.25s;
}
.drawer-cta:hover { opacity: 0.88; }

/* ─── RICH FOOTER ─── */
.site-footer {
  background: #05040303;
  background: #050402;
  border-top: 1px solid rgba(196,150,58,0.12);
}

.footer-top {
  max-width: 1300px;
  margin: 0 auto;
  padding: 6rem 4rem 5rem;
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1.2fr;
  gap: 5rem;
}

.footer-brand {}
.footer-brand-logo { margin-bottom: 1.8rem; display: block; }
.footer-brand-logo img { height: 46px; opacity: 0.82; }
.footer-brand-desc {
  font-family: 'Sarabun', sans-serif;
  font-size: 0.88rem;
  color: rgba(201,192,174,0.75);
  line-height: 1.9;
  margin-bottom: 2rem;
  max-width: 280px;
}
.footer-cert-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid rgba(196,150,58,0.2);
  padding: 0.5rem 1rem;
  margin-bottom: 2rem;
}
.footer-cert-badge span {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(196,150,58,0.5);
}
.footer-social { display: flex; gap: 0.6rem; }
.footer-soc-btn {
  width: 38px; height: 38px;
  border: 1px solid rgba(196,150,58,0.2);
  display: flex; align-items: center; justify-content: center;
  color: rgba(201,192,174,0.4);
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: all 0.25s;
  flex-shrink: 0;
}
.footer-soc-btn:hover { border-color: var(--gold); color: var(--gold); background: rgba(196,150,58,0.05); }

.footer-col h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.8rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(196,150,58,0.12);
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.9rem; }
.footer-col ul li a {
  font-family: 'Sarabun', sans-serif;
  font-size: 0.88rem;
  color: rgba(201,192,174,0.8);
  text-decoration: none;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.footer-col ul li a::before {
  content: '';
  display: inline-block;
  width: 12px; height: 1px;
  background: rgba(196,150,58,0.3);
  transition: width 0.2s, background 0.2s;
  flex-shrink: 0;
}
.footer-col ul li a:hover { color: var(--gold); }
.footer-col ul li a:hover::before { width: 18px; background: var(--gold); }

.footer-contact-item { margin-bottom: 1.2rem; }
.footer-contact-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.54rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(196,150,58,0.85);
  display: block;
  margin-bottom: 0.25rem;
}
.footer-contact-val {
  font-family: 'Sarabun', sans-serif;
  font-size: 0.9rem;
  color: rgba(201,192,174,0.85);
  line-height: 1.6;
}
.footer-contact-val a {
  color: rgba(201,192,174,0.85);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-contact-val a:hover { color: var(--gold); }

.footer-gold-line {
  width: 100%; height: 1px;
  background: linear-gradient(90deg, rgba(196,150,58,0.3) 0%, rgba(196,150,58,0.05) 100%);
  max-width: 1300px;
  margin: 0 auto;
}

.footer-bottom {
  max-width: 1300px;
  margin: 0 auto;
  padding: 1.6rem 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.footer-copy {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  color: rgba(201,192,174,0.55);
  text-transform: uppercase;
}
.footer-bottom-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.footer-policy-links { display: flex; gap: 1.5rem; }
.footer-policy-links a {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.56rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(201,192,174,0.55);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-policy-links a:hover { color: var(--gold); }

/* ─── TYPOGRAPHY OVERRIDES — all inner pages (merged above, no duplicate) ─── */

/* ─── LUXURY ENHANCEMENTS ─── */

/* Thin gold ornament line for section headers */
.section-ornament {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0 2rem;
}
.section-ornament::before,
.section-ornament::after {
  content: '';
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.section-ornament::before { width: 40px; }
.section-ornament::after { flex: 1; }
.section-ornament-diamond {
  width: 5px; height: 5px;
  background: var(--gold);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* Smooth page transitions */
body { animation: fadeBody 0.4s ease forwards; }
@keyframes fadeBody { from { opacity: 0; } to { opacity: 1; } }

/* Page-link hover transition */
a[href$=".html"] { transition: opacity 0.15s; }

/* ─── MOBILE RESPONSIVE ─── */

/* ── 1200px — tight desktop ── */
@media (max-width: 1200px) {
  .footer-top { gap: 3rem; padding: 5rem 3rem 4rem; }
  .footer-bottom { padding: 1.4rem 3rem; }
  .footer-gold-line { margin: 0 3rem; max-width: calc(100% - 6rem); }
}

/* ── 1024px — small desktop / landscape tablet ── */
@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 3rem 4rem;
    padding: 4rem 3rem;
  }
  .footer-brand { grid-column: 1 / -1; }
  .footer-brand-desc { max-width: 100%; }
}

/* ── 900px — tablet: show hamburger ── */
@media (max-width: 900px) {
  /* Nav */
  nav, nav#main-nav { padding: 1rem 2rem !important; }
  nav .nav-links  { display: none !important; }
  nav .nav-cta    { display: none !important; }
  .nav-hamburger  { display: flex !important; }

  /* Homepage sections */
  .services-grid  { grid-template-columns: repeat(2, 1fr) !important; }
  .models-grid    { grid-template-columns: repeat(2, 1fr) !important; }
  .testimonials-grid { grid-template-columns: 1fr !important; }
  .news-grid      { grid-template-columns: repeat(2, 1fr) !important; }
  .contact-layout { grid-template-columns: 1fr !important; }

  /* Portfolio */
  .port-grid      { grid-template-columns: repeat(2, 1fr) !important; }
  .port-card:first-child { grid-column: 1 / -1 !important; }
  .filter-bar     { overflow-x: auto; padding: 0 2rem !important; }

  /* Models */
  .models-grid-main { grid-template-columns: repeat(2, 1fr) !important; }
  .filter-row     { overflow-x: auto; padding: 0 1.5rem !important; gap: 0 !important; }
  .filter-actions { padding: 0.7rem 1.5rem !important; }
  .models-main    { padding: 2rem 1.5rem 4rem !important; }

  /* Services */
  .service-block  { grid-template-columns: 1fr !important; gap: 3rem !important; direction: ltr !important; }
  .service-block.reverse > * { direction: ltr !important; }
  .steps-grid     { grid-template-columns: repeat(3, 1fr) !important; }

  /* News */
  .featured       { grid-template-columns: 1fr !important; }
  .news-grid-inner { grid-template-columns: repeat(2, 1fr) !important; }

  /* Contact */
  .cta-channels   { grid-template-columns: repeat(2, 1fr) !important; }
  .contact-main   { grid-template-columns: 1fr !important; padding: 3rem 2rem !important; }

  /* House detail */
  .detail-hero    { grid-template-columns: 1fr !important; padding: 2rem 2rem 3rem !important; }

  /* Portfolio detail */
  .detail-hero-inner { grid-template-columns: 1fr !important; gap: 2rem !important; }
  .related-grid   { grid-template-columns: repeat(2, 1fr) !important; }
  .masonry        { columns: 2 !important; }

  /* Home — container + partner section */
  .container { padding: 0 2rem !important; }
  .partner-section { padding: 3rem 2rem !important; }

  /* House detail */
  .detail-body { grid-template-columns: 1fr !important; padding: 3rem 2rem !important; gap: 3rem !important; }
  .floorplan-section { padding: 3rem 2rem !important; }

  /* Services at tablet */
  .services-main { padding: 4rem 2rem !important; }
  .process-section { padding: 4rem 2rem !important; }

  /* News */
  .news-body { padding: 3rem 1.5rem !important; }
  .ceremony-inner { padding: 0 1.5rem !important; }

  /* Footer */
  .footer-top     { grid-template-columns: 1fr 1fr; gap: 2.5rem 3rem; padding: 3.5rem 2rem; }
  .footer-brand   { grid-column: 1 / -1; }
  .footer-bottom  { padding: 1.2rem 2rem; }
  .footer-gold-line { margin: 0; max-width: 100%; }
}

/* ── 600px — mobile ── */
@media (max-width: 600px) {
  nav { padding: 1rem 1.5rem !important; }
  .nav-logo img { height: 36px !important; }

  /* Homepage */
  .hero-content { padding: 0 1.5rem !important; }
  .hero-th { font-size: clamp(2.2rem, 9vw, 3.5rem) !important; }
  .hero-stats { padding: 1.5rem 1.5rem !important; gap: 1.5rem !important; flex-wrap: wrap; }
  .services-grid { grid-template-columns: 1fr !important; padding: 0 1.5rem !important; }
  .models-grid { grid-template-columns: 1fr !important; }
  .testimonials-grid { gap: 1.5rem !important; }
  .news-grid { grid-template-columns: 1fr !important; }

  /* All page heroes */
  .page-hero, .page-header, .contact-hero, .detail-hero, .breadcrumb { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
  .detail-hero-inner { padding: 0 !important; }

  /* Portfolio */
  .port-grid { grid-template-columns: 1fr !important; }
  .portfolio-main { padding: 2rem 1.5rem !important; }

  /* Models */
  .models-grid-main { grid-template-columns: 1fr !important; }

  /* Services */
  .steps-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .services-main { padding: 3rem 1.5rem !important; }
  .process-section { padding: 3rem 1.5rem !important; }

  /* News */
  .news-main { padding: 2rem 1.5rem !important; }
  .news-grid-inner { grid-template-columns: 1fr !important; }
  .cta-channels { grid-template-columns: 1fr 1fr !important; }

  /* Contact */
  .contact-main { padding: 2rem 1.5rem !important; }

  /* Home — container + partner section */
  .container { padding: 0 1.5rem !important; }
  .partner-section { padding: 2.5rem 1.5rem !important; }

  /* Detail pages */
  .detail-body { padding: 2rem 1.5rem !important; }
  .floorplan-section { padding: 2rem 1.5rem !important; }
  .gallery-section { padding: 2rem 1.5rem !important; }
  .related-section { padding: 2rem 1.5rem !important; }
  .related-grid { grid-template-columns: 1fr !important; }
  .masonry { columns: 1 !important; }

  /* News */
  .ceremony-inner { padding: 0 1.5rem !important; }

  /* Footer */
  .footer-top { grid-template-columns: 1fr !important; gap: 2rem; padding: 3rem 1.5rem; }
  .footer-bottom { flex-direction: column; gap: 0.8rem; text-align: center; padding: 1rem 1.5rem; }
  .footer-bottom-right { flex-direction: column; gap: 0.5rem; }
  .footer-policy-links { justify-content: center; }
}

/* ─── FLOATING SOCIAL SIDEBAR ─── */
.social-sidebar {
  position: fixed;
  right: 0; top: 50%;
  transform: translateY(-50%);
  z-index: 98;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 4px;
  background: linear-gradient(to bottom, transparent, rgba(196,150,58,0.45) 30%, rgba(196,150,58,0.45) 70%, transparent);
  transition: width 0.35s cubic-bezier(.4,0,.2,1), background 0.35s;
  border-radius: 2px 0 0 2px;
  overflow: hidden;
}
.social-sidebar:hover {
  width: 44px;
  background: transparent;
  overflow: visible;
}

.social-sidebar-btn {
  width: 40px; height: 40px;
  border-radius: 50% 0 0 50%;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid rgba(196,150,58,0.25);
  border-right: none;
  background: rgba(13,12,11,0.9);
  backdrop-filter: blur(12px);
  box-shadow: -2px 0 12px rgba(0,0,0,0.45);
  position: relative;
  overflow: visible;
  flex-shrink: 0;
  opacity: 0;
  transform: translateX(44px);
  transition: opacity 0.3s, transform 0.3s, border-color 0.25s, background 0.25s;
}
.social-sidebar:hover .social-sidebar-btn {
  opacity: 1;
  transform: translateX(0);
}
.social-sidebar:hover .social-sidebar-btn:nth-child(1) { transition-delay: 0.00s; }
.social-sidebar:hover .social-sidebar-btn:nth-child(2) { transition-delay: 0.05s; }
.social-sidebar:hover .social-sidebar-btn:nth-child(3) { transition-delay: 0.10s; }
.social-sidebar:hover .social-sidebar-btn:nth-child(4) { transition-delay: 0.15s; }
.social-sidebar:hover .social-sidebar-btn:nth-child(5) { transition-delay: 0.20s; }

.social-sidebar-btn svg { opacity: 0.8; transition: opacity 0.25s; }
.social-sidebar-btn:hover {
  border-color: rgba(196,150,58,0.7);
  background: rgba(196,150,58,0.1);
  box-shadow: -4px 0 20px rgba(0,0,0,0.5), 0 0 10px rgba(196,150,58,0.15);
}
.social-sidebar-btn:hover svg { opacity: 1; }

.social-sidebar-btn::before {
  content: attr(data-label);
  position: absolute;
  right: 46px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(13,12,11,0.92);
  border: 1px solid rgba(196,150,58,0.3);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  color: var(--cream, #f5f0e6);
  white-space: nowrap;
  padding: 0.28rem 0.65rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  backdrop-filter: blur(8px);
}
.social-sidebar-btn:hover::before { opacity: 1; }

.ssb-facebook:hover  { background: rgba(24,119,242,0.15) !important; border-color: rgba(24,119,242,0.5) !important; }
.ssb-line:hover      { background: rgba(6,199,85,0.15) !important; border-color: rgba(6,199,85,0.5) !important; }
.ssb-youtube:hover   { background: rgba(255,0,0,0.15) !important; border-color: rgba(255,0,0,0.4) !important; }
.ssb-messenger:hover { background: rgba(0,106,255,0.15) !important; border-color: rgba(0,106,255,0.4) !important; }
.ssb-phone:hover     { background: rgba(37,211,102,0.15) !important; border-color: rgba(37,211,102,0.5) !important; }

@media (max-width: 600px) {
  /* ซ่อน sidebar แนวตั้งบนมือถือ */
  .social-sidebar { display: none; }
}

/* ─── MOBILE FLOATING SPEED DIAL ─── */
.mob-speed-dial {
  display: none;
  position: fixed;
  bottom: 1.5rem; right: 1.2rem;
  z-index: 300;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.7rem;
}

/* Main trigger button */
.mob-dial-trigger {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c4963a, #b5622e);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(196,150,58,0.5), 0 2px 8px rgba(0,0,0,0.4);
  transition: transform 0.3s cubic-bezier(.4,0,.2,1), box-shadow 0.3s;
  position: relative; z-index: 2;
  -webkit-tap-highlight-color: transparent;
}
.mob-dial-trigger.open {
  transform: rotate(45deg);
  box-shadow: 0 6px 28px rgba(196,150,58,0.6), 0 2px 12px rgba(0,0,0,0.5);
}

/* Icon inside trigger */
.mob-dial-trigger svg { transition: opacity 0.2s; }
.mob-dial-icon-open { display: none; }
.mob-dial-trigger.open .mob-dial-icon-main { display: none; }
.mob-dial-trigger.open .mob-dial-icon-open { display: block; }

/* Options list */
.mob-dial-options {
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 0.6rem;
  position: absolute; bottom: 62px; right: 0;
  pointer-events: none;
}
.mob-dial-item {
  display: flex; align-items: center; gap: 0.6rem;
  opacity: 0;
  transform: translateY(12px) scale(0.85);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
  text-decoration: none;
}
.mob-speed-dial.open .mob-dial-options { pointer-events: all; }
.mob-speed-dial.open .mob-dial-item { opacity: 1; transform: translateY(0) scale(1); pointer-events: all; }
.mob-speed-dial.open .mob-dial-item:nth-child(1) { transition-delay: 0.00s; }
.mob-speed-dial.open .mob-dial-item:nth-child(2) { transition-delay: 0.06s; }
.mob-speed-dial.open .mob-dial-item:nth-child(3) { transition-delay: 0.12s; }

.mob-dial-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.62rem; letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream, #f5f0e6);
  background: rgba(10,9,8,0.92);
  border: 1px solid rgba(196,150,58,0.3);
  padding: 0.3rem 0.8rem;
  backdrop-filter: blur(10px);
  white-space: nowrap;
}
.mob-dial-btn {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(196,150,58,0.35);
  background: rgba(13,12,11,0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 3px 14px rgba(0,0,0,0.45);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

/* Backdrop to close on tap outside */
.mob-dial-backdrop {
  display: none;
  position: fixed; inset: 0; z-index: 299;
}
.mob-dial-backdrop.open { display: block; }

@media (max-width: 600px) {
  .mob-speed-dial { display: flex; }
  body { padding-bottom: 0; }
}

/* ── 400px — small phones ── */
@media (max-width: 400px) {
  .cta-channels { grid-template-columns: 1fr !important; }
  .steps-grid { grid-template-columns: 1fr !important; }
  .specs-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ─── NAV CANONICAL (overrides per-page embedded CSS) ─── */
/* Use high-specificity selectors to win over embedded nav/footer CSS in inner pages */
nav#main-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 1.4rem 4rem; display: flex; align-items: center; justify-content: space-between; background: transparent; transition: background 0.4s, padding 0.4s; }
nav#main-nav.scrolled { background: rgba(13,12,11,0.96); backdrop-filter: blur(12px); padding: 0.9rem 4rem; border-bottom: 1px solid rgba(196,150,58,0.15); }
nav#main-nav .nav-logo img { height: 52px; transition: height 0.4s; }
nav#main-nav.scrolled .nav-logo img { height: 40px; }
.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links > li > a { font-family: 'Montserrat', sans-serif; font-size: 0.72rem; letter-spacing: 0.18em; color: var(--cream-dim, #c9c0ae); text-decoration: none; text-transform: uppercase; transition: color 0.25s; }
.nav-links > li > a:hover { color: var(--gold, #c4963a); }
/* Higher specificity for nav-cta to override embedded .nav-cta{border/color} */
nav#main-nav .nav-cta { font-family: 'Montserrat', sans-serif; font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dark, #0d0c0b); background: linear-gradient(135deg, var(--gold, #c4963a), var(--copper, #b5622e)); border: none; padding: 0.7rem 1.8rem; text-decoration: none; transition: opacity 0.25s; white-space: nowrap; }
nav#main-nav .nav-cta:hover { opacity: 0.85; }
/* Fix: embedded footer{display:flex} breaks layout — .site-footer class wins on specificity */
.site-footer { display: block; padding: 0; }

/* Dropdown items */
.nav-item { position: relative; }
.nav-item::after { content: ''; position: absolute; top: 100%; left: 0; right: 0; height: 1.8rem; }
.dropdown { position: absolute; top: calc(100% + 1.8rem); left: 50%; transform: translateX(-50%) translateY(-8px); background: rgba(10,9,8,0.97); backdrop-filter: blur(24px); border: 1px solid rgba(196,150,58,0.2); border-top: 1px solid rgba(196,150,58,0.5); min-width: 220px; padding: 1rem 0; opacity: 0; pointer-events: none; transition: opacity 0.3s, transform 0.3s; z-index: 200; box-shadow: 0 20px 60px rgba(0,0,0,0.6); }
.dropdown::before { content: ''; position: absolute; top: 0; left: 1.5rem; right: 1.5rem; height: 1px; background: linear-gradient(90deg, var(--gold, #c4963a), transparent); }
.nav-item:hover .dropdown { opacity: 1; pointer-events: all; transform: translateX(-50%) translateY(0); }
.dropdown a { display: flex; align-items: center; gap: 0.8rem; padding: 0.7rem 1.8rem; font-family: 'Montserrat', sans-serif; font-size: 0.65rem; letter-spacing: 0.18em; color: rgba(201,192,174,0.65) !important; text-decoration: none; text-transform: uppercase !important; transition: color 0.2s, padding-left 0.25s; position: relative; }
.dropdown a::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(196,150,58,0.06); transition: width 0.25s; }
.dropdown a:hover { color: var(--gold, #c4963a) !important; padding-left: 2.2rem; }
.dropdown a:hover::before { width: 100%; }
.dropdown-divider { height: 1px; background: rgba(196,150,58,0.1); margin: 0.5rem 1.5rem; }
/* suppress underline animation inside dropdown */
.dropdown a::after { display: none !important; }

@media (max-width: 900px) { .dropdown { display: none !important; } }
