/* ============================================================
   OS - Obras & Serviços | Global CSS (Triider Style)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Manrope:wght@500;600;700;800&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
  font-size: 16px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg-main);
  color: var(--color-text-secondary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative; /* Ajuda a conter overflows absolutos em alguns navegadores */
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-text-primary);
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul, ol { list-style: none; }

button, input, select, textarea {
  font-family: inherit;
  border: none;
  background: none;
  outline: none;
}

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

/* ============================================================
   CONTAINER
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  padding-block: var(--space-16);
}

.section--white {
  background-color: var(--color-bg-main);
}

.section--light {
  background-color: var(--color-bg-secondary);
}

.section--orange {
  background-color: var(--color-accent);
  color: #FFF;
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section__header--light .section__title,
.section__header--light .section__subtitle {
  color: #FFF;
}

.section__title {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 400; /* Headline mais fina */
  color: var(--color-text-primary);
  margin-bottom: var(--space-3);
}

.section__subtitle {
  font-size: 1rem;
  color: var(--color-text-secondary);
}

.section__footer {
  text-align: center;
  margin-top: var(--space-10);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-outline-primary {
  display: inline-flex;
  align-items: center;
  padding: 12px 32px;
  border: 2px solid var(--color-accent);
  border-radius: 0;
  color: var(--color-accent);
  font-weight: var(--weight-bold);
  font-size: 0.9375rem;
  transition: all var(--transition-fast);
}

.btn-outline-primary:hover {
  background-color: var(--color-accent);
  color: #FFF;
}

/* CATEGORIES MOVED TO categories.css */

/* ============================================================
   COMO FUNCIONA — STEPS
   ============================================================ */
.steps__tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: var(--space-10);
  background-color: var(--color-bg-secondary);
  border-radius: 0;
  padding: 4px;
  width: fit-content;
  margin-inline: auto;
}

.steps__tab {
  padding: 10px 24px;
  border-radius: 0;
  font-size: 0.875rem;
  font-weight: var(--weight-semi);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

@media (max-width: 639px) {
  .steps__tabs {
    width: 100%;
    display: flex;
  }
  .steps__tab {
    flex: 1;
    padding: 10px 4px;
    font-size: 0.8rem;
    white-space: normal;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

.steps__tab--active {
  background-color: var(--color-accent);
  color: #FFF;
}

.steps__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

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

.steps__grid--hidden {
  display: none;
}

.steps-wrapper {
  position: relative;
}

/* Oculta no mobile por padrão */
.steps-progress-line {
  display: none;
}
.steps-progress-text {
  display: none;
}

@media (min-width: 768px) {
  .steps-progress-line {
    display: block; /* Volta a aparecer no desktop */
    position: absolute;
    top: 70px; /* Alinhado ao centro dos ícones */
    left: 16.66%; /* Começa bem no meio da primeira coluna */
    width: 66.66%; /* Vai até o meio da última coluna */
    height: 3px;
    background-color: var(--color-border);
    z-index: 0;
  }
  
  .steps-progress-fill {
    width: 0%;
    height: 100%;
    background-color: var(--color-accent);
    position: relative;
    transition: width 0.4s ease-out; /* Mais fluido e suave */
  }
  
  .steps-progress-text {
    display: block; /* Volta a aparecer no desktop */
    position: absolute;
    right: -10px; /* Um pouco à direita de onde a linha termina */
    top: 50%;
    transform: translateY(-50%) translateX(100%);
    color: var(--color-text-primary);
    font-weight: 500;
    font-family: var(--font-heading);
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    width: 0;
    opacity: 0; /* Começa invisível */
  }
  
  .steps-progress-text.type-anim-client {
    animation: typingClient 2s steps(19, end) forwards;
  }
  
  .steps-progress-text.type-anim-pro {
    animation: typingPro 2s steps(14, end) forwards;
  }
}

@keyframes typingClient {
  0% { 
    width: 0;
    opacity: 1;
    border-right: 2px solid var(--color-accent);
  }
  99% { 
    border-right: 2px solid var(--color-accent);
  }
  100% { 
    width: 175px; /* Largura para "Problema resolvido." */
    opacity: 1;
    border-right: transparent;
  }
}

@keyframes typingPro {
  0% { 
    width: 0;
    opacity: 1;
    border-right: 2px solid var(--color-accent);
  }
  99% { 
    border-right: 2px solid var(--color-accent);
  }
  100% { 
    width: 130px; /* Largura para "Mais clientes." */
    opacity: 1;
    border-right: transparent;
  }
}

.step-card {
  background: transparent;
  border: none;
  padding: var(--space-8) 0;
  position: relative;
  z-index: 1;
  text-align: center; /* Centraliza tudo dentro do card */
}

.step-card__icon {
  position: relative;
  z-index: 2;
  display: inline-block;
  background-color: var(--color-bg-main);
  padding: 0 16px;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.step-icon {
  width: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

/* Aba Cliente */
.icon-descreva { height: 100px; }
.icon-compare { height: 100px; }
.icon-contrate { height: 100px; }

/* Aba Profissionais */
.icon-perfil { height: 100px; }
.icon-phone { height: 100px; }
.icon-clientela { height: 100px; }

.step-card__title {
  font-size: 1.125rem;
  font-weight: 500; /* Texto mais fino */
  margin-bottom: var(--space-2);
  color: var(--color-text-primary);
}

.step-card__text {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* ============================================================
   FEATURES (Por que a OS)
   ============================================================ */
.features__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 640px) {
  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.feature-card {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
}

.feature-card__icon {
  width: 56px;
  height: 56px;
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFF;
  margin-bottom: var(--space-5);
}

.feature-card__title {
  font-size: 1rem;
  font-weight: var(--weight-bold);
  color: #FFF;
  margin-bottom: var(--space-2);
}

.feature-card__text {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.6;
}

/* ============================================================
   DEPOIMENTOS (MARQUEE)
   ============================================================ */
.testimonials-marquee-wrapper {
  overflow: hidden;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding: var(--space-4) 0;
}

.marquee-row {
  display: flex;
  gap: var(--space-6);
  width: max-content;
}

.marquee-row:hover {
  animation-play-state: paused;
}

/* Row 1 moves left */
.marquee-row--left {
  animation: marqueeLeft 45s linear infinite;
}

/* Row 2 moves right */
.marquee-row--right {
  animation: marqueeRight 45s linear infinite;
  transform: translateX(-50%);
}

@keyframes marqueeLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-50% - (var(--space-6) / 2))); }
}

@keyframes marqueeRight {
  0% { transform: translateX(calc(-50% - (var(--space-6) / 2))); }
  100% { transform: translateX(0); }
}

.testimonial-card {
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  width: 350px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .testimonial-card {
    width: 260px;
    padding: var(--space-4); /* Padding menor no celular */
  }
  .testimonial-card__text {
    font-size: 0.875rem; /* Fonte ligeiramente menor no celular */
    margin-bottom: var(--space-4);
  }
}

.testimonial-card__stars {
  display: flex;
  gap: 2px;
  color: #FFB800;
  margin-bottom: var(--space-4);
}

.testimonial-card__text {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-6);
  font-style: italic;
}

.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.testimonial-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--color-accent);
  color: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--weight-bold);
  font-size: 1rem;
  flex-shrink: 0;
}

.testimonial-card__avatar--pro {
  background-color: #059669;
}

.testimonial-card__name {
  display: block;
  font-size: 0.9375rem;
  color: var(--color-text-primary);
  margin-bottom: 2px;
  font-weight: 400; /* Tipografia fina conforme solicitado */
}

.testimonial-card__role {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* ============================================================
   CTA BLOCK (Profissional)
   ============================================================ */
.cta-section {
  background-color: #FFFFFF;
}

.cta-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-6);
  padding: var(--space-12) var(--space-8);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

@media (min-width: 768px) {
  .cta-block {
    flex-direction: row;
    text-align: left;
    justify-content: space-between;
  }
}

.cta-block__content {
  flex: 1;
}

.cta-block__title {
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 400;
  margin-bottom: var(--space-2);
}

.cta-block__text {
  font-size: 1rem;
  color: var(--color-text-secondary);
  max-width: 600px;
}

.cta-block__btn {
  display: inline-flex;
  align-items: center;
  padding: 16px 32px;
  background-color: var(--color-accent);
  color: #FFF;
  border-radius: 0;
  font-weight: var(--weight-bold);
  font-size: 1rem;
  white-space: nowrap;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
  flex-shrink: 0;
}

.cta-block__btn:hover {
  background-color: var(--color-accent-dark);
  transform: translateY(-1px);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background-color: #222222;
  color: rgba(255,255,255,0.7);
  padding-block: var(--space-16) var(--space-8);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  margin-bottom: var(--space-12);
}

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

.footer__logo {
  display: inline-block;
  margin-bottom: var(--space-4);
  /* filter: brightness(0) invert(1); -> Removido para usar a cor original */
}

.footer__tagline {
  font-size: 0.9375rem;
  margin-bottom: var(--space-5);
  line-height: 1.6;
}

.footer__col-title {
  font-size: 0.875rem;
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-primary);
  margin-bottom: var(--space-5);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer__links a {
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition-fast);
}

.footer__links a:hover {
  color: var(--color-accent);
}

.footer__contact {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-top: var(--space-6);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.7);
  font-size: 0.875rem;
}

.contact-item + .contact-item::before {
  content: '/';
  color: rgba(255,255,255,0.25);
  font-size: 0.8em;
  margin-right: 6px;
}

.contact-item svg {
  color: var(--color-primary);
  opacity: 0.9;
  flex-shrink: 0;
}

.footer__social-links {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-left: 4px;
}

.footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
  transition: all 0.2s ease;
}

.footer__social-link:hover {
  background: var(--color-primary);
  color: #111;
  transform: translateY(-2px);
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
}

@media (min-width: 768px) {
  .footer__bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer__copyright p {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.4);
}

.footer__badges {
  display: flex;
  align-items: center;
  gap: 16px;
}

.badge-text {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.payment-icons {
  display: flex;
  gap: 12px;
  color: rgba(255,255,255,0.6);
}

/* ==========================================
   SCROLL ANIMATIONS
   ========================================== */
.animate-on-scroll {
  opacity: 0;
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: opacity, transform;
}

.fade-up {
  transform: translateY(30px);
}

.fade-in {
  transform: translateY(0);
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggering delays for grouped items */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
