/* ====== Reset & Base ====== */
*,
*::before,
*::after {
    box-sizing: border-box
}

:root {
    --bg: #ffffff;
    --fg: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --soft: #f8fafc;
    --brand: #305496;
    --brand-2: #0ea5e9;
    --ok: #22c55e;
    --card: #ffffff;
    --shadow: 0 8px 24px rgba(0, 0, 0, .08);
    --radius: 18px;
}

[data-theme="dark"] {
    --bg: #0b1220;
    --fg: #e5e7eb;
    --muted: #94a3b8;
    --border: #1f2a44;
    --soft: #0f172a;
    --card: #0f172a;
    --shadow: 0 8px 24px rgba(0, 0, 0, .35);
}

body {
    font: 1rem/1.6 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--fg);
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--brand);
    text-decoration: none;
}

a:hover {
    color: var(--brand-2);
}

.container {
    width: min(1120px, 100% - 2rem);
    margin-inline: auto;
    align-items: center;
}

.grid {
    display: grid;
    gap: 1rem;
}

@media(min-width:768px) {
    .grid-md-2 {
        grid-template-columns: 1fr 1fr
    }

    .grid-md-3 {
        grid-template-columns: repeat(3, 1fr)
    }

    .grid-md-4 {
        grid-template-columns: repeat(4, 1fr)
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    border: 1px solid var(--border);
    padding: .7rem 1rem;
    border-radius: 12px;
    background: var(--card);
    color: var(--fg);
    cursor: pointer;
    transition: .2s;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.btn-ghost {
    background: transparent;
}

.badge {
    display: inline-block;
    padding: .25rem .6rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand) 8%, transparent);
    color: var(--brand);
    font-size: .8rem;
    font-weight: 700;
}

.badge:hover {
    background: color-mix(in srgb, var(--brand) 50%, transparent);
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
}

.section {
    padding: 3.5rem 0;
}

.section-muted {
    background: var(--soft);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.2;
    color: var(--brand);
}

.subtitle {
    color: var(--muted);
}

.list {
    padding-left: 1.1rem;
}

.list li {
    margin: .35rem 0;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 0.5rem;
}

.logos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 2rem;
}

@media(min-width:600px) {
    .logos {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media(min-width:992px) {
    .logos {
        grid-template-columns: repeat(4, 1fr);
    }
}

.logo {
    border-style: solid 1px black;
    border-radius: 12px;
    height: 8em;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--soft);
    color: var(--muted);
}

.footer {
    border-top: 1px solid var(--border);
    padding: 1.25rem 0;
}

/* Nav */
.nav {
    position: sticky;
    top: 0;
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--border);
    z-index: 50;
    display: flex;
    align-items: space-between;
}

.nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: 80px;
}

.brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-weight: 700;
}

.nav-links {
    display: none;
    gap: 1rem;
    align-items: center;
}

.nav-actions {
    display: flex;
    gap: .5rem;
    align-items: center;
}

.brand .bolt {
    width: 22px;
    height: 22px;
    fill: var(--brand);
}

@media(min-width:900px) {
    .nav-links {
        display: flex;
    }

    .nav-toggle {
        display: none;
    }
}

.nav-menu {
    display: none;
}

/* Hero */
.hero {
    padding: 3rem 0;
    background:
        radial-gradient(1200px 600px at 20% -10%, color-mix(in srgb, var(--brand) 15%, transparent), transparent),
        radial-gradient(1000px 600px at 110% -20%, color-mix(in srgb, var(--brand-2) 12%, transparent), transparent);
    border-bottom: 1px solid var(--border);
}

/* Forms */
.field {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.input,
.textarea,
select {
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--fg);
    padding: .7rem .8rem;
    border-radius: 12px;
    outline: none;
}

.input:focus,
.textarea:focus,
select:focus {
    border-color: var(--brand);
}

.textarea {
    min-height: 120px;
    resize: vertical;
}

.row {
    display: grid;
    gap: 1rem;
}

@media(min-width:700px) {
    .row-2 {
        grid-template-columns: 1fr 1fr;
    }
}

/* Floating action */
.fab {
    position: fixed;
    right: 16px;
    bottom: 16px;
    border-radius: 999px;
    padding: .9rem 1rem;
}

/* Utilities */
.mt-0 {
    margin-top: 0;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-1 {
    margin-top: .5rem;
}

.mb-1 {
    margin-bottom: .5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.center {
    text-align: center;
}

.muted {
    color: var(--muted);
}

.bold {
    font-weight: 700;
}

.icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.carousel-section {
  margin: 50px 0;
  text-align: center;
  overflow: hidden;
}

.carousel-section h2 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #222;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.carousel-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  align-items: center;
  animation: scroll 40s linear infinite;
  width: max-content;
}

.carousel-track:hover {
  animation-play-state: paused; /* pausa ao passar o mouse */
}

.carousel-item {
  flex: 0 0 auto;
  margin: 0 20px;
  transition: transform 0.3s ease;
}

.carousel-item img {
  height: 100px;
  width: auto;
  object-fit: contain;
  filter: grayscale(0.2);
  transition: transform 0.3s ease, filter 0.3s ease;
}

.carousel-item:hover img {
  transform: scale(1.1);
  filter: grayscale(0);
}

/* animação contínua */
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); } /* metade, pois duplicamos itens */
}

@media (max-width:600px) {
  .carousel-item img { height: 50px; margin: 0 10px; }
}

.flip {
    position: relative;
    display: inline-block;
    margin-top: 10px;
    margin-right: calc(30px / 3);
    margin-left: calc(30px / 3);
    width: 350px;
    text-align: center;
    background-color: transparent;
    opacity: 0.9;
    >.front,
    >.back {
        display: block;
        color: white;
        width: inherit;
        background-size: cover!important;
        background-position: center!important;
        height: 220px;
        padding: 1em 2em;
        background: #C1B8C8;
        border-radius: 10px;
        transition-timing-function: cubic-bezier(.175, .885, .32, 1.275);
        transition-duration: .5s;
        transition-property: transform, opacity;
        h3 {
            font-size: 1.5em;
            font-weight: 700;
            color: whitesmoke;
            text-shadow: 0px 0px 20px #000000;
        }
        p {
            display: block;
            font-size: 0.8rem;
            line-height: 200%;
            font-weight: 700;
            letter-spacing: 0.1rem;
            text-shadow: 0px 0px 20px #000000;
        }
    }
    >.front {
        transform: rotateY(0deg);
    }
    >.back {
        position: absolute;
        opacity: 0;
        top: 0px;
        left: 0px;
        width: 100%;
        height: 100%;
        transform: rotateY(-180deg);
    }
    &:hover {
        >.front {
            transform: rotateY(180deg);
        }
        >.back {
            opacity: 1;
            transform: rotateY(0deg);
        }
    }
}


/* === Patch: garantir legibilidade dos títulos sobre imagens === */

/* Container do card do serviço (adapte se seu HTML usar outra classe) */
.service-item {
  position: relative;
  overflow: hidden;         /* importante para clipping de bordas/overlay */
  border-radius: 12px;      /* manter mesmo radius dos cards */
  display: block;
}

/* Se a imagem é <img> dentro do card */
.service-item img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  vertical-align: middle;
}

/* camada escura leve sobre a imagem para contraste */
.service-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0.28) 100%);
  pointer-events: none;
  z-index: 1;
}

/* título sobre a imagem */
.service-item .service-title,
.service-item .card-title,
.service-item h3 {
  position: absolute;
  left: 16px;
  top: 16px;                 /* ou bottom:16px conforme desejar */
  margin: 0;
  z-index: 2;                /* acima do overlay */
  color: #ffffff;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1;
  text-shadow: 0 4px 14px rgba(0,0,0,0.6); /* garante leitura em áreas claras */
  -webkit-font-smoothing: antialiased;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04); /* leve fundo para suavizar */
}

/* variante quando o titulo precisa estar centralizado */
.service-item .service-title.center {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

/* ajuste mobile (tamanhos) */
@media (max-width: 860px) {
  .service-item .service-title,
  .service-item .card-title,
  .service-item h3 {
    font-size: 1rem;
    left: 12px;
    top: 12px;
    padding: 6px 8px;
  }
}

