/*
Theme Name: eLabi Blog Theme
Theme URI: https://elabi.com.br
Author: eLabi
Author URI: https://elabi.com.br
Description: Tema customizado para o blog da eLabi - Plataforma de retenção estudantil com IA
Version: 1.0
Requires at least: 5.8
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: elabi
Tags: blog, education, clean, minimal, responsive
*/

/* ===================================
   RESET E BASE
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #FF6B4A;
    --primary-hover: #ff5533;
    --text-dark: #1a1a1a;
    --text-gray: #666666;
    --text-light: #999999;
    --bg-light: #fef5f3;
    --bg-white: #ffffff;
    --border-color: #e5e5e5;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --max-width: 1200px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1.5rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

/* ===================================
   HEADER
   =================================== */

.site-header {
    background: var(--bg-white);
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.site-logo:hover {
    color: var(--text-dark);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
    padding: 0;
    margin: 0;
}

.main-navigation a {
    color: var(--text-gray);
    font-weight: 500;
    font-size: 0.95rem;
}

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

.cta-button {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background: var(--primary-hover);
    color: white;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 5px 0;
    transition: 0.3s;
}

/* ===================================
   MAIN CONTENT
   =================================== */

.site-main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* Hero Section para blog */
.blog-hero {
    background: linear-gradient(135deg, var(--bg-light) 0%, #fff 100%);
    padding: 4rem 2rem;
    text-align: center;
    margin-bottom: 4rem;
    border-radius: var(--radius-lg);
}

.blog-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.blog-hero p {
    font-size: 1.25rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* ===================================
   POSTS GRID
   =================================== */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.post-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.post-thumbnail {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.post-content {
    padding: 1.5rem;
}

.post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.post-category {
    background: var(--bg-light);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.post-card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.post-card h2 a {
    color: var(--text-dark);
}

.post-card h2 a:hover {
    color: var(--primary-color);
}

.post-excerpt {
    color: var(--text-gray);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more:after {
    content: "→";
    transition: transform 0.3s ease;
}

.read-more:hover:after {
    transform: translateX(4px);
}

/* ===================================
   SINGLE POST
   =================================== */

.single-post {
    max-width: 800px;
    margin: 0 auto;
}

.post-header {
    margin-bottom: 3rem;
    text-align: center;
}

.post-header h1 {
    font-size: 2.75rem;
    margin-bottom: 1.5rem;
}

.post-header .post-meta {
    justify-content: center;
    font-size: 1rem;
}

.featured-image {
    width: 100%;
    border-radius: var(--radius-lg);
    margin-bottom: 3rem;
    box-shadow: var(--shadow-md);
}

.post-body {
    font-size: 1.125rem;
    line-height: 1.8;
}

.post-body h2 {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.post-body h3 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.post-body img {
    border-radius: var(--radius-md);
    margin: 2rem 0;
}

.post-body blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-gray);
}

.post-body code {
    background: var(--bg-light);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.post-body pre {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: 2rem 0;
}

.post-body pre code {
    background: none;
    padding: 0;
}

/* Tags e Compartilhamento */
.post-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tag {
    background: var(--bg-light);
    color: var(--text-gray);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

.tag:hover {
    background: var(--primary-color);
    color: white;
}

/* ===================================
   SIDEBAR
   =================================== */

.sidebar {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: var(--radius-md);
}

.widget {
    margin-bottom: 2rem;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget li {
    margin-bottom: 0.75rem;
}

.widget a {
    color: var(--text-gray);
}

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

/* Search Widget */
.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-form input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
}

.search-form button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
}

.search-form button:hover {
    background: var(--primary-hover);
}

/* ===================================
   PAGINATION
   =================================== */

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 4rem;
}

.pagination a,
.pagination span {
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-gray);
}

.pagination a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ===================================
   FOOTER
   =================================== */

.site-footer {
    background: #1f2937;
    color: #9ca3af;
    padding: 3rem 0 1.5rem;
    margin-top: 6rem;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-about h3,
.footer-column h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-about p {
    line-height: 1.6;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column li {
    margin-bottom: 0.75rem;
}

.footer-column a {
    color: #9ca3af;
}

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

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid #374151;
    text-align: center;
    font-size: 0.875rem;
}

/* ===================================
   RESPONSIVIDADE
   =================================== */

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .header-container {
        padding: 0 1rem;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 1rem;
        box-shadow: var(--shadow-md);
    }
    
    .main-navigation.active {
        display: block;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    .site-main {
        padding: 2rem 1rem;
    }
    
    .blog-hero {
        padding: 3rem 1.5rem;
    }
    
    .blog-hero h1 {
        font-size: 2rem;
    }
    
    .blog-hero p {
        font-size: 1rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .single-post {
        padding: 0 1rem;
    }
    
    .post-header h1 {
        font-size: 2rem;
    }
    
    .post-body {
        font-size: 1rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .blog-hero h1 {
        font-size: 1.75rem;
    }
    
    .post-card h2 {
        font-size: 1.25rem;
    }
    
    .pagination a,
    .pagination span {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* ===================================
   UTILITÁRIOS
   =================================== */

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

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

.mt-4 { margin-top: 4rem; }
.mb-4 { margin-bottom: 4rem; }
.py-4 { padding-top: 4rem; padding-bottom: 4rem; }

.highlight {
    color: var(--primary-color);
}

.button {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.button:hover {
    background: var(--primary-hover);
    color: white;
    transform: translateY(-2px);
}

.button-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.button-outline:hover {
    background: var(--primary-color);
    color: white;
}
