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

body {
  font-family: "Merriweather", Georgia, serif; /* Adds academic gravitas */
  line-height: 1.75;
  background-color: #fffcf4;
  color: #2b2b2b;
  font-size: 17px;
}

/* Ensure full width and prevent horizontal scroll on all devices */
html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* ===== Layout ===== */
header, section, footer {
  padding: .5rem 2rem;
  max-width: 1200px;
  margin: auto;
}

/* Add slight side padding to all main content below the hero */
section, footer {
  padding-left: 1vw;
  padding-right: 1vw;
}

/* On small screens, ensure the padding remains subtle and not removed */
@media (max-width: 600px) {
  section, footer {
    padding-left: 2vw !important;
    padding-right: 2vw !important;
  }
}

/* Remove max-width and side paddings for main containers on small screens */
@media (max-width: 600px) {
  header, section, footer {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .hero-overlay {
    max-width: 100% !important;
    padding-left: 0.2rem !important;
    padding-right: 0.2rem !important;
  }
}

/* ===== Header / Hero ===== */
header {
  /* Use only one linear-gradient, after the image */
  color: #ffffff;
  text-align: center;
  padding: 2rem 1rem;
  border-bottom: 4px solid #c5a46d;
  /* Try all common path/case variants for the hero image */
  background-image:
    url("./Images/Hero-bg.jpg"),
    linear-gradient(120deg, #002147, #004d80);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}

header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

header p {
  font-size: 1rem;
  max-width: 700px;
  margin: auto;
  opacity: 0.95;
  margin-bottom: 0.5rem;
}

/* ===== Typography ===== */
h1, h2, h3 {
  font-family: "Lato", Arial, sans-serif; /* Modern sans-serif headings */
  font-weight: 700;
  color: #2a4876;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2rem;
  border-left: 5px solid #c5a46d;
  padding-left: 0.75rem; 
}

p {
  margin-bottom: 1.5rem;
  color: #333;
}

ul {
  margin: 0rem 0 1.5rem 1.5rem;
  list-style-type: square;
  color: #444;
}

li {
  margin-bottom: 0.75rem;
}

/* ===== Hero Banner ===== */
.hero {
  position: relative;
  height: auto;
  /* Remove background property here */
  /* background: url("images/hero-bg.jpg") no-repeat center center/cover; */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
}

.hero::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 33, 71, 0.478); /* navy overlay for contrast */
}

/* Responsive Hero Section */
.hero-overlay {
  position: relative;
  z-index: 2;
  max-width: 1000px;
  padding: 2rem;
  display: block;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
}

.hero-overlay h1 {
  width: 100%;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-family: "Lato", Arial, sans-serif;
  color: aliceblue;
  text-shadow: 0.125px 0.25px black, 0.25px 0.5px black, 0.375px 0.75px black,
    0.5px 1px black, 0.625px 1.25px black, 0.75px 1.5px black, 0.875px 1.75px black;
  text-align: center;
  word-break: break-word;
}

.hero-overlay p {
  font-size: 1.35rem;
  margin-bottom: .25rem;
  font-family: "Merriweather", Georgia, serif;
  color: aliceblue;
  text-shadow: 0.125px 0.25px black, 0.25px 0.5px black, 0.375px 0.75px black,
    0.5px 1px black, 0.625px 1.25px black, 0.75px 1.5px black;
  text-align: center;
  word-break: break-word;
}

.hero-brand {
  /* Remove absolute positioning for mobile friendliness */
  position: static;
  top: auto;
  left: auto;
  transform: none;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto 1rem auto;
  font-size: 2.5rem;
  font-weight: 700;
  color: aliceblue;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-shadow: 0.125px 0.25px black, 0.25px 0.5px black, 0.375px 0.75px black,
    0.5px 1px black, 0.625px 1.25px black, 0.75px 1.5px black;
  box-sizing: border-box;
  margin-bottom: 1.5rem;
}

.hero-signature {
  font-family: 'Dancing Script', cursive; /* calligraphy style */
  font-size: 2.5rem;
  color: #cdae79; /* gold accent for prestige */  
  text-shadow: 0.125px 0.25px black, 0.25px 0.5px black, 0.375px 0.75px black,
    0.5px 1px black, 0.625px 1.25px black, 0.75px 1.5px black;
  display: block;
}

.hero .btn{
  margin-top: 0.6rem;
  display: inline-block;
  width: auto;
  min-width: 120px;
  max-width: 90vw;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.5rem;
  text-align: center;
}

.hero .btn-secondary {
  margin-top: 0.6rem;
  display: inline-block;
  width: auto;
  min-width: 120px;
  max-width: 90vw;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.5rem;
  text-align: center;
  background: linear-gradient(120deg, #004d80 0%, #1185e3 100%);
  border: 2px solid #cdae79; /* gold accent border */
  color: #fff; /* white text for contrast */
  box-shadow: 0 4px 16px rgba(0, 33, 71, 0.28);
  text-shadow: 0.125px 0.25px black, 0.25px 0.5px black, 0.375px 0.75px black,
    0.5px 1px black, 0.625px 1.25px black, 0.75px 1.5px black;
  /* Remove forced 100% width and max-width for mobile */
}

.hero .btn-secondary:hover {
  background: linear-gradient(120deg, #94c5ea 0%, #004d80 100%);
  color: #fff;
  text-shadow: 0.125px 0.25px black, 0.25px 0.5px black, 0.375px 0.75px black,
    0.5px 1px black, 0.625px 1.25px black, 0.75px 1.5px black;
  box-shadow: 0 8px 24px rgba(0,33,71,0.22);
  border-color: #fff8ec;
}

/* ===== Buttons ===== */
.btn, .btn-secondary {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  margin: 0.75rem;
  border-radius: 1px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn {  
  border: 2px solid #a1d5f8;
  background: linear-gradient(
    to right,
    rgb(60, 137, 209),
    rgb(18, 67, 112),
    rgb(13, 41, 66),
    rgb(18, 67, 112),
    rgb(60, 137, 209)
  );
  color: #fff;
  box-sizing: border-box;
  text-shadow: 0.125px 0.25px black, 0.25px 0.5px black, 0.375px 0.75px black,
    0.5px 1px black, 0.625px 1.25px black, 0.75px 1.5px black;
}

.btn:hover {
  background: #c5a46d;
  border-color: #c5a46d;
  color: #fff;
}

.btn-secondary {
  background: linear-gradient(120deg, #abdafa 0%, #004d8041 100%);
  border: 2px solid black;
  color: rgb(0, 0, 0);
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(0, 33, 71, 0.526);
  text-shadow: 0.125px 0.25px aliceblue, 0.25px 0.5px aliceblue;
  padding: 0.85rem 1.75rem;
  border-radius: 6px;
  transition: background 0.3s, box-shadow 0.3s, color 0.3s;
  cursor: pointer;
  display: inline-block;
}

.btn-secondary:hover {
  background: linear-gradient(120deg, #004d80 0%, #abdafa 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0,33,71,0.18);
  border-color: #c5a46d;
}

.back-btn {
  display: block;
  margin-top: 0.5rem !important;
  margin-bottom: 0.5rem !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 0.4rem 1rem;
  background: #004d80;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.3s ease;
  border: 1px solid #a1d5f8; 
  text-align: center;
  max-width: 220px;
  text-shadow: 0.125px 0.25px black, 0.25px 0.5px black, 0.375px 0.75px black,
    0.5px 1px black, 0.625px 1.25px black, 0.75px 1.5px black;
}

.back-btn:hover {
  background: #c5a46d;
  color: #fff;
  border-color: #c5a46d;
}

/* ===== Services Grid ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.service {
  background: #ffffff;
  padding: 2rem;
  border: 1px solid #002147;
  border-radius: 8px;
  /* Remove solid border-left, use only gradient */
  /* border-left: 4px solid #c5a46d; */
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.511);
  text-align: center;
  font-weight: 600;
  font-size: 1.1rem;
  color: #004d80;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  position: relative; /* Needed for ::before positioning */
}

.service::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  height: 100%;
  border-radius: 8px 0 0 8px;
  background: linear-gradient(
    to bottom,
    rgb(60, 137, 209),
    rgb(18, 67, 112),
    rgb(13, 41, 66),
    rgb(18, 67, 112),
    rgb(60, 137, 209)
  );
  z-index: 1;
}

/* Ensure content is above the gradient bar */
.service > * {
  position: relative;
  z-index: 2;
}

/* Service card sizing for mobile: fit to content, not full width */
@media (max-width: 600px) {
  .services-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }
  .service {
    width: auto;
    min-width: 180px;
    max-width: 95vw;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    text-align: center;
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

.service:hover {
  transform: translateY(-6px);
  box-shadow: 0px 8px 25px rgba(0, 0, 0, 0.12);
}

/* ===== Service Blocks (Services Page) ===== */
.service-block {
  background: #ffffff;
  padding: 3rem;
  margin-bottom: 2.5rem;
  /* Remove border-left, use gradient instead */
  border-left: none;
  border-radius: 6px;
  box-shadow: 0px 3px 12px rgba(0, 0, 0, 0.07);
  position: relative;
}

/* Gradient border-left effect for service-block */
.service-block::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  height: 100%;
  border-radius: 6px 0 0 6px;
  background: linear-gradient(
    to bottom,
    rgb(60, 137, 209),
    rgb(18, 67, 112),
    rgb(13, 41, 66),
    rgb(18, 67, 112),
    rgb(60, 137, 209)
  );
}

.service-block h2 {
  margin-bottom: 0.75rem;
  color: #002147;
}

.service-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 1.5rem;
  margin: 1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  cursor: pointer;   /* 👈 shows the hand cursor */
  text-align: center;
}

.service-card h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #004d80;
}

/* Hover effect */
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  background: #f9fbff;
}


/* ===== Cards (Case Studies / Resources) ===== */
.card {
  background: #ffffff;
  padding: 2.5rem;
  border-radius: 8px;
  margin-bottom: 2.5rem;
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.08);
  border-top: 4px solid #004d80;
}

/* ===== Footer ===== */
footer {
  background: #002147;
  color: #e5e7eb;
  text-align: center;
  padding: 4rem 2rem;
}

footer h2 {
  color: #ffffff;
  margin-bottom: 1rem;
}

footer p {
  max-width: 700px;
  margin: auto;
  margin-bottom: 1.5rem;
  color: #d1d5db;
}

/* === MODAL: Single canonical implementation for all popups === */
.modal, .modal-overlay {
  display: none;
  position: fixed;
  z-index: 10000;
  inset: 0;
  background: rgba(0,0,0,0.65);
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 0;
  opacity: 0;
  transition: opacity 0.3s;
}
.modal.active,
.modal-overlay.active {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto;
}
.modal-content {
  background: #fff;
  margin: 6vh auto;
  padding: 2rem;
  border-radius: 12px;
  width: 95vw;
  max-width: 700px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.22);
  position: relative;
  max-height: 88vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  opacity: 1;
  transform: scale(1);
  transition: transform 0.3s, opacity 0.3s;
}
.modal-close {
  position: absolute;
  top: 0.8rem;
  right: 1.2rem;
  font-size: 2rem;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  z-index: 10;
  background: #fff;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid #eee;
}
@media (max-width: 600px) {
  .modal-content {
    width: 99vw;
    min-width: 0;
    max-width: 99vw;
    padding: 1rem 0.5rem 1.5rem 0.5rem;
    font-size: 1rem;
    margin: 3vh auto 3vh auto;
    max-height: 94vh;
  }
  .modal-close {
    top: 8px;
    right: 10px;
    font-size: 2.2rem;
  }
}

/* Ensure all modal section titles wrap properly */
.modal-content h2,
.modal-content h3,
.modal-content h2#modalTitle {
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  text-align: left;
  max-width: 90%;
}

/* New styles for modal title in modal-content */
.modal-content h2#modalTitle {
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  text-align: left;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  padding: 0 0.5rem;
  max-width: 100%;
  /* Prevents overflow and ensures wrapping */
}

/* ===== Contact Form ===== */
#contact {
  max-width: 700px;
  margin: 3rem auto;
  padding: 2rem;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

#contact h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #002147;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  border: 2px solid #c5a46d;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Hover/Focus effect */
.form-input:focus,
.form-textarea:focus {
  border-color: #004d80;
  outline: none;
  box-shadow: 0 0 6px rgba(0,77,128,0.3);
}

/* Improve form label/input readability on mobile */
@media (max-width: 600px) {
  form label,
  .form-input,
  .form-textarea {
    margin-left: 6vw;
    margin-right: 6vw;
    width: 88vw;
    box-sizing: border-box;
  }
}

/* Make date input fit border on mobile devices */
@media (max-width: 600px) {
  .client-info input[type="date"] {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    min-width: 0;
    max-width: 90%;
  }
}

/* Center and pad scanDate, scanName, and clientName in client-info on mobile */
@media (max-width: 600px) {
  .client-info input[type="date"],
  .client-info input[type="text"] {
    display: block;
    width: 98%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    box-sizing: border-box;
  }
}

/* Make clientName and scanDate inputs exactly the same width and centered on mobile */
@media (max-width: 600px) {
  .client-info input#clientName,
  .client-info input#scanDate {
    display: block;
    width: 96%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    box-sizing: border-box;
  }
}

/* ===== Consultation Questions (Private Page) ===== */
.locked {
  text-align: center;
  padding: 5rem 2rem;
}

.locked input {
  padding: 0.8rem;
  font-size: 1.1rem;
  border: 2px solid #c5a46d;
  border-radius: 6px;
  margin-right: 0.5rem;
}

.locked button {
  padding: 0.8rem 1.2rem;
  background: #004d80;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}

.locked button:hover {
  background: #c5a46d;
}

#errorMessage {
  color: red;
  margin-top: 1rem;
  display: none;
}

.content {
  display: none;
  padding: 2rem;
  max-width: 900px;
  margin: 3rem auto;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.content h1 {
  color: #002147;
  text-align: center;
  margin-bottom: 2rem;
}

.content h2 {
  color: #004d80;
  border-left: 5px solid #c5a46d;
  padding-left: 0.75rem;
  margin-top: 2rem;
}

.note-area {
  width: 100%;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.6rem;
  font-size: 1rem;
  border: 1px solid #c5a46d;
  border-radius: 6px;
}

.export-btn {
  margin-top: 2rem;
  padding: 0.9rem 1.5rem;
  background: #004d80;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
}

.export-btn:hover {
  background: #c5a46d;
}

/* ===== Client Info Block ===== */
.client-info {
  margin-bottom: 2rem;
  padding: 1rem;
  background: #f4f8fb;
  border: 1px solid #c5a46d;
  border-radius: 6px;
}

.client-info label {
  display: block;
  font-weight: bold;
  margin-top: 0.5rem;
  color: #002147;
}

.client-info input {
  width: 100%;
  padding: 0.6rem;
  font-size: 1rem;
  margin-top: 0.3rem;
  margin-bottom: 1rem;
  border: 1px solid #c5a46d;
  border-radius: 4px;
}

/* Make images responsive, especially the RWRM model image */
#model img,
img.responsive,
img[alt~="Romanishan"] {
  max-width: 100vw;
  width: 100%;
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  padding-left: 2vw;
  padding-right: 2vw;
}

/* Responsive image for diplomas and similar content */
.responsive-img,
.diploma-img {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  padding-left: 0;
  padding-right: 0;
}

/* Ensure no horizontal scroll and image fits viewport on all devices */
@media (max-width: 900px) {
  .responsive-img,
  .diploma-img {
    width: 100vw;
    max-width: 100vw;
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 480px) {
  .responsive-img,
  .diploma-img {
    width: 100vw;
    max-width: 100vw;
    padding-left: 0;
    padding-right: 0;
  }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  header h1 {
    font-size: 2.2rem;
    padding-left: 2vw;
    padding-right: 2vw;
  }

  h1 {
    font-size: 2.5rem;
    padding-left: 2vw;
    padding-right: 2vw;
  }

  h2 {
    font-size: 1.6rem;
  }
  
  p {
    padding-left: 2.5vw;
    padding-right: 2.5vw;
  }

  .btn, .btn-secondary {
    padding: 0.65rem 1.2rem;
    font-size: 0.95rem;
  }

  .hero-overlay h1 {
    font-size: 2.2rem;
    width: 100%;
    max-width: 100%;
    padding: 0 0.5rem;
  }
  .hero-overlay p {
    font-size: 1.1rem;
    padding: 0 0.5rem;
  }
  .hero-brand {
    font-size: 1rem;
    max-width: 100%;
    padding: 0 0.5rem;
    margin-bottom: 1.2rem;
  }
  .hero-signature {
    font-size: 1.5rem;
  }
}
@media (max-width: 480px) {
  body {
    font-size: 16px;
  }

  header, section, footer {
    padding: 3rem 1rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .hero-overlay {
    padding: 1rem 0.2rem;
  }
  .hero-overlay h1 {
    font-size: 1.3rem;
    padding: 0 0.2rem;
  }
  .hero-overlay p {
    font-size: 1rem;
    padding: 0 0.2rem;
  }
  .hero-brand {
    font-size: 0.95rem;
    padding: 0 0.2rem;
    margin-bottom: 1rem;
  }
  .hero-signature {
    font-size: 1.3rem;
  }
  .hero .btn, 
  .hero .btn-secondary {
    font-size: 1rem;
    padding: 0.7rem 1.2rem;
    width: auto;
    min-width: 100px;
    max-width: 90vw;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }
}
@media (max-width: 360px) {
  header h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.4rem;
  }
}

/* Resilience Scan: add to styles2.css */
.scan-section { 
  background:#fff; 
  padding:1.25rem; 
  border-radius:8px; 
  box-shadow:0 6px 18px rgba(0,0,0,0.06); 
}

.scan-question { 
  margin:0.9rem 0; 
  display:flex; 
  flex-direction:column; 
  gap:0.35rem; 
}

.scan-question label { 
  font-weight:600; 
  color:#002147; 
}

.scan-question input[type="range"] { 
  width:80%; 
  align-self:flex-start; 
}
.scan-result { background:#fefefe; padding:1rem; border-radius:6px; box-shadow:0 4px 15px rgba(0,0,0,0.06); }
.score-card { background: #f4f7fb; padding:0.6rem 0.8rem; border-radius:6px; text-align:left; }
.score-value { font-size:1.1rem; color:#004d80; margin-top:6px; font-weight:700; }
.client-info label { display:block; margin-top:0.6rem; margin-left: 0.5rem; color:#002147; font-weight:600; }
.client-info input { width:95%; padding:0.5rem; border:1px solid #c5a46d; border-radius:6px; margin-top:0.25rem; margin-left: auto; margin-right: auto;}

@media (max-width:700px) {
  .scan-question input[type="range"] { width:100%; }
  .scores-grid { grid-template-columns: 1fr !important; }
}

/* Center and constrain scan form/questions to header width */
.scan-section {
  /* Already has padding and border-radius */
  max-width: 900px;
  margin: 0 auto;
  box-sizing: border-box;
}

.scan-explanation {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.client-info {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* Modal content width matches scan-section/header */
#scanModal .modal-content {
  max-width: 900px;
}
#scanModal .modal-content {
  max-width: 900px;
}

/* Reciprocity Engine Styles */
.reciprocity-hero {
  background: url('./Images/reciprocity-bg.jpg') center/cover no-repeat;
  color: #fff;
  text-align: center;
  padding: 7rem 1rem;
}

.section-highlight {
  background-color: #f5f8fb;
  padding: 3rem 1.5rem;
  text-align: center;
}

.concept-section, .integration-section, .confidential-section, .cta-section {
  padding: 3rem 1.5rem;
  max-width: 900px;
  margin: auto;
}

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

.confidential-section {
  background-color: #fdfcf8;
  border-top: 4px solid #c5a46d;
  border-bottom: 4px solid #c5a46d;
}

.cta-section {
  background: linear-gradient(180deg, #111 0%, #222 100%);
  color: #fff;
  text-align: center;
}

.cta-section .btn-primary {
  margin-top: 1rem;
  background-color: #c5a46d;
  color: #111;
  font-weight: 700;
}
.cta-section .btn-primary:hover {
  background-color: #a1885c;
  color: #fff;
}

/* Reciprocity Quotient Gauge */
.rq-section {
  text-align: center;
  background: #f7f9fb;
  padding: 4rem 1.5rem;
  border-top: 3px solid #c5a46d;
  border-bottom: 3px solid #c5a46d;
}

.rq-gauge {
  position: relative;
  width: 220px;
  height: 110px;
  margin: 2rem auto;
  background: linear-gradient(180deg, #eee 0%, #ddd 100%);
  border-radius: 220px 220px 0 0;
  overflow: hidden;
  box-shadow: inset 0 -3px 10px rgba(0,0,0,0.15);
}

.rq-needle {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 4px;
  height: 90px;
  background: #c5a46d;
  transform-origin: bottom center;
  transform: rotate(0deg);
  transition: transform 1.5s ease-out;
}

.rq-center {
  position: absolute;
  bottom: -10px;
  left: 50%;
  width: 20px;
  height: 20px;
  background: #111;
  border-radius: 50%;
  transform: translateX(-50%);
}

.rq-value {
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.75rem;
  font-weight: 700;
  color: #333;
}

.rq-legend {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.25rem;
  font-size: 0.95rem;
}

.rq-legend .dot {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 50%;
  margin-right: 0.4rem;
}

.dot-low { background: #c0392b; }
.dot-mid { background: #f1c40f; }
.dot-high { background: #27ae60; }

.rq-insight {
  margin-top: 1.25rem;
  font-style: italic;
  color: #555;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Pulse center of gauge */
.rq-center {
  position: absolute;
  bottom: -10px;
  left: 50%;
  width: 20px;
  height: 20px;
  background: #111;
  border-radius: 50%;
  transform: translateX(-50%);
  animation: pulse 2.5s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 1; }
  50% { transform: translateX(-50%) scale(1.2); opacity: 0.6; }
}


/* ===== Resilience Readiness Scan Enhancements ===== */

/* Layout container */
.scan-container {
  max-width: 1000px;
  margin: 2rem auto 4rem auto;
  padding: 0 1rem;
}

/* Introductory guidance panel */
.scan-guidance {
  background: #f4f8fb;
  border-left: 6px solid #c5a46d;
  padding: 1.5rem;
  border-radius: 8px;
  margin: 2rem auto 2.5rem auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.scan-guidance h3 {
  margin-bottom: 0.75rem;
  color: #002147;
}

.scan-guidance ul {
  list-style-type: disc;
  margin-left: 1.5rem;
}

/* Question presentation */
.scan-question {
  margin: 1.25rem 0;
  padding: 0.75rem 1rem;
  background: #ffffff;
  border-radius: 6px;
  border-left: 4px solid #c5a46d;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.scan-question:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.08);
}

/* Range slider styling */
.scan-question input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #abdafa, #004d80);
  outline: none;
  opacity: 0.9;
  transition: opacity 0.3s;
  cursor: pointer;
}

.scan-question input[type="range"]:hover {
  opacity: 1;
}

/* Range thumb */
.scan-question input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #c5a46d;
  cursor: pointer;
  transition: transform 0.2s;
}

.scan-question input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.scan-question input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #c5a46d;
  cursor: pointer;
}

/* Modal content refinement */
#scanModal .modal-content {
  background: #ffffff;
  border-top: 6px solid #004d80;
  max-width: 900px;
  padding: 2rem;
  border-radius: 8px;
  font-size: 1rem;
}

/* Buttons within modal */
#scanModal .btn,
#scanModal .btn-secondary {
  margin-top: 1rem;
}

/* Make modal .btn-secondary look like .btn in the modal */
#scanModal .btn-secondary {
  background: linear-gradient(
    to right,
    rgb(60, 137, 209),
    rgb(18, 67, 112),
    rgb(13, 41, 66),
    rgb(18, 67, 112),
    rgb(60, 137, 209)
  );
  border: 2px solid #a1d5f8;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 33, 71, 0.28);
  text-shadow: 0.125px 0.25px black, 0.25px 0.5px black, 0.375px 0.75px black,
    0.5px 1px black, 0.625px 1.25px black, 0.75px 1.5px black;
  border-radius: 1px;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 1.75rem;
  margin: 0.75rem;
  transition: all 0.3s ease;
}

#scanModal .btn-secondary:hover {
  background: #c5a46d;
  border-color: #c5a46d;
  color: #fff;
}

/* Subtle responsive tweaks */
@media (max-width: 600px) {
  .scan-guidance {
    padding: 1rem;
    font-size: 0.95rem;
  }
  .scan-question {
    padding: 0.75rem;
  }
  .scan-question label {
    margin-left: 5px;
  }
}

/* Center all elements in .center-content */
.center-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.center-content form {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.center-content label,
.center-content input,
.center-content textarea,
.center-content select,
.center-content .reciprocity-block,
.center-content .form-buttons {
  align-self: center;
  text-align: center;
}

/* Remove inline styles from .reciprocity-block and .form-buttons */
.reciprocity-block {
  background: #f8fafc;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.form-buttons {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Page-specific styles (keeps consistent with styles2.css) */
    .calc-hero {
      padding: 3.5rem 1rem;
      text-align: center;
      background: linear-gradient(120deg, #002147, #004d80);
      color: #fff;
      border-bottom: 4px solid #c5a46d;
    }

    .calc-wrap { max-width: 980px; margin: 2rem auto; padding: 1rem; }

    .rq-grid {
      display: grid;
      grid-template-columns: 1fr 360px;
      gap: 2rem;
      align-items: start;
    }

    .controls {
      background: #fff;
      padding: 1.25rem;
      border-radius: 10px;
      box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    }

    .control-row { margin-bottom: 1rem; }
    .control-row label { display:block; font-weight:700; color:#002147; margin-bottom:0.35rem; }
    .control-row .range-value { font-weight:700; color:#004d80; margin-left:0.5rem; }

    .rq-panel {
      background: linear-gradient(180deg,#fbfdfe,#f4f8fb);
      padding: 1.5rem;
      border-radius: 10px;
      text-align: center;
      box-shadow: 0 8px 20px rgba(0,0,0,0.04);
    }

    /* Gauge */
    .gauge-wrap { margin: 1rem auto 0 auto; width: 260px; height: 140px; position: relative; }
    .gauge-arc {
      width: 100%; height: 100%;
      border-radius: 260px 260px 0 0;
      background: linear-gradient(180deg,#eee,#ddd);
      overflow: hidden;
      box-shadow: inset 0 -3px 12px rgba(0,0,0,0.08);
      position: relative;
    }
    .needle {
      position:absolute;
      bottom: 0;
      left: 50%;
      width: 4px;
      height: 110px;
      background: #c5a46d;
      transform-origin: bottom center;
      transform: rotate(-90deg);
      transition: transform 1.4s cubic-bezier(.4,.0,.2,1);
      box-shadow: 0 2px 6px rgba(0,0,0,0.12);
      border-radius: 2px;
    }
    .gauge-center {
      position:absolute;
      bottom: -8px;
      left: 50%;
      transform: translateX(-50%);
      width: 22px; height: 22px;
      background: #111; border-radius:50%;
      box-shadow: 0 2px 6px rgba(0,0,0,0.12);
      animation: pulse 2.6s infinite ease-in-out;
    }
    @keyframes pulse {
      0%,100% { transform: translateX(-50%) scale(1); opacity:1; }
      50% { transform: translateX(-50%) scale(1.15); opacity:0.7; }
    }

    .rq-bubble { font-size: 2.2rem; font-weight:800; color:#0b2545; margin-top: 6px; }
    .rq-tier { margin-top: 8px; font-weight:700; color:#004d80; }
    .rq-desc { margin-top:0.8rem; color:#444; font-style:italic; max-width:340px; margin-left:auto;margin-right:auto; }

    .legend { display:flex; justify-content:center; gap:1rem; margin-top:1rem; font-size:0.95rem; color:#444; }
    .legend .dot { width:10px;height:10px;border-radius:50%;display:inline-block;margin-right:0.5rem; }
    .dot-low { background:#c0392b; } .dot-mid { background:#f1c40f; } .dot-high { background:#27ae60; }

    .calc-actions { margin-top:1rem; display:flex; gap:0.75rem; justify-content:center; flex-wrap:wrap; }
    .btn { padding:0.65rem 1rem; border-radius:6px; border:none; font-weight:700; cursor:pointer; }
    .btn-primary { background:#004d80; color:#fff; }
    .btn-alt { background:transparent; border:2px solid #004d80; color:#004d80; }

    @media (max-width:980px) {
      .rq-grid { grid-template-columns: 1fr; }
      .gauge-wrap { margin-top:0; width: 220px; height:120px; }
    }

     /* Page-specific styling */
    .erd-hero {
      background: linear-gradient(120deg,#002147,#004d80);
      color:#fff;
      text-align:center;
      padding:3.25rem 1rem;
      border-bottom:4px solid #c5a46d;
    }
    .erd-wrap { max-width:1100px; margin:2rem auto; padding:1rem; box-sizing:border-box; }
    .erd-intro { background:#f4f7fb; padding:1rem 1.25rem; border-radius:8px; margin-bottom:1rem; color:#14324a; }
    .erd-grid { display:grid; grid-template-columns: 1fr 360px; gap:1.5rem; align-items:start; }
    .survey-panel { background:#fff; padding:1rem 1.25rem; border-radius:8px; box-shadow:0 8px 20px rgba(0,0,0,0.04); }
    .help { font-size:0.95rem; color:#555; margin-bottom:0.75rem; }
    .domain-block { margin-bottom:1.25rem; border-left:4px solid #c5a46d; padding:0.75rem 1rem; border-radius:6px; background:#fff; }
    .q-row { display:flex; flex-direction:column; gap:0.3rem; margin:0.45rem 0; }
    .q-row label { font-weight:700; color:#002147; }
    .q-row input[type="range"] { width:100%; }
    .range-num { font-weight:700; color:#004d80; margin-left:0.5rem; }
    .results-panel { background:linear-gradient(180deg,#fff,#f7fafc); padding:1rem; border-radius:8px; box-shadow:0 8px 20px rgba(0,0,0,0.04); }
    .heatbar { height:18px; border-radius:10px; background:#eee; overflow:hidden; margin-top:8px; }
    .heatfill { height:100%; transition:width 900ms cubic-bezier(.2,.8,.2,1); }
    .domain-score { display:flex; justify-content:space-between; align-items:center; gap:0.5rem; margin-top:0.65rem; }
    .overall-block { margin-top:1rem; padding:0.75rem; border-radius:8px; background:#fff8e6; border:1px solid #f2e1b6; }
    .interpret { margin-top:0.6rem; color:#333; }
    .actions { display:flex; gap:0.75rem; margin-top:1rem; flex-wrap:wrap; justify-content:flex-start; }
    
    .btn { 
      padding:0.6rem 0.9rem; 
      border-radius:6px; 
      font-weight:700; 
      cursor:pointer; 
      border:none; 
    }
    
    .btn-primary { 
      background:#004d80;
      color:#fff; 
    }
    
    .btn-secondary { 
      background:transparent;
      color:#004d80;
      border:2px solid #004d80; 
    }
    
    .tooltip { 
      font-size:0.9rem; 
      color:#666; display:block; 
      margin-top:0.3rem; 
    }
    
    @media (max-width:980px) { 
      .erd-grid {grid-template-columns: 1fr; } 
      .results-panel {margin-top:1rem; } 
    }
  
    
  .modal-overlay {
    position: fixed;
    top:0; left:0; right:0; bottom:0;
    background:rgba(0,0,0,0.6);
    display:flex;
    justify-content:center;
    align-items:center;
    z-index:9999;
  }

  /* Modal reveal animation styles */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  transform: scale(0.95);
  opacity: 0;
  transition: all 0.5s ease-out;
}

.modal-content.reveal {
  transform: scale(1);
  opacity: 1;
}

.fade-in {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Consolidated slider scale (1..7) — absolute-positioned ticks aligned to slider track */
.q-row {
  position: relative;
  padding-bottom: 40px; /* reserve space for ticks below the slider */
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 0.45rem 0;
}

/* Ensure the range fills the row so percent left aligns correctly */
.q-row input[type="range"] {
  width: 100%;
  background: linear-gradient(90deg, #abdafa, #004d80);
  border-radius: 4px;
  height: 3px;
  -webkit-appearance: none;
  appearance: none;
}

/* Range thumb */
.q-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #c5a46d;
  cursor: pointer;
  transition: transform 0.2s;
}

.q-row input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.q-row input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #c5a46d;
  cursor: pointer;
}

/* The scale spans the slider area but is inset by half the thumb width so 0% and 100% align with thumb centers.
   If you change thumb size, update the inset (9px = half of 18px thumb) */
.slider-scale {
  position: absolute;
  left: 9px;    /* inset = half thumb width */
  right: 9px;   /* inset = half thumb width */
  bottom: 6px;  /* place just below the slider track */
  height: 28px;
  pointer-events: none; /* clicks pass through to the slider */
  user-select: none;
}

/* Each tick is positioned by JS via left: X% and centered with translateX(-50%) */
.slider-scale span {
  position: absolute;
  top: 6px;
  transform: translateX(-50%);
  font-size: 0.85rem;
  color: #556;
  opacity: 0.85;
  transition: color 160ms ease, transform 160ms ease, opacity 160ms ease;
  pointer-events: none;
}

/* Vertical tick mark above the number */
.slider-scale span::before {
  content: "";
  display: block;
  height: 8px;
  width: 2px;
  margin: 0 auto 6px auto;
  background: #ccc;
  border-radius: 1px;
  opacity: 0.95;
}

/* Active tick state */
.slider-scale span.active {
  color: #004d80;
  font-weight: 700;
  transform: translateX(-50%) translateY(-3px);
  opacity: 1;
}
.slider-scale span.active::before {
  background: #004d80;
}

/* === ERQ Level 2 UX additions === */

/* modal reveal animation */
.modal-overlay.active { display:flex; align-items:center; justify-content:center; }
.modal-content.reveal { transform: translateY(0); opacity: 1; transition: transform 320ms ease, opacity 320ms ease; }
.modal-content { transform: translateY(8px); opacity: 0; }

/* slider-scale ticks */
.slider-scale { display:flex; gap:6px; margin-top:6px; justify-content:flex-start; font-size:0.85rem; color:#666; user-select:none; }
.slider-scale span { display:inline-block; width:20px; text-align:center; padding:2px 0; border-radius:4px; opacity:0.6; transition: all 160ms; }
.slider-scale span.active { background:#e6f1fb; color:#004d80; font-weight:700; opacity:1; box-shadow:0 1px 3px rgba(0,0,0,0.06); }

/* energy meter */
svg.energy-meter { width:92px; height:92px; display:block; margin-right:12px; }
svg.energy-meter .em-text { font-family: 'Lato', Arial, sans-serif; }

/* modal small spinner (if used) */
.spinner { width:48px; height:48px; border-radius:50%; }

/* modal actions spacing */
.modal-actions { margin-top:12px; display:flex; gap:8px; justify-content:center; align-items:center; flex-wrap:wrap; }

/* small responsive tweaks */
@media (max-width:700px){
  .modal-content { width:94vw; padding:1rem; }
  svg.energy-meter { width:76px; height:76px; margin-right:10px; }
}

/* Page container */
    .consultation-form { padding: 2rem 1rem 4rem; }
    .form-wrap {
      max-width: 1100px;
      margin: 2rem auto;
      display: grid;
      grid-template-columns: 1fr 380px;
      gap: 2rem;
      align-items: start;
    }

    /* Form card (column 1) */
    .consult-card {
      background: #ffffff;
      border-radius: 12px;
      padding: 1.5rem 1.5rem;
      box-shadow: 0 12px 30px rgba(6,32,63,0.08);
      border: 1px solid rgba(11,37,69,0.04);
    }
    .consult-card h2 { margin-bottom: 0.5rem; color: #002147; font-size: 1.25rem; }
    .consult-card label { display:block; font-weight:700; color:#0b2545; margin-top:1rem; margin-bottom:0.4rem; }
    .consult-card input[type="text"],
    .consult-card input[type="email"],
    .consult-card input[type="tel"],
    .consult-card input[type="date"],
    .consult-card textarea,
    .consult-card select {
      width: 100%;
      padding: 0.85rem;
      border-radius: 8px;
      border: 1px solid #dfeaf4;
      background: #fbfdff;
      font-size: 0.98rem;
      color: #102a44;
      box-sizing: border-box;
    }
    .consult-card textarea { min-height: 110px; resize: vertical; }

    /* Right column summary card */
    .summary-card {
      background: linear-gradient(180deg,#fbfdfe,#f4f8fb);
      border-radius: 12px;
      padding: 1.25rem;
      box-shadow: 0 10px 26px rgba(6,32,63,0.06);
      border-left: 4px solid #c5a46d;
      display:flex;
      flex-direction:column;
      gap: 0.75rem;
    }
    .summary-card h3 { margin:0; color:#002147; font-size:1.1rem; }
    .summary-item { font-size:0.95rem; color:#263a50; }

    /* Reciprocity block (prominent) */
    .reciprocity-block {
      background: #fff;
      border-radius: 10px;
      padding: 0.9rem;
      border: 1px solid #e6eef7;
      display:flex;
      flex-direction:column;
      gap:0.6rem;
    }
    .reciprocity-row { display:flex; gap:0.75rem; align-items:center; }
    .reciprocity-label { font-weight:700; color:#0b2545; min-width:0; flex:1; }
    .reciprocity-indicator { width:120px; text-align:center; font-weight:800; color:#004d80; font-size:1.1rem; }

    /* Buttons (partnership tone B2) */
    .btn-cta { background:#0b2545; color:#fff; border-radius:8px; padding:0.75rem 1rem; border:0; font-weight:700; cursor:pointer; }
    .btn-ghost { background:transparent; color:#0b2545; border:2px solid rgba(11,37,69,0.12); border-radius:8px; padding:0.7rem 0.9rem; cursor:pointer; }
    .muted { color:#566978; font-size:0.94rem; }

    /* Form actions */
    .form-actions { display:flex; gap:0.5rem; margin-top:1rem; flex-wrap:wrap; }

    /* Slider styling tuned to your site */
    .range-wrap { display:flex; gap:0.9rem; align-items:center; }
    .range-wrap input[type="range"] { width:100%; height:6px; background:linear-gradient(90deg,#abdafa,#004d80); border-radius:6px; -webkit-appearance:none; appearance:none; }
    .range-wrap input[type="range"]::-webkit-slider-thumb { -webkit-appearance:none; width:18px; height:18px; border-radius:50%; background:#c5a46d; box-shadow: 0 2px 6px rgba(0,0,0,0.14); }
    .scale-row { display:flex; justify-content:space-between; margin-top:6px; font-size:0.86rem; color:#65778a; }

    /* Responsive */
    @media (max-width:980px) {
      .form-wrap { grid-template-columns: 1fr; padding:0 0.5rem; }
      .summary-card { order: -1; }
    }

    /* subtle small print */
    .small-print { font-size:0.86rem; color:#6b7b8b; }

    /* === MODAL FIX PATCH === */
.modal.active,
.modal-overlay.active {
  display: flex !important;
  opacity: 1 !important;
  justify-content: center;
  align-items: center;
}

.modal.active .modal-content,
.modal-overlay.active .modal-content {
  opacity: 1 !important;
  transform: scale(1) !important;
}
