/*
Theme Name: MEDPUC-Rio
Theme URI: https://med.puc-rio.br
Author: MEDPUC-Rio
Description: Tema oficial do Departamento de Medicina e Saúde da PUC-Rio
Version: 1.0
*/

@import url('https://fonts.googleapis.com/css2?family=Libre+Franklin:wght@400;500;600;700&family=Fjalla+One&family=Barlow+Condensed:wght@400;500&display=swap');

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

body {
  font-family: 'Libre Franklin', Arial, sans-serif;
  color: #000;
  background: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Fjalla One', Arial, sans-serif;
}

img { max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }

/* ── NAVBAR ── */
#site-header {
  background-color: #2b7553;
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-logo img {
  height: 64px;
  width: auto;
  filter: brightness(0) invert(1);
}
.nav-links {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 28px;
  align-items: center;
  font-family: 'Barlow Condensed', Arial, sans-serif;
  font-size: 21px;
  letter-spacing: 0.02em;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a, .nav-links button {
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  transition: opacity 0.2s;
}
.nav-links a:hover, .nav-links button:hover { opacity: 0.75; }

.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 50;
  width: 220px;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block;
  padding: 8px 16px;
  font-size: 14px;
  color: #374151;
  font-family: 'Libre Franklin', sans-serif;
  transition: background 0.15s;
}
.nav-dropdown-menu a:hover { background: #f9fafb; }

.nav-social {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  flex-shrink: 0;
}
.nav-social a { color: #fff; transition: opacity 0.2s; }
.nav-social a:hover { opacity: 0.75; }
.nav-social svg { width: 20px; height: 20px; }

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  margin-left: auto;
  padding: 4px;
}
.nav-hamburger svg { width: 24px; height: 24px; }

.nav-mobile {
  display: none;
  background: #fff;
  border-top: 1px solid #15803d;
  padding: 0 16px 16px;
}
.nav-mobile.open { display: block; }
.nav-mobile a {
  display: block;
  padding: 12px 0;
  font-size: 14px;
  color: #1f2937;
  font-weight: 500;
  border-bottom: 1px solid #f3f4f6;
}
.nav-mobile a:hover { opacity: 0.6; }
.nav-mobile .mobile-group-title {
  padding: 12px 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #f3f4f6;
}
.nav-mobile .mobile-child {
  padding: 8px 0 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-mobile .mobile-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #2b7553;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .nav-links, .nav-social { display: none; }
  .nav-hamburger { display: block; }
}

/* ── CARROSSEL ── */
.hero-carousel {
  position: relative;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16/5;
  display: block;
  margin: 0;
  padding: 0;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s;
}
.hero-slide.active { opacity: 1; }
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 24px;
  z-index: 10;
  transition: background 0.2s;
}
.hero-btn:hover { background: rgba(0,0,0,0.6); }
.hero-btn.prev { left: 12px; }
.hero-btn.next { right: 12px; }
.hero-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}
.hero-dot.active { background: #fff; }

/* ── HOME SECTIONS ── */
.section-gray { background: #f9fafb; }
.section-dark { background: #111827; color: #fff; }

.home-section {
  padding: 64px 16px;
}
.home-grid {
  max-width: 1152px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 768px) {
  .home-grid { grid-template-columns: 1fr; }
  .hero-carousel { aspect-ratio: 16/7; }
}

.home-section h2 {
  font-size: 30px;
  margin-bottom: 24px;
  line-height: 1.2;
}
.home-section p {
  color: #374151;
  line-height: 1.7;
  margin-bottom: 16px;
}
.btn-outline {
  display: inline-block;
  border: 1px solid #000;
  padding: 8px 24px;
  font-size: 14px;
  transition: background 0.2s, color 0.2s;
}
.btn-outline:hover { background: #000; color: #fff; }
.btn-solid {
  display: inline-block;
  background: #000;
  color: #fff;
  padding: 12px 24px;
  font-size: 14px;
  transition: background 0.2s;
}
.btn-solid:hover { background: #1f2937; }

.youtube-cta {
  padding: 48px 16px;
  text-align: center;
}
.youtube-cta a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'Fjalla One', sans-serif;
  font-size: 18px;
  color: #fff;
  transition: opacity 0.2s;
}
.youtube-cta a:hover { opacity: 0.8; }
.youtube-cta svg { width: 32px; height: 32px; fill: #ef4444; }

/* ── NEWS GRID ── */
.news-section {
  max-width: 1152px;
  margin: 0 auto;
  padding: 64px 16px;
}
.news-section h2 {
  font-size: 30px;
  margin-bottom: 40px;
  text-align: center;
}
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 768px) { .news-grid { grid-template-columns: 1fr; } }
@media (max-width: 1024px) and (min-width: 769px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }

.news-card { display: block; }
.news-card-img {
  aspect-ratio: 1;
  overflow: hidden;
  background: #f3f4f6;
  margin-bottom: 12px;
}
.news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.news-card:hover .news-card-img img { transform: scale(1.05); }
.news-card-date {
  font-size: 11px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}
.news-card h3 {
  font-size: 15px;
  line-height: 1.4;
  transition: opacity 0.2s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card:hover h3 { opacity: 0.7; }

/* ── PAGE CONTENT ── */
.page-content {
  max-width: 896px;
  margin: 0 auto;
  padding: 64px 16px;
}
.page-content h1 {
  font-size: 36px;
  margin-bottom: 32px;
}
.page-content p {
  color: #374151;
  line-height: 1.7;
  margin-bottom: 20px;
}

/* ── SINGLE POST ── */
.post-content {
  max-width: 768px;
  margin: 0 auto;
  padding: 64px 16px;
}
.post-content h1 {
  font-size: 32px;
  margin-bottom: 16px;
  line-height: 1.3;
}
.post-meta {
  font-size: 12px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 32px;
}
.post-featured-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  margin-bottom: 32px;
}
.post-body p {
  color: #374151;
  line-height: 1.8;
  margin-bottom: 20px;
}

/* ── CONTACT ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 48px;
}
@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-section h2 {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #234d38;
  margin-bottom: 16px;
  font-family: 'Libre Franklin', sans-serif;
}
.contact-section p { font-size: 14px; color: #374151; margin-bottom: 8px; }
.btn-whatsapp {
  display: inline-block;
  background: #25d366;
  color: #fff;
  padding: 8px 20px;
  font-size: 14px;
  transition: opacity 0.2s;
}
.btn-whatsapp:hover { opacity: 0.9; }

/* ── AMBULATORIO ── */
.alert-box {
  background: #fefce8;
  border: 1px solid #fde68a;
  padding: 16px;
  font-size: 14px;
  color: #374151;
  margin-bottom: 40px;
}
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 768px) { .info-grid { grid-template-columns: 1fr; } }
.info-box {
  border: 1px solid #e5e7eb;
  padding: 24px;
}
.info-box h2 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}

/* ── NUTRICAO ── */
.nutricao-hero img {
  width: 100%;
  object-fit: cover;
  max-height: 400px;
  display: block;
}
.research-item {
  border-left: 4px solid #2b7553;
  padding: 4px 0 4px 16px;
  margin-bottom: 16px;
}
.research-item p { font-size: 14px; color: #374151; line-height: 1.7; margin: 0; }
.ebook-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 640px) { .ebook-grid { grid-template-columns: 1fr; } }
.ebook-item { text-align: center; }
.ebook-item img { width: 100%; border: 1px solid #f3f4f6; margin-bottom: 8px; }
.ebook-item p { font-size: 12px; color: #374151; font-weight: 500; }
.bg-light { background: #f9fafb; padding: 32px; margin-bottom: 64px; }

/* ── FOOTER ── */
#site-footer {
  border-top: 1px solid #e5e7eb;
  margin-top: 64px;
}
.footer-social {
  padding: 24px 16px;
  display: flex;
  justify-content: center;
  gap: 20px;
  color: #6b7280;
}
.footer-social a { color: #6b7280; transition: color 0.2s; }
.footer-social a:hover { color: #000; }
.footer-social svg { width: 20px; height: 20px; }

#puc-footer {
  background: #1a1a2e;
  color: #fff;
  padding: 40px 16px;
}
.puc-footer-inner {
  max-width: 1152px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}
.puc-footer-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}
.puc-footer-logos img { height: 48px; }
.puc-footer-logos img.tall { height: 64px; }
.puc-footer-contact {
  font-size: 13px;
  color: #d1d5db;
  line-height: 1.7;
}
.puc-footer-contact a { text-decoration: underline; }
.puc-footer-contact a:hover { color: #fff; }
.puc-footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.puc-footer-social img { width: 32px; height: 32px; }
.puc-footer-copy { font-size: 11px; color: #6b7280; }

/* ── ARCHIVE ── */
.archive-header {
  max-width: 1152px;
  margin: 0 auto;
  padding: 48px 16px 0;
}
.archive-header h1 { font-size: 32px; margin-bottom: 32px; }

/* ── NOTICIAS GRID ── */
.noticias-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 1024px) { .noticias-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .noticias-grid { grid-template-columns: 1fr; } }

.noticias-card {
  display: block;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #f3f4f6;
  box-shadow: 0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: box-shadow 0.2s;
  color: inherit;
  text-decoration: none;
}
.noticias-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
}
.noticias-card-img {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #f3f4f6;
}
.noticias-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}
.noticias-card:hover .noticias-card-img img { transform: scale(1.05); }
.noticias-card-body    { padding: 20px; }
.noticias-card-date    { font-size: 11px; color: #c8a951; font-weight: 600; margin: 0 0 8px 0; }
.noticias-card-title   {
  font-family: 'Libre Franklin', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  line-height: 1.4;
  margin: 0 0 12px 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.noticias-card-excerpt {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 12px 0;
}
.noticias-card-author  { font-size: 11px; color: #9ca3af; margin: 0; }

.noticias-pagination { padding: 40px 0; text-align: center; }
.noticias-pagination .nav-links { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.noticias-pagination a,
.noticias-pagination span {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid #e5e7eb;
  font-size: 14px;
  color: #374151;
  transition: background 0.15s;
}
.noticias-pagination a:hover  { background: #f9fafb; }
.noticias-pagination .current { background: #2b7553; color: #fff; border-color: #2b7553; }
