/*
Theme Name: Zigges Noir
Theme URI: https://ziggesfrisorer.se/
Author: Zigges Frisörer & Barberare
Author URI: https://ziggesbarberare.com/
Description: Modernt lyxigt WordPress-tema med sidomeny, hero och rena undersidor – Zigges Frisörer.
Version: 2.7.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.1
Text Domain: zigges-noir
*/

/* ─── Design Tokens ──────────────────────────────────────────── */
:root {
  --zg-bg:            #07080a;
  --zg-bg-2:          #0c0e12;
  --zg-panel:         #111318;
  --zg-panel-2:       #161920;
  --zg-text:          #f0e8da;
  --zg-muted:         #9a9080;
  --zg-body-color:    #3e4350;
  --zg-accent:        #c8985a;
  --zg-accent-light:  #ddb07a;
  --zg-accent-dark:   #a97a3e;
  --zg-gold-glow:     rgba(200,152,90,0.18);
  --zg-border:        rgba(255,255,255,0.06);
  --zg-border-warm:   rgba(200,152,90,0.15);
  --zg-sidebar-w:     210px;
  --zg-content-max:   1540px;
  --zg-radius:        20px;
  --zg-radius-sm:     12px;
  --zg-shadow:        0 28px 70px rgba(0,0,0,0.42);
  --zg-shadow-sm:     0 8px 28px rgba(0,0,0,0.28);
  --zg-font-heading:  "Playfair Display", Georgia, serif;
  --zg-font-body:     "Jost", system-ui, -apple-system, sans-serif;
  --zg-font-menu:     "Jost", system-ui, -apple-system, sans-serif;
  --zg-font-button:   "Jost", system-ui, -apple-system, sans-serif;
  --zg-hero-subline-color:        var(--zg-text);
  --zg-hero-subline-font:         var(--zg-font-body);
  --zg-hero-subline-size-desktop: 1.05rem;
  --zg-hero-subline-size-mobile:  0.9rem;
  --zg-hero-subline-max-width:    36rem;
  --zg-hero-subline-gap:          18px;
  --zg-hero-button-text:          #0e0f12;
  --zg-hero-button-bg:            var(--zg-accent);
  --zg-hero-button-border:        var(--zg-accent);
  --zg-hero-button-hover-text:    #0e0f12;
  --zg-hero-button-hover-bg:      var(--zg-accent-light);
  --zg-hero-button-hover-border:  var(--zg-accent-light);
  --zg-hero-button-font:          var(--zg-font-button);
  --zg-hero-button-size-desktop:  0.82rem;
  --zg-hero-button-size-mobile:   0.78rem;
  --zg-hero-button-padding-y:     15px;
  --zg-hero-button-padding-x:     36px;
  --zg-hero-button-gap:           18px;
  --zg-menu-hover-bg:    rgba(200,152,90,0.18);
  --zg-menu-hover-text:  var(--zg-accent-light);
  --zg-menu-hover-icon:  var(--zg-accent-light);
  --zg-menu-active-bg:   rgba(200,152,90,0.22);
  --zg-menu-active-text: var(--zg-accent-light);
  --zg-menu-active-icon: var(--zg-accent-light);
  --zg-menu-icon-size-desktop: 17px;
  --zg-menu-icon-size-mobile:  20px;
  --zg-page-bg:    #f2ede5;
  --zg-surface-bg: #eee8de;
}

/* ─── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--zg-text);
  background: var(--zg-bg);
  font-family: var(--zg-font-body);
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.admin-bar .zg-sidebar { top: 32px; height: calc(100vh - 32px); }
img  { max-width: 100%; height: auto; display: block; }
a    { color: inherit; text-decoration: none; }

/* ─── Site Wrapper ───────────────────────────────────────────── */
.site {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 70% 50% at 80% 0%, rgba(200,152,90,0.1), transparent),
    radial-gradient(ellipse 50% 60% at 10% 100%, rgba(200,152,90,0.04), transparent),
    linear-gradient(180deg, #05060a 0%, #0a0c11 100%);
}

/* ─── Preloader ──────────────────────────────────────────────── */
.zg-preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: #07080a;
  transition: opacity .55s cubic-bezier(.4,0,.2,1), visibility .55s;
}
.zg-preloader.is-hidden { opacity: 0; visibility: hidden; }
.zg-preloader__mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.zg-preloader__logo { width: 56px; height: 64px; }
.zg-preloader__logo svg { width: 100%; height: 100%; }
.zg-preloader__bar {
  width: 52px;
  height: 1px;
  background: var(--zg-border);
  position: relative;
  overflow: hidden;
}
.zg-preloader__bar::after {
  content: "";
  position: absolute;
  left: -100%; top: 0;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, var(--zg-accent), transparent);
  animation: zgBarSlide 1.1s ease-in-out .6s infinite;
}
@keyframes zgBarSlide { 0% { left: -100%; } 100% { left: 200%; } }
.zg-preloader__z1,
.zg-preloader__z2,
.zg-preloader__z3 {
  stroke: var(--zg-accent);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.zg-preloader__z1 { stroke-dasharray: 44; stroke-dashoffset: 44; animation: zgDraw .28s ease-out .08s forwards; }
.zg-preloader__z2 { stroke-dasharray: 67; stroke-dashoffset: 67; animation: zgDraw .42s ease-out .32s forwards; }
.zg-preloader__z3 { stroke-dasharray: 44; stroke-dashoffset: 44; animation: zgDraw .28s ease-out .70s forwards; }
@keyframes zgDraw { to { stroke-dashoffset: 0; } }

/* ─── Sidebar ────────────────────────────────────────────────── */
.zg-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--zg-sidebar-w);
  background: linear-gradient(180deg, rgba(13,15,20,0.97) 0%, rgba(8,10,14,0.97) 100%) !important;
  border-right: 1px solid var(--zg-border-warm);
  box-shadow: 1px 0 0 rgba(255,255,255,0.02), 6px 0 48px rgba(0,0,0,0.4);
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.zg-sidebar::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 220px;
  background: radial-gradient(ellipse 120% 80% at 50% 0%, rgba(200,152,90,0.1), transparent);
  pointer-events: none;
}

.zg-sidebar__top {
  border-bottom: 1px solid var(--zg-border);
  flex-shrink: 0;
  position: relative;
}

.zg-brand {
  display: grid;
  place-items: center;
  padding: 6px 16px 14px;
}
.zg-brand__inner {
  text-align: center;
  display: grid;
  gap: 8px;
  width: 100%;
}
.zg-brand img,
.zg-brand .custom-logo { max-width: 100%; height: auto; margin: 0 auto; }
.zg-brand__title {
  font-family: var(--zg-font-heading);
  font-style: italic;
  letter-spacing: .04em;
  font-size: 1.9rem;
  line-height: .9;
  color: var(--zg-accent);
}
.zg-brand__sub {
  font-size: .5rem;
  font-family: var(--zg-font-body);
  text-transform: uppercase;
  letter-spacing: .26em;
  color: rgba(240,232,218,0.48);
  font-weight: 400;
}

/* ─── Navigation ─────────────────────────────────────────────── */
.zg-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: none;
}
.zg-nav::-webkit-scrollbar { display: none; }
.zg-nav ul { list-style: none; margin: 0; padding: 8px 0; }
.zg-nav li { border-bottom: 1px solid rgba(255,255,255,0.04); }
.zg-nav li:first-child { border-top: 1px solid rgba(255,255,255,0.04); }
.zg-nav a {
  font-family: var(--zg-font-menu);
  font-weight: 400;
  min-height: 78px;
  padding: 12px 18px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: .7rem;
  color: rgba(240,232,218,0.68);
  transition: background .22s ease, color .22s ease, letter-spacing .22s ease;
  position: relative;
}
.zg-nav a::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--zg-accent);
  transform: scaleY(0);
  transition: transform .22s cubic-bezier(.4,0,.2,1);
  transform-origin: center;
}
.zg-nav a:hover {
  background: rgba(200,152,90,0.32) !important;
  color: #fff8e8 !important;
  letter-spacing: .22em;
  box-shadow: inset 3px 0 0 var(--zg-accent);
}
.zg-nav .current-menu-item > a,
.zg-nav .current_page_item > a,
.zg-nav .current-menu-ancestor > a {
  background: linear-gradient(90deg, rgba(200,152,90,0.38), rgba(200,152,90,0.22)) !important;
  color: #fff8e8 !important;
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--zg-accent-light);
}
.zg-nav .current-menu-item > a::after,
.zg-nav .current_page_item > a::after,
.zg-nav .current-menu-ancestor > a::after { transform: scaleY(1); }
.zg-nav a:hover .zg-nav__icon,
.zg-nav .current-menu-item > a .zg-nav__icon,
.zg-nav .current_page_item > a .zg-nav__icon,
.zg-nav .current-menu-ancestor > a .zg-nav__icon { color: var(--zg-accent); }
.zg-nav__text { display: block; max-width: 100%; font-size: .7rem; line-height: 1.3; word-break: normal; overflow-wrap: anywhere; }
.zg-nav__icon {
  width: var(--zg-menu-icon-size-desktop);
  height: var(--zg-menu-icon-size-desktop);
  display: inline-grid;
  place-items: center;
  color: rgba(200,152,90,0.65);
  transition: color .22s ease;
}
.zg-nav__icon svg { width: 100%; height: 100%; display: block; }
.zg-nav__icon img { width: 100%; height: 100%; object-fit: contain; display: block; }
.zg-nav__icon--image { width: calc(var(--zg-menu-icon-size-desktop) + 4px); height: calc(var(--zg-menu-icon-size-desktop) + 4px); }

/* ─── Mobile Toggle ──────────────────────────────────────────── */
.zg-mobile-toggle { display: none; }

/* ─── Layout ─────────────────────────────────────────────────── */
.zg-content { margin-left: var(--zg-sidebar-w); min-height: 100vh; position: relative; z-index: 2; }

/* ─── Hero ───────────────────────────────────────────────────── */
.zg-hero {
  min-height: var(--zg-hero-height-desktop, 100vh);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: #07080a;
}
.zg-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(0,0,0,0.84) 0%, rgba(0,0,0,0.50) 40%, rgba(0,0,0,0.72) 100%),
    var(--zg-hero-image,
      radial-gradient(ellipse at 60% 40%, rgba(200,152,90,0.13), transparent 55%),
      linear-gradient(135deg, #111417 0%, #080a0d 100%)
    );
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
}
.zg-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 70% at 50% 50%, rgba(200,152,90,0.055), transparent);
  pointer-events: none;
}

.zg-hero__inner {
  width: min(100%, var(--zg-content-max));
  margin: 0 auto;
  padding: 100px 60px 80px;
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
}
.zg-hero__content {
  max-width: 820px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.zg-hero__logo-wrap { margin: 0 auto; max-width: min(92vw, 760px); }
.zg-hero__logo {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  filter: drop-shadow(0 20px 50px rgba(0,0,0,0.5));
}
.zg-hero__subline {
  margin: 0 auto;
  padding-top: var(--zg-hero-subline-gap);
  max-width: var(--zg-hero-subline-max-width);
  color: rgba(240,232,218,0.74);
  font-family: var(--zg-hero-subline-font);
  font-size: var(--zg-hero-subline-size-desktop);
  font-weight: 300;
  line-height: 1.55;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-wrap: balance;
}
.zg-hero__actions {
  margin-top: 0;
  padding-top: var(--zg-hero-button-gap);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.zg-hero__scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: .45;
  animation: zgScrollBob 2.4s ease-in-out infinite;
}
.zg-hero__scroll-line { width: 1px; height: 38px; background: linear-gradient(180deg, transparent, var(--zg-accent)); }
@keyframes zgScrollBob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(7px); }
}

/* ─── Title ──────────────────────────────────────────────────── */
.zg-title {
  margin: 0 0 20px;
  font-family: var(--zg-font-heading);
  font-style: italic;
  font-size: clamp(4rem, 8vw, 7rem);
  line-height: .92;
  letter-spacing: .02em;
  color: var(--zg-accent);
  text-shadow: 0 4px 40px rgba(200,152,90,0.18);
}

/* ─── Buttons ────────────────────────────────────────────────── */
.zg-button,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  border-radius: 100px;
  border: 1px solid rgba(200,152,90,0.38);
  color: var(--zg-accent);
  background: rgba(200,152,90,0.06);
  font-family: var(--zg-font-button);
  font-weight: 400;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: transform .25s ease, border-color .25s ease, background .25s ease, color .25s ease, box-shadow .25s ease;
}
.zg-button--hero {
  padding: var(--zg-hero-button-padding-y) var(--zg-hero-button-padding-x);
  color: var(--zg-hero-button-text);
  background: var(--zg-hero-button-bg);
  border-color: var(--zg-hero-button-border);
  font-size: var(--zg-hero-button-size-desktop);
  box-shadow: 0 8px 32px rgba(200,152,90,0.28);
}
.zg-button::before,
.wp-block-button__link::before {
  content: "✦";
  font-size: .6rem;
  opacity: .65;
}
.zg-button:hover,
.wp-block-button__link:hover {
  transform: translateY(-2px);
  background: rgba(200,152,90,0.12);
  border-color: rgba(200,152,90,0.68);
  box-shadow: 0 6px 28px rgba(200,152,90,0.16);
}
.zg-button--hero:hover {
  color: var(--zg-hero-button-hover-text);
  background: var(--zg-hero-button-hover-bg);
  border-color: var(--zg-hero-button-hover-border);
  box-shadow: 0 14px 44px rgba(200,152,90,0.38);
  transform: translateY(-3px);
}

/* ─── Dölj dubblerad hero-logga i sidinnehållet ──────────────── */
/* Om temat renderar hero separat, göm eventuell dubblett i page-content */
.zg-page-section--front .zg-entry__content > .wp-block-image:first-child,
.zg-page-section--front .zg-entry__content > figure:first-child {
  display: none;
}

/* ─── Main / Page sections ───────────────────────────────────── */
.zg-main {
  background: var(--zg-page-bg, #f2ede5);
  color: #1a1c21;
  position: relative;
}
.zg-main::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--zg-accent-dark) 20%, var(--zg-accent) 50%, var(--zg-accent-dark) 80%, transparent 100%);
}

.zg-page-section { padding: 60px 36px 80px; }
.zg-page-section--front { padding-top: 64px; }
.zg-page-section--plain { padding-top: 48px; }
.zg-page-section__inner { width: min(100%, 1260px); margin: 0 auto; }
.zg-page-section--plain .zg-page-section__inner,
.zg-page-section--front .zg-page-section__inner { max-width: 1200px; }

.zg-entry {
  background: rgba(255,255,255,0.7);
  border-radius: var(--zg-radius);
  box-shadow: var(--zg-shadow), 0 1px 0 rgba(255,255,255,0.8) inset;
  padding: 48px;
  backdrop-filter: blur(4px);
}
/* Färgtvång gäller endast för vanliga sidor, INTE pluginsidor eller shortcode-sidor */
body:not(.page-template-page-plugin):not(.zg-has-shortcode-page) .zg-entry__content { color: #404551; }
body:not(.page-template-page-plugin):not(.zg-has-shortcode-page) .zg-entry__content > :first-child { margin-top: 0; }
body:not(.page-template-page-plugin):not(.zg-has-shortcode-page) .zg-entry__content > :last-child  { margin-bottom: 0; }
body:not(.page-template-page-plugin):not(.zg-has-shortcode-page) .zg-entry__content h1,
body:not(.page-template-page-plugin):not(.zg-has-shortcode-page) .zg-entry__content h2,
body:not(.page-template-page-plugin):not(.zg-has-shortcode-page) .zg-entry__content h3,
body:not(.page-template-page-plugin):not(.zg-has-shortcode-page) .zg-entry__content h4,
body:not(.page-template-page-plugin):not(.zg-has-shortcode-page) .zg-entry__content h5,
body:not(.page-template-page-plugin):not(.zg-has-shortcode-page) .zg-entry__content h6 {
  color: #111318;
  font-family: var(--zg-font-heading);
  font-style: italic;
  letter-spacing: .02em;
}
body:not(.page-template-page-plugin):not(.zg-has-shortcode-page) .zg-entry__content h2 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.05; }
body:not(.page-template-page-plugin):not(.zg-has-shortcode-page) .zg-entry__content h3 { font-size: 1.5rem; }
body:not(.page-template-page-plugin):not(.zg-has-shortcode-page) .zg-entry__content p,
body:not(.page-template-page-plugin):not(.zg-has-shortcode-page) .zg-entry__content li,
body:not(.page-template-page-plugin):not(.zg-has-shortcode-page) .zg-entry__content span,
body:not(.page-template-page-plugin):not(.zg-has-shortcode-page) .zg-entry__content strong,
body:not(.page-template-page-plugin):not(.zg-has-shortcode-page) .zg-entry__content em { color: #404551; font-size: .97rem; font-weight: 300; line-height: 1.75; }
body:not(.page-template-page-plugin):not(.zg-has-shortcode-page) .zg-entry__content strong { font-weight: 500; }
.zg-entry__content .wp-block-columns { gap: 32px; }
.zg-entry__content .wp-block-image img,
.zg-entry__content .wp-block-cover,
.zg-entry__content .wp-block-gallery,
.zg-entry__content .wp-block-group { border-radius: 16px; overflow: hidden; }

/* ─── Plugin / Shortcode page ────────────────────────────────── */
/* Temat sätter INGEN egen bakgrund på pluginsidor längre — plugins
   får kontrollera sin egen bakgrund fullt ut. Endast en neutral
   sidbakgrund (samma som övriga sidor). */
.zg-page-section--plugin {
  background: var(--zg-page-bg);
}
.zg-page-section--plugin .zg-page-section__inner { width: min(100%, 1580px); }
.zg-entry--bare { background: transparent; box-shadow: none; border-radius: 0; padding: 0; }
.zg-plugin-stage { display: block; width: min(100%, 1040px); margin: 0 auto; }
.zg-plugin-stage > * { display: block; width: 100% !important; max-width: 100% !important; margin-left: auto; margin-right: auto; }

/* ─── Footer ─────────────────────────────────────────────────── */
.zg-footer {
  background: #07080b;
  border-top: 1px solid var(--zg-border-warm);
  color: var(--zg-muted);
  position: relative;
  overflow: hidden;
}
.zg-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 120px;
  background: radial-gradient(ellipse 80% 100% at 50% 0%, rgba(200,152,90,0.07), transparent);
  pointer-events: none;
}
.zg-footer__inner {
  position: relative;
  width: min(100%, 1320px);
  margin: 0 auto;
  padding: 56px 44px 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 52px;
  align-items: start;
}
.zg-footer__brand { display: flex; flex-direction: column; gap: 10px; }
.zg-footer__name {
  font-family: var(--zg-font-heading);
  font-style: italic;
  font-size: 1.65rem;
  color: var(--zg-accent);
  letter-spacing: .04em;
  line-height: 1;
}
.zg-footer__tagline {
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .24em;
  color: rgba(240,232,218,0.36);
  font-weight: 400;
}
.zg-footer__divider {
  width: 42px; height: 1px;
  background: linear-gradient(90deg, var(--zg-accent-dark), transparent);
  margin: 4px 0;
}
.zg-footer__copy {
  margin-top: 4px;
  color: rgba(240,232,218,0.26);
  font-size: .68rem;
  font-weight: 300;
  letter-spacing: .04em;
}
.zg-footer__col { display: flex; flex-direction: column; gap: 7px; }
.zg-footer__section-title {
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .6rem;
  color: var(--zg-accent);
  margin-bottom: 10px;
  font-weight: 500;
}
.zg-footer__item { font-size: .8rem; font-weight: 300; line-height: 1.65; color: rgba(240,232,218,0.5); }
.zg-footer__link { color: rgba(240,232,218,0.5); transition: color .2s ease; }
.zg-footer__link:hover { color: var(--zg-accent); }
.zg-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 16px 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.zg-footer__bottom-text {
  font-size: .66rem;
  font-weight: 300;
  color: rgba(240,232,218,0.22);
  letter-spacing: .06em;
}

/* ─── Scroll reveal ──────────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s cubic-bezier(.4,0,.2,1), transform .7s cubic-bezier(.4,0,.2,1);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
[data-reveal-delay="1"] { transition-delay: .08s; }
[data-reveal-delay="2"] { transition-delay: .18s; }
[data-reveal-delay="3"] { transition-delay: .28s; }
[data-reveal-delay="4"] { transition-delay: .38s; }

.screen-reader-text { position: absolute; left: -9999px; }

/* ─── Page surface variants ──────────────────────────────────── */
.zg-page-section--plain,
.zg-page-section--front { background: var(--zg-page-bg, #f2ede5); }
.zg-page-section--front .zg-entry { background: transparent; box-shadow: none; border-radius: 0; padding: 0; }
.zg-page-section--plain .zg-entry { background: var(--zg-surface-bg, #eee8de); }
body.zg-surface-plain .zg-page-section--plain .zg-entry,
body.zg-surface-plain .zg-page-section--front .zg-entry { background: transparent; box-shadow: none; border-radius: 0; padding: 0; }
body.zg-surface-wide .zg-page-section__inner { width: min(100%, 1480px); }
body.zg-surface-wide .zg-page-section--plain .zg-entry,
body.zg-surface-wide .zg-page-section--front .zg-entry { padding: clamp(28px, 3vw, 48px); }
body.zg-surface-card .zg-page-section--plain .zg-entry,
body.zg-surface-card .zg-page-section--front .zg-entry {
  background: rgba(255,255,255,0.7);
  box-shadow: var(--zg-shadow);
  border-radius: 28px;
  padding: clamp(28px, 4vw, 56px);
  backdrop-filter: blur(4px);
}
.zg-page-section--plugin,
body.page-template-page-plugin .zg-main,
body.zg-has-shortcode-page .zg-main {
  background: var(--zg-page-bg);
}
.zg-template-plain .zg-entry { background: transparent; box-shadow: none; border-radius: 0; padding: 0; }
.zg-template-wide .zg-page-section__inner { width: min(100%, 1480px); }

/* ─── Flow fixes ─────────────────────────────────────────────── */
body.zg-has-shortcode-page .zg-page-section__inner,
body.page-template-page-plugin .zg-page-section__inner { width: min(100%, 1140px); }
body.zg-has-shortcode-page .zg-entry__content,
body.page-template-page-plugin .zg-entry__content,
body.zg-has-shortcode-page .zg-plugin-stage,
body.page-template-page-plugin .zg-plugin-stage { display: block !important; columns: auto !important; column-count: 1 !important; column-gap: 0 !important; grid-template-columns: none !important; }
body.zg-has-shortcode-page .zg-entry__content > *,
body.page-template-page-plugin .zg-entry__content > *,
body.zg-has-shortcode-page .zg-plugin-stage > *,
body.page-template-page-plugin .zg-plugin-stage > * { break-inside: avoid !important; page-break-inside: avoid !important; float: none !important; clear: both; }
body.zg-has-shortcode-page .zg-main,
body.page-template-page-plugin .zg-main { overflow-x: hidden; }
body.zg-has-shortcode-page .zg-plugin-stage,
body.page-template-page-plugin .zg-plugin-stage { min-height: 40vh; }

/* ─── Booking page ───────────────────────────────────────────── */
body.page-template-page-booking .zg-main {
  background: var(--zg-page-bg);
}
body.page-template-page-booking .zg-page-section__inner { width: min(100%, 1400px); }
body.page-template-page-booking .zg-entry { background: transparent; box-shadow: none; border-radius: 0; padding: 0; }
.zg-booking-page { display: grid; gap: 28px; }
.zg-booking-page__intro { width: min(100%, 840px); margin: 0 auto; text-align: center; }
.zg-booking-page__intro .zg-entry__content { color: #1a1c21; }
.zg-booking-page__actions { display: flex; justify-content: center; }
.zg-booking-page__actions .zg-button { background: rgba(0,0,0,0.58); }
.zg-booking-embed {
  width: min(100%, 1400px);
  margin: 0 auto;
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.zg-booking-embed iframe {
  display: block; width: 100%;
  min-height: var(--zg-booking-height-desktop, 1420px);
  border: 0; background: #fff;
}

/* ─── Typography lock (innehåll som vi SKA styra) ─────────────
   Notera: vi styr INTE typsnitt/färg på sidmallen "Pluginsida"
   eller shortcode-sidor — plugins får kontrollera sitt eget utseende.
*/
.zg-entry__content,
.zg-entry__content .wp-block,
.zg-entry__content .wp-block-group,
.zg-entry__content .wp-block-columns,
.zg-entry__content .wp-block-column,
.zg-entry__content .wp-block-paragraph,
.zg-entry__content p,
.zg-entry__content ul,
.zg-entry__content ol,
.zg-entry__content li,
.zg-entry__content div,
.zg-entry__content span,
.zg-entry__content strong,
.zg-entry__content em,
.zg-entry__content a,
.zg-booking-page__intro,
.zg-booking-page__intro :where(p,li,div,span,strong,em,a) {
  font-family: var(--zg-font-body);
}
.zg-entry__content h1,
.zg-entry__content h2,
.zg-entry__content h3,
.zg-entry__content h4,
.zg-entry__content h5,
.zg-entry__content h6,
.zg-entry__content .wp-block-heading,
.zg-booking-page__intro :where(h1,h2,h3,h4,h5,h6) {
  font-family: var(--zg-font-heading);
}
.zg-entry__content :where(button,.wp-block-button__link,input[type="button"],input[type="submit"]),
.zg-booking-page__intro :where(button,.wp-block-button__link,input[type="button"],input[type="submit"]) {
  font-family: var(--zg-font-button);
}

/* Pluginsidor & shortcode-sidor: temat tvingar INGEN typografi alls —
   låt pluginens egen CSS gälla fullt ut */
.page-template-page-plugin .zg-entry__content,
.page-template-page-plugin .zg-entry__content *,
body.zg-has-shortcode-page .zg-entry__content,
body.zg-has-shortcode-page .zg-entry__content * {
  font-family: inherit;
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (min-width: 1440px) { .zg-hero__inner { padding-left: 80px; padding-right: 80px; } }

@media (max-width: 1280px) {
  :root { --zg-sidebar-w: 200px; }
  .zg-footer__inner { grid-template-columns: 1.2fr 1fr 1fr; gap: 36px; }
}

@media (max-width: 1024px) {
  :root { --zg-sidebar-w: 0px; }
  body.admin-bar .zg-sidebar { top: 46px; height: calc(100vh - 46px); }
  .zg-sidebar {
    width: 280px;
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
  }
  body.nav-open .zg-sidebar { transform: translateX(0); }
  .zg-mobile-toggle {
    position: fixed;
    top: 18px; left: 18px;
    z-index: 160;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px; height: 50px;
    border-radius: 50px;
    border: 1px solid var(--zg-border-warm);
    background: rgba(9,11,15,0.92);
    color: var(--zg-accent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: background .2s ease, border-color .2s ease;
  }
  .zg-mobile-toggle:hover { background: rgba(200,152,90,0.1); border-color: rgba(200,152,90,0.4); }
  .zg-mobile-toggle span:not(.screen-reader-text) {
    display: block; width: 18px; height: 1.5px;
    background: currentColor; position: absolute;
    transition: transform .25s ease, opacity .25s ease;
  }
  .zg-mobile-toggle span:not(.screen-reader-text):first-child  { transform: translateY(-5px); }
  .zg-mobile-toggle span:not(.screen-reader-text):nth-child(2) { transform: translateY(5px); }
  body.nav-open .zg-mobile-toggle span:not(.screen-reader-text):first-child  { transform: rotate(45deg); }
  body.nav-open .zg-mobile-toggle span:not(.screen-reader-text):nth-child(2) { transform: rotate(-45deg); }
  .zg-nav__icon,
  .zg-nav__icon svg,
  .zg-nav__icon img { width: var(--zg-menu-icon-size-mobile); height: var(--zg-menu-icon-size-mobile); }
  .zg-nav__icon--image { width: calc(var(--zg-menu-icon-size-mobile) + 4px); height: calc(var(--zg-menu-icon-size-mobile) + 4px); }
  .zg-content { margin-left: 0; }
  .zg-hero { min-height: var(--zg-hero-height-mobile, 70vh); }
  .zg-hero__inner { padding: 100px 28px 60px; justify-content: center; }
  .zg-page-section { padding: 36px 20px 48px; }
  .zg-booking-embed iframe { min-height: var(--zg-booking-height-mobile, 1700px); }
}

@media (max-width: 768px) {
  .zg-footer__inner { grid-template-columns: 1fr 1fr; gap: 28px; padding: 40px 24px 28px; }
  .zg-footer__brand { grid-column: 1 / -1; }
  .zg-footer__bottom { padding: 14px 24px; flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 600px) {
  .zg-title { font-size: 3.4rem; }
  .zg-entry { padding: 24px; }
  .zg-nav a { min-height: 76px; }
  .zg-plugin-stage { width: 100%; }
  .zg-booking-embed { border-radius: 16px; }
  .zg-footer__inner { grid-template-columns: 1fr; gap: 22px; }
  .zg-hero__scroll { display: none; }
}

@media (max-width: 400px) {
  .zg-hero__subline { font-size: var(--zg-hero-subline-size-mobile); }
}
