/* ===== Reset & Foundations ===== */
:root {
  --primary-color: #000000; /* Black */
  --accent-color: #555555; /* Medium Gray */
  --text-color: #333333; /* Dark Gray */
  --background-color: #ffffff; /* White */
  --subtle-gray: #e5e5e5;
  --light-accent-bg: #f5f5f5; /* Light Gray */
  --dark-accent-hover: #333333; /* Darker Gray */
  --footer-bg: #000000;
  --footer-text: #ffffff;
  --footer-link-hover: #aaaaaa;
  --code-bg: #f5f5f5;
  --code-border: #e5e5e5;
  --code-text: #000000;
  --hero-bg-start: #ffffff;
  --hero-bg-end: #f5f5f5;
  --featured-bg-start: #ffffff;
  --featured-bg-end: #f5f5f5;
  --card-border: #e5e5e5;
  --card-border-hover: #555555;
  --card-shadow: rgba(0, 0, 0, 0.05);
  --card-shadow-hover: rgba(0, 0, 0, 0.1);
  --insight-tag-bg: #f5f5f5;
  --insight-tag-text: #555555;
  --resource-tag-bg: #e5e5e5;
  --resource-tag-text: #333333;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
}

article {
  position: relative;
  z-index: 0;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

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

/* ===== Utility ===== */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  border: 2px solid transparent;
  transition: background 0.2s ease;
}

.btn-primary {
  background: var(--accent-color);
  color: var(--background-color);
}
.btn-primary:hover {
  background: var(--dark-accent-hover);
}

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

/* ===== Header & Navigation ===== */
header {
  position: sticky;
  top: 0;
  background: #f5f5f5ee; /* slight transparency */
  backdrop-filter: blur(6px);
  z-index: 1000;
  border-bottom: 1px solid var(--subtle-gray);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand img {
  height: 30px;
  width: auto;
  display: block;
}

.brand span {
  display: inline-block;
}

.nav-toggle { display: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  position: relative;
}

.nav-links li {
  position: relative;
}

.nav-links a {
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav-links a:hover {
  color: var(--primary-color);
}

/* ===== Mega Menu ===== */
.mega {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 100%;
  width: 850px;
  background: var(--background-color);
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  padding: 2rem 2.5rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem 3rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

#services-trigger {
  cursor: pointer;
}

.nav-links li.mega-menu-open .mega {
  opacity: 1;
  visibility: visible;
}

.mega h4 {
  margin-bottom: 1rem;
  font-weight: 600;
}

.mega-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.mega-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 0.5rem;
  background: var(--light-accent-bg);
  display: grid;
  place-content: center;
  font-size: 1.25rem;
  color: var(--accent-color);
}

.mega-content {
  flex-grow: 1;
  min-height: min-content;
}

.mega-content h5 {
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.mega-content p {
  font-size: 0.875rem;
  color: var(--text-color);
}

/* ===== Hero ===== */
.hero {
  display: grid;
  place-content: center;
  text-align: center;
  padding: 6rem 0 5rem;
  background: linear-gradient(135deg, var(--hero-bg-start) 0%, var(--hero-bg-end) 60%);
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.hero p {
  font-size: 1.125rem;
  max-width: 700px;
  margin: 0 auto 2.5rem;
  color: var(--text-color);
}

/* ===== Services (overview section) ===== */
.services {
  padding: 4rem 0 6rem;
}
.services h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}

.service-card {
  padding: 2rem 1.5rem;
  border: 1px solid var(--subtle-gray);
  border-radius: 1rem;
  box-shadow: 0 4px 10px var(--card-shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px var(--card-shadow-hover);
}

.service-card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.service-card p {
  font-size: 0.95rem;
  color: var(--text-color);
}

/* ===== Featured Content Section Styling ===== */
.featured-content {
  padding: 4rem 0 5rem;
  background: linear-gradient(135deg, var(--featured-bg-start) 0%, var(--featured-bg-end) 60%);
}

.featured-content h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

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

@media (min-width: 769px) {
  .featured-columns-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* NEW: Flexbox styling for the "View All" buttons */
.view-all-links {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ===== Footer ===== */
footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 3rem 0;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 769px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr 1fr auto; /* Legal column flush right */
    align-items: start;
  }
}

.footer-grid h4 {
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-grid a {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--footer-text);
  transition: color 0.2s ease;
}
.footer-grid a:hover {
  color: var(--footer-link-hover);
}

.copyright {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.85rem;
  color: #94a3b8;
}

.input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  font-size: 1rem;
}
.input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(107, 142, 35, 0.2);
}

html { scroll-padding-top: 80px; }
#contact { scroll-margin-top: 80px; }

code.addr {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 0.35rem;
  padding: 0.1rem 0.45rem;
  font-size: 0.95em;
  font-weight: 500;
  color: var(--code-text);
  white-space: nowrap;
}

.hidden { display: none; }

/******************************************************************************
 * Mobile layout (≤ 768 px)
 ******************************************************************************/
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
    font-size: 1.75rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-color);
    margin-left: auto;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: #ffffff;
    border-bottom: 1px solid var(--subtle-gray);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  }
  .nav-links.open {
    display: flex;
  }

  .mega { display: none !important; }

  .hero      { padding: 4.5rem 0 3.5rem; }
  .services { padding: 3rem 0 4rem; }

  .brand {
    font-size: 1rem;
    gap: 0.25rem;
  }
  .brand img {
    height: 24px;
  }
}

/* ===== Card Styling (Insights, Resources) ===== */

.insight-list {
  display: grid;
  list-style: none;
  padding: 0;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 769px) {
  .insight-list.two-column {
    grid-template-columns: repeat(2, 1fr);
  }
}

.insight-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  color: var(--primary-color);
  transition: all 0.2s ease-in-out;
  background-color: #fff;
  box-shadow: 0 2px 4px var(--card-shadow);
  text-align: left;
}

.insight-card:hover {
  transform: translateY(-4px);
  border-color: var(--card-border-hover);
  box-shadow: 0 8px 16px var(--card-shadow-hover);
}

.insight-text {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.insight-title {
  font-weight: 600;
  font-size: 1.1rem;
}

.insight-arrow {
  font-size: 1.5rem;
  color: #cbd5e1;
  transition: all 0.2s ease-in-out;
  margin-left: 1rem;
}

.insight-card:hover .insight-arrow {
  color: var(--accent-color);
  transform: translateX(4px);
}

/* CTA Button Styling */
.cta-card {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  max-width: 320px;
  margin: 2rem auto 0;
  /* --- MODIFICATIONS START --- */
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--accent-color); /* Using accent color for a less dominant border */
  /* --- MODIFICATIONS END --- */
  padding: 1.1rem 1.75rem;
  border-radius: 0.75rem;
  transition: all 0.2s ease-in-out; /* Ensures smooth transitions for all properties */
}

.cta-card:hover {
  /* --- MODIFICATIONS START --- */
  background-color: var(--accent-color); /* Fill with the accent color on hover */
  color: var(--background-color);         /* Change text to light on hover */
  /* --- MODIFICATIONS END --- */
  transform: translateY(-4px);
  box-shadow: 0 8px 20px var(--card-shadow-hover);
}

.cta-card .insight-title {
  font-size: 1.2rem;
}

.cta-card .insight-arrow {
  font-size: 1.85rem;
  /* --- MODIFICATION --- */
  color: inherit; /* This makes the arrow automatically match the text color */
}

.card-title-line {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.pinned-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #00ff00;
  margin-left: 0.6rem;
}

.card-subtitle {
  font-size: 0.9rem;
  color: var(--text-color);
  line-height: 1.4;
  flex-grow: 1;
}

.card-type-tag {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}

.insight-tag {
  background-color: var(--insight-tag-bg);
  color: var(--insight-tag-text);
}

.resource-tag {
  background-color: var(--resource-tag-bg);
  color: var(--resource-tag-text);
}

/* Page Content Styling */
.page-content {
  position: relative;
  z-index: 2;
}

.page-content article {
  max-width: 740px;
  margin: -4rem auto 0;
  padding: 3rem 2.5rem 4rem;
  font-size: 1.05rem;
  line-height: 1.75;
  background-color: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.contact-form-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
}

#contact article {
  padding-top: 4.5rem;
}

.insight-content {
  max-width: 740px;
  margin: 0 auto;
  padding: 5rem 1rem 6rem;
  font-size: 1.05rem;
  line-height: 1.75;
}

.insight-header {
  text-align: center;
  margin-bottom: 2.75rem;
  transition: opacity 0.05s linear;
}

.insight-h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.insight-meta {
  font-size: 0.95rem;
  color: var(--text-color);
  margin-bottom: 1.25rem;
}

.insight-subtitle {
  font-weight: 600;
  color: var(--primary-color);
}
