/* ============================================
   Moranduba - Estilos Principais
   Baseado no Manual de Identidade Visual (MIV)
   ============================================ */

/* ----- Variáveis ----- */
:root {
  --terracota: #D95032;
  --terracota-hover: #c4462a;
  --verde-turquesa: #027373;
  --verde-turquesa-hover: #015b5b;
  --amarelo-ouro: #F2B705;
  --amarelo-ouro-hover: #d9a304;
  --preto-grafite: #1A1A1A;
  --off-white: #F4F4F2;
  --off-white-dark: #e8e8e5;
  --cinza-claro: #cccccc;
  --cinza-texto: #6b6b6b;

  --font-heading: 'Montserrat', 'Syne', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --container-width: 1200px;
  --container-padding: 20px;
  --transition: 0.2s ease;
}

/* ----- Reset & Base ----- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--preto-grafite);
  background: var(--off-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--terracota);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--terracota-hover);
}

/* ----- Container ----- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* ----- Header / Navegação ----- */
.site-header {
  background: var(--preto-grafite);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--terracota);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-img {
  display: block;
}

.logo-desktop {
  max-height: 42px;
  width: auto;
}

.logo-mobile {
  display: none;
  max-height: 32px;
  width: auto;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.main-nav a {
  color: var(--off-white);
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.5rem 0;
  position: relative;
  transition: color var(--transition);
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--terracota);
  transition: width var(--transition);
}

.main-nav a:hover {
  color: var(--terracota);
}

.main-nav a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--off-white);
  border-radius: 2px;
  transition: all var(--transition);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ----- Hero ----- */
.hero {
  background: linear-gradient(135deg, var(--preto-grafite) 0%, #2a2a2a 100%);
  color: var(--off-white);
  padding: 5rem 0 4rem;
  text-align: center;
}

.hero-content {
  max-width: 720px;
  margin: 0 auto;
}

.hero-icon {
  margin-bottom: 1.5rem;
}

.hero-icon img {
  margin: 0 auto;
  width: 80px;
  height: 80px;
}

.hero-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 3rem;
  line-height: 1.1;
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

.hero-slogan {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  color: var(--off-white);
  opacity: 0.7;
  letter-spacing: 4px;
  text-transform: uppercase;
}

/* ----- Seções ----- */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.75rem;
  color: var(--preto-grafite);
  margin-bottom: 1rem;
}

.section-divider {
  width: 60px;
  height: 3px;
  background: var(--terracota);
  margin: 0 auto;
  border-radius: 2px;
}

.featured-posts {
  padding: 4rem 0;
}

/* ----- Grid de Posts ----- */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.post-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: transform var(--transition), box-shadow var(--transition);
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.post-card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--off-white-dark);
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card-body {
  padding: 1.25rem;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--cinza-texto);
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.post-categories a {
  color: var(--verde-turquesa);
  font-weight: 500;
}

.post-categories a:hover {
  color: var(--verde-turquesa-hover);
}

.post-card-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.post-card-title a {
  color: var(--preto-grafite);
}

.post-card-title a:hover {
  color: var(--terracota);
}

.post-card-excerpt {
  font-size: 0.9375rem;
  color: var(--cinza-texto);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.read-more {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--terracota);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.read-more:hover {
  color: var(--terracota-hover);
}

/* ----- Single Post / Article ----- */
.post-article {
  padding: 3rem 0;
}

.post-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2rem;
}

.post-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 2.25rem;
  line-height: 1.2;
  margin: 1rem 0 0.75rem;
}

.post-description {
  font-size: 1.125rem;
  color: var(--cinza-texto);
  line-height: 1.6;
}

.post-featured-image {
  max-width: 960px;
  margin: 0 auto 2rem;
  border-radius: 8px;
  overflow: hidden;
}

.post-content {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.0625rem;
  line-height: 1.8;
}

.post-content p {
  margin-bottom: 1.25rem;
}

.post-content h2,
.post-content h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.post-content h2 { font-size: 1.5rem; }
.post-content h3 { font-size: 1.25rem; }

.post-content a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-content blockquote {
  border-left: 3px solid var(--terracota);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: var(--cinza-texto);
  font-style: italic;
}

.post-footer {
  max-width: 720px;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--off-white-dark);
}

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.post-nav-link {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.9375rem;
  max-width: 45%;
}

.post-nav-prev { text-align: left; }
.post-nav-next { text-align: right; }

/* ----- List Page ----- */
.list-page {
  padding: 4rem 0;
}

.list-header {
  text-align: center;
  margin-bottom: 3rem;
}

.list-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 2rem;
  margin-bottom: 1rem;
}

/* ----- Category Cloud ----- */
.category-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  max-width: 720px;
  margin: 0 auto;
}

.category-item {
  background: #fff;
  border: 1px solid var(--off-white-dark);
  border-radius: 8px;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.category-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.category-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  text-decoration: none;
}

.category-name {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--preto-grafite);
}

.category-count {
  background: var(--terracota);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  min-width: 1.5rem;
  text-align: center;
}

/* ----- Empty State ----- */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--cinza-texto);
  font-size: 1.125rem;
}

/* ----- Footer ----- */
.site-footer {
  background: var(--preto-grafite);
  color: var(--off-white);
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.footer-slogan {
  font-size: 0.8125rem;
  opacity: 0.6;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.footer-links nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--off-white);
  font-size: 0.875rem;
  opacity: 0.7;
}

.footer-links a:hover {
  color: var(--terracota);
  opacity: 1;
}

.footer-credit {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 1.5rem;
}

.footer-credit p {
  font-size: 0.8125rem;
  color: var(--off-white);
  opacity: 0.6;
}

.footer-credit .heart {
  color: var(--terracota);
  display: inline-block;
}

.footer-credit a {
  color: var(--terracota);
  opacity: 0.8;
  font-weight: 500;
}

.footer-credit a:hover {
  opacity: 1;
  color: var(--terracota-hover);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  font-size: 0.8125rem;
  opacity: 0.5;
}

.footer-notice {
  text-align: center;
  padding: 0.5rem 0;

}

.footer-privacy {
  text-align: center;
  padding-top: 1.5rem;
  font-size: 0.8125rem;
  opacity: 0.5;
}

.footer-notice p {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--amarelo-ouro);
  opacity: 0.8;
  margin: 0;
}

/* ----- Responsivo ----- */
@media (max-width: 768px) {
  .site-header .container {
    height: 56px;
  }

  .logo-desktop {
    display: none;
  }

  .logo-mobile {
    display: block;
  }

  .main-nav {
    position: fixed;
    top: 56px;
    right: -100%;
    width: 260px;
    height: calc(100vh - 56px);
    background: var(--preto-grafite);
    padding: 2rem;
    transition: right var(--transition);
  }

  .main-nav.open {
    right: 0;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0.5rem;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: 3rem 0 2.5rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-slogan {
    font-size: 0.8125rem;
    letter-spacing: 3px;
  }

  .posts-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .post-title {
    font-size: 1.5rem;
  }

  .post-content {
    font-size: 1rem;
  }

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

  .footer-links nav ul {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  :root {
    --container-padding: 16px;
  }

  .hero-title {
    font-size: 1.625rem;
  }

  .posts-grid {
    grid-template-columns: 1fr;
  }

  .post-nav {
    flex-direction: column;
  }

  .post-nav-link {
    max-width: 100%;
  }

  .post-nav-next {
    text-align: left;
  }
}

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