/* Global Styles for Xpert Life Solutions */
/* Color palette */
:root {
  --primary-color: #052d6e;
  --secondary-color: #fbb03b;
  --accent-color: #e5eaf5;
}

body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #ffffff;
}

/* Ensure images scale properly across browsers */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Header and Navigation */
header {
  /* Set the header to be part of the normal document flow instead of fixed so it won't overlap content on mobile apps */
  position: relative;
  z-index: 100;
  width: 100%;
  background: var(--primary-color);
  color: #ffffff;
}

nav {
  /* Allow navigation items to wrap onto the next line if necessary to prevent them from
   * being cut off on smaller screens or browsers with limited flexbox support. */
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

/* Provide spacing between list items without relying on the `gap` property, since older
 * versions of Microsoft Edge do not fully support it */
nav ul li {
  margin-left: 1rem;
}
nav ul li:first-child {
  margin-left: 0;
}

nav ul li a {
  color: #ffffff;
  text-decoration: none;
  padding: 0.5rem;
  transition: background 0.3s, color 0.3s;
}

nav ul li a:hover {
  background: var(--secondary-color);
  color: #333333;
  border-radius: 4px;
}

/* Hero section */
/*
 * The hero section uses a flexible two‑column layout: the content on the left and
 * an image on the right. On smaller screens the columns stack. This layout
 * brings warmth and trust to the page by pairing your message with a real
 * family photo. The legacy icon styling is retained at the bottom in case
 * other pages reference it.
 */
.hero {
  background: var(--accent-color);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 4rem 1rem;
  text-align: left;
}
.hero .hero-content {
  flex: 1 1 300px;
  max-width: 600px;
}
.hero .hero-content h1 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 2.5rem;
  color: var(--primary-color);
}
.hero .hero-content p {
  margin: 0 0 2rem;
  font-size: 1.1rem;
  color: #555555;
}
.hero .buttons {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
}
.hero .buttons a {
  background: var(--secondary-color);
  color: #333333;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s, color 0.3s;
}
.hero .buttons a:hover {
  background: var(--primary-color);
  color: #ffffff;
}
.hero .hero-image {
  flex: 1 1 300px;
  max-width: 600px;
}
.hero .hero-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Custom frame and cropping for the home page hero family photo */
.hero-family-frame {
  width: 100%;
  max-height: 450px;
  object-fit: cover;
  border: 8px solid var(--secondary-color);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Testimonials section
 * This section uses a light background to set it apart from the rest of the
 * page. Each testimonial is displayed in its own card with subtle
 * typographic styling. Quotes are italicised to emphasise the voice of
 * the client. */
.testimonials {
  background-color: #f7f8fc;
  padding: 4rem 1rem;
  text-align: center;
}
.testimonials h2 {
  margin-top: 0;
  margin-bottom: 2rem;
  font-size: 2rem;
  color: var(--primary-color);
}
.testimonial-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}
.testimonial {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  padding: 2rem;
  flex: 1 1 250px;
  max-width: 300px;
}
.testimonial p {
  margin: 0 0 1rem;
}
.testimonial p.quote {
  font-style: italic;
  color: #555;
}
.testimonial-author {
  font-weight: bold;
  color: var(--primary-color);
}

/* Carrier logos section on the About page */
.carrier-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  /* Give the logos section a clean white card background instead of showing the underlying page image */
  background-color: #ffffff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}
.carrier-logo {
  max-width: 220px;
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Image filters per page
 * To give each page a distinct feel without sourcing new photos, we apply
 * subtle filters to the same base image. The about page has a warm
 * sepia tone while the services page uses a grayscale effect. */
.about-img {
  display: block;
  max-width: 100%;
  margin: 0 auto 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  filter: sepia(20%);
}
.services-img {
  display: block;
  max-width: 100%;
  margin: 0 auto 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  filter: grayscale(60%);
}

/* About page photos layout */
.about-photos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}
.frame-circle {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 50%;
  border: 6px solid var(--secondary-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.about-photos .about-img.family-frame {
  max-width: 300px;
  height: auto;
  object-fit: cover;
}

/* Legacy icon styling retained for backwards compatibility */
.hero .hero-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}
.hero .hero-icon svg {
  width: 100px;
  height: 100px;
  color: var(--primary-color);
  stroke: var(--primary-color);
}

/* Features list */
.features {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}
.features li {
  background: #f7f9fc;
  border: 1px solid #dddddd;
  border-radius: 6px;
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.features li svg {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  stroke: var(--secondary-color);
  stroke-width: 2;
}
.features li span {
  flex-grow: 1;
}

/* Call-to-action button */
.cta-button {
  display: inline-block;
  background: var(--secondary-color);
  color: #333333;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  margin-top: 1rem;
  transition: background 0.3s, color 0.3s;
}
.cta-button:hover {
  background: var(--primary-color);
  color: #ffffff;
}

/* Section styles */
section {
  padding: 3rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

section h2 {
  margin-top: 0;
  color: var(--primary-color);
  font-size: 2rem;
}

/* Card grid for service and feature sections */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.card {
  background: #f7f9fc;
  border: 1px solid #dddddd;
  border-radius: 6px;
  padding: 1.5rem;
}

.card h3 {
  margin-top: 0;
  color: var(--primary-color);
  font-size: 1.3rem;
}

.card p {
  margin-bottom: 1rem;
}

.card a {
  color: var(--secondary-color);
  font-weight: bold;
  text-decoration: none;
}

.card a:hover {
  text-decoration: underline;
}

/* Pricing table */
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

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

.pricing-table th {
  background: var(--primary-color);
  color: #ffffff;
}

.pricing-table tr:nth-child(even) {
  background: #f1f3f8;
}

/* Form styles */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

form label {
  font-weight: bold;
}

form input,
form select,
form textarea {
  padding: 0.75rem;
  border: 1px solid #cccccc;
  border-radius: 4px;
}

form button {
  background: var(--secondary-color);
  color: #333333;
  border: none;
  padding: 0.75rem;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

form button:hover {
  background: var(--primary-color);
  color: #ffffff;
}

/* Footer */
footer {
  background: var(--primary-color);
  color: #ffffff;
  padding: 2rem 1rem;
}

footer h3,
footer h4 {
  margin-top: 0;
}

footer .footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

footer ul li a {
  color: #ffffff;
  text-decoration: none;
}

footer ul li a:hover {
  text-decoration: underline;
}

/* Responsive navigation for mobile devices. When the viewport width is under 768px, stack the
 * navigation items vertically to prevent the header from cutting off page content in mobile browsers. */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    align-items: flex-start;
  }
  nav ul {
    flex-direction: column;
    /* Remove gap usage in favour of margins to ensure compatibility */
    margin: 0;
    padding: 0;
  }
  nav ul li {
    margin: 0.25rem 0;
  }
  /* Ensure the header does not overlay content on small screens */
  header {
    position: static;
  }
}

/* About and services images */
/*
 * Utility classes for content images on informational pages. These classes
 * constrain images to a reasonable width and add spacing. The border‑radius
 * softens the edges for a friendly feel.
 */
.about-img, .services-img {
  width: 100%;
  max-width: 700px;
  height: auto;
  display: block;
  margin: 0 auto 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Add a border frame specifically for the about page family photo */
.family-frame {
  border: 8px solid var(--secondary-color);
  padding: 0;
}

/* Pricing page layout
 * The pricing section uses a two‑column layout: the left column contains
 * our term sample calculator and the right column holds the final expense
 * quoting widget. On small screens the columns stack vertically. */
.pricing-section {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2rem;
}
.pricing-left,
.pricing-right {
  flex: 1 1 300px;
}
.pricing-right {
  max-width: 500px;
}
.pricing-left form {
  max-width: 400px;
  margin-top: 1rem;
}
.note {
  margin-top: 1rem;
}
@media (max-width: 768px) {
  .pricing-section {
    flex-direction: column;
  }
  .pricing-right {
    max-width: 100%;
  }
}

/* Contact page form container
 * The contact form is styled to resemble the sample provided by the client. A light
 * background, subtle border and grid layout make the form easy to scan. The
 * consent section is integrated below the inputs, and the submit button spans
 * the full width of the form. */
.contact-form-container {
  background: #f7f9fc;
  border: 1px solid #dddddd;
  border-radius: 8px;
  padding: 2rem;
  max-width: 700px;
  margin: 0 auto 2rem;
}
.contact-form-container form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.contact-form-container form label {
  font-weight: bold;
}
.contact-form-container form input,
.contact-form-container form select,
.contact-form-container form textarea {
  padding: 0.75rem;
  border: 1px solid #cccccc;
  border-radius: 4px;
  width: 100%;
  box-sizing: border-box;
}
.contact-form-container form textarea {
  resize: vertical;
}
.contact-form-container form .full {
  grid-column: span 2;
}
.contact-form-container .consent {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  grid-column: span 2;
}
.contact-form-container .disclaimer {
  font-size: 0.8rem;
  line-height: 1.4;
  grid-column: span 2;
}
.contact-form-container form button {
  grid-column: span 2;
  background: var(--secondary-color);
  color: #333333;
  border: none;
  padding: 0.75rem;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}
.contact-form-container form button:hover {
  background: var(--primary-color);
  color: #ffffff;
}

/* Modal overlay for terms and privacy policies */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}
.modal-content {
  background-color: #ffffff;
  margin: 5% auto;
  padding: 2rem;
  border-radius: 8px;
  max-width: 700px;
  max-height: 80%;
  overflow-y: auto;
  position: relative;
}
.modal-content h2 {
  margin-top: 0;
}
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Verify Agent page list styling
 * This list presents state groupings as interactive cards. */
.verify-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}
.verify-list li {
  background: #f7f9fc;
  border: 1px solid #dddddd;
  border-radius: 6px;
  padding: 1rem;
}
.verify-list li a {
  color: var(--secondary-color);
  font-weight: bold;
  text-decoration: none;
}
.verify-list li a:hover {
  text-decoration: underline;
}