/*
Theme Name: Saman 5145 Redesign
Theme URI: https://saman5145.ir/
Template: oceanwp
Author: Saman Insurance Agency 5145
Description: قالب فرزند OceanWP برای نمایندگی ۵۱۴۵ بیمه سامان — سیستم طراحی، فونت محلی وزیرمتن، سئوی ساختاریافته و قالب‌های آماده صفحات.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: saman5145
*/

/* ==========================================================================
   1. Fonts — self-hosted so nothing is fetched from Google (faster in Iran)
   ========================================================================== */
@font-face { font-family:'Vazirmatn'; src:url('assets/fonts/Vazirmatn-Regular.woff2') format('woff2'); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:'Vazirmatn'; src:url('assets/fonts/Vazirmatn-Medium.woff2')  format('woff2'); font-weight:500; font-style:normal; font-display:swap; }
@font-face { font-family:'Vazirmatn'; src:url('assets/fonts/Vazirmatn-Bold.woff2')    format('woff2'); font-weight:700; font-style:normal; font-display:swap; }
@font-face { font-family:'Vazirmatn'; src:url('assets/fonts/Vazirmatn-Black.woff2')   format('woff2'); font-weight:900; font-style:normal; font-display:swap; }

/* ==========================================================================
   2. Tokens
   ========================================================================== */
:root {
  --s5-navy-900:#08213F;
  --s5-navy-800:#0B2B5C;
  --s5-navy-700:#133A73;
  --s5-navy-600:#0A2A57;
  --s5-blue-600:#0F62B4;
  --s5-blue-500:#1668C8;
  --s5-blue-400:#3E8BE0;
  --s5-blue-100:#DCEAFB;
  --s5-blue-50:#EAF3FD;
  --s5-ink:#14213D;
  --s5-body:#55637A;
  --s5-muted:#8794AB;
  --s5-line:#E3EBF5;
  --s5-canvas:#F5F9FE;

  --s5-radius-sm:10px;
  --s5-radius:16px;
  --s5-radius-lg:24px;
  --s5-pill:999px;

  --s5-shadow-sm:0 2px 8px rgba(11,43,92,.06);
  --s5-shadow:0 10px 30px rgba(11,43,92,.08);
  --s5-shadow-lg:0 24px 60px rgba(11,43,92,.12);

  --s5-ease:cubic-bezier(.22,.61,.36,1);
}

/* ==========================================================================
   3. Base — override OceanWP defaults
   ========================================================================== */
body,
body.oceanwp-theme,
.elementor-widget-text-editor,
.elementor-widget-heading .elementor-heading-title,
input, textarea, select, button {
  font-family:'Vazirmatn', Tahoma, system-ui, sans-serif;
}

body {
  color:var(--s5-body);
  line-height:2;
  direction:rtl;
  text-align:right;
}

h1,h2,h3,h4,h5,h6,
.elementor-heading-title {
  color:var(--s5-ink);
  font-weight:800;
  line-height:1.45;
  letter-spacing:-.01em;
}

a { transition:color .2s var(--s5-ease); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration:.001ms !important;
    transition-duration:.001ms !important;
    scroll-behavior:auto !important;
  }
}

:focus-visible { outline:3px solid var(--s5-blue-400); outline-offset:3px; border-radius:4px; }

/* OceanWP puts a max-width container we want to keep, just widen slightly */
.s5-wide .container,
.s5-wide .elementor-container { max-width:1240px; }

/* ==========================================================================
   4. Buttons
   ========================================================================== */
.s5-btn,
.elementor-button.s5-btn {
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:14px 28px;
  border-radius:var(--s5-pill);
  font-weight:700;
  font-size:.97rem;
  line-height:1.6;
  border:1.5px solid transparent;
  cursor:pointer;
  transition:transform .2s var(--s5-ease), box-shadow .2s var(--s5-ease), background-color .2s var(--s5-ease), color .2s var(--s5-ease);
}
.s5-btn svg { width:19px; height:19px; flex:none; }

.s5-btn--primary,
.elementor-button.s5-btn--primary {
  background:linear-gradient(135deg, var(--s5-navy-800), var(--s5-blue-600));
  color:#fff;
  box-shadow:0 10px 24px rgba(15,98,180,.28);
}
.s5-btn--primary:hover { color:#fff; transform:translateY(-2px); box-shadow:0 16px 32px rgba(15,98,180,.34); }

.s5-btn--ghost {
  background:transparent;
  color:var(--s5-navy-600);
  border-color:var(--s5-blue-100);
}
.s5-btn--ghost:hover { background:var(--s5-blue-50); color:var(--s5-navy-800); border-color:var(--s5-blue-400); }

.s5-btn--white { background:#fff; color:var(--s5-navy-700); box-shadow:var(--s5-shadow-sm); }
.s5-btn--white:hover { color:var(--s5-blue-600); transform:translateY(-2px); }

.s5-btn--sm { padding:10px 20px; font-size:.88rem; }
.s5-btn--block { width:100%; justify-content:center; }

/* ==========================================================================
   5. Top bar (Elementor section, class: s5-topbar)
   ========================================================================== */
.s5-topbar {
  background:linear-gradient(90deg, var(--s5-navy-900) 0%, var(--s5-navy-800) 55%, var(--s5-navy-700) 100%);
  color:#C9DBF2;
  font-size:.85rem;
}
.s5-topbar a, .s5-topbar .elementor-icon-list-text { color:#C9DBF2; }
.s5-topbar a:hover, .s5-topbar .elementor-icon-list-item:hover .elementor-icon-list-text { color:#fff; }
.s5-topbar .elementor-icon-list-items { display:flex; gap:22px; flex-wrap:wrap; margin:0; }
.s5-topbar .elementor-icon-list-item { margin:0; }
.s5-topbar svg, .s5-topbar i { color:#8FC2F3; }

@media (max-width:900px) {
  .s5-topbar .s5-hide-mobile { display:none; }
  .s5-topbar .elementor-icon-list-items { justify-content:center; gap:16px; }
}

/* ==========================================================================
   6. Hero
   ========================================================================== */
.s5-hero {
  background:
    radial-gradient(1100px 520px at 18% 0%, #DCEBFB 0%, rgba(220,235,251,0) 62%),
    linear-gradient(180deg,#EEF6FE 0%,#F8FBFF 62%,#FFFFFF 100%);
  overflow:hidden;
}

.s5-hero-badge {
  display:inline-flex;
  align-items:center;
  gap:9px;
  background:#fff;
  border:1px solid var(--s5-blue-100);
  color:var(--s5-navy-700);
  font-weight:700;
  font-size:.87rem;
  padding:9px 18px;
  border-radius:var(--s5-pill);
  box-shadow:var(--s5-shadow-sm);
}
.s5-hero-badge svg { width:17px; height:17px; color:var(--s5-blue-500); }

.s5-hero-title,
.s5-hero .elementor-widget-heading.s5-hero-title .elementor-heading-title {
  font-size:clamp(2rem,5.2vw,3.65rem);
  font-weight:900;
  line-height:1.28;
  color:var(--s5-navy-600);
}

.s5-hero-lead { font-size:clamp(1rem,1.35vw,1.1rem); max-width:34em; color:var(--s5-body); }

.s5-hero-art svg, .s5-hero-art img { width:100%; height:auto; }

/* ==========================================================================
   7. Quick-links strip
   ========================================================================== */
.s5-quicklinks {
  background:#fff;
  border:1px solid var(--s5-line);
  border-radius:var(--s5-radius-lg);
  box-shadow:var(--s5-shadow);
  overflow:hidden;
}
.s5-quicklink {
  display:flex;
  align-items:center;
  gap:14px;
  padding:24px 22px;
  border-inline-start:1px solid var(--s5-line);
  transition:background-color .2s var(--s5-ease);
  height:100%;
}
.s5-quicklinks .elementor-column:first-child .s5-quicklink { border-inline-start:0; }
.s5-quicklink:hover { background:var(--s5-blue-50); }
.s5-quicklink__icon {
  width:48px; height:48px; flex:none;
  display:grid; place-items:center;
  border-radius:14px;
  background:var(--s5-blue-50);
  color:var(--s5-blue-600);
}
.s5-quicklink__icon svg { width:24px; height:24px; }
.s5-quicklink__title { display:block; font-weight:700; color:var(--s5-ink); font-size:1.02rem; }
.s5-quicklink__desc  { display:block; font-size:.82rem; color:var(--s5-muted); line-height:1.8; }

@media (max-width:767px) {
  .s5-quicklink { border-inline-start:0; border-top:1px solid var(--s5-line); }
}

/* ==========================================================================
   8. Section furniture
   ========================================================================== */
.s5-section--tint { background:var(--s5-canvas); }
.s5-section--sky  { background:linear-gradient(180deg,#F4F9FF 0%,#FFFFFF 100%); }

.s5-ornament {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:16px;
  color:var(--s5-blue-500);
}
.s5-ornament::before, .s5-ornament::after {
  content:'';
  height:2px; width:76px;
  border-radius:2px;
  background:linear-gradient(90deg,transparent,var(--s5-blue-100),var(--s5-blue-400));
}
.s5-ornament::after { background:linear-gradient(270deg,transparent,var(--s5-blue-100),var(--s5-blue-400)); }
.s5-ornament svg { width:30px; height:30px; }

/* ==========================================================================
   9. Service cards
   ========================================================================== */
.s5-card {
  position:relative;
  display:grid;
  grid-template-columns:150px 1fr;
  align-items:center;
  gap:18px;
  height:100%;
  background:#fff;
  border:1px solid var(--s5-line);
  border-radius:var(--s5-radius-lg);
  padding:22px;
  box-shadow:var(--s5-shadow-sm);
  transition:transform .25s var(--s5-ease), box-shadow .25s var(--s5-ease), border-color .25s var(--s5-ease);
}
.s5-card:hover { transform:translateY(-4px); box-shadow:var(--s5-shadow-lg); border-color:var(--s5-blue-100); }
.s5-card__art {
  border-radius:var(--s5-radius);
  background:linear-gradient(160deg,#EDF5FE,#F9FCFF);
  padding:12px;
  overflow:hidden;
}
.s5-card__art svg, .s5-card__art img { width:100%; height:auto; }
.s5-card__body { min-width:0; }
.s5-card__icon {
  width:46px; height:46px;
  display:grid; place-items:center;
  border-radius:14px;
  background:var(--s5-blue-50);
  color:var(--s5-blue-600);
  margin-inline-start:auto;
  margin-bottom:12px;
}
.s5-card__icon svg { width:23px; height:23px; }
.s5-card__title { font-size:1.18rem; color:var(--s5-navy-600); margin:0 0 6px; font-weight:800; }
.s5-card__title a { color:inherit; }
.s5-card:hover .s5-card__title a { color:var(--s5-blue-600); }
.s5-card__desc { font-size:.88rem; line-height:1.95; color:var(--s5-body); margin-bottom:14px; }
.s5-card__link {
  display:inline-flex; align-items:center; gap:7px;
  background:linear-gradient(135deg,var(--s5-navy-800),var(--s5-blue-600));
  color:#fff; font-size:.82rem; font-weight:700;
  padding:9px 18px; border-radius:var(--s5-pill);
}
.s5-card__link:hover { color:#fff; opacity:.92; }
.s5-card__link svg { width:14px; height:14px; }

@media (max-width:1100px) {
  .s5-card { grid-template-columns:1fr; }
  .s5-card__art { max-width:220px; }
  .s5-card__icon { margin-inline-start:0; }
}

/* ==========================================================================
   10. CTA
   ========================================================================== */
.s5-cta-band {
  display:flex; align-items:center; justify-content:space-between;
  gap:20px; flex-wrap:wrap;
  background:linear-gradient(90deg,var(--s5-blue-50),#F4F9FF);
  border:1px solid var(--s5-blue-100);
  border-radius:var(--s5-radius-lg);
  padding:22px 28px;
}
.s5-cta-band__text { display:flex; align-items:center; gap:14px; font-weight:700; color:var(--s5-navy-700); font-size:1.05rem; }
.s5-cta-band__text svg { width:30px; height:30px; color:var(--s5-blue-500); flex:none; }

.s5-cta-wide {
  position:relative; overflow:hidden;
  background:linear-gradient(120deg,var(--s5-navy-900),var(--s5-navy-700) 58%,var(--s5-blue-600));
  border-radius:clamp(20px,3vw,32px);
  color:#fff;
  padding:clamp(34px,5vw,64px);
  text-align:center;
}
.s5-cta-wide::after {
  content:''; position:absolute;
  inset-inline-end:-80px; bottom:-120px;
  width:380px; height:380px; border-radius:50%;
  background:rgba(255,255,255,.06);
}
.s5-cta-wide h2, .s5-cta-wide .elementor-heading-title { color:#fff; position:relative; }
.s5-cta-wide p { color:#C6DCF5; max-width:58ch; margin-inline:auto; position:relative; }

/* ==========================================================================
   11. Trust + stats
   ========================================================================== */
.s5-feature {
  background:#fff;
  border:1px solid var(--s5-line);
  border-radius:var(--s5-radius);
  padding:28px 24px;
  box-shadow:var(--s5-shadow-sm);
  height:100%;
}
.s5-feature__icon {
  width:52px; height:52px;
  display:grid; place-items:center;
  border-radius:16px;
  background:linear-gradient(140deg,var(--s5-blue-50),#fff);
  border:1px solid var(--s5-blue-100);
  color:var(--s5-blue-600);
  margin-bottom:16px;
}
.s5-feature__icon svg { width:26px; height:26px; }
.s5-feature h3 { font-size:1.06rem; margin:0 0 6px; }
.s5-feature p  { font-size:.88rem; margin:0; line-height:1.95; }

.s5-stat { text-align:center; padding:22px 12px; }
.s5-stat__num   { font-size:clamp(1.8rem,3.4vw,2.6rem); font-weight:900; color:var(--s5-blue-600); line-height:1.2; }
.s5-stat__label { font-size:.9rem; color:var(--s5-body); }

/* Elementor counter widget, restyled to match */
.s5-stats .elementor-counter-number-wrapper {
  font-family:'Vazirmatn',Tahoma,sans-serif;
  font-weight:900;
  color:var(--s5-blue-600);
}
.s5-stats .elementor-counter-title { font-size:.9rem; color:var(--s5-body); font-weight:500; }

/* ==========================================================================
   12. FAQ (Elementor accordion / toggle)
   ========================================================================== */
.s5-faq .elementor-accordion-item,
.s5-faq .elementor-toggle-item {
  background:#fff;
  border:1px solid var(--s5-line) !important;
  border-radius:var(--s5-radius);
  overflow:hidden;
  margin-bottom:12px;
  transition:border-color .2s var(--s5-ease), box-shadow .2s var(--s5-ease);
}
.s5-faq .elementor-tab-title {
  padding:18px 22px !important;
  font-weight:700;
  color:var(--s5-ink);
  font-size:1rem;
  border:0 !important;
}
.s5-faq .elementor-tab-title.elementor-active { color:var(--s5-blue-600); }
.s5-faq .elementor-active + .elementor-tab-content,
.s5-faq .elementor-tab-content {
  padding:0 22px 20px !important;
  font-size:.93rem;
  color:var(--s5-body);
  border:0 !important;
}
.s5-faq .elementor-accordion-icon { color:var(--s5-blue-500); }

/* Native <details> fallback if Pro accordion is unavailable */
.s5-faq__item {
  background:#fff;
  border:1px solid var(--s5-line);
  border-radius:var(--s5-radius);
  overflow:hidden;
  margin-bottom:12px;
}
.s5-faq__item[open] { border-color:var(--s5-blue-100); box-shadow:var(--s5-shadow-sm); }
.s5-faq__q {
  display:flex; align-items:center; justify-content:space-between; gap:14px;
  padding:18px 22px; font-weight:700; color:var(--s5-ink);
  cursor:pointer; list-style:none; font-size:1rem;
}
.s5-faq__q::-webkit-details-marker { display:none; }
.s5-faq__q::after {
  content:''; width:11px; height:11px; flex:none;
  /* Physical sides, not logical: under RTL the logical inline-end resolves to
     the left border and the rotated caret ends up pointing sideways. */
  border-right:2.5px solid var(--s5-blue-500);
  border-bottom:2.5px solid var(--s5-blue-500);
  transform:rotate(45deg);
  transition:transform .25s var(--s5-ease);
  margin-top:-4px;
}
.s5-faq__item[open] .s5-faq__q::after { transform:rotate(-135deg); margin-top:4px; }
.s5-faq__a { padding:0 22px 20px; font-size:.93rem; color:var(--s5-body); }
.s5-faq__a p:last-child { margin-bottom:0; }

/* ==========================================================================
   13. Contact
   ========================================================================== */
.s5-contact-item { display:flex; gap:14px; align-items:flex-start; margin-bottom:14px; }
.s5-contact-item__icon {
  width:44px; height:44px; flex:none;
  display:grid; place-items:center;
  border-radius:13px;
  background:var(--s5-blue-50);
  color:var(--s5-blue-600);
}
.s5-contact-item__icon svg { width:21px; height:21px; }
.s5-contact-item strong { display:block; color:var(--s5-ink); font-size:.95rem; }
.s5-contact-item span, .s5-contact-item a { font-size:.92rem; color:var(--s5-body); }

.s5-map { border-radius:var(--s5-radius-lg); overflow:hidden; border:1px solid var(--s5-line); }
.s5-map iframe { display:block; width:100%; min-height:320px; border:0; }

/* ==========================================================================
   14. Post cards (blog / related articles)
   ========================================================================== */
.s5-post-card {
  background:#fff;
  border:1px solid var(--s5-line);
  border-radius:var(--s5-radius-lg);
  overflow:hidden;
  box-shadow:var(--s5-shadow-sm);
  display:flex; flex-direction:column; height:100%;
  transition:transform .25s var(--s5-ease), box-shadow .25s var(--s5-ease);
}
.s5-post-card:hover { transform:translateY(-4px); box-shadow:var(--s5-shadow); }
.s5-post-card__thumb { aspect-ratio:16/9; overflow:hidden; background:var(--s5-blue-50); }
.s5-post-card__thumb img { width:100%; height:100%; object-fit:cover; }
.s5-post-card__body { padding:20px 22px 24px; flex:1; display:flex; flex-direction:column; }
.s5-post-card__meta { font-size:.78rem; color:var(--s5-muted); margin-bottom:8px; display:flex; gap:14px; flex-wrap:wrap; }
.s5-post-card__title { font-size:1.06rem; margin:0 0 8px; line-height:1.7; }
.s5-post-card__title a { color:var(--s5-navy-600); }
.s5-post-card__title a:hover { color:var(--s5-blue-600); }

/* ==========================================================================
   15. Floating call button (mobile)
   ========================================================================== */
.s5-float-call {
  position:fixed;
  inset-inline-start:18px;
  bottom:18px;
  z-index:90;
  width:56px; height:56px;
  border-radius:50%;
  display:none; place-items:center;
  background:linear-gradient(135deg,var(--s5-navy-800),var(--s5-blue-600));
  color:#fff;
  box-shadow:0 12px 30px rgba(15,98,180,.38);
}
.s5-float-call svg { width:25px; height:25px; }
.s5-float-call:hover { color:#fff; }
@media (max-width:768px) { .s5-float-call { display:grid; } }

/* ==========================================================================
   16. OceanWP chrome we replace with Elementor templates
   ========================================================================== */
.s5-hidden { display:none !important; }

/* ==========================================================================
   17. OceanWP / Elementor overrides
   ==========================================================================
   OceanWP applies its own heading colour, and Elementor resets margins on
   headings. Both fight the design system, so we reassert it here rather than
   setting colours per-widget — that keeps the palette in one file.
   ========================================================================== */
.s5-wide .elementor-heading-title,
.s5-wide h1, .s5-wide h2, .s5-wide h3, .s5-wide h4 { color: var(--s5-ink); }

.s5-wide .s5-hero-title .elementor-heading-title { color: var(--s5-navy-600); }
.s5-cta-wide .elementor-heading-title,
.s5-cta-wide h2 { color: #fff; }
.s5-cta-wide .elementor-widget-text-editor { color: #C6DCF5; }

/* Section headings need breathing room Elementor strips out */
.s5-wide .elementor-widget-heading { margin-bottom: 10px; }
.s5-wide .elementor-widget-text-editor { margin-bottom: 26px; }

/* The ornament ships its own wrapper, so centre it independently of
   whatever markup Elementor puts around the shortcode. */
.s5-ornament { margin: 0 auto 18px; }

/* OceanWP link colour would otherwise repaint card titles and buttons */
.s5-card__title a, .s5-post-card__title a { color: var(--s5-navy-600); }
.s5-card__link, .s5-btn--primary, .s5-btn--white { text-decoration: none; }
.s5-quicklink, .s5-card__link { text-decoration: none; }

/* ==========================================================================
   18. Site header — matches the approved mockups
   ==========================================================================
   Built in the child theme rather than as an Elementor header, so it works
   without Pro's Theme Builder and stays identical on every page.
   ========================================================================== */
.s5-topbar-bar {
  background: linear-gradient(90deg, var(--s5-navy-900) 0%, var(--s5-navy-800) 55%, var(--s5-navy-700) 100%);
  color: #C9DBF2;
  font-size: .85rem;
  line-height: 1.9;
}
.s5-topbar-bar a { color: #C9DBF2; text-decoration: none; }
.s5-topbar-bar a:hover { color: #fff; }
.s5-topbar-bar svg { width: 15px; height: 15px; opacity: .85; flex: none; }
.s5-topbar-bar .s5-social svg { width: 17px; height: 17px; opacity: 1; }

.s5-container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 20px; }

.s5-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.93);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--s5-line);
  transition: box-shadow .25s var(--s5-ease);
}
.s5-header.is-stuck { box-shadow: 0 8px 28px rgba(11,43,92,.09); }
.s5-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 78px;
}
.s5-brand { display: inline-flex; align-items: center; gap: 16px; }
.s5-brand__logo { height: 48px; width: auto; flex: none; }
.s5-brand__tagline {
  font-size: .84rem; color: var(--s5-body);
  padding-inline-end: 16px;
  border-inline-end: 1px solid var(--s5-line);
}
@media (max-width: 1080px) { .s5-brand__tagline { display: none; } }

.s5-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.s5-nav a {
  display: block; padding: 10px 15px;
  color: var(--s5-ink); font-weight: 600; font-size: .96rem;
  border-radius: var(--s5-radius-sm); text-decoration: none;
}
.s5-nav a:hover { color: var(--s5-blue-600); background: var(--s5-blue-50); }
.s5-nav .is-current > a { color: var(--s5-navy-800); }
.s5-nav .is-current > a::after {
  content: ''; display: block; height: 3px; width: 62%;
  margin: 6px auto 0; border-radius: 3px; background: var(--s5-blue-500);
}

.s5-header__cta { display: inline-flex; align-items: center; gap: 10px; }
.s5-nav-toggle {
  display: none; width: 46px; height: 46px;
  align-items: center; justify-content: center;
  border: 1px solid var(--s5-line); border-radius: 12px;
  background: #fff; cursor: pointer; color: var(--s5-navy-800);
}
.s5-nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 1024px) {
  .s5-nav-toggle { display: inline-flex; }
  .s5-header__cta > .s5-btn { display: none; }
  .s5-nav {
    position: fixed; inset: 0 0 0 auto; width: min(340px, 86vw);
    background: #fff; padding: 92px 20px 32px;
    box-shadow: -20px 0 60px rgba(11,43,92,.16);
    transform: translateX(100%);
    transition: transform .3s var(--s5-ease);
    overflow-y: auto; z-index: 101;
  }
  .s5-nav.is-open { transform: translateX(0); }
  .s5-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .s5-nav a { padding: 13px 14px; font-size: 1rem; }
  .s5-nav .is-current > a::after { margin-inline: 0; width: 34px; }
  .s5-nav-overlay {
    position: fixed; inset: 0; background: rgba(8,33,63,.45);
    opacity: 0; visibility: hidden; z-index: 99;
    transition: opacity .3s var(--s5-ease), visibility .3s;
  }
  .s5-nav-overlay.is-open { opacity: 1; visibility: visible; }
}

/* ==========================================================================
   19. Page hero (inner pages)
   ========================================================================== */
.s5-page-hero {
  background: linear-gradient(180deg, #EEF6FE, #FFFFFF);
  border-bottom: 1px solid var(--s5-line);
  padding: clamp(36px, 5vw, 64px) 0;
}
.s5-page-hero h1 { margin: 0 0 10px; color: var(--s5-navy-600); font-size: clamp(1.7rem,3.6vw,2.6rem); }
.s5-page-hero p { margin: 0; max-width: 62ch; }
.s5-breadcrumbs { font-size: .84rem; color: var(--s5-muted); margin-bottom: 14px; }
.s5-breadcrumbs a { color: var(--s5-body); text-decoration: none; }
.s5-breadcrumbs span + span::before { content: '/'; margin: 0 8px; color: var(--s5-line); }

/* ==========================================================================
   20. Article body + sidebar
   ========================================================================== */
.s5-content-grid {
  display: grid; grid-template-columns: minmax(0,1fr) 320px;
  gap: clamp(28px,4vw,52px); align-items: start;
}
@media (max-width: 980px) { .s5-content-grid { grid-template-columns: 1fr; } }

.s5-entry { max-width: 76ch; }
.s5-entry h2 { margin-top: 1.7em; }
.s5-entry img { border-radius: var(--s5-radius); margin: 22px 0; }
.s5-entry blockquote {
  margin: 24px 0; padding: 18px 24px;
  border-inline-start: 4px solid var(--s5-blue-500);
  background: var(--s5-blue-50);
  border-radius: 0 var(--s5-radius) var(--s5-radius) 0;
  color: var(--s5-navy-700); font-weight: 500;
}
.s5-entry table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: .92rem; }
.s5-entry th, .s5-entry td { border: 1px solid var(--s5-line); padding: 11px 14px; text-align: start; }
.s5-entry th { background: var(--s5-blue-50); color: var(--s5-navy-700); font-weight: 700; }

.s5-sidebar { position: sticky; top: 98px; display: grid; gap: 20px; }
.s5-widget {
  background: #fff; border: 1px solid var(--s5-line);
  border-radius: var(--s5-radius); padding: 22px; box-shadow: var(--s5-shadow-sm);
}
.s5-widget h3 { font-size: 1.02rem; margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--s5-line); }
.s5-widget ul { list-style: none; padding: 0; margin: 0; }
.s5-widget li { padding: 8px 0; border-bottom: 1px dashed var(--s5-line); font-size: .92rem; }
.s5-widget li:last-child { border-bottom: 0; }
.s5-widget a { color: var(--s5-body); text-decoration: none; }
.s5-widget a:hover { color: var(--s5-blue-600); }

.s5-sidebar-cta {
  background: linear-gradient(150deg, var(--s5-navy-800), var(--s5-blue-600));
  color: #fff; border-radius: var(--s5-radius); padding: 26px 22px; text-align: center;
}
.s5-sidebar-cta h3 { color: #fff; font-size: 1.08rem; margin: 0 0 8px; }
.s5-sidebar-cta p { color: #C6DCF5; font-size: .88rem; }

/* ==========================================================================
   21. Footer
   ========================================================================== */
.s5-site-footer {
  background: linear-gradient(180deg, var(--s5-navy-900), #061A33);
  color: #A9C2DE; padding-top: clamp(44px,6vw,72px); font-size: .92rem;
}
.s5-site-footer h4 { color: #fff; font-size: 1rem; margin: 0 0 16px; }
.s5-site-footer a { color: #A9C2DE; text-decoration: none; }
.s5-site-footer a:hover { color: #fff; }
.s5-site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.s5-footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: clamp(24px,3vw,42px); padding-bottom: 40px;
}
@media (max-width: 980px) { .s5-footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .s5-footer-grid { grid-template-columns: 1fr; } }
.s5-footer-social { display: flex; gap: 12px; margin-top: 18px; }
.s5-footer-social a {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 12px; background: rgba(255,255,255,.07);
  transition: background-color .2s var(--s5-ease), transform .2s var(--s5-ease);
}
.s5-footer-social a:hover { background: var(--s5-blue-600); transform: translateY(-2px); }
.s5-footer-social svg { width: 19px; height: 19px; }
.s5-footer-bottom {
  border-top: 1px solid rgba(255,255,255,.09);
  padding: 20px 0; display: flex; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; font-size: .85rem;
}

/* ==========================================================================
   22. Services index / pricing-style grids
   ========================================================================== */
.s5-grid-3 { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap: 22px; }
.s5-tile {
  background: #fff; border: 1px solid var(--s5-line);
  border-radius: var(--s5-radius-lg); padding: 26px 24px;
  box-shadow: var(--s5-shadow-sm); height: 100%;
  transition: transform .25s var(--s5-ease), box-shadow .25s var(--s5-ease), border-color .25s var(--s5-ease);
  display: flex; flex-direction: column;
}
.s5-tile:hover { transform: translateY(-4px); box-shadow: var(--s5-shadow-lg); border-color: var(--s5-blue-100); }
.s5-tile__icon {
  width: 52px; height: 52px; display: grid; place-items: center;
  border-radius: 16px; background: var(--s5-blue-50); color: var(--s5-blue-600);
  margin-bottom: 16px;
}
.s5-tile__icon svg { width: 26px; height: 26px; }
.s5-tile h3 { font-size: 1.1rem; margin: 0 0 8px; color: var(--s5-navy-600); }
.s5-tile p { font-size: .88rem; margin: 0 0 16px; flex: 1; }
.s5-tile a.s5-tile__more { font-size: .85rem; font-weight: 700; color: var(--s5-blue-600); text-decoration: none; }

.s5-checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.s5-checklist li { display: flex; gap: 12px; align-items: flex-start; font-size: .94rem; }
.s5-checklist svg { width: 20px; height: 20px; color: var(--s5-blue-600); flex: none; margin-top: 5px; }

.s5-step { display: flex; gap: 16px; align-items: flex-start; }
.s5-step__n {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center;
  border-radius: 12px; font-weight: 900;
  background: var(--s5-blue-50); color: var(--s5-blue-600);
}

/* Logo: real image with vector fallback.
   Explicit widths and flex:none — inside the flex header both the <img> and
   the fallback <svg> otherwise get shrunk to a few pixels. */
.s5-logo-wrap { display: inline-flex; align-items: center; flex: none; }
.s5-brand__logo { height: 50px; width: auto; max-width: 190px; flex: none; display: block; }
.s5-logo-fb { flex: none; line-height: 0; }
.s5-logo-fb { align-items: center; gap: 10px; }
.s5-logo-fb svg { flex: none; display: block; }
.s5-logo-fb__txt { display: flex; flex-direction: column; line-height: 1.25; }
.s5-logo-fb__txt b { font-size: 1.18rem; font-weight: 900; }
.s5-logo-fb__txt i { font-size: .66rem; font-style: normal; letter-spacing: .06em; font-weight: 500; }


/* ==========================================================================
   23. Deployment additions (from approved design components)
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: hidden; }

/* The sticky header must NOT use backdrop-filter: it would become the
   containing block for the position:fixed mobile drawer. */
.s5-header { background: #fff; backdrop-filter: none; }

/* Hero must sit above the following section so the quick-links strip,
   which hangs 38px below the hero, is not painted over. */
.s5-hero { position: relative; z-index: 2; overflow: visible; }

.s5-nav[aria-hidden="true"] { visibility: hidden; pointer-events: none; }
@media (max-width: 1024px) {
  .s5-nav { visibility: hidden; pointer-events: none; }
  .s5-nav.is-open { visibility: visible; pointer-events: auto; }
}

/* --- Motion: ambient loops + scroll parallax on the hero illustration --- */
@keyframes s5-card-float { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-8px) rotate(-1.2deg); } }
@keyframes s5-sway    { 0%,100% { transform: rotate(-1.6deg); } 50% { transform: rotate(1.6deg); } }
@keyframes s5-pulse   { 0%,100% { transform: scale(1); } 18% { transform: scale(1.09); } 36% { transform: scale(1); } 54% { transform: scale(1.05); } }
@keyframes s5-breathe { 0%,100% { opacity: .55; } 50% { opacity: 1; } }

.s5-card__art { animation: s5-card-float 4.4s ease-in-out infinite; }
.s5-card:nth-child(2n) .s5-card__art { animation-duration: 4.8s; animation-delay: .3s; }
.s5-card:nth-child(3n) .s5-card__art { animation-duration: 4.2s; animation-delay: .6s; }

.s5-hero-art [data-anim="glow"]     { animation: s5-breathe 7s ease-in-out infinite; }
.s5-hero-art [data-anim="canopy"]   { transform-origin: 310px 40px;  animation: s5-sway 6.5s ease-in-out infinite; }
.s5-hero-art [data-anim="heartbeat"]{ transform-origin: 56px 48px;   animation: s5-pulse 2.6s ease-in-out infinite; }
.s5-hero-art [data-anim="umbrella"] { transform-origin: 310px 130px; }
.s5-hero-art [data-anim="shield"]   { transform-origin: 310px 270px; }

/* --- Consultation form --- */
.s5-field { display: grid; gap: 6px; margin-bottom: 16px; }
.s5-field label { font-size: .9rem; font-weight: 600; color: var(--s5-ink); }
.s5-field input, .s5-field select, .s5-field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--s5-line);
  border-radius: var(--s5-radius-sm); font-size: .94rem; color: var(--s5-ink);
  background: #fff; line-height: 1.9;
}
.s5-field textarea { resize: vertical; min-height: 118px; }
.s5-field input:focus, .s5-field select:focus, .s5-field textarea:focus { border-color: var(--s5-blue-400); outline: none; }
.s5-field.has-error input, .s5-field.has-error select { border-color: #E08B84; }
.s5-field__error { font-size: .8rem; color: #C0392B; display: none; }
.s5-field.has-error .s5-field__error { display: block; }
.s5-form-success { display: none; gap: 14px; place-items: center; text-align: center; padding: 26px 8px; }
.s5-form-success.is-visible { display: grid; }
.s5-form-success__icon {
  width: 58px; height: 58px; display: grid; place-items: center;
  border-radius: 50%; background: var(--s5-blue-50); color: var(--s5-blue-600);
}
.s5-form.is-hidden { display: none; }
.s5-form-note { font-size: .8rem; color: var(--s5-muted); margin: 12px 0 0; text-align: center; }
