/*
Theme Name: ScienceLab
Theme URI: https://example.com/sciencelab
Author: Rubens Pasa
Description: Tema WordPress acadêmico e responsivo, com header dinâmico, blocos 3x3 opcionais, layout claro, sidebar moderna e rodapé personalizável.
Version: 2.3
License: GPLv2 or later
Text Domain: sciencelab
*/

/* ================= BASE ================= */
html, body {
    margin: 0;
    padding: 0;
    background: #fff;
    font-family: "Helvetica Neue", Arial, sans-serif;
}

/* ================= CORES ================= */
:root {
    --primary-color: #750300;
    --secondary-color: #ba817f;
    --tertiary-color: #e3cccc;
    --header-gradient: linear-gradient(to left, var(--primary-color) 0%, var(--secondary-color) 100%);
    --header-height: 120px;
}

/* ================= HEADER ================= */
.site-header {
    background: var(--header-gradient);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px 12px 0 0;
    width: 98vw;
    margin: 0 auto;
    box-sizing: border-box;
    height: var(--header-height);
}

.header-inner {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 96%;
    padding: 0 2%;
}

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

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

/* ================= TÍTULOS ================= */
.site-title {
  font-family: 'Georgia', serif;
  font-weight: 700;
  font-size: 2.3em;
  color: #fff;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
  margin: 0;
}

.site-description {
  font-family: 'Open Sans', sans-serif;
  font-size: 1.2em;
  color: #000;
  margin: 0;
}

/* ================= MENU ================= */
.main-navigation {
    background: linear-gradient(to bottom, var(--secondary-color) 0%, var(--tertiary-color) 100%);
    width: 98vw;
    margin: 0 auto 20px;
    padding: 10px 0;
}

.main-navigation ul {
    display: flex;
    justify-content: center;
    gap: 20px;
    list-style: none;
}

.main-navigation a {
    color: #fff;
    font-weight: 600;
}

.main-navigation a:hover {
    color: var(--tertiary-color);
}

/* ================= ÁREA DE CONTEÚDO ================= */
.site-header,
.main-navigation,
.content-area,
footer {
    width: 98vw;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    max-width: 1800px;
}

.content-area {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    width: 98vw;
    margin: 0 auto 40px;
    padding: 25px 40px;
    background: var(--tertiary-color);
    border-radius: 0 0 12px 12px;
}

main {
    flex: 3;
    background: #fff;
    border-radius: 10px;
    padding: 25px;
}

/* ================= SIDEBAR ================= */
.sidebar {
    flex: 1.1;
    background: var(--secondary-color);
    border-radius: 10px;
    padding: 25px;
    color: #fff;
}

.sidebar .widget img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 10px;
    margin: 10px 0;
    object-fit: contain;
}

/* ===== MENU LATERAL MODERNO ===== */
.sidebar .widget_nav_menu {
    background: linear-gradient(to bottom, var(--secondary-color) 0%, var(--tertiary-color) 100%);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    padding: 20px 25px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.sidebar .widget_nav_menu:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.sidebar .widget_nav_menu h3.widget-title {
    color: #fff;
    text-transform: uppercase;
    font-size: 1.2em;
    text-align: center;
    letter-spacing: 0.8px;
    border-bottom: 2px solid rgba(255,255,255,0.2);
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.sidebar .widget_nav_menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar .widget_nav_menu ul li {
    margin-bottom: 8px;
}

.sidebar .widget_nav_menu ul li a {
    display: block;
    color: #fff;
    background: rgba(255,255,255,0.12);
    padding: 12px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1em;
    text-align: left;
    transition: all 0.3s ease;
}

.sidebar .widget_nav_menu ul li a:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateX(6px);
}

.sidebar .widget_nav_menu ul li a::before {
    content: "›";
    color: var(--tertiary-color);
    margin-right: 8px;
    transition: color 0.3s ease;
}

.sidebar .widget_nav_menu ul li a:hover::before {
    color: #fff;
}

/* ================= POSTS ================= */
.post-destaque {
    max-width: 60%;
    margin: 0 auto 40px;
    text-align: center;
}

.post-destaque img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.grid-posts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    max-width: 80%;
    margin: 0 auto 50px;
}

.grid-item {
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.grid-item img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

/* ================= BLOCO 3×3 ================= */
.home-buttons-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 30px auto;
    max-width: 900px;
}

.home-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fff;
    padding: 10px;
    border-radius: 10px;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.home-button:hover {
    transform: translateY(-4px);
}

/* ================= FOOTER ================= */
footer {
    background: linear-gradient(to bottom, var(--secondary-color) 0%, var(--tertiary-color) 100%);
    border-radius: 0 0 12px 12px;
    padding: 30px 0;
    color: #fff;
    text-align: center;
    width: 98vw;
    margin: 0 auto;
}

.footer-copy p {
    font-size: 0.9em;
    color: #fff;
    opacity: 0.9;
    margin: 5px 0;
}

.footer-copy a {
    color: #fff;
    text-decoration: underline;
}

.footer-copy a:hover {
    color: var(--tertiary-color);
}

/* ==============================
 *   LINKS
 *   ============================== */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* ================= RESPONSIVO ================= */
@media (max-width: 1000px) {
    .content-area {
        flex-direction: column;
    }
    .sidebar {
        margin-top: 20px;
    }
    .home-buttons-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .home-buttons-grid {
        grid-template-columns: 1fr;
    }
}
/* Espaço extra sob o header para evitar sobreposição da descrição */
.site-description {
    margin-bottom: 10px;
    line-height: 1.3em;
}

.header-inner {
    padding-bottom: 10px;
}
/* ====================================
   PRÉVIAS DE POSTS NA PÁGINA INICIAL
   ==================================== */

/* Imagem principal (post destaque) */
.featured-thumb {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    display: block;
    margin-bottom: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

/* Imagens dos demais posts (grade 2x2) */
.post-preview-thumb {
    width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
    margin-bottom: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Título abaixo da imagem */
.grid-item h2.entry-title {
    margin-top: 5px;
    font-size: 1.2em;
}

/* Leitura */
.read-more {
    display: inline-block;
    margin-top: 8px;
    font-weight: bold;
    color: var(--primary-color);
}

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

/* Garante espaçamento entre os blocos */
.grid-item {
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.post-destaque {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 40px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}
