:root {
  --bg: #f6f8fb;
  --surface: #fff;
  --surface-2: #eef3fa;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #d71920;
  --primary-2: #a30e14;
  --accent: #ffb703;
  --shadow: 0 20px 60px rgba(15, 23, 42, .1);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}
body[data-brand="energizer"] {
  --primary: #0f5fe8;
  --primary-2: #063a92;
  --accent: #21d4fd;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.container { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
.lock-scroll { overflow: hidden; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .88);
  border-bottom: 1px solid rgba(226, 232, 240, .8);
  backdrop-filter: blur(20px);
}
.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; }
.brand-logo { width: 150px; object-fit: contain; }
.brand strong, .brand span { display: none; }
.top-nav { display: flex; gap: 8px; align-items: center; }
.top-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}
.top-nav a:hover { color: var(--primary); background: var(--surface-2); }
.mobile-menu {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--surface-2);
  font-size: 22px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 40px;
  color: white;
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--primary) 22%, transparent), transparent 38%),
    linear-gradient(145deg, #0b1220 0%, #101f3a 48%, color-mix(in srgb, var(--primary-2) 82%, #0b1220) 100%);
}
.hero::after {
  content: "";
  position: absolute;
  right: -20%;
  bottom: -45%;
  width: 680px;
  height: 680px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 22%, transparent);
  filter: blur(40px);
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 0 0 24px;
  font-size: clamp(30px, 6vw, 41px);
  line-height: 1.2;
  letter-spacing: -.05em;
}
.lead {
  max-width: 660px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, .76);
  font-size: 18px;
  line-height: 1.75;
}
.brand-switch {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .11);
}
.switch-btn {
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  color: rgba(255, 255, 255, .72);
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}
.switch-btn.active {
  color: var(--primary);
  background: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 900;
}
.btn.primary { color: var(--primary); background: white; }
.btn.ghost { color: white; border-color: rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .08); }
.hero-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 30px;
  background: rgba(255, 255, 255, .08);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .26);
}
.hero-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 12px;
}
.hero-card-top span { font-size: 18px; font-weight: 900; }
.hero-card-top strong { color: rgba(255, 255, 255, .7); font-size: 12px; text-align: right; }
.hero-card img { width: 100%; aspect-ratio: 1000 / 382; object-fit: cover; background: #111827; }
.hero-meta { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255, 255, 255, .12); }
.hero-meta div { padding: 16px; }
.hero-meta strong { display: block; font-size: 26px; line-height: 1; }
.hero-meta span { display: block; margin-top: 6px; color: rgba(255, 255, 255, .65); font-size: 12px; font-weight: 700; }

.section { padding: 70px 0; }
.section-heading { max-width: 780px; margin-bottom: 28px; }
h2 { margin: 0 0 14px; font-size: clamp(30px, 4vw, 46px); line-height: 1.05; letter-spacing: -.04em; }
.muted { color: var(--muted); font-size: 16px; line-height: 1.75; }
.overview-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.overview-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .05);
}
.overview-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 18px;
  border-radius: 17px;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, white);
  font-size: 22px;
  font-weight: 900;
}
.overview-card h3 { margin: 0 0 8px; font-size: 18px; }
.overview-card p { margin: 0 0 18px; color: var(--muted); line-height: 1.65; }
.overview-card a { color: var(--primary); font-weight: 900; }

.layout-two { display: grid; grid-template-columns: 250px 1fr; gap: 24px; align-items: start; }
.side-panel { position: sticky; top: 96px; }
.side-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 12px 34px rgba(15, 23, 42, .05);
}
.side-card h3 { margin: 0 0 12px; }
.side-card a { display: block; padding: 10px 12px; border-radius: 12px; color: #334155; font-size: 13px; font-weight: 800; }
.side-card a:hover { color: var(--primary); background: var(--surface-2); }
.content-stack { display: grid; gap: 24px; }
.content-block {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: white;
  box-shadow: var(--shadow);
  scroll-margin-top: 92px;
}
.block-heading { margin-bottom: 20px; }
.block-heading h2 { font-size: clamp(26px, 3vw, 38px); }
.group-stack { display: grid; gap: 10px; }

.model-group { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: white; }
.group-toggle {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 15px;
  border: 0;
  color: inherit;
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 6%, white), white);
  text-align: left;
  cursor: pointer;
}
.group-toggle:hover .group-title h3 { color: var(--primary); }
.group-title { min-width: 0; }
.group-title h3 { margin: 0 0 3px; font-size: 15px; line-height: 1.35; letter-spacing: -.01em; }
.group-title p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.gallery-summary {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, white);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}
.chevron {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--primary);
  background: white;
  transition: transform .2s ease;
}
.model-group.open .chevron { transform: rotate(180deg); }
.group-body { display: none; border-top: 1px solid var(--line); background: #f8fafc; }
.model-group.open .group-body { display: block; }
.model-list { display: grid; gap: 12px; padding: 14px; }
.model-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}
.model-item-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.model-item-heading h4 { margin: 0; font-size: 13px; line-height: 1.4; }
.model-item-heading span { color: var(--muted); font-size: 10px; font-weight: 800; white-space: nowrap; }

.certificate-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.document-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.document-preview {
  position: relative;
  height: 145px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #eef2f7;
}
.document-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.file-type {
  position: absolute;
  top: 7px;
  right: 7px;
  padding: 4px 7px;
  border-radius: 999px;
  color: white;
  background: rgba(15, 23, 42, .82);
  font-size: 9px;
  font-weight: 900;
}
.unsupported-preview, .file-placeholder { display: grid; place-items: center; }
.file-placeholder { width: 100%; height: 100%; color: var(--primary); font-size: 24px; font-weight: 900; }
.document-meta { padding: 10px; }
.document-meta h5 {
  display: -webkit-box;
  min-height: 34px;
  margin: 0 0 9px;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.45;
  --webkit-box-orient: vertical;
  --webkit-line-clamp: 2;
}
.document-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: var(--primary);
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}
.empty-state { padding: 24px; border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); text-align: center; }

.support-section { color: white; background: #0b1220; }
.support-section .muted { color: rgba(255, 255, 255, .7); }
.support-grid { display: grid; grid-template-columns: 1fr 420px; gap: 48px; align-items: start; }
.support-card { padding: 24px; border: 1px solid rgba(255, 255, 255, .15); border-radius: 28px; background: rgba(255, 255, 255, .08); }
.support-card h3 { margin: 0 0 18px; }
.support-card ul { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.placeholder { color: rgba(255, 255, 255, .65); }
.site-footer { padding: 28px 0; color: white; background: #080d18; padding-bottom: 200px;}
.footer-grid { display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.site-footer p { margin: 6px 0 0; color: rgba(255, 255, 255, .6); }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px; }
.footer-links a { padding: 10px 14px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 999px; color: rgba(255, 255, 255, .78); font-weight: 800; }

.floating-contact {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 80;
  display: grid;
  justify-items: end;
  gap: 11px;
  pointer-events: none;
}
.floating-contact a { pointer-events: auto; }
.floating-socials { display: grid; gap: 10px; margin-right: 3px; }
.contact-circle {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 50%;
  background: white;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .16), 0 2px 0 rgba(255, 255, 255, .9);
  transition: transform .2s ease, box-shadow .2s ease;
}
.contact-circle:hover, .hotline-contact:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 44px rgba(15, 23, 42, .24);
}
.contact-circle img { width: 40px; height: 40px; object-fit: contain; }
.hotline-contact {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 246px;
  padding: 9px 17px 9px 10px;
  border-radius: 26px;
  color: white;
  background: linear-gradient(135deg, #ff5a08, #ff7d21);
  box-shadow: 0 12px 30px rgba(255, 90, 8, .26);
  transition: transform .2s ease, box-shadow .2s ease;
}
.hotline-icon {
  display: grid;
  place-items: center;
  flex: 0 0 43px;
  width: 43px;
  height: 43px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .22);
}
.hotline-icon svg { width: 23px; height: 23px; fill: none; stroke: white; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hotline-copy { display: grid; line-height: 1.05; }
.hotline-copy small { margin-bottom: 4px; font-size: 11px; font-weight: 600; }
.hotline-copy strong { font-size: 20px; letter-spacing: .01em; white-space: nowrap; }

.document-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.document-modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(2, 6, 23, .82); backdrop-filter: blur(10px); }
.document-modal.showing-pdf .modal-backdrop { backdrop-filter: none; }
.modal-dialog {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1120px, 100%);
  height: min(92vh, 900px);
  overflow: hidden;
  border-radius: 20px;
  background: white;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .4);
}
.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.modal-header h3 {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.modal-original { padding: 8px 12px; border-radius: 999px; color: white; background: var(--primary); font-size: 11px; font-weight: 900; white-space: nowrap; }
.modal-close {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: #0f172a;
  font-size: 24px;
  cursor: pointer;
}
.modal-content {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #dfe4ea;
}
#pdfViewer {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: white;
}
.image-viewer {
  width: 100%;
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  text-align: center;
  -webkit-overflow-scrolling: touch;
}
.image-viewer img {
  display: inline-block;
  max-width: none;
  max-height: none;
  height: auto;
  margin: 36px;
}
.image-zoom-controls { display: flex; align-items: center; gap: 6px; }
.image-zoom-controls button {
  min-width: 32px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.image-zoom-controls span { min-width: 46px; color: var(--muted); font-size: 11px; font-weight: 800; text-align: center; }

@media (max-width: 980px) {
  .hero-grid, .layout-two, .support-grid { grid-template-columns: 1fr; }
  .side-panel { position: static; }
  .overview-cards { grid-template-columns: 1fr; }
  .certificate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .container { width: min(100% - 24px, 1180px); }
  .header-inner { min-height: 64px; }
  .brand-logo { width: 116px; max-height: 42px; }
  .top-nav {
    position: absolute;
    top: 64px;
    right: 12px;
    left: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: white;
    box-shadow: var(--shadow);
  }
  .top-nav.open { display: flex; }
  .mobile-menu { display: inline-grid; place-items: center; }
  .hero { padding: 34px 0 28px; }
  .lead { font-size: 15px; }
  .brand-switch { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .switch-btn, .btn { width: 100%; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .hero-card { border-radius: 22px; }
  .hero-card-top { align-items: flex-start; flex-direction: column; gap: 6px; }
  .hero-card-top strong { text-align: left; }
  .hero-card img { aspect-ratio: 16 / 9; }
  .hero-meta div { padding: 12px; }
  .hero-meta strong { font-size: 22px; }
  .section { padding: 48px 0; }
  .content-block { padding: 15px; border-radius: 20px; }
  .group-toggle { grid-template-columns: 1fr auto; padding: 12px; }
  .gallery-summary { grid-column: 1 / -1; justify-self: start; }
  .chevron { grid-column: 2; grid-row: 1; }
  .model-list, .model-item { padding: 10px; }
  .certificate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .document-preview { height: 120px; }
  .support-card { padding: 18px; border-radius: 22px; }
  .floating-contact {
    right: max(9px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    gap: 10px;
  }
  .floating-socials { gap: 9px; margin-right: 3px; }
  .contact-circle { width: 52px; height: 52px; }
  .contact-circle img { width: 41px; height: 41px; }
  .hotline-contact {
    min-width: 0;
    padding: 8px 14px 8px 9px;
    border-radius: 25px;
    gap: 9px;
  }
  .hotline-icon { flex-basis: 42px; width: 42px; height: 42px; }
  .hotline-icon svg { width: 23px; height: 23px; }
  .hotline-copy small { margin-bottom: 3px; font-size: 10px; }
  .hotline-copy strong { font-size: 18px; }
  .document-modal {
    align-items: stretch;
    padding:
      max(8px, env(safe-area-inset-top))
      max(8px, env(safe-area-inset-right))
      max(8px, env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left));
  }
  .modal-dialog {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 14px;
  }
  .modal-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 36px;
    gap: 8px;
    width: 100%;
    padding: 9px 10px;
  }
  .modal-header h3 {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    min-width: 0;
  }
  .modal-close {
    grid-column: 2;
    grid-row: 1;
  }
  .modal-original {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-width: 0;
    margin: 0;
    text-align: center;
  }
  .image-zoom-controls {
    grid-column: 1 / -1;
    grid-row: 3;
    display: grid;
    grid-template-columns: 34px 48px 34px minmax(0, 1fr);
    width: 100%;
    min-width: 0;
  }
  .image-zoom-controls button {
    min-width: 0;
    padding: 0 6px;
  }
  .image-zoom-controls span { min-width: 0; }
  .image-viewer img { margin: 20px; }
}

@media (max-width: 420px) {
  .certificate-grid { grid-template-columns: 1fr; }
  .document-preview { height: 180px; }
  .hotline-contact { padding-right: 12px; }
  .hotline-copy strong { font-size: 16px; }
}
