.services-section {
  min-height: 100vh;
  background: #262626;
  padding: 40px 34px 34px;
  position: relative;

  scroll-snap-align: start;
  scroll-snap-stop: normal;
}

.services-title {
  margin-top: 0;
}

.services-layout {
  margin-top: 44px;
  min-height: calc(100vh - 170px);

  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(110px, 1fr));
  gap: 22px;
}

.service-card {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;

  padding: 24px 26px;
  cursor: pointer;

  display: flex;
  align-items: center;
}

.service-card-title {
  margin: 0;

  color: rgba(255, 255, 255, 0.92);
  font-family: 'Noto Sans Georgian', sans-serif;
  font-size: 25px;
  font-weight: 600;
  line-height: 1.14;
}

.service-card-1 {
  grid-column: 4 / 7;
  grid-row: 1 / 2;

  position: relative;
  left: -28px;
}

.service-card-2 {
  grid-column: 7 / 10;
  grid-row: 1 / 2;

  position: relative;
  left: 37px;
}

.service-card-3 {
  grid-column: 9 / 13;
  grid-row: 2 / 3;

  position: relative;
  left: -74px;
}

.service-card-4 {
  grid-column: 1 / 5;
  grid-row: 2 / 3;

  position: relative;
  left: 70px;
}

.service-card-5 {
  grid-column: 3 / 7;
  grid-row: 3 / 4;

  position: relative;
  left: -20px;
}

.service-card-6 {
  grid-column: 8 / 12;
  grid-row: 3 / 4;

  position: relative;
  left: -140px;
}

.service-card-7 {
  grid-column: 1 / 4;
  grid-row: 4 / 5;
}

.service-card-8 {
  grid-column: 5 / 9;
  grid-row: 4 / 5;
}

.service-card-9 {
  grid-column: 10 / 13;
  grid-row: 4 / 5;
}

/* Services entrance animation */

.service-card {

   position: relative;
  top: 0;
  opacity: 0;

  transform:
    translate(var(--enter-x, 0), var(--enter-y, 0))
    scale(0.985);

   transition:
    opacity 0.72s ease,
    transform 0.98s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s ease,
    top 0.22s ease;
  
}

/* Entry directions */
.service-card-1 {
  --enter-x: -45px;
}

.service-card-2 {
  --enter-x: 45px;
}

.service-card-3 {
  --enter-x: 45px;
}

.service-card-4 {
  --enter-x: -45px;
}

.service-card-5 {
  --enter-y: 35px;
}

.service-card-6 {
  --enter-y: 35px;
}

.service-card-7 {
  --enter-x: -35px;
}

.service-card-8 {
  --enter-y: 35px;
}

.service-card-9 {
  --enter-x: 35px;
}


/* Final state */
.services-section.is-visible .service-card {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}


/* Stagger */
.services-section.is-visible .service-card-1 {
  transition-delay: 0.13s, 0.13s, 0s, 0s, 0s, 0s;
}

.services-section.is-visible .service-card-2 {
  transition-delay: 0.23s, 0.23s, 0s, 0s, 0s, 0s;
}

.services-section.is-visible .service-card-4 {
  transition-delay: 0.34s, 0.34s, 0s, 0s, 0s, 0s;
}

.services-section.is-visible .service-card-3 {
  transition-delay: 0.44s, 0.44s, 0s, 0s, 0s, 0s;
}

.services-section.is-visible .service-card-5 {
  transition-delay: 0.55s, 0.55s, 0s, 0s, 0s, 0s;
}

.services-section.is-visible .service-card-6 {
  transition-delay: 0.65s, 0.65s, 0s, 0s, 0s, 0s;
}

.services-section.is-visible .service-card-7 {
  transition-delay: 0.75s, 0.75s, 0s, 0s, 0s, 0s;
}

.services-section.is-visible .service-card-8 {
  transition-delay: 0.86s, 0.86s, 0s, 0s, 0s, 0s;
}

.services-section.is-visible .service-card-9 {
  transition-delay: 0.96s, 0.96s, 0s, 0s, 0s, 0s;
}

.service-line {
  display: block;
  overflow: hidden;

  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}

.service-line + .service-line {
  margin-top: 4px;
}

.service-line > span {
  display: block;
  opacity: 0;
  transform: translateY(110%);

  transition:
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.4s ease;
}

.services-section.is-visible .service-line > span {
  opacity: 1;
  transform: translateY(0);
}

/* Text reveal follows each individual card */

.service-card-1 {
  --text-delay: 0.31s;
}

.service-card-2 {
  --text-delay: 0.41s;
}

.service-card-4 {
  --text-delay: 0.52s;
}

.service-card-3 {
  --text-delay: 0.62s;
}

.service-card-5 {
  --text-delay: 0.73s;
}

.service-card-6 {
  --text-delay: 0.83s;
}

.service-card-7 {
  --text-delay: 0.93s;
}

.service-card-8 {
  --text-delay: 1.04s;
}

.service-card-9 {
  --text-delay: 1.14s;
}

.services-section.is-visible
.service-card
.service-line:nth-child(1) > span {
  transition-delay: var(--text-delay);
}

.services-section.is-visible
.service-card
.service-line:nth-child(2) > span {
  transition-delay: calc(var(--text-delay) + 0.10s);
}

.services-section.is-visible .service-card:hover {
  background: rgba(89, 133, 96, 0.18);

  border-color: rgba(255, 255, 255, 0.15);

  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);

  transform: translateY(-5px) scale(1);
}

.services-section.is-ready .service-card {
  transition-delay: 0s !important;
}

/* ===============================
   SERVICE CARD ARROW
   =============================== */

.service-card::after {
  content: '↗';

  position: absolute;
  top: 20px;
  right: 22px;

  color: rgba(255, 255, 255, 0.34);

  font-family: Arial, sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1;

  pointer-events: none;

  transition:
    color 0.22s ease,
    transform 0.22s ease;
}


.services-section.is-ready .service-card:hover::after {
  color: rgba(255, 255, 255, 0.82);
  transform: translate(2px, -2px);
}






.service-detail-content {
  padding: 42px;
}





.service-detail-title {
  margin: 0;

  font-family: 'Noto Sans Georgian', sans-serif;
  font-size: 36px;
  font-weight: 600;

  color: rgba(255, 255, 255, 0.95);
}


.service-detail-intro {
  max-width: 720px;
  margin: 28px 0 0;

  font-family: 'Noto Sans Georgian', sans-serif;
  font-size: 18px;
  line-height: 1.7;

  color: rgba(255, 255, 255, 0.65);
}


.service-detail-columns {
  margin-top: 55px;

  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}


.service-detail-columns > div {
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  padding-top: 20px;
}


.service-detail-columns h3 {
  margin: 0 0 14px;

  font-family: 'Noto Sans Georgian', sans-serif;
  font-size: 18px;
  font-weight: 600;
}


.service-detail-columns p {
  margin: 0;

  color: rgba(255, 255, 255, 0.58);
  font-family: 'Noto Sans Georgian', sans-serif;
  line-height: 1.7;
}


.service-detail-close {
  position: absolute;
  top: 25px;
  right: 28px;

  width: 42px;
  height: 42px;

  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px;

  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.75);

  font-size: 24px;
  line-height: 1;

  cursor: pointer;

  z-index: 2;

  transition:
  background 0.22s ease,
  border-color 0.22s ease,
  color 0.22s ease,
  transform 0.22s ease;
}

.service-detail-close:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.95);

  transform: scale(1.04);
}









.service-detail-panel {
  display: none;
}


/* The actual physical morphing card */
.service-morph-shell {
  position: fixed !important;

  margin: 0 !important;
  

  opacity: 1 !important;

  transform-origin: top left !important;

  z-index: 9999;

  overflow: hidden;

  pointer-events: auto;

  will-change: transform;

  transition:
    background 0.36s ease,
    border-color 0.36s ease,
    box-shadow 0.36s ease;
}


/* Make original card text visible inside the shell */
.service-morph-shell .service-line > span {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}


/* Original card title */
.service-morph-shell .service-card-title {
  opacity: 1;

  transition:
    opacity 0.20s ease;
}


/* Detail information inside morphing shell */
.service-morph-detail {
  position: absolute;
  inset: 0;

  opacity: 0;
  transform: translateY(12px);

  pointer-events: none;

  transition:
    opacity 0.32s ease,
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}





/* Expanded state */
.service-morph-shell.is-expanded .service-morph-detail {
  opacity: 1;
  transform: translateY(0);

  pointer-events: auto;
}


.service-morph-shell.is-expanded .service-card-title {
  opacity: 0;
}


.service-morph-shell.is-expanded::after {
  opacity: 0;
}


/* Keep original title hidden at start of closing */
.service-morph-shell.is-returning .service-card-title {
  opacity: 0;
}

.service-morph-shell.is-returning::after {
  opacity: 0 !important;
}


/* Real clicked card hidden under morph shell */
.service-card.is-morph-source {
  visibility: hidden;
}


/* Other 8 cards disappear completely */
.services-section.is-detail-open .service-card {
  opacity: 0 !important;

  pointer-events: none;

  transition-delay: 0s !important;
}


/* ===============================
   ENGLISH SERVICES TYPOGRAPHY
   =============================== */

html[lang="en"] .services-title .brand-primary {
  font-family: 'Nunito Sans', sans-serif;
}

html[lang="en"] .service-card-title,
html[lang="en"] .service-detail-title,
html[lang="en"] .service-detail-intro,
html[lang="en"] .service-detail-columns h3,
html[lang="en"] .service-detail-columns p {
  font-family: 'Inter', sans-serif;
}



.service-detail-visual {
  border-top: 0 !important;
  padding-top: 0 !important;

  display: flex;
  align-items: center;
  justify-content: center;

  min-width: 0;
}


.service-detail-image {
  width: 100%;
  max-width: 620px;
  height: auto;

  display: block;

  object-fit: contain;

  border-radius: 16px;

  opacity: 0.78;
}

/* 1366 desktop — service card titles 16% smaller */
@media (min-width: 1025px) and (max-width: 1500px) {
  .service-card-title {
    font-size: 21px;
  }
}


@media (min-width: 1025px) and (max-width: 1300px) {

  .services-layout {
    gap: 13px;
  }

  .service-card {
    padding: 14px 16px;
    border-radius: 13px;
  }

  .service-card-1 {
    left: -17px;
  }

  .service-card-2 {
    left: 22px;
  }

  .service-card-3 {
    left: -44px;
  }

  .service-card-4 {
    left: 42px;
  }

  .service-card-5 {
    left: -12px;
  }

  .service-card-6 {
    left: -84px;
  }
}


/* 1024 tablet — keep approved Services composition, only scale it down */
@media (max-width: 1024px) {
  .services-layout {
    gap: 13px;
  }

  .service-card {
    padding: 14px 16px;
    border-radius: 13px;
  }

  .service-card-title {
    font-size: 21px;
  }

  .service-card-1 {
    left: -17px;
  }

  .service-card-2 {
    left: 22px;
  }

  .service-card-3 {
    left: -44px;
  }

  .service-card-4 {
    left: 42px;
  }

  .service-card-5 {
    left: -12px;
  }

  .service-card-6 {
    left: -84px;
  }
}
@media (max-width: 1024px) {
  .service-card-title {
    font-size: 18px;
  }

}

/* Real tablet landscape — Services */
@media (hover: none) and (pointer: coarse)
       and (min-width: 1025px)
       and (max-width: 1366px)
       and (max-height: 700px) {

  .services-section {
    padding-top: 30px;
    padding-bottom: 24px;
  }

  .services-layout {
    margin-top: 30px;

    grid-template-rows:
      repeat(4, minmax(82px, 1fr));

    gap: 10px;
  }

  .service-card {
    padding: 11px 14px;
    border-radius: 12px;
  }

  .service-card-title {
    font-size: 17px;
  }

  .service-card {
  scale: 0.9;
}

}


/* 769–900 — smaller service card titles */
@media (min-width: 769px) and (max-width: 900px) {

  .services-layout {
    min-height: 540px;
  }

  .service-card-title {
    font-size: 16px;
  }

}

/* 768 portrait tablet — Services 2-column grid */
@media (min-width: 700px) and (max-width: 768px) {

  .services-layout {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));

    grid-template-rows: none;
    grid-auto-rows: 120px;

    gap: 26px;

    min-height: 0;
     margin-top: 98px;
  }

  .service-card {
    grid-column: auto !important;
    grid-row: auto !important;

    left: 0 !important;

    padding: 14px 16px;
    border-radius: 13px;
  }

  .service-card-title {
    font-size: 16px;
  }

  .service-card-9 {
  grid-column: 1 / 3 !important;
  width: calc(50% - 8px);
  justify-self: center;
}

}

/* 800 portrait tablet — Services 2-column grid */
@media (min-width: 769px) and (max-width: 820px) {

  .services-layout {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));

    grid-template-rows: none;
    grid-auto-rows: 120px;

    gap: 36px;

    min-height: 0;
    margin-top: 168px;
  }

  .service-card {
    grid-column: auto !important;
    grid-row: auto !important;

    left: 0 !important;

    padding: 14px 16px;
    border-radius: 13px;
  }

  .service-card-title {
    font-size: 16px;
  }

  .service-card-9 {
    grid-column: 1 / 3 !important;

    width: calc(50% - 13px);

    justify-self: center;
  }
}
/* ===============================
   430 MOBILE — SERVICES
   =============================== */

@media (max-width: 430.99px) {

  .services-section {
    padding-left: 18px;
    padding-right: 18px;
  }

  .services-layout {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));

    grid-template-rows: none;
    grid-auto-rows: 110px;

    gap: 14px;

    min-height: 0;
    margin-top: 110px;
  }

  .service-card {
    grid-column: auto !important;
    grid-row: auto !important;

    left: 0 !important;

    min-width: 0;

    padding: 12px 13px;
    border-radius: 13px;
  }

  .service-card-title {
    min-width: 0;
    max-width: 100%;

    font-size: 13px;
    line-height: 1.25;
  }

  .service-card-9 {
    grid-column: 1 / 3 !important;

    width: calc(50% - 7px);
    justify-self: center;
  }
}

/* ===============================
   360 SHORT MOBILE — SERVICES
   Galaxy S22
   =============================== */

@media (min-width: 350px) and (max-width: 364px) and (max-height: 700px) {

  .services-section {
    padding-top: 24px;
    padding-bottom: 18px;
  }

  .services-layout {
    margin-top: 52px;

    grid-auto-rows: 88px;

    gap: 10px;
  }

  .service-card {
    padding: 10px 11px;

    border-radius: 12px;
  }

  .service-card-title {
    font-size: 11px;
    line-height: 1.22;
  }

  .service-card-9 {
    grid-column: 1 / 3 !important;

    width: calc(50% - 5px);

    justify-self: center;
  }

}

/* ===============================
   384 / 390 SHORT MOBILE — SERVICES
   =============================== */

@media (min-width: 381px) and (max-width: 400px) and (max-height: 700px) {

  .services-section {
    padding-top: 24px;
    padding-bottom: 18px;
  }

  .services-layout {
    margin-top: 52px;

    grid-auto-rows: 88px;

    gap: 10px;
  }

  .service-card {
    padding: 10px 11px;
    border-radius: 12px;
  }

  .service-card-title {
    font-size: 11px;
    line-height: 1.22;
  }

  .service-card-9 {
    grid-column: 1 / 3 !important;

    width: calc(50% - 5px);

    justify-self: center;
  }

}

/* 411 × 752 — Services cards slightly higher */
@media (min-width: 401px) and (max-width: 420px) and (max-height: 780px) {

  .services-section {
    padding-top: 40px;
  }

  .services-layout {
    margin-top: 18px;
  }

}

/* ===============================
   OPEN SERVICE CARD — MOBILE
   =============================== */

@media (max-width: 699px) {


  .service-detail-visual {
  margin-top: 6px;
}

.service-detail-image {
  width: 100%;
  max-width: 100%;

  border-radius: 12px;

  opacity: 0.72;
}

  .service-morph-shell {
    border-radius: 14px !important;
  }


  /*
    Allows content to remain usable
    on shorter mobile screens.
  */

  .service-morph-detail {
    overflow-y: auto;

    overscroll-behavior: contain;

    -webkit-overflow-scrolling: touch;
  }


  .service-morph-detail
  .service-detail-content {
    padding:
      22px
      18px
      24px;
  }


  /* Title */

  .service-detail-title {
    padding-right: 44px;

    font-size:
      clamp(23px, 6.4vw, 28px);

    line-height: 1.18;
  }


  /* Intro */

  .service-detail-intro {
    max-width: none;

    margin-top: 14px;

    font-size:
      clamp(12px, 3.3vw, 14px);

    line-height: 1.55;
  }


  /*
    Desktop uses 2 columns.
    Mobile becomes one clean column.
  */

  .service-detail-columns {
    margin-top: 28px;

    grid-template-columns: 1fr;

    gap: 22px;
  }


  .service-detail-columns > div {
    padding-top: 14px;
  }


  .service-detail-columns h3 {
    margin-bottom: 8px;

    font-size:
      clamp(13px, 3.7vw, 15px);

    line-height: 1.35;
  }


  .service-detail-columns p {
    font-size:
      clamp(11px, 3.2vw, 13px);

    line-height: 1.55;
  }


  /* Close */

  .service-detail-close {
    top: 14px;
    right: 14px;

    width: 34px;
    height: 34px;

    border-radius: 9px;

    font-size: 19px;
  }

}


/* =========================================
   PORTRAIT TABLETS — EXPANDED SERVICE CARD
   768 × 1024 / 800 × 1159
   Text above, illustration below
   ========================================= */

@media (min-width: 700px) and (max-width: 820px)
       and (orientation: portrait) {

  .service-morph-detail {
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .service-morph-detail .service-detail-content {
    height: 100%;
    box-sizing: border-box;

    display: flex;
    flex-direction: column;
  }

  .service-detail-columns {
    flex: 1;
    min-height: 0;

    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);

    gap: 24px;
    margin-top: 40px;
  }

  .service-detail-columns > div {
    min-width: 0;
  }

  .service-detail-visual {
    min-height: 0;
    align-self: stretch;
  }

  .service-detail-image {
    width: 100%;
    max-width: 540px;
    max-height: 100%;
    height: auto;

    object-fit: contain;
  }

}
