/* ==========================================================================
   The Emerging Mind — Psychology & Counseling Theme
   Calming palette: white, light blue, sage green, beige
   ========================================================================== */

:root {
  --color-white: #ffffff;
  --color-cream: #faf8f5;
  --color-beige: #f0ebe3;
  --color-beige-dark: #e2d9cc;
  --color-sky: #e3f0f5;
  --color-sky-deep: #b8d4e3;
  --color-sage: #7a9b8a;
  --color-sage-dark: #5f7f6d;
  --color-sage-light: #a8c5b4;
  --color-text: #2d3a3f;
  --color-text-muted: #5c6b72;
  --color-accent: #4a7c8c;
  --color-accent-dark: #3a6573;
  --color-brand-green: #1f4a36;
  --font-heading: "Cormorant Garamond", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, sans-serif;
  --shadow-sm: 0 2px 12px rgba(45, 58, 63, 0.06);
  --shadow-md: 0 8px 30px rgba(45, 58, 63, 0.1);
  --shadow-lg: 0 16px 48px rgba(45, 58, 63, 0.12);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 76px;
}

/* Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-text);
  background-color: var(--color-cream);
  line-height: 1.65;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-text);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent-dark);
}

img {
  max-width: 100%;
  height: auto;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: var(--color-sage);
  color: var(--color-white);
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 1rem;
}

/* ==========================================================================
   Sticky Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
}

.site-navbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(122, 155, 138, 0.15);
  padding: 0.75rem 0;
  transition: box-shadow var(--transition), padding var(--transition);
}

.site-navbar.scrolled {
  box-shadow: var(--shadow-sm);
  padding: 0.5rem 0;
}

.site-brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none !important;
  transition: opacity var(--transition), transform var(--transition);
}

.site-brand:hover,
.footer-brand:hover {
  opacity: 0.92;
}

.site-brand:hover .brand-mark,
.footer-brand:hover .brand-mark {
  transform: scale(1.04);
}

/* Shared logo + wordmark lockup (header & footer) */
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  max-width: 100%;
}

/* Circular emblem: crops the square logo to the icon area only so the
   baked-in wordmark is not duplicated beside .brand-name. Image unchanged. */
.brand-mark {
  flex-shrink: 0;
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 50%;
  background-color: #f7fbf8;
  background-image: url("/images/the-emerging-mind-logo.png");
  background-repeat: no-repeat;
  background-size: 220%;
  background-position: 50% 10%;
  border: 1px solid rgba(122, 155, 138, 0.22);
  box-shadow: 0 2px 10px rgba(45, 58, 63, 0.08);
  transition: transform var(--transition), box-shadow var(--transition);
}

.brand-name {
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--color-brand-green);
}

/* Header: emblem blends with light frosted navbar */
.site-brand .brand-mark {
  background-color: #f7fbf8;
}

.site-brand .brand-name {
  color: var(--color-brand-green);
}

/* Footer: light emblem tile on deep green-slate gradient */
.footer-brand {
  margin-bottom: 1rem;
}

.footer-brand .brand-mark {
  background-color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.footer-brand .brand-name {
  color: var(--color-white);
}

@media (max-width: 575.98px) {
  .brand-lockup {
    gap: 0.55rem;
  }

  .brand-mark {
    width: 2.45rem;
    height: 2.45rem;
    background-size: 230%;
  }
}

.site-navbar .nav-link {
  font-weight: 500;
  color: var(--color-text-muted) !important;
  padding: 0.5rem 1rem !important;
  border-radius: 8px;
  position: relative;
  transition: color var(--transition), background var(--transition);
}

.site-navbar .nav-link::after {
  content: "";
  position: absolute;
  bottom: 0.15rem;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--color-sage);
  transition: width var(--transition), left var(--transition);
}

.site-navbar .nav-link:hover,
.site-navbar .nav-link.active {
  color: var(--color-sage-dark) !important;
}

.site-navbar .nav-link:hover::after,
.site-navbar .nav-link.active::after {
  width: 60%;
  left: 20%;
}

.nav-link-cta {
  background: var(--color-sage) !important;
  color: var(--color-white) !important;
  margin-left: 0.25rem;
}

.nav-link-cta::after {
  display: none !important;
}

.nav-link-cta:hover,
.nav-link-cta.active {
  background: var(--color-sage-dark) !important;
  color: var(--color-white) !important;
}

.site-nav-toggler {
  border-color: var(--color-sage-light);
}

.site-nav-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(122, 155, 138, 0.35);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  border-radius: 50px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.65rem 1.5rem;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  border: none;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-accent-dark), var(--color-accent));
  box-shadow: var(--shadow-md);
}

.btn-sage {
  background: var(--color-sage);
  color: var(--color-white);
  border: none;
}

.btn-sage:hover {
  background: var(--color-sage-dark);
  color: var(--color-white);
}

.btn-outline-sage {
  color: var(--color-sage-dark);
  border: 2px solid var(--color-sage);
  background: transparent;
}

.btn-outline-sage:hover {
  background: var(--color-sage);
  color: var(--color-white);
  border-color: var(--color-sage);
}

.btn-outline-light:hover {
  background: var(--color-white);
  color: var(--color-accent-dark);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #5a8a9a 0%, #7a9b8a 45%, #8fb0a0 100%);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  padding: 4rem 0 6rem;
}

.hero-section.hero-has-image {
  background-blend-mode: normal;
}

/* Readable text overlay on photographic hero backgrounds */
.hero-section.hero-has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    105deg,
    rgba(36, 51, 48, 0.78) 0%,
    rgba(74, 124, 140, 0.52) 50%,
    rgba(122, 155, 138, 0.38) 100%
  );
  pointer-events: none;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(255, 255, 255, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(227, 240, 245, 0.15) 0%, transparent 45%);
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(to bottom, transparent 55%, var(--color-cream) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
}

.min-vh-75 {
  min-height: 70vh;
}

.hero-eyebrow {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  color: var(--color-white);
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.92);
  max-width: 36rem;
  margin-bottom: 2rem;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-btn {
  min-width: 180px;
}

.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  line-height: 0;
  z-index: 4;
}

.hero-wave svg {
  width: 100%;
  height: 80px;
}

.hero-wave path {
  fill: var(--color-cream);
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--color-beige);
}

.section-eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-sage);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-bottom: 1rem;
}

.section-lead {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  max-width: 42rem;
}

/* When a lead paragraph is meant to be centered, center the box itself.
   max-width alone leaves a block element left-aligned without auto margins. */
.section-lead.text-center {
  margin-left: auto;
  margin-right: auto;
}

.section-header {
  margin-bottom: 3rem;
}

/* Shared content imagery */
.content-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), box-shadow var(--transition);
}

.about-image-frame,
.section-image-wrap {
  overflow: hidden;
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-md);
}

.about-image-wrap:hover .content-image,
.section-image-wrap:hover .content-image,
.contact-image-wrap:hover .content-image {
  transform: scale(1.03);
  box-shadow: var(--shadow-lg);
}

.contact-image-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  max-width: 100%;
}

.section-banner {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.section-banner-image {
  width: 100%;
  height: auto;
  max-height: 22rem;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.6s ease;
}

.section-banner:hover .section-banner-image {
  transform: scale(1.02);
}

/* About preview */
.about-image-wrap {
  position: relative;
}

.about-image-placeholder {
  aspect-ratio: 4/3;
  background: linear-gradient(145deg, var(--color-sky), var(--color-sage-light));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-md);
}

.about-badge {
  position: absolute;
  bottom: -1rem;
  right: -0.5rem;
  background: var(--color-white);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.about-badge-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-sage);
  line-height: 1;
}

.about-badge-text {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.about-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  color: var(--color-text-muted);
}

.about-features i {
  color: var(--color-sage);
  margin-top: 0.2rem;
}

/* Service cards */
.service-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(122, 155, 138, 0.12);
  transition: transform var(--transition), box-shadow var(--transition);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.service-icon {
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-sky);
  color: var(--color-accent);
  border-radius: 50%;
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
}

.service-title {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--color-sage-dark);
  margin-top: 0.5rem;
}

.service-link:hover {
  gap: 0.65rem;
}

/* Emerging adulthood */
.emerging-image-wrap {
  position: relative;
}

.emerging-stats-overlay {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  z-index: 2;
}

.emerging-stats-overlay .emerging-stat {
  padding: 1rem 1.35rem;
  min-width: 110px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.emerging-visual {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.emerging-stat {
  background: var(--color-white);
  padding: 2rem 2.5rem;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-beige-dark);
  min-width: 140px;
}

.emerging-stat-label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

.emerging-stat-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-sage);
}

/* Blog cards */
.blog-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(122, 155, 138, 0.1);
  transition: transform var(--transition), box-shadow var(--transition);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.blog-card-image {
  height: 200px;
  overflow: hidden;
  background: var(--color-sky);
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.06);
}

.article-featured-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow-md);
}

.blog-image-1 {
  background: linear-gradient(135deg, var(--color-sky-deep), var(--color-sage-light));
}

.blog-image-2 {
  background: linear-gradient(135deg, var(--color-beige-dark), var(--color-sage));
}

.blog-image-3 {
  background: linear-gradient(135deg, var(--color-accent), var(--color-sky-deep));
}

.blog-card-body {
  padding: 1.5rem;
}

.blog-date {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.blog-title {
  font-size: 1.2rem;
  margin: 0.5rem 0;
}

.blog-title a {
  color: var(--color-text);
}

.blog-title a:hover {
  color: var(--color-sage);
}

.blog-read-more {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-sage-dark);
}

/* Testimonials */
.testimonial-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 0;
  border: none;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--color-sage);
}

.testimonial-stars {
  color: #d4a853;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.testimonial-card p {
  font-style: italic;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.testimonial-card cite {
  font-style: normal;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
}

/* Contact CTA */
.section-cta {
  padding-bottom: 6rem;
}

.cta-panel {
  background: linear-gradient(135deg, var(--color-sage) 0%, var(--color-accent) 100%);
  border-radius: var(--radius-lg);
  padding: 4rem 2rem;
  color: var(--color-white);
  box-shadow: var(--shadow-lg);
}

.cta-title {
  color: var(--color-white);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin-bottom: 1rem;
}

.cta-text {
  font-size: 1.1rem;
  opacity: 0.92;
  max-width: 32rem;
  margin: 0 auto 2rem;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* Inner page hero */
.page-hero {
  background: linear-gradient(135deg, var(--color-sky) 0%, var(--color-beige) 100%);
  padding: 4rem 0 3rem;
  text-align: center;
  border-bottom: 1px solid var(--color-beige-dark);
}

.page-hero-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 0.5rem;
}

.page-hero-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  max-width: 36rem;
  margin: 0 auto;
}

.page-content {
  font-size: 1.05rem;
}

/* Contact form */
.contact-form .form-control {
  border-radius: var(--radius);
  border: 1px solid var(--color-beige-dark);
  padding: 0.75rem 1rem;
}

.contact-form .form-control:focus {
  border-color: var(--color-sage);
  box-shadow: 0 0 0 0.2rem rgba(122, 155, 138, 0.25);
}

.contact-details li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--color-text-muted);
}

.contact-details i {
  color: var(--color-sage);
  width: 1.25rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  /* Deep green-slate gradient that echoes the logo's greens while keeping
     strong contrast for the light footer text. */
  background: linear-gradient(160deg, #2f3d39 0%, #243330 100%);
  color: rgba(255, 255, 255, 0.85);
  padding: 4rem 0 0;
}


.footer-tagline {
  font-size: 0.95rem;
  opacity: 0.8;
  max-width: 280px;
  margin-bottom: 1.5rem;
}

.footer-heading {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-white);
  margin-bottom: 1rem;
}

.footer-links a,
.footer-bottom a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
  transition: color var(--transition);
}

.footer-links a:hover,
.footer-bottom a:hover {
  color: var(--color-sage-light);
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-contact li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  opacity: 0.85;
}

.footer-contact i {
  color: var(--color-sage-light);
  width: 1.1rem;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-white) !important;
  border-radius: 50%;
  transition: background var(--transition), transform var(--transition);
}

.social-link:hover {
  background: var(--color-sage);
  transform: translateY(-3px);
  color: var(--color-white) !important;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.9rem;
  opacity: 0.75;
}

.footer-bottom p {
  margin: 0;
}

/* ==========================================================================
   Scroll animations
   ========================================================================== */

.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children in rows */
.row > .animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.row > .animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 991.98px) {
  .site-navbar .navbar-collapse {
    background: var(--color-white);
    padding: 1rem;
    margin-top: 0.75rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
  }

  .nav-link-cta {
    margin-left: 0 !important;
    margin-top: 0.5rem;
    text-align: center;
  }

  .about-badge {
    right: 0;
    bottom: -0.5rem;
  }

  .hero-section {
    min-height: auto;
    padding: 5rem 0 5rem;
  }

  .min-vh-75 {
    min-height: auto;
  }
}

@media (max-width: 575.98px) {
  .section {
    padding: 3.5rem 0;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-btn {
    width: 100%;
  }

  .cta-panel {
    padding: 2.5rem 1.25rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* Focus styles for accessibility */
.btn:focus,
.btn:active:focus,
.form-control:focus,
.nav-link:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(122, 155, 138, 0.4);
}
