/* CSS Variables */
:root {
    --primary-color: #E31E24;
    --primary-gradient: linear-gradient(135deg, #E31E24 0%, #ff4757 100%);
    --secondary-color: #2c3e50;
    --text-color: #34495e;
    --text-light: #7f8c8d;
    --bg-color: #f8f9fa;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --border-radius: 20px;
    --border-radius-sm: 12px;
    --box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --box-shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --box-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --box-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Header Styles */
.modern-header {
    background: linear-gradient(135deg, rgba(0,0,0,0.9) 0%, rgba(44,62,80,0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

.logo-section img {
    height: 45px;
    width: auto;
    transition: var(--transition);
}

.logo-section img:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
}

.nav-menu a:hover {
    color: var(--primary-color);
    background: rgba(255,255,255,0.1);
}

/* Blog Container */
.blog-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    align-items: start;
}

/* Main Content */
.main-content {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
    overflow: hidden;
    transition: var(--transition);
}

.main-content:hover {
    box-shadow: var(--box-shadow);
}

/* Hero Section */
.blog-hero {
    position: relative;
    height: 500px;
    overflow: hidden;
    padding: 15px;
    /* border-radius: var(--border-radius) var(--border-radius) 0 0; */
}

.blog-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    transition: var(--transition);
}

.blog-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 50%, transparent 100%); */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 3rem;
}

.blog-category-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.5rem;
    background: var(--primary-gradient);
    color: var(--white);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    /* margin-bottom: 1.5rem; */
    width: fit-content;
    transition: var(--transition);
    box-shadow: var(--box-shadow-md);
}

.blog-category-badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-lg);
    color: var(--white);
}

.blog-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--white);
    /* margin-bottom: 1.5rem; */
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 2rem;
    color: rgba(255,255,255,0.9);
    font-size: 0.95rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-item i {
    color: var(--primary-color);
    font-size: 1rem;
}

/* Content Section */
.blog-content-section {
    padding: 4rem 3rem;
    background: var(--white);
    position: relative;
}

.blog-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-color);
    max-width: 100%;
    margin: 0 auto;
    padding: 2rem;
    background: #fafbfc;
    border-radius: var(--border-radius);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
}

.blog-content p {
    /* margin-bottom: 1.8rem; */
    text-align: justify;
    text-indent: 1.5rem;
    position: relative;
    padding: 0.5rem 0;
}

.blog-content p:first-of-type {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--secondary-color);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
    border-radius: var(--border-radius-sm);
    /* margin-bottom: 2.5rem; */
    text-indent: 0;
    position: relative;
}

.blog-content p:first-of-type::before {
    content: '"';
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
    position: absolute;
    top: 0.5rem;
    left: 1rem;
    opacity: 0.3;
}

.blog-content img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: 3rem 0;
    padding: 1rem;
    background: var(--white);
    box-shadow: var(--box-shadow-lg);
    transition: var(--transition);
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

/* Image Container with Styling */
.blog-content img {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 50%, #f8f9fa 100%);
    padding: 1.5rem;
    border: 2px solid #e9ecef;
    position: relative;
}

.blog-content img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg,
        transparent 0%,
        rgba(227, 30, 36, 0.1) 25%,
        transparent 50%,
        rgba(227, 30, 36, 0.1) 75%,
        transparent 100%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.blog-content img:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.25);
    border-color: var(--primary-color);
}

.blog-content img:hover::before {
    opacity: 1;
}

/* Enhanced Image Wrapper */
.image-wrapper {
    position: relative;
    margin: 3rem 0;
    padding: 1.5rem;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-md);
    border: 1px solid #e9ecef;
    transition: var(--transition);
    overflow: hidden;
}

.image-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.image-wrapper:hover::before {
    transform: scaleX(1);
}

.image-wrapper img {
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    background: none;
    border-radius: var(--border-radius-sm);
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.image-wrapper:hover img {
    transform: scale(1.03);
}

.image-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
}

/* Image Caption */
.image-caption {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-radius: var(--border-radius-sm);
    border-left: 3px solid var(--primary-color);
}

/* Image Gallery Style */
.blog-content figure {
    margin: 3rem 0;
    padding: 1.5rem;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-md);
    border: 1px solid #e9ecef;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.blog-content figure::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.blog-content figure:hover::before {
    transform: scaleX(1);
}

.blog-content figure img {
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    background: none;
    border-radius: var(--border-radius-sm);
}

.blog-content figcaption {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-radius: var(--border-radius-sm);
    border-left: 3px solid var(--primary-color);
}

.blog-content figure:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
}

.blog-content figure:hover img {
    transform: scale(1.03);
}

/* Zoom Effect for Large Images */
.blog-content img[src*="large"],
.blog-content img[src*="big"] {
    cursor: zoom-in;
}

/* Image Border Variants */
.blog-content .image-rounded img {
    border-radius: 20px;
}

.blog-content .image-circular img {
    border-radius: 50%;
    aspect-ratio: 1;
    object-fit: cover;
}

.blog-content .image-bordered img {
    border: 3px solid var(--primary-color);
}

/* Image Loading Animation */
.blog-content img[data-src] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-content img[data-src].loaded {
    opacity: 1;
}

/* Image Skeleton Loading */
.image-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--border-radius-sm);
    height: 200px;
    width: 100%;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Image Overlay Effects */
.blog-content img.spotlight {
    position: relative;
    overflow: hidden;
}

.blog-content img.spotlight::after {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    transition: transform 0.6s ease;
    transform: translateX(-100%) translateY(-100%);
}

.blog-content img.spotlight:hover::after {
    transform: translateX(100%) translateY(100%);
}

/* Image Gallery Grid */
.blog-content .image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.blog-content .image-gallery .image-wrapper {
    margin: 0;
}

/* Image Floating Effect */
.blog-content .image-float {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Image Polaroid Style */
.blog-content .image-polaroid {
    background: white;
    padding: 1rem 1rem 3rem 1rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1), 0 6px 20px rgba(0,0,0,0.1);
    transform: rotate(-2deg);
    transition: var(--transition);
    max-width: 300px;
    margin: 2rem auto;
}

.blog-content .image-polaroid:hover {
    transform: rotate(0deg) scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2), 0 12px 40px rgba(0,0,0,0.2);
}

.blog-content .image-polaroid img {
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    background: none;
}

/* Enhanced Image Hover States */
.blog-content .image-wrapper.glow:hover {
    box-shadow: 0 0 20px var(--primary-color);
}

.blog-content .image-wrapper.pulse:hover img {
    animation: pulse 1s ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Image Modal Enhancement */
.image-modal {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.image-modal img {
    animation: modalZoom 0.3s ease-out;
}

@keyframes modalZoom {
    from {
        opacity: 0;
        transform: scale(0.3);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* RTL Support for Images */
[dir="rtl"] .image-caption,
[dir="rtl"] .blog-content figcaption {
    border-left: none;
    border-right: 3px solid var(--primary-color);
}

[dir="rtl"] .image-wrapper::before,
[dir="rtl"] .blog-content figure::before {
    transform-origin: right;
}

.blog-content h1,
.blog-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 3rem 0 1.5rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff4757 100%);
    color: white;
    border-radius: var(--border-radius-sm);
    position: relative;
    box-shadow: var(--box-shadow-md);
}

.blog-content h1::after,
.blog-content h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 15px 0 15px;
    border-color: var(--primary-color) transparent transparent transparent;
}

.blog-content h3 {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin: 2.5rem 0 1rem;
    padding: 1rem 0 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    position: relative;
}

.blog-content h3::before {
    content: '▶';
    color: var(--primary-color);
    margin-right: 0.5rem;
    font-size: 0.8em;
}

.blog-content h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin: 2rem 0 1rem;
    padding-left: 1rem;
    border-left: 3px solid var(--primary-color);
    background: #f8f9fa;
    padding: 0.8rem 1rem;
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}

.blog-content ul,
.blog-content ol {
    margin: 2rem 0;
    padding-left: 2rem;
    background: #f8f9fa;
    padding: 1.5rem 2rem;
    border-radius: var(--border-radius-sm);
    border-left: 4px solid var(--primary-color);
}

.blog-content li {
    /* margin-bottom: 0.8rem;   */
    line-height: 1.7;
    position: relative;
}

.blog-content ul li::marker {
    color: var(--primary-color);
    font-weight: bold;
}

.blog-content ol li::marker {
    color: var(--primary-color);
    font-weight: bold;
}

.blog-content blockquote {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 5px solid var(--primary-color);
    margin: 2.5rem 0;
    padding: 2rem;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--secondary-color);
    position: relative;
    box-shadow: var(--box-shadow-sm);
}

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

.blog-content blockquote p {
    margin-bottom: 0;
    text-indent: 0;
}

.blog-content strong {
    color: var(--secondary-color);
    font-weight: 700;
    background: linear-gradient(135deg, rgba(227, 30, 36, 0.1) 0%, rgba(255, 71, 87, 0.1) 100%);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.blog-content em {
    color: var(--primary-color);
    font-style: italic;
    background: rgba(227, 30, 36, 0.05);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
}

.blog-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.blog-content a:hover {
    background: rgba(227, 30, 36, 0.1);
    border-bottom-color: var(--primary-color);
    transform: translateY(-1px);
}

.blog-content table {
    width: 100%;
    margin: 2.5rem 0;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    box-shadow: var(--box-shadow-md);
}

.blog-content th,
.blog-content td {
    padding: 1rem;
    text-align: right;
    border-bottom: 1px solid #e9ecef;
}

.blog-content th {
    background: var(--primary-gradient);
    color: white;
    font-weight: 600;
}

.blog-content tr:hover {
    background: #f8f9fa;
}

.blog-content code {
    background: #f1f3f4;
    color: #d73a49;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    font-weight: 500;
}

.blog-content pre {
    background: #f6f8fa;
    border: 1px solid #e1e4e8;
    border-radius: var(--border-radius-sm);
    padding: 1.5rem;
    margin: 2rem 0;
    overflow-x: auto;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.blog-content pre code {
    background: none;
    color: #24292e;
    padding: 0;
    border-radius: 0;
}

/* Author Section */
.author-section {
    background: var(--gray-50);
    padding: 2rem 3rem;
    border-top: 1px solid var(--gray-200);
}

.author-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--white);
    box-shadow: var(--box-shadow-md);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.author-info p {
    color: var(--text-light);
    margin: 0;
    line-height: 1.6;
}

/* Share Section */
.share-section {
    background: var(--white);
    padding: 2rem 3rem;
    border-top: 1px solid var(--gray-200);
}

.share-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.share-buttons {
    display: flex;
    gap: 1rem;
}

.share-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--box-shadow-sm);
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-md);
    color: var(--white);
}

.share-facebook { background: #1877f2; }
.share-twitter { background: #1da1f2; }
.share-linkedin { background: #0077b5; }
.share-whatsapp { background: #25d366; }

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: sticky;
    top: 100px;
}

/* Related Posts Widget */
.related-posts-widget {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow-lg);
    border-top: 4px solid var(--primary-color);
}

.widget-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--secondary-color);
    /* margin-bottom: 1.5rem; */
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.widget-title i {
    color: var(--primary-color);
}

.related-post-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-200);
    transition: var(--transition);
}

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

.related-post-item:hover {
    background: var(--gray-50);
    margin: 0 -1rem;
    padding: 1rem;
    border-radius: var(--border-radius-sm);
}

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

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.related-post-content {
    flex: 1;
    min-width: 0;
}

.related-post-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.related-post-title a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.related-post-meta {
    font-size: 0.8rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}



/* Responsive Design */
@media (max-width: 1200px) {
    .blog-container {
        grid-template-columns: 1fr 300px;
        gap: 2rem;
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 992px) {
    .blog-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .sidebar {
        position: static;
    }

    .blog-title {
        font-size: 2rem;
    }

    .header-content {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        height: 350px;
    }

    .blog-hero-overlay {
        padding: 2rem;
    }

    .blog-title {
        font-size: 1.8rem;
    }

    .blog-content-section {
        padding: 2rem 1.5rem;
    }

    .blog-content {
        padding: 1.5rem;
        font-size: 1.1rem;
    }

    .blog-content h1,
    .blog-content h2 {
        font-size: 1.6rem;
        padding: 0.8rem 1rem;
        margin: 2rem 0 1rem;
    }

    .blog-content h3 {
        font-size: 1.4rem;
        margin: 2rem 0 0.8rem;
    }

    .blog-content h4 {
        font-size: 1.2rem;
        padding: 0.6rem 0.8rem;
    }

    .blog-content p:first-of-type {
        font-size: 1.1rem;
        padding: 1rem;
    }

    .blog-content p:first-of-type::before {
        font-size: 2.5rem;
        top: 0.3rem;
        left: 0.8rem;
    }

    .blog-content ul,
    .blog-content ol {
        padding: 1rem 1.5rem;
    }

    .blog-content blockquote {
        padding: 1.5rem;
        margin: 2rem 0;
    }

    .blog-content blockquote::before {
        font-size: 3rem;
        top: -5px;
        left: 15px;
    }

    .blog-content img {
        padding: 1rem;
        margin: 2rem 0;
    }

    .image-wrapper,
    .blog-content figure {
        padding: 1rem;
        margin: 2rem 0;
    }

    .image-caption,
    .blog-content figcaption {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    .author-section,
    .share-section {
        padding: 1.5rem 2rem;
    }

    .blog-meta {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .author-card {
        flex-direction: column;
        text-align: center;
    }

    .share-buttons {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .blog-container {
        padding: 1rem;
    }

    .blog-hero-overlay {
        padding: 1.5rem;
    }

    .blog-title {
        font-size: 1.5rem;
    }

    .blog-content-section {
        padding: 1.5rem 1rem;
    }

    .blog-content {
        padding: 1rem;
        font-size: 1rem;
    }

    .blog-content h1,
    .blog-content h2 {
        font-size: 1.4rem;
        padding: 0.6rem 0.8rem;
        margin: 1.5rem 0 0.8rem;
    }

    .blog-content h3 {
        font-size: 1.2rem;
    }

    .blog-content h4 {
        font-size: 1.1rem;
        padding: 0.5rem 0.6rem;
    }

    .blog-content p {
        text-indent: 1rem;
        /* margin-bottom: 1.5rem; */
    }

    .blog-content p:first-of-type {
        font-size: 1rem;
        padding: 0.8rem;
    }

    .blog-content p:first-of-type::before {
        font-size: 2rem;
        top: 0.2rem;
        left: 0.5rem;
    }

    .blog-content ul,
    .blog-content ol {
        padding: 0.8rem 1rem;
        margin: 1.5rem 0;
    }

    .blog-content blockquote {
        padding: 1rem;
        margin: 1.5rem 0;
        font-size: 1rem;
    }

    .blog-content blockquote::before {
        font-size: 2.5rem;
        top: 0;
        left: 10px;
    }

    .blog-content table {
        font-size: 0.9rem;
    }

    .blog-content th,
    .blog-content td {
        padding: 0.6rem;
    }

    .blog-content img {
        padding: 0.8rem;
        margin: 1.5rem 0;
        transform: none !important;
    }

    .blog-content img:hover {
        transform: translateY(-3px) scale(1.01) !important;
    }

    .image-wrapper,
    .blog-content figure {
        padding: 0.8rem;
        margin: 1.5rem 0;
    }

    .image-caption,
    .blog-content figcaption {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }

    .related-posts-widget {
        padding: 1.5rem;
    }

    .nav-menu {
        display: none;
    }
}

/* RTL Support */
[dir="rtl"] .blog-meta,
[dir="rtl"] .meta-item,
[dir="rtl"] .share-buttons,
[dir="rtl"] .author-card {
    flex-direction: row-reverse;
}

[dir="rtl"] .related-post-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .mean-container a.meanmenu-reveal {
    left: 0 !important;
    right: auto !important;
}


[dir="rtl"] .blog-content p {
    text-indent: 0;
    /* margin-bottom: 1.8rem; */
}

[dir="rtl"] .blog-content p:first-of-type::before {
    left: auto;
    right: 1rem;
}

[dir="rtl"] .blog-content h3::before {
    content: '◀';
    margin-right: 0;
    margin-left: 0.5rem;
}

[dir="rtl"] .blog-content blockquote {
    border-left: none;
    border-right: 5px solid var(--primary-color);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

[dir="rtl"] .blog-content blockquote::before {
    left: auto;
    right: 20px;
}

[dir="rtl"] .blog-content h4 {
    border-left: none;
    border-right: 3px solid var(--primary-color);
    border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
    padding-left: 0;
    padding-right: 1rem;
}

[dir="rtl"] .blog-content ul,
[dir="rtl"] .blog-content ol {
    border-left: none;
    border-right: 4px solid var(--primary-color);
}

[dir="rtl"] .blog-content p:first-of-type {
    border-left: none;
    border-right: 4px solid var(--primary-color);
}

/* Arabic Typography */
[dir="rtl"] .blog-title,
[dir="rtl"] .blog-content h1,
[dir="rtl"] .blog-content h2,
[dir="rtl"] .blog-content h3,
[dir="rtl"] .blog-content h4 {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif;
    font-weight: 700;
}

[dir="rtl"] .blog-content {
    line-height: 2;
}

[dir="rtl"] .blog-content li {
    line-height: 1.9;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Animations */
.content-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.content-reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--primary-gradient);
    z-index: 9999;
    transition: width 0.1s ease;
    box-shadow: 0 2px 4px rgba(227, 30, 36, 0.3);
}

/* Floating Action Buttons */
.floating-actions {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 998;
}

.floating-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: var(--box-shadow-md);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1.2rem;
}

.floating-btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--box-shadow-lg);
    color: white;
}

.scroll-to-top {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

[dir="rtl"] .floating-actions {
    right: auto;
    left: 2rem;
}

/* Content Highlights */
.blog-content p:hover {
    background: rgba(227, 30, 36, 0.02);
    border-radius: 8px;
    transition: var(--transition);
}

.blog-content h1:hover,
.blog-content h2:hover {
    transform: translateX(5px);
    transition: var(--transition);
}

[dir="rtl"] .blog-content h1:hover,
[dir="rtl"] .blog-content h2:hover {
    transform: translateX(-5px);
}

/* Table Responsive */
.table-wrapper {
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--box-shadow-md);
}

/* Print Styles */
@media print {
    .header,
    .sidebar,
    .floating-actions,
    .share-section {
        display: none !important;
    }

    .blog-container {
        display: block !important;
        padding: 0 !important;
    }

    .main-content {
        box-shadow: none !important;
        border-radius: 0 !important;
    }

    .blog-content {
        background: white !important;
        box-shadow: none !important;
        border: none !important;
    }
}
