/* =============================================
   Habitat Speech Therapy - Global Stylesheet
   ============================================= */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;500;600;700;800&display=swap');

/* --- CSS Variables --- */
:root {
  --teal:      #2D624A;
  --teal-dark: #224d39;
  --sage:      #A5BE94;
  --beige:     #FFF5EC;
  --offwhite:  #F9F9F9;
  --charcoal:  #1C1C1C;
  --white:     #FFFFFF;
  --shadow:    rgba(0, 0, 0, 0.08);
  --radius:    8px;
  --max-width: 1100px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--charcoal);
  background: var(--white);
}

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

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--teal);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); margin-bottom: 0.5rem; }
h4 { font-size: 1rem; }

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

/* --- Layout Utilities --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 3.5rem 0;
}

.section--beige  { background: var(--beige); }
.section--offwhite { background: var(--offwhite); }
.section--teal {
  background: var(--teal);
  color: var(--white);
}
.section--teal h2,
.section--teal h3 { color: var(--white); }

.section__header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 2rem;
}

.section__header p {
  color: #555;
  font-size: 1.1rem;
}

.section--teal .section__header p { color: rgba(255,255,255,0.85); }

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.1s;
  text-decoration: none;
  border: 2px solid transparent;
}

.btn--primary {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}
.btn--primary:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  color: var(--teal);
  border-color: var(--teal);
}
.btn--outline:hover {
  background: var(--teal);
  color: var(--white);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn--white {
  background: var(--white);
  color: var(--teal);
  border-color: var(--white);
}
.btn--white:hover {
  background: var(--beige);
  text-decoration: none;
  transform: translateY(-1px);
}

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  box-shadow: 0 2px 12px var(--shadow);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav__logo {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-decoration: none;
}

.nav__logo-name {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--teal);
  letter-spacing: -0.02em;
}

.nav__logo-sub {
  font-size: 1rem;
  font-weight: 500;
  color: var(--sage);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav__links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav__links a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--charcoal);
  text-decoration: none;
  transition: color 0.2s;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

/* Mobile hamburger */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--charcoal);
  transition: all 0.3s;
}

@media (max-width: 768px) {
  .nav__toggle { display: flex; }

  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    gap: 0;
    box-shadow: 0 4px 12px var(--shadow);
  }

  .nav__links.open { display: flex; }

  .nav__links a {
    display: block;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--offwhite);
    border-left: none;
  }
}

/* --- Hero --- */
.hero {
  background-image: url('images/leaves.jpg');
  background-size: cover;
  background-position: center;
  color: var(--white);
  padding: 5rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(30, 70, 45, 0.55);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1.2rem;
  font-weight: 700;
}

.hero__sub {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  opacity: 0.92;
  margin-bottom: 2.2rem;
  font-weight: 400;
}

/* --- Cards --- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 2px 16px var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.27);
}

.card__icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.card h3 { color: var(--teal); }

.card p { color: #555; font-size: 0.95rem; }

/* --- Credential badges --- */
.credentials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.badge {
  background: var(--beige);
  color: var(--teal);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.9rem;
  border-radius: 50px;
  border: 1px solid rgba(45, 98, 74, 0.2);
}

.area-bubbles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  max-width: 750px;
  margin: 0 auto;
}

/* --- Two-column layout --- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; gap: 2rem; }
}

/* --- Photo placeholder --- */
.photo-block {
  background: var(--sage);
  border-radius: var(--radius);
  aspect-ratio: 3/4;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  max-height: 480px;
  overflow: hidden;
}

.photo-block img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

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

details {
  border-bottom: 1px solid rgba(45,98,74,0.15);
}

details:first-child { border-top: 1px solid rgba(45,98,74,0.15); }

summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem 0;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--teal);
  list-style: none;
  gap: 1rem;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  flex-shrink: 0;
  transition: transform 0.2s;
  color: var(--sage);
}

details[open] summary::after { transform: rotate(45deg); }

.faq-answer {
  padding-bottom: 1.4rem;
  color: #444;
  line-height: 1.8;
}

/* --- Contact section --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

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

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

.contact-item__icon {
  font-size: 1.4rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.contact-item__label {
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sage);
  display: block;
  margin-bottom: 0.15rem;
}

.contact-item__value {
  color: var(--charcoal);
  font-size: 1rem;
}

.contact-item__value a {
  color: var(--charcoal);
  text-decoration: none;
}
.contact-item__value a:hover { color: var(--teal); }

.form-placeholder {
  background: var(--offwhite);
  border: 2px dashed var(--sage);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  color: #888;
  font-size: 0.9rem;
}

/* --- Resources --- */
.resource-group { margin-bottom: 3rem; }
.resource-group h3 { margin-bottom: 1rem; border-bottom: 2px solid var(--sage); padding-bottom: 0.5rem; }

.resource-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.resource-list a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  color: var(--teal);
}

.resource-list a::before {
  content: '→';
  font-size: 0.9rem;
  color: var(--sage);
}

.resource-list a:hover { color: var(--teal-dark); }

/* --- CTA Banner --- */
.cta-banner {
  background: var(--teal);
  color: var(--white);
  text-align: center;
  padding: 3rem 1.5rem;
}

.cta-banner h2 { color: var(--white); margin-bottom: 1rem; }
.cta-banner p { opacity: 0.88; margin-bottom: 2rem; font-size: 1.1rem; }

/* --- Footer --- */
.footer {
  background: var(--charcoal);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.85rem;
}

.footer a { color: rgba(255,255,255,0.6); }
.footer a:hover { color: var(--white); }

.footer__links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1rem;
  list-style: none;
}

/* --- Utility --- */
.text-center { text-align: center; }
.mt-2 { margin-top: 1.5rem; }
.mt-3 { margin-top: 2rem; }
