:root {
  --bg: #101010;
  --surface: #242424;
  --soft: #3a3a3a;
  --text: #f0f0f0;
  --muted: #a0a0a0;
  --brand: #ff4e00; /* Laranja Eletromídia */
  --brand-2: #ff8a5c;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,0.3);
  --font-family: 'Poppins', sans-serif;
}
/* Adicione este bloco logo após o bloco :root */

[data-theme="light"] {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --soft: #e9e9ed;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --brand: #ff4e00; /* Laranja Eletromidia mantido */
  --brand-2: #e64600; /* Laranja mais escuro para contraste */
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

html { scroll-behavior: smooth; }
body {
  margin:0; 
  font-family: var(--font-family);
  color: var(--text); 
  background: var(--bg);
  transition: background 0.3s, color 0.3s;
}
a { color: inherit; text-decoration: none; }
.container{ width: min(1200px, 92%); margin: 0 auto; }
.text-center { text-align: center; }

/* Header & Nav */
header {
  position: sticky; top:0; z-index: 50;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
}
.nav { display:flex; align-items:center; justify-content:space-between; padding: 16px 0; }
.brand { display:flex; align-items:center; gap:12px; font-weight: 600; }
.brand .dot { width:10px; height:10px; border-radius:50%; background: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 20%, transparent); }
.nav-links { display:flex; gap: 16px; }
.nav-links a { font-weight: 500; padding: 8px 12px; border-radius: 8px; transition: background 0.2s; }
.nav-links a:hover { background: var(--soft); color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 8px; }

.btn { display:inline-flex; align-items:center; justify-content:center; gap: 8px; padding: 10px 20px; border-radius: 999px; border: 1px solid var(--brand); background: var(--brand); color: #fff; font-weight:600; font-family: var(--font-family); cursor: pointer; transition: all 0.2s; }
.btn:hover { background: var(--brand-2); border-color: var(--brand-2); transform: translateY(-2px); }
.ghost { background: transparent; color: var(--text); border-color: color-mix(in srgb, var(--text) 25%, transparent); }
.ghost:hover { background: var(--soft); border-color: var(--soft); }
.icon-btn { padding: 8px; width: 40px; height: 40px; }

/* Hamburger Menu */
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 0; z-index: 1001; }
.hamburger span { display: block; width: 25px; height: 3px; background-color: var(--text); margin: 5px 0; border-radius: 3px; transition: all 0.3s; }
.nav-links.active { transform: translateX(0); }
.nav-links.active ~ .overlay { opacity: 1; pointer-events: auto; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 64px 0; }
.hero-video-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; opacity: 0.1; }
.hero-video-bg video { width: 100%; height: 100%; object-fit: cover; }
.hero-content { position: relative; z-index: 1; display:grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; }
.hero-card { background: color-mix(in srgb, var(--surface) 80%, transparent); border: 1px solid color-mix(in srgb, var(--text) 10%, transparent); padding: 32px; border-radius: var(--radius); }
.kicker { color: var(--brand); font-weight:700; letter-spacing:.1em; font-size:.8rem; text-transform: uppercase; }
h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.2; margin: 10px 0 16px; font-weight: 700; }
.lead { color: var(--muted); font-size: clamp(16px, 2vw, 18px); line-height: 1.7; }
.hero-cta { display:flex; gap:12px; margin-top:24px; flex-wrap: wrap; }
.avatar { aspect-ratio: 1/1; width: 100%; max-width: 400px; margin: 0 auto; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }

/* Seções Gerais */
section { padding: 64px 0; }
.section-title { font-size: 32px; font-weight: 700; margin-bottom: 12px; }
.section-sub { color: var(--muted); margin-top: -6px; margin-bottom: 32px; max-width: 720px; line-height: 1.7; }
.section-sub-center { color: var(--muted); margin-top: -6px; margin-bottom: 32px;  line-height: 1.7; text-align: center; }
/* Cards */
.grid { display:grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.card { background: var(--surface); border: 1px solid color-mix(in srgb, var(--text) 10%, transparent); border-radius: var(--radius); padding: 24px; transition: transform 0.3s, box-shadow 0.3s; }
.card:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(0,0,0,0.2); }
.card h3 { margin: 0 0 8px 0; font-size: 18px; font-weight: 600; }
.card p { color: var(--muted); font-size: 15px; line-height: 1.7; margin: 0; }

/* Métricas / Declarações de Valor */
.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}
.kpi {
    background: var(--surface);
    border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
    border-radius: var(--radius);
    padding: 24px;
    text-align: left; /* Mais legível para blocos de texto */
}
.kpi h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--brand); /* Texto principal com a cor de destaque */
    margin: 0 0 8px 0;
    line-height: 1.3;
}
.kpi p {
    color: var(--muted);
    font-size: 15px;
    margin: 0;
    line-height: 1.6;
}

/* Seção Cases */
.case-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.case-image video { width: 100%; border-radius: var(--radius); }

/* Galeria */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); transition: transform 0.3s; }
.gallery-item:hover img { transform: scale(1.05); }

/* ESTILOS PARA A GALERIA COM ROLAGEM LATERAL */
.scrolling-gallery-wrapper {
    width: 100%;
    overflow-x: auto; /* A mágica da rolagem acontece aqui */
    padding-bottom: 20px; /* Espaço para a barra de rolagem não colar nas imagens */
}

/* Estilização da barra de rolagem (opcional, mas elegante) */
.scrolling-gallery-wrapper::-webkit-scrollbar {
    height: 8px;
}
.scrolling-gallery-wrapper::-webkit-scrollbar-track {
    background: var(--surface);
    border-radius: 10px;
}
.scrolling-gallery-wrapper::-webkit-scrollbar-thumb {
    background: var(--soft);
    border-radius: 10px;
}
.scrolling-gallery-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--brand);
}

.scrolling-gallery {
    display: flex;
    flex-wrap: nowrap; /* Impede que os itens quebrem linha */
    gap: 20px;
}

.gallery-item {
    flex-shrink: 0; /* Impede que os itens encolham */
    height: 350px; /* Altura padrão para a galeria da home */
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.3s;
}
.gallery-item:hover {
    transform: scale(1.03);
}

.gallery-item img, .gallery-item video {
    height: 100%;
    width: auto;
    display: block;
}
/* ESTILOS PARA A PÁGINA DE GALERIA COMPLETA */
.full-gallery-grid {
    display: flex;
    flex-wrap: wrap; /* Itens quebram a linha */
    gap: 20px;
}

.full-gallery-item {
    height: 350px; /* Altura padrão para a galeria completa */
    border-radius: var(--radius);
    overflow: hidden;
    flex-grow: 1; /* Permite que os itens cresçam para preencher espaços */
}

.full-gallery-item img, .full-gallery-item video {
    height: 100%;
    width: auto;
    min-width: 100%; /* Garante que preencha o container do item */
    object-fit: cover; /* Cobre o espaço sem distorcer */
}

/* Modal */
dialog { max-width: 1020px; width: 92%; border: 1px solid color-mix(in srgb, var(--text) 10%, transparent); border-radius: var(--radius); padding:0; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(5px); }
.modal-header { display:flex; justify-content: space-between; align-items:center; padding: 16px 24px; border-bottom:1px solid color-mix(in srgb, var(--text) 10%, transparent); }
.modal-header strong { font-size: 18px; }
.modal-body { padding: 24px; max-height: 70vh; overflow-y: auto; }
.scope-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.scope-title { font-size: 16px; font-weight: 600; color: var(--brand); margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid color-mix(in srgb, var(--brand) 20%, transparent); }
.scope-group { margin-bottom: 20px; }
.scope-group h4 { font-size: 14px; font-weight: 600; margin: 0 0 10px 0; }
.taglist{ display:flex; gap:8px; flex-wrap:wrap; }
.tag{ font-size: 12px; padding: 6px 12px; border-radius: 999px; background: var(--soft); border: 1px solid transparent; }
.future-scope { border-color: var(--brand); color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); font-style: italic; }

/* Animação de Scroll */
.animate-on-scroll { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

footer { padding: 48px 0; color: var(--muted); text-align: center; }

/* Responsividade */
@media (max-width: 980px) {
  .hero-content { grid-template-columns: 1fr; }
  .case-wrapper { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links { position: fixed; top: 0; right: 0; height: 100vh; width: 280px; background: var(--surface); flex-direction: column; padding: 80px 20px 20px; gap: 20px; transform: translateX(100%); transition: transform 0.3s ease-in-out; }
  .nav-links.active { transform: translateX(0); box-shadow: -10px 0 30px rgba(0,0,0,0.2); }
  .hamburger { display: block; }
  .hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .hamburger.active span:nth-child(2) { opacity: 0; }
  .hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .section-title { font-size: 28px; }
}

/* Estilos para listas do Modal CV */
.timeline-list, .key-projects-list {
  list-style: none;
  padding-left: 0;
  margin-top: 16px;
}
.timeline-list li, .key-projects-list li {
  padding-left: 20px;
  position: relative;
  margin-bottom: 12px;
  line-height: 1.6;
}
.timeline-list li::before, .key-projects-list li::before {
  content: '■';
  color: var(--brand);
  position: absolute;
  left: 0;
  top: 4px;
  font-size: 12px;
}

/* Efeito de hover e estilo do ícone nos cards */
.card h3 {
  transition: color 0.3s;
}
.card:hover h3 {
  color: var(--brand);
}
.card-icon {
  margin-bottom: 16px;
}
.card-icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--brand);
  transition: transform 0.4s ease-in-out;
}
.card:hover .card-icon svg {
  transform: rotate(10deg) scale(1.1);
}
/* --- ESTILOS PARA O CARROSSEL INFINITO --- */

/* 1. Define a animação de rolagem */
@keyframes scrollAnimation {
  from {
    transform: translateX(0);
  }
  to {
    /* Move o container exatamente pela metade da sua largura total (que será o dobro do original) */
    transform: translateX(-50%);
  }
}

/* 2. Ajusta o container da galeria para a animação */
.scrolling-gallery-wrapper--animated {
  overflow: hidden; /* Esconde a barra de rolagem, pois o movimento é automático */
  -webkit-mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
  mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
}

/* 3. Aplica a animação à galeria */
.scrolling-gallery-wrapper--animated .scrolling-gallery {
  /* O tempo (40s) controla a velocidade. Aumente para mais devagar, diminua para mais rápido. */
  animation: scrollAnimation 40s linear infinite;
}

/* 4. [IMPORTANTE] Pausa a animação quando o mouse está sobre a galeria */
.scrolling-gallery-wrapper--animated:hover .scrolling-gallery {
  animation-play-state: paused;
}