/*
 * Home Money Theme Styles
 * Main stylesheet for the theme
 */

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

:root {
    --color-primary: #d97706;
    --color-primary-dark: #b45309;
    --color-secondary: #1e293b;
    --color-text: #334155;
    --color-text-light: #64748b;
    --color-background: #ffffff;
    --color-background-alt: #f8fafc;
    --color-border: #e2e8f0;
    --font-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-heading: Georgia, serif;
    --transition: all 0.3s ease;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
}

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

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition);
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--color-secondary);
}

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

/* Layout */
.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-content {
    flex: 1;
}

.header-container,
.content-area,
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

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

.site-title a {
    color: var(--color-secondary);
}

.site-description {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin: 0;
}

/* Navigation */
.main-navigation {
    position: relative;
}

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

.menu-icon {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-secondary);
    position: relative;
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-secondary);
    position: absolute;
}

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

#primary-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

#primary-menu li a {
    color: var(--color-secondary);
    font-weight: 500;
}

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

/* Main Content */
.site-main {
    display: flex;
    gap: 2rem;
    padding: 3rem 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.content-area {
    flex: 1;
}

.full-width {
    max-width: 100%;
}

/* Posts */
.post-item {
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--color-border);
}

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

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

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

.entry-header {
    margin-bottom: 1.5rem;
}

.entry-title {
    margin-bottom: 0.5rem;
}

.entry-title a {
    color: var(--color-secondary);
}

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

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

.entry-content {
    margin-bottom: 1.5rem;
}

.entry-content p {
    margin-bottom: 1rem;
}

.read-more {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background-color: var(--color-primary);
    color: white;
    border-radius: 4px;
    font-weight: 500;
}

.read-more:hover {
    background-color: var(--color-primary-dark);
    color: white;
}

/* Pagination */
.pagination {
    margin: 3rem 0;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    align-items: center;
}

.page-numbers {
    padding: 0.5rem 1rem;
    background-color: var(--color-background-alt);
    border-radius: 4px;
    color: var(--color-secondary);
}

.page-numbers:hover,
.page-numbers.current {
    background-color: var(--color-primary);
    color: white;
}

/* Sidebar */
.widget-area {
    width: 300px;
    flex-shrink: 0;
}

.widget {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--color-background-alt);
    border-radius: 8px;
}

.widget-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary);
}

.widget ul {
    list-style: none;
}

.widget li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
}

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

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

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

.footer-widget {
    color: rgba(255, 255, 255, 0.8);
}

.footer-widget-title {
    color: white;
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-info {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.footer-menu a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

.footer-menu a:hover {
    color: white;
}

/* Comments */
.comments-area {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 2px solid var(--color-border);
}

.comments-title {
    margin-bottom: 2rem;
}

.comment-list {
    list-style: none;
}

.comment {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--color-background-alt);
    border-radius: 8px;
}

.comment-author {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

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

.comment-form {
    margin-top: 2rem;
}

.comment-form p {
    margin-bottom: 1rem;
}

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-family: inherit;
}

.submit-button {
    padding: 0.75rem 2rem;
    background-color: var(--color-primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.submit-button:hover {
    background-color: var(--color-primary-dark);
}

/* 404 Page */
.error-404 {
    text-align: center;
    padding: 4rem 2rem;
}

.error-404 .page-title {
    font-size: 6rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.error-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

/* Search Form */
.search-form {
    display: flex;
    gap: 0.5rem;
    max-width: 500px;
    margin: 2rem auto;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
}

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

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .menu-wrapper {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .menu-wrapper.active {
        display: block;
    }

    #primary-menu {
        flex-direction: column;
        gap: 0;
    }

    #primary-menu li {
        border-bottom: 1px solid var(--color-border);
    }

    #primary-menu li a {
        display: block;
        padding: 1rem;
    }

    .site-main {
        flex-direction: column;
    }

    .widget-area {
        width: 100%;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* Utility Classes */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.alignleft {
    float: left;
    margin-right: 1.5rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
}

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