/**
 * Home Money Theme - Main Styles
 * 
 * @package HomeMoney
 * @version 1.0.0
 */

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

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

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

a {
    color: #1e40af;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #f97316;
}

/* =====================================================
   LAYOUT E CONTAINER
   ===================================================== */

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

.content-area {
    width: 100%;
    padding: 40px 0;
}

/* Layout com sidebar */
@media (min-width: 768px) {
    .container {
        display: flex;
        gap: 40px;
    }
    
    .content-area {
        flex: 1;
        min-width: 0;
    }
    
    .sidebar {
        flex: 0 0 300px;
    }
}

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

.site-header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

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

.site-branding {
    display: flex;
    align-items: center;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.site-title a {
    color: #1e40af;
}

.site-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 4px 0 0;
}

.custom-logo-link img {
    max-height: 60px;
    width: auto;
}

/* =====================================================
   NAVIGATION
   ===================================================== */

.main-navigation {
    position: relative;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-icon {
    display: block;
    width: 24px;
    height: 2px;
    background: #333;
    position: relative;
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: #333;
    left: 0;
}

.menu-icon::before {
    top: -8px;
}

.menu-icon::after {
    bottom: -8px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    color: #374151;
    font-weight: 500;
    padding: 8px 0;
    display: block;
}

.nav-menu a:hover {
    color: #f97316;
}

.nav-menu .current-menu-item a {
    color: #1e40af;
    border-bottom: 2px solid #1e40af;
}

/* Menu responsivo */
@media (max-width: 767px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        background: #fff;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        padding: 20px;
        min-width: 200px;
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-menu.toggled {
        display: flex;
    }
}

/* =====================================================
   POSTS E CARDS
   ===================================================== */

.post-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.post-thumbnail {
    width: 100%;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

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

.post-content {
    padding: 24px;
}

.entry-title {
    font-size: 1.5rem;
    line-height: 1.3;
    margin-bottom: 12px;
    font-weight: 700;
}

.entry-title a {
    color: #111827;
}

.entry-title a:hover {
    color: #1e40af;
}

.entry-meta {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 16px;
}

.entry-meta span {
    margin-right: 16px;
}

.entry-summary,
.entry-content {
    color: #4b5563;
    line-height: 1.7;
    margin-bottom: 16px;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin-top: 32px;
    margin-bottom: 16px;
    color: #111827;
}

.entry-content p {
    margin-bottom: 16px;
}

.entry-content ul,
.entry-content ol {
    margin-left: 24px;
    margin-bottom: 16px;
}

.read-more-link {
    display: inline-flex;
    align-items: center;
    color: #1e40af;
    font-weight: 600;
    transition: gap 0.3s ease;
}

.read-more-link:hover {
    color: #f97316;
    gap: 8px;
}

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

.single-post article,
.single-page article {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.single-post .entry-header,
.single-page .entry-header {
    margin-bottom: 32px;
}

.single-post .entry-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.single-post .post-thumbnail {
    margin-bottom: 32px;
    border-radius: 8px;
    overflow: hidden;
}

.entry-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

/* =====================================================
   NAVEGAÇÃO DE POSTS
   ===================================================== */

.post-navigation,
.posts-navigation {
    margin: 40px 0;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 20px;
}

.nav-previous,
.nav-next {
    flex: 1;
}

.nav-previous a,
.nav-next a {
    display: block;
    padding: 16px 20px;
    background: #f9fafb;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.nav-previous a:hover,
.nav-next a:hover {
    background: #f3f4f6;
}

.nav-subtitle {
    display: block;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 4px;
}

.nav-title {
    font-weight: 600;
    color: #111827;
}

/* =====================================================
   COMENTÁRIOS
   ===================================================== */

.comments-area {
    margin-top: 60px;
}

.comments-title {
    font-size: 1.75rem;
    margin-bottom: 32px;
}

.comment-list {
    list-style: none;
    margin: 0 0 40px;
}

.comment-body {
    background: #f9fafb;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.comment-author img {
    border-radius: 50%;
}

.comment-metadata {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 12px;
}

.comment-content {
    line-height: 1.7;
}

.comment-reply-link {
    font-size: 0.875rem;
    color: #1e40af;
    font-weight: 600;
}

.comment-form {
    background: #f9fafb;
    padding: 32px;
    border-radius: 8px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 16px;
}

.comment-form textarea {
    min-height: 120px;
    resize: vertical;
}

.btn,
.comment-form button[type="submit"] {
    background: #1e40af;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn:hover,
.comment-form button[type="submit"]:hover {
    background: #1e3a8a;
}

.btn-primary {
    background: #f97316;
}

.btn-primary:hover {
    background: #ea580c;
}

/* =====================================================
   SIDEBAR & WIDGETS
   ===================================================== */

.widget {
    background: #f9fafb;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.widget-title {
    font-size: 1.25rem;
    margin-bottom: 16px;
    color: #111827;
}

.widget ul {
    list-style: none;
}

.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: #374151;
}

.widget ul li a:hover {
    color: #1e40af;
}

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

.site-footer {
    background: #111827;
    color: #d1d5db;
    margin-top: 80px;
    padding: 60px 0 30px;
}

.footer-widgets {
    margin-bottom: 40px;
}

.footer-widget {
    margin-bottom: 24px;
}

.footer-widget-title {
    color: #fff;
    font-size: 1.125rem;
    margin-bottom: 16px;
}

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid #374151;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-info {
    font-size: 0.875rem;
}

.footer-info a {
    color: #f97316;
}

.footer-navigation .footer-menu {
    display: flex;
    list-style: none;
    gap: 24px;
}

.footer-navigation a {
    color: #d1d5db;
    font-size: 0.875rem;
}

.footer-navigation a:hover {
    color: #fff;
}

/* =====================================================
   PÁGINA 404
   ===================================================== */

.error-404 {
    text-align: center;
    padding: 80px 20px;
}

.error-404 .page-title {
    font-size: 3rem;
    color: #1e40af;
    margin-bottom: 20px;
}

.error-404 .page-content {
    max-width: 600px;
    margin: 0 auto;
}

.error-404-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 60px;
    text-align: left;
}

/* =====================================================
   ARCHIVE & SEARCH
   ===================================================== */

.page-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.page-title {
    font-size: 2rem;
    color: #111827;
}

.archive-description {
    margin-top: 12px;
    color: #6b7280;
}

.posts-grid {
    display: grid;
    gap: 30px;
}

@media (min-width: 768px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =====================================================
   FORMULÁRIO DE BUSCA
   ===================================================== */

.search-form {
    display: flex;
    gap: 8px;
    margin: 24px 0;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
}

.search-form button {
    padding: 12px 24px;
    background: #1e40af;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.search-form button:hover {
    background: #1e3a8a;
}

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

.screen-reader-text {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.alignleft {
    float: left;
    margin-right: 24px;
    margin-bottom: 16px;
}

.alignright {
    float: right;
    margin-left: 24px;
    margin-bottom: 16px;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 0.875rem;
    color: #6b7280;
    text-align: center;
    padding: 8px 0;
}

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

@media (max-width: 767px) {
    .site-header {
        padding: 15px 0;
    }
    
    .entry-title {
        font-size: 1.25rem;
    }
    
    .single-post .entry-title {
        font-size: 1.75rem;
    }
    
    .single-post article,
    .single-page article {
        padding: 24px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-navigation .footer-menu {
        flex-direction: column;
        gap: 12px;
    }
}
