/*
Theme Name: SpeedLordVU-Clean Otimizado
Theme URI: https://dicaemcurso.com/
Author: Manus AI
Author URI: https://www.google.com/
Description: Tema WordPress otimizado para performance, responsividade e minimalismo, com CSS limpo e semântico.
Version: 2.0.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: speedlord

Este tema foi otimizado para remover CSS inline, corrigir problemas de layout e melhorar a performance geral.
*/

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Container Principal */
.site-container {
    max-width: 1280px; /* Levemente mais largo */
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* Logo Otimizada */
.site-logo img {
    max-width: 250px;
    height: auto;
    max-height: 60px;
    object-fit: contain;
}

/* Navegação Principal */
.main-navigation {
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 8px 12px;
    border-radius: 4px;
}

.main-navigation a:hover {
    color: #007cba;
    background: rgba(0, 124, 186, 0.1);
}

/* Busca */
.search-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-form input[type="search"] {
    padding: 10px 15px;
    border: 2px solid #e5e5e5;
    border-radius: 25px;
    font-size: 14px;
    width: 250px;
    transition: border-color 0.3s ease;
}

.search-form input[type="search"]:focus {
    outline: none;
    border-color: #007cba;
}

.search-form button {
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.search-form button:hover {
    background: #005a87;
}

/* Conteúdo Principal */
.site-content {
    padding: 40px 0;
    min-height: 60vh;
}

/* Grid de Posts */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

/* Cards de Post */
.post-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.post-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover img {
    transform: scale(1.05);
}

.post-card-content {
    padding: 20px;
}

.post-card h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.post-card h2 a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
}

.post-card h2 a:hover {
    color: #007cba;
}

.post-card .excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
}

.post-category {
    background: #007cba;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s ease;
}

.post-category:hover {
    background: #005a87;
}

/* Footer */
.site-footer {
    background: #f8f9fa;
    border-top: 1px solid #e5e5e5;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    text-align: center;
    color: #666;
}

.footer-menu {
    margin-bottom: 20px;
}

.footer-menu ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-menu a {
    text-decoration: none;
    color: #666;
    transition: color 0.3s ease;
    white-space: normal;
}

.footer-menu a:hover {
    color: #007cba;
}

.footer-categories {
    margin-bottom: 20px;
}

.footer-categories a {
    white-space: normal;
    margin: 0 10px;
}

/* Responsividade */
@media (max-width: 768px) {
    .site-content {
        display: block;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .site-logo img {
        max-width: 200px;
        max-height: 50px;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-form input[type="search"] {
        width: 200px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .post-card {
        margin: 0 10px;
    }
    
    .footer-menu ul {
        flex-direction: column;
        gap: 15px;
    }
    
    .site-container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .site-logo img {
        max-width: 180px;
        max-height: 45px;
    }
    
    .search-form {
        flex-direction: column;
        width: 100%;
    }
    
    .search-form input[type="search"] {
        width: 100%;
    }
    
    .post-card-content {
        padding: 15px;
    }
    
    .post-card h2 {
        font-size: 16px;
    }
}

/* Otimizações de Performance */
.post-card img {
    loading: lazy;
}

/* Acessibilidade */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Estados de foco para acessibilidade */
a:focus,
button:focus,
input:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Animações suaves */
* {
    transition: all 0.3s ease;
}

/* Prevenção de overflow horizontal */
html, body {
    overflow-x: hidden !important;
}

.footer-menu a, 
.footer-categories a {
    white-space: normal !important;
}

/* Mobile-only: full-width header and footer on single-post pages */
@media only screen and (max-width: 768px) {
  body.single-post header#masthead,
  body.single-post footer#colophon {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  /* Ensure the site-container inside header/footer does not restrict width */
  body.single-post header#masthead .site-container,
  body.single-post footer#colophon .site-container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
}


/* ─── MOBILE: Force entry-meta into single row ─── */
@media only screen and (max-width: 768px) {
  .entry-meta {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    white-space: nowrap !important;
  }
  .entry-meta .entry-author,
  .entry-meta .entry-date,
  .entry-meta .post-categories {
    display: inline-block !important;
    margin-right: 0.5rem !important;
  }
  .entry-meta .post-categories {
    margin-right: 0 !important;
  }
}

/* FULL MOBILE TOP SPACING REDUCTION */
@media only screen and (max-width: 768px) {
  /* Header and nav spacing */
  .site-header,
  .site-branding,
  .site-navigation,
  .header-container {
      margin-bottom: 0 !important;
      padding-bottom: 0 !important;
  }
  /* Content wrapper */
  .site-content,
  #content,
  .content-area,
  main#main {
      margin-top: 0 !important;
      padding-top: 0 !important;
  }
  /* Entry header */
  .entry-header {
      margin-top: 0 !important;
      padding-top: 0 !important;
      margin-bottom: 2px !important;
      padding-bottom: 0 !important;
  }
  /* Title and meta */
  .entry-header .entry-title {
      margin-top: 0 !important;
      margin-bottom: 2px !important;
      padding: 0 !important;
  }
  .entry-header .entry-meta {
      margin-top: 1px !important;
      margin-bottom: 2px !important;
  }
}


/* Footer Categories Styles */
.footer-categories {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e5e5;
}
.footer-categories-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.75rem;
}
.footer-categories-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-categories-item {
  margin: 0;
}
.footer-category-link {
  text-decoration: none;
  font-size: 0.9rem;
  color: #555;
  padding: 0.25rem 0.5rem;
  transition: color 0.3s ease;
}
.footer-category-link:hover,
.footer-category-link:focus {
  color: #000;
}


/* Center footer categories */
.footer-categories,
.footer-categories-list {
    text-align: center;
    justify-content: center;
}
