/* ============================================
   Life in the Cottage - Main Stylesheet
   A warm, inviting rustic-chic design
   ============================================ */

/* CSS Variables */
:root {
    --sage-green: #84a98c;
    --sage-green-dark: #6b8a73;
    --sage-green-light: #a3c4ad;
    --cream: #f8f4e8;
    --cream-dark: #efe9d9;
    --warm-brown: #8b7355;
    --warm-brown-dark: #6d5a44;
    --warm-brown-light: #a89070;
    --charcoal: #2d3436;
    --charcoal-light: #4a4f51;
    --white: #ffffff;
    --off-white: #fafaf7;
    --shadow-sm: 0 2px 4px rgba(45, 52, 54, 0.08);
    --shadow-md: 0 4px 12px rgba(45, 52, 54, 0.12);
    --shadow-lg: 0 8px 24px rgba(45, 52, 54, 0.16);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--charcoal);
    background-color: var(--cream);
}

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

a {
    color: var(--sage-green-dark);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--warm-brown);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--charcoal);
    margin-bottom: 0.5em;
}

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

p {
    margin-bottom: 1em;
}

ul, ol {
    margin-bottom: 1em;
    padding-left: 1.5em;
}

li {
    margin-bottom: 0.5em;
}

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

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

/* Header */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--sage-green-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo:hover {
    color: var(--sage-green-dark);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--sage-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

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

.nav-link {
    font-weight: 500;
    color: var(--charcoal);
    padding: 5px 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--sage-green);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--sage-green-dark);
}

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--sage-green-light) 0%, var(--sage-green) 100%);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.95;
    margin-bottom: 30px;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* Search Bar */
.search-bar {
    max-width: 500px;
    margin: 30px auto 0;
    display: flex;
    gap: 10px;
}

.search-bar input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
}

.search-bar button {
    padding: 15px 25px;
    background: var(--warm-brown);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.search-bar button:hover {
    background: var(--warm-brown-dark);
}

/* Featured Section */
.featured-section {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--sage-green);
    border-radius: 2px;
}

.section-subtitle {
    color: var(--charcoal-light);
    margin-top: 20px;
}

/* Article Grid */
.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.article-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.article-card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.article-card-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--sage-green);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.article-card-content {
    padding: 25px;
}

.article-card-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--charcoal-light);
    margin-bottom: 10px;
}

.article-card-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.article-card-title a {
    color: var(--charcoal);
}

.article-card-title a:hover {
    color: var(--sage-green-dark);
}

.article-card-excerpt {
    color: var(--charcoal-light);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.article-card-link {
    font-weight: 600;
    color: var(--sage-green-dark);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.article-card-link:hover {
    gap: 10px;
}

/* Category Pills */
.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 40px;
}

.category-pill {
    padding: 10px 20px;
    background: var(--white);
    border: 2px solid var(--sage-green-light);
    border-radius: 30px;
    color: var(--charcoal);
    font-weight: 500;
    transition: var(--transition);
}

.category-pill:hover,
.category-pill.active {
    background: var(--sage-green);
    border-color: var(--sage-green);
    color: var(--white);
}

/* Newsletter Section */
.newsletter-section {
    background: var(--sage-green);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-content h2 {
    color: var(--white);
    margin-bottom: 15px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}

.newsletter-form input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
}

.newsletter-form button {
    padding: 15px 30px;
    background: var(--warm-brown);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background: var(--warm-brown-dark);
}

/* Two Column Layout */
.two-column {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    padding: 60px 0;
}

/* Main Content Area */
.main-content {
    padding: 60px 0;
}

.article-full {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.article-featured-image {
    height: 400px;
    background-size: cover;
    background-position: center;
}

.article-body {
    padding: 40px;
}

.article-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--cream-dark);
}

.article-category {
    display: inline-block;
    background: var(--sage-green);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.article-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.article-meta {
    display: flex;
    gap: 20px;
    color: var(--charcoal-light);
    font-size: 0.9rem;
}

.article-meta i {
    margin-right: 5px;
    color: var(--sage-green);
}

.article-content h2 {
    margin-top: 2em;
    padding-top: 1em;
    border-top: 1px solid var(--cream-dark);
}

.article-content h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.article-content h3 {
    color: var(--sage-green-dark);
    margin-top: 1.5em;
}

.article-content p {
    font-size: 1.05rem;
    line-height: 1.8;
}

.article-content ul, .article-content ol {
    font-size: 1.05rem;
    line-height: 1.8;
}

/* Blockquote */
.article-content blockquote {
    background: var(--cream);
    border-left: 4px solid var(--sage-green);
    padding: 20px 25px;
    margin: 30px 0;
    font-style: italic;
    color: var(--charcoal-light);
}

/* Author Box */
.author-box {
    display: flex;
    gap: 20px;
    background: var(--cream);
    padding: 30px;
    border-radius: var(--radius-lg);
    margin-top: 40px;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h4 {
    margin-bottom: 5px;
}

.author-info p {
    color: var(--charcoal-light);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* Related Posts */
.related-posts {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--cream-dark);
}

.related-posts h3 {
    margin-bottom: 20px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-card {
    background: var(--cream);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.related-card:hover {
    transform: translateY(-3px);
}

.related-card-image {
    height: 120px;
    background-size: cover;
    background-position: center;
}

.related-card-content {
    padding: 15px;
}

.related-card-title {
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.related-card-title a {
    color: var(--charcoal);
}

.related-card-title a:hover {
    color: var(--sage-green-dark);
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}

.sidebar-widget h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--sage-green-light);
}

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

.sidebar-widget li {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--cream-dark);
}

.sidebar-widget li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sidebar-widget a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--charcoal);
}

.sidebar-widget a:hover {
    color: var(--sage-green-dark);
}

.sidebar-widget .count {
    background: var(--cream);
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.8rem;
    color: var(--charcoal-light);
}

/* Popular Posts Widget */
.popular-post {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.popular-post:last-child {
    margin-bottom: 0;
}

.popular-post-image {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

.popular-post h4 {
    font-size: 0.9rem;
    margin-bottom: 5px;
    line-height: 1.4;
}

.popular-post h4 a {
    color: var(--charcoal);
}

.popular-post h4 a:hover {
    color: var(--sage-green-dark);
}

.popular-post-date {
    font-size: 0.8rem;
    color: var(--charcoal-light);
}

/* Footer */
.footer {
    background: var(--charcoal);
    color: var(--cream);
    padding: 60px 0 30px;
}

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

.footer-about h3 {
    color: var(--white);
    margin-bottom: 15px;
}

.footer-about p {
    color: rgba(248, 244, 232, 0.7);
    line-height: 1.7;
}

.footer-links h4 {
    color: var(--white);
    font-size: 1rem;
    margin-bottom: 20px;
}

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

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(248, 244, 232, 0.7);
}

.footer-links a:hover {
    color: var(--sage-green-light);
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cream);
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--sage-green);
    color: var(--white);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: rgba(248, 244, 232, 0.6);
}

/* Contact Page */
.contact-section {
    padding: 60px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info {
    background: var(--sage-green);
    color: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
}

.contact-info h2 {
    color: var(--white);
    margin-bottom: 20px;
}

.contact-info p {
    opacity: 0.9;
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-item i {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-form {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.contact-form h2 {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--cream-dark);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--sage-green);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 30px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--sage-green);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--sage-green-dark);
    color: var(--white);
}

.btn-secondary {
    background: var(--warm-brown);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--warm-brown-dark);
    color: var(--white);
}

/* About Page */
.about-hero {
    padding: 60px 0;
    text-align: center;
}

.about-intro {
    display: flex;
    gap: 40px;
    align-items: center;
    padding: 40px 0;
}

.about-image {
    flex: 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.about-image img {
    width: 100%;
    height: auto;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    margin-bottom: 20px;
}

/* Privacy/Terms Page */
.legal-content {
    padding: 60px 0;
}

.legal-content h2 {
    margin-top: 2em;
    padding-top: 1em;
    border-top: 1px solid var(--cream-dark);
}

.legal-content h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

/* Sitemap Page */
.sitemap-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 60px 0;
}

.sitemap-section h3 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--sage-green-light);
}

.sitemap-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sitemap-section li {
    margin-bottom: 10px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: var(--radius-md);
    color: var(--charcoal);
    font-weight: 500;
    transition: var(--transition);
}

.pagination a:hover,
.pagination a.active {
    background: var(--sage-green);
    color: var(--white);
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--charcoal-light);
    margin-bottom: 20px;
}

.breadcrumbs a {
    color: var(--charcoal-light);
}

.breadcrumbs a:hover {
    color: var(--sage-green-dark);
}

.breadcrumbs span {
    color: var(--charcoal-light);
}

/* Mobile Menu */
.mobile-nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 20px;
    box-shadow: var(--shadow-md);
    z-index: 999;
}

.mobile-nav.active {
    display: block;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-list li {
    margin-bottom: 0;
}

.mobile-nav-list a {
    display: block;
    padding: 15px 0;
    border-bottom: 1px solid var(--cream-dark);
    color: var(--charcoal);
    font-weight: 500;
}

.mobile-nav-list a:hover {
    color: var(--sage-green-dark);
}

/* Responsive Design */
@media (max-width: 992px) {
    .article-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .two-column {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero {
        padding: 50px 0;
    }
    
    .nav-list {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .about-intro {
        flex-direction: column;
    }
    
    .sitemap-grid {
        grid-template-columns: 1fr;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .article-featured-image {
        height: 250px;
    }
    
    .article-body {
        padding: 25px;
    }
    
    .article-title {
        font-size: 1.75rem;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .search-bar {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 40px 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .category-pills {
        gap: 8px;
    }
    
    .category-pill {
        padding: 8px 15px;
        font-size: 0.85rem;
    }
    
    .author-box {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-sage { color: var(--sage-green); }
.text-brown { color: var(--warm-brown); }
.mt-1 { margin-top: 1em; }
.mt-2 { margin-top: 2em; }
.mb-1 { margin-bottom: 1em; }
.mb-2 { margin-bottom: 2em; }
