/* ─── Variables ─────────────────────────────────────────────────── */
:root {
  --primary:    #2a5f8d;
  --secondary:  #e2ebf4;
  --accent:     #2a8d8a;
  --dark:       #0d1330;
  --text:       #33475b;
  --text-muted: #7c98b6;
  --link:       #ea6223;
  --bg:         #ffffff;
  --card-bg:    #f2f7fc;

  --font-body:    'Rubik', 'Open Sans', sans-serif;
  --font-heading: 'DM Sans', sans-serif;

  --container: 1000px;
  --radius: 6px;
}

/* ─── Reset / Base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.4;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--link);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

img { display: block; max-width: 100%; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text);
  line-height: 1.3;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.375rem; }

/* ─── Utility ───────────────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ─── Header ────────────────────────────────────────────────────── */
.header-top {
  background: var(--secondary);
  padding: 0.4rem 0;
  font-size: 0.8125rem;
}

.header-top-nav {
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
}

.header-top-nav a {
  color: var(--text);
  font-weight: 500;
}
.header-top-nav a:hover { text-decoration: underline; }

.header-bottom {
  background: var(--bg);
  border-bottom: 1px solid #e5e5e5;
  padding: 1rem 0;
}

.header-bottom-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.logo-link { display: inline-flex; align-items: center; }

.header-main-nav {
  flex: 1;
  display: flex;
  gap: 1.5rem;
}

.header-main-nav a {
  color: var(--text);
  font-weight: 500;
}
.header-main-nav a:hover { text-decoration: underline; }

.btn-login {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border: 3px solid var(--accent);
  border-radius: 20px;
  background: var(--accent);
  color: #fff !important;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.btn-login:hover {
  background: transparent;
  color: var(--accent) !important;
  text-decoration: none;
}

/* ─── Hero / Search ─────────────────────────────────────────────── */
.hero {
  background-image: url('https://support.retrium.com/hubfs/1200X628-2.png');
  background-size: cover;
  background-position: center;
  padding: 6rem 1.5rem 4rem;
  text-align: center;
}

.hero h1 {
  font-family: var(--font-body);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0;
}

/* Search bar sits below the hero, results flow naturally down the page */
.search-wrapper {
  background: var(--bg);
  padding: 1.5rem 1.5rem 0;
  display: flex;
  justify-content: center;
}

#search-hero {
  width: 100%;
  max-width: 580px;
}

/* Pagefind UI overrides — make the search widget feel native */
#search-hero .pagefind-ui__search-input {
  border-radius: 24px;
  border: 2px solid #ccc;
  padding: 0.75rem 1.25rem 0.75rem 2.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
}
#search-hero .pagefind-ui__search-input:focus {
  outline: none;
  border-color: var(--primary);
}
#search-hero .pagefind-ui__search-clear {
  display: none;
}
#search-hero .pagefind-ui__results-container {
  text-align: left;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  margin-top: 0.5rem;
}

/* ─── Category Card Grid ─────────────────────────────────────────── */
.categories {
  padding: 3rem 0;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.category-card {
  background: var(--card-bg);
  border-left: 5px solid var(--primary);
  border-radius: var(--radius);
  padding: 1.5rem 1.125rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: box-shadow 0.15s;
}
.category-card:hover { box-shadow: 0 4px 16px rgba(42,95,141,0.12); }

.category-card h3 {
  font-size: 1.0625rem;
  color: var(--primary);
}
.category-card h3 a { color: inherit; }
.category-card h3 a:hover { text-decoration: underline; }

.category-card p {
  font-size: 0.875rem;
  color: var(--text);
  flex: 1;
}

.category-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.category-card ul li a {
  font-size: 0.8125rem;
  color: var(--primary);
}
.category-card ul li a:hover { text-decoration: underline; }

.category-card .see-more {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--link);
}

/* ─── Footer ────────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg);
  border-top: 1px solid #e5e5e5;
  padding: 1.5rem 0;
  font-size: 0.875rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.footer-nav a { color: var(--text); }
.footer-nav a:hover { text-decoration: underline; }

/* ─── Article Page ──────────────────────────────────────────────── */
.article-page {
  padding: 2rem 0 4rem;
}

.breadcrumb {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { text-decoration: underline; }

.article-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e5e5e5;
}
.article-header h1 { font-size: 1.75rem; margin-bottom: 0.5rem; }

.article-subtitle {
  font-size: 1.0625rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.article-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.article-body {
  max-width: 720px;
}

/* Article body content */
.article-body h2,
.article-body h3,
.article-body h4 {
  margin: 1.75rem 0 0.75rem;
}
.article-body p { margin: 0 0 1rem; }
.article-body ul,
.article-body ol {
  margin: 0 0 1rem 1.5rem;
}
.article-body li { margin-bottom: 0.35rem; }
.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 1rem 0;
}
.article-body a { color: var(--primary); }
.article-body a:hover { text-decoration: underline; }
.article-body hr {
  border: none;
  border-top: 1px solid #e5e5e5;
  margin: 2rem 0;
}
.article-body strong { color: var(--text); }

/* HubSpot callout boxes */
.callout {
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  font-size: 0.9375rem;
}
.callout-tip {
  background: #eef8f7;
  border-left: 4px solid var(--accent);
}
.callout-note {
  background: #eef4fb;
  border-left: 4px solid var(--primary);
}
.callout-warning {
  background: #fff8ed;
  border-left: 4px solid #f5a623;
}

/* ─── Category Page ─────────────────────────────────────────────── */
.category-page {
  padding: 2rem 0 4rem;
}
.category-page h1 {
  margin-bottom: 2rem;
}

.subcategory-section {
  margin-bottom: 2.5rem;
}

.subcategory-title {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e5e5;
}

.article-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.article-list__item {
  padding: 0.75rem 0;
  border-bottom: 1px solid #f0f0f0;
}
.article-list__item:last-child { border-bottom: none; }

.article-list__item a {
  font-weight: 500;
  color: var(--primary);
  font-size: 0.9375rem;
}
.article-list__item a:hover { text-decoration: underline; }

.article-list__item p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* ─── Contact Form ──────────────────────────────────────────────── */
.contact-page {
  padding: 2rem 0 4rem;
}
.contact-page h1 {
  margin-bottom: 2rem;
}

.contact-form {
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border: none;
  padding: 0;
  margin: 0;
}

.form-field label,
.form-field legend {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
}

.required { color: #e53e3e; }

.form-field input[type="text"],
.form-field input[type="email"],
.form-field textarea {
  border: 1px solid #ccc;
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: #fff;
  width: 100%;
  transition: border-color 0.15s;
}
.form-field input[type="text"]:focus,
.form-field input[type="email"]:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-field textarea { resize: vertical; }

.checkbox-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.25rem;
}
.checkbox-list label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-weight: 400;
  cursor: pointer;
}
.checkbox-list input[type="checkbox"] {
  margin-top: 0.2rem;
  flex-shrink: 0;
  accent-color: var(--primary);
  width: 1rem;
  height: 1rem;
}

.form-field input[type="file"] {
  font-family: var(--font-body);
  font-size: 0.9375rem;
}

.field-error {
  font-size: 0.8125rem;
  color: #e53e3e;
  min-height: 1rem;
}

.input--error {
  border-color: #e53e3e !important;
}

.form-success {
  max-width: 600px;
  text-align: center;
  padding: 3rem 2rem;
  border: 1px solid #e5e5e5;
  border-radius: var(--radius);
}
.form-success__icon {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.form-success h2 { margin-bottom: 0.5rem; }
.form-success p  { color: var(--text-muted); margin-bottom: 1rem; }
.form-success a  { color: var(--primary); font-weight: 500; }

.btn-submit {
  align-self: stretch;
  padding: 0.75rem;
  background: var(--secondary);
  color: var(--text);
  border: 1px solid #ccc;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn-submit:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ─── Responsive ────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .hero { padding: 3.5rem 1rem 2.5rem; }
  .hero h1 { font-size: 1.5rem; }
  .header-bottom-inner { flex-wrap: wrap; }
  .categories-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
