/* =========================================================
   SERVICOS.CSS (COMPLETO)
   - MOBILE: slider
   - DESKTOP: galeria/grid
   ========================================================= */

/* ===== Tipografia base ===== */
body{
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* ===== Layout geral ===== */
.services{
  padding: 48px 0;
}

.servicesGrid__inner{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Cabeçalho ===== */
.servicesGrid__head{
  display: flex;
  gap: 14px;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.servicesGrid__title{
  margin: 0;
  font-size: 20px;
  letter-spacing: 1px;
  font-weight: 400;
  color: #fff;
}

.servicesGrid__controls{
  display: flex;
  gap: 10px;
  align-items: center;
}

.servicesGrid__btn{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.12);
  background: #fff;
  color: #003fa3;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: transform .12s ease, box-shadow .12s ease;
}

.servicesGrid__btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}

/* ===== Slider (default: mobile/tablet) ===== */
.servicesGrid__featured{
  position: relative;
}

.servicesGrid__viewport{
  overflow: hidden;
  border-radius: 18px;
}

.servicesGrid__track{
  display: flex;
  will-change: transform;
  transition: transform 420ms ease;
}

/* ===== Card ===== */
.serviceCard{
  flex: 0 0 100%;
  min-width: 100%;
  height: clamp(240px, 32vw, 360px);
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  cursor: grab;
  color: #868686;
  transform: translateZ(0);
}

.serviceCard:active{
  cursor: grabbing;
}

.serviceCard__img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.04);
}

/* sombra forte (igual artigos) */
.serviceCard__overlay{
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0.35) 30%,
    rgba(0,0,0,0.75) 55%,
    rgba(0,0,0,0.95) 100%
  );
}

/* ===== Conteúdo do card ===== */
.serviceCard__content{
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 52px;
  z-index: 2;
}

.serviceCard__tag{
  display: inline-block;
  margin-bottom: 8px;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(8px);
  color: #fff;
}

.serviceCard__title{
  margin: 0 0 6px;
  font-size: clamp(18px, 2.2vw, 28px);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 12px 30px rgba(0,0,0,.45);
}

.serviceCard__desc{
  margin: 0;
  font-size: 14px;
  color: rgba(255,255,255,.85);
}

/* ===== Botão Ler Mais ===== */
.serviceCard__btn{
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 3;

  cursor: pointer;
  padding: 10px 14px;
  border-radius: 999px;

  background: rgba(10, 66, 155, .55);
  border: 1px solid rgba(43, 123, 255, .35);
  color: #fff;

  font-weight: 700;
  font-size: 12px;
  letter-spacing: .10em;
  text-transform: uppercase;

  opacity: 0;
  transform: translateY(10px);
  transition: opacity .22s ease, transform .22s ease, background .22s ease;
}

.serviceCard:hover .serviceCard__btn,
.serviceCard:focus-visible .serviceCard__btn{
  opacity: 1;
  transform: translateY(0);
  background: rgba(10, 66, 155, .75);
}

/* ===== Dots ===== */
.servicesGrid__dots{
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
}

/* OBS: Mantive o nome .newsDot porque seu JS provavelmente cria com essa classe */
.newsDot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.2);
  background: rgba(0,0,0,0.12);
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, width .12s ease;
}

.newsDot.is-active{
  background: rgba(125, 155, 221, 0.48);
  width: 26px;
  transform: translateY(-1px);
}

/* ===== Painel Ler Mais ===== */
.servicePanel{
  max-width: 1100px;
  margin: 16px auto 0;
  padding: 0 20px;

  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  transition: max-height .45s ease, opacity .30s ease, transform .30s ease;
}

.servicePanel.is-open{
  opacity: 1;
  transform: translateY(0);
}

.servicePanel__inner{
  position: relative;
  border-radius: 18px;
  padding: 18px 18px 20px;
  background: rgba(10, 66, 155, .12);
  border: 1px solid rgba(43, 123, 255, .18);
}

.servicePanel__top{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.servicePanel__close{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(43, 123, 255, .22);
  background: rgba(10, 66, 155, .35);
  color: #fff;
  cursor: pointer;
  flex: 0 0 auto;
}

.servicePanel__tag{
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: .10em;
  text-transform: uppercase;
  background: rgba(10, 66, 155, .35);
  border: 1px solid rgba(43, 123, 255, .22);
  color: #fff;
}

.servicePanel__title{
  margin: 10px 0 6px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.servicePanel__meta{
  margin: 0 0 14px;
  color: rgba(255,255,255,.75);
  font-size: 13px;
}

.servicePanel__content{
  color: rgba(255,255,255,.90);
  line-height: 1.65;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.servicePanel__content p{
  margin: 0 0 14px;
}

/* Acessibilidade */
.serviceCard:focus-visible,
.servicesGrid__btn:focus-visible,
.newsDot:focus-visible,
.servicePanel__close:focus-visible {
  outline: 3px solid rgba(43, 123, 255, 0.55);
  outline-offset: 3px;
}

/* =========================================================
   DESKTOP: GALERIA (GRID) - DESLIGA SLIDER
   ========================================================= */
@media (min-width: 901px){

  /* some com controles (slider não existe no desktop) */
  .servicesGrid__controls{
    display: none;
  }

  /* viewport não corta */
  .servicesGrid__viewport{
    overflow: visible;
    border-radius: 0;
  }

  /* track vira GRID */
  .servicesGrid__track{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;

    transform: none !important;
    transition: none !important;
    will-change: auto;
  }

  /* dots não fazem sentido na galeria */
  .servicesGrid__dots{
    display: none;
  }

  /* card em grid */
  .serviceCard{
    min-width: 0;
    flex: initial;
    height: 260px;
    border-radius: 18px;
    cursor: pointer;
    box-shadow: 0 18px 40px rgba(0,0,0,.30);
    transition: transform .18s ease, box-shadow .18s ease;
  }

  .serviceCard:hover{
    transform: translateY(-4px);
    box-shadow: 0 26px 55px rgba(0,0,0,.38);
  }

  .serviceCard__img{
    transform: scale(1.02);
    transition: transform .25s ease;
  }

  .serviceCard:hover .serviceCard__img{
    transform: scale(1.06);
  }

  /* tipografia mais “galeria” */
  .serviceCard__title{
    font-size: 16px;
    line-height: 1.2;
  }

  .serviceCard__desc{
    font-size: 13px;
  }

  /* CTA sempre visível no desktop (opcional: fica bonito) */
  .serviceCard__btn{
    opacity: 1;
    transform: none;
    padding: 8px 12px;
    font-size: 11px;
  }
}

/* desktop médio: 2 colunas */
@media (min-width: 901px) and (max-width: 1080px){
  .servicesGrid__track{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* =========================================================
   MOBILE: micro ajustes
   ========================================================= */
@media (max-width: 520px){
  .servicesGrid__head{
    align-items: center;
  }

  .servicesGrid__btn{
    width: 42px;
    height: 42px;
  }

  .serviceCard__title{
    font-size: 16px;
  }

  .serviceCard__tag{
    font-size: 11px;
    padding: 7px 9px;
  }
}
