/********** Template CSS **********/
:root {
  /* Updated colors to match aarohi.org earthy green/tan palette */
  --primary: #4a7c59;
  --secondary: #e8f5e9;
  --light: #f8f8f9;
  --dark: #2c3e2d;
  --tan: #b5956e;
  --tan-light: #c9b896;
}

/*** Global Styles ***/
html,
body {
  overflow-x: hidden;
  width: 100%;
  margin: 0;
  padding: 0;
}

/*** Utility Classes ***/
.back-to-top {
  position: fixed;
  display: none;
  right: 30px;
  bottom: 30px;
  z-index: 99;
}

/*** Spinner ***/
#spinner {
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s ease-out, visibility 0s linear .5s;
  z-index: 99999;
}

#spinner.show {
  transition: opacity .5s ease-out, visibility 0s linear 0s;
  visibility: visible;
  opacity: 1;
}

/*** Button Styles ***/
.btn {
  font-weight: 500;
  transition: .5s;
}

.btn.btn-primary,
.btn.btn-outline-primary:hover {
  color: #ffffff;
}

.btn.btn-primary:hover {
  color: var(--primary);
  background: transparent;
}

.btn-square {
  width: 38px;
  height: 38px;
}

.btn-sm-square {
  width: 32px;
  height: 32px;
}

.btn-lg-square {
  width: 48px;
  height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: normal;
}

/*** Layout & Grid ***/
.container-xxl {
  width: 100%;
  padding-right: var(--bs-gutter-x, 0.75rem);
  padding-left: var(--bs-gutter-x, 0.75rem);
  margin-right: auto;
  margin-left: auto;
}

.row {
  --bs-gutter-x: 1.5rem;
  margin-right: calc(-0.5 * var(--bs-gutter-x));
  margin-left: calc(-0.5 * var(--bs-gutter-x));
}

/*** Navigation ***/
.fixed-top {
  transition: .5s;
}

.top-bar {
  height: 45px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.navbar .dropdown-toggle::after {
  border: none;
  content: "\f107";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  vertical-align: middle;
  margin-left: 8px;
}

.navbar .navbar-nav .nav-link {
  margin-right: 30px;
  padding: 25px 0;
  color: #ffffff;
  font-weight: 500;
  outline: none;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
  color: var(--primary);
}

.slide-btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  background-color: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.slide-btn:hover {
  background-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  color: #ffffff;
}

.slider-navigation {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.nav-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: 2px solid white;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.nav-dot.active {
  background-color: white;
  transform: scale(1.2);
}

/*** Breaking News Section ***/
.breaking-box {
  width: 100%;
  overflow: hidden;
}

.breaking-caret {
  display: inline-block;
  background-color: var(--primary);
  padding: 0.5rem 1rem;
}

/*** Responsive Styles ***/
@media (max-width: 991.98px) {
  .navbar .navbar-nav {
    margin-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
    background: var(--dark);
  }

  .navbar .navbar-nav .nav-link {
    padding: 10px 0;
  }
}

@media (max-width: 768px) {
  .modern-slider {
    height: 400px;
  }

  .slide-overlay h2 {
    font-size: 1.8rem;
  }

  .slide-btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .modern-slider {
    height: 300px;
  }

  .slide-overlay {
    padding: 1rem;
  }

  .slide-overlay h2 {
    font-size: 1.4rem;
    margin-top: 1rem;
  }
}

/*** Header ***/
.carousel-caption {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(44, 62, 45, 0.8);
  z-index: 1;
}

.carousel-control-prev,
.carousel-control-next {
  width: 15%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 3rem;
  height: 3rem;
  background-color: var(--dark);
  border: 12px solid var(--dark);
  border-radius: 3rem;
}

/*** Causes ***/
.causes-item .progress {
  height: 5px;
  border-radius: 0;
  overflow: visible;
}

.causes-item .progress .progress-bar {
  position: relative;
  overflow: visible;
  width: 0px;
  border-radius: 0;
  transition: 5s;
}

.causes-item .progress .progress-bar span {
  position: absolute;
  top: -7px;
  right: 0;
  width: 40px;
  height: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  background: var(--primary);
  color: #ffffff;
}

.causes-item .progress .progress-bar:before {
  content: "";
  position: absolute;
  top: -15px;
  right: 0;
  border-style: solid;
  border-width: 0 0 7px 7px;
  border-color: transparent transparent var(--primary) transparent;
}

.causes-item .causes-overlay {
  position: absolute;
  width: 100%;
  height: 0;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  overflow: hidden;
  opacity: 0;
  transition: .5s;
}

.causes-item:hover .causes-overlay {
  height: 100%;
  opacity: 1;
}

/*** Service ***/
.service-item {
  box-shadow: 0 0 45px rgba(0, 0, 0, 0.06);
}

/*** Donate ***/
.donate {
  background: rgba(44, 62, 45, 0.8);
}

.btn-group .btn-light:hover,
.btn-group input[type="radio"]:checked + label {
  color: var(--primary);
  border-color: var(--primary);
}

/*** Team ***/
.team-item img {
  position: relative;
  top: 0;
  transition: .5s;
}

.team-item:hover img {
  top: -30px;
}

.team-item .team-text {
  position: relative;
  height: 100px;
  transition: .5s;
}

.team-item:hover .team-text {
  margin-top: -60px;
  height: 160px;
}

.team-item .team-text .team-social {
  opacity: 0;
  transition: .5s;
}

.team-item:hover .team-text .team-social {
  opacity: 1;
}

.team-item .team-social .btn {
  display: inline-flex;
  color: var(--primary);
  background: #ffffff;
  border-radius: 40px;
}

.team-item .team-social .btn:hover {
  color: #ffffff;
  background: var(--primary);
}

/*** Testimonial ***/
.testimonial-carousel::before {
  position: absolute;
  content: "";
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
  z-index: 1;
}

.testimonial-carousel::after {
  position: absolute;
  content: "";
  top: 0;
  right: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(to left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
  z-index: 1;
}

@media (min-width: 768px) {
  .testimonial-carousel::before,
  .testimonial-carousel::after {
    width: 200px;
  }
}

@media (min-width: 992px) {
  .testimonial-carousel::before,
  .testimonial-carousel::after {
    width: 300px;
  }
}

.testimonial-carousel .owl-item .testimonial-text {
  background: var(--light);
  transform: scale(0.8);
  transition: .5s;
}

.testimonial-carousel .owl-item.center .testimonial-text {
  background: var(--primary);
  transform: scale(1);
}

.testimonial-carousel .owl-item .testimonial-text *,
.testimonial-carousel .owl-item .testimonial-item img {
  transition: .5s;
}

.testimonial-carousel .owl-item.center .testimonial-text * {
  color: var(--light) !important;
}

.testimonial-carousel .owl-item.center .testimonial-item img {
  background: var(--primary) !important;
}

.testimonial-carousel .owl-nav {
  position: absolute;
  width: 350px;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: space-between;
  opacity: 0;
  transition: .5s;
  z-index: 1;
}

.testimonial-carousel:hover .owl-nav {
  width: 300px;
  opacity: 1;
}

.testimonial-carousel .owl-nav .owl-prev,
.testimonial-carousel .owl-nav .owl-next {
  position: relative;
  color: var(--primary);
  font-size: 45px;
  transition: .5s;
}

.testimonial-carousel .owl-nav .owl-prev:hover,
.testimonial-carousel .owl-nav .owl-next:hover {
  color: var(--dark);
}

/*** Footer ***/
.footer .btn.btn-link {
  display: block;
  margin-bottom: 5px;
  padding: 0;
  text-align: left;
  color: rgba(255, 255, 255, 0.5);
  font-weight: normal;
  text-transform: capitalize;
  transition: .3s;
}

.footer .btn.btn-link::before {
  position: relative;
  content: "\f105";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  color: rgba(255, 255, 255, 0.5);
  margin-right: 10px;
}

.footer .btn.btn-link:hover {
  color: var(--light);
  letter-spacing: 1px;
  box-shadow: none;
}

.footer .btn.btn-square {
  color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.footer .btn.btn-square:hover {
  color: var(--secondary);
  border-color: var(--light);
}

.footer .copyright {
  padding: 25px 0;
  font-size: 15px;
  border-top: 1px solid rgba(256, 256, 256, 0.1);
}

.footer .copyright a {
  color: var(--secondary);
}

.footer .copyright a:hover {
  color: var(--primary);
}

/* Updated events background to use secondary color */
.events-background {
  background-color: #e8f5e9;
}

/*** Donation Form Specific Styles ***/
.donation-page {
  background-color: #f8f9fa;
}

.donation-content {
  padding-right: 30px;
}

.donation-content .badge {
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.donation-form-container {
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.donation-form-container:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05) !important;
  transform: translateY(-5px);
}

/*** Donation Amount Selector ***/
.donation-amount-selector .btn-group {
  margin-bottom: 10px;
}

.donation-amount-selector .btn-outline-primary {
  padding: 10px 15px;
  margin: 0 5px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

/* Updated donation button hover to primary green */
.donation-amount-selector .btn-outline-primary:hover {
  background-color: #4a7c59;
  color: white;
}

/* Updated checked donation button to primary green */
.donation-amount-selector .btn-check:checked + .btn-outline-primary {
  background-color: #4a7c59;
  color: white;
  border-color: #4a7c59;
}

/*** Custom Amount Input ***/
#custom_amount {
  display: none;
}

.donation-amount-selector .btn-check:checked ~ #custom_amount {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/*** Tax Exemption Styles ***/
.tax-exemption-section .form-check {
  margin-right: 15px;
}

.tax-exemption-section .form-check-input:checked {
  background-color: #007bff;
  border-color: #007bff;
}

/*** Form Input Enhancements ***/
.form-floating > .form-control {
  height: 56px;
  border-radius: 10px;
}

.form-floating > textarea.form-control {
  height: auto;
  min-height: 120px;
}

/*** Responsive Adjustments ***/
@media (max-width: 768px) {
  .donation-content {
    padding-right: 0;
    text-align: center;
    margin-bottom: 30px;
  }

  .donation-amount-selector .btn-group {
    flex-direction: column;
  }

  .donation-amount-selector .btn-outline-primary {
    margin: 5px 0;
    width: 100%;
  }
}

/*** Error Handling ***/
.was-validated .form-control:invalid {
  border-color: #dc3545;
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-control:valid {
  border-color: #198754;
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/*** Mobile Sidebar (Offcanvas) Styles ***/
.offcanvas-start {
  width: 250px;
}

.offcanvas-header {
  background: var(--dark);
  color: var(--light);
}

.offcanvas-body {
  padding: 0;
  background: var(--light);
}

.offcanvas-body .list-group {
  padding: 10px 0;
}

.offcanvas-body .list-group-item {
  color: var(--dark);
  padding: 10px 20px;
  font-size: 16px;
  border: none;
}

.offcanvas-body .list-group-item:hover {
  background-color: var(--primary);
  color: #fff;
}

/*** Button for toggling mobile menu ***/
.btn.btn-primary.d-md-none {
  width: 100%;
  font-size: 16px;
  padding: 15px;
  display: flex;
  justify-content: space-between;
}

/*** Icon styling inside the offcanvas ***/
.offcanvas-body .list-group-item i {
  margin-right: 10px;
}

/*** Mobile Navigation Menu Styles ***/
@media (max-width: 767px) {
  body {
    padding-bottom: 80px;
  }

  .offcanvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
  }

  .offcanvas .offcanvas-body {
    overflow-y: auto;
  }

  .list-group-item.active {
    background-color: var(--primary);
    color: #fff;
  }

  .offcanvas-body .list-group-item {
    padding: 12px 20px;
    font-size: 16px;
  }

  .offcanvas-body .list-group-item {
    transition: background-color 0.3s ease, color 0.3s ease;
  }

  .offcanvas-body .list-group-item:hover {
    background-color: var(--primary);
    color: #fff;
  }
}

/*** Bottom Mobile Navigation ***/
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--dark);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
  z-index: 1030;
  padding: 8px 0;
}

.mobile-nav-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
}

.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  color: var(--secondary);
  text-decoration: none;
  font-size: 0.875rem;
  position: relative;
  border: none;
  background: none;
  cursor: pointer;
}

.mobile-nav-item:hover {
  color: var(--primary);
}

.mobile-nav-item.active {
  color: var(--primary);
}

.mobile-nav-item i {
  font-size: 1.5rem;
  margin-bottom: 2px;
}

.mobile-nav-label {
  font-size: 0.75rem;
  text-align: center;
}

.active-indicator {
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
}

/*** Adjustments for dropdown items in mobile navigation ***/
.mobile-nav-more {
  background: none;
  border: none;
  color: var(--secondary);
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.dropdown-menu {
  border-radius: 8px;
  margin-bottom: 8px;
  background: var(--dark);
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}

.dropdown-item {
  color: var(--secondary);
  padding: 10px 16px;
}

.dropdown-item:hover {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.1);
}

/*** Base story section styles ***/
.story-section {
  position: relative;
  padding: 0.5rem 0;
  margin-bottom: 1rem;
}

/*** Story container styles ***/
.story-container {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 0.5rem 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/*** Hide scrollbar for Chrome/Safari/Opera ***/
.story-container::-webkit-scrollbar {
  display: none;
}

/*** Individual story card styles ***/
.story-card {
  flex: 0 0 auto;
  width: 100px;
  border: none !important;
  transition: transform 0.2s ease;
}

.story-card:hover {
  transform: scale(1.05);
}

/*** Story image styles ***/
.story-card .card-img-top {
  height: 140px;
  object-fit: cover;
  border-radius: 10px !important;
  margin-bottom: 0.5rem;
}

/*** Plus icon container ***/
.plus-icon-container {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 50%);
  background-color: var(--bs-primary);
  color: white;
  border-radius: 50%;
  padding: 0.25rem;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/*** Story title styles ***/
.story-card .card-body {
  padding: 0.25rem !important;
}

.story-card .small {
  font-size: 0.75rem;
  margin-bottom: 0;
}

/*** Navigation buttons (for desktop) ***/
.story-nav-btn {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  align-items: center;
  justify-content: center;
}

.story-nav-btn:hover {
  background: white;
}

.story-nav-left {
  left: -16px;
}

.story-nav-right {
  right: -16px;
}

/*** Responsive breakpoints ***/
@media (max-width: 576px) {
  .story-card {
    width: 80px;
  }

  .story-card .card-img-top {
    height: 120px;
  }

  .plus-icon-container {
    width: 20px;
    height: 20px;
  }
}

@media (min-width: 768px) {
  .story-section {
    padding: 0 1rem;
  }

  .story-nav-btn {
    display: flex;
  }

  .story-container {
    padding: 0.5rem 1.5rem;
  }
}

@media (min-width: 992px) {
  .story-card {
    width: 120px;
  }

  .story-card .card-img-top {
    height: 160px;
  }
}

/*** Touch device optimization ***/
@media (hover: none) {
  .story-card:hover {
    transform: none;
  }
}

/*** Blog Section Styling ***/
.blog-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  transition: all 0.3s ease-in-out;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

.blog-item img {
  transition: transform 0.3s ease;
}

.blog-item:hover img {
  transform: scale(1.1);
}

.blog-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-item:hover .blog-overlay {
  opacity: 1;
}

.blog-overlay h5 {
  font-size: 1.2rem;
  font-weight: bold;
  text-transform: uppercase;
  text-align: center;
}

.blog-item p {
  font-size: 0.9rem;
  color: #6c757d;
  margin: 15px 0;
}

.blog-item .btn-link {
  text-transform: uppercase;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--primary);
}

.blog-item .btn-link:hover {
  text-decoration: underline;
  color: var(--dark);
}

/*** About Section Styles ***/
.about-section {
  background-color: #ffffff;
  padding: 4rem 0;
}

/*** Image Container Styles ***/
.about-images {
  transform: translateZ(0);
  position: relative;
  margin-bottom: 2rem;
}

.about-images .main-image {
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-images .main-image img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.floating-image {
  transition: transform 0.3s ease;
  z-index: 2;
  position: absolute;
  width: 200px;
  right: -30px;
  bottom: -30px;
}

.floating-image img {
  border: 4px solid #fff;
  border-radius: 0.75rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.about-images:hover .floating-image {
  transform: translate(-10px, -10px);
}

/*** Quote Styles ***/
.founder-quote {
  position: relative;
  background-color: #f8f9fa;
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.founder-quote::before {
  content: '"';
  position: absolute;
  top: -20px;
  left: 20px;
  font-size: 60px;
  color: #f8f9fa;
  font-family: serif;
  z-index: 0;
}

/*** Badge Styles ***/
.badge {
  font-weight: 500;
  letter-spacing: 1px;
  padding: 0.5rem 1.5rem;
  font-size: 0.875rem;
}

/*** Button Styles - Enhanced for Mobile Consistency ***/
.about-section .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  text-align: center;
  border-radius: 0.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.about-section .btn:active {
  transform: translateY(0);
}

.about-section .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/*** Media Queries for Responsive Design ***/
@media (max-width: 991.98px) {
  .about-images .main-image img {
    height: 400px;
  }

  .floating-image {
    width: 150px;
    right: -15px;
    bottom: -15px;
  }
}

@media (max-width: 767.98px) {
  .about-section {
    padding: 3rem 0;
  }

  .about-section .btn {
    width: 100%;
    margin-bottom: 1rem;
  }

  .about-images {
    margin-bottom: 3rem;
  }
}

/*** Touch Device Optimizations ***/
@media (hover: none) {
  .about-section .btn:hover {
    transform: none;
    box-shadow: none;
  }

  .about-images:hover .floating-image {
    transform: none;
  }
}

/*** Ensure Button Consistency ***/
.about-section .btn-primary,
.about-section .btn-outline-primary {
  position: relative;
  overflow: hidden;
  width: auto;
  min-width: 160px;
}

/*** Focus States for Accessibility ***/
.about-section .btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.25);
}

/*** Active States ***/
.about-section .btn:active {
  transform: translateY(1px);
  box-shadow: none;
}

/*** Button Container Styles ***/
.about-section .btn-container {
  display: flex;
  gap: 1rem;
  flex-wrap: nowrap;
  margin-top: 2rem;
}

/*** Base Button Styles ***/
.about-section .btn {
  flex: 0 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  text-align: center;
  border-radius: 0.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  min-width: 150px;
}

/*** Button Hover Effects ***/
.about-section .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/*** Media Queries ***/
@media (max-width: 767.98px) {
  .about-section .btn-container {
    flex-direction: row;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 1rem;
  }

  .about-section .btn {
    flex: 0 0 auto;
    width: auto;
    margin-bottom: 0;
  }
}

/*** Ensure consistent width for both buttons ***/
.about-section .btn-primary,
.about-section .btn-outline-primary {
  flex-basis: auto;
  min-width: 150px;
}

/*** Page Header ***/
.page-header {
  background: linear-gradient(rgba(44, 62, 45, 0.8), rgba(44, 62, 45, 0.8)), url(../img/carousel-1.jpg) center center
    no-repeat;
  background-size: cover;
  padding: 8rem 0;
  margin-bottom: 5rem;
}

.page-header .display-4 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.page-header .breadcrumb {
  display: flex;
  justify-content: center;
  margin-bottom: 0;
}

.page-header .breadcrumb-item {
  font-size: 1.1rem;
  font-weight: 500;
}

.page-header .breadcrumb-item + .breadcrumb-item::before {
  color: #ffffff;
  content: "\f105";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
}

.page-header .breadcrumb-item.active {
  color: var(--primary);
}

.page-header .breadcrumb-item a {
  color: #ffffff;
  transition: .5s;
}

.page-header .breadcrumb-item a:hover {
  color: var(--primary);
}

@media (max-width: 768px) {
  .page-header {
    padding: 6rem 0 !important;
    margin-bottom: 3rem;
  }

  .page-header .display-4 {
    font-size: 2rem;
    margin-bottom: 1rem;
  }

  .page-header .breadcrumb-item {
    font-size: 1rem;
  }
}

/* Ensure consistent rendering for PDF generation on mobile */
#receipt {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  box-sizing: border-box;
  overflow: visible !important;
}

/* Force consistent font rendering and prevent mobile-specific scaling issues */
#receipt * {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transform: none !important;
}

/* Ensure images and QR code are properly scaled */
#receipt img,
#receipt canvas {
  max-width: 100%;
  height: auto;
}

/* Fix for mobile-specific overflow issues */
.card-body {
  overflow: visible !important;
}

/* Ensure tables don't break layout on mobile */
.table {
  width: 100%;
  table-layout: fixed;
}

/* Media query to adjust for smaller screens */
@media screen and (max-width: 768px) {
  #receipt {
    width: 100%;
    font-size: 14px;
  }

  .card-header {
    padding: 15px !important;
  }

  .card-body {
    padding: 15px !important;
  }

  .table th,
  .table td {
    font-size: 12px;
    padding: 8px;
  }

  #qrcode {
    width: 100px !important;
    height: 100px !important;
  }
}

/* Optimize Posts Feed Container */
.posts-feed-container {
  max-height: 1180px;
  overflow-y: auto;
  padding-right: 10px;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  will-change: scroll-position;
}

/* Smooth Scrollbar Styling */
.posts-feed-container::-webkit-scrollbar {
  width: 8px;
}

.posts-feed-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.posts-feed-container::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
  transition: background 0.3s ease;
}

.posts-feed-container::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Optimize Card Rendering */
.card {
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Reduce Animation Overhead */
.like-btn,
.comment-btn,
.share-btn {
  transition: background-color 0.2s ease;
}

/* Optimize Images */
img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
  will-change: transform;
}

/* General Performance Boost */
body {
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/*** ========================================= ***/
/*** NEW HOMEPAGE SECTIONS - Aarohi Style ***/
/*** ========================================= ***/

/*** About Home Section ***/
.about-home-section {
  background-color: #ffffff;
}

.about-home-section .about-image-wrapper img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  border-radius: 10px;
}

.about-home-section .about-content p {
  font-size: 1rem;
  line-height: 1.8;
  color: #666;
}

/*** Core Interventions Section ***/
.core-interventions-section {
  background-color: #ffffff;
}

.core-interventions-section .section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #333;
  letter-spacing: 1px;
}

.intervention-box {
  display: block;
  text-align: center;
  padding: 20px 15px;
  border: 1px dashed #ccc;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: #fff;
}

.intervention-box:hover {
  border-color: var(--primary);
  box-shadow: 0 5px 20px rgba(74, 124, 89, 0.15);
  transform: translateY(-5px);
}

/* NEW: Wrapper for intervention image to ensure it doesn't crop */
.intervention-img-wrapper {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden; /* Contains the image */
    background: #f9f9f9;
}

.intervention-img-wrapper img {
  width: 100%;
  height: 100%;
  /* CRITICAL: Ensures the whole image is visible without cropping */
  object-fit: contain; 
}

/* Removing old intervention-img style */
/* .intervention-img {
  width: 120px;
  height: 120px;
  margin: 0 auto 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  background: #f9f9f9;
}

.intervention-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
} */

.intervention-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
}

/*** Blog Home Section ***/
.blog-home-section {
  background-color: var(--light);
}

.blog-home-section .section-subtitle {
  display: block;
  font-size: 0.9rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.blog-home-section .section-title-alt {
  font-size: 2rem;
  font-weight: 700;
  color: var(--tan);
  letter-spacing: 1px;
}

.blog-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  height: 100%;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.blog-card-img {
  height: 200px;
  overflow: hidden;
}

.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-img img {
  transform: scale(1.05);
}

.blog-card-body {
  padding: 20px;
}

.blog-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
  line-height: 1.4;
}

.blog-card-text {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 15px;
  line-height: 1.6;
}

.blog-read-more {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  transition: color 0.3s ease;
}

.blog-read-more:hover {
  color: var(--dark);
  text-decoration: underline;
}

/*** Get Involved Section ***/
.get-involved-section {
  background-color: var(--tan);
}

.get-involved-section .section-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.involved-box {
  display: block;
  text-align: center;
  padding: 30px 20px;
  transition: all 0.3s ease;
}

.involved-box:hover {
  transform: translateY(-5px);
}

.involved-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.involved-icon img {
  max-width: 60px;
  max-height: 60px;
  filter: brightness(0) invert(1);
}

.involved-title {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0;
}

/*** Work Education Table (from aarohi reference) ***/
.listOutlets.education {
  margin-top: 30px;
}

table.workEducation {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

table.workEducation thead tr {
    background: var(--primary);
    color: #fff;
}

table.workEducation th {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 15px 20px;
    font-size: 0.9rem;
}

table.workEducation td {
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  font-size: 0.95rem;
  color: #555;
  vertical-align: top;
}

table.workEducation tr:nth-child(even) {
  background: #f9f9f9;
}

table.workEducation tr:hover:not(:first-child) {
  background: var(--secondary);
}

@media (max-width: 768px) {
  table.workEducation {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  table.workEducation td {
    padding: 12px 15px;
    font-size: 0.85rem;
  }
}

/* --- NEW Service Sub Navigation Styles (services.php) --- */

.service-sub-nav {
    background-color: var(--light) !important;
    border-bottom: 1px solid #e0e0e0;
}

.service-tabs {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-item-service {
    margin: 5px;
}

.nav-item-service .btn-outline-primary {
    border-radius: 50px; /* Pill shape */
    padding: 8px 20px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--primary);
    border: 1px solid var(--primary);
    transition: all 0.3s ease;
}

.nav-item-service .btn-outline-primary:hover,
.nav-item-service .btn-outline-primary.active {
    background-color: var(--primary);
    color: white;
}

/* Service Hero Section */
.service-hero {
    padding: 3rem 0;
}

/* Service Page Banner - Same Width as Content Area */
.service-banner-wrapper {
    width: 100%;
    height: auto;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin: 0 auto;
    padding: 0;
    background-color: #f8f8f9;
}

.service-banner-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    max-width: 100%;
}

@media (max-width: 767.98px) {
  .intervention-img-wrapper {
    width: 80px;
    height: 80px;
  }

  .intervention-title {
    font-size: 0.8rem;
  }

  .service-banner-wrapper {
    /* Adjusted aspect ratio for mobile view */
    aspect-ratio: 4 / 3; 
    max-height: 250px;
  }
}

/*** Responsive Adjustments for New Sections ***/
@media (max-width: 991.98px) {
  .intervention-img-wrapper {
    width: 100px;
    height: 100px;
  }

  .blog-home-section .section-title-alt {
    font-size: 1.5rem;
  }
}

@media (max-width: 767.98px) {
  .core-interventions-section .section-title,
  .get-involved-section .section-title {
    font-size: 1.5rem;
  }

  .intervention-box {
    padding: 15px 10px;
  }

  .intervention-img-wrapper {
    width: 80px;
    height: 80px;
  }

  .intervention-title {
    font-size: 0.8rem;
  }

  .involved-icon {
    width: 80px;
    height: 80px;
  }

  .involved-icon img {
    max-width: 45px;
    max-height: 45px;
  }

  .involved-title {
    font-size: 0.85rem;
  }

  .blog-card-img {
    height: 160px;
  }
}