/*
Theme Name: Gentle Tides
Theme URI: https://gentletides.com
Author: Kassie Pimbley
Author URI: https://gentletides.com
Description: Custom WordPress theme for Gentle Tides Birth Services & Childbirth Education.
Version: 1.0.1
Text Domain: gentletides
*/

:root {
  --sage: #567c6b;
  --sage-dark: #456556;
  --navy: #1e3a5f;
  --mint: #b8cfc7;
  --coral: #e28a8a;
  --bg: #f5f6f0;
  --card-bg: #f5f6f0;
  --sage-light: #eef2f0;
  --white: #ffffff;
  --text-light: #334155;
  --font-heading: 'Georgia', serif;
  --font-body: 'Helvetica Neue', Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--navy);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: normal;
  color: var(--navy);
}

h1 {
  font-size: 3.5rem;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

p {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  max-width: 65ch;
  line-height: 1.8;
}

a {
  color: var(--sage);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

form label {
  display: block;
  color: var(--navy);
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  text-transform: lowercase;
}

input.has-error {
  border-color: var(--coral) !important;
  background-color: #fdf6f6 !important;
}

/* Layout */
section {
  scroll-margin-top: 140px;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Navbar */
header {
  padding: 1.5rem 0;
  background-color: rgba(245, 246, 240, 0.9);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--mint);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo-container img {
  height: 80px;
  transition: transform 0.3s ease;
}

.hamburger {
  display: none;
}

.nav-links {
  display: flex;
  gap: 3rem;
  align-items: center;
}

.nav-links a:not(.btn) {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  letter-spacing: 1px;
  color: var(--navy);
  text-transform: lowercase;
  position: relative;
}

.nav-links a:not(.btn)::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--sage);
  transition: width 0.3s ease;
}

.nav-links a:not(.btn):hover::after, .nav-links a:not(.btn).active::after {
  width: 100%;
}

.nav-links a:not(.btn):hover, .nav-links a:not(.btn).active {
  color: var(--sage);
}

/* Button */
.btn {
  display: inline-block;
  background-color: var(--sage);
  color: var(--white);
  padding: 0.8rem 2rem;
  border-radius: 30px;
  text-transform: lowercase;
  letter-spacing: 1px;
  font-size: 1.1rem;
  font-family: var(--font-heading);
  font-weight: normal;
  white-space: nowrap;
  transition: all 0.3s ease;
  border: 1px solid var(--sage);
}

.btn:hover {
  background-color: var(--navy);
  border-color: var(--navy);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(30, 58, 95, 0.1);
}

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

.btn-outline:hover {
  background-color: var(--navy);
  color: var(--white);
}

/* Hero Section */
.hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 4rem 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 50%;
  padding-right: 2rem;
}

.hero-tag {
  color: var(--sage);
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 1rem;
}

.hero-image {
  position: absolute;
  right: 0;
  top: 0;
  width: 50%;
  height: 100%;
  object-fit: cover;
  border-bottom-left-radius: 50% 20%;
  box-shadow: -10px 0 30px rgba(0,0,0,0.05);
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

/* Services Overview */
.services-section {
  padding: 6rem 0;
  background-color: var(--bg);
  text-align: center;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin: 4rem auto 0;
}

.service-card {
  background: var(--card-bg);
  padding: 3rem 4rem;
  border-radius: 20px;
  text-align: left;
  box-shadow: 0 20px 40px rgba(30, 58, 95, 0.04);
  transition: transform 0.4s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.service-card .btn {
  margin-top: auto;
  align-self: flex-start;
}

.service-card:hover {
  transform: translateY(-10px);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--sage);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 80px;
  height: 80px;
  background-color: var(--mint);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--sage);
}

.service-icon svg, .service-icon img {
  width: 50px;
  height: 50px;
}

.service-card h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.badge {
  display: inline-block;
  background-color: var(--mint);
  color: var(--navy);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

/* Service Card Lists */
.service-card ul {
  list-style: none;
  margin-bottom: 1.5rem;
}

.service-card li {
  color: var(--text-light);
  margin-bottom: 0.8rem;
  font-size: 1.05rem;
  line-height: 1.5;
  position: relative;
  padding-left: 1.5rem;
}

.service-card li::before {
  content: "•";
  color: var(--sage);
  font-weight: bold;
  position: absolute;
  left: 0;
  font-size: 1.2rem;
}

.service-card .italic-note {
  font-style: italic;
  font-size: 0.95rem;
  color: var(--sage);
  margin-bottom: 1.5rem;
}

/* About */
.about-container {
  display: flex;
  gap: 4rem;
  align-items: center;
}

/* Footer */
footer {
  background-color: var(--navy);
  color: var(--white);
  padding: 4rem 0 2rem;
  text-align: center;
}

.footer-logo {
  height: 180px;
  margin-bottom: 2rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-links a {
  color: var(--mint);
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

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

.legal-modal-trigger:hover {
  color: var(--white) !important;
}

/* Legal Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 58, 95, 0.8);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 1rem;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--white);
  border-radius: 20px;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 3rem;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-light);
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: var(--navy);
}

.modal-text p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  text-align: justify;
}

.modal-text p:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .modal-content {
    padding: 2rem;
  }
}

.copyright {
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 900px) {
  h1 { 
    font-size: 1.9rem; 
    line-height: 1.15;
    margin-bottom: 0.8rem;
  }
  h2 { font-size: 2rem; }

  .logo-container img {
    height: 60px;
  }

  .hamburger {
    display: block;
  }

  .nav-container {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 1.5rem;
    padding-top: 1.5rem;
    align-items: center;
    transform: none;
  }

  .nav-links.open {
    display: flex;
  }

  .hero {
    flex-direction: column;
    padding: 1.5rem 0;
    text-align: center;
  }
  
  .hero-content {
    width: 100%;
    padding-right: 0;
    margin-bottom: 2rem;
  }
  
  .hero-content p {
    margin: 0 auto 1.5rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .hero-buttons .btn,
  .service-card .btn,
  .about-container .btn {
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }
  
  .hero-image {
    position: relative;
    width: 100%;
    height: auto;
    border-radius: 20px;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    padding: 2.5rem 2rem;
  }

  .service-card .btn {
    align-self: stretch;
  }
  
  .about-container {
    flex-direction: column-reverse;
    gap: 2rem;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 1rem;
  }
}

/* Card Action Group */
.card-action-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.5rem;
  margin-top: auto;
  align-self: flex-start;
}
@media (max-width: 900px) {
  .card-action-group {
    width: 100%;
  }
  .card-action-group .btn {
    flex: 1;
  }
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--sage);
  color: var(--white);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(30, 58, 95, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
  cursor: pointer;
  border: none;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--sage-dark);
  transform: translateY(-3px);
}

/* Only show on mobile */
@media (min-width: 901px) {
  .back-to-top {
    display: none !important;
  }
}
