/* Multi-Tenant Blog System CSS - Optimized for 100% PageSpeed */

:root {
    --tenant-color: #1a4d3a;
    --tenant-color-light: #2d5a3d;
    --tenant-color-dark: #0d2818;
    --text-primary: #333;
    --text-secondary: #666;
    --text-light: #999;
    --background: #fff;
    --border: #e1e5e9;
    --shadow: rgba(0, 0, 0, 0.1);
}

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

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

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

.site-header {
    background: var(--tenant-color);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px var(--shadow);
}

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

.site-title {
    font-size: 1.8rem;
    font-weight: 700;
}

.site-title a {
    color: white;
    text-decoration: none;
}

.main-nav, .main-navigation {
    display: flex;
    gap: 2rem;
}

.main-nav ul, .main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.main-nav li, .main-navigation li {
    margin: 0;
    padding: 0;
}

.main-nav a, .main-navigation a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.main-nav a:hover, .main-navigation a:hover {
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.1);
}

.main-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.breadcrumbs {
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.breadcrumbs a {
    color: var(--tenant-color);
    text-decoration: none;
}

.breadcrumbs .separator {
    margin: 0 0.5rem;
}

.breadcrumbs .current {
    color: var(--text-secondary);
}

.blog-header {
    text-align: center;
    margin-bottom: 3rem;
}

.blog-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--tenant-color);
}

.blog-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

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

.post-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow);
}

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

.post-content {
    padding: 1.5rem;
}

.post-title {
    margin-bottom: 0.75rem;
}

.post-title a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
}

.post-title a:hover {
    color: var(--tenant-color);
}

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

.post-domain {
    display: inline-block;
    margin-left: 1rem;
    padding: 0.25rem 0.5rem;
    background: #f0f0f0;
    border-radius: 12px;
    font-size: 0.8rem;
    color: #555;
}

.post-excerpt {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.read-more {
    color: var(--tenant-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.read-more:hover {
    text-decoration: underline;
}

.blog-post {
    max-width: 800px;
    margin: 0 auto;
}

.post-header {
    text-align: center;
    margin-bottom: 2rem;
}

.post-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: var(--tenant-color);
}

.featured-image {
    margin: 2rem 0;
    text-align: center;
}

.featured-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px var(--shadow);
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.post-content h2 {
    color: var(--tenant-color);
    margin: 2rem 0 1rem 0;
    font-size: 1.5rem;
}

.post-content h3 {
    color: var(--tenant-color-light);
    margin: 1.5rem 0 0.75rem 0;
}

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

.post-content ul, .post-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-images {
    margin: 2rem 0;
}

.post-images h3 {
    margin-bottom: 1rem;
    color: var(--tenant-color);
}

/* Alternating Content Images */
.content-image {
    margin: 1.5rem 0;
    max-width: 300px;
}

.content-image.image-right {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.content-image.image-left {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.content-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}


.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow);
}

.banner-space {
    margin: 2rem 0;
    text-align: center;
}

.author-bio {
    margin: 3rem 0 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-left: 4px solid var(--tenant-color);
    border-radius: 0 8px 8px 0;
}

.author-bio h4 {
    color: var(--tenant-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.author-bio p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.bio-cta {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--tenant-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.bio-cta:hover {
    background: var(--tenant-color-dark);
}

.footer-signature {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    opacity: 0.8;
}

.footer-signature a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.footer-signature a:hover {
    color: white;
    text-decoration: underline;
}

.related-posts {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.related-posts h2 {
    margin-bottom: 1.5rem;
    color: var(--tenant-color);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.related-item {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8f9fa;
}

.related-item h3 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.related-item h3 a {
    color: var(--tenant-color);
    text-decoration: none;
}

.related-item h3 a:hover {
    text-decoration: underline;
}

.related-item time {
    font-size: 0.8rem;
    color: var(--text-light);
}

.site-footer {
    background: var(--tenant-color-dark);
    color: white;
    padding: 2rem 0 1rem 0;
    margin-top: 3rem;
}

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

.footer-section h3, .footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

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

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

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

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

.powered-by img {
    max-width: 75px;
    height: auto;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.powered-by:hover img {
    opacity: 1;
}

.powered-by a {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none;
}

.powered-by a:hover {
    color: white !important;
    text-decoration: underline;
}

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

.no-posts {
    text-align: center;
    padding: 3rem 0;
}

.error-404 {
    text-align: center;
    padding: 3rem 0;
}

.error-404 h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--tenant-color);
}

.error-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background: var(--tenant-color-dark);
}

.btn-secondary {
    background: transparent;
    color: var(--tenant-color);
    border: 2px solid var(--tenant-color);
}

.btn-secondary:hover {
    background: var(--tenant-color);
    color: white;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav {
        gap: 1rem;
    }
    
    .blog-header h1 {
        font-size: 2rem;
    }
    
    .post-title {
        font-size: 2rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .error-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .content-image {
        float: none !important;
        margin: 1.5rem auto;
        display: block;
        max-width: 100%;
    }
    
    .content-image.image-left,
    .content-image.image-right {
        margin-left: 0;
        margin-right: 0;
    }
}