/*
Theme Name: Psychoterapia i Rozwoj
Description: Profesjonalna strona psychoterapeutyczna dla Katarzyny Browarskiej
Version: 1.0
Author: Katarzyna Browarska
*/

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Prevent horizontal overflow on all devices */
html {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

:root {
  --background: hsl(0, 0%, 100%);
  --foreground: hsl(160, 15%, 15%);
  --card: hsl(0, 0%, 100%);
  --card-foreground: hsl(160, 15%, 15%);
  --primary: hsl(160, 30%, 40%);
  --primary-foreground: hsl(0, 0%, 100%);
  --secondary: hsl(160, 20%, 95%);
  --secondary-foreground: hsl(160, 15%, 15%);
  --muted: hsl(160, 15%, 96%);
  --muted-foreground: hsl(160, 10%, 45%);
  --accent: hsl(160, 25%, 85%);
  --accent-foreground: hsl(160, 15%, 15%);
  --border: hsl(160, 20%, 90%);
  --therapy-primary: hsl(160, 25%, 55%);
  --therapy-secondary: hsl(160, 25%, 85%);
  --therapy-accent: hsl(160, 20%, 75%);
  --therapy-background: hsl(160, 25%, 98%);
  --therapy-surface: hsl(0, 0%, 100%);
  --therapy-muted: hsl(160, 15%, 96%);
  --therapy-border: hsl(160, 20%, 90%);
  --shadow-soft: 0 2px 20px -2px hsl(160, 30%, 40%, 0.08);
  --shadow-medium: 0 8px 30px -6px hsl(160, 30%, 40%, 0.12);
  --shadow-strong: 0 20px 40px -12px hsl(160, 30%, 40%, 0.15);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: hsl(160, 20%, 96%); /* Pale green background for entire site - more visible */
  color: var(--foreground);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  position: relative;
}

/* Container and layout */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: border-box;
}

/* Ensure all containers respect viewport width - only prevent overflow */
section,
main,
header,
footer {
  overflow-x: hidden;
}

/* Grid system */
.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.md\:grid-cols-2 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.gap-6 {
  gap: 1.5rem;
}

.gap-8 {
  gap: 2rem;
}

.gap-16 {
  gap: 4rem;
}

.gap-12 {
  gap: 3rem;
}

.lg\:grid-cols-2 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 1024px) {
  .lg\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Order utilities */
.order-1 {
  order: 1;
}

.order-2 {
  order: 2;
}

@media (min-width: 1024px) {
  .lg\:order-1 {
    order: 1;
  }
  
  .lg\:order-2 {
    order: 2;
  }
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.justify-center {
  justify-content: center;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.text-center {
  text-align: center;
}

.min-h-screen {
  min-height: 100vh;
}

/* Navigation styles */
.navigation {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.navigation.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-medium);
}

.nav-container {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

/* Left spacer for desktop centering */
.nav-left-spacer {
  flex: 1;
}

/* Navigation CTA container */
.nav-cta-container {
  flex: 1;
  text-align: right;
}

.nav-menu {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

/* WordPress menu list styling */
.nav-menu-list {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

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

.nav-link {
  text-decoration: none;
  color: #000000;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  position: relative;
}

/* Navigation CTA button - match nav-link styling */
.navigation .button-primary {
  font-size: 0.875rem;
  padding: 0.75rem 1.5rem;
  margin: 0;
}

/* Dla pacjenta page bottom CTA buttons - match front page hero buttons */
.dla-pacjenta-cta .button {
  font-size: 0.875rem;
  padding: 0.75rem 1.5rem;
  width: auto;
  justify-content: center;
}

/* Ensure buttons display side by side on larger screens */
.dla-pacjenta-cta .flex {
  flex-direction: column;
}

@media (min-width: 640px) {
  .dla-pacjenta-cta .flex {
    flex-direction: row;
  }
}

/* Ensure buttons are perfectly aligned at same height */
.dla-pacjenta-cta .button {
  height: auto;
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ensure consistent bottom margin for buttons in service cards */
.card .button {
  margin-top: auto;
  margin-bottom: 0;
}

/* Front page CTA section - match dla pacjenta page styling */
.front-page-cta .button {
  font-size: 0.875rem;
  padding: 0.75rem 1.5rem;
  height: auto;
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ensure buttons display side by side on larger screens */
.front-page-cta .flex {
  flex-direction: column;
}

@media (min-width: 640px) {
  .front-page-cta .flex {
    flex-direction: row;
  }
}

/* O mnie page CTA section - match dla pacjenta page styling */
.o-mnie-cta .button {
  font-size: 0.875rem;
  padding: 0.75rem 1.5rem;
  height: auto;
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ensure buttons display side by side on larger screens */
.o-mnie-cta .flex {
  flex-direction: column;
}

@media (min-width: 640px) {
  .o-mnie-cta .flex {
    flex-direction: row;
  }
}

.nav-link:hover {
  color: #4a7c59;
  background: #f0f7f4;
}

.nav-link.active {
  color: #4a7c59;
  background: #f0f7f4;
}

/* Button styles */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  margin: 0.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

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

.button-primary:hover {
  background: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.button-secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
}

.button-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.button-outline {
  background: transparent;
  border: 2px solid var(--therapy-primary);
  color: var(--therapy-primary);
}

.button-outline:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.button-hover-effect:hover {
  background: var(--therapy-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

/* Hero section */
.hero-section {
  position: relative;
  min-height: 220px; /* Allow natural sizing based on content */
  padding: 3rem 0;
  overflow: hidden;
  background: var(--therapy-background);
  display: flex;
  align-items: center;
  justify-content: center;
  /* Prevent any movement */
  transform: none;
  transition: none;
  animation: none;
}

/* Ensure all hero sections behave identically */
.hero-section {
  position: relative !important;
  min-height: 220px !important;
  padding: 3rem 0 !important;
  overflow: hidden !important;
  background: var(--therapy-background) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

/* Force hero sections to behave identically with maximum specificity */
body .hero-section,
html body .hero-section,
body .hero-section,
body .hero-section {
  position: relative !important;
  min-height: 220px !important;
  padding: 3rem 0 !important;
  overflow: hidden !important;
  background: var(--therapy-background) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

/* Use CSS custom properties for guaranteed consistency */
:root {
  --hero-section-position: relative;
  --hero-section-min-height: 220px;
  --hero-section-padding: 3rem 0;
  --hero-section-overflow: hidden;
  --hero-section-background: var(--therapy-background);
  --hero-section-display: flex;
  --hero-section-align: center;
  --hero-section-justify: center;
}

.hero-section {
  position: var(--hero-section-position) !important;
  min-height: var(--hero-section-min-height) !important;
  padding: var(--hero-section-padding) !important;
  overflow: var(--hero-section-overflow) !important;
  background: var(--hero-section-background) !important;
  display: var(--hero-section-display) !important;
  align-items: var(--hero-section-align) !important;
  justify-content: var(--hero-section-justify) !important;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.7));
  z-index: 10;
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  /* Prevent any movement or stretching */
  transform: none;
  transition: none;
  animation: none;
}

/* Ensure all hero images behave identically */
.hero-image {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

/* Force hero images to behave identically with maximum specificity */
body .hero-section .hero-image,
html body .hero-section .hero-image,
body .hero-section .hero-image,
body .hero-section .hero-image {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

/* Use CSS custom properties for guaranteed consistency */
:root {
  --hero-image-position: absolute;
  --hero-image-top: 0;
  --hero-image-left: 0;
  --hero-image-width: 100%;
  --hero-image-height: 100%;
  --hero-image-object-fit: cover;
  --hero-image-object-position: center center;
}

.hero-image {
  position: var(--hero-image-position) !important;
  top: var(--hero-image-top) !important;
  left: var(--hero-image-left) !important;
  width: var(--hero-image-width) !important;
  height: var(--hero-image-height) !important;
  object-fit: var(--hero-image-object-fit) !important;
  object-position: var(--hero-image-object-position) !important;
}

.hero-content {
  position: relative;
  z-index: 20;
  text-align: center;
  max-width: 64rem;
  padding: 0 1rem;
  /* Force consistent height - increased to accommodate buttons */
  height: 22rem;
  /* Prevent any movement */
  transform: none;
  transition: none;
  animation: none;
}

/* Ensure all hero content behaves identically */
body .hero-section .hero-content {
  position: relative !important;
  z-index: 20 !important;
  text-align: center !important;
  max-width: 64rem !important;
  padding: 0 1rem !important;
  /* Force consistent height - increased to accommodate buttons */
  height: 22rem !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

/* Force kontakt page hero-content to match dla pacjenta page */
body.page-kontakt .hero-section .hero-content {
  height: 18rem !important;
}

.hero-logo {
  height: 12rem;
  width: auto;
  margin: 0 auto 1.5rem;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

/* Ensure all hero logos are absolutely identical */
.hero-logo {
  height: 12rem !important;
  width: auto !important;
  margin: 0 auto 1.5rem !important;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1)) !important;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  max-width: 48rem;
  margin: 0;
  padding: 0;
  /* Force consistent height for subtitle containers */
  height: 3.75rem;
  min-height: 3.75rem;
  max-height: 3.75rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  box-sizing: border-box;
}

/* Ensure all hero subtitles are absolutely identical */
.hero-subtitle {
  font-size: 1.25rem !important;
  color: var(--muted-foreground) !important;
  max-width: 48rem !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.5 !important;
  font-weight: normal !important;
  text-align: center !important;
  /* Force consistent height for all subtitles */
  height: 3.75rem !important;
  min-height: 3.75rem !important;
  max-height: 3.75rem !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

/* Ensure consistent spacing for multi-line subtitles */
.hero-subtitle br {
  display: block !important;
  content: "" !important;
  margin-top: 0.5rem !important;
}

/* Maximum specificity override for subtitle heights */
body .hero-section .hero-subtitle,
html body .hero-section .hero-subtitle,
body .hero-section p.hero-subtitle,
html body .hero-section p.hero-subtitle {
  height: 3.75rem !important;
  min-height: 3.75rem !important;
  max-height: 3.75rem !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

/* Force kontakt page to behave exactly like dla pacjenta page */
body.page-kontakt .hero-section .hero-subtitle,
html body.page-kontakt .hero-section .hero-subtitle,
body.page-kontakt .hero-section p.hero-subtitle,
html body.page-kontakt .hero-section p.hero-subtitle {
  height: 3.75rem !important;
  min-height: 3.75rem !important;
  max-height: 3.75rem !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  position: relative !important;
  top: 0 !important;
  left: 0 !important;
  transform: none !important;
  /* Force consistent text rendering */
  line-height: 1.5 !important;
  font-size: 1.25rem !important;
  text-align: center !important;
  /* Ensure text is positioned consistently */
  align-self: flex-start !important;
  justify-self: center !important;
}

/* Subtitle container for consistent heights */
.hero-subtitle-container {
  height: 3.75rem !important;
  min-height: 3.75rem !important;
  max-height: 3.75rem !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

/* Ensure subtitle text is top-aligned within container */
.hero-subtitle-container .hero-subtitle {
  margin: 0 !important;
  padding: 0 !important;
  height: auto !important;
  min-height: auto !important;
  max-height: none !important;
  align-self: flex-start !important;
}

/* Card styles */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
  transition: all 0.2s ease;
  margin-bottom: 0.75rem;
}

/* Kontakt page specific styles - moved from inline to external CSS */
.contact-form-button {
  font-size: 0.875rem !important;
  padding: 0.75rem 1.5rem !important;
  width: auto !important;
  justify-content: center !important;
  height: auto !important;
  min-height: 3rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
}

#contact-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 4rem !important;
}

@media (min-width: 1024px) {
  #contact-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 4rem !important;
  }
}

.card:last-child {
  margin-bottom: 0;
}

/* Badge styles */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  margin: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 0.375rem;
  background: white;
  color: var(--secondary-foreground);
  border: 1px solid var(--border);
  white-space: nowrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Badge container styles to ensure proper wrapping */
.badge-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

/* .card:hover {
  box-shadow: var(--shadow-medium);
} */

.card-header {
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--card-foreground);
}

.card-description {
  color: var(--muted-foreground);
  line-height: 1.5;
}

/* Grid layouts */
.grid {
  display: grid;
  gap: 1.5rem;
}

/* Ensure cards in grid rows have equal height */
.grid .card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.grid .card .card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, 1fr);
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Responsive breakpoints */
@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .md\:grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* Footer */
.footer {
  background: hsl(160, 12%, 94%); /* Slightly darker and more distinct green for footer */
  margin-top: 5rem;
  padding: 3rem 0;
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer-section h3,
.footer-section h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-section p,
.footer-section a {
  color: var(--muted-foreground);
  text-decoration: none;
  margin-bottom: 0.5rem;
  display: block;
}

.footer-section a:hover {
  color: var(--therapy-primary);
}

/* Prevent mobile browsers from styling phone numbers as links */
.footer p {
  color: var(--muted-foreground) !important;
}

.footer p a[href^="tel:"] {
  color: var(--muted-foreground) !important;
  text-decoration: none !important;
}

.footer p a[href^="tel:"]:hover {
  color: var(--muted-foreground) !important;
  text-decoration: none !important;
}

/* Ensure contact card phone and email links maintain custom styling on mobile */
.card-content p a[href^="tel:"],
.card-content p a[href^="mailto:"] {
  color: var(--therapy-primary) !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  font-size: 1.25rem !important;
}

.card-content p a[href^="tel:"]:hover,
.card-content p a[href^="mailto:"]:hover {
  color: var(--therapy-primary) !important;
  text-decoration: none !important;
}

.card-content p a[href^="tel:"]:active,
.card-content p a[href^="mailto:"]:active {
  color: var(--therapy-primary) !important;
  text-decoration: none !important;
}

/* Footer menu styling */
.footer-nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav-link {
  color: var(--muted-foreground);
  text-decoration: none;
  margin-bottom: 0.5rem;
  display: block;
  transition: color 0.2s ease;
}

.footer-nav-link:hover {
  color: var(--therapy-primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding-top: 2rem;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

/* Sections */
.section {
  padding: 2rem 0;
  margin-bottom: 1rem;
}

/* Consistent spacing for sections */
.section + .section {
  margin-top: 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  text-align: center;
  margin-bottom: 1rem;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

/* Content spacing */
.content {
  padding-top: 0; /* No space between navigation and content */
  background-color: hsl(160, 20%, 96%); /* Pale green background for content area - more visible */
  min-height: 100vh; /* Ensure background covers full viewport height */
}

/* Utility classes */
.mb-4 { margin-bottom: 0.5rem; }
.mb-6 { margin-bottom: 0.75rem; }
.mb-8 { margin-bottom: 1rem; }
.mb-12 { margin-bottom: 1.5rem; }
.mb-16 { margin-bottom: 2rem; }
.mt-8 { margin-top: 1rem; }
.mt-12 { margin-top: 1.5rem; }
.mt-16 { margin-top: 2rem; }
.px-4 { padding-left: 0.5rem; padding-right: 0.5rem; }
.py-8 { padding-top: 1rem; padding-bottom: 1rem; }
.py-12 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-16 { padding-top: 2rem; padding-bottom: 2rem; }
.py-20 { padding-top: 2.5rem; padding-bottom: 2.5rem; }

.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }

/* Heading spacing consistency */
h1, h2, h3, h4, h5, h6 {
  margin-bottom: 0.5rem;
}

h1:last-child, h2:last-child, h3:last-child, h4:last-child, h5:last-child, h6:last-child {
  margin-bottom: 0;
}

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }

.rounded-lg { border-radius: 0.5rem; }
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }

/* Universal mobile fixes - prevent horizontal overflow */
/* iPhone 14 and similar devices (390px width) */
@media (max-width: 480px) {
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    position: relative;
  }
  
  .container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  section, main, header, footer, .content {
    max-width: 100% !important;
    width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }
  
  /* Prevent specific elements from exceeding viewport */
  .card,
  .button,
  img,
  video,
  iframe,
  table {
    max-width: 100% !important;
  }
  
  img, svg, video, iframe {
    max-width: 100% !important;
    height: auto !important;
  }
  
  /* Fix grid layouts on small screens */
  .grid {
    width: 100%;
    max-width: 100%;
  }
  
  /* Fix flex containers on small screens */
  .flex {
    flex-wrap: wrap;
  }
  
  /* Specific fix for iPhone 14 (390px) */
  @media (max-width: 390px) {
    .container {
      padding-left: 0.75rem !important;
      padding-right: 0.75rem !important;
    }
    
    .hero-section .hero-content {
      padding-left: 0.75rem !important;
      padding-right: 0.75rem !important;
    }
  }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }
  
  /* Mobile navigation layout */
  .nav-container {
    justify-content: space-between;
    padding-left: 1rem;
    padding-right: 1rem;
    box-sizing: border-box;
  }
  
  .nav-left-spacer {
    display: none; /* Hide left spacer on mobile */
  }
  
  /* Ensure mobile menu button is positioned to the left */
  .mobile-menu-toggle {
    order: -1; /* Move to the leftmost position */
    margin-right: auto; /* Push other elements to the right */
    flex-shrink: 0 !important;
  }
  
  .nav-cta-container {
    flex: none;
    text-align: right;
    flex-shrink: 1 !important;
    min-width: 0 !important;
  }
  
  .nav-cta-container .button {
    font-size: 0.75rem !important;
    padding: 0.5rem 0.75rem !important;
    white-space: nowrap !important;
  }
  
  /* Ensure navigation doesn't overflow */
  .navigation {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
  
  .hero-logo {
    height: 8rem;
  }
  
  /* Make hero section buttons smaller on mobile */
  .hero-section .button {
    font-size: 0.75rem !important;
    padding: 0.5rem 1rem !important;
    min-height: 2.5rem !important;
  }
  
  /* Reduce gap between buttons on mobile */
  .hero-section .flex {
    gap: 1rem !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  /* Ensure buttons don't overflow */
  .hero-section .button {
    max-width: calc(50% - 0.5rem) !important;
    min-width: auto !important;
    flex: 1 1 auto !important;
  }
  
  /* Fix hero content overflow */
  .hero-section .hero-content {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    box-sizing: border-box !important;
  }
  
  /* Increase spacer height on mobile for better button positioning */
  .hero-section .hero-content > div[style*="height"] {
    height: 3.5rem !important;
  }
  
  /* Make mobile menu CTA button match hero section buttons */
  .mobile-cta-button {
    font-size: 0.75rem !important;
    padding: 0.5rem 1rem !important;
    min-height: 2.5rem !important;
  }
  
  /* Show mobile menu toggle on mobile */
  .mobile-menu-toggle {
    display: block !important;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .container {
    padding: 0 1rem;
  }
}

/* Breadcrumb styles */
.breadcrumbs {
  margin-bottom: 1rem;
  padding: 0.5rem 0;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.875rem;
}

.breadcrumb-list li {
  display: flex;
  align-items: center;
}

.breadcrumb-list li:not(:last-child)::after {
  content: '/';
  margin: 0 0.5rem;
  color: var(--muted-foreground);
}

.breadcrumb-list a {
  color: var(--therapy-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb-list a:hover {
  color: var(--primary);
}

.breadcrumb-list li[aria-current="page"] {
  color: var(--muted-foreground);
  font-weight: 500;
}

/* Mobile navigation styles */
.mobile-menu {
  background: white;
  border-top: 1px solid var(--border);
  padding: 1rem;
  display: none; /* Hidden by default */
}

/* Show mobile menu when toggled */
.mobile-menu.show {
  display: block !important;
}


.mobile-nav-link {
  display: block;
  padding: 1rem;
  color: #000000;
  font-size: 0.875rem;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: all 0.2s ease;
}

.mobile-nav-link:hover {
  color: #4a7c59;
  background: #f0f7f4;
}

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

.mobile-icon-hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background: #000000;
  position: relative;
  transition: all 0.3s ease;
}

.mobile-icon-hamburger::before,
.mobile-icon-hamburger::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: #000000;
  transition: all 0.3s ease;
}

.mobile-icon-hamburger::before {
  top: -8px;
}

.mobile-icon-hamburger::after {
  bottom: -8px;
}

/* Base styles for other mobile menu icons */
.mobile-icon-dots,
.mobile-icon-plus,
.mobile-icon-grid,
.mobile-icon-list,
.mobile-icon-menu {
  display: none;
}

/* Therapy Badge Styles - Force Wrapping */
.therapy-badges-container {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.5rem !important;
  max-width: 300px !important;
  width: 100% !important;
  margin-bottom: 0 !important;
}

.therapy-badge {
  background: white !important;
  color: #374151 !important;
  padding: 0.25rem 0.75rem !important;
  border-radius: 0.375rem !important;
  font-size: 0.75rem !important;
  font-weight: 500 !important;
  border: 1px solid #d1d5db !important;
  white-space: nowrap !important;
  text-align: center !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}





