:root {
  /* NOVA PALETA BASEADA EM GRAFITE E DOURADO */
  --bg: #333532;
  /* Grafite Base */
  --bg-dark: #262725;
  /* Grafite ligeiramente mais escuro para profundidade */
  --card-bg: rgba(255, 255, 255, 0.05);
  /* Fundo dos cards */
  --muted: rgba(255, 255, 255, 0.70);
  --dourado: #fed103;
  /* Dourado da marca */

  --radius: 12px;
  --max-width: 1200px;
  font-family: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}

html,
body {
  height: 100%;
  background: var(--bg);
  color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--dourado);
}

/* --- NAVBAR --- */
.navbar {
  position: fixed;
  width: 100%;
  left: 0;
  top: 0;
  padding-top: 1rem;
  padding-bottom: 1rem;
  padding-left: 2rem;
  padding-right: 2rem;
  z-index: 1030;
  background-color: rgba(51, 53, 50, 0.9);
  /* Grafite com transparência suave */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: padding 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Classe aplicada via JS ao fazer scroll */
.navbar.navbar-scrolled {
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
  background-color: rgba(38, 39, 37, 0.98);
  /* Fundo sólido e mais escuro ao descer */
  border-bottom: 1px solid rgba(254, 209, 3, 0.15);
  /* Linha dourada fina e sofisticada */
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.35);
}

.navbar-brand img {
  height: 48px;
  /* Aumentado para melhorar a visibilidade do texto */
  filter: drop-shadow(0 2px 6px rgba(254, 209, 3, 0.25));
  /* Brilho dourado suave */
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s ease;
}

.navbar-brand:hover img {
  transform: scale(1.04);
  /* Micro-animação premium */
  filter: drop-shadow(0 2px 14px rgba(254, 209, 3, 0.5)) brightness(1.05);
}

.navbar .nav-link {
  color: #fff !important;
  font-weight: 600;
}

.navbar .nav-link:hover {
  color: var(--dourado) !important;
}

@media (max-width: 991.98px) {
  .navbar {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .navbar-brand img {
    height: 40px;
    /* Redução para melhor ajuste em dispositivos móveis */
  }

  .navbar.navbar-scrolled {
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
  }
}

/* --- HERO SECTION --- */
#hero {
  position: relative;
  overflow: hidden;
  padding: 100px 0;
  background: radial-gradient(circle at 90% 10%, rgba(254, 209, 3, 0.1), transparent 40%), var(--bg);
}

#hero .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(51, 53, 50, 0.5), var(--bg));
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 2rem;
  font-weight: 700;
  margin-top: 0.5rem;
  line-height: 1.2;
}

.hero-sub {
  color: var(--muted);
  max-width: 52ch;
  margin-top: 1rem;
  margin-bottom: 2rem;
}

#hero .hero-image,
#hero img {
  width: 100% !important;
  height: auto !important;
  object-fit: cover !important;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

/* --- HERO CAROUSEL --- */
.hero-carousel-indicators {
  margin-left: 0;
  margin-right: auto;
  justify-content: flex-start;
  bottom: -40px;
  padding-left: 0;
}

.hero-carousel-indicators [data-bs-target] {
  background-color: var(--dourado) !important;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
  transition: all 0.3s ease;
  opacity: 0.4;
  border: none;
}

.hero-carousel-indicators .active {
  opacity: 1;
  transform: scale(1.3);
}

#heroCarousel .carousel-item {
  transition: transform 0.6s cubic-bezier(0.7, 0, 0.3, 1);
  min-height: 350px;
  /* Garante estabilidade visual em diferentes resoluções */
}

#heroCarousel .carousel-item span {
  display: block;
  margin-bottom: 0.25rem;
}

/* --- BOTÕES --- */
.btn-primary,
.btn-highlight {
  background: linear-gradient(135deg, var(--dourado) 0%, #e6bc02 100%);
  color: #333532;
  border: 0;
  font-weight: 700;
  padding: 0.6rem 1.5rem;
  transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-highlight:hover {
  background: #ffd633;
  color: #222;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(254, 209, 3, 0.3);
}

/* --- SECÇÕES GERAIS --- */
section {
  position: relative;
  padding-top: 60px;
  padding-bottom: 60px;
  transition: background-color 0.3s ease;
}

section:nth-of-type(odd) {
  background-color: var(--bg);
}

section:nth-of-type(even) {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-dark) 100%);
  border-top: 1px solid rgba(254, 209, 3, 0.05);
  border-bottom: 1px solid rgba(254, 209, 3, 0.05);
}

h2 {
  font-weight: 700;
  margin-bottom: 1rem;
}

/* --- SERVICES & OVERLAY EFFECT --- */

/* Fundo escuro */
#service-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1040;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(5px);
}

#service-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.service-card .card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

/* Hover */
.service-card .card:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border-color: rgba(254, 209, 3, 0.3);
  transform: translateY(-5px);
}

/* EXPANDIDO (MODAL) */
.service-card .card.expanded {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 90%;
  max-width: 600px;
  height: auto;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1050;
  background: #262725;
  /* Grafite Sólido */
  border: 1px solid var(--dourado);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.9);
  padding: 20px;
  cursor: default;
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }

  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.service-card .card-body i {
  color: var(--dourado);
}

/* Conteúdo Oculto/Visível */
.service-card .details {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  /* Sem visually-hidden aqui, controlamos tudo via CSS */
}

.service-card .card.expanded .details {
  max-height: 1000px;
  /* Permite que cresça */
  opacity: 1;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  transition: opacity 0.4s ease 0.2s;
  color: #f0f0f0;
  /* Texto mais claro no modo leitura */
}

/* Botão Fechar (X) */
.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.service-card .card.expanded .close-btn {
  opacity: 0.7;
  pointer-events: all;
}

.service-card .card.expanded .close-btn:hover {
  opacity: 1;
  color: var(--dourado);
}

/* --- PORTFOLIO --- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.portfolio-card {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.3s;
}

.portfolio-card:hover {
  transform: translateY(-5px);
}

.portfolio-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.portfolio-card .meta {
  padding: 20px;
}

.portfolio-card .meta h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.portfolio-card .meta p {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
}

/* --- CONTACT FORM --- */
.contact-row i {
  margin-right: 8px;
  color: var(--dourado);
}

.contact-form form {
  padding: 30px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(168, 163, 163, 0.05);
}

.contact-form form input,
.contact-form form textarea {
  background-color: rgba(51, 53, 50, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 8px;
}

/* REGRA NOVA: Clarear o texto de exemplo (Nome, Email...) */
.contact-form form input::placeholder,
.contact-form form textarea::placeholder {
  color: rgba(255, 255, 255, 0.85);
  /* Quase branco */
  opacity: 1;
}

.contact-form form input:focus,
.contact-form form textarea:focus {
  background-color: rgba(51, 53, 50, 0.8);
  border-color: var(--dourado);
  box-shadow: 0 0 0 4px rgba(254, 209, 3, 0.1);
  color: #fff;
  /* Linha nova: garante que o texto fica branco ao escrever */
  outline: none;
}

.contact-form form .btn {
  width: auto;
  min-width: 160px;
  margin-top: 15px;
  display: inline-block;
}

/* --- FOOTER --- */
footer {
  background: var(--bg-dark);
  padding: 30px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.9rem;
}

footer a:hover i {
  color: var(--dourado);
  transform: scale(1.2);
  transition: transform 0.2s;
}

/* --- FLOWSYNC SECTION --- */
.flowsync-card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}

.flowsync-card:hover {
  transform: translateY(-5px);
  border-color: rgba(254, 209, 3, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.flowsync-card .icon-box {
  width: 60px;
  height: 60px;
  background: rgba(254, 209, 3, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--dourado);
  font-size: 1.5rem;
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.flowsync-card:hover .icon-box {
  background-color: var(--dourado);
  color: #333532;
  box-shadow: 0 4px 15px rgba(254, 209, 3, 0.3);
}

.flowsync-card h4 {
  font-weight: 700;
  margin-bottom: 1rem;
  color: #fff;
}

.flowsync-card p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0;
}

/* --- RESPONSIVE --- */
@media(min-width: 992px) {
  .hero-title {
    font-size: 3rem;
  }
}

/* --- LANGUAGE SWITCHER --- */
.language-switch a {
  opacity: 0.4;
  transition: opacity 0.2s ease, transform 0.2s ease, filter 0.2s ease;
  display: inline-block;
}

.language-switch a:hover {
  opacity: 0.8;
  transform: scale(1.1);
}

.language-switch a.active {
  opacity: 1;
  filter: drop-shadow(0 0 4px rgba(254, 209, 3, 0.8));
  pointer-events: none;
}