/*
 * Stylesheet for Marcin's Fire Door Company website
 *
 * The design uses a restrained palette inspired by fire safety: rich reds
 * complemented by warm oranges and neutral greys.  Generous white space
 * and clean typography ensure that the site feels modern and professional.
 */

/* Colour variables */
:root {
    --primary-color: #a32020;      /* deep red reminiscent of fire doors */
    --secondary-color: #e67627;    /* warm orange accent */
    --bg-color: #fefefe;          /* very light background */
    --text-color: #333333;        /* dark grey text */
    --border-radius: 6px;
    --transition-speed: 0.3s;
    --max-width: 1100px;
}

/* Global reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

a:hover {
    color: var(--secondary-color);
}

/* Support var for spacing + height */
/* Define the navigation bar height once; duplicate declarations removed */
:root { --nav-height: 60px; }

/* --- Force sticky header to be fixed globally --- */
/* The nav-height variable is defined above; we intentionally avoid redefining it here to prevent overriding. */

/* Navbar (always fixed) */
.navbar {
  position: fixed;      /* <- force stickiness */
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;

  display: flex;
  justify-content: space-between;
  align-items: center;

  height: var(--nav-height);
  padding: 0.75rem 1rem;
  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;

  /* optional glassy polish */
  backdrop-filter: saturate(180%) blur(6px);
  -webkit-backdrop-filter: saturate(180%) blur(6px);
}

/* Prevent content jumping under the fixed bar */
body { padding-top: var(--nav-height); }

/* Shadow when the page is scrolled (toggle via tiny JS if you like) */
.navbar.is-stuck { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }

/* Desktop nav bits (unchanged) */
.navbar .logo a {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
}

.navbar .nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
  align-items: center;
}

/*
 * The authentication links should mirror the styling of the primary
 * navigation links on desktop. We define them separately rather than
 * relying on the `.nav-links` class to avoid accidental inheritance and
 * prevent the mobile dropdown menu from applying two conflicting sets
 * of rules. Without this, the auth list previously included the
 * `nav-links` class (see header.php), which caused duplicate styles and
 * prevented all items from showing on mobile.  By isolating the class
 * we can control its behaviour more predictably.
 */
.navbar .auth-links {
  list-style: none;
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Match the link styling for auth items */
.navbar .auth-links li a {
  padding: 0.4rem 0.6rem;
  border-radius: var(--border-radius);
  transition: background-color var(--transition-speed), color var(--transition-speed);
}

/* Active state for auth links */
.navbar .auth-links li a.active,
.navbar .auth-links li a:hover {
  background-color: var(--primary-color);
  color: #fff;
}

.navbar .nav-links li a {
  padding: 0.4rem 0.6rem;
  border-radius: var(--border-radius);
  transition: background-color var(--transition-speed), color var(--transition-speed);
}

.navbar .nav-links li a.active,
.navbar .nav-links li a:hover {
  background-color: var(--primary-color);
  color: #fff;
}

/*
 * Remove default list bullets and spacing for any lists within the navbar.
 * Without this reset, some browsers may show list markers or add margin/padding
 * to the unordered lists, causing the nav items to stack or misalign on desktop.
 */
.navbar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Mobile */
.menu-toggle { display: none; }
.hamburger { display: none; flex-direction: column; cursor: pointer; }
.hamburger span {
  width: 24px; height: 3px; background: var(--text-color);
  margin-bottom: 4px; border-radius: 2px;
  transition: transform var(--transition-speed);
}

@media (max-width: 768px) {
  /* Show the hamburger icon and reveal the hidden checkbox on small screens. */
  .hamburger { display: flex; }
  .menu-toggle { display: block; position: absolute; opacity: 0; pointer-events: none; }

  /*
   * The positioning and display of navigation lists on mobile is now
   * handled by the `.menu-panel` rules further below. Removing the old
   * mobile nav styles prevents conflicting behaviours and ensures that
   * the nav and auth lists are stacked within a single scrollable panel.
   */
}

/*
 * Note: The previous "Additional mobile navigation tweaks" block has been removed.
 * The `.menu-panel` implementation below provides a single scrollable panel
 * that stacks navigation and authentication links naturally on small screens.
 */

/* Responsive adjustments for the How It Works section on smaller screens */
@media (max-width: 768px) {
  #how-it-works {
    padding: 3rem 1rem;
  }
  #how-it-works .steps-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    row-gap: 1.25rem;
  }
  #how-it-works .conn {
    display: none;
  }
  #how-it-works .step-card {
    max-width: 100%;
    margin: 0 auto;
    text-align: left;
  }
  #how-it-works .icon {
    margin-left: 0;
  }
  #how-it-works h3 {
    font-size: 1rem;
  }
  #how-it-works p {
    font-size: 0.9rem;
  }
}

/* Ensure footer brand description wraps correctly on very small devices */
@media (max-width: 520px) {
  .footer-brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .footer-brand .footer-logo img {
    max-height: 120px;
  }
  .footer-brand .tagline {
    min-width: 0;
    max-width: 100%;
    font-size: 0.95rem;
  }
}

/*
 * The site logo should not exceed the height of the navigation bar on desktop.
 * A smaller logo prevents it from pushing other items and causing the nav to wrap.
 */
.site-logo {
    max-height: 120px;
    width: auto;
    display: block;
}


/* Hero section */
.hero {
    position: relative;
    padding: 2rem 1rem; /* reduce vertical space */
    background: 
        linear-gradient(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.3)),
        url("../images/Content/plymouth-aerial.jpg") center/cover no-repeat;
    color: #222; 
    text-align: center;
}

.hero-logo {
    max-width: 620px;
    display: block;
    margin: -20px auto -110px auto; /* pull it up/down */
}


.hero h1 {
    font-size: 2.2rem;
    margin: 0.5rem 0;       /* shrink heading spacing */
    font-weight: 600;
}

.hero p {
    font-size: 1.1rem;
    margin: 1rem auto 1.5rem;
    max-width: 700px;
}

.hero .btn {
    display: inline-block;
    padding: 0.7rem 1.4rem;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
}

.hero .btn-primary {
    background-color: var(--secondary-color);
    color: #fff;
}

.hero .btn-primary:hover {
    background-color: #cf6321;
}

.hero-content {
    background: rgba(255, 255, 255, 0.7); /* light box */
    padding: 1.5rem;
    border-radius: 12px;
    display: inline-block;
    max-width: 800px;
    margin: 0 auto;
}

/* Adjust padding for hero */
.hero {
    padding-top: 1rem;   
    padding-bottom: 1rem; 
}


/* Content sections */
.section {
    padding: 3rem 1rem;
    max-width: var(--max-width);
    margin: auto;
}

.section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.section p {
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* Forms */
form {
    max-width: 600px;
    margin: auto;
    background: #ffffff;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

form .form-group {
    margin-bottom: 1rem;
}

form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form textarea {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-size: 1rem;
}

form textarea {
    min-height: 120px;
    resize: vertical;
}

form button {
  background-color: var(--primary-color);
  color: #222; /* dark grey text */
}
form button:hover {
  background-color: var(--secondary-color);
  color: #000;
}


/* Table styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

table th, table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
}

table thead {
    background-color: var(--primary-color);
    color: #222; /* dark grey text */
}

table tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

/* Footer */
.site-footer {
  background: #f7f7f7;
  border-top: 1px solid #e5e5e5;
  padding: 2.25rem 1rem 1.25rem;
  margin-top: auto;
  color: #333;
  font-size: 0.95rem;
  text-align: left;
}

.site-footer .container {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ===== Footer (4-column) ===== */
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr; /* Brand | Navigate | Contact | Legal */
  gap: 2rem;
  align-items: start;
  margin-bottom: 1.25rem;
}

/* --- Footer brand: logo left, tagline right --- */
.footer-brand {
  display: flex;
  align-items: center;   /* center text with logo vertically; use flex-start to top-align */
  gap: 1rem;
  flex-wrap: nowrap;     /* keep logo + text on one line */
}

.footer-brand .footer-logo {
  display: inline-block;
  flex: 0 0 auto;
}

.footer-brand .footer-logo img {
  max-height: 160px;     /* adjust as you like */
  width: auto;
  height: auto;
}

.footer-brand .tagline {
  margin: 0;
  flex: 1;               /* let the text expand into remaining space */
  min-width: 28ch;       /* stop it collapsing */
  max-width: 50ch;       /* keep it readable */
  line-height: 1.6;      /* comfortable spacing */
  font-size: 1rem;
  color: #555;
}

/* Column headings */
.site-footer h4 {
  font-size: 1rem;
  letter-spacing: .2px;
  margin: 0 0 .75rem;
  color: #111;
}

/* Lists/links */
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer li + li { margin-top: .4rem; }

.site-footer a {
  color: #444;
  text-decoration: none;
  transition: color var(--transition-speed), text-decoration-color var(--transition-speed);
}
.site-footer a:hover {
  color: var(--primary-color);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Contact list tweaks */
.contact-list a[href^="tel:"] { white-space: nowrap; }

/* Bottom bar */
.footer-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px dashed #e3e3e3;
  font-size: 0.9rem;
  color: #666;
}

/* Responsiveness */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { align-items: flex-start; }
  .footer-bottom { text-align: center; }
}

/* Trust Bar */
.trust-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1rem 0;
  background: #f9f9f9; /* subtle background, tweak if needed */
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #333;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.trust-item i {
  width: 18px;
  height: 18px;
  color: var(--primary-color, #e67e22); /* uses your brand accent */
}

.trust-divider {
  opacity: 0.5;
  font-size: 1.2rem;
  color: #999;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .trust-bar {
    gap: 1rem;
    font-size: 0.9rem;
  }
  .trust-divider {
    display: none; /* hide dots on smaller screens */
  }
}

/*
 * Additional mobile optimisations
 *
 * The home page hero originally relies on a large logo and generous typography
 * which look great on desktop screens but overwhelm small mobile devices.
 * These rules reduce the size of the logo, tighten up margins and scale
 * headings down for narrow viewports.  Further tweaks to section padding
 * and the footer grid help ensure content remains legible without forcing
 * horizontal scrolling.
 */

@media (max-width: 768px) {
  /* Shrink hero logo and reset negative margins on medium screens */
  .hero-logo {
    max-width: 80%;
    margin: -10px auto 0 auto;
  }
  /* Scale down hero heading and body copy */
  .hero h1 {
    font-size: 1.8rem;
  }
  .hero p {
    font-size: 1rem;
  }
  /* Slightly reduce section vertical padding */
  .section {
    padding: 2rem 1rem;
  }
}

@media (max-width: 480px) {
  /* On very small screens, further reduce logo and headings */
  .hero-logo {
    max-width: 90%;
    margin: 0 auto;
  }
  .hero h1 {
    font-size: 1.6rem;
  }
  .hero p {
    font-size: 0.95rem;
  }
  /* Collapse footer columns into a single column stack */
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* Services Section */
#services {
  padding: 4rem 2rem;
  background: #fff;
}

#services h2 {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  text-align: center;
  font-weight: 700;
  color: #222;
}

/* Grid Layout */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Service Cards */
.service-card {
  background: #f9f9f9;
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid #eee;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

/* Icon + Heading row */
.service-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.service-head i.lucide {
  width: 24px;
  height: 24px;
  color: var(--accent, #e67e22);
  flex-shrink: 0;
}

.service-head h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: #111;
}

/* Text */
.service-card p {
  margin: 0;
  color: #555;
  line-height: 1.5;
  font-size: 0.95rem;
}

/* Responsive tweaks */
@media (max-width: 600px) {
  #services {
    padding: 3rem 1rem;
  }
  .services-grid {
    gap: 1.25rem;
  }
}

/* Make all Lucide icons red */
.lucide {
  color: #d32f2f;   /* sets currentColor */
  stroke: #d32f2f;  /* ensures stroke is red */
}

/* How It Works */
#how-it-works {
  background: #f7f7f7; /* subtle grey to match footer */
  padding: 4rem 2rem;  /* spacing to match other sections */
}

#how-it-works h2 {
  text-align: center;
  margin-bottom: 2.5rem;
  font-size: 2.25rem;
  font-weight: 700;
  color: #222;
}


/* 5 columns: card | gap | card | gap | card
   3 rows:    cards | 80px connector | cards  */
#how-it-works .steps-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns:
    minmax(260px, 1fr) 80px minmax(260px, 1fr) 80px minmax(260px, 1fr);
  grid-template-rows: auto 80px auto;
  align-items: center;
  position: relative;
}

/* Place items on the grid */
#how-it-works .step-1 { grid-column: 1; grid-row: 1; }
#how-it-works .h-top-1 { grid-column: 2; grid-row: 1; }
#how-it-works .step-2 { grid-column: 3; grid-row: 1; }
#how-it-works .h-top-2 { grid-column: 4; grid-row: 1; }
#how-it-works .step-3 { grid-column: 5; grid-row: 1; }

#how-it-works .v-center { grid-column: 3; grid-row: 2; }

#how-it-works .step-4 { grid-column: 1; grid-row: 3; }
#how-it-works .h-bottom { grid-column: 2 / 5; grid-row: 3; }
#how-it-works .step-5 { grid-column: 5; grid-row: 3; }

/* Cards */
#how-it-works .step-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 1.75rem 1.5rem;
  text-align: center;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  z-index: 1; /* above connectors */
}
#how-it-works .step-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 22px rgba(0,0,0,.08);
  border-color: #eaeaea;
}

/* Badge */
#how-it-works .step-number {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  color: var(--primary-color, #e63946);
  background: rgba(230,57,70,.08);
  border: 1px solid rgba(230,57,70,.25);
  padding: .25rem .6rem;
  border-radius: 999px;
  margin-bottom: .75rem;
}

/* Icon circle */
#how-it-works .icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0.25rem auto 1rem;
  border-radius: 50%;
  background: rgba(230,57,70,.08);
  border: 1px solid rgba(230,57,70,.25);
}
#how-it-works .icon i { width: 22px; height: 22px; color: var(--primary-color, #e63946); }

/* Type */
#how-it-works h3 { font-size: 1.05rem; margin: 0 0 .35rem; font-weight: 700; color: #111; }
#how-it-works p  { margin: 0; color: #444; line-height: 1.55; font-size: .95rem; }

/* Connectors (grid cells) */
#how-it-works .conn { z-index: 0; }
#how-it-works .conn-h {
  height: 2px;
  background: var(--primary-color, #e63946);
  opacity: .6;
  align-self: center;
  width: 100%;
}
#how-it-works .conn-v {
  width: 2px;
  height: 100%;
  background: var(--primary-color, #e63946);
  opacity: .6;
  justify-self: center;
}

/* Responsive */
@media (max-width: 960px) {
  #how-it-works .steps-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    row-gap: 1.25rem;
  }
  #how-it-works .conn { display: none; }
  #how-it-works .step-card { max-width: 560px; margin: 0 auto; text-align: left; }
  #how-it-works .icon { margin-left: 0; }
}

/* Sticky Contact CTA */
.sticky-cta{
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1100; /* higher than your sticky navbar (1000) */
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1rem;
  border-radius: 999px;
  background: var(--primary-color, #e11d48);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: .2px;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
  transition: transform .15s ease, box-shadow .15s ease;
}

.sticky-cta:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0,0,0,.18);
}

.sticky-cta:focus{
  outline: 2px solid rgba(255,255,255,.8);
  outline-offset: 3px;
}

.sticky-cta .lucide{
  width: 18px;
  height: 18px;
}

/* Mobile: make it a bottom bar */
@media (max-width: 640px){
  .sticky-cta{
    left: 1rem;
    right: 1rem;
    bottom: max(1rem, env(safe-area-inset-bottom));
    width: auto;
    justify-content: center;
    border-radius: 14px;
  }
}

/* Responsive card grid */
.service-grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 600px) {
  .service-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

/* Individual card styling */
.service-card {
  background: var(--card-bg-color, #f9f9f9);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  text-align: center;
}
.service-card i {
  width: 48px;
  height: 48px;
  stroke-width: 1.5;
  color: var(--primary-color, #005bab);
  margin-bottom: 0.5rem;
}
.service-card h3 {
  margin-top: 0.5rem;
  font-size: 1.2rem;
}
.service-card p {
  margin: 0.5rem 0 1rem;
  font-size: 0.95rem;
  text-align: left;
}
.service-card ul {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.95rem;
  text-align: left;
  line-height: 1.5;
}
.service-card ul li {
  margin-bottom: 0.5rem;
}

/* Callout box */
.callout {
  background: #eef6fb;
  border-left: 4px solid var(--primary-color, #005bab);
  padding: 1rem 1.25rem;
  border-radius: 6px;
}
.callout p {
  margin: 0;
  font-size: 0.95rem;
}

/* Margin utility */
.mt-3 {
  margin-top: 1.5rem;
}


/*
 * ===== Desktop navigation tweaks =====
 *
 * The AWS deployment displayed the primary navigation (Home, About, Recent
 * Projects and Contact) flush against the logo, with the dashboard/login
 * links sitting directly afterwards.  To mirror the designer’s intent – a
 * horizontally centred main nav with the authentication links pinned to
 * the far right – we treat the `.menu-panel` as a flexible container.
 *
 * On viewports wider than 768px the burger menu disappears, `.menu-panel`
 * grows to fill the space between the logo and the right edge, and we use
 * absolutely positioned `.nav-links` to centre the primary navigation.
 */
@media (min-width: 769px) {
  /* Hide mobile controls on desktop */
  .menu-toggle,
  .hamburger { display: none !important; }

  /* Allow the panel to consume the remaining horizontal space.  Without
   * `flex: 1` the panel collapses to fit its contents, pushing the nav
   * items to the right rather than centring them.  A relative position
   * establishes a containing block for the absolutely positioned nav list.
   */
  .menu-panel {
    margin-left: 0;
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }

  /* Centre the main navigation horizontally within the panel.  We use
   * absolute positioning anchored at 50% of the panel’s width then pull
   * the list back by half its own width with `translateX(-50%)`.  The
   * flex layout ensures the list items remain inline.
   */
  .menu-panel .nav-links {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: row;
    gap: 1rem;
  }

  /* Anchor the auth links to the far right of the navigation bar.  A
   * left auto margin consumes any remaining space, guaranteeing that
   * `.nav-links` stays centred even when the auth items change length.
   */
  .menu-panel .auth-links {
    margin-left: auto;
    display: flex;
    flex-direction: row;
    gap: 1rem;
  }
}

/* ===== MOBILE NAV: show a single scrollable panel under the fixed header ===== */
@media (max-width: 768px) {
  /* Hide panel by default */
  .menu-panel { display: none; }

  /* Show when toggled */
  #menu-toggle:checked ~ .menu-panel {
    display: flex;
    position: fixed;
    z-index: 1001;                /* above the fixed header (1000) */
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: #fff;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
    max-height: calc(100dvh - var(--nav-height));
    overflow-y: auto;
  }

  /* Inside the panel, both lists stack — no independent fixed positioning */
  .menu-panel .nav-links,
  .menu-panel .auth-links {
    position: static !important;
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    max-height: none !important;
    overflow: visible !important;
    border: 0;
  }

  .menu-panel .nav-links li,
  .menu-panel .auth-links li {
    width: 100%;
    border-top: 1px solid #e5e5e5;
  }

  .menu-panel .nav-links li a,
  .menu-panel .auth-links li a {
    display: block;
    padding: 1rem;
    border-radius: 0;
  }
}



/* ===== How It Works – Mobile: stack like service cards ===== */
@media (max-width: 768px) {
  #how-it-works {
    padding: 2.5rem 1rem;
  }

  #how-it-works .steps-grid {
    display: flex;              /* turn grid into a simple column */
    flex-direction: column;
    gap: 1.25rem;
  }

  /* Hide connector lines */
  #how-it-works .conn { display: none !important; }

  /* Step cards: full-width blocks */
  #how-it-works .step-card {
    max-width: 100%;
    margin: 0;
    text-align: left;
    padding: 1.5rem 1.25rem;
  }

  #how-it-works .icon {
    margin: 0 0 0.75rem 0;      /* icon above text */
    justify-self: flex-start;
  }

  #how-it-works h3 {
    font-size: 1rem;
    margin-bottom: .35rem;
  }

  #how-it-works p {
    font-size: .95rem;
    line-height: 1.5;
  }
}

/* ===== Stat grid mobile override: force 4 per row ===== */
@media (max-width: 768px) {
  .stat-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 0.75rem; /* optional tighter gap for small screens */
  }
  .stat {
    text-align: center;
    padding: 0.75rem 0.5rem;
  }
}

