/*
Theme Name: ScienceLab Moderno
Author: Laboratório de Bioinformática e Genômica - UFV CRP
Description: Tema acadêmico moderno com design sólido, tipografia Poppins + Lora, e personalização dinâmica de cores.
Version: 4.5
*/

/* -------------------------------
   BASE E VARIÁVEIS
---------------------------------- */
html, body {
  margin: 0;
  padding: 0;
  background: #ffffff;
  color: #333;
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
}

:root {
  --primary-color: #750300;
  --secondary-color: rgba(117,3,0,0.4);
  --tertiary-color: rgba(117,3,0,0.15);
  --header-height: 130px;
  --max-width: 95vw;
}

/* Links gerais */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover, a:focus {
  color: var(--secondary-color);
}

/* -------------------------------
   HEADER
---------------------------------- */
.site-header {
  background: var(--primary-color);
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px 12px 0 0;
  width: var(--max-width);
  margin: 0 auto;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 95%;
  padding-top: 10px;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 15px;
}

.custom-logo {
  max-height: calc(var(--header-height) * 0.9);
  object-fit: contain;
}

.site-identity {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* TÍTULO — amarelo UFV */
.site-title {
  margin: 0;
  font-family: 'Lora', serif;
  font-weight: 700;
  font-size: 1.9em;
}
.site-title a {
  color: #FFD700;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
  text-decoration: none;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}
.site-title a:hover {
  color: var(--secondary-color);
  text-shadow: 2px 2px 5px rgba(0,0,0,0.4);
}

.site-description {
  color: rgba(255,255,255,0.85);
  font-size: 1em;
  margin-top: 4px;
  line-height: 1.3;
}

/* BLOCO DIREITO DO HEADER */
.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
}

.header-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* CAMPO DE PESQUISA */
.header-top form.search-form {
  position: relative;
}
.header-top input.search-field {
  border: none;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 0.9em;
  outline: none;
}
.header-top input.search-submit {
  display: none;
}

/* ÍCONES SOCIAIS */
.header-social a img {
  width: 22px;
  height: 22px;
  filter: brightness(0) invert(1);
  transition: opacity 0.3s;
}
.header-social a:hover img {
  opacity: 0.7;
}

/* -------------------------------
   MENU PRINCIPAL
---------------------------------- */
.main-navigation {
  background: var(--secondary-color);
  width: var(--max-width);
  margin: 0 auto 25px;
  padding: 15px 0;
  text-align: center;
  border-radius: 0 0 8px 8px;
}
.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}
.main-navigation li a {
  display: inline-block;
  background: var(--primary-color);
  color: #fff;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.main-navigation li a:hover {
  background: var(--tertiary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* -------------------------------
   CONTEÚDO E SIDEBAR
---------------------------------- */
.content-area {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: stretch;
  width: var(--max-width);
  margin: 0 auto 40px;
  padding: 30px;
  gap: 25px;
  background: var(--tertiary-color);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  box-sizing: border-box;
}

main {
  flex: 3;
  min-width: 0;
  background: #fff;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* SIDEBAR — ligeiramente mais larga */
.sidebar {
  flex: 1;
  min-width: 300px;
  max-width: 360px;
  align-self: flex-start;
  background: var(--secondary-color);
  border-radius: 10px;
  padding: 25px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

/* Títulos dos widgets */
.sidebar h3.widget-title {
  background: var(--tertiary-color);
  border-radius: 6px;
  padding: 8px 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary-color);
  border: none;
}

/* Links em botões */
.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sidebar ul li a {
  display: block;
  background: var(--tertiary-color);
  color: var(--primary-color);
  text-align: center;
  padding: 10px 15px;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
}
.sidebar ul li a:hover {
  background: var(--primary-color);
  color: #fff;
  transform: translateY(-1px);
}

/* Imagens e selects */
.sidebar img,
.sidebar figure {
  display: block;
  margin: 0 auto 15px;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
.sidebar select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid var(--secondary-color);
  background-color: #fff;
  color: var(--primary-color);
  font-family: 'Poppins', sans-serif;
  font-size: 1em;
  height: 42px;
  box-sizing: border-box;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--secondary-color) 50%),
                    linear-gradient(135deg, var(--secondary-color) 50%, transparent 50%);
  background-position: calc(100% - 18px) center, calc(100% - 12px) center;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}
.sidebar select:hover,
.sidebar select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 4px rgba(117,3,0,0.3);
  outline: none;
}

/* -------------------------------
   TÍTULOS DOS POSTS
---------------------------------- */
h1.entry-title,
h2.entry-title,
h3.entry-title {
  background: var(--tertiary-color);
  color: var(--primary-color);
  padding: 12px 18px;
  border-radius: 10px;
  font-family: 'Lora', serif;
  font-weight: 600;
  margin: 0 0 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: background 0.3s ease, transform 0.2s ease;
}
h1.entry-title:hover,
h2.entry-title:hover,
h3.entry-title:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

/* -------------------------------
   POSTS EM DESTAQUE E GRID
---------------------------------- */
.post-destaque {
  max-width: 70%;
  margin: 0 auto 40px;
  text-align: center;
}
.post-destaque img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  max-height: 450px;
}
.grid-posts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  max-width: 85%;
  margin: 0 auto 40px;
}
.grid-item {
  background: #fff;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.grid-item img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  max-height: 250px;
}

/* -------------------------------
   RESULTADOS DE PESQUISA
---------------------------------- */
.search-title {
  background: var(--tertiary-color);
  color: var(--primary-color);
  padding: 12px 18px;
  border-radius: 10px;
  font-family: 'Lora', serif;
  font-weight: 600;
  margin-bottom: 25px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.search-title .highlight-term {
  color: var(--primary-color);
  background: rgba(255, 215, 0, 0.3);
  padding: 2px 8px;
  border-radius: 5px;
  font-weight: 700;
}
.search-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  max-width: 85%;
  margin: 0 auto 40px;
}
.search-item {
  background: #fff;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.search-item img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  max-height: 250px;
}

/* -------------------------------
   RODAPÉ
---------------------------------- */
footer {
  background: var(--secondary-color);
  color: #fff;
  text-align: center;
  padding: 30px 0;
  border-radius: 0 0 12px 12px;
  width: var(--max-width);
  margin: 0 auto;
}
footer a {
  color: #fff;
  text-decoration: underline;
}
.footer-copy {
  font-size: 0.9em;
  opacity: 0.9;
  font-style: italic;
}

/* -------------------------------
   RESPONSIVO
---------------------------------- */
@media (max-width: 1000px) {
  .content-area {
    flex-direction: column;
  }
  .sidebar {
    margin-top: 25px;
    width: 100%;
    max-width: none;
  }
}
@media (max-width: 600px) {
  .main-navigation ul {
    flex-direction: column;
    gap: 10px;
  }
  .header-inner {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
}

/* ============================================
   AJUSTE: LOGO E IDENTIDADE DO SITE NO HEADER
   ============================================ */
.site-header .site-branding {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 15px;
  flex-wrap: nowrap;
}

.site-header .custom-logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-header .custom-logo {
  max-height: calc(var(--header-height) * 0.8);
  width: auto;
  height: auto;
  margin: 0;
}

.site-header .site-identity {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

.site-header .site-title,
.site-header .site-description {
  margin: 0;
  line-height: 1.3;
  color: #fff;
}

.site-header .site-description {
  font-size: 0.9em;
  opacity: 0.9;
}

/* Garante que o header-right apareça mesmo com logo ativo */
.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  flex: 1;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 95%;
  margin: 0 auto;
}
/* ============================================
   AJUSTE: LAYOUT DE ARQUIVOS E BUSCA
   ============================================ */
.archive .post,
.search .post {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 25px;
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.archive .post:hover,
.search .post:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

/* Miniatura à esquerda */
.archive .post-thumbnail,
.search .post-thumbnail {
  flex: 0 0 35%;
  max-width: 300px;
}
.archive .post-thumbnail img,
.search .post-thumbnail img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
}

/* Bloco de texto */
.archive .entry-content,
.search .entry-summary {
  flex: 1;
  color: #333;
  font-size: 1em;
  line-height: 1.7;
}

/* Título da postagem */
.archive .entry-title,
.search .entry-title {
  font-size: 1.3em;
  margin-bottom: 10px;
  background: none;
  box-shadow: none;
  padding: 0;
  color: var(--primary-color);
}
.archive .entry-title a,
.search .entry-title a {
  color: var(--primary-color);
  text-decoration: none;
}
.archive .entry-title a:hover,
.search .entry-title a:hover {
  text-decoration: underline;
}

/* Leia mais */
.archive .read-more,
.search .read-more {
  display: inline-block;
  background: var(--primary-color);
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  margin-top: 12px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.3s;
}
.archive .read-more:hover,
.search .read-more:hover {
  background: var(--secondary-color);
}

/* Responsivo: empilha em telas menores */
@media (max-width: 800px) {
  .archive .post,
  .search .post {
    flex-direction: column;
  }
  .archive .post-thumbnail,
  .search .post-thumbnail {
    max-width: 100%;
  }
}
/* ==============================
   WIDGET INTRO — PADRÃO GERAL
============================== */
.widget-intro {
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  text-align: center;
  color: #fff;
}

.widget-intro .intro-logo img {
  display: block;
  margin: 0 auto 15px;
  max-width: 180px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.widget-intro .intro-logo img:hover {
  transform: scale(1.05);
}

/* Título padrão dos widgets */
.widget-intro .widget-title {
  background: var(--tertiary-color);
  border-radius: 6px;
  padding: 10px 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary-color);
  border: none;
  margin-bottom: 15px;
  display: block;
  width: 100%;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  box-sizing: border-box;
}

/* Texto */
.widget-intro-content p {
  font-size: 0.95em;
  line-height: 1.7;
  color: #fff;
  margin: 0 0 12px;
}

.widget-intro-content strong {
  color: #FFD700;
}

.widget-intro-content em {
  color: rgba(255,255,255,0.9);
  font-style: italic;
}
