/* ===== Blogi-spetsiifilised stiilid ===== */

/* Nav on alati nähtav (mitte läbipaistev) */
.blogi-nav {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    justify-content: center;
}

.blogi-nav .nav-links {
    justify-content: center;
}

.blogi-nav .nav-links a {
    color: #333;
}

/* Blogi header */
.blogi-header {
    padding-top: 120px;
    padding-bottom: 3rem;
    background-color: var(--bg-light);
    text-align: center;
}

.blogi-header .section-title {
    margin-bottom: 0.5rem;
}

/* Blogi arhiiv */
.blogi-archive {
    padding: 4rem 2rem 6rem 2rem;
    background-color: var(--bg-light);
    min-height: 70vh;
}

.blogi-archive .blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.blogi-archive .blog-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blogi-archive .blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.blog-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.blogi-archive .blog-image {
    height: 200px;
    overflow: hidden;
    background: #f0f0f0;
}

.blogi-archive .blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blogi-archive .blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blogi-archive .blog-image .no-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e0e0e0, #f5f5f5);
}

.blogi-archive .blog-content {
    padding: 1.5rem;
}

.blogi-archive .blog-date {
    color: var(--primary-teal);
    font-size: 0.85rem;
    font-weight: 500;
}

.blogi-archive .blog-content h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    font-weight: 500;
    margin: 0.5rem 0 1rem;
    color: #333;
    line-height: 1.3;
}

.blogi-archive .blog-content p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.blog-read-more {
    color: var(--primary-teal);
    font-weight: 500;
    font-size: 0.9rem;
}

.no-posts {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

/* ===== Üksiku postituse leht ===== */
.blogi-postitus {
    padding-top: 100px;
    padding-bottom: 4rem;
    background-color: var(--bg-cream);
    min-height: 70vh;
}

.blogi-postitus .container {
    max-width: 800px;
}

.back-link {
    display: inline-block;
    color: var(--primary-teal);
    font-weight: 500;
    margin-bottom: 2rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--primary-teal-hover);
}

.post-hero-image {
    margin-bottom: 2rem;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.post-hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.post-date {
    color: var(--primary-teal);
    font-size: 0.9rem;
    font-weight: 500;
}

.post-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    font-weight: 500;
    color: #333;
    margin-top: 0.5rem;
    line-height: 1.2;
}

.post-excerpt {
    font-size: 1.15rem;
    font-style: italic;
    color: #555;
    margin-top: 1rem;
    line-height: 1.6;
}

.post-external-link {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #e8f5f5, #f0fafa);
    border-left: 4px solid var(--primary-teal);
    border-radius: 0 10px 10px 0;
}

.post-external-link a {
    color: var(--primary-teal);
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-external-link a:hover {
    color: var(--primary-teal-hover);
}

.post-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #444;
}

.post-body p {
    margin-bottom: 1.5rem;
}

.post-body h2,
.post-body h3 {
    font-family: 'Cormorant Garamond', serif;
    color: #333;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-body h2 {
    font-size: 1.8rem;
}

.post-body h3 {
    font-size: 1.4rem;
}

.post-body ul,
.post-body ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

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

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1.5rem 0;
}

.post-body a {
    color: var(--primary-teal);
}

.post-body blockquote {
    border-left: 4px solid var(--primary-teal);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #555;
}

/* Postituse navigatsioon */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.post-navigation a {
    color: var(--primary-teal);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-navigation a:hover {
    color: var(--primary-teal-hover);
}

.nav-prev {
    text-align: left;
}

.nav-next {
    text-align: right;
}

/* Error/Loading */
.loading,
.error-message {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.blog-loading {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top-color: var(--primary-teal);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-message h2 {
    color: #333;
    margin-bottom: 1rem;
}

.error-message a {
    color: var(--primary-teal);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .blogi-header {
        padding-top: 100px;
        padding-bottom: 2rem;
    }
    
    .blogi-archive {
        padding: 2rem 1rem;
    }
    
    .blogi-archive .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .blogi-postitus {
        padding-top: 90px;
    }
    
    .blogi-postitus .container {
        padding: 0 1rem;
    }
    
    .post-title {
        font-size: 1.8rem;
    }
    
    .post-body {
        font-size: 1rem;
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .post-navigation a {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .blogi-header {
        padding-top: 90px;
    }
    
    .blogi-archive .blog-image {
        height: 180px;
    }
    
    .post-title {
        font-size: 1.5rem;
    }
}
