/**
 * SwitcherMate Business — shared shell for smb-hub (guides hub) and smb-article (guide pages, contact, etc.)
 * Dark theme; Inter loaded from HTML.
 */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body.smb-hub,
body.smb-article {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #0f0f0f;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.5;
  min-height: 100vh;
}

body.smb-article {
  font-size: 16px;
}

body.menu-open {
  overflow: hidden;
}

#wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ——— Backdrop + flyout menu ——— */
body:not(.sm-chrome) .backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 90;
}

body:not(.sm-chrome) .backdrop.open {
  display: block;
}

body:not(.sm-chrome) .menu {
  position: fixed;
  top: 0;
  right: 0;
  width: min(20rem, 92vw);
  height: 100vh;
  background: #1a1a1a;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 100;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
  padding: 0 0 2rem;
}

body:not(.sm-chrome) .menu.open {
  transform: translateX(0);
}

body:not(.sm-chrome) .menu-head {
  display: flex;
  align-items: center;
  padding: 1rem 1rem 0.5rem;
}

body:not(.sm-chrome) .menu-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem;
}

body:not(.sm-chrome) .menu-links {
  padding: 0.5rem 0;
}

body:not(.sm-chrome) .menu-section-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.875rem 1.25rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

body:not(.sm-chrome) .menu-section-btn .sec-arr {
  opacity: 0.5;
  font-size: 0.75rem;
}

body:not(.sm-chrome) .menu-section-body {
  display: none;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.25rem 0 0.5rem;
}

body:not(.sm-chrome) .menu-section-body.open {
  display: block;
}

body:not(.sm-chrome) .menu-section-btn.open .sec-arr {
  transform: rotate(180deg);
  display: inline-block;
}

body:not(.sm-chrome) .menu-link {
  display: block;
  padding: 0.65rem 1.5rem;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.9rem;
}

body:not(.sm-chrome) .menu-link:hover {
  color: #fff;
  background: rgba(46, 125, 210, 0.15);
}

/* ——— Header ——— */
body:not(.sm-chrome) header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 15, 15, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body:not(.sm-chrome) .hdr {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

body:not(.sm-chrome) .brand-text {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

body:not(.sm-chrome) .brand-blue { color: #2E7DD2; }
body:not(.sm-chrome) .brand-green { color: #4CAF50; }
body:not(.sm-chrome) .brand-suffix {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
}

body:not(.sm-chrome) .nav-links {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

@media (min-width: 900px) {
  body:not(.sm-chrome) .nav-links {
    display: flex;
  }
}

body:not(.sm-chrome) .nav-link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

body:not(.sm-chrome) .nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

body:not(.sm-chrome) .nav-dropdown {
  position: relative;
}

body:not(.sm-chrome) .nav-dropdown-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

body:not(.sm-chrome) .nav-dropdown-label svg {
  width: 10px;
  height: 6px;
  opacity: 0.7;
}

body:not(.sm-chrome) .nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 14rem;
  background: #1f1f1f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.35rem 0;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

body:not(.sm-chrome) .nav-dropdown-menu.open {
  display: block;
}

body:not(.sm-chrome) .nav-dropdown-item {
  display: block;
  padding: 0.6rem 1rem;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 0.875rem;
}

body:not(.sm-chrome) .nav-dropdown-item:hover {
  background: rgba(46, 125, 210, 0.2);
  color: #fff;
}

body:not(.sm-chrome) .menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  cursor: pointer;
  padding: 0 8px;
}

@media (min-width: 900px) {
  body:not(.sm-chrome) .menu-btn {
    display: none;
  }
}

body:not(.sm-chrome) .menu-btn span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 1px;
}

body:not(.sm-chrome) .menu-btn.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body:not(.sm-chrome) .menu-btn.open span:nth-child(2) {
  opacity: 0;
}

body:not(.sm-chrome) .menu-btn.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ——— Energy guide article breadcrumb ——— */
.guide-breadcrumb {
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.5;
  margin: 0 0 1.25rem;
  color: rgba(255, 255, 255, 0.45);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
.guide-breadcrumb a {
  color: rgba(255, 255, 255, 0.45) !important;
  text-decoration: none !important;
  font-weight: 400;
}
.guide-breadcrumb a:hover {
  color: rgba(255, 255, 255, 0.7) !important;
}
.guide-breadcrumb-sep {
  margin: 0 0.35em;
  color: rgba(255, 255, 255, 0.32);
  user-select: none;
}
.guide-breadcrumb-current {
  color: #fff !important;
  font-weight: 400;
}

/* ——— Hub hero ——— */
.hero {
  padding: 2.5rem 1.25rem 3rem;
  background: linear-gradient(180deg, rgba(46, 125, 210, 0.08) 0%, transparent 45%);
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 2rem;
}

@media (min-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  line-height: 1.1;
  margin: 0 0 1rem;
  letter-spacing: -0.03em;
}

.hero-inner > p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78) !important;
}

.widget {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.25rem;
}

.tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.tab {
  flex: 1;
  min-width: 5rem;
  text-align: center;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid transparent;
  cursor: pointer;
}

.tab.on {
  background: rgba(46, 125, 210, 0.35);
  color: #fff;
  border-color: rgba(46, 125, 210, 0.5);
}

.tab[href] {
  text-decoration: none;
  color: inherit;
}

.s-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 0.75rem;
}

.btn-search {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.875rem 1.25rem;
  background: linear-gradient(135deg, #2E7DD2, #4CAF50);
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-align: center;
}

.btn-search--secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.smb-cta-hint {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55) !important;
  margin: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.chip {
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ——— Speed banner ——— */
.speed-banner-outer {
  padding: 0 1.25rem;
  margin-top: -1rem;
}

.r-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.speed-banner {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(76, 175, 80, 0.35);
  background: rgba(76, 175, 80, 0.08);
}

.speed-banner-bar {
  height: 3px;
  background: linear-gradient(90deg, #2E7DD2, #4CAF50);
}

.speed-banner-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  flex-wrap: wrap;
}

.speed-banner-badge {
  font-size: 1.5rem;
}

.speed-banner-title {
  font-weight: 800;
  color: #fff !important;
  font-size: 1rem;
}

.speed-banner-sub {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7) !important;
  flex: 1;
  min-width: 200px;
}

.speed-banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.6rem 1rem;
  background: #2E7DD2;
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 8px;
  white-space: nowrap;
}

/* ——— Proof strip ——— */
.proof {
  text-align: center;
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* ——— Main column ——— */
.smb-page-main,
.content-page {
  flex: 1;
  width: 100%;
  padding: 1.5rem 1.25rem 3rem;
}

.content-page h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  margin-top: 0;
  color: #fff !important;
}

.content-page h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-top: 2rem;
  color: #fff !important;
}

.content-page h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff !important;
}

.content-page p,
.content-page li {
  color: rgba(255, 255, 255, 0.88);
}

.content-page a {
  color: #7ecbff;
  font-weight: 600;
}

.content-page a:hover {
  color: #fff;
}

/* ——— Footer ——— */
footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #0a0a0a;
  padding: 2rem 1.25rem;
}

.foot-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.foot-brand {
  font-weight: 800;
  font-size: 1.1rem;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 1rem;
}

.foot-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
}

.foot-link {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-weight: 500;
}

.foot-link:hover {
  color: #4CAF50;
}

.foot-sep {
  color: rgba(255, 255, 255, 0.25);
  user-select: none;
}

.foot-meta {
  font-size: 0.75rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.45) !important;
}

.foot-legal-wrap {
  position: relative;
  display: inline-flex;
}

.foot-legal-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.75);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}

.foot-legal-btn svg {
  width: 10px;
  height: 6px;
  opacity: 0.7;
}

.foot-legal-menu {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 6px;
  min-width: 11rem;
  background: #1f1f1f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.35rem 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.foot-legal-menu.open {
  display: block;
}

.foot-legal-item {
  display: block;
  padding: 0.5rem 0.9rem;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 0.8rem;
}

.foot-legal-item:hover {
  background: rgba(46, 125, 210, 0.2);
}

/* ——— WhatsApp FAB ——— */
.floating-whatsapp {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 60;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s;
}

.floating-whatsapp:hover {
  transform: scale(1.06);
}

.floating-whatsapp svg {
  width: 1.65rem;
  height: 1.65rem;
  fill: #fff;
}

/* ——— Resources grid helpers ——— */
.resources-grid .resource-card:hover {
  border-color: rgba(46, 125, 210, 0.45) !important;
  background: rgba(46, 125, 210, 0.08) !important;
}

/* ——— Energy guide articles (mobile readability, no horizontal scroll) ——— */
@media (max-width: 768px) {
  body.smb-article #wrap {
    overflow-x: hidden;
    max-width: 100%;
  }

  body.smb-article .content-page {
    padding: 1rem 1rem 2.5rem;
    max-width: 100% !important;
  }

  body.smb-article .content-page [style*="max-width: 900px"] {
    max-width: 100% !important;
    padding-left: 0;
    padding-right: 0;
  }

  body.smb-article .content-page h1[style*="font-size: 2.5rem"] {
    font-size: clamp(1.65rem, 6vw, 2rem) !important;
    line-height: 1.25 !important;
  }

  body.smb-article .content-page p,
  body.smb-article .content-page li {
    font-size: 16px !important;
    line-height: 1.65 !important;
  }

  body.smb-article .content-page h2 {
    font-size: 1.35rem !important;
    line-height: 1.3 !important;
  }

  body.smb-article .content-page h3 {
    font-size: 1.05rem !important;
  }

  body.smb-article .content-page h4 {
    font-size: 1rem !important;
  }

  body.smb-article .content-page img {
    max-width: 100%;
    height: auto;
  }

  body.smb-article .content-page table {
    display: block;
    width: 100% !important;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.smb-article .content-page [style*="grid-template-columns: repeat(auto-fit, minmax(250px, 1fr))"] {
    grid-template-columns: 1fr !important;
  }

  body.smb-article .content-page div[style*="border-left: 4px solid #2E7DD2"] a[href*="tickd.co.uk"],
  body.smb-article .content-page div[style*="border-left: 4px solid #2E7DD2"] a[href*="wa.me"] {
    display: block !important;
    width: 100% !important;
    text-align: center;
    box-sizing: border-box;
    margin: 0 0 0.65rem 0 !important;
  }
}
