/*
Theme Name: Off The Grid Hub
Theme URI: https://offthegridhub.xyz
Description: A comprehensive WordPress theme for off-grid living content, optimized for AdSense and SEO. Features responsive design, blog functionality, and all required legal pages for monetization.
Author: Off Grid Living Expert
Version: 1.0
License: GPL v2 or later
Text Domain: offgridhub
Tags: blog, two-columns, responsive-layout, custom-menu, featured-images, threaded-comments, translation-ready, seo-ready, adsense-ready
*/

/* Import existing styles */
@import url('https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Root Variables */
:root {
    --primary-color: #2c5530;
    --secondary-color: #4a7c59;
    --accent-color: #7fb069;
    --text-dark: #2d3436;
    --text-light: #636e72;
    --background-light: #f8f9fa;
    --border-color: #e9ecef;
    --success-color: #00b894;
    --warning-color: #fdcb6e;
    --error-color: #e17055;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #ffffff;
}

/* WordPress specific classes */
.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 0.9em;
    color: var(--text-light);
    margin-top: 0.5rem;
}

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

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

.aligncenter {
    display: block;
    margin: 0 auto;
}

/* Header Styles */
.site-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: white !important;
    text-decoration: none;
}

.navbar-nav .nav-link {
    color: white !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(44, 85, 48, 0.8), rgba(74, 124, 89, 0.8)),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 600"><rect fill="%234a7c59" width="1000" height="600"/><circle fill="%232c5530" cx="200" cy="150" r="80"/><circle fill="%237fb069" cx="800" cy="450" r="120"/></svg>');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 5rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Content Sections */
.content-section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-title p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Blog Cards */
.blog-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-card-body {
    padding: 1.5rem;
}

.blog-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.blog-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

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

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 500;
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 500;
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

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

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

.footer-section h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.footer-section a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: var(--transition);
}

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

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
    text-align: center;
    color: rgba(255,255,255,0.7);
}

/* AdSense Containers */
.adsense-banner {
    text-align: center;
    margin: 2rem 0;
    padding: 1rem;
    background-color: var(--background-light);
    border-radius: var(--border-radius);
}

.adsense-sidebar {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: var(--background-light);
    border-radius: var(--border-radius);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .navbar-brand {
        font-size: 1.5rem;
    }
}

/* WordPress Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

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

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

.comment {
    background-color: var(--background-light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

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

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

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

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

.search-form button:hover {
    background-color: var(--secondary-color);
}

/* Pagination */
.pagination {
    justify-content: center;
    margin-top: 3rem;
}

.page-numbers {
    display: inline-block;
    padding: 0.75rem 1rem;
    margin: 0 0.25rem;
    color: var(--primary-color);
    text-decoration: none;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

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

/* Widget Areas */
.widget {
    background-color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

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

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

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

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

.widget a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
}

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

/* Featured images */
.featured-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    object-fit: cover;
}

.article-intro .featured-image {
    max-height: 300px;
    margin-bottom: 1.5rem;
}