/* Import reset first */
@import url('reset.css');

/* Import design tokens (identity, theming) */
@import url('tokens.css');

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@700&display=swap');

/* Base Styles */
body {
  font-family: var(--font-primary);
  color: var(--text);
  background-color: var(--background);
  background-image: var(--glow-green);
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100vw;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

h1 {
  font-size: clamp(3.2rem, 5vw, 5.6rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(2.4rem, 4vw, 4rem);
  font-weight: 700;
}

h3 {
  font-size: clamp(2rem, 3vw, 3.2rem);
  font-weight: 600;
}

h4 {
  font-size: clamp(1.8rem, 2.5vw, 2.4rem);
  font-weight: 600;
}

p {
  margin-bottom: var(--space-md);
  line-height: 1.6;
}

/* Section-intro subtitle — the paragraph directly below an h2 — matches .hero-subtitle */
h2 + p {
  font-size: clamp(1.6rem, 2.5vw, 2rem);
}

/* …but keep the privacy policy's body copy at the normal reading size */
.content-section h2 + p {
  font-size: 1.6rem;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

@media (min-width: 768px) {
  :root {
    --container-padding: 2rem;
  }
}

/* Main content area */
main {
  flex: 1;
  width: 100%;
}

/* Section spacing */
section {
  padding: var(--space-2xl) 0;
  width: 100%;
}

@media (min-width: 768px) {
  section {
    padding: var(--space-3xl) 0;
  }
}

.hero + section {
  padding-top: var(--space-3xl);
}

@media (min-width: 768px) {
  .hero + section {
    padding-top: calc(var(--space-3xl) + 2rem);
  }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1.2rem 2.4rem;
  border-radius: 9999px;
  font-weight: 500;
  text-align: center;
  transition: all var(--transition-normal);
  cursor: pointer;
  border: 2px solid transparent;
}

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

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

.btn-primary:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

.btn-secondary {
  background-color: var(--baby-powder);
  color: var(--secondary);
  border-color: var(--primary);
}

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

/* Lime accent CTA — matches the reference "Submit / Book / Go" buttons */
.btn-accent {
  background-color: var(--accent-lime);
  color: var(--forest);
  font-weight: 600;
}

.btn-accent:hover {
  background-color: var(--lime-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-accent:focus-visible {
  outline: 3px solid var(--forest);
  outline-offset: 3px;
}

.btn-large {
  padding: 1.6rem 3.2rem;
  font-size: 1.8rem;
}

/* Section heading helper */
.section-head {
  max-width: 640px;
  margin: 0 auto var(--space-2xl);
  text-align: center;
}

.section-head.section-head--row {
  max-width: var(--container-max);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-lg);
  text-align: left;
}

.section-head p {
  color: var(--text-light);
  margin-bottom: 0;
}

@media (max-width: 767px) {
  .section-head.section-head--row {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-primary);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--space-sm);
}

/* Cards */
.card {
  background-color: white;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

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

/* Grid layouts */
.grid {
  display: grid;
  gap: var(--space-lg);
  width: 100%;
}

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

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

/* Responsive grid adjustments for small screens */
@media (max-width: 576px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
  
  .grid-3 {
    grid-template-columns: 1fr;
  }
  
  .grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

/* Utility classes */
.text-center {
  text-align: center;
}

.text-primary {
  color: var(--primary);
}

.text-secondary {
  color: var(--secondary);
}

.bg-alt {
  background: var(--background-alt);
}

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

/* Loading states */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Footer — dark forest, oversized email + book card (reference style) */
.footer {
  background-color: var(--forest);
  color: rgba(255, 255, 255, 0.85);
  margin-top: auto;
  padding: var(--space-2xl) 0 var(--space-lg);
}

.footer a {
  color: rgba(255, 255, 255, 0.85);
  transition: color var(--transition-fast);
}

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

.footer-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

@media (min-width: 768px) {
  .footer-main {
    grid-template-columns: 1.4fr 1fr;
    align-items: center;
    gap: var(--space-3xl);
  }
}

.footer-logo {
  display: inline-block;
  margin-bottom: var(--space-lg);
}

.footer-logo img {
  height: 40px;
  width: auto;
}

.footer-email {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 4vw, 4rem);
  font-weight: 700;
  color: white;
  line-height: 1.15;
  margin-bottom: var(--space-md);
  word-break: break-word;
}

.footer-email:hover {
  color: var(--lime);
}

.footer address {
  font-style: normal;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.85);
}

/* Book-appointment card in the footer */
.footer-book {
  background: linear-gradient(135deg, var(--sage) 0%, var(--sage-soft) 100%);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
}

.footer-book h3 {
  color: white;
  font-size: 2.2rem;
  margin-bottom: var(--space-md);
}

.footer-book-form {
  display: flex;
  gap: var(--space-sm);
  background: rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-full);
  padding: var(--space-xs);
}

.footer-book-form input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: white;
  padding: 0 var(--space-md);
  font-size: 1.5rem;
}

.footer-book-form input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.footer-book-form input:focus-visible {
  outline: 2px solid white;
  outline-offset: 2px;
  border-radius: var(--radius-full);
}

.footer-book-go {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--forest);
  color: white;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.footer-book-go:hover {
  background: var(--lime);
  color: var(--forest);
  transform: translateX(2px);
}

/* Footer bottom — pill nav + copyright */
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-top: var(--space-lg);
  font-size: 1.4rem;
  color: rgba(255, 255, 255, 0.85);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.footer-nav a {
  padding: var(--space-xs) var(--space-md);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-full);
  font-size: 1.4rem;
}

.footer-nav a:hover {
  border-color: var(--lime);
  background: rgba(0, 170, 203, 0.12);
}

/* Contact Page Styles */
.contact-info-card {
  background-color: white;
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.contact-info-card h3 {
  color: var(--primary);
  margin-bottom: var(--space-md);
  font-size: 2rem;
}

.contact-info-card address {
  font-style: normal;
  line-height: 1.8;
  color: var(--text);
}

.office-hours {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.hours-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.hours-row:last-child {
  border-bottom: none;
}

.day {
  font-weight: 500;
  color: var(--text-dark);
}

.time {
  color: var(--text-light);
}

.quick-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.map-container {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background-color: var(--background-alt);
}

.map-embed {
  width: 100%;
  height: 300px;
  border: 0;
  border-radius: var(--radius-md);
}

.google-map {
  width: 100%;
  height: 400px;
  min-height: 300px;
}

.map-fallback {
  padding: var(--space-xl);
  text-align: center;
  background-color: var(--background-alt);
  border-radius: var(--radius-md);
  display: block;
}

.map-fallback a {
  color: var(--primary);
  text-decoration: underline;
}

.map-fallback a:hover {
  color: var(--primary-light);
}

/* Google Maps Info Window Custom Styling */
.map-info-window {
  font-family: var(--font-primary);
  line-height: 1.4;
  color: var(--text);
}

/* Responsive map styling */
@media (max-width: 768px) {
  .google-map {
    height: 300px;
    min-height: 250px;
  }
  
  .map-fallback {
    padding: var(--space-lg);
  }
}

@media (max-width: 480px) {
  .google-map {
    height: 250px;
    min-height: 200px;
  }
  
  .map-fallback {
    padding: var(--space-md);
  }
}


/* ============================================================
   Homepage section layouts (mint-green redesign)
   ============================================================ */

/* Centre the CTA-section buttons (override the hero's desktop flex-start) */
.cta .hero-cta {
  justify-content: center;
}

/* Homepage services grid — always 3 per row on desktop */
@media (min-width: 700px) {
  .services-overview .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Feature row — small icon + label, 4-up */
.feature-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.feature-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.feature-item-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--mint-surface);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-item-icon svg {
  width: 22px;
  height: 22px;
}

.feature-item p {
  margin-bottom: 0;
  font-size: 1.5rem;
  color: var(--text-light);
}

/* Stats grid — 4 mint stat cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-lg);
}

/* Experts — text + horizontal scroll-snap carousel */
.experts-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

@media (min-width: 900px) {
  .experts-layout {
    grid-template-columns: 0.8fr 1.6fr;
  }
}

.experts-carousel {
  display: flex;
  gap: var(--space-lg);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--space-md);
  -webkit-overflow-scrolling: touch;
}

.experts-carousel > * {
  scroll-snap-align: start;
  flex: 0 0 clamp(220px, 40%, 280px);
}

/* Bento "simplify your care" grid */
.bento-grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .bento-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "consult emergency"
      "specialist specialist";
  }
  .bento-grid > :nth-child(1) { grid-area: consult; }
  .bento-grid > :nth-child(2) { grid-area: emergency; }
  .bento-grid > :nth-child(3) { grid-area: specialist; }
}

@media (min-width: 1024px) {
  .bento-grid {
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-areas:
      "consult emergency specialist";
  }
}

/* Print styles */
@media print {
  body {
    font-size: 12pt;
    line-height: 1.5;
  }
  
  header, footer, nav, .no-print {
    display: none !important;
  }
  
  main {
    width: 100%;
  }
  
  a {
    text-decoration: underline;
  }
  
  .btn {
    border: 1px solid #000;
  }
}