/* Carousel exclusivo da seção About */
.about-services-carousel {
  position: relative;
  margin-top: 20px;
  user-select: none;
  /* Variáveis de controle */
  --asc-card: 100px;
  --asc-gap: 20px;
}

.about-services-carousel__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  /* Em telas pequenas, ocupa toda a largura da coluna */
  width: 100%;
  /* Esconde a barra de rolagem horizontal, mantendo o scroll */
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE e Edge Legacy */
}

.about-services-carousel__viewport::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari */
}

.about-services-carousel__track {
  display: grid;
  grid-auto-flow: column;
  /* Cada coluna segue a largura fixa do card */
  grid-auto-columns: var(--asc-card);
  gap: var(--asc-gap);
  /* reduzido */
  padding: 6px 6px 10px 6px;
  list-style: none;
  margin: 0;
}

/* Cards */
.about-services-card {
  scroll-snap-align: start;
  background: linear-gradient(180deg, rgba(0, 255, 255, 0.08), rgba(99, 102, 241, 0.06));
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 8px;
  padding: 12px 8px;
  text-align: center;
  color: #eaffff;
  flex: 0 0 var(--asc-card);
  width: var(--asc-card);
  max-width: var(--asc-card);
  min-height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

.about-services-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3), 0 0 14px rgba(0, 255, 255, 0.12);
}

.about-services-card i {
  font-size: 18px;
  color: #00ffff;
  margin-bottom: 6px;
}

.about-services-card h5 {
  margin: 0;
  font-size: 12px;
  line-height: 1.2;
  color: #e5e7eb;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.about-services-card p {
  display: none;
  /* Oculta descrição para caber no card pequeno */
}

/* Navegação */
.about-services-carousel__btn {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  width: auto;
  height: auto;
  border-radius: 0;
  border: none;
  background: transparent;
  color: #00ffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
  z-index: 2;
}

.about-services-carousel__btn svg {
  height: 30px;
  fill: currentColor;
}

.about-services-carousel__btn:hover {
  color: #7ffeff;
  filter: brightness(0.6);
  transform: translateY(-50%) scale(1.05);
}

.about-services-carousel__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.about-services-carousel__btn--left {
  left: -26px;
}

.about-services-carousel__btn--right {
  right: 82px;
}

/* Responsividade: quantidade de cards por viewport */
/* Mantém cartões com largura fixa em todos breakpoints */

/* Telas muito pequenas - abaixo de 520px */
@media (max-width: 519px) {
  .about-services-carousel__viewport {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x !important;
    overscroll-behavior-x: contain !important;
    scroll-snap-type: x mandatory !important;
  }

  .about-services-carousel__track {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: var(--asc-gap) !important;
    padding: 6px !important;
  }

  .about-services-card {
    flex: 0 0 var(--asc-card) !important;
    width: var(--asc-card) !important;
    max-width: var(--asc-card) !important;
    scroll-snap-align: start !important;
    touch-action: pan-x !important;
  }

  /* Esconder botões de navegação em telas pequenas */
  .about-services-carousel__btn {
    display: none !important;
  }
}

@media (min-width: 520px) {
  .about-services-carousel__track {
    grid-auto-columns: var(--asc-card);
  }

  /* Mostra 4 completos + 1 cortado */
  .about-services-carousel__viewport {
    width: calc((var(--asc-card) * 4) + (var(--asc-gap) * 3));
    max-width: 100%;
  }
}

@media (min-width: 900px) {
  .about-services-carousel__track {
    grid-auto-columns: var(--asc-card);
  }
}

/* Ajuste visual quando dentro da coluna de texto */
.about-section .about-services-carousel {
  margin-top: 18px;
}

/* ===============================
   Modal exclusivo - About Services
   =============================== */
.about-services-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
}

.about-services-modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.about-services-modal {
  background: transparent;
  border-radius: 12px;
  width: 100%;
  max-width: 700px;
  transform: translateY(-50px);
  transition: transform 0.3s ease-out;
  margin: 20px 0;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  position: relative;
}

/* camada interna escura para replicar .modal-content::after */
.about-services-modal::after {
  content: '';
  position: absolute;
  inset: 2px;
  /* mesma espessura do bordo */
  background: #1a1a1a;
  border-radius: 10px;
  /* (12 - 2) mantém a suavidade */
  z-index: 1;
}

/* fundo de borda com gradiente animado (similar ao .modal-content::before) */
.about-services-modal__border-bg {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 180deg at 50% 50%, #008cff, #00ffd5, #008cff);
  animation: borderGlow 4s linear infinite;
}

/* conteúdo interno sobreposto (similar ao .modal-content-wrapper) */
.about-services-modal__content {
  position: relative;
  z-index: 2;
  padding: 30px;
}

.about-services-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: none;
  color: #aab0bf;
  font-size: 28px;
  cursor: pointer;
}

.about-services-modal__close:hover {
  color: #00ffff;
}

.about-services-modal__header {
  padding: 0 0 15px 0;
  border-bottom: 1px solid #333;
}

.about-services-modal__title {
  margin: 0;
  font-size: 1.5rem;
  color: #ffffff;
}

.about-services-modal__body {
  line-height: 1.6;
  color: #ddd;
  position: relative;
  z-index: 1;
  padding-top: 12px;
}

.about-services-modal__desc {
  margin: 0;
  color: #c7ccda;
  line-height: 1.6;
}

.about-services-modal__footer {
  margin-top: 20px;
  text-align: center;
}

.about-services-modal__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(0, 255, 255, 0.4);
  background: rgba(12, 16, 28, 0.6);
  color: #00ffff;
  text-decoration: none;
}

.about-services-modal__cta:hover {
  background: rgba(20, 28, 44, 0.8);
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.25);
}


.about-services-modal-overlay.is-open .about-services-modal {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .about-services-modal {
    width: 90%;
    padding: 20px 15px;
    margin-right: 10vw;
    /* Add right margin to prevent modal from being cut off on mobile */
  }

  .about-services-modal__footer {
    text-align: center;
  }

  .about-services-modal__cta {
    width: 100%;
    justify-content: center;
  }

  /* About (mobile): tipografia e layout para evitar corte fora da tela */
  .about-section {
    padding-left: 6vw;
    padding-right: 6vw;
  }

  .about-section h2,
  .about-section h3 {
    font-size: 7vw;
    line-height: 1.2;
    margin: 2vw 0 3vw;
    word-break: normal;
    overflow-wrap: anywhere;
    /* permite quebra por palavra longa */
    max-width: 92vw;
  }

  .about-section p {
    font-size: 4vw;
    line-height: 1.65;
    margin: 0 0 4.5vw;
    max-width: 92vw;
    word-break: normal;
    overflow-wrap: anywhere;
  }
}