/* ==========================================================================
   Meg Campbell Wellness — Main Stylesheet
   Brand: Open Sans, #25b5ed accent, #f4f2f5 light bg, ALL CAPS headings
   ========================================================================== */

/* Reset & base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent:       #25b5ed;
  --accent-hover: #1aa3d8;
  --text-dark:    #1a1a1a;
  --text-body:    #333333;
  --text-light:   #4d4d4d;
  --bg-white:     #ffffff;
  --bg-light:     #f4f2f5;
  --header-h:     72px;
  --max-w:        1140px;
  --radius:       4px;
  --shadow:       0 2px 16px rgba(0,0,0,0.10);
  --transition:   0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-body);
  background: var(--bg-white);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Open Sans', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); margin-bottom: 0.75rem; }
h4 { font-size: 1.1rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
ul li, ol li { margin-bottom: 0.4rem; }

.rich-text h2 { margin-top: 1.8rem; }
.rich-text h3 { margin-top: 1.4rem; }
.rich-text ul, .rich-text ol { margin-left: 1.5rem; }
.rich-text a { color: var(--accent); }
.rich-text a:hover { color: var(--accent-hover); }

.section-heading {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   Layout helpers
   ========================================================================== */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section { padding: 4rem 0; }
.section--light { background: var(--bg-light); }
.section--accent { background: var(--accent); color: #fff; }
.section--dark { background: var(--text-dark); color: #fff; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }

.text-center { text-align: center; }
.text-accent { color: var(--accent); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-secondary:hover {
  background: var(--accent);
  color: #fff;
}

.btn-white {
  background: #fff;
  color: var(--accent);
  border-color: #fff;
}
.btn-white:hover {
  background: transparent;
  color: #fff;
  border-color: #fff;
}

.btn-outline-white {
  background: transparent;
  color: #fff;
  border-color: #fff;
}
.btn-outline-white:hover {
  background: #fff;
  color: var(--accent);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-white);
  box-shadow: 0 1px 8px rgba(0,0,0,0.08);
  height: var(--header-h);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link { text-decoration: none; }
.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text-dark);
  text-transform: uppercase;
}
.logo-text:hover { color: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--text-dark);
  transition: all var(--transition);
}

.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
}

.nav-list > li > a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-dark);
  text-transform: uppercase;
  transition: color var(--transition);
}
.nav-list > li > a:hover { color: var(--accent); }

/* Dropdown */
.has-dropdown { position: relative; }
.has-dropdown .caret { font-size: 0.7em; margin-left: 2px; }

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--bg-white);
  box-shadow: var(--shadow);
  border-top: 2px solid var(--accent);
  list-style: none;
  padding: 0.5rem 0;
  z-index: 999;
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown { display: block; }

.dropdown li a {
  display: block;
  padding: 0.6rem 1.25rem;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text-body);
  text-transform: none;
  white-space: nowrap;
}
.dropdown li a:hover {
  color: var(--accent);
  background: var(--bg-light);
}

/* ==========================================================================
   Hero sections
   ========================================================================== */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.2) 100%);
}

.hero-home { min-height: 85vh; }

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 4rem 1.25rem;
  color: #fff;
}

.hero-content h1,
.hero-content h2 {
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-subhead {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 300;
  margin-top: 0.75rem;
  opacity: 0.9;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
  max-width: 680px;
}

.hero-tagline {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-style: italic;
  font-weight: 300;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  max-width: 700px;
  opacity: 0.95;
  line-height: 1.6;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* ==========================================================================
   Service cards
   ========================================================================== */
.service-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.14);
}

.service-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.service-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.service-card-body h3 {
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.service-card-body p {
  font-size: 0.95rem;
  color: var(--text-light);
  flex: 1;
}

.service-card-body .btn {
  margin-top: 1.25rem;
  align-self: flex-start;
}

/* ==========================================================================
   Testimonials
   ========================================================================== */
.testimonial-card {
  background: var(--bg-white);
  border-left: 4px solid var(--accent);
  padding: 1.75rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow);
}

.testimonial-quote {
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text-body);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.testimonial-quote::before { content: '\201C'; }
.testimonial-quote::after  { content: '\201D'; }

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.testimonial-author img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
}

.testimonial-author-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.testimonial-author-role {
  font-size: 0.82rem;
  color: var(--text-light);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* ==========================================================================
   CTA Band
   ========================================================================== */
.cta-band {
  background: var(--accent);
  color: #fff;
  text-align: center;
  padding: 4rem 1.25rem;
}

.cta-band h2 {
  color: #fff;
  margin-bottom: 1rem;
}

.cta-band p { color: rgba(255,255,255,0.9); margin-bottom: 1.5rem; }

.cta-phone {
  display: inline-block;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
  margin-bottom: 1.5rem;
}

.cta-phone:hover { color: rgba(255,255,255,0.85); }

/* ==========================================================================
   About / two-column sections
   ========================================================================== */
.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.split-section.reverse .split-image { order: 2; }
.split-section.reverse .split-content { order: 1; }

.split-image img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-height: 540px;
  object-fit: cover;
}

/* Stand for/against lists */
.stand-list {
  list-style: none;
  padding: 0;
}
.stand-list li {
  padding: 0.4rem 0 0.4rem 1.5rem;
  position: relative;
  color: var(--text-body);
}
.stand-list--for li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.stand-list--against li::before {
  content: '✗';
  position: absolute;
  left: 0;
  color: #e74c3c;
  font-weight: 700;
}

/* Credentials logos */
.credentials-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
}
.credentials-grid img {
  height: 60px;
  width: auto;
  object-fit: contain;
  filter: grayscale(20%);
  opacity: 0.8;
  transition: opacity var(--transition);
}
.credentials-grid img:hover { opacity: 1; filter: none; }

/* ==========================================================================
   Blog
   ========================================================================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.blog-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
}

.blog-card-image {
  height: 200px;
  overflow: hidden;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-image img { transform: scale(1.04); }

.blog-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-meta {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.blog-card-category {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  margin-bottom: 0.5rem;
}

.blog-card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.blog-card h3 a { color: var(--text-dark); }
.blog-card h3 a:hover { color: var(--accent); }

.blog-card-excerpt {
  font-size: 0.92rem;
  color: var(--text-light);
  flex: 1;
}

.blog-card .btn { margin-top: 1rem; align-self: flex-start; }

.blog-note {
  background: #fff8e1;
  border-left: 3px solid #f39c12;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: #7d6608;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   Shop
   ========================================================================== */
.product-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-width: 360px;
}

.product-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.product-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card-body h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }

.product-price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1rem;
}

.product-price::before { content: 'AUD '; font-size: 0.85em; }

/* Buy form */
.buy-form {
  background: var(--bg-light);
  padding: 2rem;
  border-radius: var(--radius);
  margin-top: 2rem;
  max-width: 480px;
}

.buy-form h3 { margin-bottom: 1.25rem; }

/* ==========================================================================
   Forms
   ========================================================================== */
.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dark);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d0d0d0;
  border-radius: var(--radius);
  font-family: 'Open Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--text-body);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,181,237,0.15);
}

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

/* Contact page wagtail form */
.contact-form { max-width: 600px; }

/* ==========================================================================
   Contact page
   ========================================================================== */
.contact-info {
  display: flex;
  gap: 3rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.contact-detail { margin-bottom: 1rem; }
.contact-detail-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.25rem;
}
.contact-detail-value { font-size: 1.05rem; color: var(--text-body); }
.contact-detail-value a { color: var(--text-dark); font-weight: 600; }
.contact-detail-value a:hover { color: var(--accent); }

.social-links { display: flex; gap: 1rem; margin-top: 0.5rem; }
.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-light);
  color: var(--text-dark);
  transition: all var(--transition);
}
.social-links a:hover { background: var(--accent); color: #fff; }

/* ==========================================================================
   Alert / success messages
   ========================================================================== */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}
.alert-success { background: #e8f8e8; border: 1px solid #4caf50; color: #2e7d32; }
.alert-error   { background: #fff0f0; border: 1px solid #ef5350; color: #b71c1c; }
.alert-warning { background: #fff8e1; border: 1px solid #f39c12; color: #7d6608; }
.alert-info    { background: #e3f2fd; border: 1px solid #2196f3; color: #0d47a1; }

/* ==========================================================================
   Page-specific sections
   ========================================================================== */

/* Biohacking benefit lists */
.benefit-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.benefit-column h4 {
  color: var(--accent);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
}

.benefit-column ul {
  list-style: none;
  padding: 0;
}

.benefit-column ul li {
  padding: 0.3rem 0 0.3rem 1.25rem;
  position: relative;
}

.benefit-column ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.85em;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--text-dark);
  color: rgba(255,255,255,0.7);
  padding: 3rem 0 2rem;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
  justify-content: space-between;
}

.footer-tagline {
  font-style: italic;
  font-size: 1rem;
  color: rgba(255,255,255,0.85);
  max-width: 400px;
  margin-bottom: 0.5rem;
}

.footer-copyright {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.06em;
}

.brand-accent { color: var(--accent); }

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.footer-links a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}
.footer-links a:hover { color: var(--accent); }

.footer-social { display: flex; gap: 0.75rem; align-items: center; }
.footer-social a {
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}
.footer-social a:hover { color: var(--accent); }

/* ==========================================================================
   Not configured / error states
   ========================================================================== */
.payment-not-configured {
  background: #fff8e1;
  border: 2px dashed #f39c12;
  padding: 2rem;
  border-radius: var(--radius);
  text-align: center;
  color: #7d6608;
}

/* ==========================================================================
   Responsive — Tablet
   ========================================================================== */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .split-section { grid-template-columns: 1fr; gap: 2rem; }
  .split-section.reverse .split-image { order: 0; }
  .split-section.reverse .split-content { order: 0; }
}

/* ==========================================================================
   Responsive — Mobile
   ========================================================================== */
@media (max-width: 640px) {
  :root { --header-h: 60px; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  .hero { min-height: 380px; }
  .hero-home { min-height: 70vh; }

  .nav-toggle { display: flex; }

  .main-nav {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-white);
    padding: 1.5rem;
    overflow-y: auto;
    z-index: 998;
  }

  .main-nav.is-open { display: block; }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .nav-list > li > a {
    font-size: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--bg-light);
    width: 100%;
  }

  .dropdown {
    display: block;
    position: static;
    box-shadow: none;
    border: none;
    border-top: none;
    padding: 0 0 0 1rem;
    background: var(--bg-light);
  }

  .has-dropdown:hover .dropdown { display: block; }

  .footer-inner { flex-direction: column; align-items: flex-start; }

  .section { padding: 2.5rem 0; }

  .cta-band { padding: 3rem 1.25rem; }
}

/* ==========================================================================
   Wagtail userbar (admin overlay)
   ========================================================================== */
.wagtail-userbar { z-index: 10000 !important; }
