/* Base styles & variables */
:root {
  --primary-blue: #1a1a5b;
  --accent-orange: #ff9900;
  --secondary-yellow: #ffe066;
  --bg-light-grey: #f0f0f0;
  --white: #ffffff;
  --text-dark: #333333;
  
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', Arial, sans-serif;
}

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

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background-color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary-blue);
  margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
p { font-size: 1rem; margin-bottom: 1.5rem; }

a {
  text-decoration: none;
  color: var(--primary-blue);
  transition: all 0.3s ease;
}

ul, ol {
  list-style-position: inside;
  margin-bottom: 1.5rem;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Typography Hierarchy Enhancements */
.hero-headline {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.section-heading {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
}

.section-subheading {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 3rem;
  text-align: center;
  color: #555;
  font-family: var(--font-heading);
}

@media (max-width: 768px) {
  h1, .hero-headline { font-size: 2.5rem; }
  h2, .section-heading { font-size: 2rem; }
  h3 { font-size: 1.5rem; }
}

/* Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

.section-padding {
  padding: 5rem 0;
}

.bg-light { background-color: var(--bg-light-grey); }
.bg-blue { background-color: var(--primary-blue); color: var(--white); }
.bg-blue h2, .bg-blue h3, .bg-blue p { color: var(--white); }

/* Texture overlay for lighter sections */
.bg-texture {
  position: relative;
}
.bg-texture::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="0.05"/%3E%3C/svg%3E');
  pointer-events: none;
  z-index: 0;
}
.bg-texture > * {
  position: relative;
  z-index: 1;
}

/* Header & Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 1000;
  transition: all 0.3s ease;
  height: 90px;
  display: flex;
  align-items: center;
}

.site-header.compact {
  height: 70px;
}

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

.logo img {
  height: 50px;
  transition: height 0.3s ease;
}
.site-header.compact .logo img {
  height: 40px;
}

.main-nav {
  display: flex;
  gap: 2rem;
}

.main-nav a {
  font-family: var(--font-heading);
  font-weight: 600;
  position: relative;
  padding: 0.5rem 0;
}

.main-nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: var(--accent-orange);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  width: 100%;
}

.header-ctas {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--accent-orange);
  color: var(--white);
  box-shadow: 0 4px 6px rgba(255, 153, 0, 0.2);
}

.btn-primary:hover, .btn-primary:focus-visible {
  background-color: #e68a00;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(255, 153, 0, 0.3);
  color: var(--white);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}

.btn-outline:hover, .btn-outline:focus-visible {
  background-color: var(--accent-orange);
  color: var(--white);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger-line {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--primary-blue);
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background-color: var(--white);
  box-shadow: -5px 0 15px rgba(0,0,0,0.1);
  z-index: 1001;
  transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
  display: flex;
  flex-direction: column;
  padding: 2rem;
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
}

.close-menu {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--primary-blue);
  cursor: pointer;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.mobile-nav a {
  font-size: 1.25rem;
  font-family: var(--font-heading);
  font-weight: 600;
}

.mobile-contact-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-contact-actions p {
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.overlay.active {
  display: block;
  opacity: 1;
}

@media (max-width: 1023px) {
  .main-nav, .header-ctas {
    display: none;
  }
  .hamburger {
    display: block;
  }
}

/* Hero Sections */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  margin-top: 90px;
  overflow: hidden;
}

.hero-small {
  min-height: 50vh;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  overflow: hidden;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* NO overlay or filters as per HERO IMAGE RULE */
}

/* Desktop Parallax effect */
@media (min-width: 1024px) {
  .hero-bg img {
    height: 120%; /* Extra height for parallax */
    transform: translateY(var(--scroll-offset, 0));
    transition: transform 0.1s cubic-bezier(0.1, 0.5, 0.9, 0.5);
    will-change: transform;
  }
}

/* Because there is no overlay, we must ensure text has a solid or semi-solid background box if needed,
   or just use text-shadow to make it readable. The prompt says "Do NOT add semi-transparent colored divs... over hero images".
   It says "No color overlays". Wait, the PRD says: "Dark overlay for text readability." BUT the system prompt explicitly says: "HERO IMAGE RULE — NO COLOR OVERLAYS (APPLIES TO ALL PAGES): Display hero section images exactly as they are — no exceptions... This rule overrides any color instructions in the PRD — even if the PRD specifies an overlay color, skip it for hero sections".
   So I will NOT use any overlay.
   I will add a text-shadow or a solid background box directly behind the text ONLY to ensure readability, or just rely on the image. Actually, I can put the text in a card-like container with a solid background if needed, but text-shadow is safer to keep the image visible.
*/

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 2rem;
  background-color: rgba(255, 255, 255, 0.9); /* Solid enough to be readable, wait...
  "Do NOT add semi-transparent colored divs... over hero images".
  Ah! Does that mean over the *entire* image or over the text? It says "over hero images". 
  I'll just use a strong text-shadow for readability, or a solid (not semi-transparent) background for the text box.
  Let's use a solid background for the text box. */
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  margin: 2rem 0;
}

.hero-content h1 {
  color: var(--primary-blue);
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .hero {
    min-height: 60vh;
  }
  .hero-content {
    margin: 1rem;
    padding: 1.5rem;
  }
}

/* Split Section (About Promise) */
.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.split-content {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s ease;
}

.split-image {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.8s ease;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.split-section.in-view .split-content,
.split-section.in-view .split-image {
  opacity: 1;
  transform: translateX(0);
}

@media (max-width: 768px) {
  .split-section {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .split-content, .split-image {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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

.service-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.service-card-img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
}

.service-card-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.service-card-content h3 {
  margin-bottom: 1rem;
}

.service-card-content p {
  flex-grow: 1;
  color: #555;
}

.service-card-link {
  margin-top: 1.5rem;
  font-weight: 600;
  color: var(--accent-orange);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.service-card-link::after {
  content: '→';
  transition: transform 0.3s ease;
}

.service-card:hover .service-card-link::after {
  transform: translateX(5px);
}

/* Why Choose Us & Lists */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature-item {
  text-align: center;
  padding: 2rem;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.feature-icon {
  width: 60px;
  height: 60px;
  background-color: var(--secondary-yellow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 1.5rem;
  color: var(--primary-blue);
  animation: breathe 3s infinite ease-in-out;
}

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05) translateY(-2px); }
}

/* Testimonials */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.testimonial {
  background: var(--white);
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  position: relative;
}

.testimonial-quote {
  font-size: 1.125rem;
  font-style: italic;
  margin-bottom: 1.5rem;
  color: #555;
  position: relative;
  z-index: 1;
}

.testimonial::before {
  content: '"';
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  font-size: 4rem;
  color: var(--secondary-yellow);
  opacity: 0.3;
  font-family: var(--font-heading);
  z-index: 0;
  line-height: 1;
}

.testimonial cite {
  font-weight: 700;
  font-style: normal;
  color: var(--primary-blue);
  display: block;
}

/* CTA Block */
.cta-block {
  text-align: center;
}

.cta-block h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.cta-block .btn {
  margin-top: 2rem;
}

/* Process Timeline */
.process-timeline {
  list-style: none;
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.process-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  width: 4px;
  background-color: var(--secondary-yellow);
}

.process-step {
  position: relative;
  padding-left: 60px;
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.process-step.in-view {
  opacity: 1;
  transform: translateY(0);
}

.process-step::before {
  content: counter(step-counter);
  counter-increment: step-counter;
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  background-color: var(--accent-orange);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  z-index: 1;
  box-shadow: 0 0 0 4px var(--bg-light-grey);
}

.process-timeline {
  counter-reset: step-counter;
}

/* FAQ Accordion */
.faq-accordion {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--white);
  border-radius: 8px;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 1.5rem;
  background: none;
  border: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--primary-blue);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.faq-question[aria-expanded="true"]::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  padding-bottom: 1.5rem;
  max-height: 1000px; /* Arbitrary large number for animation */
}

/* Contact Form */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

@media (max-width: 768px) {
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

.contact-info-card {
  background: var(--white);
  padding: 3rem;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-detail-icon {
  font-size: 1.5rem;
  color: var(--accent-orange);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  font-size: 0.875rem;
}

.form-control {
  padding: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all 0.3s ease;
  background-color: #fafafa;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.2);
  background-color: var(--white);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* Map */
.map-container {
  border-radius: 12px;
  overflow: hidden;
  height: 400px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Team Section */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.team-card {
  text-align: center;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.team-img-placeholder {
  width: 100%;
  aspect-ratio: 1/1;
  background-color: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #777;
  font-size: 3rem;
}

.team-info {
  padding: 1.5rem;
}

.team-info h3 {
  margin-bottom: 0.25rem;
}

.team-info p {
  color: var(--accent-orange);
  font-weight: 600;
  margin-bottom: 0;
}

/* Certifications */
.cert-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3rem;
  align-items: center;
}

.cert-item {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--primary-blue);
  text-align: center;
  max-width: 200px;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cert-grid.in-view .cert-item {
  opacity: 1;
  transform: scale(1);
}

/* Footer */
.site-footer {
  background-color: var(--primary-blue);
  color: var(--white);
  padding: 4rem 0 2rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
}

.footer-logo {
  max-width: 250px;
  margin-bottom: 1.5rem;
  background-color: var(--white);
  padding: 10px;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .footer-logo {
    margin: 0 auto 1.5rem;
  }
}

.footer-heading {
  font-size: 1.25rem;
  color: var(--white);
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-heading::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30px;
  height: 2px;
  background-color: var(--accent-orange);
}

@media (max-width: 768px) {
  .footer-heading::after {
    left: 50%;
    transform: translateX(-50%);
  }
}

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

.footer-nav li {
  margin-bottom: 0.75rem;
}

.footer-nav a {
  color: #ccc;
}

.footer-nav a:hover {
  color: var(--accent-orange);
  text-decoration: underline;
}

.footer-contact p {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #ccc;
}

@media (max-width: 768px) {
  .footer-contact p {
    justify-content: center;
  }
}

.footer-contact a {
  color: var(--white);
  text-decoration: none;
}

.footer-contact a:hover {
  color: var(--accent-orange);
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media (max-width: 768px) {
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255,255,255,0.1);
  color: var(--white);
  border-radius: 50%;
  margin-right: 0.5rem;
  transition: all 0.3s ease;
}

.social-icons a:hover {
  background-color: var(--accent-orange);
  transform: scale(1.1);
}

.legal-links a {
  color: #ccc;
  margin-left: 1rem;
  font-size: 0.875rem;
}

.legal-links a:hover {
  color: var(--white);
}

/* Scroll indicator */
.scroll-indicator {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 100px;
  background-color: rgba(0,0,0,0.1);
  z-index: 999;
}

.scroll-dot {
  position: absolute;
  top: 0; /* Updated via JS */
  left: -4px;
  width: 10px;
  height: 10px;
  background-color: var(--accent-orange);
  border-radius: 50%;
  transition: top 0.1s ease;
}

@media (max-width: 1024px) {
  .scroll-indicator {
    display: none;
  }
}
