/********** Template CSS **********/
:root {
  --primary: #8e0003;
  --secondary: #f5c7c4;
  --light: #f8f8f9;
  --dark: #1c1c1c;
}
body,
html {
  overflow-x: hidden;
}

.back-to-top {
  position: fixed;
  display: none;
  right: 30px;
  bottom: 30px;
  z-index: 99;
}

/*** Spinner ***/
#spinner {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-out, visibility 0s linear 0.5s;
  z-index: 99999;
}

#spinner.show {
  transition: opacity 0.5s ease-out, visibility 0s linear 0s;
  visibility: visible;
  opacity: 1;
}

/*** Button ***/
.btn {
  font-weight: 500;
  transition: 0.5s;
}

.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;
}

/*** Navbar ***/
.fixed-top {
  transition: 0.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);
}

@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 (min-width: 992px) {
  .navbar .nav-item .dropdown-menu {
    display: block;
    visibility: hidden;
    top: 100%;
    transform: rotateX(-75deg);
    transform-origin: 0% 0%;
    transition: 0.5s;
    opacity: 0;
  }

  .navbar .nav-item:hover .dropdown-menu {
    transform: rotateX(0deg);
    visibility: visible;
    transition: 0.5s;
    opacity: 1;
  }
}

/*** Header ***/
.carousel-caption {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(0, 29, 35, 0.8);
  z-index: 1;
}
.back-to-top{
  color:white !important;
}

.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;
}

@media (max-width: 768px) {
  #header-carousel .carousel-item {
    position: relative;
    min-height: 450px;
  }

  #header-carousel .carousel-item img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.page-header {
  padding-top: 12rem;
  padding-bottom: 6rem;
  background: linear-gradient(rgba(0, 29, 35, 0.8), rgba(0, 29, 35, 0.8)),
    url(../img/carousel-1.jpg) center center no-repeat;
  background-size: cover;
}

.page-header .breadcrumb-item + .breadcrumb-item::before {
  color: #999999;
}

/*** 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 .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: 0.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: linear-gradient(135deg, #8e0003, #d29fa0);
}
.btn-group .btn-light:hover,
.btn-group input[type="radio"]:checked + label {
  color: var(--primary);
  border-color: var(--primary);
}

/*** Team ***/
/* Center card properly */
.team-item {
  display: flex;
  flex-direction: column;
  align-items: center; /* centers fixed width content */
  background: #fff;
  overflow: hidden;
  transition: 0.3s ease;
}

/* Image wrapper */
.team-img {
  width: 230px;   /* fixed width */
  height: 250px;
  overflow: hidden;
}

/* Image */
.team-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;  /* IMPORTANT - no distortion */
  transition: transform 0.5s ease;
}

/* Zoom animation */
.team-item:hover .team-img img {
  transform: scale(1.1);
}

/* Text section */
.team-item .team-text {
  width: 230px;        /* SAME as image width */
  padding: 20px;
  background: #f8f9fa;
  text-align: center;
  transition: 0.3s ease;
}

/* Smooth card hover shadow */

/*** 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: 0.5s;
}

.testimonial-carousel .owl-item.center .testimonial-text {
  color:white !important;
  background: var(--primary);
  transform: scale(1);
}

.testimonial-carousel .owl-item .testimonial-text *,
.testimonial-carousel .owl-item .testimonial-item img {
  transition: 0.5s;
}

.testimonial-carousel .owl-item.center .testimonial-text * {
  color: white !important;
}

.testimonial-carousel .owl-item.center .testimonial-item img {
  background: var(--primary) !important;
}

/* OWL TESTIMONIAL ARROWS – SINGLE SOURCE OF TRUTH */
.testimonial-carousel {
  position: relative;
}

/* Desktop default: arrows vertically centered, left/right */
.testimonial-carousel .owl-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 5; /* above gradients */
}

.testimonial-carousel .owl-nav .owl-prev,
.testimonial-carousel .owl-nav .owl-next {
  pointer-events: auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease,
    box-shadow 0.3s ease;
}

/* push slightly outside edges on desktop */
.testimonial-carousel .owl-nav .owl-prev {
  margin-left: 0px;
}

.testimonial-carousel .owl-nav .owl-next {
  margin-right: 0px;
}

.testimonial-carousel .owl-nav .owl-prev:hover,
.testimonial-carousel .owl-nav .owl-next:hover {
  background: var(--primary);
  color: #ffffff;
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Mobile: arrows below carousel, centered */
@media (max-width: 768px) {
  .testimonial-carousel .owl-nav {
    top: auto;
    bottom: 70px;
    transform: translateX(-50%);
    left: 30%;
    right: auto;
    width: 120px !important;
    justify-content: space-between;
  }

  .testimonial-carousel .owl-nav .owl-prev,
  .testimonial-carousel .owl-nav .owl-next {
    width: 28px;
    height: 28px;
    font-size: 16px;
    margin: 0;
  }

  /* Center testimonial cards on mobile */
  .testimonial-carousel .owl-stage-outer {
    margin: 0 auto;
  }
  .testimonial-carousel .owl-item {
    display: flex;
    justify-content: center;
  }
  .testimonial-carousel .testimonial-item {
    margin-left: auto;
    margin-right: auto;
  }

  /* Use full width of owl-stage-outer for testimonials, but keep content centered visually */
  .testimonial-carousel .owl-stage-outer {
    width: 100%;
  }
  .testimonial-carousel .owl-stage {
    display: flex;
  }
  .testimonial-carousel .owl-item {
    display: flex;
    justify-content: center;
    width: 100%;
  }
  .testimonial-carousel .testimonial-item {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
  .testimonial-carousel .testimonial-text {
    margin-left: auto;
    margin-right: auto;
  }

  /* Ensure nav uses fixed width so both arrows are visible */
  .testimonial-carousel .owl-nav {
    width: 120px;
  }
}
.testimonial-carousel .owl-stage-outer {
  width: 100%;
}

.testimonial-carousel .owl-stage {
  display: flex;
  width: 100%;
}
.testimonial-carousel .owl-item {
  display: flex;
  justify-content: center;
  width: 100%;
}
.testimonial-carousel .testimonial-item {
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/*** 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: 0.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);
}

.certificate-wrapper {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.certificate-img {
  border-radius: 6px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Stamp Style */
.stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(2) rotate(-25deg);
  padding: 20px 30px;
  border: 5px solid #c79b3a;
  color: #c79b3a;
  font-weight: 800;
  font-size: 22px;
  text-transform: uppercase;
  text-align: center;
  border-radius: 10px;
  opacity: 0;
  background: rgba(255, 255, 255, 0.8);
  animation: stampIn 1.2s ease-out forwards;
  animation-delay: 0.8s;
}

/* Stamp Animation */
@keyframes stampIn {
  0% {
    transform: translate(-50%, -50%) scale(3) rotate(-45deg);
    opacity: 0;
  }
  60% {
    transform: translate(-50%, -50%) scale(0.9) rotate(-20deg);
    opacity: 1;
  }
  80% {
    transform: translate(-50%, -50%) scale(1.05) rotate(-25deg);
  }
  100% {
    transform: translate(-50%, -50%) scale(1) rotate(-25deg);
    opacity: 1;
  }
}
.core-icon {
  width: 70px;
  height: 70px;
  background-color: #8e0003; /* brown */
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 28px;
}

.service-item {
  border-radius: 12px;
}

/* Mobile tweaks */
@media (max-width: 768px) {
  /* 1. Center triangle for mobile */
  .triangle-arms-wrapper {
    margin: 0 auto auto !important;
    max-width: 320px;
    position: relative;
  }
  .triangle-arms-wrapper .triangle-svg {
    display: block;
    margin: 0 auto;
  }
  .triangle-arms-wrapper .triangle-center {
    top: 45%;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  /* Arms: place nicely around triangle on mobile */
  .triangle-arms-wrapper .arm {
    max-width: 140px;
    font-size: 12px;
    text-align: center;
    position: absolute;
    white-space: nowrap;
  }

  /* top label above triangle, centered */
  .triangle-arms-wrapper .arm-top {
    top: -20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  /* bottom label below triangle, centered */
  .triangle-arms-wrapper .arm-bottom {
    bottom: -10px !important;
    left: 20% !important;
    transform: translateX(-50%) !important;
  }

  /* left label slightly to left-middle */
  .triangle-arms-wrapper .arm-left {
    left: -17%;
    top: 30%;
    transform: translateY(-50%) rotate(-60deg) !important;
    transform-origin: right center;
    width: 150px;
  }

  /* RIGHT ARM — close to right edge */
  .triangle-arms-wrapper .arm-right {
    right: -22%;
    top: 33%;
    transform: translateY(-50%) rotate(60deg) !important;
    transform-origin: left center;
    width: 150px;
  }

  /* center-bottom label just under triangle center */
  .triangle-arms-wrapper .arm-center-bottom {
    bottom: -10px !important;
    left: 75% !important;
    transform: translateX(-50%) !important;
  }

  /* 2. Arm card text aligned left */
  .arm-card {
    text-align: left !important;
  }

  /* 4. Center contact info block */
  .container-xxl .bg-light.rounded.p-4.h-100 {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }
  .container-xxl .bg-light.rounded.p-4.h-100 .d-flex {
    justify-content: center;
  }

  /* 5. Center footer content */
  .footer .row > [class*="col-"] {
    text-align: center;
  }
  .footer .d-flex.pt-2,
  .footer .d-flex {
    justify-content: center;
  }

  /* Center footer Quick Links section on mobile */
  .footer .col-md-6,
  .footer .col-lg-4 {
    text-align: center;
  }
  .footer .col-lg-4 .btn.btn-link {
    text-align: center;
  }

  /* Center contact info block wrapper */
  .container-xxl .bg-light.rounded.p-4.h-100 {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }
  /* Align icon row content to center as well */
  .container-xxl .bg-light.rounded.p-4.h-100 .d-flex {
    justify-content: center;
  }
}
