/*
  Stylesheet for MedJuris Partners’ legal nurse consulting website.
  The layout uses flexbox and CSS grid to ensure responsiveness and a clean
  presentation. The colour palette uses deep navy and vibrant teal tones
  to convey professionalism, trust and modern sophistication.
*/

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  /* Use a refined sans serif font for body text; Open Sans is readable and modern */
  font-family: 'Open Sans', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--primary-light);
}

/* Use a refined serif font for headings to evoke a high‑end legal aesthetic */
h1,
h2,
h3,
h4 {
  /* Playfair Display evokes sophistication and a high‑end legal aesthetic */
  font-family: 'Playfair Display', serif;
  color: var(--text-dark);
}

/* Container for consistent width */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Colour palette */
:root {
  /* Colour palette tuned for a refined, high‑end feel.  A deep navy conveys authority and trust while a warm metallic accent evokes quality. */
  /* Updated colour palette for MedJuris Partners: deep blue and vibrant teal convey professionalism with a modern edge */
  --primary-dark: #0d253f;
  --primary-light: #f7f9fc;
  --accent: #007a96; /* teal accent for calls to action and highlights */
  --accent-hover: #00617a;
  --text-dark: #1d2e47;
  --text-muted: #667a91;
}

/* Navigation styles */
.navbar {
  background: var(--primary-dark);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
}
.navbar .logo {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.4rem;
  /* Set a neutral colour here; the anchor inside will define its own colour */
  color: #fff;
}

/* Colour for the firm name in the navigation bar */
.navbar .logo a {
  color: #e0c660;
  text-decoration: none;
}

/* Logo symbol next to the brand name */
.logo-symbol {
  width: 32px;
  height: 32px;
  margin-right: 0.4rem;
}
.navbar nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
}
.navbar nav a {
  text-decoration: none;
  color: #e0e7f1;
  font-weight: 600;
  transition: color 0.2s;
  font-size: 0.95rem;
}
.navbar nav a:hover {
  color: #fff;
}
/* Active page link */
.navbar nav a.active {
  color: #fff;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}

/* Running line animation for hero sections
   A subtle moving line at the bottom of each hero adds dynamism to the page
   without distracting from the content. */
.running-line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, var(--accent), transparent);
  background-size: 200% 100%;
  animation: slide 8s linear infinite;
}

@keyframes slide {
  from { background-position: 0 0; }
  to { background-position: -200% 0; }
}

/* Ensure hero sections hide overflow so the running line stays within bounds */
.hero {
  overflow: hidden;
}

/* Hero section */
/* Hero section
   The `background-image` is defined inline for each page to allow reuse of a
   single CSS class. Height is reduced on sub‑pages via `.sub-hero`. */
.hero {
  position: relative;
  height: 80vh;
  min-height: 500px;
  /* Remove any default background images here; the logo watermark will be applied via the ::before pseudo element */
  background-color: var(--primary-dark);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  overflow: hidden;
}
.hero.sub-hero {
  height: 50vh;
  min-height: 300px;
}
.hero .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Darken the overlay for better contrast against the lighter hero artwork */
  /* Slightly lighten the overlay so the watermark and logo are more visible while keeping the text readable */
  /* Further lighten the overlay so the watermark logo stands out more */
  background: rgba(0, 23, 45, 0.45);
}
.hero .hero-content {
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-size: 2.7rem;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  color: #ffffff;
}
.hero p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 1.5rem;
  color: #f3f8ff;
}

/* Add a faint logo watermark behind all hero sections */
.hero::before {
  content: "";
  /* Hide the logo in the hero area; it will appear on the white section instead */
  display: none;
}

/* Place a faint text watermark on every hero */
.hero::after {
  content: "MedJuris Partners";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Playfair Display', serif;
  /* Reduce the prominence of the firm name on the hero; it remains as a subtle marker */
  font-size: 7rem;
  color: rgba(255, 255, 255, 0.05);
  white-space: nowrap;
  z-index: 0;
  pointer-events: none;
}

/* Ensure hero content appears above watermarks */
.hero .hero-content {
  position: relative;
  z-index: 2;
}

/* Provide spacing below hero CTA button so it doesn't overlap content */
.hero .hero-content .btn {
  margin-top: 1rem;
}
.btn {
  background: var(--accent);
  color: #fff;
  padding: 0.7rem 1.6rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  transition: background 0.3s;
}
.btn:hover {
  background: var(--accent-hover);
}

/* Section styling */
.section {
  padding: 4rem 0;
  background: var(--primary-light);
}
.section h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: #1a3458;
  font-size: 2rem;
}

/* Services section */
.services .cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

/* Generic three column grid (used on the home page services overview) */
.three-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}
.card {
  background: #ffffff;
  border-radius: 6px;
  padding: 1.5rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.card h3 {
  margin-top: 0;
  color: #1a3458;
  font-size: 1.2rem;
}
.card p {
  margin: 0.5rem 0 0;
}

/* About section */
.about .about-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.about .text {
  flex: 2;
}
.about p {
  margin-bottom: 1rem;
}

/* About detail page */
.about-detail .about-text {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.05rem;
  color: #555;
  line-height: 1.6;
}

/* Portal detail */
.portal-detail p {
  max-width: 800px;
  margin: 0 auto 1.5rem;
  color: #555;
  font-size: 1.05rem;
}
.portal-detail .btn {
  margin-top: 1rem;
}

/* Experience section */
.timeline {
  border-left: 2px solid #e5e5e5;
  margin-left: 1rem;
  padding-left: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.timeline-item h3 {
  margin: 0;
  color: #1a3458;
  font-size: 1.2rem;
}
.timeline-item span {
  display: block;
  font-size: 0.9rem;
  color: #6b778d;
  margin-bottom: 0.3rem;
}
.timeline-item p {
  margin: 0;
  font-size: 0.95rem;
}

/* Services detail blocks on the services page */
.services-detail .service-block {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.services-detail .service-block h3 {
  margin-top: 0;
  color: #1a3458;
  font-size: 1.4rem;
}
.services-detail .service-block p {
  margin: 0.5rem 0 0;
}

/* Contact section */
.contact-info {
  margin-bottom: 1.5rem;
}
.contact-info p {
  margin: 0.3rem 0;
}
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.contact-form label {
  font-weight: 600;
}
.contact-form input,
.contact-form textarea {
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 1rem;
  width: 100%;
}
.contact-form button {
  width: fit-content;
  align-self: flex-start;
}

/* Text links used for "Learn more" */
.text-link {
  color: #345580;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  margin-top: 0.5rem;
}
.text-link:hover {
  text-decoration: underline;
}

/* Intro section (home page) */
.intro p {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
  color: #555;
}

/* CTA section */
.cta {
  background: var(--primary-dark);
  text-align: center;
  color: #e0e7f1;
}
.cta h2 {
  margin-bottom: 0.5rem;
  color: #fff;
}
.cta p {
  margin-bottom: 1.5rem;
  color: #cfd8e3;
}

/* Blog page */
.blog-list .blog-item {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.blog-list .blog-item h3 {
  margin-top: 0;
  color: #1a3458;
}
.blog-list .blog-item p {
  margin: 0.5rem 0 0.7rem;
}

/* FAQ page */
.faq .faq-item {
  margin-bottom: 1.5rem;
}
.faq .faq-item h3 {
  margin: 0 0 0.3rem;
  color: #1a3458;
  font-size: 1.2rem;
}
.faq .faq-item p {
  margin: 0;
  color: #555;
  line-height: 1.5;
}

/*
 * Watermark on light sections
 * Sections with the class `with-watermark` will display the logo faintly on the white background.
 */
.with-watermark {
  position: relative;
  overflow: hidden;
}
.with-watermark::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('logo_option1.png');
  background-repeat: no-repeat;
  background-position: center;
  /* Make the watermark span a larger portion of the white background */
  background-size: 80%;
  opacity: 0.06;
  z-index: 0;
}
.with-watermark > * {
  position: relative;
  z-index: 1;
}

/* Footer */
.footer {
  background: var(--primary-dark);
  padding: 1.2rem 0;
  text-align: center;
  font-size: 0.9rem;
  color: #cfd8e3;
}

/* Decorative graphic on the services page */
.service-graphic {
  width: 100%;
  max-width: 800px;
  display: block;
  margin: 0.5rem auto 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Testimonials */
.section.testimonials { padding: 3rem 1rem; background: #f8fafc; }
.section.testimonials h2 { text-align:center; margin-bottom:1.5rem; }
.testimonials-grid { display:grid; gap:1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.testimonials-grid blockquote { background:#fff; border-left:4px solid #bfa264; padding:1rem; margin:0; border-radius:12px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.testimonials-grid footer { margin-top:.75rem; font-size:.9rem; color:#475569; }



/* Page Hero Banners */
.page-hero {
  position: relative; 
  min-height: 40vh; 
  background-size: cover; 
  background-position: center; 
  display: grid; 
  place-items: center; 
  color: #fff; 
  text-align:center;
}
.page-hero::after {
  content: ""; position:absolute; inset:0; background: rgba(0,0,0,.35);
}
.page-hero > * { position: relative; z-index: 1; }
.page-hero .hero-title { font-size: clamp(1.75rem, 3vw, 2.5rem); margin: 0; }
.page-hero .hero-sub { font-size: clamp(1rem, 1.8vw, 1.25rem); opacity:.95; }



/* Sticky header CTA */
header, .site-header { position: sticky; top: 0; z-index: 1000; backdrop-filter: saturate(180%) blur(6px); background: rgba(255,255,255,.9); }
.nav-cta { display:inline-block; padding: .6rem 1rem; border-radius: 999px; border: 2px solid #bfa264; color: #1f2937; text-decoration:none; font-weight:600; transition: all .2s ease; }
.nav-cta:hover { background:#bfa264; color:#fff; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(191,162,100,.25); }

/* Section alternation */
.section-alt { background: #f8fafc; }
.section { padding: 3rem 1rem; }

/* Service icon grid */
.services-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap:1.25rem; }
.service-card { background:#fff; border-radius:14px; padding:1.25rem; box-shadow: 0 6px 20px rgba(0,0,0,.06); transition: transform .2s ease, box-shadow .2s ease; }
.service-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,.10); }
.service-card .icon { width: 48px; height: 48px; margin-bottom:.75rem; }

/* Credentials bar */
.credentials { display:flex; flex-wrap:wrap; gap:.75rem; align-items:center; justify-content:center; padding:1rem; }
.credentials img { height: 32px; opacity:.9; filter: grayscale(100%); transition: filter .2s ease, opacity .2s ease; }
.credentials img:hover { filter: grayscale(0%); opacity:1; }

/* Soft reveal animation */
.reveal { opacity:0; transform: translateY(10px); animation: riseIn .6s ease forwards; }
@keyframes riseIn { to { opacity:1; transform: translateY(0); } }

/* Buttons common */
.btn { display:inline-block; padding:.75rem 1.25rem; border-radius:12px; background:#1f2937; color:#fff; text-decoration:none; font-weight:600; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(0,0,0,.12); background:#111827; }

/* Blog CTA */
.blog-cta { margin-top:1rem; display:inline-block; }


/* re-applying styles already appended above if needed */


/* --- Unified Page Hero (no split) --- */
:root { --header-h: 64px; }
.site-header { min-height: var(--header-h); }

.page-hero {
  position: relative;
  width: 100%;
  min-height: clamp(240px, 38vh, 420px);
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  margin: 0; padding: 0;
}
.page-hero .hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transform: translateZ(0); /* prevent rendering seams */
}
.page-hero .hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.35));
}
.page-hero .hero-content {
  position: relative; z-index: 1;
  padding: calc(var(--header-h) + 12px) 1rem 2rem; /* account for sticky header */
  color: #fff;
  text-shadow: 0 2px 16px rgba(0,0,0,.45);
}
.page-hero .hero-title { 
  margin: 0 0 .35rem 0; 
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
}
.page-hero .hero-sub { 
  margin: 0; 
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  opacity: .95;
}

/* Ensure following section doesn't tuck under sticky header */
main, .content, .container { padding-top: 0.5rem; }


/* Reduce blue area height on Contact page */
body.contact-page .section {
  padding-top: 2rem !important;
  padding-bottom: 2rem !important;
}


/* Contact page: reduce blue sub-hero height by ~50% */
body.contact-page .hero.sub-hero {
  padding-top: 2rem !important;
  padding-bottom: 2rem !important;
  min-height: unset !important;
}



/* Contact form cleanup */
.contact-form { max-width: 720px; margin: 2rem auto; padding: 0 1rem; }
.contact-form .cf-label { display: block; font-weight: 600; margin: 0 0 .5rem; }
.contact-form .cf-input, .contact-form .cf-textarea {
  width: 100%; box-sizing: border-box; padding: .75rem 1rem; margin: 0 0 1rem;
  border: 1px solid rgba(0,0,0,.15); border-radius: .5rem; outline: none;
}
.contact-form .cf-input:focus, .contact-form .cf-textarea:focus { border-color: rgba(0,0,0,.35); }
.contact-form .cf-recaptcha { margin: .75rem 0 1rem; }
.contact-form .cf-submit { display: inline-block; }

