:root {
  --bg: #ffffff;
  --text: #0b0b0b;
  --muted: #1a1a1a;
  --gap: 30px;
  --radius: 10px;
  --maxw: 1200px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
}

.ServiceTitleSec {
  position: relative;
  z-index: 9999;
}

/* SAME ALIGNMENT AS TEXT ABOVE */
.descriptionSection,
.cardsServiceSection {
  width: 100%;
  padding-left: 110px;
  padding-right: 110px;
  box-sizing: border-box;
}

/* CARDS GRID */
.cardsServiceSection {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  padding-top: 30px;
  padding-bottom: 30px;
  align-items: stretch;
}

@media (min-width: 2070px) {
  .cardservicesport {
    height: 420px !important;
  }
}

/* Big screens: maximum 4 cards */
@media (min-width: 1750px) {
  .descriptionSection,
  .cardsServiceSection {
    padding-left: 250px;
    padding-right: 250px;
  }

  .cardsServiceSection {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .cardservicesport {
    height: 390px !important;
  }
}

/* Large desktop */
@media (max-width: 1749px) {
  .cardsServiceSection {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .cardservicesport {
    height: 450px !important;
  }
}

@media (max-width: 1400px) {
  .cardservicesport {
    height: 380px !important;
  }
}

/* Small desktop / tablet */
@media (max-width: 1180px) {
  .cardsServiceSection {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .descriptionSection,
  .cardsServiceSection {
    padding-left: 50px;
    padding-right: 50px;
  }
}

/* Mobile default: 1 card */
@media (max-width: 700px) {
  .descriptionSection,
  .cardsServiceSection {
    padding-left: 20px;
    padding-right: 20px;
  }

  .cardsServiceSection {
    grid-template-columns: 1fr;
  }

  .cardservicesport {
    height: 600px !important;
  }
}

@media (max-width: 550px) {
  .cardservicesport {
    height: 450px !important;
  }
}

@media (max-width: 360px) {
  .cardservicesport {
    height: 400px !important;
  }
}

@media (max-width: 700px) {
  .services-cards-grid,
  .projects-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .services-cards-grid .cardservicesport,
  .projects-cards-grid .cardservicesport {
    height: clamp(220px, 58vw, 340px) !important;
    border-radius: 16px;
  }

  .services-cards-grid .cardservicesport img,
  .projects-cards-grid .cardservicesport img {
    border-radius: 16px;
  }

  .services-cards-grid .cardservicesport h3,
  .projects-cards-grid .cardservicesport h3 {
    min-height: 58px;
    padding: 14px 8px;
    font-size: clamp(11px, 3vw, 13px);
    line-height: 1.25;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
  }
}

@media (max-width: 420px) {
  .services-cards-grid,
  .projects-cards-grid {
    gap: 12px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .services-cards-grid .cardservicesport,
  .projects-cards-grid .cardservicesport {
    height: clamp(185px, 60vw, 250px) !important;
  }
}

.projectCardCap {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Cards */
.servicespage-home {
  padding: 10px;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}

.servicespage-home:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.servicespage-home figure {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  height: 350px !important;
  display: flex;
  align-items: flex-end;
  color: #fff;
  transition: transform 0.3s;
  background-size: cover;
  background-position: center;
}

.image-wrapper {
  position: relative;
  display: inline-block;
}

.image-wrapper img {
  width: 80%;
  display: block;
}

.service-header-title {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  position: absolute;
  top: 50%;
  left: 100px;
  transform: translateY(-50%);
  text-align: left;
  color: #000;
}

.service-header-title h1,
.service-header-title h2 {
  color: #ffffff;
  font-size: 36px;
  margin: 0;
  font-family: "GraphikBold", sans-serif !important;
}

.service-header-title p {
  font-size: 16px;
  color: #ffffff;
  font-family: "Graphiklight", sans-serif !important;
}

.servicespage-home:hover figure {
  transform: scale(1.05);
}

.servicespage-home figcaption {
  background: rgba(0, 0, 0, 0.6);
  padding: 15px;
  width: 100%;
  height: 170px;
}

.servicespage-home h4.title {
  margin-bottom: 10px;
  font-size: 1.1rem;
  font-weight: 600;
}

.descriptionSection {
  padding-top: 40px;
  padding-bottom: 10px;
  text-align: justify;
  font-size: medium !important;
  line-height: 1.5;
  color: #383838 !important;
  font-family: "Graphiklight", sans-serif !important;
}

.btnhome {
  display: flex;
  flex-direction: row;
  justify-content: end;
  margin-right: 100px;
  position: absolute;
  bottom: 10px;
  right: 1px;
  z-index: 2;
}

.btnhome a {
  display: inline-block;
  background-color: #037f41;
  font-size: 15px;
  font-family: "Graphik", sans-serif;
  font-weight: 900;
  color: #fff;
  text-transform: capitalize;
  border-radius: 23px;
  padding-left: 35px;
  padding-right: 35px;
  padding-top: 5px;
  padding-bottom: 5px;
  margin-top: 10px;
}

.servicespage-home .content {
  font-size: 0.7rem;
  margin-bottom: 15px;
  height: 60px;
}

.servicespage-home .btn-link {
  text-decoration: none;
  color: #fff;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
}

.servicespage-home .btn-link img {
  margin-left: 5px;
  width: 16px;
  height: 16px;
}

.cardservicesport {
  position: relative;
  width: 100%;
  height: 370px;
  border-radius: 20px;
  transition: all 0.6s ease;
  box-shadow:
    10px 10px 10px rgba(0, 0, 0, 0.15),
    2px 2px 10px rgba(255, 255, 255, 0.4);
  overflow: hidden;
}

.cardservicesport a {
  display: block;
  width: 100%;
  height: 100%;
}

.cardservicesport img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
}

.cardservicesport h3 {
  position: absolute;
  bottom: 0px;
  width: 100%;
  color: white;
  font-size: 14px;
  text-align: center;
  background: rgba(0, 0, 0, 0.5);
  padding: 25px;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
}

.cardservicesport:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow:
    10px 10px 10px rgba(0, 0, 0, 0.15),
    2px 2px 10px rgba(255, 255, 255, 0.4);
}

.services-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #e5e5e5;
  border-top: 4px solid #037f41; /* your green */
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* CARD STYLE */
.value-card-service {
  background: #eef1ef;
  border-radius: 50px;
  padding: 30px 15px;
  width: 180px;
  height: 180px;
  text-align: center;

  /* neumorphism effect */
  box-shadow:
    10px 10px 20px rgba(0, 0, 0, 0.1),
    -10px -10px 20px rgba(255, 255, 255, 0.8);

  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s ease;
}

.valueimg {
  width: 60px;
  height: 60px;
}

.value-card-service.show {
  opacity: 1;
  transform: translateY(0);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.value-card-service .icon {
  font-size: 40px;
  margin-bottom: 15px;
  color: #2c8f2c;
}

.value-card-service h4 {
  font-size: 14px;
  font-weight: 700;
  color: #555;
  line-height: 1.4;
}

@media (max-width: 500px) {
  .value-card-service {
    padding: 30px 15px;
    align-items: center;
    justify-content: center;
  }
  .value-card-service.show {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.projects-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
}

@media (min-width: 1750px) {
  .service-header-title {
    left: 240px;
  }

  .btnhome {
    margin-right: 240px;
  }
}

@media (max-width: 1200px) {
  .service-header-title {
    left: 40px;
  }
}

@media (max-width: 1050px) {
  .btnhome {
    right: unset !important;
    left: 40px !important;
    bottom: 20px !important;
    z-index: 2;
  }
  .image-wrapper img {
    width: 100%;
    display: block;
  }
}

@media (max-width: 600px) {
  .servicespage-home {
    padding: 0px;
  }

  .btnhome {
    right: unset !important;
    left: 40px !important;
    bottom: 10px !important;
    z-index: 2;
  }
}

@media (max-width: 360px) {
  .btnhome {
    right: unset !important;
    left: 40px !important;
    bottom: 5px !important;
    z-index: 2;
  }
}

body[dir="rtl"] .section-headings {
  direction: rtl;
}

body[dir="rtl"] .section-headings .image-wrapper {
  display: block;
}

body[dir="rtl"] .section-headings .image-wrapper > img {
  margin-left: auto;
  margin-right: 0;
  transform: scaleX(-1);
  transform-origin: center;
}

body[dir="rtl"] .service-header-title {
  left: auto;
  right: 100px;
  align-items: flex-start;
  text-align: right;
}

body[dir="rtl"] .descriptionSection {
  direction: rtl;
  text-align: right;
}

body[dir="rtl"] .btnhome {
  right: auto;
  left: 1px;
  margin-right: 0;
  margin-left: 100px;
  justify-content: flex-start;
}

@media (min-width: 1750px) {
  body[dir="rtl"] .service-header-title {
    right: 240px;
  }

  body[dir="rtl"] .btnhome {
    margin-left: 240px;
  }
}

@media (max-width: 1200px) {
  body[dir="rtl"] .service-header-title {
    right: 40px;
  }
}

@media (max-width: 1050px) {
  body[dir="rtl"] .btnhome {
    right: 40px !important;
    left: auto !important;
    margin-left: 0;
  }
}
