/* ========================================
   RAHAMA WEBSITE - MOBILE PATCH
   Link this AFTER your existing style.css:
   <link rel="stylesheet" href="mobile-patch.css">
   
   PURELY ADDITIVE - nothing removed or changed.
   ======================================== */

/* =============================================
   1. GLOBAL SAFETY - prevent horizontal scroll
   ============================================= */
html, body, main {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* =============================================
   2. NAVBAR - solid, visible, clean on mobile
   ============================================= */
@media (max-width: 968px) {

  header {
    background-color: #ffffff !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12) !important;
  }

  .navbar {
    padding: 0.8rem 4% !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
  }

  /* Logo */
  .logo img {
    height: 55px !important;
    width: auto !important;
  }

  /* Hamburger - force visible */
  .mobile-menu-toggle {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0.5rem !important;
    z-index: 1002 !important;
  }

  .mobile-menu-toggle span {
    display: block !important;
    width: 26px !important;
    height: 3px !important;
    background-color: #2d7a52 !important;
    border-radius: 3px !important;
    transition: all 0.3s ease !important;
  }

  /* Nav drawer */
  .nav-links {
    position: fixed !important;
    top: 73px !important;
    right: -100% !important;
    flex-direction: column !important;
    background: #ffffff !important;
    width: 80% !important;
    max-width: 300px !important;
    height: calc(100vh - 73px) !important;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15) !important;
    padding: 1.5rem !important;
    transition: right 0.3s ease !important;
    overflow-y: auto !important;
    z-index: 1001 !important;
    gap: 0.3rem !important;
  }

  .nav-links.active {
    right: 0 !important;
  }

  .nav-links li {
    width: 100% !important;
  }

  .nav-links a {
    display: block !important;
    padding: 0.9rem 1rem !important;
    width: 100% !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
  }

  /* Donate button in nav - keep it styled */
  .donate-menu {
    display: block !important;
    text-align: center !important;
    margin-top: 0.5rem !important;
  }
}

/* =============================================
   3. HERO SECTION - clean & centred on mobile
   ============================================= */
@media (max-width: 768px) {

  .hero {
    height: auto !important;
    min-height: 560px !important;
    padding: 90px 20px 70px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .hero-text {
    max-width: 100% !important;
    padding: 0 1rem !important;
    transform: translateX(0) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .hero-text h1 {
    font-size: 1.9rem !important;
    line-height: 1.2 !important;
    margin-bottom: 1rem !important;
  }

  .hero-text p {
    font-size: 1rem !important;
    line-height: 1.6 !important;
    margin-bottom: 1.8rem !important;
  }

  /* CTA buttons stack neatly */
  .hero-cta {
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.9rem !important;
    width: 100% !important;
    padding: 0 !important;
    margin-top: 0 !important;
  }

  .btn-hero-primary,
  .btn-hero-secondary {
    width: 100% !important;
    max-width: 280px !important;
    padding: 0.95rem 1.5rem !important;
    font-size: 1rem !important;
    text-align: center !important;
    display: block !important;
  }

  /* Hide arrows on mobile - too cramped */
  .hero-arrows {
    display: none !important;
  }

  /* Dots sit nicely at bottom */
  .hero-dots {
    bottom: 1.2rem !important;
  }

  .hero-dots span {
    width: 9px !important;
    height: 9px !important;
  }
}

/* =============================================
   4. SMALL HERO (inner pages) - fix alignment
   ============================================= */
@media (max-width: 768px) {

  .small-hero {
    height: auto !important;
    min-height: 220px !important;
    padding: 3rem 1.5rem !important;
  }

  .small-hero .hero-text {
    transform: translateX(0) !important;
    padding: 1rem !important;
  }

  .small-hero .hero-text h1 {
    font-size: 1.7rem !important;
    line-height: 1.2 !important;
  }

  .small-hero .hero-text p {
    font-size: 1rem !important;
  }
}

/* =============================================
   5. MISSION SECTION
   ============================================= */
@media (max-width: 768px) {

  .mission {
    padding: 3rem 5% !important;
  }

  .mission h2 {
    font-size: 1.7rem !important;
  }

  .mission p {
    font-size: 1rem !important;
  }
}

/* =============================================
   6. STATS SECTION - 2 cols on tablet, 1 on phone
   ============================================= */
@media (max-width: 768px) {

  .stats {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
    padding: 3rem 4% !important;
  }

  .stat {
    padding: 1.5rem 0.8rem !important;
  }

  .stat h3 {
    font-size: 1.9rem !important;
    white-space: normal !important;
  }

  .stat p {
    font-size: 0.85rem !important;
    white-space: normal !important;
  }

  .stat-context {
    font-size: 0.75rem !important;
    white-space: normal !important;
  }
}

@media (max-width: 420px) {

  .stats {
    grid-template-columns: 1fr !important;
  }
}

/* =============================================
   7. WHAT WE DO / PILLARS
   ============================================= */
@media (max-width: 768px) {

  .what-we-do {
    padding: 3rem 5% !important;
  }

  .pillars,
  .what-we-do .pillars {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .pillar {
    padding: 2rem 1.5rem !important;
  }
}

/* =============================================
   8. FEATURED PROJECT CARDS
   ============================================= */
@media (max-width: 768px) {

  .featured-projects {
    padding: 3rem 5% !important;
  }

  .project-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .project-card-image {
    height: 220px !important;
  }

  .project-card-buttons {
    flex-direction: column !important;
    gap: 0.7rem !important;
  }

  .project-card .btn-primary,
  .project-card .btn-secondary {
    width: 100% !important;
    min-width: unset !important;
  }

  .project-card h3 {
    min-height: unset !important;
  }

  .project-card p {
    min-height: unset !important;
  }
}

/* =============================================
   9. TESTIMONIALS
   ============================================= */
@media (max-width: 768px) {

  .testimonial-container {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .testimonial-card {
    padding: 2rem 1.5rem !important;
  }

  blockquote p {
    font-size: 1.1rem !important;
  }
}

/* =============================================
   10. GET INVOLVED
   ============================================= */
@media (max-width: 768px) {

  .get-involved {
    padding: 3rem 5% !important;
  }

  .involvement-options {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .involvement-card {
    padding: 2rem 1.5rem !important;
  }
}

/* =============================================
   11. PARTNERS PREVIEW
   ============================================= */
@media (max-width: 768px) {

  .partner-logos {
    gap: 1.5rem !important;
  }

  .partner-logos img {
    height: 55px !important;
  }
}

/* =============================================
   12. PARTNER CTA SECTION (Donors page)
   ============================================= */
@media (max-width: 768px) {

  .partner-cta-section {
    padding: 3rem 5% !important;
  }

  .partner-cta-content {
    padding: 0 1rem !important;
    text-align: center !important;
  }

  .partner-cta-content h2 {
    font-size: 1.7rem !important;
    padding: 0 !important;
  }

  .partner-cta-content p {
    font-size: 1rem !important;
    padding: 0 !important;
    margin-bottom: 1.5rem !important;
  }

  .cta-buttons {
    flex-direction: column !important;
    align-items: center !important;
    gap: 1rem !important;
    padding: 0 !important;
  }

  .cta-buttons .btn-primary,
  .cta-buttons .btn-secondary {
    width: 100% !important;
    max-width: 300px !important;
    min-width: unset !important;
  }
}

/* =============================================
   13. LARGE PARTNERS GRID (Donors page)
   ============================================= */
@media (max-width: 768px) {

  .large-partners-grid {
    grid-template-columns: 1fr !important;
    padding: 0 !important;
  }

  .logo-placeholder-big {
    min-width: unset !important;
    width: 100% !important;
    padding: 1.5rem !important;
  }

  .government-large-grid {
    grid-template-columns: 1fr !important;
  }

  .gov-logo-large {
    min-height: 140px !important;
  }

  .values-large-grid {
    grid-template-columns: 1fr !important;
  }
}

/* =============================================
   14. ABOUT PAGE
   ============================================= */
@media (max-width: 768px) {

  .about-vision-mission {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .about-box {
    padding: 2rem 1.5rem !important;
  }

  .values-grid {
    grid-template-columns: 1fr !important;
    gap: 1.2rem !important;
  }

  .approach-highlights {
    flex-direction: column !important;
    gap: 1.5rem !important;
  }

  .about-approach {
    padding: 2.5rem 1.5rem !important;
  }

  .founders-story {
    padding: 2.5rem 5% !important;
  }

  .founders-story-header h2 {
    font-size: 1.7rem !important;
  }

  .story-reflection {
    padding: 1.5rem 1rem !important;
  }

  .story-reflection blockquote p {
    font-size: 1.1rem !important;
  }

  .final-statement {
    font-size: 1.05rem !important;
  }
}

/* =============================================
   15. PROJECTS PAGE
   ============================================= */
@media (max-width: 768px) {

  .projects-page {
    padding: 2.5rem 5% !important;
  }

  .project-detailed-card {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .flagship-grid {
    grid-template-columns: 1fr !important;
  }

  .impact-highlights-grid {
    grid-template-columns: 1fr !important;
  }

  .projects-cta {
    padding: 3rem 1.5rem !important;
  }
}

/* =============================================
   16. CONTACT PAGE
   ============================================= */
@media (max-width: 768px) {

  .contact-form {
    padding: 2rem 1.2rem !important;
    margin: 0 1rem !important;
  }

  .contact-details {
    margin: 0 1rem 2rem !important;
    padding: 1.5rem !important;
  }
}

/* =============================================
   17. FOOTER
   ============================================= */
@media (max-width: 768px) {

  footer {
    padding: 3rem 5% 1.5rem !important;
  }

  .footer-content {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  .newsletter-form {
    flex-direction: column !important;
    gap: 0.7rem !important;
  }

  .newsletter-form input,
  .newsletter-form button {
    width: 100% !important;
  }

  .sticky-whatsapp {
    bottom: 80px !important;
    right: 1rem !important;
    width: 52px !important;
    height: 52px !important;
  }

  .sticky-donate {
    bottom: 15px !important;
    right: 1rem !important;
    padding: 0.75rem 1.2rem !important;
    font-size: 0.9rem !important;
  }
}

/* =============================================
   18. PROGRESS BAR (Donate page)
   ============================================= */
@media (max-width: 768px) {

  .progress-bar-container {
    height: 40px !important;
    margin: 1.5rem auto !important;
  }

  .progress-bar {
    font-size: 0.95rem !important;
    padding-right: 0.8rem !important;
  }

  .progress-stats {
    grid-template-columns: 1fr !important;
    gap: 0.8rem !important;
    padding: 0 !important;
  }

  .progress-stat {
    min-width: unset !important;
    padding: 1rem !important;
  }
}

/* =============================================
   19. DONATION AMOUNT CARDS
   ============================================= */
@media (max-width: 768px) {

  .donation-amounts {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.8rem !important;
  }

  .donation-amount-card {
    padding: 1.2rem 0.8rem !important;
  }

  .donation-amount-card h3 {
    font-size: 1.5rem !important;
  }
}

@media (max-width: 420px) {

  .donation-amounts {
    grid-template-columns: 1fr !important;
  }
}

/* =============================================
   20. GENERAL TYPOGRAPHY SCALE ON SMALL SCREENS
   ============================================= */
@media (max-width: 480px) {

  h1 {
    font-size: clamp(1.6rem, 7vw, 2.2rem) !important;
  }

  h2 {
    font-size: clamp(1.4rem, 6vw, 1.9rem) !important;
  }

  h3 {
    font-size: clamp(1.2rem, 5vw, 1.5rem) !important;
  }

  .page-container {
    padding: 2rem 4% !important;
  }
}
