.top-header {
  text-align: center;
  padding: 26px 20px 14px;
  background: rgba(5, 8, 20, 0.3);
  font-size: 3.25rem;
  font-weight: 900;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1;
}

.brand-link {
  position: relative;
  display: inline-block;
  color: #d4af37;
  background-image:
    linear-gradient(115deg, #2a1606 0%, #8b5418 18%, #d59a32 34%, #fff0a8 48%, #a9651c 61%, #5a2c08 76%, #e1b04a 100%),
    repeating-linear-gradient(35deg, rgba(255,255,255,.26) 0 2px, rgba(0,0,0,.18) 2px 5px, rgba(150,88,18,.28) 5px 9px);
  background-blend-mode: overlay;
  background-size: 180% 180%, 42px 42px;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 2px 0 rgba(42, 22, 6, 0.92),
    0 0 12px rgba(212, 175, 55, 0.18),
    0 0 28px rgba(0, 0, 0, 0.52);
  filter: drop-shadow(0 3px 1px rgba(0,0,0,.62));
  animation: xgrGoldPulse 3.8s ease-in-out infinite;
  transition: filter 0.25s ease, background-position 0.35s ease;
}

.brand-link::after {
  content: "";
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: -8px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 215, 110, 0.48), transparent);
  opacity: 0.55;
}

.brand-link:hover {
  filter: drop-shadow(0 4px 2px rgba(0,0,0,.72)) brightness(1.08);
  background-position: 100% 0, 0 0;
}

@keyframes xgrGoldPulse {
  0%, 100% {
    transform: scale(1);
    text-shadow:
      0 2px 0 rgba(42, 22, 6, 0.92),
      0 0 10px rgba(212, 175, 55, 0.14),
      0 0 24px rgba(0, 0, 0, 0.5);
  }
  48% {
    transform: scale(1.018);
    text-shadow:
      0 2px 0 rgba(42, 22, 6, 0.96),
      0 0 18px rgba(245, 215, 110, 0.3),
      0 0 34px rgba(0, 0, 0, 0.62);
  }
  58% { transform: scale(1.028); }
  68% { transform: scale(1.012); }
}

.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(7, 10, 18, 0.9);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 14px 20px;
  text-align: center;
  z-index: 999;
  overflow: visible;
}

.navbar a,
.nav-dropdown__trigger {
  display: inline-block;
  margin: 0 16px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #f1f1f1;
  transition: color 0.25s ease, opacity 0.25s ease;
}

.navbar a:hover,
.navbar a.active,
.nav-dropdown:hover .nav-dropdown__trigger,
.nav-dropdown:focus-within .nav-dropdown__trigger,
.nav-dropdown.is-open .nav-dropdown__trigger { color: #f5d76e; }

.nav-dropdown { position: relative; display: inline-block; }

.nav-dropdown__trigger {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.nav-dropdown__trigger::after {
  content: "▾";
  margin-left: 6px;
  font-size: 0.72em;
  color: rgba(245, 215, 110, 0.86);
}

.nav-dropdown__menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  min-width: 230px;
  padding: 10px;
  border: 1px solid rgba(245, 215, 110, 0.18);
  border-radius: 14px;
  background: rgba(8, 10, 16, 0.96);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.38);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -6px);
  transition: 0.22s ease;
  text-align: left;
  z-index: 3000;
}

.nav-dropdown:hover .nav-dropdown__menu,
.nav-dropdown:focus-within .nav-dropdown__menu,
.nav-dropdown.is-open .nav-dropdown__menu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.nav-dropdown__menu a {
  display: block;
  margin: 0;
  padding: 11px 12px;
  border-radius: 10px;
  color: #f1f1f1;
  font-size: 0.9rem;
  line-height: 1.25;
}

.nav-dropdown__menu a:hover,
.nav-dropdown__menu a.active { background: rgba(245, 215, 110, 0.08); color: #f5d76e; }

.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 20px 40px;
  text-align: center;
}

.hero-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 42px 28px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.hero h1 { margin: 0 0 18px; font-size: 2.7rem; line-height: 1.15; color: #ffffff; }
.hero p { margin: 0 auto; max-width: 860px; font-size: 1.08rem; line-height: 1.75; color: #d6d9e0; }

.home-hero { max-width: 1180px; padding-top: 86px; }

.home-hero-box {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035)),
    radial-gradient(circle at 18% 20%, rgba(245, 215, 110, 0.09), transparent 32%),
    radial-gradient(circle at 88% 12%, rgba(0, 0, 0, 0.18), transparent 28%);
  border-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.home-hero-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(245, 215, 110, 0.055) 1px, transparent 1px),
    linear-gradient(rgba(245, 215, 110, 0.04) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.72), transparent 85%);
  pointer-events: none;
}

.home-hero-box > * { position: relative; }
.home-hero-box h1 { color: #ffffff; }
.home-hero-box p { color: #d6d9e0; }

.hero-actions { margin-top: 28px; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

.section { max-width: 1100px; margin: 0 auto; padding: 24px 20px 70px; }
.section-title { font-size: 2rem; margin: 0 0 14px; color: #ffffff; text-align: center; }
.section-subtitle { max-width: 840px; margin: 0 auto 34px; text-align: center; color: #cfd3db; line-height: 1.7; font-size: 1rem; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.front-cards { align-items: stretch; }
.cta { text-align: center; padding-top: 8px; }

.xgr-site-footer { margin-top: 80px; padding: 26px 20px 34px; border-top: 1px solid rgba(255,255,255,.08); background: #0b0b0d; }
.xgr-site-footer__inner { width: min(1100px, calc(100% - 8px)); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }

@media (max-width: 940px) { .cards-3 { grid-template-columns: 1fr; } }

@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.15rem; }
  .top-header { font-size: 2.45rem; }
}

@media (max-width: 768px) { .xgr-site-footer__inner { align-items: flex-start; flex-direction: column; } }

@media (max-width: 600px) {
  .top-header { font-size: 2.05rem; padding: 22px 16px 12px; }
  .navbar { padding: 12px 10px; }
  .navbar a,
  .nav-dropdown__trigger { margin: 6px 8px; font-size: 0.88rem; }
  .nav-dropdown__menu { min-width: 210px; top: calc(100% + 8px); }
  .hero { padding: 56px 16px 28px; }
  .hero-box { padding: 30px 18px; }
  .hero h1 { font-size: 1.85rem; }
  .hero p,
  .section-subtitle,
  .card p,
  .highlight-box { font-size: 0.96rem; }
  .section { padding: 18px 16px 55px; }
}

body.page-home,
body.page-automacao,
body.page-xgr-digital,
body.page-xgr-automacao-bi,
body.page-projetos,
body.page-contato,
body.page-sobre {
  background:
    linear-gradient(rgba(5, 8, 20, 0.68), rgba(5, 8, 20, 0.82)),
    url('../../background_hitech_xgr.png') no-repeat center center fixed;
  background-size: cover;
  background-color: #050814;
}

body.page-projetos .hero,
body.page-projetos .section { max-width: 1160px; }
body.page-projetos .section-subtitle,
body.page-projetos .hero p { max-width: 900px; }
