/* =========================================================
   Foley Agency Inc. - Base Styles
   Simple, modern, responsive brochure site
   ========================================================= */

/* CSS variables for easy theme adjustments */
:root {
  --color-primary: #2f5e86;
  --color-primary-dark: #24496a;
  --color-accent: #f2a900;
  --color-bg: #ffffff;
  --color-bg-alt: #f6f7f9;
  --color-text: #333333;
  --color-text-muted: #666666;
  --color-border: #dde1e7;

  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --font-heading: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;

  --shadow-soft: 0 8px 20px rgba(0, 0, 0, 0.04);

  /* Wider layout so header/nav fits without horizontal scrolling. */
  --max-width: 1400px;
}

/* Reset-like basics */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Utility: screen-reader-only text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  margin-top: 0;
  color: #111827;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

ul,
ol {
  margin-top: 0;
  margin-bottom: 1.25rem;
  padding-left: 1.25rem;
}

/* Layout container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  /* Default page gutters (keep content off the edges). */
  padding: 0 1.4rem;
}

/* Header gets even tighter gutters to fit the full nav. */
.site-header .container {
  /* Let the header go full-width and minimize edge gutters. */
  max-width: none;
  padding: 0 0.1rem;
}

/* =========================================================
   Header & Navigation
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Container already provides horizontal padding. */
  padding: 0.5rem 0;
}

.logo {
  /* Make the entire logo area an easy click target back home. */
  align-self: stretch;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.25rem;
  padding: 0.25rem 0.35rem;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
}

.logo:hover,
.logo:focus-visible {
  text-decoration: none;
  background-color: var(--color-bg-alt);
}

.logo * {
  user-select: none;
}

.logo-img {
  height: 70px;
  width: auto;
}

.logo-title {
  font-weight: 700;
  letter-spacing: 0.03em;
}

.logo-tagline {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.main-nav {
  display: none;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: flex-start;
}

.main-nav a {
  display: block;
  padding: 0.4rem 0.5rem;
  font-size: 0.9rem;
  border-radius: 999px;
  color: var(--color-text-muted);
  /* Keep nav pills uniform height (prevents multi-line wrapping). */
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  /* Match the active pill color on hover/focus. */
  background-color: var(--color-primary);
  text-decoration: none;
  color: #ffffff;
}

.main-nav a.active {
  background-color: var(--color-primary);
  color: #ffffff;
}

/* Mobile menu toggle (hamburger) */
.menu-toggle {
  position: relative;
  width: 40px;
  height: 32px;
  border: none;
  background: transparent;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.menu-icon-bar {
  height: 2px;
  width: 100%;
  border-radius: 999px;
  background-color: #111827;
  transition: transform 0.18s ease, opacity 0.18s ease, top 0.18s ease,
    bottom 0.18s ease;
}

/* Open state controlled via JavaScript by toggling .nav-open on body */
body.nav-open .main-nav {
  display: block;
}

body.nav-open .menu-icon-bar:nth-child(1) {
  transform: translateY(3.5px) rotate(45deg);
}

body.nav-open .menu-icon-bar:nth-child(2) {
  opacity: 0;
}

body.nav-open .menu-icon-bar:nth-child(3) {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* =========================================================
   Hero (Home page)
   ========================================================= */

.hero {
  background: linear-gradient(
      135deg,
      rgba(47, 94, 134, 0.12),
      rgba(242, 169, 0, 0.08)
    ),
    #ffffff;
  padding: 3.5rem 0 2.5rem;
}

.hero--with-image {
  /* The HTML sets --hero-image to something like: url("assets/home-hero.jpg") */
  background-image: linear-gradient(
      135deg,
      rgba(17, 24, 39, 0.75),
      rgba(47, 94, 134, 0.45)
    ),
    var(--hero-image);
  background-size: cover;
  background-position: center;
  color: #ffffff;
}

.hero--with-image h1,
.hero--with-image p {
  color: #ffffff;
}

.hero--with-image .hero-kicker {
  color: rgba(255, 255, 255, 0.85);
}

.hero--with-image .btn-outline {
  border-color: rgba(255, 255, 255, 0.85);
  color: #ffffff;
}

.hero--with-image .btn-outline:hover,
.hero--with-image .btn-outline:focus-visible {
  background-color: rgba(255, 255, 255, 0.12);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.hero-text {
  position: relative;
}

.hero-badge {
  width: min(220px, 60%);
  height: auto;
  margin: 1rem 0 0.75rem;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.25));
}

.hero-kicker {
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: 1.9rem;
  margin-bottom: 1rem;
}

.hero p {
  max-width: 40rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

/* =========================================================
   Feature cards (Home page)
   ========================================================= */

.feature-cards {
  padding: 2.5rem 0;
}

.section-intro {
  max-width: 36rem;
  color: var(--color-text-muted);
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.card {
  background-color: #ffffff;
  border-radius: var(--radius-md);
  padding: 1.5rem 1.5rem 1.25rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card p {
  margin-bottom: 1rem;
  color: var(--color-text-muted);
}

/* =========================================================
   Carrier Partners (logo grid)
   ========================================================= */

.carrier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.carrier-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1rem;
  min-height: 84px;
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.carrier-card[data-tooltip]::before,
.carrier-card[data-tooltip]::after {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.carrier-card[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translate(-50%, 4px);
  background: rgba(17, 24, 39, 0.96);
  color: #ffffff;
  font-size: 0.75rem;
  line-height: 1.1;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
  z-index: 2;
}

.carrier-card[data-tooltip]::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translate(-50%, 4px);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid rgba(17, 24, 39, 0.96);
  z-index: 2;
}

.carrier-card[data-tooltip]:hover::before,
.carrier-card[data-tooltip]:hover::after,
.carrier-card[data-tooltip]:focus-visible::before,
.carrier-card[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.carrier-card:hover,
.carrier-card:focus-visible {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: rgba(47, 94, 134, 0.35);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
}

.carrier-card img {
  max-width: 160px;
  max-height: 54px;
  width: auto;
  height: auto;
}

.carrier-logo--wide {
  max-width: 220px;
  max-height: 56px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.carrier-logo--icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

/* Simple three-column section on home */
.three-column {
  background-color: var(--color-bg-alt);
  padding: 2.75rem 0 3rem;
}

.three-column-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

.three-column-grid article p {
  color: var(--color-text-muted);
}

/* =========================================================
   Page-level sections
   ========================================================= */

.page-hero {
  background-color: var(--color-bg-alt);
  padding: 2.5rem 0;
}

.page-hero--with-image {
  background-image: linear-gradient(
      135deg,
      rgba(17, 24, 39, 0.72),
      rgba(47, 94, 134, 0.42)
    ),
    var(--hero-image);
  background-size: cover;
  background-position: center;
  color: #ffffff;
}

.page-hero--with-image h1,
.page-hero--with-image p {
  color: #ffffff;
}

.page-hero--with-image .page-intro {
  color: rgba(255, 255, 255, 0.88);
}

.page-hero h1 {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
}

.page-intro {
  max-width: 40rem;
  color: var(--color-text-muted);
}

.content-section {
  padding: 2.5rem 0 3rem;
}

.two-column-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr);
  gap: 2.5rem;
}

.two-column-layout aside {
  background-color: #ffffff;
  border-radius: var(--radius-md);
  padding: 1.5rem 1.5rem 1.25rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
}

.callout {
  margin-top: 1.5rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background-color: var(--color-bg-alt);
}

.callout h3 {
  margin-bottom: 0.4rem;
}

.numbered-list {
  padding-left: 1.5rem;
}

.numbered-list li {
  margin-bottom: 0.75rem;
}

/* =========================================================
   Forms (Contact & Claims)
   ========================================================= */

.form {
  display: grid;
  gap: 0.9rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-label,
.form-row > label,
.form-row > .form-label {
  font-size: 0.9rem;
  font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
  font: inherit;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background-color: #ffffff;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

.form-options-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.form-options-inline label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.form-note {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.form-status {
  display: none;
  margin: 0 0 1rem;
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background-color: var(--color-bg-alt);
  color: var(--color-text);
}

.form-status.is-visible {
  display: block;
}

.form-status.is-success {
  border-color: rgba(34, 197, 94, 0.45);
  background-color: rgba(34, 197, 94, 0.08);
}

.form-status.is-error {
  border-color: rgba(220, 38, 38, 0.45);
  background-color: rgba(220, 38, 38, 0.06);
}

.block-btn {
  display: inline-block;
  width: 100%;
  text-align: center;
}

/* =========================================================
   Buttons
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease,
    border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
  box-shadow: 0 10px 20px rgba(47, 94, 134, 0.22);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  text-decoration: none;
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--color-primary);
  border-color: var(--color-border);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background-color: var(--color-bg-alt);
  text-decoration: none;
}

.btn-outline {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background-color: rgba(47, 94, 134, 0.06);
  text-decoration: none;
}

button.btn {
  border-style: solid;
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  border-top: 1px solid var(--color-border);
  background-color: #f9fafb;
  padding: 1.75rem 0;
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-contact p {
  margin: 0 0 0.25rem;
}

.footer-meta {
  color: var(--color-text-muted);
}

.footer-logos {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.footer-logo {
  height: 44px;
  width: auto;
}

.footer-logo--trusted-choice {
  height: 44px;
}

.footer-copyright {
  margin: 0;
}

/* =========================================================
   Responsive Layout
   ========================================================= */

@media (min-width: 720px) {
  .header-inner {
    padding-inline: 0;
  }

  .main-nav {
    display: block;
    /* If the nav gets tight, scroll instead of wrapping unevenly. */
    overflow-x: auto;
    /* Add extra end padding so the last pill isn't visually clipped. */
    padding-right: 0.75rem;
    scrollbar-width: none; /* Firefox */
  }

  .main-nav::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
  }

  .main-nav ul {
    flex-direction: row;
    gap: 0.05rem;
    align-items: center;
    /* Creates breathing room after the last item in the scroll area. */
    padding-right: 0.75rem;
  }

  .main-nav a {
    font-size: 0.82rem;
    padding: 0.38rem 0.45rem;
  }

  .menu-toggle {
    display: none;
  }

  .hero {
    padding: 4rem 0 3rem;
  }

  .hero-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .hero-text {
    max-width: 42rem;
  }

  .hero-badge {
    width: 200px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .three-column-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .two-column-layout {
    grid-template-columns: minmax(0, 2fr) minmax(0, 2fr);
    align-items: start;
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .footer-meta {
    text-align: left;
  }
}

@media (min-width: 960px) {
  .hero h1 {
    font-size: 2.4rem;
  }

  .main-nav a {
    padding-inline: 0.55rem;
  }
}
