/*
Theme Name: Elevate Yourself Theme
Author: Jake
Description: Custom WordPress theme for Elevate Yourself Counseling.
Version: 1.0
*/
/* --------------------------------------------------
   Typography
   -------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&family=Playfair+Display:wght@400;700&display=swap');

:root {
  /* Palette: warm pastel + deep plum accent */
  --color-bg: #F4F0EC;
  --color-surface: #FFFFFF;
  --color-primary: #5A2846; /* deep plum */
  --color-primary-hover: #752f59;
  --color-text: #2B2B2B;
  --color-muted: #6D6D6D;

  --radius: 0.5rem;
  --shadow-sm: 0 2px 4px rgba(0,0,0,.05);
  --shadow-md: 0 4px 10px rgba(0,0,0,.08);

  --container-max: 70rem; /* 1120px */
}

/* Base reset */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', Arial, sans-serif;
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
}
img { max-width: 100%; display: block; height: auto; }

/* Utility */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Containers */
.container {
  width: 90%;
  max-width: var(--container-max);
  margin-inline: auto;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.25s ease, transform 0.1s ease;
}
.btn--primary {
  background-color: var(--color-primary);
  color: #fff;
}
.btn--primary:hover,
.btn--primary:focus {
  background-color: var(--color-primary-hover);
}
.btn:active { transform: scale(0.98); }

/* Header & Navigation */
.site-header {
  background-color: var(--color-surface);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* (Removed header__contact - now in footer) */

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.site-branding {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex: 1 1 0;
}

/* Logo beside text styling */
.site-logo-img {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 0.5rem;
  box-shadow: var(--shadow-sm);
  background: #fff;
  object-fit: contain;
  margin: 0;
}

/* Keep site name vertically aligned */
.site-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  line-height: 1;
  display: block;
}

.site-logo__main,
.site-logo__secondary {
  /* Keep both parts on one line by default */
  display: inline;
}

@media (max-width: 600px) {
  .site-logo__main {
    display: block;
  }
  .site-logo__secondary {
    display: block;
  }
  .site-logo {
    line-height: 1.1; /* Looks cleaner with the break */
  }
}

/* Nav toggle (hamburger) */
.nav-toggle {
  background: none;
  border: 0;
  display: none;
  width: 2rem;
  aspect-ratio: 1 / 1;
  position: relative;
  cursor: pointer;
}
.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-text);
  transition: transform 0.3s ease;
}
.nav-toggle__bar {
  top: 50%;
  transform: translateY(-50%);
}
.nav-toggle__bar::before { top: -0.5rem; }
.nav-toggle__bar::after  { top:  0.5rem; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: translateY(0.5rem) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after  { transform: translateY(-0.5rem) rotate(-45deg); }

/* Navigation menu */
.primary-nav {
  display: none;
}
.primary-nav.open {
  display: block;
}
.nav__list {
  list-style: none;      /* Remove bullets */
  padding-left: 0;       /* Remove default ul indentation */
  margin: 0;             /* Remove extra margin */
  flex-direction: column;
  gap: 1rem;
  text-align: center;
}

.header__inner {
  flex-wrap: wrap;
}
.nav-toggle {
  display: block;
}

/* Shared styles */


/* ================= Sections ================= */
section {
  padding-block: 3rem;
}

/* Make vertical spacing consistent between sections */
.hero + .about {
  padding-top: 3rem;   /* match default */
  margin-top: 0;
}
.about {
  padding-bottom: 0.5rem;
  margin-bottom: 0;
}

/* HERO */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 430px;
  padding: 0;
  overflow: hidden;
}
.hero__inner {
  position: relative;
  width: 100%;
  height: 430px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__bg-img {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
  filter: brightness(0.7);
  pointer-events: none;
  user-select: none;
}
.hero__content {
  position: relative;
  z-index: 2;
  color: #fff;
  text-align: center;
  padding: 2rem 1rem;
  max-width: 600px;
  margin: 0 auto;
}
.hero__content h1,
.hero__content .hero__subhead {
  text-shadow: 0 2px 16px rgba(40,16,30,0.32), 0 1px 2px rgba(0,0,0,0.16);
}

/* Hero Heading - Large Font */
.hero__heading-large {
  font-size: 2.75rem;
  line-height: 1.08;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

@media (max-width: 600px) {
  .hero__inner,
  .hero {
    height: 320px;
    min-height: 320px;
  }
  .hero__content {
    padding: 1rem 0.5rem;
  }
  .hero__heading-large {
    font-size: 2rem;
  }
}
.center-text {
  text-align: center !important;
}

.what-to-expect-flex {
  display: flex;
  align-items: center;
  gap: 0; /* Remove the gap so each side gets exactly 50% */
  margin: 2rem 0 2rem 0;
}
/* Both image and list take 50% width */
.expect-img {
  flex: 1 1 0;
  width: 50%;
  max-width: 350px; /* Optional: keeps image from being too huge */
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Responsive: Stack on mobile */
@media (max-width: 800px) {
  .what-to-expect-flex {
    flex-direction: column;
    align-items: center;
  }
  .expect-img,
  .expect-list {
    width: 100%;
    max-width: 100%;
    padding: 0;
  }
  .expect-list {
    padding-left: 1.25rem;
    margin-top: 1.5rem;
  }
}

/* Match SimplePractice widget button to site style */
.spwidget-button,
.spwidget-button:link,
.spwidget-button:visited {
  background-color: var(--color-primary) !important;
  color: #fff !important;
  padding: 0.75rem 1.5rem !important;
  border-radius: var(--radius) !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  text-align: center !important;
  display: inline-block !important;
  cursor: pointer !important;
  transition: background-color 0.25s, transform 0.1s !important;
  box-shadow: none !important;
  border: none !important;
}

.spwidget-button:hover,
.spwidget-button:focus {
  background-color: var(--color-primary-hover) !important;
  color: #fff !important;
  outline: 2px solid var(--color-primary-hover);
  outline-offset: 2px;
  transform: scale(0.98) !important;
}

/* ABOUT */
.about h2 {
  font-family: 'Playfair Display', serif;
  margin-bottom: 1rem;
  text-align: center;
}
.about__inner {
  display: flex;
  align-items: center;
  gap: 1.2rem !important; /* Tightened gap between text and headshot */
  justify-content: center;
  flex-wrap: wrap;
}
.about__text {
  flex: 1 1 22rem;
  min-width: 250px;
}
.about__headshot {
  flex: 0 0 auto;
  max-width: 320px;
  margin: 0;
}
.about__headshot img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  width: 100%;
  height: auto;
  display: block;
}
/* Make sure figcaption is always centered under headshot image */
.about__caption {
  text-align: center;
  font-size: 1rem;
  color: var(--color-muted);
  margin-top: 0.5rem;
  font-style: italic;
  letter-spacing: 0.01em;
  width: 100%;
  display: block;
}
.about p { max-width: 60ch; margin-inline: auto; }

/* SERVICES */
.services h2 {
  font-family: 'Playfair Display', serif;
  margin-bottom: 2rem;
  text-align: center;
}
.card-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.card {
  background-color: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
/* Center card images in all views */
.card img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.card:hover,
.card:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.card__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  margin: 1rem;
}
.card__text { margin: 0 1rem 1.5rem; }
.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s;
  border-radius: var(--radius);
}
.card-link:focus-visible .card,
.card-link:hover .card {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  box-shadow: var(--shadow-md);
}
.card-link:active .card {
  opacity: 0.96;
}
.card-link .card {
  transition: box-shadow 0.2s;
}

/* Accordion Styles */
.accordion__item {
  border-bottom: 1px solid #ddd;
}
.accordion__question {
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  padding: 1rem 0;
  font-size: 1.1rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  color: var(--color-primary);
  outline: none;
  transition: color 0.2s;
}
.accordion__question[aria-expanded="true"] {
  color: var(--color-primary-hover);
}
.accordion__panel {
  padding: 0 0 1rem 0;
  animation: fadeIn 0.3s;
}
@keyframes fadeIn {
  from { opacity: 0;}
  to { opacity: 1;}
}

/* CONTACT */
.contact {
  background-color: var(--color-primary);
  color: #fff;
}
.contact h2 { text-align: center; margin-bottom: 2rem; }
.contact-form { max-width: 40rem; margin-inline: auto; display: grid; gap: 1rem; }
.form-group { display: grid; gap: 0.25rem; }
.form-group input,
.form-group textarea {
  padding: 0.75rem;
  border-radius: var(--radius);
  border: none;
  font-family: inherit;
}

.contact-form button { justify-self: start; }
.form-status { margin-top: 1rem; font-weight: 600; }

/* Status message classes for accessibility */
.form-status--error {
  color: #b00020; /* deep red, high contrast */
}
.form-status--success {
  color: #007e33; /* green, high contrast */
}

/* FOOTER */
.site-footer {
  background-color: var(--color-surface);
  color: var(--color-text);
  text-align: center;
  padding-block: 2rem;
}
.site-footer address { font-style: normal; }

.footer__contact {
  text-align: center;
  font-size: 1rem;
  color: var(--color-text);
  margin-top: 0.5rem;
  line-height: 1.6;
}
.footer__contact a {
  color: var(--color-primary);
  text-decoration: underline;
}

/* ================= Media Queries ================= */
/* Responsive stack on smaller screens */
@media (max-width: 800px) {
  .about__inner {
    flex-direction: column;
    gap: 1.2rem !important;
    align-items: center;
  }
  .about__headshot {
    max-width: 220px;
  }
}
/* (Optional) On mobile, tighten up card text/image alignment for aesthetics */
@media (max-width: 800px) {
  .card img {
    margin-left: auto;
    margin-right: auto;
  }
  .about__caption {
    text-align: center;
  }
}
/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
/* === Three-column header with CSS Grid === */
.header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 1rem;
}

.header__logo {
  /* left-aligned by default */
}

.header__title {
  /* center the two-line title */
  justify-self: center;
  text-align: center;
}

.header__nav {
  /* right-align the hamburger+nav */
  justify-self: end;
}

/* (Your existing mobile break for two-line title) */
@media (max-width: 600px) {
  .site-logo__main,
  .site-logo__secondary {
    display: block;
    width: 100%;
  }
  .site-logo {
    line-height: 1.1;
  }
}
