/* Mobile Responsive Styles - Only for screens 768px and below */

/* Fix body margins and overflow issues */
body {
  margin-left: 0 !important;
  margin-right: 0 !important;
  overflow-x: hidden !important;
}

/* Mobile Header - Frosted Glass Floating Style - BIGGER */
.main-header {
  position: fixed;
  height: 100px;
  top: 15px;
  left: 15px;
  right: 15px;
  width: auto;
  margin: 0;
  padding: 15px 20px; /* Reduced padding to prevent overflow */
  border-radius: 20px;
  background: rgba(209, 231, 209, 0.7);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  z-index: 9999;
  box-sizing: border-box;
}

.header-content {
  width: 100%;
  height: 100%;
  padding: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Hide desktop navigation */
.main-nav {
  display: none;
}

.social-links {
  display: none;
}

/* Mobile Navigation Buttons - Smaller and Better Styled */
.mobile-nav {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.mobile-nav-button {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem; /* Reduced font size */
  font-weight: 600;
  padding: 12px 16px; /* Reduced padding */
  height: 40px; /* Reduced height */
  background: rgba(255, 255, 255, 0.8);
  color: var(--color-green-dark);
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  white-space: nowrap;
  box-sizing: border-box;
}

.mobile-nav-button:hover,
.mobile-nav-button:active {
  transform: scale(0.95);
  background: rgba(240, 240, 240, 0.9);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Mobile Social Icons - Smaller to fit better */
.mobile-social {
  display: flex;
  align-items: center;
  gap: 8px; /* Reduced gap */
  height: 40px; /* Reduced height */
  flex-shrink: 0;
}

.mobile-social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; /* Reduced size */
  height: 40px; /* Reduced size */
  background: rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-sizing: border-box;
  flex-shrink: 0;
}

.mobile-social-icon:hover {
  transform: scale(0.95);
  background: rgba(240, 240, 240, 0.9);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.mobile-social-icon img {
  width: 20px; /* Reduced size */
  height: 20px; /* Reduced size */
}


/* Mobile Content Layout */
.main-content {
  margin-top: 140px;
  padding-top: 0;
  padding-left: 15px;
  padding-right: 15px;
  box-sizing: border-box;
}

.content-grid {
  grid-template-columns: 1fr;
  gap: 0rem; 
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Ensure all sections fit within screen width */
.events-section,
.support-section,
.intro-text-box,
.video-container,
.gallery-section,
.contact-section,
.about-section {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 2rem; /* Increased from 1.5rem for more spacing */
}

/* Mobile Video Text - Consistent Border Radius */
.intro-text-box {
  border-radius: 20px !important;
  padding: 1.5rem;
  box-sizing: border-box;
  margin-bottom: 3rem; /* Increased from 1.5rem to match other sections */
}

.intro-text {
  font-size: 1.2rem !important;
  line-height: 1.4 !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Mobile Video - Consistent Border Radius */
.video-container {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 1rem !important; /* Use !important to override desktop CSS */
}

/* Mobile Events Section - More Mobile Friendly with Consistent Border Radius */
.events-section {
  max-width: 100%;
  border-radius: 20px !important;
  box-sizing: border-box;
  margin-bottom: 2rem; /* Increased from 1.5rem to match other sections */
}

.events-title {
  font-size: 1.3rem; /* Slightly reduced */
  padding: 1rem; /* Reduced padding */
  font-weight: 700;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  margin-bottom: 1.5rem; /* Increased from 1rem for better spacing within events section */
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  word-wrap: break-word;
  box-sizing: border-box;
}

.event-toggle {
  font-size: 1rem !important; /* Reduced font size */
  font-weight: 400 !important; /* Use normal weight to match desktop */
  padding: 1rem !important; /* Reduced padding */
  border-radius: 20px !important;
  background: rgba(255, 255, 255, 0.8) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  margin-bottom: 0.75rem !important;
  transition: all 0.3s ease !important;
  word-wrap: break-word;
  box-sizing: border-box;
}

/* Support section mobile styling */
.support-section {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 2rem !important; /* Use !important to override desktop CSS */
  margin-top: 0 !important; /* Remove desktop margin-top */
}

.support-content {
  padding: 1rem;
  box-sizing: border-box;
  border-radius: 20px !important;
}

.support-main-text {
  font-size: 1rem !important;
  line-height: 1.4 !important;
  text-align: left !important;
  word-wrap: break-word;
  margin: 0 0 1rem 0;
}

.bank-details-subtle {
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
  text-align: left;
}

.org-name-clickable,
.bank-account-clickable {
  font-size: 0.875rem !important;
  padding: 0.5rem;
  word-wrap: break-word;
  width: 100%;
  text-align: center;
}

/* Mobile Gallery Carousel - Consistent Border Radius and Proper Width */
.gallery-section {
  padding: 0 15px; /* Add padding to match header margins */
  box-sizing: border-box;
  margin-bottom: 2rem; /* Increased from 1.5rem to match other sections */
}

.gallery-container {
  overflow: hidden;
  border-radius: 20px; /* Consistent with header */
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.gallery-wrapper {
  border-radius: 20px !important; /* Consistent with header */
  width: 100%;
  box-sizing: border-box;
  padding: 0.5 !important; /* Remove desktop padding that was cutting off images */
}

.gallery-grid {
  display: flex !important;
  overflow-x: auto !important;
  scroll-snap-type: x mandatory !important;
  gap: 1rem !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 0 !important;
}

.gallery-grid::-webkit-scrollbar {
  height: 6px;
}

.gallery-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.gallery-grid::-webkit-scrollbar-thumb {
  background: rgba(47, 63, 45, 0.6);
  border-radius: 3px;
}

.gallery-item {
  flex-shrink: 0 !important;
  width: 350px !important;
  height: 350px !important;
  scroll-snap-align: center !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
  display: block !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

.gallery-video-container {
  flex-shrink: 0 !important;
  width: 350px !important; /* Increased from 280px */
  height: 350px !important; /* Increased from 280px */
  scroll-snap-align: center !important;
  border-radius: 20px !important; /* Consistent with header */
  overflow: hidden !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
  display: block !important; /* Change back to block */
  position: relative !important; /* Use relative positioning */
}

.gallery-image {
  display: none !important; /* Hide the img element, use background instead */
}

/* Mobile Contact Section - Redesigned Layout */
.contact-section {
  flex-direction: column;
  gap: 1.5rem;
  padding: 0 15px; /* Add padding to match header margins */
  box-sizing: border-box;
  margin-bottom: 2rem; /* Increased from 1.5rem to match other sections */
}

.contact-map {
  width: 100%;
  height: 300px;
  border-radius: 20px; /* Consistent with header */
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  box-sizing: border-box;
}

/* Hide map zoom controls on mobile */
.contact-map .leaflet-control-zoom {
  display: none !important;
}

/* Mobile map popup redesign */
.contact-map .leaflet-popup-content-wrapper {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(15px) !important;
  -webkit-backdrop-filter: blur(15px) !important;
  border-radius: 20px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  padding: 0 !important;
  max-width: 280px !important;
  min-width: 250px !important;
}

.contact-map .leaflet-popup-content {
  margin: 0 !important;
  padding: 1rem !important;
  font-family: var(--font-primary) !important;
  line-height: 1.4 !important;
  color: var(--color-green-dark) !important;
  text-align: center !important;
}

.contact-map .leaflet-popup-content b {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  color: var(--color-green-dark) !important;
  display: block !important;
  margin-bottom: 0.5rem !important;
}

.contact-map .leaflet-popup-content br + br {
  display: none !important;
}

.contact-map .leaflet-popup-content img {
  width: 100% !important;
  max-width: 250px !important;
  height: auto !important;
  max-height: 140px !important;
  object-fit: cover !important;
  border-radius: 15px !important;
  margin-top: 0.75rem !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
  display: block !important;
}

.contact-map .leaflet-popup-tip-container {
  display: none !important;
}

.contact-map .leaflet-popup-close-button {
  background: rgba(47, 63, 45, 0.8) !important;
  color: white !important;
  border-radius: 50% !important;
  width: 28px !important;
  height: 28px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 18px !important;
  font-weight: bold !important;
  line-height: 1 !important;
  top: -8px !important;
  right: -8px !important;
  padding: 0 !important;
  text-decoration: none !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
  transition: all 0.3s ease !important;
}

.contact-map .leaflet-popup-close-button:hover {
  background: rgba(47, 63, 45, 1) !important;
  transform: scale(1.1) !important;
}

.contact-card {
  position: static !important;
  transform: none !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  padding: 1rem !important;
  border-radius: 20px !important; /* Consistent with header */
  background: rgba(255, 255, 255, 0.5) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  box-sizing: border-box !important;
  min-height: auto !important;
}

.contact-title {
  font-size: 1.3rem !important;
  margin-bottom: 1.5rem !important;
  padding: 1rem !important;
  background: rgba(255, 255, 255, 0.5) !important;
  backdrop-filter: blur(12px) !important;
  border-radius: 20px !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
  font-weight: 700 !important;
}

.contact-info {
  gap: 1rem !important;
}

.contact-item {
  padding: 1rem !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, 0.5) !important;
  backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
  text-align: left !important;
  gap: 0 !important;
  transition: all 0.3s ease !important;
}

.contact-item:hover {
  background: rgba(240, 240, 240, 0.7) !important;
}

.contact-item.space-between {
  flex-direction: row !important;
  justify-content: space-between !important;
  gap: 0 !important;
}

.contact-label {
  font-size: 1rem !important;
  margin-right: 1rem !important;
  justify-content: flex-start !important;
  font-weight: 600 !important;
}

.contact-link {
  font-size: 1rem !important;
  padding: 0.5rem 1rem !important;
  border-radius: 12px !important;
  text-align: center !important;
  min-width: 0 !important;
  background: rgba(47, 63, 45, 0.1) !important;
  transition: all 0.3s ease !important;
}

.contact-link:hover {
  color: white !important;
  background: var(--color-green-dark) !important;
}

.contact-socials {
  padding: 1.25rem !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, 0.5) !important;
  backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
  gap: 1.25rem !important;
  margin-top: 0.5rem !important;
  justify-content: center !important;
}

.contact-social-link {
  width: 45px !important;
  height: 45px !important;
  background: rgba(255, 255, 255, 0.8) !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
}

.contact-social-link:hover {
  transform: translateY(-2px) scale(1.05) !important;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15) !important;
  background: var(--color-green-dark) !important;
}

.contact-social-link:hover .contact-social-image {
  filter: brightness(0) invert(1) !important;
}

.contact-social-image {
  width: 22px !important;
  height: 22px !important;
  transition: filter 0.3s ease !important;
}

/* Mobile About Section - Full Width Accordion */
.about-section {
  width: 100%;
  padding: 0 15px; /* Add padding to match header margins */
  box-sizing: border-box;
  margin-bottom: 2rem; /* Increased from 1.5rem to match other sections */
}

.about-content {
  min-height: 200px;
  border-radius: 20px !important; /* Consistent with header */
  box-sizing: border-box;
  padding: 0 !important; /* Remove all padding to eliminate side spacing */
}

.about-container {
  border-radius: 20px !important; /* Consistent with header */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0 !important; /* Remove container padding for full width accordion */
}

.about-toggle {
  font-size: 1.2rem !important;
  font-weight: 600 !important;
  padding: 1.2rem 1.5rem !important;
  border-radius: 20px !important; /* Consistent with header */
  background: rgba(255, 255, 255, 0.8) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  box-sizing: border-box;
  word-wrap: break-word;
  width: 100% !important;
  margin: 0 !important; /* Remove any margin */
}

.about-image {
  border-radius: 20px !important; /* Consistent with header */
  width: 100%;
  height: auto;
  box-sizing: border-box;
  display: block !important;
  margin: 0 !important; /* Remove any margin from image */
}

/* Fix event content border radius */
.event-content {
  border-radius: 20px !important; /* Consistent with header */
  box-sizing: border-box;
}

.event-content img {
  border-radius: 20px !important; /* Consistent with header */
  width: 100%;
  height: auto;
  box-sizing: border-box;
}

.event-button {
  padding: 0.9rem 1.8rem !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  border-radius: 20px !important; /* Consistent with header */
  background: var(--color-green-dark) !important;
  color: white !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
  transition: all 0.3s ease !important;
  box-sizing: border-box;
}

/* Mobile Footer */
.main-footer {
  padding: 1.5rem 15px; /* Add padding to match header margins */
  box-sizing: border-box;
  margin-top: 2rem; /* Increased from 1.5rem for consistent spacing */
}

/* Tablet Responsive Styles - For screens between 600px and 1024px */
@media (min-width: 601px) and (max-width: 1024px) {
  .gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    grid-template-rows: repeat(3, 1fr) !important;
    overflow-x: visible !important;
  }
  
  .gallery-item,
  .gallery-video {
    width: auto !important;
    height: 200px !important;
  }
}

/* Extra small phones - under 480px */
@media (max-width: 480px) {
  .mobile-nav-button {
    font-size: 0.9rem; /* Increased from 0.8rem */
    padding: 10px 14px; /* Increased from 8px 12px */
    height: 36px; /* Increased from 32px */
  }
  
  .mobile-social {
    gap: 8px; /* Increased from 6px */
    height: 36px; /* Increased from 32px */
  }
  
  .mobile-social-icon {
    width: 36px; /* Increased from 32px */
    height: 36px; /* Increased from 32px */
  }
  
  .mobile-social-icon img {
    width: 18px; /* Increased from 16px */
    height: 18px; /* Increased from 16px */
  }
}

/* Very small phones - under 360px */
@media (max-width: 360px) {
  .mobile-nav-button {
    font-size: 0.8rem; /* Increased from 0.7rem */
    padding: 8px 12px; /* Increased from 6px 10px */
    height: 32px; /* Increased from 28px */
  }
  
  .mobile-social {
    gap: 6px; /* Increased from 4px */
    height: 32px; /* Increased from 28px */
  }
  
  .mobile-social-icon {
    width: 32px; /* Increased from 28px */
    height: 32px; /* Increased from 28px */
  }
  
  .mobile-social-icon img {
    width: 16px; /* Increased from 14px */
    height: 16px; /* Increased from 14px */
  }
}