/* =========================================
   IBHHR Ministries — styles.css
   Theme: Clean White
   ========================================= */

/* ---------- CSS Variables ---------- */
:root {
  --color-primary:   #ffffff;
  --color-accent:    #c8922a;
  --color-dark:      #111111;
  --color-light:     #f7f4ef;
  --color-white:     #ffffff;
  --color-text:      #333333;
  --color-muted:     #666666;
  --color-border:    #e0d8cc;

  --font-serif:      'Playfair Display', Georgia, serif;
  --font-sans:       'Open Sans', Arial, sans-serif;

  --header-height:   80px;
  --max-width:       1200px;
  --gutter:          clamp(1.5rem, 6vw, 5rem);

  --transition:      0.3s ease;
  --radius:          6px;
  --shadow:          0 4px 24px rgba(0,0,0,0.10);
  --shadow-lg:       0 8px 40px rgba(0,0,0,0.18);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.7;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---------- Utility ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.centered { text-align: center; }
.section { padding: 80px 0; }
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: var(--color-dark);
  margin-bottom: 0.5rem;
}
.section-sub {
  color: var(--color-muted);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition);
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}
.btn-primary:hover {
  background: #a87520;
  border-color: #a87520;
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  color: var(--color-dark);
  border-color: var(--color-dark);
}
.btn-outline:hover {
  background: var(--color-dark);
  color: var(--color-white);
  transform: translateY(-2px);
}

/* =========================================
   HEADER / NAV
   ========================================= */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  height: var(--header-height);
  box-shadow: 0 1px 0 rgba(0,0,0,0.08);
  transition: background var(--transition), box-shadow var(--transition);
}
#site-header.scrolled {
  background: var(--color-white);
  box-shadow: var(--shadow);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo image */
.logo-img {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2px solid rgba(200,146,42,0.4);
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  transition: transform var(--transition), box-shadow var(--transition);
}
.logo-img:hover {
  transform: scale(1.07);
  box-shadow: 0 4px 16px rgba(200,146,42,0.4);
}
.logo-img-small {
  width: 90px;
  height: 90px;
}

/* Nav links */
.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-list > li { position: relative; }
.nav-list > li > a {
  display: block;
  padding: 0.55rem 0.9rem;
  color: var(--color-dark);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 4px;
  transition: color var(--transition), background var(--transition);
}
.nav-list > li > a:hover,
.nav-list > li > a.active {
  color: var(--color-accent);
  background: rgba(200,146,42,0.07);
}
.arrow { font-size: 0.6rem; margin-left: 3px; }

/* Donate button */
.nav-donate-btn {
  background: var(--color-accent) !important;
  color: var(--color-white) !important;
  border-radius: var(--radius) !important;
  padding: 0.5rem 1.2rem !important;
}
.nav-donate-btn:hover {
  background: #a87520 !important;
  color: var(--color-white) !important;
}

/* Dropdown */
.dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--color-white);
  border-radius: var(--radius);
  min-width: 180px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
  z-index: 200;
}
.dropdown li a {
  display: block;
  padding: 0.65rem 1.1rem;
  color: var(--color-text);
  font-size: 0.88rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
}
.dropdown li a:hover {
  background: var(--color-light);
  color: var(--color-accent);
}
.has-dropdown:hover .dropdown,
.has-dropdown.open .dropdown {
  display: block;
  animation: fadeDown 0.2s ease forwards;
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.hamburger span {
  display: block;
  width: 26px; height: 2px;
  background: var(--color-dark);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================
   HERO
   ========================================= */
.hero {
  position: relative;
  height: 100vh;
  height: 100dvh; /* modern: excludes browser chrome on mobile */
  min-height: 500px;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-color: #0a1c32;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: 0;
  overflow: hidden;
}
.hero:not([style]) {
  background: linear-gradient(135deg, #e8e8e8 0%, #ffffff 60%, #f5efe6 100%);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.52), rgba(0,0,0,0.32));
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 1;
  color: var(--color-white);
  padding: 1rem;
}
.hero-heading {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 16px rgba(0,0,0,0.5);
}
.hero-sub {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3.5vw, 2.8rem);
  font-weight: 400;
  margin-top: 0.4rem;
  margin-bottom: 2rem;
  color: var(--color-accent);
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
  opacity: 0;
  transform: translateY(20px);
}
.hero-content .btn {
  animation: heroFadeUp 1s ease 0.7s both;
  font-size: 1rem;
  padding: 0.9rem 2.4rem;
}
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================================
   SCRIPTURE BANNER
   ========================================= */
.scripture-banner {
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 48px 0;
}
.scripture-banner blockquote {
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
}
.scripture-banner blockquote p {
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: var(--color-dark);
  font-style: italic;
  line-height: 1.75;
}
.scripture-banner blockquote cite {
  display: block;
  margin-top: 0.8rem;
  color: var(--color-accent);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* =========================================
   TWO-COLUMN SECTIONS
   ========================================= */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.two-col.reverse { direction: rtl; }
.two-col.reverse > * { direction: ltr; }

.org-section { background: var(--color-white); }
.cta-section  { background: var(--color-light); }

.col-text h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  color: var(--color-dark);
  margin-bottom: 1rem;
}
.col-text p {
  color: var(--color-muted);
  margin-bottom: 1rem;
  font-size: 1rem;
}
.col-text .btn { margin-top: 0.5rem; }

/* Image column */
.col-image {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #ddd;
  min-height: 360px;
}
.col-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.col-image:hover img { transform: scale(1.04); }

.col-image.img-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
  background: linear-gradient(135deg, #e0dbd4 0%, #f0ece6 100%);
}
.col-image.img-fallback::after {
  content: "📸 Image";
  color: rgba(0,0,0,0.25);
  font-size: 1.1rem;
}

.img-caption-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 0.75rem 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  color: var(--color-white);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* =========================================
   LOCATIONS SECTION
   ========================================= */
.locations-section { background: var(--color-light); }
.locations-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 700px;
  margin: 0 auto;
}
.location-card {
  background: var(--color-white);
  border-radius: 10px;
  padding: 2rem 1.8rem;
  text-align: center;
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition), transform var(--transition);
}
.location-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}
.location-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.location-card h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--color-dark);
  margin-bottom: 1rem;
}
.location-card ul { text-align: left; display: inline-block; }
.location-card ul li {
  color: var(--color-muted);
  padding: 0.25rem 0;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--color-border);
}
.location-card ul li:last-child { border-bottom: none; }

/* =========================================
   SCRIPTURE STRIPE
   ========================================= */
.scripture-stripe {
  background: var(--color-accent);
  padding: 28px 0;
  text-align: center;
}
.scripture-stripe p {
  color: var(--color-white);
  font-family: var(--font-serif);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-style: italic;
}
.scripture-stripe strong { font-style: normal; }

/* =========================================
   FOOTER
   ========================================= */
#site-footer {
  background: #1a1a1a;
  color: rgba(255,255,255,0.75);
  padding-top: 60px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.4fr 1.4fr;
  gap: 2.5rem;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-col h4 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--color-accent);
  margin-bottom: 1rem;
  letter-spacing: 0.04em;
}
.footer-col p {
  font-size: 0.88rem;
  line-height: 1.7;
  margin-bottom: 0.65rem;
}
.footer-col a {
  color: rgba(255,255,255,0.7);
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--color-accent); }
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}
.footer-brand .logo-img-small {
  border-color: rgba(200,146,42,0.5);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.footer-org-name {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--color-white);
  line-height: 1.5;
}
.footer-tagline {
  font-size: 0.82rem;
  color: var(--color-accent);
  font-style: italic;
}
.footer-links ul li {
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.footer-links ul li:last-child { border-bottom: none; }
.footer-links ul li a { font-size: 0.88rem; }
.footer-donate .btn { margin-top: 0.75rem; }
.footer-bottom {
  background: rgba(0,0,0,0.3);
  padding: 18px 0;
  text-align: center;
}
.footer-bottom p {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
}

/* =========================================
   INNER PAGES
   ========================================= */
.page-hero {
  padding-top: calc(var(--header-height) + 60px);
  padding-bottom: 60px;
  background: var(--color-white);
  border-bottom: 3px solid var(--color-accent);
  text-align: center;
  color: var(--color-dark);
}
.page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  color: var(--color-dark);
}
.page-hero p {
  color: var(--color-muted);
  margin-top: 0.5rem;
  font-size: 1.05rem;
}
.page-content { padding: 70px 0; }
.page-content h2 {
  font-family: var(--font-serif);
  color: var(--color-dark);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin-bottom: 1rem;
  margin-top: 2rem;
}
.page-content h2:first-child { margin-top: 0; }
.page-content p {
  color: var(--color-muted);
  margin-bottom: 1rem;
  max-width: 760px;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}
.contact-info-block h3 {
  font-family: var(--font-serif);
  color: var(--color-dark);
  font-size: 1.4rem;
  margin-bottom: 1.2rem;
}
.contact-info-block p {
  color: var(--color-muted);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}
.contact-info-block a { color: var(--color-accent); }

.contact-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 0.35rem;
  margin-top: 1rem;
}
.contact-form label:first-child { margin-top: 0; }
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--color-white);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(200,146,42,0.15);
}
.contact-form textarea { resize: vertical; min-height: 130px; }
.contact-form .btn { margin-top: 1.2rem; }

/* Donation */
.donation-tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}
.tier-card {
  border: 2px solid var(--color-border);
  border-radius: 10px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  cursor: pointer;
}
.tier-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 4px 20px rgba(200,146,42,0.18);
  transform: translateY(-4px);
}
.tier-card.selected {
  border-color: var(--color-accent);
  background: rgba(200,146,42,0.07);
  box-shadow: 0 0 0 3px rgba(200,146,42,0.35), 0 6px 24px rgba(200,146,42,0.2);
  transform: translateY(-4px);
}
.tier-card.selected .amount {
  color: var(--color-accent);
}
.tier-card .amount {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  color: var(--color-dark);
  font-weight: 700;
  transition: color 0.2s ease;
}
.tier-card .impact {
  color: var(--color-muted);
  font-size: 0.88rem;
  margin-top: 0.5rem;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}
.service-card {
  background: var(--color-light);
  border-radius: 10px;
  padding: 2rem 1.5rem;
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition), transform var(--transition);
}
.service-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.service-card .svc-icon { font-size: 2.4rem; margin-bottom: 1rem; }
.service-card h3 {
  font-family: var(--font-serif);
  color: var(--color-dark);
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
}
.service-card p { color: var(--color-muted); font-size: 0.9rem; }

/* Leadership */
.leadership-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.leader-card {
  text-align: center;
  background: var(--color-light);
  border-radius: 10px;
  padding: 2rem 1.5rem;
  border: 1px solid var(--color-border);
}
.leader-avatar {
  width: 90px; height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, #555 0%, var(--color-accent) 100%);
  margin: 0 auto 1rem;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-family: var(--font-serif);
  font-size: 1.8rem;
}
.leader-card h3 {
  font-family: var(--font-serif);
  color: var(--color-dark);
  font-size: 1.1rem;
}
.leader-card .role {
  color: var(--color-accent);
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.3rem;
}

/* =========================================
   RESPONSIVE
   ========================================= */

/* Prevent horizontal scroll on all screens */
html, body { overflow-x: hidden; }

/* Touch-friendly tap targets */
.btn, button, input, select, textarea {
  touch-action: manipulation;
}
.btn { min-height: 44px; }
.hamburger { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }

@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 860px) {
  .two-col, .two-col.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    gap: 1.5rem;
  }
  .two-col.reverse .col-image { order: -1; }
  .col-image { min-height: 260px; }
  .locations-grid { grid-template-columns: 1fr; max-width: 420px; }
  .services-grid, .donation-tiers { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  /* --- Nav --- */
  .main-nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0; right: 0;
    background: var(--color-white);
    padding: 1rem 0 2rem;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    max-height: calc(100vh - var(--header-height));
    border-top: 1px solid var(--color-border);
    z-index: 999;
  }
  .main-nav.open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list > li > a {
    padding: 0.85rem 1.5rem;
    border-radius: 0;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-dark);
    font-size: 1rem;
  }
  .nav-donate-btn {
    margin: 0.75rem 1.5rem !important;
    text-align: center !important;
    border-radius: var(--radius) !important;
    display: block !important;
  }
  .dropdown {
    position: static;
    box-shadow: none;
    border: none;
    background: var(--color-light);
    border-radius: 0;
  }
  .dropdown li a {
    color: var(--color-text);
    background: transparent;
    padding-left: 2.5rem;
    font-size: 0.95rem;
  }
  .dropdown li a:hover { background: var(--color-border); color: var(--color-dark); }
  .has-dropdown .dropdown { display: none; }
  .has-dropdown.open .dropdown { display: block; animation: none; }
  .hamburger { display: flex; }

  /* --- Hero --- */
  .hero {
    height: 100svh;          /* best: shrinks when browser chrome hides */
    height: 100dvh;          /* fallback for slightly older browsers */
    min-height: 480px;
    background-size: cover !important;   /* override heroZoom animation */
    background-position: center 30% !important; /* show upper subject area */
    animation: none !important;          /* disable zoom on mobile */
  }
  .hero-content { padding: 1.5rem 1rem; }
  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }
  .hero-buttons .btn {
    width: 100%;
    max-width: 300px;
    text-align: center;
  }
  .btn-hero-ghost { margin-left: 0 !important; }

  /* --- Sections --- */
  .section { padding: 60px 0; }
  .scripture-banner { padding: 36px 0; }

  /* --- Images --- */
  .col-image { min-height: 240px; }

  /* --- Page inner --- */
  .page-hero {
    padding-top: calc(var(--header-height) + 30px);
    padding-bottom: 30px;
  }
  .page-content { padding: 45px 0; }

  /* --- Footer --- */
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-brand { align-items: center; text-align: center; }
  .footer-donate { text-align: center; }
  .footer-donate .btn { display: inline-block; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --gutter: 1.2rem; }

  /* --- Services & donation tiers --- */
  .services-grid, .donation-tiers { grid-template-columns: 1fr; }
  .section { padding: 50px 0; }

  /* --- Donation form: collapse first/last name to single column --- */
  #donation-form div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  /* --- Custom amount row: stack button --- */
  #custom-amount-row > div { flex-direction: column; }
  #custom-amount-confirm { width: 100%; }

  /* --- Page hero --- */
  .page-hero h1 { font-size: clamp(1.6rem, 6vw, 2.2rem); }
  .page-hero p  { font-size: 0.95rem; }

  /* --- Col image shorter --- */
  .col-image { min-height: 200px; }

  /* --- Footer links centered --- */
  .footer-links ul { text-align: center; }
  .footer-contact { text-align: center; }
  .footer-contact p { justify-content: center; }

  /* --- Locations grid full width --- */
  .locations-grid { max-width: 100%; }
}

@media (max-width: 400px) {
  .hero-buttons .btn { max-width: 100%; }
  .btn { padding: 0.7rem 1.4rem; font-size: 0.9rem; }
  .hero-heading { font-size: clamp(2.2rem, 10vw, 3rem); }
}
