/*
Theme Name: Galegóvski Bootstrap
Theme URI: https://www.galegovski.com/
Author: Lucas Gonçalves
Author URI: https://www.galegovski.com/
Description: Tema WordPress responsivo baseado em Bootstrap 5 local, focado em desempenho, tipografia editorial, banners personalizados, widgets flexíveis, acessibilidade e SEO. Inclui suporte a HTML superior, sidebar configurável, posts relacionados, customização de cores, tipografia com Droid Serif e Droid Sans e compatibilidade otimizada para dispositivos móveis.
Version: 1.2
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: galegovski-bootstrap
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Tags: blog, news, bootstrap, custom-logo, custom-background, custom-menu, featured-images, one-column, two-columns, right-sidebar, translation-ready, accessibility-ready

This theme is distributed under the GPL.
*/

/* ====== Fontes locais: Droid Serif e Droid Sans (.ttf) ====== */
@font-face {
  font-family: 'DroidSerif';
  src: url('assets/fonts/DroidSerif-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DroidSerif';
  src: url('assets/fonts/DroidSerif-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DroidSans';
  src: url('assets/fonts/DroidSans.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DroidSans';
  src: url('assets/fonts/DroidSans-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}


/* ===== ROOT ===== */
:root{
  --primary: #0d6efd;
  --max-width: 1200px;
  --sidebar-width: 350px;
  --font-title: 'DroidSerif', Georgia, serif;
  --font-body: 'DroidSerif', Georgia, serif;
  --font-ui: 'DroidSans', Arial, sans-serif;
}

/* ===== BOX SIZING ===== */
* { box-sizing: border-box; }
html, body {
    min-height: 100%;
    height: auto;
}

/* ===== BODY ===== */
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  background: #fff;
  color: #212529;
  line-height: 1.6;
}

/* ===== H ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 700;
  color: #111;
}

/* ===== Layout base ===== */
.container-center { max-width: var(--max-width); margin: 0 auto; padding: 0 1rem; }
.img-fluid { max-width: 100%; height: auto; display: block; }

/* ===== Barra HTML superior ===== */
.top-html-bar {
  color: #fff;
  text-align: center;
  font-weight: 600;
}

.top-html-bar iframe {
    height: 60px !important;
	width: 100%; !important;
    max-height: 60px !important;
    min-height: 60px !important;
    overflow: hidden !important;
    display: block;
}

/* ===== Cabeçalho ===== */
.site-header {
  font-family: var(--font-ui);
  background: #fff;
  padding: 0.75rem 0;
}
.site-header .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: nowrap;
}
.site-logo img { width: 260px; height: auto; display:block; }
.header-banner img { width:100%; max-width:850px; max-height:160px; object-fit:contain; display:block; }

/* ===== Navbar ===== */
.navbar {
  background: #fff;
  border-top: 1px solid #e9ecef; 
  border-bottom: 1px solid #e9ecef;
  font-family: var(--font-ui);
}
.navbar .nav-link {
  color: #212529;
  font-weight:500;
  padding: .1rem .1rem;
}
.navbar .nav-link.active {
  color: var(--primary, #0d6efd);
}

/* ===== Banner superior ===== */
.top-banner {
  background: #fff;

  display:flex;
  justify-content:center;
  border: none;
}

.top-banner img {
  width:100%;
  max-width:970px;
  max-height:250px;
  object-fit:contain;
  display:block;
}

/* ===== Estrutura principal ===== */
.row-main {
  display:flex;
  gap: 1rem;
  align-items:flex-start;
  justify-content:center;
  flex-wrap: nowrap;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  max-width: var(--max-width);
}

.main-content {
  flex: 1 1 calc(100% - var(--sidebar-width));
  max-width: calc(100% - var(--sidebar-width));
  background: #fff;
  border: none;
  padding: 1.25rem;
}

.sidebar {
  flex: 0 0 calc(32px + var(--sidebar-width));
  max-width: calc(32px + var(--sidebar-width));
  background: #fff;
  border: none;
  padding: 0.8rem;

}

.sidebar img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100% !important;
}

/* ===== Destaque e grid ===== */
.featured-post img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius:6px;
  display:block;
}
.featured-body h2 {
  font-size: 2.5rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
}
.featured-body p {
  margin-bottom: 0.75rem;
  color: #6c757d;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.post-card {
  background: #fff;
  border-radius:6px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.post-card img {
  width:100%;
  height:180px;
  object-fit:cover;
  display:block;
}
.post-card .card-body { padding: .9rem; }

/* ============================
   POSTS RELACIONADOS (single)
   ============================ */
.related-posts {
    margin-top: 2.5rem;
}

.related-title {
    font-family: var(--font-title);
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.related-row {
    display: flex;
    flex-wrap: wrap;
}

.related-item {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    height: 100%;
    transition: background .2s ease-in-out;
}

.related-item:hover {
    background: #f8f9fa;
}

.related-thumb img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.related-body {
    padding: 1rem;
}

.related-headline {
    font-size: 1.05rem;
    margin: 0 0 .45rem 0;
    line-height: 1.3;
}

.related-headline a {
    color: #212529;
    text-decoration: none;
}

.related-headline a:hover {
    color: var(--primary);
}

.related-date {
    font-size: .85rem;
    color: #6c757d;
    font-family: var(--font-ui);
    margin-bottom: 0;
}

/* ===== Widgets ===== */
.widget {
  border-radius:6px;
  margin-bottom:1rem;
}
.widget h4 {
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight:600;
  margin-bottom:.75rem;
  color: var(--primary, #0d6efd);
  border-bottom:2px solid var(--primary, #0d6efd);
  padding-bottom:.25rem;
}
.widget-title {
	font-family: var(--font-ui);
}

/* ===== Botões ===== */
.btn-primary {
  background-color: var(--primary, #0d6efd) !important;
  border-color: var(--primary, #0d6efd) !important;
  color: #fff !important;
}
.btn-primary:hover {
  filter: brightness(0.9);
  color: #fff !important;
}

.btn-outline-primary {
  color: var(--primary, #0d6efd) !important;
  border-color: var(--primary, #0d6efd) !important;
  background: transparent !important;
}
.btn-outline-primary:hover {
  background: var(--primary, #0d6efd) !important;
  color: #fff !important;
  border-color: var(--primary, #0d6efd) !important;
}

/* ===== Cores dinâmicas do Customizer ===== */
h1, h2, h3, h4, h5, h6,
a, .post-card h3 a, .featured-body h2 a {
  color: var(--primary, #0d6efd);
}
a:hover {
  color: #0b5ed7;
}

/* ===== Rodapé ===== */
.site-footer {
  font-family: var(--font-ui);
  padding:1.25rem 0;
  text-align:center;
  color: #6c757d;
}

/* ===== Acessibilidade ===== */
.bb-high-contrast, .bb-high-contrast * {
  background: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
}
.bb-high-contrast a, .bb-high-contrast a:hover {
  color: #0ff !important;
}


/* ===== Tipografia e formatação especial ===== */

.post-content p {
  margin-bottom: 1rem;
  line-height: 1.7;
  color: #222;
}

.post-content h2, .post-content h3, .post-content h4 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
  color: #111;
}

/* Citações padrão e de bloco */
blockquote, .wp-block-quote {
  border-left: 4px solid var(--primary, #0d6efd);
  padding-left: 1rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #444;
  background: #f8f9fa;
}

.wp-block-pullquote {
  border-left: none;
  border-top: 2px solid var(--primary, #0d6efd);
  border-bottom: 2px solid var(--primary, #0d6efd);
  text-align: center;
  font-size: 1.2rem;
  font-style: italic;
  padding: 1rem;
  color: #333;
  background: #fff;
}

/* Código e pré-formatado */
code, pre {
  background: #f1f3f5;
  padding: .2rem .4rem;
  border-radius: 4px;
  font-family: var(--bs-font-monospace);
  font-size: 0.9rem;
  color: #d63384;
}

pre {
  display: block;
  padding: 1rem;
  overflow-x: auto;
}

/* Imagens e legendas */
figure, .wp-block-image {
  margin: 1.5rem 0;
}

figcaption {
  font-family: var(--font-ui);
  text-align: center;
  font-size: 0.9rem;
  color: #666;
  margin-top: .25rem;
}

/* Listas */
.post-content ul, .post-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.post-content li {
  margin-bottom: .3rem;
}

/* Meta */
.meta {
	font-family: var(--font-ui);
}

.post-meta {
	font-family: var(--font-ui);
}

/* Pagination */
.pagination {
	font-family: var(--font-ui);
}


/* =========================================
   Widgets Padrões do WordPress — Estilização
   ========================================= */

/* Reset geral dos widgets */
.widget ul,
.widget ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget ul li,
.widget ol li {
    padding: .35rem 0;
    border-bottom: 1px solid #e9ecef;
}

.widget ul li:last-child,
.widget ol li:last-child {
    border-bottom: none;
}

/* Links */
.widget a {
    text-decoration: none;
    color: #212529;
    font-family: var(--font-ui);
}

.widget a:hover {
    color: var(--primary);
}

/* Widgets específicos */
.widget_recent_entries li,
.widget_recent_comments li,
.widget_categories li,
.widget_archive li,
.widget_meta li,
.widget_pages li,
.widget_nav_menu li {
    padding-left: .25rem;
}

/* Submenus */
.widget_nav_menu ul ul {
    padding-left: 1rem;
    margin-top: .25rem;
    border-left: 2px solid #e9ecef;
}

/* Titles de widgets de plugins */
.widgettitle,
.widget-title {
    font-size: 1.05rem;
    margin-bottom: .75rem;
    font-weight: 600;
    font-family: var(--font-ui);
    border-bottom: 2px solid var(--primary);
    padding-bottom: .25rem;
}

/* Comentários recentes */
.widget_recent_comments li {
    color: #495057;
}

/* =========================================
   Ajuste dos títulos do widget Posts Recentes
   para combinar com o estilo do tema
   ========================================= */

.widget_recent_entries a {
    font-family: var(--font-title);      /* mesma fonte dos títulos */
    color: #111 !important;              /* cor dos títulos */
    font-weight: 700;                    /* bold */
    font-size: 1rem;                   
    line-height: 1.3;
    text-decoration: none;
    display: block;
    padding: 0;
    margin-bottom: .25rem;
}

.widget_recent_entries a:hover {
    color: var(--primary) !important;
    text-decoration: underline;
}

/* Ajuste opcional da data abaixo do título */
.widget_recent_entries .post-date {
    color: #6c757d;
    font-family: var(--font-ui);
    font-size: .85rem;
    margin-bottom: 0.5rem;
}

/* Search field */
.widget_search input[type="search"] {
    width: 100%;
    padding: .5rem;
    border-radius: 4px;
    border: 1px solid #ced4da;
    font-family: var(--font-ui);
}

.widget_search input[type="submit"] {
    margin-top: .5rem;
    width: 100%;
}

/* RSS Widget */
.widget_rss .rsswidget {
    font-weight: 600;
}

.widget_rss .rss-date {
    display: block;
    color: #6c757d;
    font-size: .85rem;
    margin-top: .25rem;
}

.widget_rss cite {
    display: block;
    margin-top: .35rem;
    color: #495057;
}



/* ======= Layout responsivo aprimorado (v1.3) ======= */

/* 📱 Mobile até 768px */
@media (max-width: 768px) {

  html, body {
    overflow-x: hidden;
  }

  .container-center,
  .row-main,
  .main-content,
  .sidebar {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
  }

  .row-main {
    flex-wrap: wrap;
    gap: 0.5rem !important;
  }

  .main-content, .sidebar {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  .site-header .inner {
    flex-direction: column;
    text-align: center;
    gap: .5rem;
  }

  .header-banner { order: 2; }
  .site-logo { order: 1; }

  .post-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .post-card img,
  .featured-post img {
    height: auto;
  }

  .main-content, .sidebar, .row-main {
    border: none !important;
    background: #fff !important;
  }

  .top-banner img, .header-banner img {
    max-width: 100% !important;
    height: auto !important;
  }

  .home-middle, .home-bottom, .single-top, .single-bottom {
    padding: .5rem 0;
  }
	
  .related-thumb img {
        height: 160px;
    }
	
}

/* 💻 Tablets entre 769px e 991px */
@media (min-width: 769px) and (max-width: 991px) {

  html, body {
    overflow-x: hidden;
  }

  .container-center,
  .row-main {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    margin: 0 auto;
    max-width: 95% !important;
  }

  .row-main {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .main-content {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    margin-bottom: 1rem;
  }

  .sidebar {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    background: #fff;
    border: none;
    text-align: center;
  }

  .sidebar .widget {
    display: inline-block;
    width: 45%;
    vertical-align: top;
    margin: 0.5rem;
  }

  .post-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .post-card img,
  .featured-post img {
    height: auto;
  }

  .site-header .inner {
    flex-direction: column;
    align-items: center;
    gap: .5rem;
  }

  .header-banner, .top-banner {
    justify-content: center;
  }
}

/* ===========================
   Galegovski - CWV tweaks
   (logo/banner reservation, responsive)
   =========================== */

/* Logo constraints */
.site-logo { display:inline-block; vertical-align:middle; flex: 0 0 260px; max-width:100%; }
.site-logo img { max-width:260px; max-height:160px; width:auto; height:auto; display:block; }

/* Header banner constraints */
.header-banner { min-height:160px; display:flex; align-items:center; justify-content:center; padding:0 10px; }
.header-banner img { max-width:850px; max-height:160px; width:100%; height:auto; display:block; }

/* Top banner */
.top-banner { min-height:250px; display:flex; align-items:center; justify-content:center; }

/* Sidebar images */
.sidebar img, .widget img { max-width:100%; height:auto; display:block; }

/* Mobile */
@media (max-width: 767.98px) {
    .site-logo { flex: 0 0 auto; text-align:center; width:auto; margin-right:0; }
    .header-banner { min-height:80px; padding:0 8px; }
    .header-banner img { max-width:100%; height:auto; }
    .site-header .inner { flex-wrap:wrap; gap:8px; }
}

/* Small cosmetic / accessibility */
.bb-high-contrast { background:#000; color:#fff; }

