/* blog.css - Complete Version */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap');

/* =============== Base Styles =============== */
.blog-hero {
    position: relative;
    height: 60vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
                url('../assets/blog-hero.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-bottom: 3rem;
    font-family: 'Lato', sans-serif;
}

.blog-hero .hero-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    position: relative;
    line-height: 1.2;
}

.blog-hero .hero-content h1:after {
    content: '';
    position: absolute;
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, #d4af37, transparent);
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
}

.blog-hero .tagline {
    font-size: 1.5rem;
    max-width: 800px;
    margin: 2rem auto 0;
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* =============== Blog Layout =============== */
.blog-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    font-family: 'Lato', sans-serif;
}

/* =============== Admin Panel =============== */
.blog-admin-panel {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    grid-column: 1 / -1;
    border-left: 4px solid #d4af37;
    display: none;
}

.blog-admin-panel h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
}

.admin-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #2c3e50;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.admin-btn:hover {
    background: #1a2635;
    transform: translateY(-2px);
}

/* =============== Blog Editor =============== */
.blog-editor {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 3rem;
    grid-column: 1 / -1;
    display: none;
}

.blog-editor h2 {
    font-family: 'Playfair Display', serif;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.editor-form {
    display: grid;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group textarea {
    min-height: 200px;
    resize: vertical;
    line-height: 1.6;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.editor-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid #ddd;
    background: white;
    font-size: 0.95rem;
}

.editor-btn.primary {
    background: #d4af37;
    color: white;
    border: none;
}

.editor-btn.primary:hover {
    background: #c19b2e;
}

/* =============== Blog Posts =============== */
.blog-posts {
    display: grid;
    grid-template-columns: minmax(auto, 800px);
    justify-content: center;
    gap: 2.5rem;
}

@media (min-width: 992px) {
    /* When sidebar is present */
    .blog-container:has(.blog-sidebar) .blog-posts {
        grid-template-columns: 1fr;
    }
    
    /* When multiple posts exist */
    .blog-posts:has(.blog-post:nth-child(2)) {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 600px), 1fr));
    }
}

.blog-post {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-height: 650px;
    max-width: 800px;
    margin: 0 auto;
}

.blog-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

.post-header {
    padding: 1.8rem 1.8rem 0;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
    color: #666;
    align-items: center;
}

.post-category {
    padding: 0.4rem 1.1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: inline-block;
}

.post-date {
    color: #777;
    font-size: 0.85rem;
}

.post-title {
    font-family: 'Playfair Display', serif;
    color: #2c3e50;
    margin: 1rem 0 1.5rem;
    font-size: 1.8rem;
    line-height: 1.3;
}

.post-image {
    height: 280px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-post:hover .post-image img {
    transform: scale(1.05);
}

.post-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem;
}

.post-content p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 1.8rem;
    font-size: 1.05rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #d4af37;
    font-weight: 600;
    text-decoration: none;
    padding: 0.8rem 1.8rem;
    border-radius: 30px;
    background: rgba(212, 175, 55, 0.1);
    transition: all 0.3s ease;
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

.read-more:hover {
    background: rgba(212, 175, 55, 0.2);
    color: #c19b2e;
    transform: translateX(5px);
}

/* =============== Category Styles =============== */
[data-category="estate-planning"] .post-category {
    background: #3a5a78;
    color: white;
}

[data-category="family-law"] .post-category {
    background: #d4af37;
    color: #2c3e50;
}

[data-category="criminal-law"] .post-category {
    background: #8b5a2b;
    color: white;
}

[data-category="legal-news"] .post-category {
    background: #2c3e50;
    color: white;
}

/* =============== Sidebar =============== */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    position: sticky;
    top: 2rem;
    align-self: start;
}

.sidebar-widget {
    background: white;
    padding: 1.8rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.sidebar-widget h3 {
    font-family: 'Playfair Display', serif;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #f0f0f0;
    font-size: 1.4rem;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.category-list a {
    color: #555;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.95rem;
    padding: 0.5rem 0;
}

.category-list a::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    flex-shrink: 0;
}

.category-list a.active {
    font-weight: 700;
    color: #d4af37;
    transform: translateX(5px);
}

.category-list a:hover {
    color: #d4af37;
    transform: translateX(5px);
}

.category-list a[data-category="estate-planning"]::before {
    background: #3a5a78;
}

.category-list a[data-category="family-law"]::before {
    background: #d4af37;
}

.category-list a[data-category="criminal-law"]::before {
    background: #8b5a2b;
}

.category-list a[data-category="legal-news"]::before {
    background: #2c3e50;
}

.category-list a[data-category="all"]::before {
    background: #555;
}

.subscribe-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.subscribe-form input {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
    font-size: 0.95rem;
}

.subscribe-form button {
    background: #d4af37;
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.subscribe-form button:hover {
    background: #c19b2e;
}

.recent-posts {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recent-posts li {
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.recent-posts a {
    color: #555;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    line-height: 1.5;
    display: block;
}

.recent-posts a:hover {
    color: #d4af37;
}

/* =============== Newsletter Section =============== */
.newsletter-section {
    background: #2c3e50;
    color: white;
    padding: 4rem 1rem;
    text-align: center;
}

.newsletter-container {
    max-width: 600px; /* Reduced from 1200px for better focus */
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    justify-content: center;
}

.newsletter-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.newsletter-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.newsletter-content p {
    opacity: 0.9;
    line-height: 1.6;
    font-size: 1.05rem;
    max-width: 500px;
}
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 400px;
}

.newsletter-form .form-group {
    width: 100%;
}

.newsletter-form input {
    width: 100%;
    padding: 0.9rem;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
}

.newsletter-form button {
    background: #d4af37;
    color: white;
    border: none;
    padding: 0.9rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.newsletter-form button:hover {
    background: #c19b2e;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .newsletter-section {
        padding: 3rem 1rem;
    }
    
    .newsletter-content h2 {
        font-size: 1.8rem;
    }
    
    .newsletter-form {
        max-width: 100%;
    }
}
.newsletter-text h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-align: center;
    align-items: center;
    justify-content: center;
}


.newsletter-text p {
    opacity: 0.9;
    line-height: 1.6;
    font-size: 1.05rem;
    max-width: 500px;
    align-items: center;
    justify-content: center;
}

.newsletter-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    align-items: end;
}

.newsletter-form input {
    padding: 0.9rem;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
}

.newsletter-form button {
    grid-column: span 2;
    background: #d4af37;
    color: white;
    border: none;
    padding: 0.9rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.newsletter-form button:hover {
    background: #c19b2e;
}

/* =============== Responsive Design =============== */
@media (max-width: 1200px) {
    .blog-container {
        padding: 0 3rem;
    }
}

@media (max-width: 992px) {
    .blog-container {
        grid-template-columns: 1fr;
        padding: 0 2rem;
        gap: 3rem;
    }
    
    .blog-sidebar {
        position: static;
        grid-row: 1;
    }
    
    .newsletter-container {
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        height: 50vh;
    }
    
    .blog-hero .hero-content h1 {
        font-size: 2.8rem;
    }
    
    .blog-hero .tagline {
        font-size: 1.3rem;
    }
    
    .post-title {
        font-size: 1.6rem;
    }
    
    .post-image {
        max-height: 400px;
    }

    @media (max-width: 768px) {
    .post-content {
        padding: 1.5rem;
    }
    
    .post-image {
        max-height: 300px;
    }
}
    
    .newsletter-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .newsletter-text p {
        margin: 0 auto;
    }
    
    .newsletter-form {
        grid-template-columns: 1fr;
    }
    
    .newsletter-form button {
        grid-column: span 1;
    }
}

@media (max-width: 576px) {
    .blog-hero .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .blog-hero .tagline {
        font-size: 1.1rem;
    }
    
    .blog-container {
        padding: 0 1.5rem;
    }
    
    .post-header,
    .post-content {
        padding: 1.5rem;
    }
    
    .post-title {
        font-size: 1.4rem;
    }
    
    .post-image {
        height: 180px;
    }
    
    .admin-actions {
        flex-direction: column;
    }
    
    .admin-btn,
    .editor-btn {
        width: 100%;
        justify-content: center;
    }
    
    .form-actions {
        flex-direction: column;
    }
}



/* Single Post Styles */
.blog-post-full {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.blog-post-full .post-title {
    font-size: 2rem;
    margin: 1.5rem 2rem;
}

.blog-post-full .post-content {
    padding: 0 2rem 2rem;
}

.blog-post-full h2 {
    color: #2c3e50;
    margin: 2rem 0 1rem;
    font-size: 1.5rem;
}

.blog-post-full ul, 
.blog-post-full ol {
    margin: 1rem 0 1.5rem;
    padding-left: 1.5rem;
    line-height: 1.7;
}

.blog-post-full li {
    margin-bottom: 0.5rem;
}

.law-changes {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.law-changes th, 
.law-changes td {
    padding: 0.8rem;
    border: 1px solid #ddd;
    text-align: left;
}

.law-changes th {
    background: #f8f9fa;
}

.post-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.back-to-blog, 
.consultation-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.back-to-blog {
    color: #2c3e50;
    border: 1px solid #ddd;
}

.back-to-blog:hover {
    background: #f8f9fa;
}

.consultation-btn {
    background: #d4af37;
    color: white;
}

.consultation-btn:hover {
    background: #c19b2e;
}

.author-bio {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.author-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}



/* blog.css additions */

/* Single Post Layout */
.blog-post-full {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    margin-bottom: 3rem;
}

.blog-post-full .post-header {
    padding: 2rem 2rem 1rem;
}

.blog-post-full .post-content {
    padding: 0 2rem 2rem;
    line-height: 1.7;
}

/* Special Content Blocks */
.benefit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.benefit-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 6px;
    border-left: 3px solid #d4af37;
}

.alert-box {
    background: #fff8e6;
    padding: 1rem;
    border-left: 4px solid #d4af37;
    margin: 1.5rem 0;
    display: flex;
    gap: 1rem;
}

.process-timeline {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
}

.timeline-step {
    text-align: center;
    flex: 1;
    position: relative;
}

.step-number {
    background: #2c3e50;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.penalty-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.penalty-table th, 
.penalty-table td {
    padding: 0.8rem;
    border: 1px solid #eee;
    text-align: left;
}

.penalty-table th {
    background: #2c3e50;
    color: white;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .process-timeline {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .benefit-grid {
        grid-template-columns: 1fr;
    }
}