/* ═══════════════════════════════════════════════════════════════
   NÚCLEO DE SAÚDE JULLIANA ARAGÃO — Main Style
   Aesthetics: Olive Green & Beige (Premium Minimalist)
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg-primary: #E0DDD5;
  --bg-secondary: #F5F5F0;
  --accent-green: #84752B; /* Olive/Mustard Green */
  --accent-brown: #4A3F1F;
  --text-primary: #1A1A1A;
  --text-secondary: #4A3F1F;
  --text-muted: rgba(26, 26, 26, 0.6);
  --white: #FFFFFF;
  --border: rgba(132, 117, 43, 0.2);
  
  --font-heading: 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-serif: 'Playfair Display', serif;
  
  --radius: 8px;
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}
@media (max-width: 768px) {
  .container { padding: 0 24px; }
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; height: auto; display: block; }

/* ═══════ TYPOGRAPHY ═══════ */
h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; text-transform: uppercase; letter-spacing: -1px; }
.serif { font-family: var(--font-serif); font-style: italic; text-transform: none; letter-spacing: 0; }

h1 { font-size: clamp(3rem, 8vw, 5.5rem); line-height: 0.9; margin-bottom: 24px; }
h2 { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.1; margin-bottom: 16px; }

/* ═══════ COMPONENTS ═══════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 18px 42px;
  background-color: var(--accent-green);
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: var(--transition);
}
.btn-primary:hover {
  background-color: var(--accent-brown);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(74, 63, 31, 0.2);
}

.badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(132, 117, 43, 0.1);
  color: var(--accent-green);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-radius: 50px;
  margin-bottom: 20px;
}

/* ═══════ LAYOUT SECTIONS ═══════ */
header {
  padding: 30px 0;
  position: absolute;
  width: 100%;
  top: 0;
  z-index: 100;
}

.nav-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-links {
  display: flex;
  gap: 40px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.hero-text {
  animation: fadeInUp 1s ease;
}

.hero-img-wrapper {
  position: relative;
  background-color: var(--accent-green);
  border-radius: 20px;
  overflow: hidden;
  height: 600px;
}

.hero-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
}

/* ═══════ NEWS SECTION ═══════ */
.news-section {
  padding: 120px 0;
  background-color: var(--bg-secondary);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 60px;
}

.news-card {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: var(--transition);
  color: inherit; /* Herda a cor do elemento pai */
}
.news-card:hover { border-color: var(--accent-green); transform: translateY(-8px); }
.news-card .date { font-size: 0.75rem; color: var(--accent-green); font-weight: 700; margin-bottom: 12px; display: block; }
.news-card h3 { font-size: 1.4rem; margin-bottom: 16px; color: inherit; }
.news-card p { font-size: 0.95rem; color: inherit; opacity: 0.8; }

.text-white { color: var(--white) !important; }
.text-beige { color: var(--bg-primary) !important; }

/* ═══════ MOBILE RESPONSIVIDADE ═══════ */
@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  
  .hero-text h1 { font-size: 2.8rem; }
  .hero-img-wrapper { height: 400px; order: -1; } /* Imagem no topo no mobile */

  .news-grid { grid-template-columns: 1fr; }
  
  header .nav-flex {
    flex-direction: column;
    gap: 15px;
    padding: 20px 0;
  }
  
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 250px;
    height: 100vh;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 100px 40px;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    z-index: 1000;
  }
  
  .nav-links.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
  }

  /* Forçar empilhamento de todas as grids personalizadas inline */
  [style*="display: grid; grid-template-columns: repeat(4, 1fr)"],
  [style*="display: grid; grid-template-columns: repeat(3, 1fr)"],
  [style*="display: grid; grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  /* Corrigir sobreposição da Hero no mobile */
  .hero { padding-top: 120px; min-height: auto; padding-bottom: 60px; }
  .hero-img-wrapper { height: 450px !important; margin-bottom: 30px; }
  .hero-text { order: 2; }
  .hero-img-wrapper { order: 1; }
  
  /* Garantir que botões absolutos ou z-indexed não cubram o rosto */
  [style*="position: absolute"] { position: relative !important; top: 0 !important; transform: none !important; }
}

.overflow-hidden { overflow-x: hidden; }

/* ═══════ ANIMATIONS ═══════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
