/* ==========================================================================
   Astra Child - Custom Professional Header & Footer
   ========================================================================== */

/* --- CSS Variables --- */
:root {
  --primary: #1E3A5F;
  --primary-dark: #14263F;
  --primary-light: #F4F7FB;
  --accent: #10B981;
  --accent-hover: #0E9F6E;
  --dark: #14263F;
  --dark-secondary: #0F1E30;
  --text: #334155;
  --text-light: #64748b;
  --white: #ffffff;
  --border: #e2e8f0;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-sm: 4px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1280px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; }
/* Any non-visible overflow on an ancestor of the sticky header (even
   overflow:clip on body) makes that ancestor a "scroll container" and
   breaks position:sticky. Clip the 100vw-breakout widgets at #content
   instead, since #content is a sibling of <header>, not an ancestor. */
#content { overflow-x: clip; }
a { transition: var(--transition); }

/* Plus Jakarta Sans & Inter font stack */
body,
button,
input,
select,
textarea,
h1, h2, h3, h4, h5, h6,
.entry-content :where(h1, h2, h3, h4, h5, h6),
.site-title,
.site-title a {
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
}

/* ==========================================================================
   HEADER STYLES
   ========================================================================== */

/* Top Bar */
.header-top-bar {
  background: var(--dark);
  color: var(--white);
  font-size: 13px;
  padding: 8px 0;
  position: relative;
  z-index: 1001;
}
.header-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.header-top-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.header-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}
.header-contact-link:hover {
  color: var(--accent);
}
.header-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
}
.header-trust-item .contact-icon {
  color: var(--accent);
}
.contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.header-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--dark);
  font-weight: 700;
  text-decoration: none;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition);
  white-space: nowrap;
}
.header-cta-btn:hover {
  background: var(--accent-hover);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16,185,129,0.4);
}

/* Main Header Row */
.header-main-row {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: var(--transition);
}
/* Fixed / Sticky Header On Scroll */
#page {
  overflow: visible !important;
}

#masthead.ast-child-header,
.ast-child-header {
  position: sticky !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 99999 !important;
  background: #ffffff !important;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08) !important;
}

/* Remove white gap between sticky header and page content / hero */
#content,
.site-content,
.entry-content,
.isb-site-page,
#primary,
.ast-container,
.ast-plain-container,
.ast-page-builder-template .hentry,
.ast-article-single,
.ast-single-post {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.isb-new-hero,
.hub-hero,
.article-hero,
.company-page-hero {
  margin-top: 0 !important;
}

.header-main-row.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
  border-bottom-color: transparent;
}
.header-main-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 30px;
}
.site-logo {
  flex-shrink: 0;
}
.site-logo img {
  max-height: 50px;
  width: auto;
  display: block;
}
.site-logo .site-title {
  font-size: 24px;
  font-weight: 800;
  margin: 0;
  line-height: 1.2;
}
.site-logo .site-title a {
  color: var(--dark);
  text-decoration: none;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.site-logo .site-description {
  font-size: 12px;
  color: var(--text-light);
  margin: 0;
}

/* ==========================================================================
   Resource pages (Car Insurance Quotes / Insurance Types / States) —
   these pages' content has no styled wrapper of its own, so give the raw
   headings/paragraphs/lists/tables clean, consistent typography.
   ========================================================================== */
.page-id-180 .entry-content,
.page-id-233 .entry-content,
.page-id-245 .entry-content {
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 20px 72px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.75;
}
.page-id-180 .entry-content h1,
.page-id-233 .entry-content h1,
.page-id-245 .entry-content h1 {
  color: var(--dark);
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 20px;
}
.page-id-180 .entry-content h2,
.page-id-233 .entry-content h2,
.page-id-245 .entry-content h2 {
  color: var(--dark);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 44px 0 16px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.page-id-180 .entry-content h2:first-child,
.page-id-233 .entry-content h2:first-child,
.page-id-245 .entry-content h2:first-child {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}
.page-id-180 .entry-content h3,
.page-id-233 .entry-content h3,
.page-id-245 .entry-content h3 {
  color: var(--dark);
  font-size: 19px;
  font-weight: 700;
  margin: 28px 0 12px;
}
.page-id-180 .entry-content p,
.page-id-233 .entry-content p,
.page-id-245 .entry-content p {
  margin: 0 0 18px;
  color: var(--text);
}
.page-id-180 .entry-content ul,
.page-id-180 .entry-content ol,
.page-id-233 .entry-content ul,
.page-id-233 .entry-content ol,
.page-id-245 .entry-content ul,
.page-id-245 .entry-content ol {
  margin: 0 0 20px;
  padding-left: 22px;
}
.page-id-180 .entry-content li,
.page-id-233 .entry-content li,
.page-id-245 .entry-content li {
  margin-bottom: 8px;
}
.page-id-180 .entry-content strong,
.page-id-233 .entry-content strong,
.page-id-245 .entry-content strong {
  color: var(--dark);
}
.page-id-180 .entry-content a,
.page-id-233 .entry-content a,
.page-id-245 .entry-content a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.page-id-180 .entry-content table,
.page-id-233 .entry-content table,
.page-id-245 .entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 28px;
  font-size: 14.5px;
}
.page-id-180 .entry-content th,
.page-id-233 .entry-content th,
.page-id-245 .entry-content th {
  background: var(--primary);
  color: #fff;
  text-align: left;
  padding: 12px 14px;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.page-id-180 .entry-content td,
.page-id-233 .entry-content td,
.page-id-245 .entry-content td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.page-id-180 .entry-content tr:nth-child(even) td,
.page-id-233 .entry-content tr:nth-child(even) td,
.page-id-245 .entry-content tr:nth-child(even) td {
  background: var(--primary-light);
}
.page-id-180 .entry-content table,
.page-id-233 .entry-content table,
.page-id-245 .entry-content table {
  display: block;
  overflow-x: auto;
  white-space: nowrap;
}
@media (min-width: 700px) {
  .page-id-180 .entry-content table,
  .page-id-233 .entry-content table,
  .page-id-245 .entry-content table {
    white-space: normal;
  }
}
.page-id-180 .entry-content input[type="text"],
.page-id-233 .entry-content input[type="text"],
.page-id-245 .entry-content input[type="text"] {
  width: 100%;
  max-width: 420px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  margin-bottom: 20px;
  display: block;
}
/* Accordion +/- toggle icons in the raw article content have no size of
   their own, so with no wrapper CSS applied they stretch to the full
   content width (840px+). Constrain them and show only the state that
   matches the <details> element's open/closed state. */
.page-id-180 .entry-content details summary svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: currentColor;
  color: var(--text-light);
}
.page-id-180 .entry-content details summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.page-id-180 .entry-content details:not([open]) summary svg:first-of-type,
.page-id-180 .entry-content details[open] summary svg:last-of-type {
  display: none;
}

.page-id-180 .entry-content .pfa-item,
.page-id-233 .entry-content .pfa-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 12px;
  background: #fff;
}
.page-id-180 .entry-content .pfa-answer,
.page-id-233 .entry-content .pfa-answer {
  margin-top: 10px;
  color: var(--text-light);
}

/* RateGuard brand logo (shield icon + two-tone wordmark) */
.rg-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  line-height: 1;
}
.rg-logo-icon {
  flex-shrink: 0;
}
.rg-logo-text {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.footer-logo .rg-logo-text,
.isb-footer-logo-text.rg-logo-text {
  font-size: 22px;
}
.mobile-menu-header .rg-logo-icon {
  width: 28px;
  height: 28px;
}
.mobile-menu-header .rg-logo-text {
  font-size: 20px;
}

/* Desktop Navigation - Prevent link text from wrapping onto 2 lines */
.ast-child-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}
.astra-child-primary-menu,
#primary-menu {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2px;
}
.astra-child-primary-menu > li,
#primary-menu > li {
  position: relative;
  white-space: nowrap !important;
}
.astra-child-primary-menu > li > a,
#primary-menu > li > a,
.main-navigation a {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  position: relative;
  white-space: nowrap !important;
}
.astra-child-primary-menu > li > a::after,
#primary-menu > li > a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--transition);
}
.astra-child-primary-menu > li > a:hover,
.astra-child-primary-menu > li > a.active-link,
#primary-menu > li > a:hover {
  color: var(--primary);
}
.astra-child-primary-menu > li > a:hover::after,
.astra-child-primary-menu > li > a.active-link::after,
#primary-menu > li > a:hover::after {
  transform: scaleX(1);
}
.astra-child-primary-menu > li > a.has-submenu::before,
#primary-menu > li > a.has-submenu::before {
  content: '';
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  display: inline-block;
  padding: 3px;
  margin-left: 5px;
  transform: rotate(45deg);
  opacity: 0.5;
  transition: var(--transition);
}

/* Sub Menu */
.astra-child-sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  z-index: 1001;
  border: 1px solid var(--border);
}
.astra-child-sub-menu li a {
  display: block;
  padding: 10px 20px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}
.astra-child-sub-menu li a:hover {
  background: var(--primary-light);
  color: var(--primary);
  padding-left: 24px;
}
.astra-child-primary-menu > li:hover > .astra-child-sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Header Actions */
.header-actions {
  flex-shrink: 0;
}
.header-cta-desktop {
  background: linear-gradient(135deg, var(--accent), #0E9F6E);
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  box-shadow: 0 4px 15px rgba(16,185,129,0.3);
}
.header-cta-desktop:hover {
  box-shadow: 0 6px 20px rgba(16,185,129,0.45);
  transform: translateY(-2px);
}
@keyframes header-cta-shake { 0%,76%,100% { transform: translateX(0); } 80% { transform: translateX(-3px); } 86% { transform: translateX(3px); } 92% { transform: translateX(-2px); } 97% { transform: translateX(2px); } }
.header-cta-btn { animation: header-cta-shake 3s ease-in-out infinite; }
.header-cta-btn:hover { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .header-cta-btn { animation: none; }
}

/* Hamburger / Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.menu-toggle:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}
.hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: #0f172a;
  border-radius: 2px;
  transition: all 0.25s ease;
}
.menu-toggle.active {
  background: #0f172a;
  border-color: #0f172a;
}
.menu-toggle.active .hamburger-line {
  background: #ffffff;
}
.menu-toggle.active .hamburger-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active .hamburger-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}
.menu-toggle-text {
  display: none !important;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,14,39,0.6);
  backdrop-filter: blur(4px);
  z-index: 1998;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}
.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile Menu Panel */
.mobile-menu-panel {
  position: fixed;
  top: 0;
	right: -100vw;
	width: 100vw;
	max-width: 100vw;
  height: 100vh;
  background: var(--white);
  z-index: 1999;
  transition: right var(--transition);
  display: flex;
  flex-direction: column;
  box-shadow: -5px 0 30px rgba(0,0,0,0.15);
}
.mobile-menu-panel.active {
  right: 0;
}
.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--white);
}
.mobile-menu-header .site-logo img {
  max-height: 36px;
}
.mobile-menu-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}
.mobile-menu-close:hover {
  background: var(--border);
  color: var(--dark);
}
.mobile-menu-body {
	flex: 1;
	overflow-y: auto;
	padding: 0;
}
.mobile-menu-body .astra-child-primary-menu {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mobile-menu-body .astra-child-primary-menu > li > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
	padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
  font-weight: 600;
  color: var(--dark);
}

/* Full-width mobile menu: no side gap between the header and navigation. */
@media (max-width: 768px) {
	.mobile-menu-overlay { display: none; }
	.mobile-menu-panel { box-shadow: none; top: 70px; height: calc(100dvh - 70px); }
	.mobile-menu-header { display: none; }
	.mobile-menu-body .astra-child-primary-menu > li > a { padding-left: 24px; padding-right: 24px; }
	.mobile-menu-cta { margin: 0; padding: 24px; }
}
.mobile-menu-body .astra-child-primary-menu > li > a::after {
  display: none;
}
.mobile-menu-body .astra-child-primary-menu > li > a.has-submenu::before {
  display: none;
}
.mobile-menu-body .astra-child-sub-menu {
  position: static;
  opacity: 1;
  visibility: visible;
  transform: none;
  box-shadow: none;
  border: none;
  background: var(--primary-light);
  padding: 8px 0 8px 16px;
  margin: 0;
  display: none;
}
.mobile-menu-body .astra-child-primary-menu > li.menu-item-has-children.expanded > .astra-child-sub-menu {
  display: block;
}
.mobile-menu-body .astra-child-sub-menu li a {
  padding: 10px 16px;
  font-size: 14px;
  border-radius: var(--radius-sm);
}
.mobile-menu-cta {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mobile-cta-full {
  text-align: center;
  padding: 14px;
  font-size: 15px;
  border-radius: var(--radius);
}
.mobile-contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 0;
}

/* ==========================================================================
   FOOTER STYLES
   ========================================================================== */

.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.75);
  font-size: 14px;
  line-height: 1.7;
}
.footer-main {
  padding: 60px 0 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 60px;
}
.footer-col-title {
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 20px;
  position: relative;
  padding-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.footer-col-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}
.footer-logo {
  margin-bottom: 16px;
}
.footer-logo img {
  max-height: 40px;
  filter: brightness(0) invert(1);
}
.footer-logo .site-title a {
  color: var(--white);
  font-size: 22px;
  font-weight: 800;
}
.footer-about-text {
  color: rgba(255,255,255,0.65);
  margin-bottom: 20px;
  font-size: 14px;
}
.footer-social {
  display: flex;
  gap: 10px;
}
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,0.1);
}
.social-icon:hover {
  background: var(--accent);
  color: var(--dark);
  border-color: var(--accent);
  transform: translateY(-3px);
}
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links li a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.footer-links li a::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0);
  transition: var(--transition);
}
.footer-links li a:hover {
  color: var(--accent);
  padding-left: 4px;
}
.footer-links li a:hover::before {
  opacity: 1;
  transform: scale(1);
}
.footer-contact-info {
  margin-top: 20px;
}
.footer-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
}
.footer-contact-list .contact-icon {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--accent);
}
.footer-contact-list a {
  color: var(--white);
  text-decoration: none;
}
.footer-contact-list a:hover {
  color: var(--accent);
}

/* Footer Columns */
.footer-col-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.footer-col-right {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.footer-menu-placeholder {
  opacity: 0.5;
}

/* Footer Bottom */
.footer-bottom {
  background: var(--dark-secondary);
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.copyright-text {
  margin: 0;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}
.copyright-text a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-weight: 600;
}
.copyright-text a:hover {
  color: var(--accent);
}
.footer-bottom-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-bottom-links a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 13px;
  transition: var(--transition);
}
.footer-bottom-links a:hover {
  color: var(--accent);
}

/* ==========================================================================
   RESPONSIVE - TABLET & MOBILE FIXED ATTACHED HEADER
   ========================================================================== */
@media (max-width: 1024px) {
  #masthead,
  .site-header,
  .ast-child-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 999999 !important;
    background: #ffffff !important;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08) !important;
  }

  body {
    padding-top: 0 !important;
  }

  #content,
  .site-content,
  .entry-content,
  .isb-site-page,
  #primary {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  .header-main-row {
    background: #ffffff !important;
  }

  .header-main-inner {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 8px 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .site-logo {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
  }

  .rg-logo-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    text-decoration: none !important;
    cursor: pointer !important;
  }

  .ast-child-nav {
    margin-left: auto !important;
    display: flex !important;
    align-items: center !important;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
  .header-cta-desktop {
    display: none !important;
  }
}

/* ==========================================================================
   RESPONSIVE - MOBILE
   ========================================================================== */
@media (max-width: 768px) {
  /* Header Top Bar - hide on small mobile, keep essential */
  .header-top-bar {
    display: none;
  }

  /* Hide hamburger text on mobile */
  .menu-toggle-text {
    display: none !important;
  }

  /* Show hamburger button cleanly on the right */
  .menu-toggle {
    display: inline-flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 4px !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
    margin-left: auto !important;
  }

  /* Hide desktop nav */
  .ast-child-nav .astra-child-primary-menu {
    display: none;
  }

  /* Hide desktop CTA */
  .header-actions {
    display: none;
  }

  /* Logo center on mobile */
  .header-main-inner {
    justify-content: center;
    position: relative;
    padding: 10px 0;
  }
  .site-logo {
    order: 1;
  }
  .ast-child-nav {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
  }

  /* Footer mobile */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .footer-main {
    padding: 40px 0 30px;
  }
  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
  }
  .footer-bottom-links {
    justify-content: center;
  }
}

/* ==========================================================================
   RESPONSIVE - SMALL MOBILE
   ========================================================================== */
@media (max-width: 480px) {
  .site-logo img {
    max-height: 38px;
  }
  .header-cta-btn {
    padding: 6px 14px;
    font-size: 12px;
  }
  .footer-main {
    padding: 30px 0 20px;
  }
  .footer-col-title {
    font-size: 14px;
  }
}

/* ==========================================================================
   ANIMATIONS & UTILITIES
   ========================================================================== */
/* Note: no fade/slide animation on .ast-child-header — any transform on an
   ancestor of the sticky header row breaks position:sticky entirely. */

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Selection */
::selection {
  background: var(--primary-light);
  color: var(--primary);
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   ASTRA OVERRIDES (minimal to avoid conflicts)
   ========================================================================== */
.site-header.ast-child-header .ast-container {
  max-width: var(--max-width);
}

/* Ensure content sits below sticky header */
#content {
  position: relative;
  z-index: 1;
}

/* Fix Astra footer conflicts */
.site-footer.ast-child-footer {
  position: relative;
  z-index: 1;
}

/* Ensure footer bottom links wrap nicely */
.footer-bottom-links a + a::before {
  content: none;
}

/* Fix Astra menu animation conflicts */
.main-navigation ul ul {
  display: block;
}

/* Accessibility - screen reader only */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  -webkit-clip-path: inset(50%);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

/* Skip link focus */
.screen-reader-text:focus {
  background-color: #f1f1f1;
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  -webkit-clip-path: none;
  clip-path: none;
  color: #21759b;
  display: block;
  font-size: 14px;
  font-weight: 700;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* Footer Quote Form V3 */
.footer-quote-form {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 0;
}

.footer-quote-form-inner {
  margin: auto;
  max-width: 1180px;
  padding: 36px 20px;
  width: min(1180px, calc(100% - 40px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.footer-quote-form-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-quote-form-text strong {
  color: #0f172a;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.footer-quote-form-text span {
  color: #475569;
  font-size: 14px;
}

.footer-quote-form-widget {
  flex: 1 1 auto;
  max-width: 520px;
}

.footer-quote-form-widget .iq-widget--v3 {
  margin: 0;
  box-shadow: none;
  border: 0;
  padding: 0;
  background: transparent;
}

.footer-quote-form-widget .iq-widget--v3::before,
.footer-quote-form-widget .iq-widget--v3::after {
  display: none;
}

.footer-quote-form-widget .iq-widget--v3 .iq-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-quote-form-widget .iq-widget--v3 .iq-input-wrapper {
  width: 100%;
  margin: 0;
}

.footer-quote-form-widget .iq-widget--v3 .iq-zip-input {
  height: 48px;
}

.footer-quote-form-widget .iq-widget--v3 .iq-submit-btn {
  height: 48px;
  width: 100%;
  flex: 1 1 auto;
}

@media (max-width: 768px) {
  .footer-quote-form-inner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 20px;
  }

  .footer-quote-form-text {
    align-items: center;
  }

  .footer-quote-form-widget {
    max-width: 100%;
  }
}

/* ============================================================
   MOBILE RESPONSIVE OVERFLOW & TOGGLE MENU FIXES
   ============================================================ */
@media (max-width: 1024px) {
  /* Hide desktop horizontal menu list */
  .ast-child-nav .astra-child-primary-menu,
  .ast-child-nav #primary-menu,
  .header-actions .header-cta-desktop {
    display: none !important;
  }

  /* Show mobile menu toggle hamburger button */
  .ast-child-nav .menu-toggle {
    display: flex !important;
  }

  /* Prevent page body from overflowing horizontally */
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
  }
}

/* Mobile Slide-Over Menu Panel Styling */
.mobile-menu-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 85%;
  max-width: 360px;
  height: 100vh;
  background: #ffffff;
  z-index: 999999;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.25);
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.mobile-menu-panel.active {
  right: 0 !important;
}

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 25, 47, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1 !important;
  visibility: visible !important;
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}

.mobile-menu-close {
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #1e293b;
  transition: all 0.2s ease;
}

.mobile-menu-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.mobile-menu-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0;
}

.mobile-menu-body ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-menu-body li a {
  display: flex;
  align-items: center;
  padding: 14px 24px;
  color: #0f172a;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid #f1f5f9;
  transition: all 0.2s ease;
}

.mobile-menu-body li a:hover {
  background: #F4F7FB;
  color: #0066FF;
  padding-left: 28px;
}

.mobile-menu-cta {
  padding: 24px;
  margin-top: auto;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-cta-full {
  text-align: center;
  padding: 14px;
  font-size: 15px;
  font-weight: 800;
  background: linear-gradient(135deg, #00C853 0%, #009624 100%);
  color: #ffffff !important;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 200, 83, 0.35);
}

/* ---------- AdSense Non-Intrusive Ad Space ---------- */
.adsense-slot-container {
  margin: 28px 0;
  padding: 12px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  text-align: center;
  clear: both;
}

.adsense-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #94a3b8;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.adsense-placeholder-box {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 6px;
  border: 1px dashed #e2e8f0;
}

.adsense-placeholder-text {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.adsense-slot-sidebar {
  margin: 20px 0;
}

.adsense-slot-sidebar .adsense-placeholder-box {
  min-height: 250px;
}

/* ---------- Mobile Insurer Partner Logos Styling ---------- */
@media (max-width: 768px) {
  .insurance-logos-section {
    padding: 20px 16px !important;
  }

  .isb-logos-title {
    font-size: 11px !important;
    letter-spacing: 0.08em !important;
    margin-bottom: 14px !important;
  }

  .insurance-logos {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px 20px !important;
    width: 100% !important;
  }

  .insurance-logo {
    height: 26px !important;
    max-width: 90px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .insurance-logo img {
    max-height: 24px !important;
    max-width: 90px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
  }
}

/* ---------- Global Responsive Mobile Typography Refinements ---------- */
@media (max-width: 640px) {
  .entry-content h1,
  .article-prose h1,
  .company-page-card h1 {
    font-size: clamp(20px, 5.5vw, 24px) !important;
    line-height: 1.25 !important;
    letter-spacing: -0.02em !important;
    margin-bottom: 12px !important;
  }

  .entry-content h2,
  .article-prose h2,
  .company-page-card h2 {
    font-size: clamp(17px, 4.5vw, 20px) !important;
    line-height: 1.3 !important;
    margin-top: 20px !important;
    margin-bottom: 10px !important;
  }

  .entry-content h3,
  .article-prose h3,
  .company-page-card h3 {
    font-size: clamp(15px, 4vw, 17px) !important;
    line-height: 1.35 !important;
  }

  .entry-content p,
  .article-prose p,
  .company-page-card p {
    font-size: 15px !important;
    line-height: 1.6 !important;
  }
}



