/* /var/www/relyn/static_src/css/service-type.css */

/* SERVICE TYPE SECTION */
.service-type-section {
  width: 100%;
  display: flex;
  justify-content: center;

  /* ✅ 83px spacing from the previous section */
  margin-top: 83px;

  font-family: "Urbanist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.service-type-shell {
  position: relative;
  width: 100%;
  max-width: 1920px;

  /* ✅ EXACT section height requirement */
  min-height: 3884px;

  display: flex;
  justify-content: center;

  padding: 0 24px;
  box-sizing: border-box;
}

/* ✅ Background blur layer — tall enough to blend into other sections */
.service-type-blur-layer {
  position: absolute;
  left: 50%;
  top: -220px;
  transform: translateX(-50%);

  width: 1920px;
  max-width: 100%;

  /* Taller than the section height so edges blend */
  height: calc(100% + 440px);

  background:
    radial-gradient(circle at 25% 20%, rgba(99, 62, 178, 0.55), transparent 60%),
    radial-gradient(circle at 70% 55%, rgba(166, 151, 224, 0.32), transparent 66%),
    radial-gradient(circle at 40% 85%, rgba(99, 62, 178, 0.35), transparent 62%);

  filter: blur(95px);
  opacity: 0.95;
  pointer-events: none;
  z-index: 0;
}

/* ✅ Stack layout */
.service-type-stack {
  position: relative;
  z-index: 1;

  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;

  /* ✅ After 285px from top border of the section */
  padding-top: 285px;

  /* ✅ Remaining space to reach total section height neatly */
  padding-bottom: 161px;

  box-sizing: border-box;

  /* ✅ 418px vertical spacing between each box */
  gap: 418px;
}

/* ✅ BOX STYLE */
.service-type-box {
  position: relative;

  width: 1450px;
  height: 546px;
  border-radius: 30px;

  background: linear-gradient(
    135deg,
    rgba(99, 62, 178, 0.80) 0%,
    rgba(99, 62, 178, 0.20) 100%
  );

  overflow: visible;
  box-sizing: border-box;
}

/* ✅ IMAGE POSITIONING (DESKTOP DEFAULT) */
.service-type-image {
  position: absolute;
  top: -223px;
  left: 50%;
  transform: translateX(-50%);

  width: 1311px;
  height: 365px;

  border-radius: 20px;
  object-fit: cover;

  display: block;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* ✅ Content (desktop spec) */
.service-type-content {
  position: relative;
  width: 100%;

  padding-top: 207px;
  padding-left: 68px;
  padding-right: 68px;

  box-sizing: border-box;
}

/* Title + icon row */
.service-type-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding-right: 9px;
  box-sizing: border-box;
}

.service-type-title {
  margin: 0;

  font-size: 40px;
  font-weight: 700;
  line-height: 52px;

  color: #FFFFFF;
  text-align: left;
  letter-spacing: 0.01em;
}

.service-type-icon {
  display: block;
  height: 40px;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.service-type-icon-1 { width: 138px; }
.service-type-icon-2 { width: 204px; }
.service-type-icon-3 { width: 236px; }
.service-type-icon-4 { width: 236px; }

.service-type-desc {
  margin: 24px 0 0;

  font-size: 18px;
  font-weight: 400;
  line-height: 30px;

  color: #FFFFFF;
  text-align: left;
  max-width: 980px;
}

/* ✅ Buttons grid (desktop spec) */
.service-type-btn-grid {
  margin-top: 55px;

  display: grid;
  grid-template-columns: repeat(3, 426px);
  gap: 20px;

  align-items: center;
  justify-content: start;
}

.service-type-btn-grid-5 {
  grid-auto-flow: row;
}

/* ✅ Glass button */
.service-type-btn {
  width: 426px;
  height: 50px;
  border-radius: 10px;

  border: 1px solid #6E60A2;
  background: rgba(255, 255, 255, 0.02);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  box-shadow: 0 18px 40px rgba(5, 10, 22, 0.25);
  cursor: pointer;

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

  padding-left: 30px;
  padding-right: 33px;

  box-sizing: border-box;

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    filter 0.18s ease;
}

/* ✅ Text: desktop = no wrap */
.service-type-btn-text {
  font-family: "Urbanist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(18px, 1.15vw, 24px);
  font-weight: 400;
  line-height: 28px;
  color: #FFFFFF;

  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

/* ✅ Premium arrow */
.service-type-btn-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;

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

  transform: translateX(0);
  transition:
    transform 0.18s ease,
    opacity 0.18s ease,
    filter 0.18s ease;
}

.service-type-btn-arrow svg {
  display: block;
}

/* Hover effects */
.service-type-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(166, 151, 224, 0.95);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 22px 55px rgba(5, 10, 22, 0.35);
  filter: brightness(1.03);
}

.service-type-btn:hover .service-type-btn-arrow {
  transform: translateX(3px);
  opacity: 1;
  filter: drop-shadow(0 6px 16px rgba(166, 151, 224, 0.35));
}

/* Keyboard focus */
.service-type-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px rgba(166, 151, 224, 0.35),
    0 22px 55px rgba(5, 10, 22, 0.35);
}

/* Responsive protection */
@media (max-width: 1600px) {
  .service-type-box {
    width: 100%;
    max-width: 1450px;
  }

  .service-type-image {
    width: min(1311px, 92%);
    height: auto;
    aspect-ratio: 1311 / 365;
  }

  .service-type-btn-grid {
    grid-template-columns: repeat(2, minmax(0, 426px));
  }
}

/* ✅ LAPTOP + TABLET (LANDSCAPE): keep 3 buttons per row and reduce button sizes */
@media (max-width: 1400px) and (min-width: 769px) and (orientation: landscape) {
  .service-type-btn-grid {
    grid-template-columns: repeat(3, 320px);
    gap: 16px;
  }

  .service-type-btn {
    width: 320px;
    height: 44px;
    padding-left: 22px;
    padding-right: 24px;
    border-radius: 10px;
  }

  .service-type-btn-text {
    font-size: clamp(16px, 1.05vw, 20px);
    line-height: 24px;
  }

  .service-type-btn-arrow svg {
    width: 12.6px;
    height: 7.2px;
  }
}

/* ✅ TABLET (PORTRAIT): increase image height + reduce space before image/box + 2-col buttons + text constraints */
@media (max-width: 1100px) and (orientation: portrait) {
  .service-type-shell {
    padding: 0 16px;
    min-height: auto;              /* ✅ remove forced height (removes space after last box) */
  }

  .service-type-stack {
    padding-top: 165px;            /* was 210px */
    padding-bottom: 26px;          /* ✅ minimal ending spacing (no extra space after boxes) */
    gap: 210px;
  }

  .service-type-box {
    width: 100%;
    max-width: 980px;
    height: auto;
    border-radius: 26px;
    padding-bottom: 26px;
  }

  .service-type-image {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%, -50%);
    width: min(860px, calc(100% - 44px));
    height: 360px;
    border-radius: 18px;
    object-fit: cover;
  }

  .service-type-content {
    padding-top: calc((360px / 2) + 10px);
    padding-left: 22px;
    padding-right: 22px;
  }

  .service-type-head {
    padding-right: 0;
    align-items: center;
  }

  .service-type-title {
    font-size: 28px;
    line-height: 38px;
  }

  .service-type-desc {
    margin-top: 16px;
    font-size: 15px;
    line-height: 26px;
    max-width: 100%;
  }

  .service-type-icon {
    height: 26px;
  }

  .service-type-icon-1 { width: 92px; }
  .service-type-icon-2 { width: 134px; }
  .service-type-icon-3 { width: 150px; }
  .service-type-icon-4 { width: 150px; }

  .service-type-btn-grid {
    margin-top: 20px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .service-type-btn {
    width: 100%;
    min-height: 44px;
    height: auto;
    padding: 10px 12px;
    border-radius: 10px;
    align-items: center;
  }

  .service-type-btn-text {
    font-size: 14px;
    line-height: 18px;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-align: left;
    flex: 1;
  }

  .service-type-btn-arrow {
    flex-shrink: 0;
    margin-left: 10px;
  }

  .service-type-btn-arrow svg {
    width: 12px;
    height: 7px;
  }
}

/* ✅ MOBILE: increase image height + reduce space before image/box + 2-col buttons + safe text */
@media (max-width: 768px) {
  .service-type-shell {
    min-height: auto;              /* ✅ remove forced height (removes space after last box) */
  }

  .service-type-stack {
    padding-top: 135px;            /* was 170px */
    padding-bottom: 20px;          /* ✅ minimal ending spacing (no extra space after boxes) */
    gap: 190px;
  }

  .service-type-box {
    height: auto;
    border-radius: 22px;
    padding-bottom: 22px;
  }

  .service-type-image {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%, -50%);
    width: calc(100% - 26px);
    height: 300px;
    border-radius: 16px;
    object-fit: cover;
  }

  .service-type-content {
    padding-top: calc((300px / 2) + 10px);
    padding-left: 18px;
    padding-right: 18px;
  }

  .service-type-title {
    font-size: 24px;
    line-height: 32px;
  }

  .service-type-desc {
    margin-top: 14px;
    font-size: 14px;
    line-height: 24px;
  }

  .service-type-icon {
    height: 24px;
  }

  .service-type-icon-1 { width: 86px; }
  .service-type-icon-2 { width: 124px; }
  .service-type-icon-3 { width: 140px; }
  .service-type-icon-4 { width: 140px; }

  .service-type-btn-grid {
    margin-top: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .service-type-btn {
    width: 100%;
    min-height: 42px;
    height: auto;
    padding: 10px 10px;
    border-radius: 10px;
    align-items: center;
  }

  .service-type-btn-text {
    font-size: 13px;
    line-height: 17px;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-align: left;
    flex: 1;
  }

  .service-type-btn-arrow {
    flex-shrink: 0;
    margin-left: 8px;
  }

  .service-type-btn-arrow svg {
    width: 11.5px;
    height: 6.8px;
  }
}

@media (max-width: 480px) {
  .service-type-shell {
    padding: 0 14px;
  }

  .service-type-stack {
    padding-top: 125px;
    padding-bottom: 14px;          /* ✅ minimal ending spacing */
    gap: 175px;
  }

  .service-type-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .service-type-image {
    width: calc(100% - 22px);
    height: 280px;
  }

  .service-type-content {
    padding-top: calc((280px / 2) + 10px);
  }
}
