/* ============================================
   Együtt-Érted Fejlesztőház - Main Stylesheet
   ============================================ */

/* ============================================
   1. CSS Custom Properties (Design Tokens)
   ============================================ */

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

:root {
  /* Primary Colors - from building interior */
  --color-cream: #F5ECD7;
  --color-warm-yellow: #F2E8C9;

  /* Soft greens - from tree murals */
  --color-leaf-green: #8BC34A;
  --color-soft-green: #C5E1A5;
  --color-pale-green: #E8F5E9;

  /* Earth brown - from wood elements */
  --color-wood-brown: #8D6E63;
  --color-light-wood: #BCAAA4;

  /* Accent Colors */
  --color-coral: #E57373;
  --color-warm-orange: #FF8A65;
  --color-sky-blue: #81D4FA;
  --color-soft-blue: #B3E5FC;
  --color-sunny: #FFD54F;

  /* Text colors */
  --color-text-dark: #4E342E;
  --color-text-medium: #6D4C41;
  --color-text-light: #8D6E63;

  /* Neutral colors */
  --color-white: #FFFFFF;
  --color-off-white: #FAFAFA;
  --color-light-gray: #F5F5F5;

  /* Service category colors */
  --color-movement: #8BC34A;
  --color-early-dev: #FFD54F;
  --color-speech: #FF8A65;
  --color-music: #81D4FA;
  --color-physical-ed: #66BB6A;

  /* Typography */
  --font-heading: 'Nunito', sans-serif;
  --font-body: 'Open Sans', sans-serif;

  /* Type scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  /* Line heights */
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.75;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Border radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(78, 52, 46, 0.05);
  --shadow-md: 0 4px 6px rgba(78, 52, 46, 0.07);
  --shadow-lg: 0 10px 15px rgba(78, 52, 46, 0.1);
  --shadow-xl: 0 20px 25px rgba(78, 52, 46, 0.1);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;

  /* Layout */
  --container-max: 1200px;
  --nav-height: 80px;
  --nav-height-mobile: 64px;
}


/* ============================================
   2. CSS Reset & Base Styles
   ============================================ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: var(--nav-height-mobile);
  }
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text-medium);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
}


/* ============================================
   3. Typography
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-text-dark);
  line-height: var(--leading-tight);
}

h1 {
  font-size: var(--text-4xl);
  font-weight: 800;
}

h2 {
  font-size: var(--text-3xl);
  font-weight: 700;
}

h3 {
  font-size: var(--text-2xl);
  font-weight: 700;
}

h4 {
  font-size: var(--text-xl);
  font-weight: 600;
}

p {
  margin-bottom: var(--space-4);
}

p:last-child {
  margin-bottom: 0;
}


/* ============================================
   4. Layout Utilities
   ============================================ */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.section {
  padding: var(--space-16) 0;
}

.section-sm {
  padding: var(--space-12) 0;
}

.section-lg {
  padding: var(--space-24) 0;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sr-only:focus {
  position: fixed;
  top: var(--space-2);
  left: var(--space-2);
  width: auto;
  height: auto;
  margin: 0;
  padding: var(--space-2) var(--space-4);
  overflow: visible;
  clip: auto;
  white-space: normal;
  background: var(--color-leaf-green);
  color: var(--color-white);
  border-radius: var(--radius-md);
  z-index: 2000;
}


/* ============================================
   5. Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-base);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  cursor: pointer;
}

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

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

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

.btn-secondary:hover {
  background: var(--color-pale-green);
}

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

.btn-cta:hover {
  background: #EF5350;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

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


/* ============================================
   6. Navigation
   ============================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--color-white);
  z-index: 1000;
  transition: box-shadow var(--transition-base);
}

.nav.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.nav-logo-text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: var(--text-xl);
  color: var(--color-text-dark);
}

.nav-logo-text span {
  color: var(--color-leaf-green);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav-link {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-text-medium);
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link:hover {
  color: var(--color-leaf-green);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-leaf-green);
  transition: width var(--transition-base);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text-dark);
  border-radius: 1px;
  transition: all var(--transition-base);
}

/* Mobile menu */
@media (max-width: 768px) {
  .nav {
    height: var(--nav-height-mobile);
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: var(--nav-height-mobile);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    justify-content: flex-start;
    padding: var(--space-8);
    background: var(--color-white);
    transform: translateX(100%);
    transition: transform var(--transition-slow);
  }

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

  .nav-link {
    font-size: var(--text-xl);
  }

  .nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}


/* ============================================
   7. Hero Section
   ============================================ */

.hero {
  padding-top: calc(var(--nav-height) + var(--space-12));
  padding-bottom: var(--space-16);
  background: linear-gradient(135deg, var(--color-cream) 0%, var(--color-pale-green) 100%);
  min-height: min(80vh, 700px);
  display: flex;
  align-items: center;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.hero-content {
  max-width: 540px;
}

.hero-title {
  font-size: var(--text-5xl);
  margin-bottom: var(--space-2);
  color: var(--color-text-dark);
}

.hero-title span {
  color: var(--color-leaf-green);
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-wood-brown);
  margin-bottom: var(--space-6);
}

.hero-description {
  font-size: var(--text-lg);
  color: var(--color-text-medium);
  margin-bottom: var(--space-8);
}

.hero-buttons {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.hero-image {
  position: relative;
}

.hero-image img {
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
}

@media (max-width: 968px) {
  .hero {
    padding-top: calc(var(--nav-height-mobile) + var(--space-8));
    min-height: auto;
  }

  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-title {
    font-size: var(--text-4xl);
  }

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

  .hero-image {
    order: -1;
    max-width: 500px;
    margin: 0 auto;
  }
}


/* ============================================
   8. Service Cards (Option A - Color Block)
   ============================================ */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
}

.service-card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

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

.service-card-accent {
  height: 6px;
}

.service-card-accent--movement { background: var(--color-movement); }
.service-card-accent--early { background: var(--color-early-dev); }
.service-card-accent--speech { background: var(--color-speech); }
.service-card-accent--music { background: var(--color-music); }

.service-card-content {
  padding: var(--space-6);
}

.service-card-title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
}

.service-card-description {
  color: var(--color-text-light);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
}

.service-card-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-leaf-green);
  transition: gap var(--transition-fast);
}

.service-card-link:hover {
  gap: var(--space-3);
}

.service-card-link svg {
  width: 16px;
  height: 16px;
}


/* ============================================
   8b. Service Detail Page Layout
   ============================================ */

.service-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

@media (min-width: 768px) {
  .service-detail-grid {
    grid-template-columns: 2fr 1fr;
  }
}

.service-detail-content h2 {
  margin-bottom: var(--space-4);
}

.service-detail-content h3 {
  font-size: var(--text-lg);
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
}

.service-detail-content ul,
.service-detail-content ol {
  padding-left: var(--space-6);
  color: var(--color-text-medium);
}

.service-detail-content ul {
  list-style: disc;
}

.service-detail-content ol {
  list-style: decimal;
}

.service-detail-content ul li,
.service-detail-content ol li {
  margin-bottom: var(--space-2);
}

.service-detail-sidebar {
  background: var(--color-off-white);
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  height: fit-content;
}

.service-detail-sidebar h4 {
  font-size: var(--text-base);
  margin-bottom: var(--space-4);
}

.therapist-card {
  text-align: center;
  margin-bottom: var(--space-4);
}

.therapist-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto var(--space-3);
  border: 3px solid var(--color-movement);
}

.therapist-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.therapist-name {
  font-weight: 700;
  margin-bottom: var(--space-1);
}

.therapist-title {
  font-size: var(--text-sm);
  color: var(--color-text-light);
}

.therapist-contact {
  border-top: 1px solid var(--color-light-gray);
  padding-top: var(--space-4);
}

.therapist-contact p {
  font-size: var(--text-sm);
  margin-bottom: var(--space-2);
}

.therapist-contact a {
  color: var(--color-leaf-green);
}


/* ============================================
   9. Section Headers
   ============================================ */

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-12);
}

.section-header h2 {
  margin-bottom: var(--space-4);
}

.section-header p {
  color: var(--color-text-light);
  font-size: var(--text-lg);
}


/* ============================================
   10. Specialist Cards
   ============================================ */

.specialists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
}

.specialist-card {
  background: var(--color-off-white);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all var(--transition-base);
}

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

.specialist-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: var(--space-4);
  border: 4px solid var(--color-leaf-green);
  background: var(--color-light-gray);
}

.specialist-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.specialist-photo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-soft-green);
}

.specialist-photo--placeholder svg {
  width: 48px;
  height: 48px;
  color: var(--color-leaf-green);
}

.specialist-name {
  font-size: var(--text-lg);
  margin-bottom: var(--space-1);
}

.specialist-title {
  color: var(--color-leaf-green);
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: var(--space-3);
}

.specialist-bio {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  margin-bottom: var(--space-4);
}

.specialist-contact {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: 100%;
  margin-top: auto;
}

.specialist-contact a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-medium);
  transition: color var(--transition-fast);
}

.specialist-contact a:hover {
  color: var(--color-leaf-green);
}

.specialist-contact svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}


/* ============================================
   12. Building Gallery
   ============================================ */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 200px);
  gap: var(--space-4);
}

.gallery-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-base);
}

.gallery-item:hover {
  transform: scale(1.02);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
  }

  .gallery-item:first-child {
    grid-column: span 2;
    grid-row: span 1;
  }
}


/* ============================================
   13. Contact Section
   ============================================ */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--space-8);
  align-items: start;
}

.contact-info {
  background: var(--color-off-white);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
}

.contact-item {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.contact-item:last-child {
  margin-bottom: 0;
}

.contact-icon {
  width: 48px;
  height: 48px;
  background: var(--color-soft-green);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon svg {
  width: 24px;
  height: 24px;
  color: var(--color-leaf-green);
}

.contact-label {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  margin-bottom: var(--space-1);
}

.contact-value {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-text-dark);
}

.contact-value a:hover {
  color: var(--color-leaf-green);
}

.contact-map {
  border-radius: var(--radius-xl);
  overflow: hidden;
  height: 400px;
}

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

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

  .contact-map {
    height: 300px;
  }
}


/* ============================================
   14. Footer
   ============================================ */

.footer {
  background: var(--color-text-dark);
  color: var(--color-cream);
  padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

.footer-brand {
  max-width: 300px;
}

.footer-logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
}

.footer-logo span {
  color: var(--color-soft-green);
}

.footer-tagline {
  color: var(--color-light-wood);
  font-style: italic;
}

.footer-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
  color: var(--color-white);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-links a {
  color: var(--color-light-wood);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-soft-green);
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-light-wood);
  margin-bottom: var(--space-2);
}

.footer-contact-item svg {
  width: 16px;
  height: 16px;
  color: var(--color-soft-green);
}

.footer-bottom {
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-wood-brown);
  text-align: center;
  color: var(--color-light-wood);
  font-size: var(--text-sm);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}


/* ============================================
   15. Utility Classes
   ============================================ */

.bg-cream { background: var(--color-cream); }
.bg-pale-green { background: var(--color-pale-green); }
.bg-white { background: var(--color-white); }
.bg-off-white { background: var(--color-off-white); }

.text-green { color: var(--color-leaf-green); }

.text-link {
  color: var(--color-leaf-green);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.text-link:hover {
  color: #7CB342;
}
.text-dark { color: var(--color-text-dark); }


/* ============================================
   16. Animations
   ============================================ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
