/* ==========================================================================
   MINDFUL TIDE COUNSELING - MASTER STYLESHEET
   Palette: Deep Ocean Slate (#1B3B50), Warm Sunset Gold (#E89A3C), 
            Soft Shore Sand (#F5EFE6), Foam White (#FFFFFF)
   Typography: Lora (Headings), Inter (Body)
   ========================================================================== */

/* 1. GOOGLE FONTS IMPORT */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Lora:ital,wght@0,500;0,600;1,400&display=swap');

/* 2. CUSTOM CSS VARIABLES */
:root {
  /* Core Brand Palette */
  --color-ocean-slate: #1B3B50;
  --color-ocean-slate-light: #2A526E;
  --color-sunset-gold: #E89A3C;
  --color-sunset-gold-hover: #D4882B;
  --color-shore-sand: #F5EFE6;
  --color-shore-sand-light: #FAF7F2;
  --color-foam-white: #FFFFFF;
  
  /* Status & Safety Colors */
  --color-danger-bg: #fff5f5;
  --color-danger-border: #feb2b2;
  --color-danger-text: #c53030;
  --color-warning-bg: #fffaf0;
  --color-warning-border: #fbd38d;
  --color-warning-text: #c05621;

  /* Text Colors */
  --color-text-main: #1B3B50;
  --color-text-muted: #5A6E7C;
  --color-text-light: #E0E8EE;
  
  /* Typography */
  --font-heading: 'Lora', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Design Tokens */
  --radius-card: 16px;
  --radius-button: 30px;
  --radius-input: 10px;
  --shadow-soft: 0 8px 24px rgba(27, 59, 80, 0.06);
  --shadow-hover: 0 12px 32px rgba(27, 59, 80, 0.12);
  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
}

/* 3. RESET & BASE STYLES */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text-main);
  background-color: var(--color-shore-sand-light);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Typography Defaults */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-ocean-slate);
  line-height: 1.3;
  font-weight: 600;
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.4rem; margin-bottom: 0.75rem; }
p { margin-bottom: 1.25rem; color: var(--color-text-muted); }

a {
  color: var(--color-ocean-slate);
  text-decoration: underline;
  transition: var(--transition-smooth);
}

a:hover {
  color: var(--color-sunset-gold);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 4. LAYOUT CONTAINERS & SECTIONS */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

.section-alt {
  background-color: var(--color-shore-sand);
}

.section-title {
  font-size: 1.6rem;
  color: var(--color-ocean-slate);
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--color-shore-sand);
  padding-bottom: 0.5rem;
}

.text-center { text-align: center; }
.text-max-width { max-width: 750px; margin-left: auto; margin-right: auto; }

/* 5. HEADER, NAVIGATION & SAFETY BAR */
/* Quick Exit Bar for Victim Safety */
.quick-exit-bar {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 9999;
  background-color: #d97706;
  color: var(--color-foam-white);
  padding: 0.5rem 1rem;
  border-bottom-left-radius: var(--radius-input);
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.btn-quick-exit {
  background-color: #b45309;
  color: var(--color-foam-white) !important;
  text-decoration: none !important;
  font-weight: bold;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  border: 1px solid #fef3c7;
  cursor: pointer;
  display: inline-block;
  transition: var(--transition-smooth);
}

.btn-quick-exit:hover {
  background-color: #78350f;
}

/* Site Header */
.site-header, header {
  background-color: var(--color-foam-white);
  box-shadow: 0 2px 12px rgba(27, 59, 80, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0.85rem 0;
  margin-top: 2.2rem; /* Clearance for quick exit bar */
}

.nav-wrapper, .nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-ocean-slate);
  text-decoration: none;
}

.brand-logo img {
  width: 100px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
}

.nav-menu, nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-link, nav a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-ocean-slate);
  text-decoration: none;
  padding: 0.5rem 0;
  position: relative;
}

.nav-link::after, nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-sunset-gold);
  transition: var(--transition-smooth);
}

.nav-link:hover::after, .nav-link.active::after,
nav a:hover::after, nav a.active::after {
  width: 100%;
}

/* 6. AMBIENT AUDIO TOGGLE WIDGET */
.audio-toggle-btn {
  background-color: var(--color-shore-sand);
  color: var(--color-ocean-slate);
  border: 1px solid rgba(27, 59, 80, 0.15);
  border-radius: var(--radius-button);
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.audio-toggle-btn:hover {
  background-color: var(--color-ocean-slate);
  color: var(--color-foam-white);
}

/* 7. HERO SECTIONS */
.hero {
  background: linear-gradient(135deg, var(--color-shore-sand) 0%, var(--color-shore-sand-light) 100%);
  padding: 4.5rem 1.5rem 3.5rem;
  text-align: center;
  border-radius: var(--radius-card);
  margin-bottom: 2.5rem;
}

.hero-title, .hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  color: var(--color-ocean-slate);
}

.hero-subtitle, .hero p {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 750px;
  margin: 0 auto;
}

/* 8. BUTTONS & CALL-TO-ACTION */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-button);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
  text-align: center;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--color-sunset-gold);
  color: var(--color-foam-white) !important;
  box-shadow: 0 4px 14px rgba(232, 154, 60, 0.35);
}

.btn-primary:hover {
  background-color: var(--color-sunset-gold-hover);
  color: var(--color-foam-white) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(232, 154, 60, 0.45);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-ocean-slate);
  border: 2px solid var(--color-ocean-slate);
}

.btn-secondary:hover {
  background-color: var(--color-ocean-slate);
  color: var(--color-foam-white) !important;
}

/* 9. CARDS & GRID LAYOUTS */
.card-grid, .grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 2.5rem;
}

.card {
  background-color: var(--color-foam-white);
  border-radius: var(--radius-card);
  padding: 1.75rem;
  box-shadow: var(--shadow-soft);
  transition: var(--transition-smooth);
  border: 1px solid rgba(27, 59, 80, 0.08);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.card-title, .card h3 {
  color: var(--color-ocean-slate);
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.card p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.card-contact {
  font-weight: 600;
  color: var(--color-ocean-slate);
  font-size: 0.95rem;
}

/* 10. ACCORDIONS & HTML DETAILS TAGS */
.accordion-section, .accordion {
  margin-bottom: 3rem;
}

details, .accordion-item {
  background-color: var(--color-foam-white);
  border-radius: var(--radius-input);
  margin-bottom: 0.85rem;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  border: 1px solid rgba(27, 59, 80, 0.08);
  padding: 1rem 1.25rem;
}

summary, .accordion-header {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-ocean-slate);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-smooth);
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "＋";
  font-size: 1.2rem;
  color: var(--color-sunset-gold);
}

details[open] summary::after {
  content: "－";
}

.accordion-content {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-shore-sand);
}

.resource-list {
  list-style: none;
}

.resource-list li {
  margin-bottom: 1rem;
}

.resource-list strong {
  color: var(--color-ocean-slate);
}

/* 11. FORMS, DISCLAIMERS & ALERT BOXES */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--color-ocean-slate);
}

.form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(27, 59, 80, 0.2);
  border-radius: var(--radius-input);
  font-family: var(--font-body);
  font-size: 1rem;
  background-color: var(--color-foam-white);
  transition: var(--transition-smooth);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-sunset-gold);
  box-shadow: 0 0 0 3px rgba(232, 154, 60, 0.2);
}

.disclaimer-box {
  background-color: var(--color-shore-sand);
  border-left: 4px solid var(--color-sunset-gold);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-input) var(--radius-input) 0;
  margin-bottom: 2rem;
  font-size: 0.92rem;
}

/* Emergency Alert Box */
.alert-emergency {
  background-color: var(--color-danger-bg);
  border-left: 5px solid var(--color-danger-text);
  padding: 1.5rem;
  border-radius: var(--radius-input);
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-soft);
}

.alert-emergency h2 {
  color: var(--color-danger-text);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.alert-emergency p, .alert-emergency ul {
  color: #742a2a;
  font-size: 0.95rem;
}

.alert-emergency ul {
  margin-top: 0.5rem;
  margin-left: 1.5rem;
}

/* Domestic Violence Safety Box */
.dv-safety-box {
  background-color: var(--color-warning-bg);
  border: 1px solid var(--color-warning-border);
  border-radius: var(--radius-card);
  padding: 1.75rem;
  margin-bottom: 3rem;
}

.dv-safety-box h2 {
  color: var(--color-warning-text);
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.dv-safety-box p {
  color: #7b341e;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.dv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--color-warning-border);
}

/* 12. GOOD FAITH ESTIMATE (GFE) CONTAINER */
.gfe-container {
  background-color: var(--color-foam-white);
  border: 2px solid var(--color-ocean-slate);
  border-radius: var(--radius-card);
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-soft);
}

.gfe-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--color-shore-sand);
  padding-bottom: 0.75rem;
}

.gfe-header h2 {
  font-size: 1.4rem;
  color: var(--color-ocean-slate);
}

.btn-print {
  background-color: var(--color-shore-sand);
  color: var(--color-ocean-slate);
  border: 1px solid rgba(27, 59, 80, 0.15);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-input);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.btn-print:hover {
  background-color: var(--color-ocean-slate);
  color: var(--color-foam-white);
}

.gfe-content {
  font-size: 0.925rem;
  color: var(--color-text-muted);
}

.gfe-content p {
  margin-bottom: 0.85rem;
}

.gfe-content ul {
  margin-left: 1.5rem;
  margin-bottom: 0.85rem;
}

/* 13. FOOTER STYLES */
.site-footer, footer {
  background-color: var(--color-ocean-slate);
  color: var(--color-text-light);
  padding: 3rem 1.5rem 2rem;
  margin-top: 4rem;
  text-align: center;
}

.site-footer a, footer a {
  color: var(--color-sunset-gold);
  text-decoration: underline;
}

.site-footer a:hover, footer a:hover {
  color: var(--color-foam-white);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2.5rem;
  margin-bottom: 3rem;
  text-align: left;
}

.footer-heading {
  color: var(--color-foam-white);
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.75rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

/* 14. RESPONSIVE DESIGN (MEDIA QUERIES) */
@media (max-width: 768px) {
  .hero-title, .hero h1 { font-size: 2rem; }
  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.75rem; }
  
  .brand-logo { font-size: 1.1rem; }
  .brand-logo img { width: 55px; }

  .nav-wrapper, .nav-container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .nav-menu, nav ul {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .quick-exit-bar span {
    display: none; /* Keeps quick exit compact on smartphones */
  }
  
  .section {
    padding: 3rem 0;
  }
}

/* 15. PRINT STYLES */
@media print {
  body * {
    visibility: hidden;
  }
  .gfe-container, .gfe-container * {
    visibility: visible;
  }
  .gfe-container {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    border: none;
    box-shadow: none;
  }
  .quick-exit-bar, header, .site-header, .btn-print, footer, .site-footer {
    display: none !important;
  }
}

/* Prevent sticky header overlap on all anchor links */
[id] {
  scroll-margin-top: 120px;
}