/* ================================================================
   THE MASTERS ASSOCIATION V2 — Custom Styles
   Theme: Forest Green + Saffron/Amber | Font: Libre Baskerville + Source Sans 3
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Source+Sans+3:wght@300;400;500;600;700;800&display=swap');

/* ===== BASE ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Source Sans 3', system-ui, sans-serif; color: #1c1917; background: #fff; }
img { max-width: 100%; display: block; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f5f5f4; }
::-webkit-scrollbar-thumb { background: #15803d; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #f59e0b; }

/* ===== NAVBAR ===== */
#navbar {
  background: #14532d;
  border-bottom: 3px solid #f59e0b;
}
#navbar.scrolled {
  background: #052e16;
  border-bottom-color: #f59e0b;
  box-shadow: 0 4px 30px rgba(0,0,0,0.25);
}
#navbar.navbar-light {
  background: #fff !important;
  border-bottom-color: #d1fae5;
}
#navbar.navbar-light .nav-link { color: #14532d !important; }
#navbar.navbar-light .logo-text { color: #14532d !important; }

/* ===== NAV DROPDOWN ===== */
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
  border: 1px solid #dcfce7;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 200;
  overflow: hidden;
}
.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown-menu a:not(:last-child) {
  border-bottom: 1px solid #f0fdf4;
}

/* ===== MOBILE SIDEBAR ===== */
#mobileSidebar.open { pointer-events: all; }
#mobileSidebar.open #sidebarOverlay { opacity: 1; }
#mobileSidebar.open #sidebarPanel { transform: translateX(0); }

/* ===== HERO ===== */
.hero-bg {
  position: relative;
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(5,46,22,0.92) 0%, rgba(21,128,61,0.80) 55%, rgba(245,158,11,0.18) 100%);
  z-index: 1;
}
.hero-content { position: relative; z-index: 2; }

/* ===== PAGE HERO ===== */
.page-hero {
  position: relative;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(5,46,22,0.93) 0%, rgba(21,128,61,0.82) 100%);
}
.page-hero-content { position: relative; z-index: 2; }

/* ===== DIAGONAL SECTION SEPARATOR ===== */
.diagonal-top {
  clip-path: polygon(0 6%, 100% 0%, 100% 100%, 0 100%);
  margin-top: -3rem;
  padding-top: 5rem;
}
.diagonal-bottom {
  clip-path: polygon(0 0, 100% 0, 100% 94%, 0 100%);
  padding-bottom: 5rem;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes pulse-ring {
  0%   { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(2); opacity: 0; }
}
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.animate-fade-up    { animation: fadeUp 0.8s ease forwards; }
.animate-fade-in    { animation: fadeIn 0.8s ease forwards; }
.animate-slide-left  { animation: slideLeft 0.8s ease forwards; }
.animate-slide-right { animation: slideRight 0.8s ease forwards; }
.animate-scale-in   { animation: scaleIn 0.6s ease forwards; }
.animate-float      { animation: float 4s ease-in-out infinite; }
.animate-marquee    { animation: marquee 30s linear infinite; }

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #1c1917;
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(245,158,11,0.35);
  border: none;
  cursor: pointer;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #d97706, #b45309);
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(245,158,11,0.5);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.6);
  padding: 12px 30px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.15);
  border-color: white;
  transform: translateY(-2px);
}
.btn-green {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #15803d;
  color: white;
  padding: 13px 30px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}
.btn-green:hover {
  background: #166534;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(21,128,61,0.3);
}
.btn-outline-green {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: #15803d;
  border: 2px solid #15803d;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
}
.btn-outline-green:hover {
  background: #15803d;
  color: white;
  transform: translateY(-2px);
}

/* ===== CARDS ===== */
.card-hover { transition: all 0.35s ease; }
.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}
.card-green-hover { transition: all 0.35s ease; }
.card-green-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 40px rgba(21,128,61,0.15);
}

/* ===== SECTION TAGS ===== */
.section-tag {
  display: inline-block;
  background: #fef3c7;
  color: #d97706;
  border: 1px solid #fde68a;
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-tag.green {
  background: #dcfce7;
  color: #15803d;
  border-color: #bbf7d0;
}
.section-tag.red {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fecaca;
}

/* ===== DIVIDER ===== */
.section-divider {
  height: 4px;
  width: 60px;
  background: linear-gradient(90deg, #f59e0b, #15803d);
  border-radius: 2px;
  margin: 16px 0;
}

/* ===== STAT NUMBER ===== */
.stat-number { font-variant-numeric: tabular-nums; }

/* ===== AMOUNT BUTTONS ===== */
.amount-btn {
  padding: 14px 20px;
  border: 2px solid #d1fae5;
  border-radius: 8px;
  font-weight: 700;
  font-size: 18px;
  color: #15803d;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  background: white;
}
.amount-btn:hover, .amount-btn.active {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #d97706;
}

/* ===== FORM STYLES ===== */
.form-input {
  width: 100%;
  padding: 13px 18px;
  border: 2px solid #d1fae5;
  border-radius: 8px;
  font-size: 15px;
  color: #1c1917;
  transition: border-color 0.2s ease;
  outline: none;
  font-family: 'Source Sans 3', sans-serif;
  background: #fff;
}
.form-input:focus {
  border-color: #15803d;
  box-shadow: 0 0 0 4px rgba(21,128,61,0.08);
}
.form-label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: #374151;
  margin-bottom: 6px;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #15803d);
  border-radius: 4px;
  transition: width 1.5s ease;
}

/* ===== BADGE ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ===== BREADCRUMB ===== */
.breadcrumb a { color: rgba(255,255,255,0.7); transition: color 0.2s; }
.breadcrumb a:hover { color: #f59e0b; }
.breadcrumb span { color: rgba(255,255,255,0.4); margin: 0 8px; }

/* ===== TESTIMONIAL ===== */
.testimonial-card { transition: all 0.3s ease; }
.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

/* ===== BLOG CARD ===== */
.blog-card-img { overflow: hidden; }
.blog-card-img img { transition: transform 0.5s ease; }
.blog-card-img:hover img { transform: scale(1.06); }

/* ===== GALLERY ===== */
.gallery-item { overflow: hidden; border-radius: 12px; }
.gallery-item img {
  transition: transform 0.5s ease;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-item:hover img { transform: scale(1.08); }

/* ===== MARQUEE TICKER ===== */
.ticker-wrap { overflow: hidden; }
.ticker-inner { display: flex; width: max-content; }

/* ===== PULSE DOT ===== */
.pulse-dot {
  position: relative;
  width: 12px;
  height: 12px;
  background: #22c55e;
  border-radius: 50%;
}
.pulse-dot::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(34,197,94,0.3);
  animation: pulse-ring 1.5s ease-out infinite;
}

/* ===== BACK TO TOP ===== */
#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #1c1917;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(245,158,11,0.4);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 100;
  border: none;
}
#backToTop.visible { opacity: 1; visibility: visible; }
#backToTop:hover { transform: translateY(-3px); }

/* ===== TABS ===== */
.tab-btn { transition: all 0.2s ease; }
.tab-btn.active { background: #15803d; color: white; }

/* ===== INITIATIVE ICON ===== */
.initiative-icon {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== IMPACT CARD ===== */
.impact-card {
  position: relative;
  overflow: hidden;
}
.impact-card::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
}

/* ===== GRADIENT TEXT ===== */
.gradient-text {
  background: linear-gradient(135deg, #f59e0b, #15803d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-amber {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}
.gradient-green {
  background: linear-gradient(135deg, #15803d 0%, #166534 100%);
}

/* ===== STEP CONNECTOR ===== */
.step-line:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 24px;
  left: calc(50% + 24px);
  width: calc(100% - 48px);
  height: 2px;
  background: linear-gradient(90deg, #bbf7d0, transparent);
  z-index: 0;
}

/* ===== UTILITY ===== */
.text-shadow { text-shadow: 0 2px 20px rgba(0,0,0,0.3); }
.overlay-dark { background: rgba(0,0,0,0.5); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero-bg { background-attachment: scroll; }
  .page-hero { background-attachment: scroll; }
  .diagonal-top { clip-path: none; margin-top: 0; padding-top: 4rem; }
  .diagonal-bottom { clip-path: none; padding-bottom: 4rem; }
}

/* Print */
@media print {
  #navbar, #backToTop, footer { display: none; }
  body { padding-top: 0; }
}
