@import url('https://fonts.googleapis.css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

:root {
  --color-primary: #2F3E4E;
  --color-primary-light: #3a4c5e;
  --color-bg-light: #F0F0F0;
  --color-white: #FFFFFF;
  --color-text: #000000;
  --color-text-muted: #444444;
  --color-accent: #FFD700;
  --color-accent-dark: #e6c200;
  --font-primary: 'Montserrat', sans-serif;
  --transition-fast: 0.2s ease-in-out;
  --transition-normal: 0.3s ease-in-out;
  --shadow-subtle: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 10px 20px rgba(0, 0, 0, 0.15);
  --header-height: 90px;
  --header-height-sticky: 70px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 2.5rem); text-align: center; margin-bottom: 2.5rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
  color: var(--color-text-muted);
  font-size: 1rem;
}

.lead-text {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem auto;
}

a {
  text-decoration: none;
  color: var(--color-primary);
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-dark);
}

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

ul {
  list-style-type: none;
}

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

section {
  padding: 5rem 0;
}

section:nth-child(even) {
  background-color: var(--color-bg-light);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: var(--color-primary-light);
  box-shadow: var(--shadow-hover);
  color: var(--color-white);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.btn-accent {
  background-color: var(--color-accent);
  color: var(--color-primary);
  position: relative;
  overflow: hidden;
}

.btn-accent:hover {
  background-color: var(--color-accent-dark);
}

/* Subtle Sparkle on Hover */
@media (min-width: 1024px) {
  .btn-accent::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(30deg) translate(-100%, 0);
    transition: transform 0.6s ease;
  }
  .btn-accent:hover::after {
    transform: rotate(30deg) translate(100%, 0);
  }
}

/* Header & Nav */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: var(--color-white);
  box-shadow: var(--shadow-subtle);
  z-index: 1000;
  transition: height var(--transition-normal), background-color var(--transition-normal);
  display: flex;
  align-items: center;
}

header.sticky {
  height: var(--header-height-sticky);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

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

.logo img {
  max-width: 180px;
  height: auto;
  transition: max-width var(--transition-normal);
}

header.sticky .logo img {
  max-width: 150px;
}

.nav-links {
  display: none;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-weight: 600;
  color: var(--color-primary);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--color-accent);
  transition: width var(--transition-fast);
}

.nav-links a:hover::after, .nav-links a.active::after {
  width: 100%;
}

.header-cta {
  display: none;
  gap: 1rem;
  align-items: center;
}

.mobile-menu-toggle {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-toggle svg {
  width: 32px;
  height: 32px;
  fill: var(--color-primary);
}

.mobile-call-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-primary);
  font-weight: 700;
}

.mobile-call-btn svg {
  width: 24px;
  height: 24px;
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-white);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
}

.mobile-nav-overlay.open {
  transform: translateX(0);
}

.mobile-nav-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 2rem;
}

.close-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
}

.close-menu-btn svg {
  width: 32px;
  height: 32px;
  fill: var(--color-primary);
}

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

.mobile-nav-overlay ul a {
  font-size: 1.5rem;
  font-weight: 700;
  display: block;
}

.mobile-nav-footer {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-nav-footer .btn {
  width: 100%;
}

/* Hero Sections - NO COLOR OVERLAYS */
/* The hero image is placed directly as the background with no dark overlay */
.hero {
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* 
  Since we cannot use a color overlay over the hero image, 
  we will use a strong text-shadow and potentially a semi-transparent 
  background strictly behind the text block (like a card) if needed for readability,
  but NO overlay across the image itself.
*/

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
  padding: 2rem;
  /* To ensure text is readable without an overlay on the hero image, 
     adding a subtle glassmorphism card effect just around the text */
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(5px);
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.hero h1 {
  color: var(--color-primary);
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  font-weight: 500;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Sub-page Heros */
.sub-hero {
  margin-top: var(--header-height);
  padding: 6rem 0;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
}

.sub-hero .hero-content {
  max-width: 700px;
}

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

.split-content ul {
  margin: 1.5rem 0;
}

.split-content li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.split-content li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: bold;
}

.split-image img {
  border-radius: 8px;
  box-shadow: var(--shadow-hover);
  width: 100%;
}

/* Services Grid */
.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.service-card {
  background: var(--color-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.service-card-img {
  height: 200px;
  overflow: hidden;
}

.service-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.service-card:hover .service-card-img img {
  transform: scale(1.05);
}

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

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

.service-card-content p {
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.service-card-content .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* Testimonial Section */
.testimonial-section {
  position: relative;
  background-image: url('../images/testimonial-background.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed; /* Subtle Parallax */
  padding: 6rem 0;
  text-align: center;
}

.testimonial-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(240, 240, 240, 0.8); /* This is NOT a hero, overlay allowed to read text against pattern */
}

.testimonial-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
  margin: 0 auto;
}

.quote-icon {
  width: 48px;
  height: 48px;
  fill: var(--color-accent);
  margin: 0 auto 1.5rem;
}

blockquote {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 2rem;
  color: var(--color-primary);
}

cite {
  font-weight: 700;
  font-size: 1.1rem;
  font-style: normal;
  display: block;
  color: var(--color-text-muted);
}

/* CTA Block */
.cta-block {
  text-align: center;
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 5rem 0;
}

.cta-block h2 {
  color: var(--color-white);
}

.cta-block p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.cta-block .btn-secondary {
  border-color: var(--color-white);
  color: var(--color-white);
}

.cta-block .btn-secondary:hover {
  background-color: var(--color-white);
  color: var(--color-primary);
}

/* Feature List (About) */
.feature-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.feature-icon {
  width: 40px;
  height: 40px;
  fill: var(--color-accent);
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.feature-item:hover .feature-icon {
  transform: rotate(10deg) scale(1.1);
}

/* Team Grid */
.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.team-member-card {
  text-align: center;
}

.team-member-card img {
  border-radius: 8px;
  margin-bottom: 1rem;
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.team-member-card:hover img {
  transform: scale(1.03);
  box-shadow: var(--shadow-subtle);
}

.team-member-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.team-member-card .title {
  color: var(--color-accent-dark);
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Forms */
.contact-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.contact-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

.input-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: var(--font-primary);
  font-size: 1rem;
  transition: border-color var(--transition-fast);
  background: var(--color-white);
}

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

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: transparent;
}

/* Custom animated underline for focus */
.input-group::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-primary);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--transition-normal);
}

.input-group:focus-within::after {
  transform: scaleX(1);
}

/* Contact Info Sidebar */
.contact-info {
  background: var(--color-bg-light);
  padding: 2rem;
  border-radius: 8px;
}

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

.info-item svg {
  width: 24px;
  height: 24px;
  fill: var(--color-accent-dark);
  flex-shrink: 0;
}

.map-embed iframe {
  width: 100%;
  height: 400px;
  border: 0;
  border-radius: 8px;
}

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

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

.footer-col h4 {
  color: var(--color-accent);
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.footer-col p {
  color: rgba(255, 255, 255, 0.8);
}

.footer-col a {
  color: rgba(255, 255, 255, 0.8);
  display: block;
  margin-bottom: 0.75rem;
}

.footer-col a:hover {
  color: var(--color-white);
  text-decoration: underline;
}

.footer-logo {
  max-width: 200px;
  margin-bottom: 1.5rem;
  filter: brightness(0) invert(1);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0.5rem;
}

.footer-bottom a:hover {
  color: var(--color-white);
}

/* Back to Top */
#backToTop {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: var(--color-accent);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border: none;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  z-index: 1000;
  box-shadow: var(--shadow-subtle);
}

#backToTop.visible {
  opacity: 1;
  visibility: visible;
}

#backToTop:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

#backToTop svg {
  width: 24px;
  height: 24px;
  fill: var(--color-primary);
}

/* Utility Animations */
.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .testimonial-section {
    background-attachment: scroll;
  }
}

/* Media Queries */
@media (min-width: 640px) { /* Tablet */
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .split-section {
    grid-template-columns: 1fr 1fr;
  }
  .feature-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-container {
    grid-template-columns: 3fr 2fr;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) { /* Desktop */
  .mobile-menu-toggle { display: none; }
  .mobile-call-btn { display: none; }
  
  .nav-links {
    display: flex;
  }
  
  .header-cta {
    display: flex;
  }
  
  .service-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .team-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
  
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}
