/* CSS Variables for Color Scheme */
:root {
    --primary-color: #2D5A27;
    --secondary-color: #F4A460;
    --accent-color: #8B4513;
    --text-dark: #2C2C2C;
    --text-light: #666666;
    --background-light: #FAF9F7;
    --background-white: #FFFFFF;
    --border-color: #E5E5E5;
    --success-color: #28A745;
    --warning-color: #FFC107;
    --error-color: #DC3545;
    --hover-color: #1E3F1C;
}

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

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

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

/* Skip Link */
.skip-link {
    position: absolute;
    left: -9999px;
    z-index: 999999;
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
}

.skip-link:focus {
    left: 6px;
    top: 7px;
}

/* Header Styles */
.site-header {
    background: var(--background-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-head {
    padding: 15px 0;
}

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

.site-branding img {
    max-height: 50px;
    width: auto;
}

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

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--primary-color);
    cursor: pointer;
}

.menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu li {
    margin-left: 2rem;
}

.menu a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 0;
    transition: color 0.3s ease;
}

.menu a:hover,
.menu .current-menu-item a {
    color: var(--primary-color);
}

/* Main Content */
.main-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    padding: 40px 0;
}

.site-main {
    background: var(--background-white);
    padding: 0;
}

/* Card Styles */
.card-item {
    background: var(--background-white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card-blog-post {
    padding: 2rem;
}

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

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

.entry-title a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    transition: color 0.3s ease;
}

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

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

.entry-meta strong {
    color: var(--text-dark);
}

.entry-meta a {
    color: var(--text-light);
    text-decoration: none;
}

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

/* Post Tags */
.post-tags {
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.post-tags strong {
    color: var(--text-dark);
}

.post-tags a {
    display: inline-block;
    background: var(--background-light);
    color: var(--primary-color);
    padding: 4px 8px;
    border-radius: 4px;
    text-decoration: none;
    margin-left: 4px;
    font-size: 0.8rem;
    transition: background-color 0.3s ease;
}

.post-tags a:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Images */
.default-post-img,
.card-media img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.card-media {
    margin-bottom: 1rem;
}

.card-media a {
    display: block;
    border-radius: 8px;
    overflow: hidden;
}

/* Content */
.entry-content {
    color: var(--text-light);
    line-height: 1.7;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.btn:hover {
    background: var(--hover-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(45, 90, 39, 0.3);
}

/* Sidebar */
.widget-area {
    padding: 0;
}

.widget {
    background: var(--background-white);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

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

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

.search-field {
    flex: 1;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
}

.search-field:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-submit {
    padding: 10px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.search-submit:hover {
    background: var(--hover-color);
}

/* Widget Lists */
.widget ul {
    list-style: none;
}

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

.widget a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Tag Cloud */
.tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-cloud-link {
    background: var(--background-light);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

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

/* Newsletter Form */
.tnp-field {
    margin-bottom: 1rem;
}

.tnp-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.tnp-email {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
}

.tnp-email:focus {
    outline: none;
    border-color: var(--primary-color);
}

.tnp-submit {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.tnp-submit:hover {
    background: var(--hover-color);
}

/* Footer */
.site-footer {
    background: var(--text-dark);
    color: #CCCCCC;
    margin-top: 60px;
}

.footer-top {
    padding: 3rem 0;
}

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

.footer-col .widget-title {
    color: white;
    border-bottom-color: var(--primary-color);
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.5rem;
}

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

.footer-col a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem 0;
    text-align: center;
}

.footer-bottom a {
    color: var(--secondary-color);
    text-decoration: none;
}

/* Go to Top Button */
.go-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(45, 90, 39, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

.go-to-top:hover {
    background: var(--hover-color);
    transform: translateY(-2px);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-content {
    background: var(--background-white);
    border-radius: 12px;
    max-width: 90%;
    max-height: 90%;
    width: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.modal-header {
    background: var(--primary-color);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 2rem;
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.6;
}

.modal-body h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.modal-body h3:first-child {
    margin-top: 0;
}

.modal-body p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.modal-body ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    color: var(--text-light);
}

.modal-body li {
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .main-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .menu-m-container {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--background-white);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        border-radius: 0 0 12px 12px;
        z-index: 1000;
    }
    
    .menu-m-container.active {
        display: block;
    }
    
    .menu {
        flex-direction: column;
        padding: 1rem;
    }
    
    .menu li {
        margin: 0;
        margin-bottom: 0.5rem;
    }
    
    .menu a {
        display: block;
        padding: 0.5rem 0;
    }
    
    .card-blog-post {
        padding: 1.5rem;
    }
    
    .entry-title a {
        font-size: 1.3rem;
    }
    
    .footer-top .flex-row {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-body {
        padding: 1.5rem;
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .card-blog-post {
        padding: 1rem;
    }
    
    .entry-title a {
        font-size: 1.1rem;
    }
    
    .default-post-img,
    .card-media img {
        height: 200px;
    }
    
    .widget {
        padding: 1rem;
    }
    
    .go-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus states for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .site-header,
    .sidebar-width,
    .site-footer,
    .go-to-top {
        display: none;
    }
    
    .main-wrapper {
        grid-template-columns: 1fr;
    }
    
    .card-item {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
}