/* ============================================================
   Friends4Lyfe — Unified Theme Layer  (2026 facelift)
   ------------------------------------------------------------
   Loaded LAST so it harmonises the whole site around one
   identity: a warm, hopeful Teal + Gold + Coral palette that
   modernises the original brand colours (#00796B / #FBC02D).

   This file intentionally OVERRIDES the scattered blues in
   enhancements.css and the flat teal in style.css/footer,
   and defines the gradient variables the homepage references
   but were never declared (silent bug).
   ============================================================ */

/* ---------- 1. DESIGN TOKENS ---------- */
:root {
  /* Brand palette (modernised teal + gold, warmed with coral) */
  --primary-color: #0e7c66;   /* deep teal-green  */
  --primary-dark:  #0a5c4c;
  --primary-light: #14b8a6;
  --secondary-color: #f2a516; /* warm gold        */
  --accent-color:  #ef6c4d;   /* coral / terracotta */
  --success-color: #10b981;
  --warning-color: #f2a516;
  --danger-color:  #ef4444;

  /* Surfaces & ink */
  --surface:       #ffffff;
  --surface-soft:  #f6faf9;   /* gentle warm-tinted off-white */
  --ink:           #16302b;   /* near-black with a teal cast  */
  --ink-muted:     #5b6b66;

  /* Gradients (these were USED in index.php but never defined) */
  --primary-gradient:   linear-gradient(135deg, #0e7c66 0%, #14b8a6 100%);
  --secondary-gradient: linear-gradient(135deg, #f2a516 0%, #ef6c4d 100%);
  --accent-gradient:    linear-gradient(135deg, #f2a516 0%, #ef6c4d 100%);

  /* Softer, warmer shadows than the stock grey ones */
  --shadow-md: 0 6px 18px -6px rgba(16, 48, 43, 0.18);
  --shadow-lg: 0 18px 40px -12px rgba(16, 48, 43, 0.22);
  --shadow-xl: 0 28px 60px -18px rgba(16, 48, 43, 0.28);

  /* Re-map Bootstrap's theme colours so every .text-primary,
     .bg-primary, .border-primary, badge, etc. follows the brand */
  --bs-primary:        #0e7c66;
  --bs-primary-rgb:    14, 124, 102;
  --bs-warning:        #f2a516;
  --bs-warning-rgb:    242, 165, 22;
  --bs-info:           #14b8a6;
  --bs-info-rgb:       20, 184, 166;
  --bs-link-color:     #0e7c66;
  --bs-link-hover-color: #0a5c4c;
}

/* ---------- 1b. LAYOUT GUARD — kill horizontal overflow on mobile ----------
   Decorative blobs / floating badges are positioned with negative offsets;
   without this they widen the page and push the navbar hamburger off-screen. */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}
.section-decorator {
  max-width: 60vw;   /* never let the blur blob create sideways scroll */
}

/* ---------- 2. BASE TYPOGRAPHY (override style.css Roboto/grey) ---------- */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
  color: var(--ink) !important;
  background-color: var(--surface) !important;
  line-height: 1.7;
}
h1, h2, h3, h4, h5, h6,
.display-title {
  font-family: 'Poppins', sans-serif !important;
  /* inherit, not a forced dark — so headings stay readable on coloured/dark
     banners (events, event-detail, footer) while still being dark on white.
     Pages that set their own heading colour (e.g. about.css) keep it. */
  color: inherit;
  letter-spacing: -0.01em;
}
body { color: var(--ink); }   /* the default any heading inherits on white */

/* Coloured banners: guarantee the lead paragraph stays light too */
.hero-section .lead, .hero-section p,
.event-hero .lead, .event-hero p { color: #fff !important; }
.display-title {
  font-weight: 700;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  line-height: 1.2;
}
.text-primary { color: var(--primary-color) !important; }
.lead { color: var(--ink-muted); }

/* ---------- 3. NAVBAR ---------- */
.navbar-modern {
  background: var(--primary-gradient) !important;
  box-shadow: 0 6px 24px -10px rgba(10, 92, 76, 0.55);
  border-bottom: none;
}
.navbar-modern.scrolled {
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 6px 26px -12px rgba(16, 48, 43, 0.25);
}
.navbar-link:hover { color: #ffd66b !important; }
.navbar-link::after { background: #ffd66b; }
.navbar-modern.scrolled .navbar-link { color: #1f2d2a !important; }
.navbar-modern.scrolled .navbar-link:hover { color: var(--primary-color) !important; }
.navbar-modern.scrolled .navbar-link::after { background: var(--primary-color); }
/* keep the .navbar.scrolled fallback (was blue) in brand teal */
.navbar.scrolled { background: rgba(255,255,255,0.92) !important; }

/* Make the mobile hamburger clearly tappable */
.navbar-modern .navbar-toggler {
  border: 1px solid rgba(255, 255, 255, 0.55) !important;
  border-radius: 0.6rem;
  padding: 0.4rem 0.6rem;
}
.navbar-modern.scrolled .navbar-toggler {
  border-color: rgba(14, 124, 102, 0.5) !important;
}
.navbar-modern.scrolled .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2814,124,102,0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Donate pill in the navbar — gold gradient, dark legible text */
.navbar .donate-btn,
.navbar .btn-warning.donate-btn {
  background: var(--secondary-gradient) !important;
  border: none !important;
  color: #3a2400 !important;
}
.navbar .donate-btn .bi-heart-fill { color: #d6273f !important; }
.donate-btn:hover { box-shadow: 0 8px 22px rgba(242, 165, 22, 0.5); }

/* ---------- 4. BUTTONS ---------- */
.btn-primary-modern {
  background: var(--primary-gradient);
  box-shadow: 0 8px 20px -6px rgba(14, 124, 102, 0.55);
}
.btn-primary-modern:hover {
  box-shadow: 0 12px 28px -6px rgba(14, 124, 102, 0.6);
}
.btn-secondary-modern {
  background: var(--secondary-gradient);
  color: #3a2400;
  box-shadow: 0 8px 20px -6px rgba(242, 165, 22, 0.5);
}
.btn-secondary-modern:hover { color: #3a2400; box-shadow: 0 12px 28px -6px rgba(242, 165, 22, 0.55); }
.btn-accent-modern { background: var(--accent-gradient); }
.btn-modern { border-radius: 0.85rem; }

/* Bootstrap primary button anywhere on the site */
.btn-primary {
  --bs-btn-bg: var(--primary-color);
  --bs-btn-border-color: var(--primary-color);
  --bs-btn-hover-bg: var(--primary-dark);
  --bs-btn-hover-border-color: var(--primary-dark);
}

/* ---------- 5. HERO ---------- */
/* Replace the blue tint with a warm teal→coral cinematic wash */
.hero-carousel .item::before {
  background: linear-gradient(120deg,
              rgba(8, 58, 49, 0.86) 0%,
              rgba(14, 124, 102, 0.55) 55%,
              rgba(239, 108, 77, 0.38) 100%) !important;
}
.hero-carousel .overlay {
  background: rgba(8, 40, 34, 0.28);   /* slightly darker glass for text contrast */
  border: 1px solid rgba(255, 255, 255, 0.18);
}
/* Keep ALL hero text white & legible (the global heading/.lead colours
   above are dark and would otherwise override the inherited white). */
.hero-carousel h1,
.hero-carousel h2,
.hero-carousel p,
.hero-carousel .lead,
.hero-carousel .display-title,
.hero-carousel .text-white,
.hero-carousel .text-white * {
  color: #ffffff !important;
}
.hero-carousel h1 {
  letter-spacing: -0.02em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}
.hero-carousel .lead,
.hero-carousel p {
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}
.owl-dot.active span { background: var(--secondary-color); }

/* ---------- 6. CARDS / GLASS / BADGES ---------- */
.glass-card,
.glass-panel {
  border-radius: 1.25rem;
  box-shadow: var(--shadow-lg);
}
.feature-card-modern {
  background: var(--surface);
  border: 1px solid rgba(14, 124, 102, 0.08);
  border-radius: 1.25rem;
  padding: 2.25rem 1.75rem;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-card-modern:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}
.feature-icon-wrapper {
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  font-size: 1.9rem;
  margin-bottom: 1.25rem;
}
.bg-soft-primary { background: rgba(14, 124, 102, 0.10) !important; color: var(--primary-color) !important; }
.bg-soft-success { background: rgba(16, 185, 129, 0.12) !important; }
.bg-soft-warning { background: rgba(242, 165, 22, 0.15) !important; }

/* Section decorators (the floating coloured blobs) */
.section-decorator {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.25;
  background: var(--primary-gradient);
  z-index: 0;
  pointer-events: none;
}

/* Pill badges — make the "primary" ones brand-teal */
.badge.bg-primary { background: rgba(14,124,102,0.12) !important; }

/* ---------- 7. FOOTER ---------- */
.bg-teal,
footer.bg-teal {
  background: linear-gradient(135deg, #0a5c4c 0%, #0e7c66 100%) !important;
  position: relative;
}
footer.bg-teal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--secondary-gradient);
}
footer.bg-teal { padding-top: 3rem !important; }
.footer a:hover,
.social-link:hover { color: #ffd66b !important; }

/* ---------- 8. RESPONSIVE POLISH ---------- */
@media (max-width: 768px) {
  .display-title { font-size: clamp(1.6rem, 6vw, 2rem); }
  .glass-panel { padding: 1.75rem !important; }
  .feature-card-modern { padding: 1.75rem 1.25rem; }
  .hero-carousel .item { min-height: 88vh; }
}
