/* ========================================================
   SAPSKI FOUNDATION – CLEAN, MODERN STYLE.CSS (2025)
   Fully compatible with Bootstrap 5 navbar
   Dropdown: Starts closed, opens on click (Bootstrap default)
   Focus: Responsive, readable, professional look
   ======================================================== */

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Libre Baskerville', Georgia, serif !important;
  line-height: 1.6;
  color: #333;
  background: #f8f9fa;
  overflow-x: hidden;
}

/* ==================== BOOTSTRAP DROPDOWN ENHANCEMENTS ==================== */
/* Polished appearance, dark visible text, blue hover */
.dropdown-menu {
  background-color: #003366;
  border: 1px solid #003366;
  border-radius: 0.375rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
  min-width: 220px;
}

.dropdown-item {
  color: white !important;          /* Dark, visible text by default */
  padding: 0.75rem 1.5rem !important;
  font-size: 1rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: #003366 !important;  /* Primary blue on hover/focus */
  color: white !important;
}

/* No extra rules – Bootstrap JS handles click open/close (starts closed) */

/* Optional: Slight navbar tweaks to match your original look */
.navbar {
  background-color: #003366 !important;
}

.nav-link {
  font-size: 1.1rem;
  font-weight: 600;
}

.nav-link:hover {
  color: white !important;
}

/* ==================== BUTTONS ==================== */
.btn {
  padding: 16px 36px;
  font-size: 1.2rem;
  font-weight: bold;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s;
}

.btn-primary { 
  background: #00ccff; 
  color: #003366; 
}
.btn-primary:hover { 
  background: white; 
  transform: translateY(-6px); 
  box-shadow: 0 12px 25px rgba(0,204,255,0.4); 
}

.btn-secondary { 
  background: #D24600; s
  color: white; 
  border: 3px solid white; 
}
.btn-secondary:hover { 
  background: white; 
  color: #003366; 
}

.btn-large { 
  padding: 20px 50px; 
  font-size: 1.5rem; 
}

/* ==================== SECTIONS ==================== */
main {
  width: 100%;
  padding: 0;
  overflow-x: hidden;
}

main > section {
  width: 100%;
  padding: 100px 20px;
  text-align: center;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

main > section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Backgrounds & text colors per section */
main > section:nth-child(1) { background: linear-gradient(135deg, #f8f9fa, #e3f2fd); color: #333; }     /* Mission */
main > section:nth-child(2) { background: #003366; color: white; }                                      
main > section:nth-child(3) { background: white; color: #333; }                                          /* Stats */
main > section:nth-child(4) { background: #003366; color: white; }                                       /* Programs */
main > section:nth-child(5) { background: linear-gradient(135deg, #00ccff, #003366); color: white; }   /* CTA */

/* Force readable text */
main > section h2,
main > section p,
main > section a { 
  color: inherit !important; 
}

/* Prominent mission statement */
.lead {
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1.7;
  max-width: 900px;
  margin: 30px auto 0;
  opacity: 0.95;
}

main > section h2 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 20px;
}

/* Stats grid */
.stats-grid {
  display: flex;
  justify-content: center;
  gap: 80px;
  flex-wrap: wrap;
  max-width: 1000px;
  margin: 50px auto 0;
}

.stat h3 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0;
  color: #00ccff;
  line-height: 1;
}

.stat p {
  font-size: 1.3rem;
  margin: 12px 0 0;
  opacity: 0.9;
}

/* Lists */
.contact-list,
.eligibility-list {
  max-width: 860px;
  margin: 40px auto 0;
  text-align: left;
  font-size: 1.35rem;
  line-height: 1.8;
  padding-left: 1.5em;
}

.eligibility-list li {
  margin-bottom: 1.1rem;
  padding-left: 0.8em;
  position: relative;
}

.eligibility-list li::before {
  content: '✓';
  color: #00ccff;
  font-weight: bold;
  position: absolute;
  left: -1.8em;
  font-size: 1.4em;
}

.team-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 20px 0 8px;
  color: inherit;
}

/* ==================== MOBILE ==================== */
@media (max-width: 900px) {
  main > section { 
    padding: 80px 15px; 
  }
  .stats-grid { 
    gap: 40px; 
  }
  .stat h3 { 
    font-size: 2.0rem; 
  }
  .lead { 
    font-size: 1.5rem; 
  }
  main > section h2 { 
    font-size: 2.5rem; 
  }
}

@media (max-width: 600px) {
  main > section { 
    padding: 60px 10px; 
  }
  main > section h2 { 
    font-size: 2.2rem; 
  }
  .lead { 
    font-size: 1.35rem; 
    padding: 0 10px; 
  }
}

/* Prevent unexpected shifts and help with mobile viewport issues */
html {
    scrollbar-gutter: stable both-edges;   /* Reserves space for scrollbar */
    overflow-x: hidden;
}

body {
    position: relative;                    /* Helps contain reflows */
}

/* Important for mobile: reduce address bar hiding bounce */
html, body {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;        /* Limits pull-to-refresh / bounce at top */
}

/* Make sure sections don't cause unexpected height changes */
main > section {
    contain: layout style;                 /* Isolates layout calculations */
}