/* ===== BLOG MODERN CSS - RODA ===== */

/* Import elegant fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

/* Neutral Theme Colors */
:root {
    --primary: #3b82f6;
    --primary-light: #60a5fa;
    --primary-dark: #1d4ed8;
    --accent: #8b5cf6;
    --accent-light: #a78bfa;
    --text: #1f2937;
    --text-light: #6b7280;
    --bg: #f8fafc;
    --border: #e5e7eb;
}

/* Blog Layout Grid */
.blog-layout {
    display: grid !important;
    grid-template-columns: 2fr 1fr !important;
    gap: 40px !important;
    margin-top: 40px !important;
}

.blog-main {
    min-height: 400px;
}

.blog-sidebar {
    min-height: 400px;
}

/* Blog Post Styles */
.blog-post {
    background: white !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.1) !important;
    transition: all 0.3s ease !important;
    border: 1px solid var(--border) !important;
}

.blog-post:hover {
    box-shadow: 0 20px 50px rgba(59, 130, 246, 0.15);
    transform: translateY(-5px);
}

/* Blog Header */
.blog-header.darker {
    background: linear-gradient(135deg, var(--primary-blue), #0a0a2e) !important;
    color: white !important;
    position: relative !important;
    overflow: hidden !important;
    padding: 40px 40px 30px 40px !important;
}

.blog-header.darker::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    z-index: 1;
}

.blog-header.darker .blog-title {
    margin: 0 0 20px 0 !important;
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    font-family: 'Poppins', sans-serif !important;
    position: relative !important;
    z-index: 2 !important;
    color: white !important;
}

.blog-header.darker .blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    position: relative;
    z-index: 2;
}

.blog-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    color: white !important;
}

.blog-meta-item i {
    font-size: 1.1rem;
    color: white !important;
}

.blog-meta-item span {
    color: white !important;
}

/* Blog Content */
.blog-content {
    padding: 40px;
}

.blog-image {
    margin-bottom: 30px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.1);
    border: 1px solid var(--border);
}

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

.blog-image:hover img {
    transform: scale(1.02);
}

.blog-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text);
}

.blog-text h1,
.blog-text h2,
.blog-text h3,
.blog-text h4,
.blog-text h5,
.blog-text h6 {
    color: var(--primary);
    margin: 30px 0 15px 0;
    font-family: 'Poppins', sans-serif;
    position: relative;
}

.blog-text h2::after,
.blog-text h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.blog-text p {
    margin-bottom: 20px;
}

.blog-text ul,
.blog-text ol {
    margin: 20px 0;
    padding-left: 30px;
}

.blog-text li {
    margin-bottom: 8px;
}

.blog-text blockquote {
    border-left: 4px solid var(--primary);
    padding: 20px 30px;
    margin: 30px 0;
    background: var(--bg);
    border-radius: 0 10px 10px 0;
    font-style: italic;
    position: relative;
}

.blog-text blockquote::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 4rem;
    color: var(--primary);
    opacity: 0.3;
    font-family: serif;
}

/* Author Section */
.blog-authors {
    margin-top: 40px;
    padding: 40px;
    background: var(--bg);
    border-top: 1px solid var(--border);
}

.author-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.08);
    margin-bottom: 20px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.author-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.12);
}

.author-card:last-child {
    margin-bottom: 0;
}

.author-header {
    margin-bottom: 20px;
}

.author-header h4 {
    margin: 0;
    color: var(--primary);
    font-size: 1.2rem;
    font-family: 'Poppins', sans-serif;
}

.author-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.author-image {
    flex-shrink: 0;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border);
    transition: all 0.3s ease;
}

.author-avatar:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.author-bio {
    flex: 1;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
}

/* Sidebar Styles */
.sidebar-widget {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.1);
    margin-bottom: 30px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.sidebar-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.12);
}

.sidebar-widget h4 {
    margin: 0 0 25px 0;
    color: var(--text);
    font-size: 1.3rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
    position: relative;
}

.sidebar-widget h4::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary);
}

.related-posts {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.related-post {
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
    transition: all 0.3s ease;
}

.related-post:hover {
    background: var(--bg);
    margin: -10px;
    padding: 15px 10px 25px 10px;
    border-radius: 10px;
}

.related-post:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.related-post-content {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.related-post-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
}

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

.related-post-image:hover img {
    transform: scale(1.05);
}

.related-post-text {
    flex: 1;
}

.related-post-title {
    margin: 0 0 8px 0;
    font-size: 1rem;
    line-height: 1.4;
}

.related-post-title a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.related-post-meta {
    font-size: 0.85rem;
    color: var(--text-light);
}

.related-post-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.no-related-posts {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .blog-layout {
        display: block !important;
        grid-template-columns: none !important;
        gap: 0 !important;
    }
    
    .blog-main {
        min-height: auto;
        margin-bottom: 30px;
    }
    
    .blog-sidebar {
        min-height: auto;
        width: 100%;
    }
    
    .blog-title {
        font-size: 2rem;
    }
    
    .blog-header {
        padding: 30px 30px 20px 30px;
    }
    
    .blog-content {
        padding: 30px;
    }
    
    .blog-authors {
        padding: 30px;
    }
    
    .author-content {
        flex-direction: column;
        text-align: center;
    }
    
    .author-avatar {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 767.98px) {
    .blog-title {
        font-size: 1.8rem;
    }
    
    .blog-header {
        padding: 25px 25px 15px 25px;
    }
    
    .blog-content {
        padding: 25px;
    }
    
    .blog-authors {
        padding: 25px;
    }
    
    .sidebar-widget {
        padding: 25px;
    }
    
    .blog-image img {
        height: 250px;
    }
    
    .related-post-content {
        flex-direction: column;
        text-align: center;
    }
    
    .related-post-image {
        width: 100%;
        height: 150px;
    }
}

@media (max-width: 480px) {
    .blog-layout {
        display: block !important;
        grid-template-columns: none !important;
        gap: 0 !important;
        margin-top: 20px !important;
    }
    
    .blog-main {
        margin-bottom: 20px;
    }
    
    .blog-title {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .blog-header.darker {
        padding: 20px 20px 15px 20px !important;
    }
    
    .blog-content {
        padding: 20px;
    }
    
    .blog-authors {
        padding: 20px;
    }
    
    .sidebar-widget {
        padding: 20px;
    }
    
    .blog-image img {
        height: 200px;
    }
    
    .author-avatar {
        width: 80px;
        height: 80px;
    }
    
    .related-post-image {
        height: 120px;
    }
    
    .blog-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .blog-meta-item {
        font-size: 0.9rem;
        padding: 6px 12px;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .blog-title {
        font-size: 1.3rem;
    }
    
    .blog-header.darker {
        padding: 15px 15px 10px 15px !important;
    }
    
    .blog-content {
        padding: 15px;
    }
    
    .blog-authors {
        padding: 15px;
    }
    
    .sidebar-widget {
        padding: 15px;
    }
    
    .blog-image img {
        height: 180px;
    }
    
    .author-avatar {
        width: 70px;
        height: 70px;
    }
    
    .related-post-image {
        height: 100px;
    }
}

/* Animation for blog elements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-post {
    animation: fadeInUp 0.6s ease forwards;
}

.related-post {
    animation: fadeInUp 0.6s ease forwards;
}

.related-post:nth-child(1) { animation-delay: 0.1s; }
.related-post:nth-child(2) { animation-delay: 0.2s; }
.related-post:nth-child(3) { animation-delay: 0.3s; }
.related-post:nth-child(4) { animation-delay: 0.4s; }
.related-post:nth-child(5) { animation-delay: 0.5s; }

/* RODA specific enhancements */

.blog-meta-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.blog-text blockquote {
    background: linear-gradient(135deg, var(--bg) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-left-color: var(--primary);
}

.author-card {
    background: linear-gradient(135deg, white 0%, rgba(59, 130, 246, 0.02) 100%);
}

.sidebar-widget {
    background: linear-gradient(135deg, white 0%, rgba(59, 130, 246, 0.02) 100%);
}