/* Services Showcase - realistic tiles + modal */
:root {
  --service-bg: rgba(255, 255, 255, 0.08);
  --service-border: rgba(255, 255, 255, 0.2);
  --service-hover: rgba(255, 255, 255, 0.14);
  --service-text: #f8f9fb;
  --service-muted: rgba(248, 249, 251, 0.75);
  --service-accent: #fcb041;
}

#services.section.services-showcase,
#services.services-showcase,
.services-showcase {
  padding: clamp(3rem, 8vw, 5rem) 0;
  background: radial-gradient(circle at 12% 25%, rgba(32, 135, 255, 0.18), transparent 55%),
    radial-gradient(circle at 78% 0%, rgba(0, 255, 224, 0.12), transparent 45%),
    linear-gradient(135deg, #041128, #052048 55%, #082b60);
  border-radius: 0;
  margin: clamp(2rem, 6vw, 4rem) auto;
  position: relative;
  overflow: hidden;
}

#services.section.services-showcase::before,
#services.services-showcase::before,
.services-showcase::before {
  content: '';
  position: absolute;
  inset: 10% 5% auto 5%;
  height: 40%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent 68%);
  filter: blur(30px);
  pointer-events: none;
}

.section-intro {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(2.4rem, 6vw, 3.8rem);
  position: relative;
  z-index: 1;
}

.services-showcase .section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--service-text);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.services-showcase .section-title,
.services-showcase #services-title,
#services.services-showcase .section-title,
#services.services-showcase #services-title {
  color: #ffffff !important;
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin: 1.5rem 0 1.2rem;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-shadow: 0 14px 30px rgba(0, 0, 0, 0.65), 0 0 30px rgba(66, 168, 255, 0.35);
  transform-style: preserve-3d;
  perspective: 1200px;
  animation: servicesTitleGlow 4.5s ease-in-out infinite;
}

.services-showcase-title::before {
  content: '';
  position: absolute;
  inset: -18px -28px -12px -28px;
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(0, 255, 224, 0.18), rgba(58, 142, 255, 0.28));
  z-index: -2;
  filter: blur(6px);
  transform: translateZ(-30px);
}

.services-showcase-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0ff, #42a8ff, #0ff);
  box-shadow: 0 12px 28px rgba(66, 168, 255, 0.65);
}

.services-showcase-subtitle {
  color: rgba(236, 244, 255, 0.85);
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.8;
  margin: 1.8rem auto 0;
  max-width: 650px;
  text-shadow: 0 10px 20px rgba(0, 0, 0, 0.45);
}

@keyframes servicesTitleGlow {
  0%,
  100% {
    text-shadow: 0 14px 30px rgba(0, 0, 0, 0.65), 0 0 30px rgba(66, 168, 255, 0.35);
    filter: drop-shadow(0 0 0 rgba(0, 255, 224, 0.2));
  }
  50% {
    text-shadow: 0 16px 34px rgba(0, 0, 0, 0.7), 0 0 45px rgba(0, 255, 224, 0.65), 0 0 70px rgba(66, 168, 255, 0.5);
    filter: drop-shadow(0 0 16px rgba(0, 255, 224, 0.35));
  }
}

.services-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.2rem);
  position: relative;
  z-index: 1;
  perspective: 1400px;
}

.service-tile {
  background: linear-gradient(155deg, rgba(7, 54, 122, 0.92), rgba(4, 25, 56, 0.9));
  border-radius: 30px;
  border: 1px solid rgba(91, 165, 255, 0.45);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 440px;
  box-shadow: 0 35px 85px rgba(1, 9, 24, 0.55);
  backdrop-filter: blur(12px);
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(0) rotateY(0) translateZ(0);
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease,
    border-color 0.4s ease;
}

.service-tile::before {
  content: '';
  position: absolute;
  inset: 1.25rem;
  border-radius: 24px;
  border: 1px solid rgba(102, 211, 255, 0.3);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.service-tile::after {
  content: '';
  position: absolute;
  width: 70%;
  height: 70px;
  left: 50%;
  bottom: -40px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, rgba(58, 142, 255, 0.28), rgba(0, 255, 224, 0.22));
  filter: blur(35px);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.service-tile:hover {
  transform: translateZ(30px) scale(1.05);
  box-shadow: 0 55px 105px rgba(0, 6, 19, 0.65);
  border-color: rgba(0, 255, 224, 0.25);
}

.service-tile:hover::before,
.service-tile:hover::after {
  opacity: 1;
}

.service-media {
  position: relative;
  padding-top: 56%;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.05);
}

.service-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 1 !important;
}

.service-tile:hover .service-media img {
  transform: scale(1.08);
}

.service-core {
  padding: 0.4rem 1.6rem 0.75rem;
  flex: 1;
}

.service-icon {
  width: 100%;
  height: 150px;
  margin: -160px auto 0.35rem;
  border-radius: 24px;
  background: var(--service-icon-image, linear-gradient(140deg, rgba(0, 255, 224, 0.4), rgba(21, 86, 194, 0.45)));
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 45px rgba(1, 11, 29, 0.65), 0 20px 40px rgba(2, 7, 18, 0.45);
  animation: serviceIconPulse 5s ease-in-out infinite;
  position: relative;
  z-index: 2;
}

 .service-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.08));
  mix-blend-mode: screen;
}

@keyframes serviceIconPulse {
  0%, 100% {
    transform: translateY(0);
    box-shadow: 0 15px 30px rgba(3, 7, 18, 0.55);
  }
  50% {
    transform: translateY(-6px);
    box-shadow: 0 20px 35px rgba(3, 7, 18, 0.4);
  }
}

.service-category {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  color: #03122b;
  background: linear-gradient(140deg, rgba(0, 255, 224, 0.95), rgba(69, 144, 255, 0.95));
  padding: 0.35rem 1rem;
  border-radius: 999px;
  position: relative;
  isolation: isolate;
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.35), 0 12px 24px rgba(0, 0, 0, 0.3);
  display: none;
}

.service-category::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  color: #f8fbff;
  letter-spacing: 0.02em;
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
  text-shadow: 0 14px 30px rgba(0, 0, 0, 0.65), 0 0 30px rgba(66, 168, 255, 0.35);
  transform-style: preserve-3d;
  perspective: 1200px;
  animation: servicesTitleGlow 4.5s ease-in-out infinite;
}

.services-showcase-title::before {
  content: '';
  position: absolute;
  inset: -14px -20px -14px -28px;
  border-radius: 22px;
  background: linear-gradient(125deg, rgba(0, 255, 224, 0.1), rgba(58, 142, 255, 0.2));
  z-index: -1;
  filter: blur(1.2px);
}

.service-core .service-title {
  display: block;
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  margin: 0.35rem 0 0.5rem;
  color: #ffffff !important;
  letter-spacing: 0.02em;
  line-height: 1.35;
  position: relative;
  text-transform: none;
  text-align: center;
  padding: 0.4rem 0.6rem;
  border-radius: 1.2rem;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.12), rgba(59, 130, 246, 0.15));
  box-shadow: 0 10px 30px rgba(8, 24, 58, 0.45);
}

.service-core .service-title::before {
  content: '';
  position: absolute;
  inset: -6px -10px;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.18), rgba(21, 86, 194, 0.18));
  z-index: -1;
  filter: blur(9px);
}

.service-core .service-summary {
  color: rgba(225, 238, 255, 0.92);
  font-size: 1rem;
  line-height: 1.8;
  margin: 0.6rem auto 1.2rem;
  text-align: center;
  max-width: 92%;
  padding: 0.75rem 1rem;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(12, 42, 89, 0.65), rgba(6, 25, 59, 0.65));
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
}

.service-inspect {
  margin: 1rem 1.6rem 1.8rem;
  padding: 0.75rem 1.35rem;
  border-radius: 16px;
  border: 1px solid rgba(102, 211, 255, 0.45);
  background: linear-gradient(135deg, rgba(7, 54, 122, 0.9), rgba(31, 92, 187, 0.85));
  color: #f7fbff;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.service-inspect:hover,
.service-inspect:focus-visible {
  background: linear-gradient(135deg, rgba(0, 255, 224, 0.25), rgba(72, 142, 255, 0.35));
  border-color: rgba(0, 255, 224, 0.65);
  box-shadow: 0 20px 38px rgba(0, 11, 31, 0.55);
}

.service-inspect i {
  font-size: 1rem;
}

.service-inspect span {
  font-size: 0.9rem;
}

.service-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1200;
}

.service-modal.active {
  display: flex;
}

.service-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 7, 18, 0.82);
  backdrop-filter: blur(6px);
}

.service-modal-dialog {
  position: relative;
  width: min(960px, 92vw);
  background: linear-gradient(165deg, rgba(7, 54, 122, 0.9), rgba(4, 27, 63, 0.85));
  border-radius: 32px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  min-height: 480px;
  border: 1px solid rgba(91, 165, 255, 0.45);
  box-shadow: 0 35px 85px rgba(1, 9, 24, 0.55);
  backdrop-filter: blur(12px);
  transform-style: preserve-3d;
  transform: rotateX(0) rotateY(0) translateZ(0);
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.service-modal-media {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.5rem 1.5rem 0;
}

.service-modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-modal-image {
  min-height: 260px;
  max-height: 320px;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  border-radius: 22px;
}

.service-modal-dialog::before,
.service-modal-dialog::after {
  content: '';
  position: absolute;
  inset: 1.25rem;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0;
  transition: opacity 0.6s ease;
}

.service-modal-dialog::after {
  inset: auto;
  height: 60px;
  width: 70%;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, rgba(58, 142, 255, 0.28), rgba(0, 255, 224, 0.22));
  filter: blur(30px);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.service-modal-dialog:hover {
  transform: translateZ(30px) scale(1.02);
  box-shadow: 0 55px 105px rgba(0, 6, 19, 0.65);
  border-color: rgba(0, 255, 224, 0.25);
}

.service-modal-dialog:hover::before,
.service-modal-dialog:hover::after {
  opacity: 1;
}

.modal-contact-card {
  width: 100%;
  background: linear-gradient(150deg, rgba(7, 25, 59, 0.92), rgba(5, 18, 39, 0.9));
  border-radius: 20px;
  padding: 0.85rem 1rem 1rem;
  box-shadow: 0 16px 38px rgba(1, 8, 22, 0.45);
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: stretch;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-contact-card .contact-label {
  flex: 1 1 100%;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(248, 250, 255, 0.85);
  margin-bottom: 0.2rem;
}

.modal-contact-card .contact-item {
  flex: 1 1 calc(50% - 0.3rem);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
  color: #f7fbff;
  padding: 0.5rem 0.6rem;
  border-radius: 10px;
  background: rgba(4, 18, 44, 0.6);
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.02), 0 10px 22px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  min-height: auto;
}

.modal-contact-card .contact-item i {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2dd4bf, #38bdf8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #041226;
  flex-shrink: 0;
}

.modal-contact-card .contact-item span {
  font-size: 0.85rem;
  white-space: nowrap;
  line-height: 1;
  letter-spacing: 0;
  flex: 1;
}

/* LTR support for phone numbers */
[dir="ltr"] .modal-contact-card .contact-item {
  justify-content: flex-start;
  gap: 0.4rem;
}

[dir="ltr"] .modal-contact-card .contact-item span {
  white-space: nowrap;
  text-align: left;
  font-size: 0.8rem;
}

.modal-contact-card .contact-item:nth-of-type(3) {
  flex: 1 1 100%;
  max-width: calc(50% - 0.3rem);
}

.modal-contact-card .contact-item:hover {
  transform: translateY(-4px);
  color: #63f5ff;
  box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.08), 0 16px 28px rgba(0, 0, 0, 0.4);
}

.service-modal-body {
  grid-column: 2 / 3;
  padding: 2rem;
  color: rgba(240, 248, 255, 0.9);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--service-accent);
}

.modal-description {
  display: none;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.modal-tags span {
  font-size: 0.75rem;
  text-transform: uppercase;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.modal-highlights {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  color: var(--service-text);
}

.modal-highlights li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.modal-highlights li::before {
  content: '\f00c';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  color: var(--service-accent);
  margin-top: 0.1rem;
}

.modal-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.6rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #0a2f67, #083059);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-position 0.3s ease;
  box-shadow: 0 12px 25px rgba(8, 48, 89, 0.35);
  background-size: 200% 200%;
}

.modal-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px rgba(8, 48, 89, 0.45);
  background-position: 100% 0;
}

.modal-cta::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-cta:hover::after,
.modal-cta:focus-visible::after {
  opacity: 1;
}

.service-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.3);
  color: var(--service-text);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
}

@media (max-width: 900px) {
  .service-modal-dialog {
    grid-template-columns: 1fr;
  }

  .service-modal-image {
    height: 220px;
  }
}

@media (max-width: 640px) {
  .services-showcase {
    border-radius: 24px;
  }

  .service-modal-body {
    padding: 1.5rem;
  }

  .service-modal-dialog {
    width: 94vw;
    min-height: 0;
    max-height: 90vh;
    overflow-y: auto;
  }

  /* Mobile modal contact card */
  .modal-contact-card {
    padding: 0.8rem 0.6rem;
    gap: 0.4rem;
  }

  .modal-contact-card .contact-item {
    flex: 1 1 100%;
    max-width: 100%;
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
  }

  .modal-contact-card .contact-item i {
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
  }

  .modal-contact-card .contact-item span {
    font-size: 0.75rem;
  }

  /* Mobile modal layout */
  .service-modal-dialog {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .service-modal-media {
    padding: 1rem 1rem 0;
  }

  .service-modal-image {
    height: 180px;
    min-height: 180px;
    max-height: 200px;
  }

  .service-modal-body {
    grid-column: 1 / 2;
    padding: 1rem;
  }

  .modal-cta {
    padding: 0.8rem 1.2rem;
    font-size: 0.9rem;
  }

  .service-modal-close {
    width: 32px;
    height: 32px;
    top: 0.8rem;
    right: 0.8rem;
  }
}
