/*
Theme Name: Portal OdontoLaser
Theme URI: https://dentallaserhub.com
Author: Diego Kamui
Author URI: https://diegokamui.com
Description: Tema oficial do Portal OdontoLaser - Veículo Internacional de Mídia Científica e Odontologia Humanizada. ISSN 2965-4084.
Version: 1.0.0
License: Proprietary
Text Domain: odontolaser
*/

/* ==========================================================================
   PORTAL ODONTOLASER - ARCHITECTURE DE CABEÇALHO & GRADE 100% ALINHADA
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --brand-primary: #007791;       /* Teal Clínico Odontológico */
  --brand-primary-dark: #004D5E;  /* Teal Escuro */
  --brand-teal: #0D9488;          /* Verde Água */
  --brand-laser: #D97706;         /* Âmbar do Laser */
  --brand-alert: #C53030;         /* Vermelho G1 */
  
  --bg-main: #FFFFFF;
  --bg-section: #F8FAFC;
  --bg-sidebar: #F8FAFC;
  --bg-dark-hero: #0F172A;
  
  --text-main: #0F172A;
  --text-body: #334155;
  --text-muted: #64748B;
  --border-light: #E2E8F0;
  --border-dark: #CBD5E1;
  
  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 4px 14px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 8px 22px rgba(0, 119, 145, 0.12);

  --font-heading: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--brand-primary);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Prevenção de estouro em Grids */
.hero-portal-grid > *,
.g1-layout-grid > *,
.dense-news-list > *,
.authority-grid > *,
.audio-grid > * {
  min-width: 0;
}

/* ==========================================================================
   1. BARRA SUPERIOR UTILITÁRIA (TOP BAR)
   ========================================================================== */
.g1-top-bar {
  background-color: #0F172A;
  color: #94A3B8;
  font-size: 0.78rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 10;
}

.g1-top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.g1-top-left {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  white-space: nowrap;
}

.issn-badge {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid #38BDF8;
  color: #38BDF8;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.72rem;
  white-space: nowrap;
}

.g1-top-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  white-space: nowrap;
}

.lang-switcher {
  font-weight: 700;
  color: #FFFFFF;
  background: rgba(255,255,255,0.12);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
}

/* ==========================================================================
   2. CABEÇALHO DO PORTAL EM 2 NÍVEIS (ALINHAMENTO PERFECT GRID 1240PX)
   ========================================================================== */
.portal-header {
  background-color: #FFFFFF;
  border-bottom: 2px solid var(--brand-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.header-brand-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 0;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 2.3rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.8px;
  line-height: 1;
}

.brand-title span {
  color: var(--brand-primary);
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-top: 0.2rem;
}

.header-badges {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-badge {
  background-color: #E0F2FE;
  color: var(--brand-primary);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Barra de Navegação Principal Alinhada com a Grade (Span 1240px) */
.portal-nav-bar {
  background-color: #F8FAFC;
  border-top: 1px solid var(--border-light);
}

.portal-nav-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.5rem;
}

.nav-menu {
  display: flex;
  gap: 0;
  list-style: none;
  font-weight: 700;
  font-size: 0.92rem;
  width: 100%;
}

.nav-menu li {
  flex: 1 1 0;
  text-align: center;
}

.nav-menu a {
  display: block;
  padding: 0.85rem 0.5rem;
  color: var(--text-main);
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-menu a:hover {
  background-color: #FFFFFF;
  color: var(--brand-primary);
  border-bottom-color: var(--brand-primary);
}

.nav-menu a.active {
  background-color: #FFFFFF;
  color: var(--brand-primary);
  border-bottom-color: var(--brand-primary);
  font-weight: 800;
}

/* Botão Hamburguer Mobile */
.mobile-menu-toggle {
  display: none;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-dark);
  font-size: 1.1rem;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  color: var(--text-main);
  margin: 0.5rem 0;
}

/* Plantão de Notícias */
.breaking-news-bar {
  background-color: #FEF2F2;
  border-bottom: 1px solid #FCA5A5;
  color: #991B1B;
  padding: 0.65rem 0;
  font-size: 0.88rem;
}

.breaking-news-bar .container {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.tag-plantao {
  background-color: var(--brand-alert);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  text-transform: uppercase;
  flex-shrink: 0;
  white-space: nowrap;
}

/* ==========================================================================
   3. BUSCA GLOBAL & MODULO HERO DE CAPA
   ========================================================================== */
.search-wrapper {
  margin: 2rem 0 1.5rem;
}

.portal-search-input {
  width: 100%;
  padding: 0.95rem 1.4rem;
  border: 1.5px solid var(--border-dark);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: var(--font-body);
  outline: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.portal-search-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 4px 14px rgba(0, 119, 145, 0.15);
}

.hero-portal-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 2rem;
  margin-top: 1rem;
  align-items: stretch;
}

.hero-main-article {
  background: var(--bg-main);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.hero-main-img {
  position: relative;
  height: 380px;
  width: 100%;
  overflow: hidden;
  background-color: #0F172A;
}

.hero-main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hero-main-article:hover .hero-main-img img {
  transform: scale(1.03);
}

.hero-main-content {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.hero-main-content h1 {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.28;
  margin: 0.6rem 0 1rem;
}

.hero-main-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero-sub-stack {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.hero-sub-card {
  background: var(--bg-main);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 1rem;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1.2rem;
  align-items: center;
  box-shadow: var(--shadow-subtle);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-sub-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.hero-sub-card img {
  width: 110px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
}

.hero-sub-card h3 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-main);
}

/* ==========================================================================
   4. INDICADORES DE AUTORIDADE CIENTÍFICA (GRID 4 COLUNAS PERFEITO)
   ========================================================================== */
.authority-bar-section {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  color: #FFFFFF;
  padding: 1.8rem 0;
  margin: 3.5rem 0;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.25);
}

.authority-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
  align-items: center;
}

.authority-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.authority-item span {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.authority-item strong {
  display: block;
  font-size: 0.88rem;
  color: #38BDF8;
  line-height: 1.2;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.authority-item small {
  font-size: 0.74rem;
  color: #94A3B8;
  line-height: 1.25;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   5. HUB DE AUDIOBOOKS & PODCASTS CIENTÍFICOS
   ========================================================================== */
.audio-hub-section {
  background: linear-gradient(135deg, #064E3B 0%, #0F172A 100%);
  color: #FFFFFF;
  padding: 3rem 0;
  margin: 3.5rem 0;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(6, 78, 59, 0.25);
  border: 1px solid #10B981;
}

.audio-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2rem;
}

.audio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.audio-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.audio-badge-ia {
  background: rgba(52, 211, 153, 0.2);
  border: 1px solid #34D399;
  color: #6EE7B7;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 0.8rem;
  white-space: nowrap;
}

.audio-card h4 {
  font-size: 1.02rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.4;
  margin-bottom: 0.6rem;
}

.audio-player-control {
  margin-top: 1.2rem;
  background: rgba(0, 0, 0, 0.35);
  padding: 0.8rem 1rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.audio-play-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: #10B981;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  border: none;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.audio-play-btn:hover {
  transform: scale(1.08);
}

.audio-waveform {
  flex-grow: 1;
  height: 18px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.audio-bar-wave {
  width: 3px;
  background: #34D399;
  border-radius: 2px;
  animation: wavePulse 1.2s infinite ease-in-out alternate;
}

@keyframes wavePulse {
  0% { height: 4px; }
  100% { height: 18px; }
}

/* ==========================================================================
   6. LAYOUT PRINCIPAL: FEED DENSO EM LISTA + SIDEBAR INSTITUCIONAL
   ========================================================================== */
.g1-layout-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 3rem;
  margin-top: 2.5rem;
  align-items: start;
}

.section-title-bar {
  border-bottom: 3px solid var(--brand-primary);
  padding-bottom: 0.6rem;
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.section-title-bar h2 {
  font-size: 1.75rem;
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.dense-news-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.dense-news-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.8rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-light);
  align-items: start;
}

.dense-news-item img {
  width: 200px;
  height: 130px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow-subtle);
}

.dense-news-content {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.cat-tag {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
}

.dense-news-content h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-main);
  margin: 0.2rem 0;
}

.dense-news-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-top: 0.4rem;
}

/* Sidebar Institucional Ajustada */
.g1-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
}

.sidebar-widget {
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1.8rem;
  box-shadow: var(--shadow-subtle);
}

.sidebar-widget h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  border-bottom: 3px solid var(--brand-primary);
  padding-bottom: 0.6rem;
  margin-bottom: 1.4rem;
  letter-spacing: -0.2px;
}

.widget-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.widget-list li {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
  border-bottom: 1px dashed var(--border-dark);
  padding-bottom: 1rem;
}

.widget-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.ad-box-sidebar {
  background: #F8FAFC;
  border: 2px dashed var(--border-dark);
  border-radius: 12px;
  padding: 1.8rem;
  text-align: center;
}

.ad-box-sidebar span {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   7. BIBLIOTECA DIGITAL & RODAPÉ
   ========================================================================== */
.journal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.journal-card {
  background: var(--bg-main);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-subtle);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.journal-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.journal-cover {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
  margin-bottom: 1rem;
}

footer {
  background-color: #0F172A;
  color: #94A3B8;
  padding: 4.5rem 0 2rem;
  margin-top: 5rem;
  border-top: 4px solid var(--brand-primary);
}

.footer-content {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  font-size: 0.9rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.8rem;
  text-align: center;
  font-size: 0.85rem;
}

/* ==========================================================================
   8. REGRAS DE RESPONSIVIDADE (MEDIA QUERIES APERFEIÇOADAS)
   ========================================================================== */
@media (max-width: 1080px) {
  .nav-menu li {
    flex: initial;
  }
  .nav-menu {
    gap: 0.8rem;
    justify-content: space-between;
  }
  .authority-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  .audio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .mobile-menu-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #FFFFFF;
    flex-direction: column;
    padding: 1.8rem;
    box-shadow: 0 12px 28px rgba(0,0,0,0.15);
    border-bottom: 3px solid var(--brand-primary);
    gap: 0;
    align-items: stretch;
  }

  .nav-menu li {
    text-align: left;
  }

  .nav-menu a {
    border-bottom: 1px solid var(--border-light);
    padding: 0.8rem 1rem;
  }

  .nav-menu.active {
    display: flex;
  }

  .g1-layout-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-portal-grid {
    grid-template-columns: 1fr;
  }

  .dense-news-item {
    grid-template-columns: 160px 1fr;
    gap: 1.2rem;
  }

  .dense-news-item img {
    width: 160px;
    height: 110px;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .authority-grid {
    grid-template-columns: 1fr;
  }

  .audio-grid {
    grid-template-columns: 1fr;
  }

  .dense-news-item {
    grid-template-columns: 1fr;
  }

  .dense-news-item img {
    width: 100%;
    height: 180px;
  }

  .g1-top-bar .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .brand-title {
    font-size: 1.7rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   WORDPRESS CORE COMPATIBILITY & UTILITIES
   ========================================================================== */
.admin-bar .portal-header {
  top: 32px;
}
@media screen and (max-width: 782px) {
  .admin-bar .portal-header {
    top: 46px;
  }
}

/* Post Content Formatting */
.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
.article-body p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
}
.article-body h2, .article-body h3, .article-body h4 {
  color: var(--brand-dark, #0F172A);
  margin: 2rem 0 1rem;
  font-family: var(--font-heading);
}
.article-body ul, .article-body ol {
  margin-left: 2rem;
  margin-bottom: 1.5rem;
}
.article-body li {
  margin-bottom: 0.5rem;
}

/* Pagination */
.portal-pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 2.5rem 0;
}
.portal-pagination .page-numbers {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-weight: 600;
  color: var(--text-main);
  transition: all 0.2s;
}
.portal-pagination .page-numbers.current,
.portal-pagination .page-numbers:hover {
  background: var(--brand-primary);
  color: #FFFFFF;
  border-color: var(--brand-primary);
}

/* Comments section */
.comment-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}
.comment-list .comment {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 1.2rem;
  margin-bottom: 1rem;
}
.comment-author {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.6rem;
}
.comment-author img {
  border-radius: 50%;
}
.comment-metadata {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.comment-respond {
  margin-top: 2rem;
  background: #FFFFFF;
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border-light);
}
.comment-form textarea, .comment-form input[type="text"], .comment-form input[type="email"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  margin-top: 0.3rem;
  margin-bottom: 1rem;
  font-family: inherit;
}
.comment-form .form-submit input {
  background: var(--brand-primary);
  color: #FFFFFF;
  border: none;
  padding: 0.7rem 1.8rem;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}
