:root {
  --primary-color: #f7a01a;
  --secondary-color: #2c3e50;
  --dark-bg: #0d1117;
  --darker-bg: #06090c;
  --text-light: #e6edf3;
  --text-muted: #8b949e;
  --accent-blue: #58a6ff;
  --glass-bg: rgba(22, 27, 34, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--dark-bg);
  color: var(--text-light);
  line-height: 1.6;
  overflow-x: hidden;
}

/* =====================
   Header & Navigation
   ===================== */
header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.2rem 5%;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transition: background 0.3s ease;
}

.logo {
  text-decoration: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.logo-img {
  height: 52px;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(130, 40, 200, 0.35));
  transition: filter 0.3s ease, transform 0.3s ease;
}

.logo-img:hover {
  filter: drop-shadow(0 4px 16px rgba(130, 40, 200, 0.6));
  transform: scale(1.04);
}

nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s ease;
  position: relative;
  white-space: nowrap;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-color);
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-left: 1rem;
}

.lang-switcher a {
  font-size: 1.3rem;
  text-decoration: none;
  opacity: 0.45;
  transition: opacity 0.3s, transform 0.3s;
  line-height: 1;
}

.lang-switcher a:hover,
.lang-switcher a.active {
  opacity: 1;
  transform: scale(1.15);
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  transition: color 0.3s;
  order: 1;
}

.hamburger:hover {
  color: var(--primary-color);
}

/* =====================
   Hero Section
   ===================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 5%;
  background-size: cover;
  background-position: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13,17,23,0.25) 0%, rgba(13,17,23,1) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 850px;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.2rem;
  line-height: 1.2;
}

.hero h1 span {
  color: var(--primary-color);
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* =====================
   Button
   ===================== */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--primary-color);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  border-radius: 50px;
  transition: transform 0.3s, box-shadow 0.3s;
  border: none;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(247, 160, 26, 0.4);
}

/* =====================
   General Sections
   ===================== */
section {
  padding: 6rem 5%;
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 1rem;
  font-weight: 700;
}

.section-title span {
  color: var(--primary-color);
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 3.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* =====================
   Philosophy Section
   ===================== */
.philosophy {
  background: var(--darker-bg);
  display: flex;
  align-items: center;
  gap: 4rem;
}

.philosophy-text { flex: 1; }

.philosophy-text h2 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
}

.philosophy-text h2 span {
  color: var(--primary-color);
}

.philosophy-text p {
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.philosophy-image { flex: 1; }

.philosophy-image img {
  width: 100%;
  border-radius: 15px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

/* =====================
   Home Services Preview
   ===================== */
.home-services {
  background: var(--dark-bg);
}

.services-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.service-mini-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  padding: 2rem;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.service-mini-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary-color);
  box-shadow: 0 15px 35px rgba(247, 160, 26, 0.15);
}

.service-mini-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.service-mini-card h3 {
  font-size: 1.1rem;
  color: var(--primary-color);
  margin-bottom: 0.7rem;
}

.service-mini-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.home-services-cta {
  text-align: center;
}

/* =====================
   Services Grid (Servicos page)
   ===================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--darker-bg);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  padding: 0;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  border-color: var(--primary-color);
}

.service-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.service-card-body {
  padding: 1.8rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.service-card h3 {
  font-size: 1.3rem;
  color: var(--primary-color);
}

.service-card p {
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* =====================
   Blog Grid
   ===================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.blog-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  overflow: hidden;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

.blog-card-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--darker-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
}

.blog-content {
  padding: 1.8rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-date {
  color: var(--primary-color);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  display: block;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.blog-content h3 {
  font-size: 1.15rem;
  margin-bottom: 0.8rem;
  line-height: 1.4;
  color: var(--text-light);
  flex: 1;
}

.blog-content p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

.blog-content .btn {
  align-self: flex-start;
  padding: 0.6rem 1.4rem;
  font-size: 0.9rem;
}

/* =====================
   Article Pages
   ===================== */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-blue));
  z-index: 1001;
  transition: width 0.1s linear;
}

.article-hero {
  height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--darker-bg);
  text-align: center;
  padding-top: 5rem;
  padding-left: 5%;
  padding-right: 5%;
  border-bottom: 1px solid var(--glass-border);
}

.article-hero h1 {
  font-size: 2.5rem;
  color: var(--primary-color);
  line-height: 1.3;
  max-width: 800px;
}

.article-meta {
  text-align: center;
  padding: 1.5rem 5% 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.article-breadcrumb {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem 5% 0;
  font-size: 0.85rem;
}

.article-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
}

.article-breadcrumb a:hover {
  color: var(--primary-color);
}

.article-breadcrumb span {
  color: var(--text-muted);
  margin: 0 0.4rem;
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 5% 4rem;
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-light);
}

.article-content h2 {
  color: var(--primary-color);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.6rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--glass-border);
}

.article-content h3 {
  color: var(--text-light);
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  font-size: 1.25rem;
}

.article-content p {
  margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content strong {
  color: #fff;
}

.article-content a {
  color: var(--primary-color);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.article-content a:hover {
  border-bottom-color: var(--primary-color);
}

/* Article Tables */
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  overflow: hidden;
}

.article-content thead th {
  background: rgba(247, 160, 26, 0.12);
  color: var(--primary-color);
  font-weight: 600;
  text-align: left;
  padding: 0.9rem 1rem;
  border-bottom: 2px solid var(--glass-border);
}

.article-content tbody td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--glass-border);
  color: var(--text-muted);
  vertical-align: top;
}

.article-content tbody tr:last-child td {
  border-bottom: none;
}

.article-content tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Article Blockquotes */
.article-content blockquote {
  border-left: 3px solid var(--primary-color);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(247, 160, 26, 0.05);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-muted);
}

/* Article References */
.article-references {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--glass-border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.article-references h3 {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.article-references p {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* Back to Blog */
.article-back {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 5% 3rem;
}

.article-back a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s;
}

.article-back a:hover {
  color: var(--primary-color);
}

/* =====================
   Footer
   ===================== */
footer {
  background: var(--darker-bg);
  padding: 4rem 5% 2rem;
  border-top: 1px solid var(--glass-border);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: var(--primary-color);
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
}

.footer-col p,
.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 0.6rem;
  display: block;
  font-size: 0.95rem;
  transition: color 0.3s;
}

.footer-col a:hover {
  color: var(--text-light);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* =====================
   Contact Page
   ===================== */
.contact-container {
  display: flex;
  flex-wrap: wrap;
  gap: 4rem;
  justify-content: space-between;
}

.contact-info {
  flex: 1;
  min-width: 280px;
}

.contact-info h3 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.contact-info p {
  font-size: 1.05rem;
  margin-bottom: 1.2rem;
  color: var(--text-light);
}

.contact-info strong {
  color: var(--text-muted);
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.2rem;
}

.contact-form {
  flex: 1;
  min-width: 300px;
  background: var(--glass-bg);
  padding: 2.5rem;
  border-radius: 15px;
  border: 1px solid var(--glass-border);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 1rem;
  background: var(--darker-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-light);
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* =====================
   Stat Strip
   ===================== */
.stats-strip {
  background: var(--darker-bg);
  padding: 4rem 5%;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 2rem;
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary-color);
  display: block;
  line-height: 1;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* =====================
   Error Pages
   ===================== */
.error-hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dark-bg);
  text-align: center;
  flex-direction: column;
  gap: 1rem;
  padding-top: 5rem;
}

.error-hero h1 {
  font-size: 8rem;
  color: var(--primary-color);
  line-height: 1;
  font-weight: 800;
}

.error-hero h2 {
  font-size: 2rem;
  color: var(--text-light);
}

.error-hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 500px;
}

/* =====================
   Page Heroes (inner pages)
   ===================== */
.page-hero {
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--darker-bg);
  text-align: center;
  padding: 8rem 5% 4rem;
  border-bottom: 1px solid var(--glass-border);
}

.page-hero h1 {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.page-hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* =====================
   Responsive — Mobile
   ===================== */
@media (max-width: 768px) {
  /* Nav becomes stacked menu */
  nav {
    position: relative;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 1.2rem);
    right: 0;
    background: var(--darker-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.2rem;
    min-width: 200px;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 999;
  }

  .nav-links.open {
    display: flex;
  }

  .hamburger {
    display: block;
  }

  .lang-switcher {
    margin-left: 0;
  }

  /* Hero */
  .hero h1 {
    font-size: 2.2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  /* Philosophy */
  .philosophy {
    flex-direction: column;
    gap: 2rem;
  }

  /* Footer */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
  }

  /* Page hero */
  .page-hero h1 {
    font-size: 2rem;
  }

  /* Contact */
  .contact-container {
    flex-direction: column;
  }

  /* Stats strip */
  .stats-strip {
    gap: 3rem;
  }

  .stat-number {
    font-size: 2.5rem;
  }
}

/* =====================
   Scroll-Reveal Animation
   ===================== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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