/* Main Styles for Minimal Ajax Theme */

/* Header Styles */
.site-header {
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 30px;
    position: relative;
    z-index: 100;
    background: #fff;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 15px;
}

.site-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

.site-title a {
    text-decoration: none;
    color: #333;
}

.site-description {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.main-navigation {
    margin-top: 15px;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.main-navigation a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.main-navigation a:hover {
    color: #0073aa;
}

.menu-toggle {
    display: none;
    background: none;
    border: 1px solid #ddd;
    padding: 10px 15px;
    cursor: pointer;
}

/* Content Styles */
.site-main {
    min-height: 400px;
    position: relative;
    z-index: 1;
}

/* Ensure content area is separate from header/footer */
#content.site-content {
    position: relative;
}

.entry-header {
    margin-bottom: 20px;
}

.entry-title {
    font-size: 28px;
    margin-bottom: 10px;
}

.entry-title a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s;
}

.entry-title a:hover {
    color: #0073aa;
}

.entry-meta {
    font-size: 14px;
    color: #666;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.entry-content {
    line-height: 1.8;
    margin-bottom: 20px;
}

.entry-content img {
    max-width: 100%;
    height: auto;
}

.post-thumbnail {
    margin-bottom: 20px;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.read-more {
    display: inline-block;
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
    transition: background 0.3s;
}

.read-more:hover {
    background: #005a87;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    text-decoration: none;
    border: 1px solid #ddd;
    color: #333;
}

.pagination .current {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* Footer */
.site-footer {
    margin-top: 60px;
    padding: 40px 0;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    position: relative;
    z-index: 100;
    background: #fff;
}

#footer-menu ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

#footer-menu a {
    text-decoration: none;
    color: #666;
}

.site-info {
    font-size: 14px;
    color: #999;
}

/* AJAX Loader */
.ajax-loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    display: none;
}

.ajax-loader.active {
    display: block;
}

/* Prevent header and footer from being affected by AJAX */
.site-header,
.site-footer {
    position: relative;
    z-index: 100;
}

/* AJAX loading state */
body.ajax-loading {
    cursor: wait;
}

body.ajax-loading a {
    pointer-events: none;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Lazy Load */
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy-load.loaded {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .main-navigation ul {
        display: none;
    }
    
    .main-navigation ul.active {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin-top: 15px;
    }
    
    .entry-title {
        font-size: 22px;
    }
}

/* WooCommerce Compatibility */
.woocommerce .site-main {
    padding: 0;
}

/* Elementor Compatibility */
.elementor-page .site-main {
    padding: 0;
}

