/* Giribaldi, P.C. — clean rebuild
   Palette and feel reverse-engineered from the original site:
   burgundy primary, teal secondary, Manrope sans, Bootstrap-style grid. */

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  color: #1a1a1a;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #1a1a1a; text-decoration: none; transition: color .15s ease; }
a:hover { color: #000000; text-decoration: underline; }
h1, h2, h3, h4 { font-weight: 800; line-height: 1.2; margin: 0 0 .6em; color: #1a1a1a; }
h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.25rem; margin: 0 0 1em; }
li { margin-bottom: .4em; }

:root {
  --primary: #1a1a1a;        /* near-black brand color */
  --primary-dark: #000000;
  --primary-deep: #050505;   /* deep black for dark-section gradients */
  --secondary: #7d2828;      /* burgundy accent — matches the logo */
  --secondary-dark: #5a1c1c;
  --bg-light: #f4f4f4;       /* neutral light grey */
  --bg-dark: #111111;        /* near-black for dark sections */
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --border: #e4e4e4;
  --shadow: 0 4px 14px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.08);
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
@media (max-width: 540px) {
  .section { padding: 44px 0; }
  .section-tight { padding: 28px 0; }
  .container { padding: 0 16px; }
}
.section-dark { background: var(--bg-dark); color: #fff; }
.section-dark h1, .section-dark h2, .section-dark h3 { color: #fff; }
.section-light { background: var(--bg-light); }
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 900px) and (min-width: 541px) {
  .grid-3, .grid-5 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .grid-2, .grid-3, .grid-5 { grid-template-columns: 1fr; }
  .grid-2.keep-2-mobile, .grid-3.keep-3-mobile { grid-template-columns: repeat(2,1fr); }
}

/* ---------- Header ---------- */
.topbar {
  background: var(--primary-deep);
  color: #fff;
  font-size: .85rem;
  padding: 8px 0;
}
.topbar .row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px 20px;
  flex-wrap: wrap;
}
.topbar a { color: #fff; }
.topbar a:hover { color: var(--secondary); text-decoration: none; }
.topbar .topbar-item { display: inline-flex; align-items: center; gap: 6px; }
.topbar .topbar-item + .topbar-item { margin-left: 18px; }
@media (max-width: 540px) {
  .topbar { font-size: .78rem; padding: 6px 0; text-align: center; }
  .topbar .row { justify-content: center; gap: 4px 12px; }
  .topbar .topbar-item + .topbar-item { margin-left: 0; }
  /* Stack blog cards (which use inline flex-direction:row) vertically */
  .card[style*="flex-direction: row"] { flex-direction: column !important; }
  .card[style*="flex-direction: row"] img { width: 100% !important; height: auto !important; max-height: 220px; object-fit: cover; }
}

header.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.site-header .inner {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0;
  gap: 20px;
}
.brand {
  font-weight: 800; font-size: 1.4rem; color: var(--primary);
  letter-spacing: -0.5px;
  display: flex; align-items: center; gap: 10px;
}
.brand:hover { text-decoration: none; color: var(--primary-dark); }
.brand-logo {
  height: 75px; width: auto; display: block;
}
@media (max-width: 540px) {
  .brand-logo { height: 60px; }
}

/* ---------- Navigation ---------- */
nav.primary-nav { position: relative; }
nav.primary-nav > ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; gap: 4px;
}
nav.primary-nav > ul > li { position: relative; }
nav.primary-nav > ul > li > a {
  display: block; padding: 12px 14px;
  color: var(--text); font-weight: 700; font-size: .95rem;
  text-decoration: none;
  border-radius: 6px;
}
nav.primary-nav > ul > li > a:hover,
nav.primary-nav > ul > li.has-dropdown:hover > a {
  background: var(--bg-light);
  color: var(--primary);
  text-decoration: none;
}
nav.primary-nav .dropdown {
  position: absolute; top: 100%; left: 0;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 16px;
  min-width: 280px;
  border-radius: 6px;
  list-style: none;
  margin: 0;
  display: none;
  z-index: 200;
}
nav.primary-nav .dropdown.megamenu {
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px 24px;
  min-width: 560px;
}
nav.primary-nav .has-dropdown:hover > .dropdown,
nav.primary-nav .has-dropdown:focus-within > .dropdown { display: block; }
nav.primary-nav .has-dropdown:hover > .dropdown.megamenu,
nav.primary-nav .has-dropdown:focus-within > .dropdown.megamenu { display: grid; }
nav.primary-nav .dropdown a {
  display: block;
  padding: 8px 10px;
  border-radius: 4px;
  color: var(--text);
  font-size: .9rem;
  font-weight: 500;
}
nav.primary-nav .dropdown a:hover {
  background: var(--bg-light);
  color: var(--primary);
  text-decoration: none;
}
nav.primary-nav .dropdown .group-title {
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  font-size: .75rem;
  letter-spacing: 1px;
  padding: 10px 10px 4px;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 10px 18px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
}
@media (max-width: 980px) {
  .nav-toggle { display: inline-block; }
  nav.primary-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff;
    border-top: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 12px 20px 18px;
  }
  nav.primary-nav.open { display: block; }
  nav.primary-nav > ul { flex-direction: column; gap: 0; }
  nav.primary-nav .dropdown,
  nav.primary-nav .dropdown.megamenu {
    position: static; display: block; box-shadow: none; border: none;
    padding-left: 16px; min-width: 0;
    grid-template-columns: 1fr;
  }
  nav.primary-nav .dropdown a,
  nav.primary-nav > ul > li > a { padding: 12px 14px; min-height: 44px; display: flex; align-items: center; }
  /* Hide group-title labels in mobile single-column megamenu — they made sense in 2-col desktop but interleave randomly in single-col flow */
  nav.primary-nav .dropdown.megamenu .group-title { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 24px;
  font-weight: 700;
  font-size: .95rem;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s ease;
  line-height: 1.2;
  text-align: center;
  min-height: 44px;
  min-width: 44px;
}
.btn-primary { background: #7d2828; color: #fff; border-color: #7d2828; }
.btn-primary:hover { background: #5a1c1c; border-color: #5a1c1c; color: #fff; text-decoration: none; }
.btn-outline { background: transparent; color: #7d2828; border-color: #7d2828; }
.btn-outline:hover { background: #7d2828; color: #fff; text-decoration: none; }
.btn-outline-light { background: transparent; color: #fff; border-color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--bg-dark); text-decoration: none; }
.btn-block { display: block; width: 100%; }
.btn-lg { padding: 14px 30px; font-size: 1rem; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
  color: #fff;
  padding: 70px 0 80px;
  position: relative;
  overflow: hidden;
}
@media (max-width: 540px) {
  .hero { padding: 48px 0 56px; }
  .hero p.lead { font-size: 1rem; }
  .page-header { padding: 40px 0 32px; }
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 25%, rgba(184,146,74,.22), transparent 55%);
  pointer-events: none;
}
.hero .container { position: relative; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 48px;
  align-items: center;
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero h1 { color: #fff; margin-bottom: 18px; }
.hero p.lead { font-size: 1.1rem; color: #d6dce0; max-width: 580px; }
.hero .cta-row { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }

.hero-form {
  background: #fff;
  color: var(--text);
  padding: 28px;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
}
.hero-form h3 { color: var(--primary); margin-bottom: 18px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: .8rem; font-weight: 700; margin-bottom: 4px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.form-control {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px;
  font-family: inherit; font-size: .95rem; background: #fff;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,26,26,.12); }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 540px) { .form-row { grid-template-columns: 1fr; } }
.form-disclaimer { font-size: .75rem; color: var(--muted); margin-top: 10px; line-height: 1.5; }

/* ---------- Trust badges ---------- */
.badges {
  background: var(--bg-light);
  padding: 30px 0;
  border-bottom: 1px solid var(--border);
}
.badges .row {
  display: flex; justify-content: space-around; align-items: center; flex-wrap: wrap; gap: 24px;
}
.badge-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-weight: 700; color: var(--primary); text-align: center;
  min-width: 120px;
}
.badge-item .badge-mark {
  width: 64px; height: 64px;
  background: var(--primary); color: var(--secondary);
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: .9rem; font-weight: 800;
  letter-spacing: .5px;
  border: 2px solid var(--secondary);
}
.badge-item .badge-label { font-size: .75rem; color: var(--muted); font-weight: 500; max-width: 130px; }
.badge-img { width: 115px; height: 115px; display: block; mix-blend-mode: multiply; }
@media (max-width: 540px) { .badge-img { width: 95px; height: 95px; } }

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card h3 { color: var(--primary); margin-bottom: 10px; }
.card p { color: var(--muted); flex: 1; }
.card .card-icon {
  width: 56px; height: 56px;
  background: var(--bg-light); color: var(--primary);
  display: grid; place-items: center;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 1.4rem; font-weight: 800;
}
.card .card-link {
  margin-top: 14px; font-weight: 700; color: var(--primary);
}
.card .card-link::after { content: ' →'; }

/* ---------- Image placeholders ---------- */
/* ---------- Testimonials ---------- */
.testimonials { background: var(--bg-dark); color: #fff; padding: 70px 0; }
.testimonials h2 { color: #fff; text-align: center; margin-bottom: 40px; }
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) and (min-width: 541px) { .testimonial-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .testimonial-grid { grid-template-columns: 1fr; } }
.testimonial {
  background: rgba(255,255,255,.07);
  border-radius: 10px;
  padding: 28px;
  border-left: 4px solid var(--secondary);
}
.testimonial p { color: #efe6de; font-style: italic; }
.testimonial .author { font-weight: 700; color: #fff; margin-top: 14px; font-style: normal; }
.testimonial .stars { color: var(--secondary); font-size: 1.1rem; margin-bottom: 12px; }

/* ---------- Page header (sub-pages) ---------- */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
  color: #fff;
  padding: 60px 0 50px;
  position: relative;
  overflow: hidden;
}
.page-header.has-bg-image::before {
  content: '';
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: .35;
  z-index: 0;
  background-image: var(--bg-image);
}
.page-header.has-bg-image::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(26,26,26,.85) 0%, rgba(5,5,5,.92) 100%);
  z-index: 1;
}
.page-header .container { position: relative; z-index: 2; }
.page-header h1 { color: #fff; margin-bottom: 8px; }
.page-header .breadcrumb { font-size: .85rem; color: #d8c9c9; }
.page-header .breadcrumb a { color: #e6cfcf; }
.page-header .breadcrumb a:hover { color: #fff; }

/* ---------- Article / page content ---------- */
.content-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  align-items: start;
}
@media (max-width: 900px) { .content-grid { grid-template-columns: 1fr; } }
.content-main h2 { margin-top: 1.5em; color: var(--primary); }
.content-main h3 { margin-top: 1.2em; color: var(--secondary-dark); }
.content-main a { color: var(--secondary-dark); text-decoration: underline; }
.content-main a:hover { color: var(--primary); }

.sidebar { position: sticky; top: 120px; }
.sidebar-card {
  background: var(--bg-light);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}
.sidebar-card h3 { color: var(--primary); font-size: 1.1rem; margin-bottom: 12px; }
.sidebar-card ul { list-style: none; padding: 0; margin: 0; }
.sidebar-card li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.sidebar-card li:last-child { border-bottom: none; }
.sidebar-card a { font-size: .9rem; }

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--primary-deep);
  color: #d8c9c9;
  padding: 60px 0 24px;
}
.site-footer a { color: #d8c9c9; }
.site-footer a:hover { color: var(--secondary); text-decoration: none; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; text-transform: uppercase; letter-spacing: 1px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 4px 0; font-size: .9rem; }
.footer-bottom {
  text-align: center;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: .85rem;
  color: #8a949b;
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }
.lead { font-size: 1.15rem; color: var(--muted); }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title .eyebrow { display: block; color: var(--primary); font-size: .85rem; font-weight: 800; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 8px; }

.alert {
  background: #fff8e1; border-left: 4px solid #d4a634; padding: 14px 18px; border-radius: 4px; margin: 20px 0; font-size: .92rem;
}

@media print {
  .topbar, header.site-header, footer.site-footer, .nav-toggle { display: none; }
}

/* ---------- Overrides: buttons + dark-section links ---------- */
.content-main a.btn { text-decoration: none; }
.content-main a.btn-primary,
.content-main a.btn-outline-light { color: #fff; }
.content-main a.btn-outline { color: #7d2828; }
.sidebar-card[style*="background: #1a1a1a"] a,
.sidebar-card[style*="background:#1a1a1a"] a,
.sidebar-card[style*="background: var(--primary)"] a { color: #fff !important; text-decoration: none; }
.sidebar-card[style*="background: #1a1a1a"] a:hover,
.sidebar-card[style*="background:#1a1a1a"] a:hover { color: #e6cfcf !important; text-decoration: underline; }
.alert[style*="background: #1a1a1a"] a.btn-outline-light { color: #fff; }