/*
 * STEM360 Professional Style — clean academic design layer.
 * Loaded by the "STEM360 Professional Style" plugin after the theme.
 * Deactivate the plugin to return to the previous look.
 */

:root {
  --s3-bg: #ffffff;
  --s3-surface: #f6f7f9;
  --s3-surface-2: #eef1f5;
  --s3-ink: #0f1f3a;
  --s3-text: #2b3648;
  --s3-muted: #5b6678;
  --s3-line: #e2e6ec;
  --s3-navy: #12284c;
  --s3-navy-2: #0b1b36;
  --s3-accent: #0f766e;
  --s3-accent-2: #0b5e57;
  --s3-accent-soft: #e7f3f1;
  --s3-radius: 10px;
  --s3-shadow: 0 1px 2px rgba(15, 31, 58, .04), 0 8px 24px rgba(15, 31, 58, .06);
  --s3-max: 1180px;
  --s3-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --s3-sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--s3-bg);
  color: var(--s3-text);
  font-family: var(--s3-sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--s3-accent); text-underline-offset: .18em; }
a:hover { color: var(--s3-accent-2); }
h1, h2, h3, h4 {
  font-family: var(--s3-serif);
  color: var(--s3-ink);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
}
::selection { background: var(--s3-accent-soft); color: var(--s3-ink); }
:focus-visible { outline: 2px solid var(--s3-accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(var(--s3-max), 100% - 48px); margin-inline: auto; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; z-index: 999; padding: 10px 14px; background: var(--s3-bg); color: var(--s3-ink); border: 1px solid var(--s3-line); border-radius: 6px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--s3-line);
}
.admin-bar .site-header { top: 32px; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.brand {
  font-family: var(--s3-serif);
  font-weight: 700; font-size: 1.55rem; letter-spacing: -.02em;
  color: var(--s3-navy); text-decoration: none;
}
.brand span { color: var(--s3-accent); }
.brand:hover { color: var(--s3-navy); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav ul a {
  display: block; padding: 8px 12px; border-radius: 6px;
  color: var(--s3-text); font-size: .95rem; font-weight: 500; text-decoration: none;
}
.nav ul a:hover { color: var(--s3-ink); background: var(--s3-surface); }
.nav .current-menu-item:not(.menu-item-home) > a { color: var(--s3-accent); }
.nav-toggle {
  display: none; cursor: pointer;
  padding: 8px 14px; border: 1px solid var(--s3-line); border-radius: 6px;
  background: var(--s3-bg); color: var(--s3-ink); font: 500 .95rem var(--s3-sans);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 8px;
  border: 1px solid var(--s3-navy); background: var(--s3-navy); color: #fff;
  font: 600 .95rem/1.2 var(--s3-sans); text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { background: var(--s3-navy-2); border-color: var(--s3-navy-2); color: #fff; }
.btn.ghost { background: transparent; color: var(--s3-navy); border-color: #c9d0db; }
.btn.ghost:hover { background: var(--s3-surface); border-color: var(--s3-navy); color: var(--s3-navy); }
.btn.ghost::after { content: "\2192"; transition: transform .15s ease; }
.btn.ghost:hover::after { transform: translateX(3px); }
.nav .btn { padding: 10px 18px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 96px 0 88px;
  background:
    radial-gradient(1200px 400px at 85% -10%, rgba(15, 118, 110, .07), transparent 60%),
    linear-gradient(180deg, #fbfcfd 0%, #ffffff 100%);
  border-bottom: 1px solid var(--s3-line);
}
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--s3-accent); font-size: .78rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.hero h1 {
  margin: 18px 0 20px;
  font-size: clamp(2.4rem, 4.6vw, 3.9rem);
  line-height: 1.06; letter-spacing: -.025em;
  max-width: 13ch;
}
.hero p.lead { margin: 0; max-width: 33em; font-size: 1.15rem; line-height: 1.7; color: var(--s3-muted); }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-media {
  position: relative; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--s3-line); background: var(--s3-surface);
  box-shadow: 0 24px 60px -24px rgba(15, 31, 58, .28);
}
.hero-media img { display: block; width: 100%; height: auto; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section.alt { background: var(--s3-surface); border-block: 1px solid var(--s3-line); padding: 64px 0; }
.section h2 { margin: 0 0 12px; font-size: clamp(1.8rem, 3vw, 2.5rem); }
.section .sub { margin: 0 0 48px; max-width: 40em; font-size: 1.08rem; color: var(--s3-muted); }
#topics > .wrap > h2::before {
  content: "Topics"; display: block; margin-bottom: 12px;
  font: 600 .78rem/1 var(--s3-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--s3-accent);
}

/* ---------- Topic grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 6px;
  padding: 28px 26px 26px; border: 1px solid var(--s3-line); border-radius: var(--s3-radius);
  background: var(--s3-bg); color: var(--s3-text); text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
a.card:hover { border-color: #b9c3d1; box-shadow: var(--s3-shadow); transform: translateY(-2px); color: var(--s3-text); }
a.card::after {
  content: "\2192"; position: absolute; top: 26px; right: 24px;
  color: #b2bccb; font-size: 1.1rem; transition: color .18s ease, transform .18s ease;
}
a.card:hover::after { color: var(--s3-accent); transform: translateX(3px); }
.card .icon {
  position: relative; display: inline-block; flex: none;
  width: 46px; height: 46px; margin-bottom: 14px;
  border-radius: 10px; background: var(--s3-accent-soft);
  font-size: 0; line-height: 0; color: transparent; overflow: hidden;
}
.card .icon img, .card .icon .emoji { display: none !important; }
.card .icon::before {
  content: ""; position: absolute; inset: 11px;
  background: var(--s3-accent);
  -webkit-mask: no-repeat center / contain; mask: no-repeat center / contain;
}
.card h3 { margin: 0; font-size: 1.22rem; color: var(--s3-ink); }
.card p { margin: 0; font-size: .95rem; line-height: 1.6; color: var(--s3-muted); }
.card.soon { opacity: .7; }
.badge {
  align-self: flex-start; margin-top: 8px; padding: 2px 10px; border-radius: 999px;
  border: 1px solid var(--s3-line); background: var(--s3-surface);
  color: var(--s3-muted); font-size: .72rem; font-weight: 600; letter-spacing: .02em;
}

.card[href*="/science/"] .icon::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 3h6'/%3E%3Cpath d='M10 3v6L4.5 18.5A1.5 1.5 0 0 0 5.8 21h12.4a1.5 1.5 0 0 0 1.3-2.5L14 9V3'/%3E%3Cpath d='M7 15h10'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 3h6'/%3E%3Cpath d='M10 3v6L4.5 18.5A1.5 1.5 0 0 0 5.8 21h12.4a1.5 1.5 0 0 0 1.3-2.5L14 9V3'/%3E%3Cpath d='M7 15h10'/%3E%3C/svg%3E"); }
.card[href*="/electronics/"] .icon::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='6' width='12' height='12' rx='2'/%3E%3Crect x='9.5' y='9.5' width='5' height='5'/%3E%3Cpath d='M9 2v4M15 2v4M9 18v4M15 18v4M2 9h4M2 15h4M18 9h4M18 15h4'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='6' width='12' height='12' rx='2'/%3E%3Crect x='9.5' y='9.5' width='5' height='5'/%3E%3Cpath d='M9 2v4M15 2v4M9 18v4M15 18v4M2 9h4M2 15h4M18 9h4M18 15h4'/%3E%3C/svg%3E"); }
.card[href*="/robotics/"] .icon::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='8' width='16' height='12' rx='3'/%3E%3Cpath d='M12 8V4'/%3E%3Ccircle cx='12' cy='3' r='1'/%3E%3Ccircle cx='9' cy='13' r='1.3'/%3E%3Ccircle cx='15' cy='13' r='1.3'/%3E%3Cpath d='M9.5 17h5M2 13v3M22 13v3'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='8' width='16' height='12' rx='3'/%3E%3Cpath d='M12 8V4'/%3E%3Ccircle cx='12' cy='3' r='1'/%3E%3Ccircle cx='9' cy='13' r='1.3'/%3E%3Ccircle cx='15' cy='13' r='1.3'/%3E%3Cpath d='M9.5 17h5M2 13v3M22 13v3'/%3E%3C/svg%3E"); }
.card[href*="/programming-languages/"] .icon::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m8 7-5 5 5 5'/%3E%3Cpath d='m16 7 5 5-5 5'/%3E%3Cpath d='m14 4-4 16'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m8 7-5 5 5 5'/%3E%3Cpath d='m16 7 5 5-5 5'/%3E%3Cpath d='m14 4-4 16'/%3E%3C/svg%3E"); }
.card[href*="/ai-prompts/"] .icon::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l1.8 4.7L18.5 9.5l-4.7 1.8L12 16l-1.8-4.7L5.5 9.5l4.7-1.8z'/%3E%3Cpath d='M19 15l.8 2.2L22 18l-2.2.8L19 21l-.8-2.2L16 18l2.2-.8z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l1.8 4.7L18.5 9.5l-4.7 1.8L12 16l-1.8-4.7L5.5 9.5l4.7-1.8z'/%3E%3Cpath d='M19 15l.8 2.2L22 18l-2.2.8L19 21l-.8-2.2L16 18l2.2-.8z'/%3E%3C/svg%3E"); }
.card[href*="/3d/"] .icon::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.5 21 7.5v9L12 21.5 3 16.5v-9z'/%3E%3Cpath d='M3 7.5 12 12.5 21 7.5'/%3E%3Cpath d='M12 12.5v9'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.5 21 7.5v9L12 21.5 3 16.5v-9z'/%3E%3Cpath d='M3 7.5 12 12.5 21 7.5'/%3E%3Cpath d='M12 12.5v9'/%3E%3C/svg%3E"); }
.card[href*="/stem-calculators/"] .icon::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='2.5' width='14' height='19' rx='2'/%3E%3Crect x='8' y='5.5' width='8' height='4' rx='1'/%3E%3Cpath d='M8.5 13h.01M12 13h.01M15.5 13h.01M8.5 16.5h.01M12 16.5h.01M15.5 16.5h.01'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='2.5' width='14' height='19' rx='2'/%3E%3Crect x='8' y='5.5' width='8' height='4' rx='1'/%3E%3Cpath d='M8.5 13h.01M12 13h.01M15.5 13h.01M8.5 16.5h.01M12 16.5h.01M15.5 16.5h.01'/%3E%3C/svg%3E"); }
.card[href*="/study-hub/"] .icon::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5.5A1.5 1.5 0 0 1 4.5 4H10a2 2 0 0 1 2 2v14a2 2 0 0 0-2-2H3z'/%3E%3Cpath d='M21 5.5A1.5 1.5 0 0 0 19.5 4H14a2 2 0 0 0-2 2v14a2 2 0 0 1 2-2h7z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5.5A1.5 1.5 0 0 1 4.5 4H10a2 2 0 0 1 2 2v14a2 2 0 0 0-2-2H3z'/%3E%3Cpath d='M21 5.5A1.5 1.5 0 0 0 19.5 4H14a2 2 0 0 0-2 2v14a2 2 0 0 1 2-2h7z'/%3E%3C/svg%3E"); }
.card[href*="/dataset/"] .icon::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='12' cy='5.5' rx='8' ry='3'/%3E%3Cpath d='M4 5.5v6c0 1.7 3.6 3 8 3s8-1.3 8-3v-6'/%3E%3Cpath d='M4 11.5v6c0 1.7 3.6 3 8 3s8-1.3 8-3v-6'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='12' cy='5.5' rx='8' ry='3'/%3E%3Cpath d='M4 5.5v6c0 1.7 3.6 3 8 3s8-1.3 8-3v-6'/%3E%3Cpath d='M4 11.5v6c0 1.7 3.6 3 8 3s8-1.3 8-3v-6'/%3E%3C/svg%3E"); }
.card[href*="/project-ideas/"] .icon::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 21.5h4'/%3E%3Cpath d='M12 2.5a6.5 6.5 0 0 0-4 11.6c.6.5 1 1.2 1 2V16h6v-.1c0-.7.4-1.4 1-1.9a6.5 6.5 0 0 0-4-11.5z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 21.5h4'/%3E%3Cpath d='M12 2.5a6.5 6.5 0 0 0-4 11.6c.6.5 1 1.2 1 2V16h6v-.1c0-.7.4-1.4 1-1.9a6.5 6.5 0 0 0-4-11.5z'/%3E%3C/svg%3E"); }
.card[href*="/stem-news/"] .icon::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='15' height='16' rx='2'/%3E%3Cpath d='M18 8h2a1 1 0 0 1 1 1v9a2 2 0 0 1-2 2H6'/%3E%3Cpath d='M7 8h7M7 12h7M7 16h4'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='15' height='16' rx='2'/%3E%3Cpath d='M18 8h2a1 1 0 0 1 1 1v9a2 2 0 0 1-2 2H6'/%3E%3Cpath d='M7 8h7M7 12h7M7 16h4'/%3E%3C/svg%3E"); }
.card[href*="/teachers-hub/"] .icon::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 9.5 12 4.5l10 5-10 5z'/%3E%3Cpath d='M6 11.5v4.5c0 1.7 2.7 3 6 3s6-1.3 6-3v-4.5'/%3E%3Cpath d='M22 9.5v5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 9.5 12 4.5l10 5-10 5z'/%3E%3Cpath d='M6 11.5v4.5c0 1.7 2.7 3 6 3s6-1.3 6-3v-4.5'/%3E%3Cpath d='M22 9.5v5'/%3E%3C/svg%3E"); }
.card[href*="/challenges/"] .icon::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 21h8M12 17v4'/%3E%3Cpath d='M7 4h10v5a5 5 0 0 1-10 0z'/%3E%3Cpath d='M7 6H4.5a2.5 2.5 0 0 0 2.6 4.5M17 6h2.5a2.5 2.5 0 0 1-2.6 4.5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 21h8M12 17v4'/%3E%3Cpath d='M7 4h10v5a5 5 0 0 1-10 0z'/%3E%3Cpath d='M7 6H4.5a2.5 2.5 0 0 0 2.6 4.5M17 6h2.5a2.5 2.5 0 0 1-2.6 4.5'/%3E%3C/svg%3E"); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); text-align: left; }
.stats > div { padding: 8px 32px; border-left: 1px solid var(--s3-line); }
.stats > div:first-child { border-left: 0; padding-left: 0; }
.stats strong {
  display: block; margin-bottom: 4px;
  font: 700 2.3rem/1.15 var(--s3-serif); color: var(--s3-navy); letter-spacing: -.02em;
}
.stats span { font-size: .95rem; color: var(--s3-muted); }

/* ---------- CTA band ---------- */
.band {
  position: relative; overflow: hidden;
  padding: 88px 0; text-align: center; color: #d6deea;
  background:
    radial-gradient(800px 300px at 50% 0%, rgba(20, 184, 166, .18), transparent 70%),
    var(--s3-navy);
}
.band h2 { margin: 0 0 12px; color: #fff; font-size: clamp(1.8rem, 3vw, 2.4rem); }
.band p { margin: 0 auto 32px; max-width: 34em; font-size: 1.08rem; opacity: 1; color: #c3cedd; }
.band .btn { background: #fff; border-color: #fff; color: var(--s3-navy); }
.band .btn:hover { background: var(--s3-accent-soft); border-color: var(--s3-accent-soft); color: var(--s3-navy-2); }

/* ---------- Content pages ---------- */
main > .wrap { padding-bottom: 32px; }
.page-content { max-width: 760px; margin: 0 auto; padding: 72px 0 96px; }
.page-content:has(.elementor) { max-width: none; padding-top: 40px; }
.page-content > h1:first-child {
  margin: 0 0 28px; padding-bottom: 28px; border-bottom: 1px solid var(--s3-line);
  font-size: clamp(2.2rem, 4vw, 3rem); letter-spacing: -.02em;
}
.page-content h2 { margin: 2.4em 0 .6em; font-size: 1.65rem; }
.page-content h3 { margin: 2em 0 .5em; font-size: 1.3rem; }
.page-content p, .page-content li { color: var(--s3-text); }
.page-content ul, .page-content ol { padding-left: 1.3em; }
.page-content li { margin: .35em 0; }
.page-content li::marker { color: var(--s3-accent); }
.page-content strong { color: var(--s3-ink); font-weight: 600; }
.page-content blockquote {
  margin: 2em 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--s3-accent);
  font: italic 1.15rem/1.6 var(--s3-serif); color: var(--s3-ink);
}
.page-content code { padding: .1em .35em; border-radius: 4px; background: var(--s3-surface-2); font-size: .9em; }
.page-content pre { overflow: auto; padding: 18px 20px; border-radius: 8px; background: var(--s3-navy-2); color: #e6edf7; font-size: .9rem; }
.page-content pre code { background: none; padding: 0; color: inherit; }
.page-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .95rem; }
.page-content th, .page-content td { padding: 10px 12px; border-bottom: 1px solid var(--s3-line); text-align: left; }
.page-content th { color: var(--s3-ink); font-weight: 600; background: var(--s3-surface); }
.page-content img { border-radius: 8px; }

/* Forms (Contact Form 7, WooCommerce, search) */
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="search"],
input[type="password"], input[type="number"], select, textarea {
  width: 100%; max-width: 100%; padding: 12px 14px;
  border: 1px solid #cfd6e0; border-radius: 8px; background: #fff;
  color: var(--s3-ink); font: 400 1rem/1.4 var(--s3-sans);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--s3-accent); box-shadow: 0 0 0 3px rgba(15, 118, 110, .15); }
.wpcf7 label { display: block; margin-bottom: 4px; font-weight: 500; color: var(--s3-ink); }
.wpcf7 p { margin: 0 0 18px; }
input[type="submit"], button[type="submit"], .wpcf7-submit,
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border: 1px solid var(--s3-navy); border-radius: 8px;
  background: var(--s3-navy); color: #fff; cursor: pointer;
  font: 600 .95rem/1.2 var(--s3-sans);
}
input[type="submit"]:hover, button[type="submit"]:hover, .wpcf7-submit:hover,
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover {
  background: var(--s3-navy-2); border-color: var(--s3-navy-2); color: #fff;
}

/* ---------- Footer ---------- */
.site-footer { padding: 72px 0 28px; background: var(--s3-navy-2); color: #aab6c8; font-size: .95rem; }
.site-footer a { color: #c9d3e1; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; }
.footer-grid h4 {
  margin: 0 0 16px; color: #fff;
  font: 600 .78rem/1 var(--s3-sans); letter-spacing: .14em; text-transform: uppercase;
}
.footer-grid > div:first-child h4 { font: 700 1.5rem/1 var(--s3-serif); letter-spacing: -.02em; text-transform: none; }
.footer-grid > div:first-child p { max-width: 26em; margin: 0; line-height: 1.7; }
.footer-grid ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.copyright {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: .88rem; color: #8492a8;
}

/* ---------- Hide leftover builder blocks the theme never shows ---------- */
.home .n2-section-smartslider { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero { padding: 64px 0; }
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { max-width: none; }
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .stats > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 12px;
    padding: 12px 24px 24px; background: #fff; border-bottom: 1px solid var(--s3-line);
    box-shadow: 0 12px 24px -12px rgba(15, 31, 58, .15);
  }
  .nav.open { display: flex; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav ul a { padding: 12px 4px; border-bottom: 1px solid var(--s3-line); border-radius: 0; }
  .nav .btn { margin-top: 8px; }
}
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 40px); }
  .section { padding: 64px 0; }
  .section .sub { margin-bottom: 32px; }
  .grid { grid-template-columns: 1fr; gap: 14px; }
  .card { padding: 22px; }
  .band { padding: 64px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .stats strong { font-size: 1.9rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
