/*
Theme Name: Espaço do Povo Pro
Description: Tema personalizado para jornalismo local com foco em periferias e favelas. Otimizado para SEO e Google Discover.
Version: 1.2
Author: Desenvolvido para Espaço do Povo
*/

:root {
    /* Paleta de cores baseada na imagem fornecida e cultura das periferias */
    --primary-red: #FF3B00;        /* Vermelho vibrante */
    --primary-purple: #6A48E5;     /* Roxo moderno */
    --primary-blue: #317BFE;       /* Azul tecnológico */
    --primary-orange: #FEA418;     /* Laranja solar */
    --primary-green: #548E53;      /* Verde natureza */
    --primary-pink: #E291BC;       /* Rosa acolhedor */
    --neutral-gray: #F5F5F5;       /* Cinza neutro */

    /* Cores categoria com tons suaves */
    --cat-1-strong: #1E88E5;       /* Azul forte */
    --cat-1-light: #E3F2FD;        /* Azul suave */
    --cat-2-strong: #FFC107;       /* Amarelo forte */
    --cat-2-light: #FFF8E1;        /* Amarelo suave */
    --cat-3-strong: #4CAF50;       /* Verde forte */
    --cat-3-light: #E8F5E8;        /* Verde suave */

    /* Tons neutros */
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-white: #ffffff;
    --background-light: #ffffff;
    --background-gray: #f8f9fa;
    --border-color: #e9ecef;
    --overlay-dark: rgba(0, 0, 0, 0.6);
}
.site-footer {
  background: var(--text-primary);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}
.footer-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-column {
  min-width: 0;
}
.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #34495e;
  color: #95a5a6;
  font-size: 1rem;
}
.footer-widget-title {
  color: var(--primary-orange);
  margin-bottom: 1rem;
  font-size: 1.15rem;
}
@media (max-width: 900px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
.author-avatar-circle {
    width: 80px; height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: #ffe6bd;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(30,136,229,0.07);
}

.author-avatar-circle img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.cria-logo {
    font-size: 2.5rem;
    color: #FD8600;
    line-height: 1;
    text-align: center;
    width: 80px; height: 80px;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Inter', Arial, sans-serif;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.site-header {
    background: var(--background-light);
    color: var(--text-primary);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

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

.site-logo {
    font-size: 2.2rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

/* Navigation */
.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    margin: 0;
}

.main-navigation a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
    text-transform: capitalize;
}

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

/* Hero Section - Carousel + 2 Laterais */
.hero-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin: 20px 0;
    height: 400px;
}

/* Main Carousel */
.hero-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: var(--text-primary);
}

.carousel-container {
    height: 100%;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease;
}

.carousel-slide {
    min-width: 100%;
    position: relative;
    height: 100%;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(transparent, var(--overlay-dark));
    color: white;
}

.slide-category {
    background: var(--primary-blue);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 1rem;
}

.slide-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
    line-height: 1.2;
}

.slide-date {
    font-size: 0.9rem;
    opacity: 0.8;
    color: white;
}

/* Carousel Navigation */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-nav:hover {
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.carousel-nav.prev { left: 15px; }
.carousel-nav.next { right: 15px; }

/* Side News - 2 notícias laterais */
.side-news {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.side-news-item {
    position: relative;
    height: 190px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--text-primary);
}

.side-news-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.side-news-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(transparent, var(--overlay-dark));
    color: white;
}

.side-news-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: white;
    line-height: 1.3;
}

.side-news-date {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Category Blocks Section - 3 blocos */
.category-blocks-section {
    margin: 40px 0;
}

.category-blocks {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.category-block {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.category-block-header {
    padding: 1.5rem;
    text-align: center;
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
}

.category-block-content {
    padding: 2rem;
    min-height: 200px;
}

.category-story h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.category-story h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.category-story h3 a:hover {
    color: var(--primary-blue);
}

.category-story .story-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.category-story .story-excerpt {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Cores específicas dos blocos */
.category-block:nth-child(1) .category-block-header {
    background: var(--cat-1-strong);
}
.category-block:nth-child(1) .category-block-content {
    background: var(--cat-1-light);
}

.category-block:nth-child(2) .category-block-header {
    background: var(--cat-2-strong);
    color: var(--text-primary);
}
.category-block:nth-child(2) .category-block-content {
    background: var(--cat-2-light);
}

.category-block:nth-child(3) .category-block-header {
    background: var(--cat-3-strong);
}
.category-block:nth-child(3) .category-block-content {
    background: var(--cat-3-light);
}

/* Latest News Section - 8 notícias 2x4 */
.latest-news-section {
    margin: 40px 0;
}

.latest-news-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary);
    text-align: center;
}

.latest-news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.latest-news-item {
    display: flex;
    gap: 1rem;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.latest-news-item:hover {
    transform: translateY(-3px);
}

.latest-news-item img {
    width: 150px;
    height: 120px;
    object-fit: cover;
    flex-shrink: 0;
}

.latest-news-item-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.latest-news-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.latest-news-item h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.latest-news-item h3 a:hover {
    color: var(--primary-blue);
}

.latest-news-item .excerpt {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.latest-news-item .date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Post Page Layout */
.single-post-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin: 2rem 0;
}

.post-content-wrapper {
    max-width: none;
}

/* Sidebar */
.post-sidebar {
    background: var(--background-gray);
    padding: 2rem;
    border-radius: 12px;
    height: fit-content;
    position: sticky;
    top: 120px;
}

.sidebar-section {
    margin-bottom: 2.5rem;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--primary-blue);
    padding-bottom: 0.5rem;
}

/* Search Form in Sidebar */
.sidebar-search .search-form {
    position: relative;
}

.sidebar-search input[type="search"] {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.sidebar-search input[type="search"]:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.sidebar-search .search-submit {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.3s ease;
}

.sidebar-search .search-submit:hover {
    background: var(--primary-red);
}

/* Categories List in Sidebar */
.sidebar-categories ul {
    list-style: none;
}

.sidebar-categories li {
    margin-bottom: 0.5rem;
}

.sidebar-categories a {
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.5rem 0;
    display: block;
    border-bottom: 1px solid var(--border-color);
    transition: color 0.3s ease;
}

.sidebar-categories a:hover {
    color: var(--primary-blue);
    padding-left: 0.5rem;
}

.sidebar-categories .cat-count {
    color: var(--text-secondary);
    font-size: 0.8rem;
    float: right;
}

/* Author Page */
.author-page-layout {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 20px;
}

.author-header {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-pink) 100%);
    color: white;
    padding: 3rem;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.author-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    animation: float 20s infinite linear;
    pointer-events: none;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-50px, -50px) rotate(360deg); }
}

.author-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    margin: 0 auto 1.5rem;
    object-fit: cover;
    position: relative;
    z-index: 1;
}

.author-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.author-bio {
    font-size: 1.1rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.author-stats {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.author-stat {
    text-align: center;
}

.author-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
}

.author-stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Footer */
.site-footer {
    background: var(--text-primary);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--primary-orange);
    margin-bottom: 1rem;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-orange);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #95a5a6;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-section {
        grid-template-columns: 1fr;
        height: auto;
    }

    .hero-carousel {
        height: 300px;
        margin-bottom: 20px;
    }

    .side-news {
        flex-direction: row;
        gap: 15px;
    }

    .side-news-item {
        height: 150px;
        flex: 1;
    }

    .category-blocks {
        grid-template-columns: 1fr;
    }

    .single-post-layout {
        grid-template-columns: 1fr;
    }

    .post-sidebar {
        position: static;
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .main-navigation ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
    }

    .hero-carousel {
        height: 250px;
    }

    .side-news {
        flex-direction: column;
    }

    .latest-news-grid {
        grid-template-columns: 1fr;
    }

    .latest-news-item {
        flex-direction: column;
    }

    .latest-news-item img {
        width: 100%;
        height: 180px;
    }

    .author-name {
        font-size: 2rem;
    }

    .author-stats {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Loading States */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* SEO Optimizations */
.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;
}