/* Tender Hearts Foundation – brand + sleek navbar */

:root {
  --clr-primary: #b36b00;
  --clr-primary-dark: #5e2d12;
  --clr-primary-light: #fff3e0;
  --clr-secondary: #faa61a;
  --clr-secondary-light: #fff8e7;
  --clr-accent: #c45c26;
  --thf-brown: #5e2d12;
  --thf-gold: #faa61a;
  --thf-nav-bg: #ffffff;
  --thf-nav-text: #3d2415;
  --shadow-soft: 0 10px 30px -10px rgba(15, 23, 42, 0.12);
}

#preloader {
  background: linear-gradient(160deg, #5e2d12, #b36b00 55%, #faa61a) !important;
}

/* ---------- Sleek solid navbar ---------- */
.navbar-thf {
  background: #ffffff !important;
  border-bottom: 1px solid rgba(94, 45, 18, 0.08);
  box-shadow: 0 1px 0 rgba(94, 45, 18, 0.04), 0 4px 18px rgba(15, 23, 42, 0.06);
  padding: 0.4rem 0;
  z-index: 1030;
}

.thf-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none !important;
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: #5e2d12 !important;
  letter-spacing: -0.02em;
}

.thf-brand .brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #faa61a;
  color: #5e2d12;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.thf-brand .brand-text span {
  color: #faa61a;
}

/* Compact nav links – fit on one line */
.navbar-thf .navbar-nav {
  gap: 0.1rem;
}

.navbar-thf .nav-link {
  font-family: "Nunito Sans", sans-serif;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  color: #3d2415 !important;
  padding: 0.4rem 0.55rem !important;
  letter-spacing: 0.01em;
  white-space: nowrap;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
  position: relative;
}

.navbar-thf .nav-link:hover {
  color: #5e2d12 !important;
  background: #fff3e0;
}

.navbar-thf .nav-link.active {
  color: #5e2d12 !important;
}

.navbar-thf .nav-link.active::after {
  content: "";
  position: absolute;
  left: 0.55rem;
  right: 0.55rem;
  bottom: 0.15rem;
  height: 2px;
  background: #faa61a;
  border-radius: 2px;
}

/* Hide Bootstrap default caret, use custom arrow */
.navbar-thf .dropdown-toggle::after {
  display: none !important;
}

.navbar-thf .dropdown-arrow {
  font-size: 0.62rem;
  margin-left: 0.15rem;
  vertical-align: middle;
  opacity: 0.65;
  transition: transform 0.2s ease, opacity 0.2s ease;
  display: inline-block;
}

.navbar-thf .dropdown.show .dropdown-arrow,
.navbar-thf .nav-item.dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
  opacity: 1;
}

/* Dropdown panel */
.dropdown-menu-thf {
  border: none !important;
  border-radius: 10px !important;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.14) !important;
  padding: 0.4rem !important;
  min-width: 250px;
  margin-top: 0.3rem !important;
  animation: dropIn 0.18s ease;
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dropdown-menu-thf .dropdown-item {
  font-size: 0.84rem;
  font-weight: 500;
  color: #3d2415;
  border-radius: 7px;
  padding: 0.42rem 0.85rem;
  transition: background 0.12s ease, color 0.12s ease;
}

.dropdown-menu-thf .dropdown-item:hover,
.dropdown-menu-thf .dropdown-item:focus {
  background: #fff3e0 !important;
  color: #5e2d12 !important;
}

.dropdown-menu-thf .dropdown-header {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #faa61a;
  padding: 0.4rem 0.85rem 0.15rem;
}

.dropdown-menu-thf .dropdown-divider {
  margin: 0.3rem 0.5rem;
  border-color: rgba(94, 45, 18, 0.1);
}

/* Donate pill */
.btn-donate {
  background: #faa61a !important;
  color: #5e2d12 !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  padding: 0.38rem 0.95rem !important;
  border-radius: 999px !important;
  border: none !important;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.btn-donate:hover {
  background: #5e2d12 !important;
  color: #fff !important;
  transform: translateY(-1px);
}

.navbar-thf .navbar-toggler {
  border: none;
  padding: 0.25rem 0.4rem;
  color: #5e2d12;
  font-size: 1.5rem;
  box-shadow: none !important;
}

.navbar-thf .navbar-toggler:focus {
  box-shadow: none !important;
}

@media (max-width: 991.98px) {
  .navbar-thf .navbar-collapse {
    background: #fff;
    margin-top: 0.5rem;
    padding: 0.75rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
    border: 1px solid rgba(94, 45, 18, 0.06);
  }
  .navbar-thf .nav-link {
    font-size: 0.9rem !important;
    padding: 0.55rem 0.75rem !important;
  }
  .navbar-thf .nav-link.active::after { display: none; }
  .navbar-thf .nav-link.active { background: #fff3e0; }
  .dropdown-menu-thf {
    box-shadow: none !important;
    border: 1px solid rgba(94, 45, 18, 0.06) !important;
    margin: 0.25rem 0 0.5rem !important;
  }
}

/* ---------- Other brand styles ---------- */
.btn-hw-primary {
  background: #faa61a !important;
  color: #5e2d12 !important;
  border-color: #faa61a !important;
}
.btn-hw-primary:hover {
  background: #5e2d12 !important;
  color: #fff !important;
  border-color: #5e2d12 !important;
}

.page-hero {
  background: linear-gradient(135deg, rgba(94,45,18,.88), rgba(179,107,0,.72)),
              url('https://tenderheartsf.org/wp-content/uploads/2021/02/ethos-image-768x432.jpg') center/cover;
  color: #fff;
  padding: 90px 0 60px;
  text-align: center;
}
.page-hero h1 { font-weight: 800; color: #fff; }
.page-content-wrap { padding: 60px 0 80px; }
.page-content-wrap img { border-radius: 12px; margin: 1rem 0; max-width: 100%; height: auto; }
.page-content-wrap h2, .page-content-wrap h3 { color: #5e2d12; margin-top: 1.5rem; }

.team-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform .25s ease;
  height: 100%;
}
.team-card:hover { transform: translateY(-4px); }
.team-card img { width: 100%; height: 280px; object-fit: cover; }
.team-card .tc-body { padding: 1.25rem; }
.team-card h5 { color: #5e2d12; margin-bottom: .25rem; }
.team-card a { text-decoration: none; color: inherit; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.gallery-grid img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
}

.footer-hw { background: #5e2d12 !important; }

.hero-thf {
  min-height: 78vh;
  display: flex;
  align-items: center;
  background: linear-gradient(105deg, rgba(94,45,18,.75), rgba(94,45,18,.45)),
              url('https://tenderheartsf.org/wp-content/uploads/2023/10/Girls-day-1024x683.jpg') center/cover no-repeat;
  color: #fff;
}
.hero-thf h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; line-height: 1.15; }
.hero-thf .lead { font-size: 1.15rem; opacity: .95; max-width: 540px; }
.section-welcome { background: #fff; }
.founder-quote {
  border-left: 4px solid #faa61a;
  padding: 1rem 1.5rem;
  background: #fff3e0;
  border-radius: 0 12px 12px 0;
}

/* Force solid background over old Hopewell transparent nav */
.navbar-hw {
  background: #fff !important;
}

.page-hero-sm { padding: 70px 0 45px !important; }
.page-hero-sm h1 { font-size: clamp(1.5rem, 3.5vw, 2.2rem) !important; }
.blog-card { transition: transform .2s ease, box-shadow .2s ease; border-radius: 14px; }
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(15,23,42,.12) !important; }
.post-body img { max-width: 100%; height: auto; border-radius: 10px; margin: 1rem 0; }
.post-body p { margin-bottom: 1rem; }


/* ---------- Fix horizontal scroll on mobile ---------- */
html {
  overflow-x: hidden;
  max-width: 100%;
}
body {
  overflow-x: hidden !important;
  max-width: 100vw;
  position: relative;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
img,
svg,
video,
iframe {
  max-width: 100%;
  height: auto;
}

/* Prevent page sections from exceeding viewport (NOT navbar — overflow clips dropdowns) */
.hero-thf,
.page-hero,
section,
footer,
.section-pad {
  max-width: 100%;
  overflow-x: clip;
}
.navbar-thf {
  max-width: 100%;
  overflow: visible !important; /* allow dropdown to show */
}

/* Bootstrap rows can cause overflow if parent lacks padding */
.container,
.container-fluid {
  max-width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Hero / buttons wrap cleanly on small screens */
.hero-thf {
  min-height: auto;
  padding: 4rem 0 3.5rem;
}
.hero-thf .d-flex.flex-wrap {
  gap: 0.75rem;
}
.hero-thf h1 {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Long words / unbroken content */
.entry-content,
.post-body,
.founder-quote {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* AOS sometimes leaves transform overflow */
[data-aos] {
  max-width: 100%;
}

@media (max-width: 575.98px) {
  .btn-hw-primary,
  .btn-outline-light {
    font-size: 0.9rem;
  }
  .section-pad {
    padding: 3.5rem 0 !important;
  }
  .eyebrow {
    font-size: 0.7rem;
  }
}


/* ---------- Fix white gap at bottom on mobile ---------- */
html, body {
  min-height: 100%;
  height: auto;
}
body {
  display: flex;
  flex-direction: column;
}
/* Push footer down without creating extra blank space beyond content */
.footer-hw {
  margin-top: auto;
}
#preloader.hide {
  display: none !important; /* fully remove from layout when done */
}
/* Avoid 100vh traps that leave empty space on mobile browsers */
.hero-thf {
  min-height: 70vh;
  min-height: 70svh; /* small viewport height – better on mobile */
}
@media (max-width: 767.98px) {
  .hero-thf {
    min-height: 0;
    padding: 3.5rem 0 3rem;
  }
  .section-pad {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
  .footer-hw {
    padding-bottom: 1.5rem;
  }
}
