/*
Theme Name: LinuxPro
Template: generatepress
Description: Tema wiki Linux do linuxpro.com.br - claro, cantos retos, header azul-marinho, caixas ASCII
Version: 1.1
*/

/* ===== cantos retos em tudo ===== */
*, *::before, *::after { border-radius: 0 !important; }

/* ===== paleta base (wiki clara, header navy) ===== */
body { background: #f7f8f9; color: #24292f; }
a { color: #1a4f9c; }
a:hover { color: #8b1a1a; }

/* ===== header compacto azul-marinho ===== */
.site-header, .main-navigation { background-color: #0d2b52 !important; }
.inside-header { padding: 4px 20px !important; }
.site-logo .header-image { max-height: 30px; width: auto; }
.site-branding-container { display: flex; align-items: center; gap: 12px; }
.main-title { font-size: 1.05em; }
.main-title a, .site-header .site-title a { color: #fff !important; font-weight: 700; }
.site-header .site-description { color: #fff !important; }
.main-navigation .main-nav ul li a { color: #e8edf5 !important; line-height: 38px; padding: 0 12px; font-size: .95em; }
.main-navigation .main-nav ul li a:hover,
.main-navigation .main-nav ul li[class*="current"] > a { color: #fff !important; background: #16407a !important; }

/* ===== caixas ASCII: tracejado + "+" nos 4 cantos (só cards e widgets) ===== */
.site-content { background: #f7f8f9; }
.inside-article, .widget {
  border: 1.5px dashed #404a56;
  background-color: #fff;
  background-image:
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14"><rect width="14" height="14" fill="%23f7f8f9"/><path d="M7 2v10M2 7h10" stroke="%23404a56" stroke-width="2"/></svg>'),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14"><rect width="14" height="14" fill="%23f7f8f9"/><path d="M7 2v10M2 7h10" stroke="%23404a56" stroke-width="2"/></svg>'),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14"><rect width="14" height="14" fill="%23f7f8f9"/><path d="M7 2v10M2 7h10" stroke="%23404a56" stroke-width="2"/></svg>'),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14"><rect width="14" height="14" fill="%23f7f8f9"/><path d="M7 2v10M2 7h10" stroke="%23404a56" stroke-width="2"/></svg>');
  background-position: left -7px top -7px, right -7px top -7px, left -7px bottom -7px, right -7px bottom -7px;
  background-size: 14px 14px, 14px 14px, 14px 14px, 14px 14px;
  background-repeat: no-repeat;
  background-origin: border-box;
  background-clip: border-box;
}

/* títulos de widget: barra navy + mono estilo prompt */
.widget-title {
  background: #0d2b52; color: #fff; padding: .45em .8em; margin: -20px -20px 15px;
  font-family: "JetBrains Mono", ui-monospace, "DejaVu Sans Mono", monospace;
  font-size: .9em; letter-spacing: .02em;
}
.widget-title::before { content: "# "; opacity: .7; }

/* ===== conteúdo estilo wiki ===== */
.entry-content h2, .entry-content h3 { border-bottom: 1px dashed #d0d7de; padding-bottom: .3em; }
.entry-title a { color: #0d2b52; }
.entry-meta { font-size: .85em; color: #57606a; }
.entry-meta .byline { display: none; }

/* código: destaque forte, estilo terminal */
.entry-content code {
  font-family: "JetBrains Mono", "Fira Mono", ui-monospace, "DejaVu Sans Mono", monospace;
  background: #eff1f3; color: #8b1a1a; padding: .1em .4em; font-size: .92em;
}
.entry-content pre {
  background: #1b1f24; color: #e6edf3; padding: 1em 1.2em;
  overflow-x: auto; border-left: 4px solid #8b1a1a;
}
.entry-content pre code { background: transparent; color: inherit; padding: 0; }

/* tabelas de wiki */
.entry-content table { border-collapse: collapse; width: 100%; }
.entry-content th, .entry-content td { border: 1px solid #d0d7de; padding: .4em .7em; }
.entry-content th { background: #eff1f3; }

/* imagens: sem borda, só contidas */
.entry-content img { max-width: 100%; height: auto; border: none; }

/* ===== blocos de código estilo janela de terminal ===== */
.entry-content pre {
  position: relative;
  padding: 3.1em 1.2em 1.1em;
  border: 1.5px solid #404a56;
  border-left: 4px solid #8b1a1a;
  background: #22272e;
}
.entry-content pre::before {
  content: "bash";
  position: absolute; top: 0; left: 0; right: 0;
  height: 2.1em; line-height: 2.1em;
  background: #2d333b;
  border-bottom: 1px solid #404a56;
  color: #768390;
  font-family: "JetBrains Mono", ui-monospace, "DejaVu Sans Mono", monospace;
  font-size: .78em;
  text-align: center;
  /* três botões de janela via radial-gradient (imune ao border-radius global) */
  background-image:
    radial-gradient(circle at 16px 50%, #f47067 5px, transparent 6px),
    radial-gradient(circle at 34px 50%, #f7b955 5px, transparent 6px),
    radial-gradient(circle at 52px 50%, #57ab5a 5px, transparent 6px);
  background-repeat: no-repeat;
}
.entry-content pre code.hljs, .entry-content pre code { background: transparent; padding: 0; }

/* botão copiar dos blocos de código */
.entry-content pre .copy-code {
  position: absolute; top: 0; right: 0;
  height: 2.1em; padding: 0 .9em;
  background: transparent; border: none; border-left: 1px solid #404a56;
  color: #768390; cursor: pointer;
  font-family: "JetBrains Mono", ui-monospace, "DejaVu Sans Mono", monospace;
  font-size: .78em; line-height: 2.1em;
}
.entry-content pre .copy-code:hover { color: #e6edf3; background: #404a56; }
.entry-content pre .copy-code.ok { color: #57ab5a; }

/* ===== carrossel de banners da home ===== */
.lp-carousel {
  position: relative; max-width: 1100px; margin: 10px auto 0; padding: 0 10px;
  height: 170px;
}
.lp-slide {
  position: absolute; inset: 0 10px; display: none; text-decoration: none;
  padding: 22px 30px; border: 1.5px dashed #404a56; color: #fff;
  align-items: center; justify-content: space-between; gap: 20px;
}
.lp-slide.active { display: flex; }
.lp-slide-gitlab { background: linear-gradient(120deg, #6b2e00, #e2432a); }
.lp-slide-postfix { background: linear-gradient(120deg, #0d2b52, #16407a); }
.lp-slide-github { background: linear-gradient(120deg, #1b1f24, #2d333b); }
.lp-slide h3 { color: #fff; margin: 0 0 6px; font-size: 1.5em; }
.lp-slide p { margin: 0 0 10px; color: #e8edf5; font-size: .95em; }
.lp-btn {
  display: inline-block; background: #8b1a1a; color: #fff; padding: .45em 1em;
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .85em;
}
.lp-slide:hover .lp-btn { background: #a52222; }
.lp-slide-art {
  font-family: "JetBrains Mono", ui-monospace, monospace; color: rgba(255,255,255,.75);
  font-size: 1.05em; border: 1px dashed rgba(255,255,255,.4); padding: .8em 1.1em;
  white-space: nowrap;
}
.lp-dots { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; z-index: 2; }
.lp-dots button {
  width: 12px; height: 12px; margin: 0 4px; padding: 0; border: 1px solid #fff;
  background: transparent; cursor: pointer;
}
.lp-dots button.on { background: #f7b955; border-color: #f7b955; }
@media (max-width: 700px) {
  .lp-carousel { height: 190px; }
  .lp-slide-art { display: none; }
}

/* logo antes do titulo no header */
.site-logo { order: -1; }

/* ===== titulos de widget no estilo do site antigo: # vermelho + texto escuro ===== */
.widget-title {
  background: transparent !important;
  color: #24292f !important;
  padding: 0 0 .45em !important;
  margin: 0 0 15px !important;
  border-bottom: 1px solid #d0d7de;
  font-size: 1.05em;
  letter-spacing: 0;
}
.widget-title::before { content: "# "; color: #c0392b; opacity: 1; font-weight: 700; }

/* fix QA: logo Tux ANTES do titulo (flex no container real do header) */
.inside-header { display: flex; align-items: center; flex-wrap: wrap; }
.inside-header .site-logo { order: -1; margin-right: 10px; }
.inside-header .main-navigation, .inside-header #site-navigation { margin-left: auto; }

/* ===== footer sutil, sem faixa preta ===== */
.site-footer, .site-info {
  background: transparent !important;
  color: #768390 !important;
}
.site-info {
  font-family: "JetBrains Mono", ui-monospace, "DejaVu Sans Mono", monospace;
  font-size: .8em;
  border-top: 1px dashed #d0d7de;
  padding: 14px 0 22px;
}
.site-info a { color: #768390 !important; text-decoration: underline; }

/* ===== paginacao sutil, sem caixa branca ===== */
.paging-navigation, nav.pagination, .inside-navigation {
  background: transparent !important;
  border: none !important;
  background-image: none !important;
  padding: 6px 0 !important;
}
.paging-navigation .page-numbers, nav.pagination .page-numbers {
  font-family: "JetBrains Mono", ui-monospace, "DejaVu Sans Mono", monospace;
  font-size: .9em;
  color: #57606a;
  padding: .3em .7em;
  border: 1px dashed transparent;
}
.paging-navigation a.page-numbers:hover, nav.pagination a.page-numbers:hover {
  color: #8b1a1a; border-color: #9aa4af;
}
.paging-navigation .page-numbers.current, nav.pagination .page-numbers.current {
  color: #0d2b52; font-weight: 700; border: 1px dashed #404a56;
}

/* ===== header moderno: sticky + blur + gradiente + hover animado ===== */
.site-header, .main-navigation {
  background: linear-gradient(90deg, #0b2444 0%, #0d2b52 55%, #123a6d 100%) !important;
}
.site-header {
  position: sticky; top: 0; z-index: 999;
  background: rgba(13, 43, 82, .94) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 14px rgba(4, 16, 34, .35);
}
.inside-header { padding: 2px 16px !important; }
.site-logo .header-image { max-height: 28px; transition: transform .25s ease; }
.site-logo:hover .header-image { transform: rotate(-8deg) scale(1.08); }
.main-title { font-size: 1em; letter-spacing: .03em; }

/* links do menu: sublinhado animado em dourado, sem caixa */
.main-navigation .main-nav ul li a {
  position: relative; line-height: 42px; padding: 0 10px;
  background: transparent !important; transition: color .2s ease;
}
.main-navigation .main-nav ul li a::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 6px;
  height: 2px; background: #f7b955;
  transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.main-navigation .main-nav ul li a:hover { background: transparent !important; color: #f7b955 !important; }
.main-navigation .main-nav ul li a:hover::after,
.main-navigation .main-nav ul li[class*="current"] > a::after { transform: scaleX(1); }
.main-navigation .main-nav ul li[class*="current"] > a { background: transparent !important; color: #fff !important; }

/* nav transparente dentro do header sticky */
.site-header .main-navigation, .inside-header .main-navigation { background: transparent !important; }

/* ===== header no azul exato do logo (#002255), logo em altura total ===== */
.site-header {
  background: rgba(0, 34, 85, .95) !important;
}
.site-header, .main-navigation {
  background-image: linear-gradient(90deg, #002255 0%, #002255 60%, #0a3170 100%) !important;
}
.inside-header { padding: 0 16px !important; }
.site-logo { align-self: stretch; display: flex; align-items: center; margin-right: 10px; }
.site-logo .header-image { max-height: none; height: 100%; min-height: 52px; width: auto; }
.main-navigation .main-nav ul li a:hover,
.main-navigation .main-nav ul li[class*=\"current\"] > a { background: transparent !important; }

/* altura fixa: header 52px, logo ocupa a altura toda */
.site-logo .header-image { height: 52px; min-height: 0; width: auto; }
.main-navigation .main-nav ul li a { line-height: 52px; }
.main-navigation .main-nav ul li a::after { bottom: 9px; }

/* logo sem folga: preenche exatamente a altura do header */
.inside-header { height: 56px; padding: 0 16px !important; }
.site-logo { height: 56px; margin-right: 10px; }
.site-logo .header-image { height: 56px !important; display: block; }
.main-navigation .main-nav ul li a { line-height: 56px; }

/* ===== efeito disco-tux: logo cicla cores no hover ===== */
@keyframes tux-disco {
  0%   { filter: saturate(2.2) brightness(1.25) hue-rotate(0deg)   drop-shadow(0 0 4px rgba(247,181,85,.5)); }
  50%  { filter: saturate(2.2) brightness(1.35) hue-rotate(180deg) drop-shadow(0 0 10px rgba(120,220,255,.7)); }
  100% { filter: saturate(2.2) brightness(1.25) hue-rotate(360deg) drop-shadow(0 0 4px rgba(247,181,85,.5)); }
}
.site-logo .header-image { transition: transform .3s ease; }
.site-logo:hover .header-image {
  transform: scale(1.12);
  animation: tux-disco 1.4s linear infinite;
}

/* disco-tux sem escapar do header: sem scale */
.site-logo:hover .header-image { transform: none; }

/* ===== disco tambem no texto LinuxPro: gradiente arco-iris deslizante ===== */
@keyframes lp-title-disco {
  to { background-position: 400% 0; }
}
.main-title a:hover, .site-header .site-title a:hover {
  background-image: linear-gradient(90deg, #f7b955, #57ab5a, #78dcff, #e2432a, #f7b955);
  background-size: 400% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  animation: lp-title-disco 2s linear infinite;
}

/* logo colado na esquerda do header, sem padding antes dele */
.inside-header { padding: 0 16px 0 0 !important; }
.site-logo { margin-left: 0; }

/* titulo LinuxPro centralizado na vertical do header */
.site-branding { display: flex; align-items: center; height: 56px; margin: 0 !important; padding: 0 !important; }
.main-title { margin: 0 !important; line-height: 1; }

/* forca flex no branding (regra do GP vencia com display:block) */
.site-header .site-branding, .nav-float-right .site-branding {
  display: flex !important; align-items: center !important;
  height: 56px; margin: 0 !important; padding: 0 !important; float: none !important;
}

/* branding com altura natural: o flex do inside-header centraliza sozinho */
.site-header .site-branding, .nav-float-right .site-branding { height: auto; align-self: center; }


/* causa raiz: nav tinha 68px dentro do header de 56 */
.inside-header .main-navigation, .inside-header .main-nav,
.inside-header .main-nav > ul, .inside-header .main-nav > ul > li { height: 56px; overflow: visible; }
.inside-header .main-nav > ul > li > a { line-height: 56px; padding-top: 0; padding-bottom: 0; height: 56px; }
.inside-header .main-nav > ul { margin: 0; display: flex; align-items: stretch; }

/* zera o offset interno do nav */
.site-header .main-navigation { padding: 0 !important; display: flex; align-items: center; }
.site-header .main-nav { margin: 0 !important; padding: 0 !important; }
