/* ========================================
   Blog - Main Stylesheet
   ======================================== */

:root {
  --primary-color: #1a1a1a;
  --secondary-color: #ffffff;
  --accent-color: #0066cc;
  --text-color: #333333;
  --text-light: #666666;
  --border-color: #e0e0e0;
  --background-color: #fafafa;
}

/* ========================================
   Reset & Base Styles
   ======================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--secondary-color);
}

/* ========================================
   Typography
   ======================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

h1 {
  font-size: 2.5rem;
  color: var(--primary-color);
}

h2 {
  font-size: 2rem;
  color: var(--primary-color);
}

h3 {
  font-size: 1.5rem;
  color: var(--primary-color);
}

p {
  margin-bottom: 1em;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #0052a3;
  text-decoration: underline;
}

/* ========================================
   Header & Navigation
   ======================================== */

header {
    background-color: #272727;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

header nav {
    display: flex; /* Make nav a flex container */
    align-items: center; /* Align items vertically */
    gap: 20px; /* Gap between search input and nav list */
}

header nav .nav-list { /* Target the ul specifically */
    font-family: Arial, Helvetica, sans-serif;
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

header nav a {
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    transition: color 0.3s ease;
}

header nav a:hover {
    color: #007bff;
}

/* Estilo para o botão de diagnóstico */
header nav .diagn a {
  font-family: Arial, Helvetica, sans-serif;
    background-color: #0ACA70; /* Cor verde principal */
    color: var(--secondary-color);
    padding: 8px 16px;
    border-radius: 15px;
    font-weight: bold;
}

header nav .diagn a:hover {
    background-color: var(--accent-color); /* Cor azul no hover */
    color: var(--secondary-color); /* Mantém a cor do texto no hover */
}

@media (max-width: 480px) {
  header nav .diagn a {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 12px;
  }
}


/* Botão do Menu Mobile (Hambúrguer) */
.mobile-nav-toggle {
    display: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========================================
   Post Card Styles (from index.css)
   ======================================== */

.post-card {
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden; /* Garante que a imagem arredondada não vaze */
    display: flex;
    flex-direction: column;
}

.post-card-header {
    position: relative;
}

.post-card .capa {
    width: 100%; /* Faz a imagem ocupar toda a largura do card */
    height: 200px; /* Define uma altura fixa para todas as imagens de capa */
    object-fit: cover; /* Redimensiona a imagem para cobrir a área, cortando o excesso */
    display: block;
}



/* ========================================
   Main Content
   ======================================== */

main {
  margin: 0 auto;
  padding: 0 1rem 2rem; /* Remove o padding superior para a hero section colar no header */
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 80px - 150px); /* Altura da viewport menos header e footer (ajuste os valores) */
}

.container {
  background-color: var(--secondary-color);
}

/* ========================================
   Footer
   ======================================== */

footer {
    background-color: #333;
    color: #fff;
    padding: 2rem 0;
    margin-top: 40px;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-text {
    font-size: 0.9rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 15px;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #007bff;
}

/* Imagem banner cases */
.banner-case {
  width: 80%;          /* diminui proporcionalmente */
  max-width: 800px;    /* tamanho máximo */
  margin: 20px auto 50px auto;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.banner-case img {
  width: 100%;         /* faz a imagem acompanhar o tamanho da div */
  height: auto;
  display: block;
}

@media (max-width: 480px) {
  .banner-case {
    border-radius: 12px;   /* bordas menores no celular (opcional) */
    margin: 10px auto;
  }
}

/* Titulo banner cases */
.titulo-cases {
  text-align: center;
  color: #111;
  top: 10px;
  font-size: 23px;
  font-weight: 700;
  font-family: Arial, Helvetica, sans-serif;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.5rem;
  }

  /* Estilos do Menu Mobile */
  .primary-navigation {
    position: fixed;
    inset: 0 0 0 30%;
    z-index: 1000;
    flex-direction: column;
    padding: min(20vh, 10rem) 2em;
    background: hsl(0 0% 15% / 0.9);
    backdrop-filter: blur(1rem);
    transform: translateX(100%);
    transition: transform 350ms ease-out;
  }
  header nav { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; } /* Override desktop flex for nav */

  .primary-navigation[data-visible="true"] {
    transform: translateX(0%);
  }

  .primary-navigation .nav-list {
    flex-direction: column;
    width: 100%; /* Ensure nav list takes full width in mobile menu */
    align-items: flex-start;
    gap: 2rem;
  }

  .mobile-nav-toggle {
    display: block;
    position: absolute;
    z-index: 2000;
    right: 1rem;
    top: 1.5rem;
    background: transparent;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    width: 2rem;
    height: 2rem;
    border: 0;
    cursor: pointer;
  }

  .mobile-nav-toggle[aria-expanded="true"] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M6 6l18 18M24 6L6 24'/%3e%3c/svg%3e");
  }
}

@media (max-width: 480px) {
  main {
    padding: 1rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  nav ul {
    gap: 0.5rem;
  }

  .footer-container {
    padding: 1rem;
  }
}