body {
  font-family: var(--font-default);
  background: var(--white);
  color: var(--text-color);
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

header {
  background: linear-gradient(180deg, var(--dark-gray) 0%, var(--black) 100%);
  border-bottom: 2px solid var(--gold);
  position: relative;
  z-index: 100;
  box-shadow: var(--shadow-dark);
}

.header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  gap: 24px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-image {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  padding: 4px;
  background: var(--black);
  box-shadow: var(--shadow-gold);
}

nav ul {
  display: flex;
  gap: 32px;
  align-items: center;
  list-style: none;
  margin: 0;
}

nav a {
  font-weight: 500;
  color: var(--cream);
  text-decoration: none;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition);
}

nav a:hover {
  color: var(--gold);
}

.menu-toggle {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--gold);
  transition: var(--transition);
}

.hero-image {
  margin: 32px auto 0 auto;
  display: block;
  max-width: 100%;
  width: 800px;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow-gold);
}

.breadcrumb {
  background-color: var(--white);
  margin-bottom: 0;
  padding: 16px 0;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.breadcrumb ul {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-color);
  list-style: none;
  margin: 0;
}

.breadcrumb a {
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition);
}

.breadcrumb a:hover {
  color: var(--gold);
}

.article-meta-top {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: center;
}

.publish-date {
  color: var(--white);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.reading-time {
  color: var(--white);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-header {
  background: linear-gradient(135deg, var(--black) 0%, var(--dark-gray) 100%);
  padding: 120px 0 40px;
  border-bottom: 3px solid var(--gold);
}

.article-header h1 {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--gold);
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 1px;
}

.article-subtitle {
  font-size: 1.3rem;
  color: var(--cream);
  line-height: 1.6;
  opacity: 0.9;
  font-weight: 300;
}

.article-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 60px;
  margin: 60px auto;
  max-width: 1200px;
}

.article-content {
  background: var(--white);
  padding: 50px;
  box-shadow: var(--shadow-subtle);
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.article-content h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--black);
  margin: 48px 0 20px 0;
  font-weight: 700;
  border-left: 4px solid var(--gold);
  padding-left: 20px;
}

.article-content h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--bronze);
  margin: 36px 0 16px 0;
  font-weight: 600;
}

.article-content p {
  margin-bottom: 20px;
  line-height: 1.9;
  font-size: 1.05rem;
  color: var(--text-color);
}

.article-content strong {
  color: var(--bronze);
  font-weight: 600;
}

.article-content ul,
.article-content ol {
  margin-bottom: 24px;
  padding-left: 28px;
}

.article-content li {
  margin-bottom: 12px;
  line-height: 1.8;
}

.article-content ul li::marker {
  color: var(--gold);
}

.article-content ol li::marker {
  color: var(--gold);
  font-weight: 700;
}

.article-content .code-example {
  background: var(--dark-gray);
  color: var(--cream);
  padding: 20px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 0.95rem;
  margin: 30px 0;
  border: 1px solid var(--gold);
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-x: auto;
}

.article-content .code-example p {
  margin: 0;
  line-height: 1.5;
}

.highlight-box {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, rgba(212, 175, 55, 0.1) 100%);
  border-left: 4px solid var(--gold);
  padding: 24px;
  margin: 32px 0;
  border-radius: 0 8px 8px 0;
}

.highlight-box p {
  margin: 0;
  color: var(--text-color);
  font-style: italic;
}

.tool-box {
  background: var(--medium-gray);
  color: var(--cream);
  padding: 20px 24px;
  margin: 20px 0;
  border-radius: 8px;
  border: 1px solid var(--gold);
  border-left: 4px solid var(--gold);
}

.tool-box strong {
  color: var(--gold);
}

.sidebar {
  position: sticky;
  top: 120px;
  align-self: flex-start;
}

.sidebar-widget {
  background: var(--white);
  padding: 28px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-subtle);
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.sidebar-widget h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--black);
  margin-bottom: 20px;
  font-weight: 700;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 12px;
}

.sidebar-ad-wrapper {
  display: block;
  /* Largura padrão de sidebar para anúncios de display */
  width: 300px;
  /* Garante que ocupe no máximo a largura do contêiner pai */
  max-width: 100%;
  /* Centraliza na coluna (se a coluna for maior que 300px) */
  /* margin: 20px auto; */
  margin: 30px auto;
  text-align: center;
  /* Garante que a borda/padding seja contada DENTRO da largura de 300px */
  box-sizing: border-box;
}


.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-list li {
  margin-bottom: 12px;
}

.toc-list a {
  color: var(--bronze);
  font-size: 0.95rem;
  font-weight: 500;
  display: block;
  padding: 8px 12px;
  border-radius: 4px;
  transition: var(--transition);
  text-decoration: none;
}

.toc-list a:hover {
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold-dark);
  padding-left: 16px;
}

.article-ad-top,
.article-ad-mid,
.article-ad-bottom {
  display: block;
  text-align: center;
  margin: 30px auto;
  min-height: 250px;
}

@media (max-width: 600px) {
  .article-ad-top,
  .article-ad-mid,
  .article-ad-bottom {
    min-height: 80px;
  }
}

/* === CSS da Sidebar === */
/* Se a sua sidebar não tem sticky, você pode remover o CSS de sticky/width. 
   Aqui assumimos que você está usando um CSS externo para a .sidebar-ad-wrapper,
   mas definimos uma margem básica para mobile caso ele vá para o fundo. */
.sidebar-ad-wrapper {
  display: block;
  width: 100%;
  max-width: 336px;
  margin: 30px auto;
  text-align: center;
  box-sizing: border-box;
  min-height: 250px;
}

.code-example {
  background-color: var(--dark-gray);
  color: var(--cream);
  padding: 15px;
  border-radius: 8px;
  overflow-x: auto;
  font-family: monospace;
  font-size: 0.95rem;
  margin: 25px 0;
}

.code-example pre {
  margin: 0;
}

.footer-column li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

@media (max-width: 968px) {
  .article-wrapper {
    display: block;
    grid-template-columns: 1fr;
    gap: 0;
    margin: 30px auto;
    padding: 0 24px;
  }

  .hero-image,
  .content-image {
    width: 100%;
  }

  .sidebar {
    position: relative;
    top: auto;
    width: 100%;
    margin-top: 30px;
  }

  .sidebar-ad-wrapper {
    width: 100%;
    max-width: 336px;
  }

  .article-content {
    padding: 30px 0;
  }

  .article-header h1 {
    font-size: 2.2rem;
  }
}

@media (max-width: 768px) {
  header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1000 !important;
  }

  .article-header {
    margin-top: 15px;
  }

  .header-wrapper {
    padding: 16px 0;
    gap: 16px;
  }

  .logo-container {
    flex: 1;
    min-width: 0;
  }

  .logo-image {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
  }

  .menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--gold);
    font-size: 1.8rem;
    cursor: pointer;
    transition: var(--transition);
    width: 44px;
    height: 44px;
    flex-shrink: 0;
  }

  .menu-toggle:hover {
    transform: scale(1.15);
  }

  .menu-toggle i {
    color: var(--gold) !important;
    font-size: 1.8rem !important;
    line-height: 1 !important;
  }

  nav {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--dark-gray);
    border-top: 2px solid var(--gold);
    z-index: 1999;
    overflow-y: auto;
    max-height: calc(100vh - 80px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  }

  nav.active {
    display: block;
    position: fixed;
    top: 82px;
    /* Altura exata do header no mobile */
    left: 0;
    right: 0;
    width: 100%;
    background: var(--dark-gray);
    border-top: 2px solid var(--gold);
    z-index: 999;
    /* Um nível abaixo do header */
    overflow-y: auto;
    max-height: calc(100vh - 82px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  nav ul {
    flex-direction: column !important;
    padding: 20px 24px !important;
    gap: 16px !important;
    display: flex !important;
  }

  nav li {
    display: block !important;
  }

  nav a {
    display: block !important;
    padding: 12px 0 !important;
    color: var(--cream) !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
  }

  nav a::before {
    display: none !important;
  }

  nav a:hover {
    color: var(--gold) !important;
    padding-left: 8px !important;
  }

  .article-content {
    padding: 24px;
  }

  .article-header h1 {
    font-size: 1.8rem;
  }

  .article-subtitle {
    font-size: 1.1rem;
  }

  .article-content h2 {
    font-size: 1.5rem;
  }

  .sidebar-widget {
    margin-bottom: 16px;
    padding: 16px;
  }

  .sidebar-ad-wrapper {
    width: 100%;
    max-width: 336px;
    min-height: 180px;
  }

  .article-ad-top,
  .article-ad-mid,
  .article-ad-bottom {
    min-height: 180px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .logo-image {
    width: 45px;
    height: 45px;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .section-header h2 {
    font-size: 1.5rem;
  }

  .article-title {
    font-size: 1.2rem;
  }
}
