/* Custom CSS for Baraka Community Centre*/

:root {
  --primary-color: #007a33;
  --primary-dark: #005a26;
  --primary-light: #00a344;
  --brown-accent: #8b4513;
  --brown-light: #d2b48c;
  --white: #ffffff;
  --light-gray: #f8f9fa;
  --dark-gray: #6c757d;
  --text-dark: #212529;
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  padding-top: 76px; /* Account for fixed navbar */
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.display-4,
.display-5 {
  font-weight: 700;
}

p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.lead {
  font-size: 1.1rem;
  font-weight: 400;
}

/* Custom Colors */
.text-primary {
  color: var(--primary-color) !important;
}

.bg-primary {
  background-color: var(--primary-color) !important;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 122, 51, 0.3);
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
  font-weight: 500;
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* Navigation */
.navbar {
  padding: 1rem 0;
  transition: all 0.3s ease;
}

/* Added scrolled navbar styles */
.navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color) !important;
}

.navbar-nav .nav-link {
  font-weight: 500;
  color: var(--text-dark) !important;
  margin: 0 0.5rem;
  padding: 0.5rem 1rem !important;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--primary-color) !important;
  background-color: rgba(0, 122, 51, 0.1);
}

.dropdown-menu {
  border: none;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  border-radius: 0.5rem;
}

.dropdown-item {
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.dropdown-item:hover {
  background-color: rgba(0, 122, 51, 0.1);
  color: var(--primary-color);
}

/* Hero Section */
.hero-section {
  position: relative;
  overflow: hidden;
}

.hero-slide {
  height: 70vh;
  min-height: 500px;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.carousel-item {
  transition: transform 1s ease-in-out;
}

.carousel-indicators button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 4px;
}

.carousel-control-prev,
.carousel-control-next {
  width: 5%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 2rem;
  height: 2rem;
}

/* Cards */
.card {
  border-radius: 1rem;
  transition: all 0.3s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.15) !important;
}

.card-img-top {
  height: 250px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card:hover .card-img-top {
  transform: scale(1.05);
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Sections */
section {
  position: relative;
}

.bg-light {
  background-color: var(--light-gray) !important;
}

/* Testimonials */
.bg-primary .bi-quote {
  opacity: 0.3;
}

/* Forms */
.form-control {
  border-radius: 0.5rem;
  border: 2px solid #e9ecef;
  padding: 0.75rem 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 122, 51, 0.25);
}

/* Added enhanced form validation styles */
.form-control.is-invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-control.is-valid {
  border-color: #198754;
  box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

.invalid-feedback {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #dc3545;
}

.was-validated .form-control:valid {
  border-color: #198754;
}

.was-validated .form-control:invalid {
  border-color: #dc3545;
}

/* Added donation amount button styles */
.amount-btn {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background-color: transparent;
  transition: all 0.3s ease;
  font-weight: 600;
}

.amount-btn:hover,
.amount-btn.active {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 122, 51, 0.3);
}

/* Added event filter button styles */
.event-filter-btn {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background-color: transparent;
  margin: 0.25rem;
  transition: all 0.3s ease;
}

.event-filter-btn:hover,
.event-filter-btn.active {
  background-color: var(--primary-color);
  color: white;
}

/* Added modal enhancements */
.modal-content {
  border-radius: 1rem;
  border: none;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

.modal-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
  border-radius: 1rem 1rem 0 0;
}

.modal-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.125);
  border-radius: 0 0 1rem 1rem;
}

/* Added notification styles */
.alert {
  border-radius: 0.75rem;
  border: none;
  font-weight: 500;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.alert-success {
  background-color: #d1e7dd;
  color: #0a3622;
}

.alert-danger {
  background-color: #f8d7da;
  color: #58151c;
}

.alert-info {
  background-color: #cff4fc;
  color: #055160;
}

/* Added counter animation styles */
.counter {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  display: block;
}

/* Added stagger animation for cards */
.card.fade-in {
  animation-delay: var(--animation-delay, 0s);
}

.card:nth-child(1) {
  --animation-delay: 0.1s;
}
.card:nth-child(2) {
  --animation-delay: 0.2s;
}
.card:nth-child(3) {
  --animation-delay: 0.3s;
}
.card:nth-child(4) {
  --animation-delay: 0.4s;
}
.card:nth-child(5) {
  --animation-delay: 0.5s;
}
.card:nth-child(6) {
  --animation-delay: 0.6s;
}

/* Added loading button states */
.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

.btn.loading {
  position: relative;
  color: transparent !important;
}

.btn.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Added resource search styles */
.resource-item {
  transition: all 0.3s ease;
}

.resource-item:hover {
  background-color: rgba(0, 122, 51, 0.05);
}

/* Added emergency resources styling */
.card.border-danger {
  border-color: #dc3545 !important;
  border-width: 2px;
}

.card-header.bg-danger {
  background-color: #dc3545 !important;
}

/* Footer */
footer {
  background-color: #1a1a1a !important;
}

footer h5,
footer h6 {
  color: var(--white);
  margin-bottom: 1rem;
}

footer p,
footer small {
  color: #adb5bd;
  line-height: 1.6;
}

footer a {
  transition: all 0.3s ease;
}

footer a:hover {
  color: var(--primary-light) !important;
  transform: translateY(-2px);
}

footer .bi {
  transition: all 0.3s ease;
}

footer .bi:hover {
  transform: scale(1.2);
}

/* Accessibility */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Enhanced focus styles for better accessibility */
.btn:focus,
.form-control:focus,
.nav-link:focus,
.dropdown-item:focus,
.amount-btn:focus,
.event-filter-btn:focus {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

/* Skip link styles */
.visually-hidden-focusable:focus {
  position: static !important;
  width: auto !important;
  height: auto !important;
  padding: 0.5rem 1rem !important;
  margin: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  white-space: normal !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-slide {
    height: 60vh;
    min-height: 400px;
  }

  .display-4 {
    font-size: 2rem;
  }

  .display-5 {
    font-size: 1.75rem;
  }

  .navbar-brand {
    font-size: 1.25rem;
  }

  .card-body {
    padding: 1rem;
  }

  .btn-lg {
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
  }

  /* Mobile-specific donation button styles */
  .amount-btn {
    margin-bottom: 0.5rem;
    width: 100%;
  }

  /* Mobile notification positioning */
  .alert.position-fixed {
    left: 10px !important;
    right: 10px !important;
    min-width: auto !important;
  }
}

@media (max-width: 576px) {
  body {
    padding-top: 70px;
  }

  .hero-slide {
    height: 50vh;
    min-height: 350px;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .display-4 {
    font-size: 1.75rem;
  }

  .btn-lg {
    display: block;
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .btn-lg:last-child {
    margin-bottom: 0;
  }

  /* Mobile counter styles */
  .counter {
    font-size: 2rem;
  }
}

/* Animation Classes */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Added slide-in animation variants */
.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.6s ease;
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.6s ease;
}

.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Added scale animation */
.scale-in {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.6s ease;
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* Print Styles */
@media print {
  .navbar,
  .carousel-control-prev,
  .carousel-control-next,
  .carousel-indicators,
  footer {
    display: none !important;
  }

  body {
    padding-top: 0;
  }

  .hero-slide {
    height: auto;
    min-height: auto;
    background: none !important;
  }

  .card {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #dee2e6;
  }
}
