/* ============================================================
   Majistudio — Shared Site Chrome (Header + Footer + Base Reset)
   Built with real Elementor widgets (Section/Column + Shortcode +
   WordPress "Navigation Menu" widget) — see:
   template-parts/site-header.php, template-parts/site-footer.php
   Elementor Library: "Maji Site Header", "Maji Site Footer"

   Edit logo: Customizer → Site Identity → Logo
   Edit header menu: Appearance → Menus → Header Menu (Majistudio)
   Edit footer menu: Appearance → Menus → Footer Menu (Majistudio)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.maji-page-full {
  margin: 0;
  font-family: 'IBM Plex Sans Thai', system-ui, sans-serif;
  color: #3D3D3D;
  background: #FAFAFA;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.maji-page-full img { display: block; max-width: 100%; }
body.maji-page-full a { transition: color .2s; }

/* ── NAV (Elementor section #maji-nav) ── */
#maji-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(26,26,26,0.50);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
#maji-nav.scrolled {
  background: rgba(250,250,250,0.92);
  border-bottom-color: #E8E8E8;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
#maji-nav .elementor-container {
  max-width: 1240px; margin: 0 auto; padding: 0 32px;
  min-height: 72px; align-items: center;
}
#maji-nav.scrolled .nav-logo-main { color: #1B5E52; }
#maji-nav.scrolled .nav-logo-sub { color: #7A7A7A; }
#maji-nav.scrolled .nav-menu-col .menu > li > a { color: #3D3D3D; }
#maji-nav.scrolled .nav-menu-col .menu > li > a:hover,
#maji-nav.scrolled .nav-menu-col .menu > li.current-menu-item > a { color: #1B5E52; }

/* Logo (Shortcode widget → [maji_logo]) */
.nav-logo-col .elementor-widget-wrap { align-items: center; }
.nav-logo {
  display: flex; flex-direction: column; gap: 2px; text-decoration: none;
}
.nav-logo img { max-height: 40px; width: auto; display: block; }

/* Logo on pages using the default (Hello Elementor) header/footer — e.g. portfolio pages —
   which render the raw custom-logo markup instead of the [maji_logo] shortcode. */
.site-header .site-branding .site-logo img,
.site-footer .site-branding .site-logo img { max-height: 76px; width: auto; } /* ~2cm */
.nav-logo-main {
  font-weight: 700; font-size: 22px; line-height: 1;
  letter-spacing: -0.02em; color: #FAFAFA; transition: color .3s;
}
.nav-logo-sub {
  font-weight: 400; font-size: 11px; line-height: 1;
  letter-spacing: 0.01em; color: rgba(250,250,250,.75); transition: color .3s;
}

/* Menu (native WordPress Navigation Menu widget) */
.nav-menu-col { text-align: right; }
.nav-menu-col .elementor-widget-wrap { justify-content: flex-end; }
.nav-menu-col .menu {
  display: flex; align-items: center; gap: 36px;
  list-style: none; margin: 0; padding: 0;
}
.nav-menu-col .menu li { list-style: none; margin: 0; }
.nav-menu-col .menu a {
  font-size: 15px; font-weight: 500; color: rgba(250,250,250,.85); text-decoration: none;
  transition: color .2s;
}
.nav-menu-col .menu > li > a:hover { color: #fff; }
.nav-menu-col .menu li.current-menu-item > a { color: #fff; font-weight: 600; }
.nav-menu-col .menu li.nav-cta > a {
  font-size: 15px !important; font-weight: 600 !important;
  color: #fff !important; background: #1B5E52;
  padding: 10px 22px; border-radius: 8px; text-decoration: none;
  transition: background .2s;
}
.nav-menu-col .menu li.nav-cta > a:hover { background: #3D9E8C !important; color: #fff !important; }

/* ── FOOTER (Elementor sections, class .maji-footer / .footer-copy) ── */
.elementor-section.maji-footer { color: rgba(250,250,250,.72); }
.elementor-section.maji-footer .elementor-column > .elementor-widget-wrap { align-items: flex-start; }
.footer-copy .elementor-widget-wrap { border-top: 1px solid rgba(250,250,250,.12); padding-top: 24px; }

.nav-menu-col.footer-links-col,
.elementor-section.maji-footer .menu {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 10px; font-size: 15px;
}
.elementor-section.maji-footer .menu li { list-style: none; }
.elementor-section.maji-footer .menu a { color: rgba(250,250,250,.72); text-decoration: none; }
.elementor-section.maji-footer .menu a:hover { color: #FAFAFA; }

/* ── ซ่อน Hello Elementor defaults ── */
body.maji-page-full #site-header,
body.maji-page-full #site-footer,
body.maji-page-full .page-header,
body.maji-page-full .entry-header,
body.maji-page-full .site-main > .entry-content { display: none !important; }

body.maji-page-full.admin-bar #maji-nav { top: 32px; }
