/* =========================================================
   NexaGuard Website Stylesheet
   Modern Corporate Theme – Updated 2025
   Color Scheme: Teal (#007B8A), Dark Gray (#003C45)
========================================================= */

/* ---------- 1. CORE RESET & GLOBAL STYLES ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", "Roboto", sans-serif;
  color: #1a1a1a;
  line-height: 1.6;
  background-color: #f9fafb;
  text-align: left;
}

img {
  /* Critical for responsiveness: images scale down fluidly */
  max-width: 100%; 
  height: auto;
  display: block; 
}

.container {
  /* Fluid width but capped for large screens */
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

h1, h2, h3 {
  color: #003c45;
  font-weight: 700;
}

p, li {
  font-size: 1rem;
  color: #333;
}

ul {
  list-style: disc;
  margin-left: 1.5rem;
  margin-top: 0.5rem;
}

.center-text { 
  text-align: center;
}


/* ---------- 2. HEADER & NAVIGATION (Mobile First) ---------- */
header {
  background-color: #ffffff;
  border-bottom: 2px solid #e4e9ea;
  /* ENHANCEMENT 1: Reduced padding for less bulky mobile header */
  padding: 0.75rem 0; 
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-group {
  display: flex;
  align-items: center;
  text-align: left;
}

.logo {
  width: 56px;
  height: auto;
  border-radius: 10px;
  margin-right: 0.75rem;
  transition: width 0.3s;
}

header h1 {
  color: #007b8a;
  font-size: 1.5rem;
  margin: 0;
}

.menu-toggle {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #007b8a;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1100;
  display: block;
}

#navbar {
  position: absolute;
  top: 68px; /* Adjusted to match new header height */
  left: 0;
  width: 100%;
  background-color: #ffffff;
  border-bottom: 2px solid #007b8a;
  max-height: 0; /* HIDES THE MENU */
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  text-align: center;
  z-index: 1200;
}

#navbar.open { 
  max-height: 500px;
}

nav a {
  color: #007b8a;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
  display: block;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e4e9ea;
  margin: 0 1rem;
}

/* ENHANCEMENT 3: Clearer active state for mobile navigation */
nav a:hover,
nav a.active {
  color: #005b68;
  text-decoration: none;
  background-color: #f0f8ff; /* Subtle background highlight */
  border-left: 5px solid #007b8a; /* Professional visual cue */
  padding-left: 1.5rem; 
  margin-left: 0; /* Align border to the edge */
}

/* ---------- 3. MAIN CONTENT & LAYOUTS ---------- */
main {
  /* ADJUSTMENT 1 (Mobile Default): Reduced top padding to 1rem */
  padding: 1rem 1rem 3rem 1rem;
}

section {
  margin-bottom: 3rem;
}

/* FIX: Tighter margin for the first section after the Hero */
main section:first-of-type {
    margin-top: 1rem; 
}


section h2 {
  color: #005b68;
  margin-bottom: 0.8rem;
  /* ENHANCEMENT 2: Larger font size for mobile H2 headings */
  font-size: 1.6rem;
}

section:nth-child(even) { 
  background-color: #eef3f6;
  padding: 2rem 1rem;
  border-radius: 8px;
}

/* Hero Section */
#hero { 
  position: relative;
  background: url("images/hero.jpg") no-repeat center center;
  background-size: cover;
  min-height: 420px;
  display: flex;
  align-items: center;
}

/* Left-align and overlay to keep text from tower */
.hero-content-left {
  background: rgba(0,60,69,0.70);
  padding: 2.5rem 2rem;
  border-radius: 12px;
  text-align: left;
  width: 100%;
  max-width: 420px;
  margin-left: 0;
  margin-right: auto;
}

#hero h2,
#hero p {
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.27);
}

#hero h2 {
  font-size: 2rem;
  margin-bottom: 1.1rem;
}

#hero p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: unset;
  margin-right: unset;
}

#hero a.btn-primary {
  margin-top: 2rem;
}

@media (max-width: 700px) {
  #hero {
    min-height: 320px;
    background-position: 60% center;
  }
  .hero-content-left {
    max-width: 97vw;
    padding: 1.2rem 1rem;
    border-radius: 10px;
  }
}

/* --- SERVICE PILLARS LAYOUT (Mobile First) --- */
.service-pillar {
  /* Mobile: Stack image and content vertically */
  display: flex; 
  flex-direction: column; /* Ensure vertical stacking on mobile */
  gap: 1.5rem;
  margin-bottom: 3rem;
  padding: 1.5rem;
  background-color: white; 
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.pillar-image {
  max-width: 100%;
  border-radius: 6px;
  object-fit: cover;
}

.pillar-content {
  flex-grow: 1;
}

.pillar-content h3 {
  margin-bottom: 0.75rem;
}

.pillar-content p {
  margin-bottom: 1.5rem;
}


/* CTA Section */
#cta {
  background-color: #007b8a;
  text-align: center;
  padding: 3rem 1rem;
}

#cta h2,
#cta p {
  color: white;
}

#cta h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

#cta p {
  margin-bottom: 2rem;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.btn-primary, .btn-secondary {
  background: white;
  color: #007b8a;
  padding: 0.9rem 1.8rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s, color 0.3s;
  display: inline-block;
  text-align: center;
}

.btn-primary:hover, .btn-secondary:hover {
  background: #005b68;
  color: white;
}

/* Added .btn-pillars for services buttons */
.btn-pillars {
  background-color: #007b8a;
  color: white;
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s ease;
  display: inline-block;
  text-align: center;
}

.btn-pillars:hover {
  background-color: #005b68;
  color: white;
}

/* Partners Section Flexbox Layout */
#partners {
  padding: 3rem 1rem;
  background-color: #f0f3f5;
}

.partners-flex {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem 4rem;
  margin-top: 2rem;
}

.partner-item {
  text-align: center;
  flex: 1 1 180px;
  max-width: 220px;
}

.partner-logo {
  max-width: 150px;
  height: auto;
  border-radius: 4px;
  transition: opacity 0.3s, filter 0.3s;
  margin-bottom: 0.5rem;
  display: inline-block;
}

.partner-logo:hover {
  opacity: 1;
  filter: none;
}

@media (max-width: 600px) {
  .partners-flex {
    flex-direction: column;
    gap: 2rem 0;
    align-items: center;
  }

  .partner-item {
    max-width: 250px;
  }

  .partner-logo {
    max-width: 120px;
  }
}

/* Add top padding/margin to avoid content hiding under sticky header */
main.container {
  padding-top: 72px;
}

@media (max-width: 700px) {
  /* ADJUSTMENT 2 (Mobile): Remove the massive padding on mobile that pushed content down */
  main.container {
    padding-top: 0;
  }
}

/* Add spacing below paragraphs inside the main content and pillar section */
.pillar-section p {
    margin-bottom: 1em; /* Ensures spacing is applied */
    line-height: 1;
}

/* You can keep this rule as is to remove margin from the last paragraph in the outcome box */
.outcome p:last-child {
    margin-bottom: 0;
}


/* Add spacing above and below bulleted and numbered lists */
.pillar-section ul,
.pillar-section ol {
    /* Space before the list, same as the paragraph spacing */
    margin-top: 1em; 
    /* Space after the list, same as the paragraph spacing */
    margin-bottom: 1em;
    /* Optional: Increase space between list items slightly for better scannability */
    line-height: 1; 
}

.pillar-section li {
    margin-bottom: 0.75em; /* This adds clear space between each bullet point */
}


/* ---------- 4. SPECIFIC COMPONENTS & UTILITIES ---------- */

/* Back Button */
.back-link {
  text-decoration: none;
}

.back-button {
  background-color: #f0f0f0;
  color: #333;
  border: 1px solid #ccc;
  cursor: pointer;
  font-size: 1em;
  font-weight: bold;
  padding: 10px 15px;
  min-height: 44px;
  display: inline-block;
  margin-bottom: 20px;
  border-radius: 8px;
  transition: background-color 0.2s, box-shadow 0.2s;
}

.back-button:hover {
  background-color: #e0e0e0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.back-button:active {
  background-color: #d0d0d0;
}

/* Image Gallery */
.gallery-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; 
  gap: 20px;
  margin: 30px 0;
}

.pillar-image-container {
  text-align: center;
  margin: 0;
  padding: 0;
  max-width: 300px;
}

.pillar-image-container img {
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.pillar-image-container figcaption {
  font-style: italic;
  margin-top: 10px;
  color: #555;
  font-size: 0.9em;
}

/* Add separation above the H2 gallery heading */
main h2 {
    margin-top: 1em; 
}


/* ---------- 5. FOOTER ---------- */
footer {
  background-color: #003c45;
  color: white;
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.9rem;
}

footer p {
  color: white;
}

/* --- USER AGENT SPECIFIC STYLES --- */
.bingbot header {
  background-color: #004c7f;
}

.chrome nav a:hover {
  color: #ff6600;
}

/* --- INQUIRY FORM STYLES --- */
.inquiry-section {
  padding: 30px 0;
  margin-top: 20px;
  border-top: 1px solid #e4e9ea;
}

.inquiry-form {
  background-color: #ffffff;
  padding: 20px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 15px;
}

.inquiry-form label {
  display: block;
  font-weight: 600;
  color: #003c45;
  margin-bottom: 5px;
}

.inquiry-form input[type="text"],
.inquiry-form input[type="email"],
.inquiry-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.inquiry-form input:focus,
.inquiry-form textarea:focus {
  border-color: #007b8a;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 123, 138, 0.2);
}

.inquiry-form textarea {
  resize: vertical;
}

.inquiry-form .btn-primary {
  /* FIX: Ensures the form button is the brand color, full-width, and correct size */
  width: 100%;
  margin-top: 10px;
  text-transform: uppercase;
  font-size: 1.1rem;
  padding: 12px 20px;
  border: none;
  background-color: #007b8a;
  color: white;
}


@media (min-width: 700px) {
  .inquiry-form {
    margin: 0;
  }
}


/* --- CONTACT PAGE ENHANCEMENTS (Mobile First) --- */
.locations-section {
  /* Uses the alternating section background for clear visual separation */
  background-color: #eef3f6; 
  padding: 2.5rem 1.5rem;
  border-radius: 8px;
  margin-top: 2.5rem;
}

/* 2. Individual Location Cards (Mobile First) */
.contact-location {
  /* Stacked layout on mobile for clear separation */
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background-color: #fff; /* White card inside the gray section */
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05); /* Subtle lift */
}

.contact-location h4 {
  /* Highlights the location title with the brand color */
  color: #007b8a;
  font-size: 1.1rem;
}

.contact-img {
  /* Ensures images are contained and look clean */
  max-width: 100%;
  max-height: 250px;
  object-fit: cover;
  border-radius: 6px;
}

/* --- KEY MEMBER PROFILE STYLES (Mobile First) --- */

/* 1. Box and Layout Styling (Mobile) */
.member-profile {
    display: flex;
    flex-direction: column; /* Stacks image and text vertically on mobile */
    align-items: center; 
    gap: 1.5rem; /* Gap between photo and text */
    margin-bottom: 3rem; 
    padding: 1.5rem; /* Add back padding/box style */
    background-color: white; 
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); /* The white box */
    text-align: center; /* Center text and photo on mobile */
}

/* 2. Image and Photo Container Styling (Mobile) */
.member-photo {
    /* Uses max-width for sizing and centering */
    max-width: 250px; 
    margin: 0 auto;
}

.member-photo img {
    /* Create the circle effect */
    width: 150px; 
    height: 150px;
    border-radius: 50%; 
    object-fit: cover; 
    border: 5px solid #9BA5AB; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* 3. Text Content Styling (Mobile) */
.member-profile h4 {
    color: #007b8a; /* Use the brand color for the title */
    font-weight: 400;
    margin-top: -0.5rem; 
    margin-bottom: 1rem;
}

.member-profile .pillar-content {
    flex-grow: 1;
}


/* ---------- 6. RESPONSIVE DESIGN (Desktop Styles) ---------- */
@media (min-width: 700px) {
  .header-content {
    justify-content: space-between;
  }
  
  .logo {
    width: 120px;
  }

  /* Reset Mobile Active Nav Styles for Desktop */
  nav a:hover,
  nav a.active {
    color: #005b68;
    text-decoration: underline; /* Re-apply underline for desktop hover */
    background-color: transparent; /* Reset background */
    border-left: none; /* Reset border */
    padding-left: 0; /* Reset padding */
    margin-left: 1rem; /* Reset margin */
  }

 
  /* Contact Page Adjustments */
  .contact-location {
      padding: 0; 
      box-shadow: none;
      background-color: transparent;
      margin-bottom: 4rem;
  }
  
  .contact-img {
    max-height: 400px; 
  }
  
  /* Member Profile Adjustments (Desktop) */
  .member-profile {
      flex-direction: row; /* Horizontal layout on desktop */
      padding: 3rem; /* Increase padding for desktop */
      gap: 3rem; /* Increase gap for desktop */
      align-items: flex-start; /* Align photo/text to the top */
      text-align: left; /* Text alignment for desktop */
  }

  .member-photo {
      flex-basis: 40%; /* Allocate space for the image */
      flex-shrink: 0;
      max-width: none; /* Allows flex-basis to control width */
  }

  .member-photo img {
      width: 200px; /* Larger circle on desktop */
      height: 200px;
      margin: 0 auto;
      border-radius: 50%; /* Explicitly enforce circular shape on desktop */
  }

  .member-profile .pillar-content {
      flex-basis: 60%;
  }

  /* Alternating Layout */
  .member-profile:nth-of-type(even) {
      flex-direction: row-reverse;
  }


  header h1 {
    font-size: 2rem;
    margin: 0;
  }
  
  .menu-toggle {
    display: none;
  }
  
  #navbar {
    position: static;
    max-height: initial;
    overflow: visible;
    display: flex;
    align-items: center;
    width: auto;
    border-bottom: none;
  }

  nav a {
    display: inline;
    margin: 0 1rem;
    padding: 0;
    border-bottom: none;
  }

  main {
    /* FINAL ADJUSTMENT (Desktop): Reduced top padding from 4rem to 1rem to tighten the gap */
    padding: 1rem 0;
  }

  section {
    /* FIX: Tighter, consistent section margin for desktop */
    margin-bottom: 3rem;
  }
  
  section h2 {
    font-size: 2rem; /* Reset H2 size for desktop */
  }

  /* FIX: Apply flex properties to ensure horizontal layout for ALL pillars/members */
  .service-pillar {
    flex-direction: row; 
    align-items: center; 
    gap: 3rem;
    padding: 3rem; 
  }
  
  .pillar-content {
    flex-basis: 60%;
  }

  .pillar-image {
    max-width: 40%;
    flex-shrink: 0; 
    flex-basis: 40%;
  }

  .contact-location {
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 2.5rem;
  }
  
  .contact-address {
    text-align: left;
    min-width: 250px;
    max-width: 350px;
  }
  
  .contact-img {
    max-width: 350px;
  }
  
  #hero h2 {
    font-size: 2.5rem;
  }
}

@media (min-width: 1000px) {
  #hero h2 {
    font-size: 2.8rem;
  }
}
