/*
Theme Name: SingleSoftware Blog
Author: Seu Nome
Description: Tema personalizado para o blog da Single Software, integrado com a identidade visual do site principal.
Version: 2.0
*/

/* ===================================================================
   1. RESET BÁSICO E VARIÁVEIS DO TEMA
   =================================================================== */

:root {
    --color-light: #ffffff;
    --color-dark: #020816;
    --color-dark-secondary: #100e1e;
    --color-text: rgba(255, 255, 255, 0.75);
    --color-border: rgba(255, 255, 255, 0.1);
    --color-brand-purple: #a73ef9;
    --color-brand-pink: #f741f7;
    --color-brand-blue: #3c6dfa;
    --gradient-primary: linear-gradient(90deg, var(--color-brand-pink), var(--color-brand-purple), var(--color-brand-blue));
    --gradient-text: linear-gradient(90deg, var(--color-brand-purple), var(--color-brand-pink), var(--color-brand-blue));
    --gradient-border: linear-gradient(90deg, #f741f7, #a73ef9, #3c6dfa);
    --font-main: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background-color: var(--color-dark);
    color: var(--color-text);
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
}
a { color: var(--color-brand-purple); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--color-brand-pink); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, h5, h6 { color: var(--color-light); font-weight: 700; line-height: 1.2; }
.container { width: 100%; max-width: 1320px; margin-left: auto; margin-right: auto; padding: 0 15px; }


/* ===================================================================
   2. HEADER (IDÊNTICO AO SITE ESTÁTICO)
   =================================================================== */

.premium-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(16, 14, 30, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    transition: transform 0.3s ease, background-color 0.3s ease;
}
.premium-navbar { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; }
.brand-logo img { max-height: 66px; }

/* Navegação Desktop */
.desktop-nav-menu { display: flex; align-items: center; list-style: none; gap: 40px; }
.desktop-nav-menu li a { position: relative; padding: 5px 0; color: rgba(255, 255, 255, 0.8); font-weight: 500; }
.desktop-nav-menu li a::after { content: ""; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px; background: var(--gradient-primary); transition: width 0.4s ease; }
.desktop-nav-menu li a:hover { color: var(--color-light); }
.desktop-nav-menu li a:hover::after { width: 100%; }
.theme-btn-gradient { display:inline-block; padding:12px 28px; border-radius:8px; border:none; background-image:var(--gradient-primary); background-size:200% auto; color:var(--color-light); font-weight:700; cursor:pointer; transition:all .4s ease; text-align:center; }
.theme-btn-gradient:hover { background-position:right center; transform:translateY(-3px); box-shadow:0 8px 25px rgba(167,62,249,.3); }

/* Lógica do Menu Mobile */
.mobile-menu-toggle { display: none; }
@media (max-width: 991px) {
    .desktop-nav-menu, .desktop-cta { display: none; }
    .mobile-menu-toggle { display: block; position: relative; z-index: 1003; width: 30px; height: 22px; background: transparent; border: none; cursor: pointer; }
    .mobile-menu-toggle span { display: block; position: absolute; left: 0; width: 100%; height: 3px; background: var(--color-light); border-radius: 3px; transition: all 0.35s ease; }
    .mobile-menu-toggle span:nth-child(1) { top: 0; }
    .mobile-menu-toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
    .mobile-menu-toggle span:nth-child(3) { bottom: 0; }
    .mobile-menu-toggle.is-open span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
    .mobile-menu-toggle.is-open span:nth-child(2) { opacity: 0; }
    .mobile-menu-toggle.is-open span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }
}
.mobile-slide-menu { position: fixed; top: 0; left: -100%; z-index: 1002; width: 320px; max-width: 90%; height: 100%; background: var(--color-dark-secondary); display: flex; flex-direction: column; transition: left 0.5s cubic-bezier(0.77, 0, 0.175, 1); }
.mobile-slide-menu.is-open { left: 0; }
.menu-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 30px; border-bottom: 1px solid var(--color-border); }
.brand-logo-menu img { max-height: 35px; }
.close-menu-btn { color: var(--color-light); font-size: 24px; background: none; border: none; cursor: pointer; }
.menu-nav-body { padding: 30px; }
.menu-nav-body ul { list-style: none; }
.menu-nav-body li { margin-bottom: 25px; }
.menu-nav-body li a { color: var(--color-light); font-size: 20px; font-weight: 600; }
.mobile-menu-cta { margin-top: auto; padding: 30px; }
.menu-overlay { position: fixed; inset: 0; z-index: 1001; background: rgba(0, 0, 0, 0.6); opacity: 0; pointer-events: none; transition: opacity 0.5s ease; }
.menu-overlay.is-open { opacity: 1; pointer-events: all; }
body.menu-open { overflow: hidden; }

/* Ajuste para barra de admin do WP */
body.admin-bar .premium-header { top: 32px; }
@media (max-width: 782px) {
    body.admin-bar .premium-header { top: 0; }
}


/* ===================================================================
   3. CABEÇALHO DE PÁGINA (HERO INTERNO)
   =================================================================== */

.page-header-section { padding: 220px 0 120px; background-size: cover; background-position: center; position: relative; }
.page-header-section::before { content: ''; position: absolute; inset: 0; background: rgba(2, 8, 22, 0.7); backdrop-filter: blur(3px); }
.page-header-content { position: relative; z-index: 1; }
.page-header-content .sub-title-span { display: inline-block; padding: 12px 24px; border-radius: 10px; background: rgba(255, 255, 255, 0.1); border: 1px solid var(--color-border); color: var(--color-light); line-height: 1; font-weight: 800; font-size: 0.9rem; text-transform: uppercase; margin-bottom: 20px; }
.page-header-content h1 { font-size: clamp(2.5rem, 6vw, 4rem); color: var(--color-light); margin-bottom: 1rem; }
.page-header-content p { font-size: 1.2rem; max-width: 600px; margin: 0 auto; opacity: 0.8; }


/* ===================================================================
   4. LAYOUT DA HOME E CATEGORIAS (GRID CORRIGIDO)
   =================================================================== */

.blog-posts-section { padding: 80px 0; }
.blog-posts-section > .container > .row { display: flex; flex-wrap: wrap; gap: 60px; }

/* Coluna principal com posts */
.blog-posts-section .col-lg-8 {
    width: 100%;
    flex: 1;
}
.blog-posts-section .col-lg-8 .row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

/* Sidebar */
.blog-posts-section aside.col-lg-4 {
    width: 100%;
    flex-basis: 340px;
}
@media (max-width: 991px) {
    .blog-posts-section > .container > .row { gap: 0; }
    .blog-posts-section .col-lg-8 { order: 1; }
    .blog-posts-section aside.col-lg-4 { order: 2; margin-top: 60px; flex-basis: auto; }
}
@media (max-width: 767px) {
    .blog-posts-section .col-lg-8 .row {
        grid-template-columns: 1fr;
    }
}


/* ===================================================================
   5. CARD DE POST
   =================================================================== */

.post-card { background-color: rgba(255, 255, 255, 0.03); border-radius: 16px; overflow: hidden; height: 100%; display: flex; flex-direction: column; transition: transform 0.3s ease, box-shadow 0.3s ease; border: 1px solid var(--color-border); }
.post-card:hover { transform: translateY(-8px); box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3); }
.post-card-image { display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.post-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.post-card:hover .post-card-image img { transform: scale(1.05); }
.post-card-content { padding: 25px; display: flex; flex-direction: column; flex-grow: 1; }
.post-card-content h3 { font-size: 1.4rem; margin: 15px 0; }
.post-card-content h3 a { color: var(--color-light); }
.post-card-content h3 a:hover { background: var(--gradient-text); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.post-card .post-excerpt { flex-grow: 1; opacity: 0.8; }
.post-card .post-meta { margin-top: 20px; font-size: 0.85rem; opacity: 0.6; text-transform: uppercase; }


/* ===================================================================
   6. PAGINAÇÃO
   =================================================================== */

.pagination-wrapper { margin-top: 60px; }
.pagination { display: flex; justify-content: center; }
.page-numbers { list-style: none; padding: 0; margin: 0; display: flex; gap: 10px; }
.page-numbers li { margin: 0; }
.page-numbers a, .page-numbers span { display: flex; align-items: center; justify-content: center; width: 45px; height: 45px; border-radius: 8px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--color-border); color: var(--color-text); font-weight: 600; transition: all 0.3s ease; }
.page-numbers a:hover { background: var(--color-brand-purple); color: var(--color-light); border-color: var(--color-brand-purple); }
.page-numbers .current { background: var(--gradient-primary); color: var(--color-light); border: none; cursor: default; }


/* ===================================================================
   7. SIDEBAR E WIDGETS
   =================================================================== */

aside .widget { padding: 30px; background-color: rgba(255, 255, 255, 0.03); border: 1px solid var(--color-border); border-radius: 16px; margin-bottom: 30px; }
.widget-title { color: var(--color-light); font-size: 1.5rem; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid var(--color-border); }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li { margin-bottom: 12px; }
.widget ul li:last-child { margin-bottom: 0; }
.widget ul li a { color: var(--color-text); display: block; position: relative; padding-left: 20px; }
.widget ul li a::before { content: '\f105'; font-family: 'Font Awesome 5 Free'; font-weight: 900; position: absolute; left: 0; top: 2px; color: var(--color-brand-purple); transition: transform 0.3s ease; }
.widget ul li a:hover { color: var(--color-light); }
.widget ul li a:hover::before { transform: translateX(5px); }
.widget .search-form { position: relative; }
.widget .search-form .search-field { width: 100%; padding: 14px 50px 14px 20px; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--color-border); border-radius: 8px; color: var(--color-light); }
.widget .search-form .search-field:focus { outline: none; border-color: var(--color-brand-purple); }
.widget .search-form .search-submit { position: absolute; right: 0; top: 0; height: 100%; width: 50px; background: transparent; border: none; color: var(--color-brand-purple); font-size: 1.1rem; cursor: pointer; }


/* ===================================================================
   8. PÁGINA DE POST ÚNICO (CONTEÚDO MAIS ESTREITO)
   =================================================================== */

.blog-single-section { padding-top: 60px; padding-bottom: 80px; }
.blog-single-section .col-lg-8 { /* Redefine o container do post */
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    float: none;
}
.entry-content { color: var(--color-text); font-size: 1.1rem; line-height: 1.8; }
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4, .entry-content h5, .entry-content h6 { color: var(--color-light); margin: 2.5rem 0 1.5rem; }
.entry-content h2 { font-size: 2rem; border-bottom: 1px solid var(--color-border); padding-bottom: 0.5rem; }
.entry-content h3 { font-size: 1.7rem; }
.entry-content p { margin-bottom: 1.5rem; }
.entry-content ul, .entry-content ol { margin: 1.5rem 0; padding-left: 25px; }
.entry-content li { margin-bottom: 0.8rem; }
.entry-content blockquote { margin: 2rem 0; padding: 1.5rem 2rem; border-left: 4px solid var(--color-brand-purple); background-color: rgba(255, 255, 255, 0.03); border-radius: 0 8px 8px 0; font-style: italic; font-size: 1.2rem; color: var(--color-light); }
.entry-content blockquote p { margin: 0; }


/* ===================================================================
   9. COMPONENTES (CHIPS DE CATEGORIA)
   =================================================================== */

.category-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.post-card .category-chips { justify-content: flex-start; }
.category-chip { display: inline-block; padding: 6px 15px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); border: 1px solid var(--color-border); color: var(--color-light); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; transition: all 0.3s ease; }
.category-chip:hover { background: var(--gradient-primary); border-color: transparent; color: var(--color-light); transform: translateY(-2px); }


/* ===================================================================
   10. FOOTER (IDÊNTICO AO SITE ESTÁTICO)
   =================================================================== */

.ss-footer-area { padding-top: 80px; position: relative; }
.footer-cta { position: relative; border-radius: 20px; display: flex; align-items: center; justify-content: space-between; overflow: hidden; margin-bottom: -100px; z-index: 2; background-size: cover; background-position: center; }
.footer-cta .cta-content-box { flex: 1; max-width: 60%; padding: 50px; }
.footer-cta .cta-image { flex-shrink: 0; }
@media (max-width: 991px) {
    .footer-cta { flex-direction: column; text-align: center; }
    .footer-cta .cta-content-box { max-width: 100%; padding: 40px 20px; }
    .footer-cta .cta-image { display: none; }
}
.footer-widgets-wrapper { position:relative; max-width:96%; margin:0 auto; background:linear-gradient(35deg, #020816 0%, rgb(0 46 46 / 10%) 42%, rgba(1, 74, 119, .24) 66%, rgba(1, 74, 119, .50) 100%); border-radius:24px 24px 0px 0px; padding:150px 24px 50px; overflow:hidden; }
.blur-shape-footer { position:absolute; bottom:-220px; right:-220px; width:900px; height:900px; background: radial-gradient(560px 560px at 88% 92%, rgba(1,74,119,.95) 0%, rgba(1,74,119,.62) 40%, rgba(1,74,119,0) 74%), radial-gradient(420px 420px at 92% 96%, rgba(81,219,218,.35) 0%, rgba(81,219,218,0) 70%); filter:blur(22px); opacity:.95; z-index:0; pointer-events:none; }
.footer-widgets-wrapper > .container { position: relative; z-index: 1; padding: 0; }
.footer-widget { margin-bottom: 30px; }
.footer-widget .widget-title { margin-bottom: 20px; }
.footer-widget ul.footer-nav { list-style: none; padding: 0; }
.footer-widget ul.footer-nav li { margin-bottom: 10px; }
.footer-widget ul.footer-nav a:hover { color: var(--color-light); }
.footer-about-widget .footer-logo { max-width: 200px; margin-bottom: 15px; }
.social-link { display:flex; gap:15px; margin-top:25px; padding: 0; }
.social-link a { display:flex; align-items:center; justify-content:center; width:42px; height:42px; border-radius:50%; color:var(--color-light); background-image:var(--gradient-primary); background-size:200% auto; box-shadow:0 4px 15px rgba(0,0,0,0.2); transition:all .4s ease; }
.social-link a:hover { background-position:right center; transform:translateY(-3px); box-shadow:0 8px 25px rgba(167,62,249,0.3); }
.social-link i { font-size:18px; }

.footer-copyright { width: 96%; left: 50%; transform: translateX(-50%); position: relative; background-color: #4095ff12; z-index: -1; }
.footer-copyright .container { display:flex; justify-content:space-between; align-items:center; padding: 25px 15px; font-size:.9rem; color:var(--color-text); }
.footer-copyright span { color:var(--color-brand-purple); font-weight:bold; }
@media (max-width: 768px) {
    .footer-widgets-wrapper { padding-top: 120px; }
    .footer-copyright .container { flex-direction: column; gap: 15px; text-align: center; }
}

/* Preloader, FAB e Ticker (importados do site principal) */
.preloader { position: fixed; inset: 0; z-index: 9999; background: var(--gradient-primary); display: flex; justify-content: center; align-items: center; transition: opacity 0.5s 0.3s ease, visibility 0.5s 0.3s ease; }
.preloader.hidden { opacity: 0; visibility: hidden; }
.preloader .loader img { animation: zoomInOut 1.5s ease-in-out infinite; }
@keyframes zoomInOut { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }

.ss-fab { position: fixed; right: 24px; bottom: 80px; width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; z-index: 900; border: 2px solid transparent; background: linear-gradient(var(--color-light), var(--color-light)) padding-box, var(--gradient-primary) border-box; backdrop-filter: blur(10px); }
.ss-fab i { font-size: 24px; background: var(--gradient-text); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.ss-fab__pulse { position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 rgba(60, 109, 250, .35); animation: ssfabpulse 2.2s ease-out infinite; }
@keyframes ssfabpulse{ 60%{box-shadow:0 0 0 18px rgba(60,109,250,0)} }

.fixed-ticker-banner { position: fixed; bottom: 0; left: 0; width: 100%; z-index: 900; padding: 15px 0; background: var(--color-brand-purple); white-space: nowrap; overflow: hidden; }
.ticker-track { display: flex; width: fit-content; animation: ticker-scroll 40s linear infinite; }
.ticker-content { display: flex; align-items: center; }
.ticker-content span { margin: 0 30px; font-weight: 500; }
.ticker-separator { flex-shrink: 0; width: 18px; height: 18px; background: url("./assets/images/icon/ticker-separator.png") center/contain no-repeat; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }



/* ===================================================================
   10. FOOTER (IDÊNTICO AO SITE ESTÁTICO - VERSÃO CORRIGIDA)
   =================================================================== */

.site-footer {
  padding-top: 80px; /* var(--section-spacing) */
  position: relative;
  z-index: 1;
}

/* CTA superior flutuante */
.footer-cta {
  position: relative;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  margin-bottom: -100px;
  z-index: 2;
  background-size: cover;
  background-position: center;
}
.footer-cta .cta-content {
    flex: 1;
    max-width: 60%;
    padding: 50px;
}
.footer-cta .cta-image {
    flex-shrink: 0;
}

/* Bloco principal do footer em caixa */
.footer-widgets-wrapper {
  position: relative;
  max-width: 96%;
  margin: 0 auto;
  background: linear-gradient(35deg, #020816 0%, rgb(0 46 46 / 10%) 42%, rgba(1, 74, 119, .24) 66%, rgba(1, 74, 119, .50) 100%);
  border-radius: 24px 24px 0 0;
  padding: 150px 24px 50px;
  overflow: hidden;
}

/* Efeito de brilho no canto */
.blur-shape-footer {
  position: absolute;
  bottom: -220px;
  right: -220px;
  width: 900px;
  height: 900px;
  background:
    radial-gradient(560px 560px at 88% 92%,
      rgba(1,74,119,.95) 0%,
      rgba(1,74,119,.62) 40%,
      rgba(1,74,119,0) 74%),
    radial-gradient(420px 420px at 92% 96%,
      rgba(81,219,218,.35) 0%,
      rgba(81,219,218,0) 70%);
  filter: blur(22px);
  opacity: 0.95;
  z-index: 0;
  pointer-events: none;
}

/* Conteúdo sobre o brilho */
.footer-widgets-wrapper > .container {
  position: relative;
  z-index: 1;
  padding-top: 0;
  padding-bottom: 0;
}

/* Grid interno dos widgets */
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 30px;
}
.footer-widget {
    margin-bottom: 20px;
}
.footer-widget h4 {
    color: var(--color-light);
    margin-bottom: 20px;
}
.footer-widget ul {
    list-style: none;
    padding: 0;
}
.footer-widget ul li {
    margin-bottom: 10px;
}
.footer-widget ul li a {
    color: var(--color-text);
}
.footer-widget ul li a:hover {
    color: var(--color-light);
}
.footer-widget p {
    opacity: .85;
}
.footer-logo {
    max-width: 200px;
    margin-bottom: 15px;
}

/* Ícones Sociais */
.social-links {
  display: flex;
  gap: 15px;
  margin-top: 25px;
  padding: 0;
}
.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--color-light);
  background-image: var(--gradient-primary);
  background-size: 200% auto;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all .4s ease;
}
.social-links a:hover {
  background-position: right center;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(167, 62, 249, 0.3);
}
.social-links i {
    font-size: 18px;
}

/* Copyright */
.footer-copyright {
    width: 96%;
    left: 50%;
    transform: translateX(-50%);
    position: relative;
    background-color: #4095ff12;
    z-index: -1;
}
.footer-copyright .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 15px;
  font-size: .9rem;
  color: var(--color-text);
}
.footer-copyright span {
  color: var(--color-brand-purple);
  font-weight: bold;
}
.footer-copyright .copyright-nav a:hover {
  color: var(--color-light);
}

/* Botão de Voltar ao Topo */
.back-to-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin: -50px auto 0;
  border-radius: 50%;
  background: linear-gradient(90deg, #3C6DFA 0%, #014A77 100%);
  color: #fff;
  font-size: 22px;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  transition: all .35s ease;
  z-index: 10;
}
.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(60,109,250,.45);
  background: linear-gradient(90deg, #014A77 0%, #3C6DFA 100%);
}

/* Responsividade do Footer */
@media (max-width: 991px) {
    .footer-cta { flex-direction: column; text-align: center; }
    .footer-cta .cta-content { max-width: 100%; padding: 40px 20px; }
    .footer-cta .cta-image { display: none; }
    .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .footer-widgets-wrapper { padding-top: 120px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-copyright .container {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
}
@media (max-width: 575px) {
    .footer-grid { grid-template-columns: 1fr; }
}