/* 
 * Style for After the Rain Therapy (Janel Halloff, LCSW)
 * Calming, premium design matched to the practice logo
 */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;1,400&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,400&display=swap');

:root {
  /* Color Palette matching the Logo */
  --primary-color: #1B4051;    /* Deep Teal/Navy (Raindrop, Outlines, Logo Text) */
  --primary-light: #2A5D74;    /* Slightly lighter Teal for hover states */
  --secondary-color: #4B6C44;  /* Deep Forest Green (Circle Background) */
  --accent-color: #70A060;     /* Sage Green (Butterfly Wings) */
  
  /* Neutral Palette */
  --bg-cream: #FAF7F2;         /* Warm off-white background */
  --bg-mint: #F0F5EE;          /* Softest light mint-cream for alternating sections */
  --bg-white: #FFFFFF;
  --text-dark: #2A2E2D;        /* Charcoal for high readability */
  --text-muted: #586361;       /* Softer charcoal for sub-elements */
  --border-color: #BDD1B6;     /* Dusty Sage Green for borders & lines */
  --shadow-color: rgba(27, 64, 81, 0.06);
  --shadow-hover: rgba(27, 64, 81, 0.12);

  /* Layout Variables */
  --max-width: 1100px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --border-radius: 12px;
}

/* Base resets */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Lora', Georgia, serif;
  color: var(--text-dark);
  background-color: var(--bg-cream);
  line-height: 1.7;
  font-size: 1.1rem;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--primary-color);
  line-height: 1.3;
  font-weight: 600;
}

p {
  margin-bottom: 1.5rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-color);
}

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

/* Navigation bar styling */
header {
  background-color: rgba(250, 247, 242, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

header.scrolled {
  background-color: rgba(250, 247, 242, 0.95);
  box-shadow: 0 4px 20px var(--shadow-color);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 90px;
  transition: var(--transition);
}

header.scrolled .nav-container {
  height: 70px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-color);
}

.logo-link img {
  height: 48px;
  width: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--primary-color);
  transition: var(--transition);
}

header.scrolled .logo-link img {
  height: 38px;
  width: 38px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  font-weight: 500;
  color: var(--primary-color);
  font-size: 1.05rem;
  position: relative;
}

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

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

.btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  border: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--bg-cream);
  border: 1px solid var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-light);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-hover);
}

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

.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--bg-cream);
  transform: translateY(-2px);
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--primary-color);
  margin: 5px 0;
  transition: var(--transition);
}

/* Sections Base */
section {
  padding: 7rem 0 5rem;
}

.section-alt {
  background-color: var(--bg-mint);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
  padding-bottom: 0.8rem;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: var(--accent-color);
  border-radius: 2px;
}

.section-header p {
  font-size: 1.2rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Hero Section */
.hero {
  padding-top: 10rem;
  padding-bottom: 6rem;
  min-height: 90vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background-image: linear-gradient(135deg, var(--bg-cream) 60%, var(--bg-mint) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  font-weight: 700;
}

.hero-content p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  color: var(--text-muted);
  font-weight: 400;
}

.hero-cta {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.hero-image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-image-wrapper {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  padding: 15px;
  background: var(--bg-white);
  border: 2px dashed var(--border-color);
  animation: rotateDashed 40s linear infinite;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-logo-flutter {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
  transform-style: preserve-3d;
  animation: heroFlutter 8s ease-in-out infinite;
}

.hero-logo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  animation: counterRotate 40s linear infinite;
  border: 1px solid var(--primary-color);
  box-shadow: 0 10px 30px var(--shadow-color);
}

@keyframes rotateDashed {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes counterRotate {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

@keyframes heroFlutter {
  /* Smooth Glide Phase (0% to 30%) */
  0% {
    transform: rotateY(0deg) translateY(0) rotateX(0deg);
  }
  15% {
    transform: rotateY(8deg) translateY(-6px) rotateX(1deg);
  }
  30% {
    transform: rotateY(-8deg) translateY(-3px) rotateX(-1deg);
  }
  
  /* Active Flutter Phase (Rapid Flapping) (38% to 62%) */
  38% {
    transform: rotateY(26deg) translateY(-9px) rotateX(3deg);
  }
  42% {
    transform: rotateY(-22deg) translateY(-5px) rotateX(-2deg);
  }
  46% {
    transform: rotateY(24deg) translateY(-10px) rotateX(3deg);
  }
  50% {
    transform: rotateY(-20deg) translateY(-6px) rotateX(-2deg);
  }
  54% {
    transform: rotateY(18deg) translateY(-8px) rotateX(2deg);
  }
  58% {
    transform: rotateY(-12deg) translateY(-5px) rotateX(-1deg);
  }
  62% {
    transform: rotateY(0deg) translateY(-4px) rotateX(0deg);
  }
  
  /* Glide & Descend Phase (62% to 100%) */
  80% {
    transform: rotateY(-6deg) translateY(3px) rotateX(-1deg);
  }
  100% {
    transform: rotateY(0deg) translateY(0) rotateX(0deg);
  }
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.about-quote {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.6rem;
  line-height: 1.5;
  color: var(--primary-color);
  text-align: center;
  max-width: 850px;
  margin: 0 auto 3rem;
  font-style: italic;
  position: relative;
  padding: 0 2rem;
}

.about-quote::before,
.about-quote::after {
  font-size: 4rem;
  position: absolute;
  color: rgba(112, 160, 96, 0.2);
  line-height: 1;
}

.about-quote::before {
  content: '“';
  top: -20px;
  left: -10px;
}

.about-quote::after {
  content: '”';
  bottom: -40px;
  right: -10px;
}

.about-story {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-photo {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.about-image {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2.5px solid var(--border-color);
  box-shadow: 0 10px 30px var(--shadow-color);
  animation: portraitFloat 8s ease-in-out infinite;
}

@keyframes portraitFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.about-bio p {
  font-size: 1.15rem;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}

.about-calling {
  background-color: var(--bg-white);
  padding: 2.5rem;
  border-radius: var(--border-radius);
  border-left: 5px solid var(--secondary-color);
  box-shadow: 0 8px 30px var(--shadow-color);
}

.about-calling h3 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

.about-calling p {
  margin-bottom: 0;
  font-style: italic;
}

.credentials-list {
  list-style: none;
  margin-top: 1.8rem;
}

.credentials-list li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.8rem;
  font-size: 1.05rem;
  font-weight: 500;
}

.credentials-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--secondary-color);
  font-weight: 700;
  font-size: 1.2rem;
}

/* Specialties Section */
.specialties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .specialties-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 850px;
    margin: 0 auto;
  }
}


.specialty-card {
  background-color: var(--bg-white);
  padding: 2.5rem 2rem;
  border-radius: var(--border-radius);
  box-shadow: 0 6px 20px var(--shadow-color);
  transition: var(--transition);
  border: 1px solid rgba(189, 209, 182, 0.3);
  display: flex;
  flex-direction: column;
}

.specialty-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px var(--shadow-hover);
  border-color: var(--border-color);
}

.specialty-icon {
  width: 60px;
  height: 60px;
  background-color: var(--bg-mint);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  transition: var(--transition);
}

.specialty-card:hover .specialty-icon {
  background-color: var(--primary-color);
  color: var(--bg-cream);
}

.specialty-icon svg {
  width: 28px;
  height: 28px;
}

.specialty-card h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.specialty-card p {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 0;
  flex-grow: 1;
}

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

.faq-item {
  background-color: var(--bg-white);
  border-radius: var(--border-radius);
  margin-bottom: 1.2rem;
  box-shadow: 0 4px 15px var(--shadow-color);
  border: 1px solid rgba(189, 209, 182, 0.2);
  overflow: hidden;
  transition: var(--transition);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-color);
  transition: var(--transition);
}

.faq-question:hover {
  background-color: rgba(240, 245, 238, 0.4);
}

.faq-chevron {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
  color: var(--accent-color);
}

.faq-chevron svg {
  width: 100%;
  height: 100%;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.faq-answer-inner {
  padding: 0 2rem 1.8rem;
  color: var(--text-dark);
  font-size: 1.1rem;
  border-top: 1px solid rgba(240, 245, 238, 0.8);
  padding-top: 1.2rem;
}

.faq-item.active .faq-chevron {
  transform: rotate(180deg);
}

/* Contact & Info Section */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.info-card {
  background-color: var(--bg-white);
  padding: 2.5rem;
  border-radius: var(--border-radius);
  box-shadow: 0 6px 20px var(--shadow-color);
  border: 1px solid rgba(189, 209, 182, 0.2);
}

.info-card h3 {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
}

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

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

.info-icon {
  width: 48px;
  height: 48px;
  background-color: var(--bg-mint);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--primary-color);
  flex-shrink: 0;
}

.info-icon svg {
  width: 22px;
  height: 22px;
}

.info-text h4 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
  font-family: 'Playfair Display', Georgia, serif;
}

.info-text p, .info-text a {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.info-text a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

/* Contact Form */
.contact-form-container {
  background-color: var(--bg-white);
  padding: 3rem;
  border-radius: var(--border-radius);
  box-shadow: 0 8px 30px var(--shadow-color);
  border: 1px solid rgba(189, 209, 182, 0.3);
}

.contact-form-container h3 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-family: 'Lora', Georgia, serif;
  font-size: 1.05rem;
  background-color: var(--bg-cream);
  color: var(--text-dark);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: var(--bg-white);
  box-shadow: 0 0 0 4px rgba(27, 64, 81, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 130px;
}

/* Submit Message Banner */
.form-response {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 8px;
  display: none;
  font-weight: 500;
  font-size: 1rem;
  text-align: center;
}

.form-response.success {
  display: block;
  background-color: rgba(112, 160, 96, 0.15);
  color: var(--secondary-color);
  border: 1px solid var(--accent-color);
}

.form-response.error {
  display: block;
  background-color: rgba(180, 50, 50, 0.1);
  color: #B43232;
  border: 1px solid rgba(180, 50, 50, 0.3);
}

/* Footer Section */
footer {
  background-color: var(--primary-color);
  color: #E2ECE9;
  padding: 4rem 0 2rem;
  border-top: 5px solid var(--secondary-color);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand h3 {
  color: var(--bg-cream);
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 1.05rem;
  color: #B9D0CA;
  margin-bottom: 1.5rem;
}

.footer-logo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1.5px solid var(--bg-cream);
  object-fit: cover;
}

.footer-links h4, .footer-contact h4 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--bg-cream);
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-links a {
  color: #B9D0CA;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--bg-cream);
  padding-left: 5px;
}

.footer-contact p {
  font-size: 1.05rem;
  margin-bottom: 0.8rem;
  color: #B9D0CA;
}

.footer-contact a {
  color: #B9D0CA;
}

.footer-contact a:hover {
  color: var(--bg-cream);
}

.footer-bottom {
  border-top: 1px solid rgba(185, 208, 202, 0.15);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.95rem;
  color: #A3BDB6;
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .hero-content h1 {
    font-size: 3rem;
  }
  .about-story {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  /* Navigation mobile behavior */
  .nav-menu {
    position: fixed;
    top: 90px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 90px);
    background-color: var(--bg-cream);
    flex-direction: column;
    padding: 3rem 2rem;
    gap: 2.5rem;
    transition: var(--transition);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 10px 30px var(--shadow-color);
  }
  
  header.scrolled .nav-menu {
    top: 70px;
    height: calc(100vh - 70px);
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .mobile-toggle {
    display: block;
  }
  
  .mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .mobile-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }
  
  /* Hero mobile adjustments */
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .hero-cta {
    justify-content: center;
  }
  
  .hero-image-wrapper {
    width: 250px;
    height: 250px;
  }
  
  /* Footer adjustments */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  
  /* General padding */
  section {
    padding: 5rem 0 4rem;
  }
}
