/**
 * SallahFest Blog Styles
 * Styles for blog list and single post pages
 */

/* ==========================================================================
   BLOG HERO SECTION
   ========================================================================== */

.sf-blog-hero {
    position: relative;
    height: 400px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sf-blog-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 71, 42, 0.85) 0%, rgba(30, 142, 62, 0.75) 100%);
}

.sf-blog-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 20px;
    max-width: 800px;
}

.sf-blog-hero-title {
    font-size: 52px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.sf-blog-hero-subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    line-height: 1.6;
}

/* ==========================================================================
   BLOG LIST PAGE
   ========================================================================== */

.sf-blog-main {
    padding: 60px 0;
    background: #f8f9fa;
    min-height: 100vh;
}

.sf-blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Blog Header */
.sf-blog-header {
    text-align: center;
    margin-bottom: 50px;
}

.sf-blog-title {
    font-size: 42px;
    font-weight: 700;
    color: #1a472a;
    margin: 0 0 15px;
}

.sf-blog-subtitle {
    font-size: 18px;
    color: #5f6368;
    margin: 0;
    max-width: 600px;
    margin: 0 auto;
}

/* Blog Grid */
.sf-blog-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Blog Card */
.sf-blog-card {
    display: flex;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sf-blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Card Image */
.sf-blog-card-image {
    position: relative;
    width: 380px;
    min-width: 380px;
    height: 280px;
    overflow: hidden;
    background: #e9ecef;
}

.sf-blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sf-blog-card:hover .sf-blog-card-image img {
    transform: scale(1.05);
}

.sf-blog-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    color: #adb5bd;
}

.sf-blog-card-placeholder svg {
    width: 64px;
    height: 64px;
}

/* Category Badge */
.sf-blog-card-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #1e8e3e;
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Date Badge */
.sf-blog-card-date {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

/* Card Content */
.sf-blog-card-content {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.sf-blog-card-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px;
    line-height: 1.3;
}

.sf-blog-card-title a {
    color: #202124;
    text-decoration: none;
    transition: color 0.2s ease;
}

.sf-blog-card-title a:hover {
    color: #1e8e3e;
}

.sf-blog-card-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #5f6368;
}

.sf-blog-card-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sf-blog-card-excerpt {
    color: #5f6368;
    font-size: 15px;
    line-height: 1.6;
    flex: 1;
}

.sf-blog-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Read More Button */
.sf-blog-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #1e8e3e;
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.2s ease;
}

.sf-blog-read-more:hover {
    gap: 12px;
}

/* Share Button */
.sf-blog-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f1f3f4;
    border: none;
    border-radius: 8px;
    color: #5f6368;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sf-blog-share-btn:hover {
    background: #e8eaed;
    color: #202124;
}

/* Pagination */
.sf-blog-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 50px;
}

.sf-blog-pagination a,
.sf-blog-pagination span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #fff;
    border-radius: 8px;
    color: #5f6368;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sf-blog-pagination a:hover {
    background: #1e8e3e;
    color: #fff;
}

.sf-blog-pagination .current {
    background: #1e8e3e;
    color: #fff;
}

/* Empty State */
.sf-blog-empty {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: 16px;
}

.sf-blog-empty svg {
    color: #dadce0;
    margin-bottom: 20px;
}

.sf-blog-empty h2 {
    font-size: 24px;
    color: #202124;
    margin: 0 0 10px;
}

.sf-blog-empty p {
    color: #5f6368;
    margin: 0;
}

/* ==========================================================================
   SHARE MODAL
   ========================================================================== */

.sf-share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sf-share-modal.active {
    opacity: 1;
    visibility: visible;
}

.sf-share-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.sf-share-modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    width: 90%;
    max-width: 480px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.sf-share-modal.active .sf-share-modal-content {
    transform: translateY(0);
}

.sf-share-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border: none;
    background: #f1f3f4;
    border-radius: 50%;
    font-size: 24px;
    color: #5f6368;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.sf-share-modal-close:hover {
    background: #e8eaed;
    color: #202124;
}

.sf-share-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #202124;
    margin: 0 0 25px;
    text-align: center;
}

.sf-share-modal-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

.sf-share-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.sf-share-facebook {
    background: #e7f3ff;
    color: #1877f2;
}

.sf-share-facebook:hover {
    background: #1877f2;
    color: #fff;
}

.sf-share-whatsapp {
    background: #e7f9e7;
    color: #25d366;
}

.sf-share-whatsapp:hover {
    background: #25d366;
    color: #fff;
}

.sf-share-twitter {
    background: #f0f0f0;
    color: #000;
}

.sf-share-twitter:hover {
    background: #000;
    color: #fff;
}

.sf-share-linkedin {
    background: #e7f3ff;
    color: #0a66c2;
}

.sf-share-linkedin:hover {
    background: #0a66c2;
    color: #fff;
}

.sf-share-modal-link label {
    display: block;
    font-size: 14px;
    color: #5f6368;
    margin-bottom: 10px;
}

.sf-share-link-input {
    display: flex;
    gap: 10px;
}

.sf-share-link-input input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    font-size: 14px;
    color: #202124;
    background: #f8f9fa;
}

.sf-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #1e8e3e;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sf-copy-btn:hover {
    background: #137333;
}

.sf-copy-btn.copied {
    background: #1e8e3e;
}

body.sf-modal-open {
    overflow: hidden;
}

/* ==========================================================================
   SINGLE POST PAGE
   ========================================================================== */

.sf-single-main {
    background: #fff;
}

.sf-single-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.sf-single-narrow {
    max-width: 800px;
}

/* Single Header */
.sf-single-header {
    padding: 60px 0 40px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.sf-single-categories {
    margin-bottom: 20px;
}

.sf-single-category {
    display: inline-block;
    background: #1e8e3e;
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    margin: 0 5px;
}

.sf-single-title {
    font-size: 42px;
    font-weight: 700;
    color: #202124;
    line-height: 1.2;
    margin: 0 0 25px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.sf-single-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    color: #5f6368;
    font-size: 14px;
    flex-wrap: wrap;
}

.sf-single-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sf-single-author img {
    border-radius: 50%;
}

/* Featured Image */
.sf-single-featured-image {
    margin: -20px 0 40px;
}

.sf-single-featured-image img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 16px;
}

/* Post Content */
.sf-single-content {
    padding: 40px 0;
}

.sf-single-content p {
    font-size: 18px;
    line-height: 1.8;
    color: #202124;
    margin-bottom: 25px;
}

.sf-single-content h2 {
    font-size: 28px;
    font-weight: 700;
    color: #202124;
    margin: 40px 0 20px;
}

.sf-single-content h3 {
    font-size: 22px;
    font-weight: 600;
    color: #202124;
    margin: 30px 0 15px;
}

.sf-single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 25px 0;
}

.sf-single-content blockquote {
    border-left: 4px solid #1e8e3e;
    padding-left: 25px;
    margin: 30px 0;
    font-style: italic;
    color: #5f6368;
}

.sf-single-content ul,
.sf-single-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.sf-single-content li {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 10px;
}

/* Tags */
.sf-single-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
}

.sf-tags-label {
    font-weight: 600;
    color: #202124;
}

.sf-single-tag {
    display: inline-block;
    padding: 6px 14px;
    background: #f1f3f4;
    border-radius: 20px;
    color: #5f6368;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sf-single-tag:hover {
    background: #1e8e3e;
    color: #fff;
}

/* Share Buttons (Single Post) */
.sf-single-share {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
}

.sf-share-label {
    font-weight: 600;
    color: #202124;
}

.sf-share-icons {
    display: flex;
    gap: 10px;
}

.sf-share-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sf-share-icon.sf-share-facebook {
    background: #e7f3ff;
    color: #1877f2;
}

.sf-share-icon.sf-share-facebook:hover {
    background: #1877f2;
    color: #fff;
}

.sf-share-icon.sf-share-whatsapp {
    background: #e7f9e7;
    color: #25d366;
}

.sf-share-icon.sf-share-whatsapp:hover {
    background: #25d366;
    color: #fff;
}

.sf-share-icon.sf-share-twitter {
    background: #f0f0f0;
    color: #000;
}

.sf-share-icon.sf-share-twitter:hover {
    background: #000;
    color: #fff;
}

.sf-share-icon.sf-share-linkedin {
    background: #e7f3ff;
    color: #0a66c2;
}

.sf-share-icon.sf-share-linkedin:hover {
    background: #0a66c2;
    color: #fff;
}

/* Author Box */
.sf-single-author-box {
    padding: 40px 0;
    background: #f8f9fa;
}

.sf-author-card {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 30px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.sf-author-card img {
    border-radius: 50%;
    width: 80px;
    height: 80px;
}

.sf-author-info {
    flex: 1;
}

.sf-author-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #5f6368;
}

.sf-author-name {
    font-size: 20px;
    font-weight: 700;
    color: #202124;
    margin: 5px 0 10px;
}

.sf-author-bio {
    font-size: 14px;
    color: #5f6368;
    line-height: 1.6;
    margin: 0;
}

/* Related Posts */
.sf-related-posts {
    padding: 60px 0;
    background: #fff;
    border-top: 1px solid #e9ecef;
}

.sf-related-title {
    font-size: 28px;
    font-weight: 700;
    color: #202124;
    margin: 0 0 30px;
    text-align: center;
}

.sf-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.sf-related-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sf-related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.sf-related-image {
    display: block;
    height: 180px;
    overflow: hidden;
}

.sf-related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sf-related-card:hover .sf-related-image img {
    transform: scale(1.05);
}

.sf-related-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    color: #adb5bd;
}

.sf-related-placeholder svg {
    width: 48px;
    height: 48px;
}

.sf-related-content {
    padding: 20px;
}

.sf-related-date {
    font-size: 12px;
    color: #5f6368;
}

.sf-related-card-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin: 8px 0 0;
}

.sf-related-card-title a {
    color: #202124;
    text-decoration: none;
    transition: color 0.2s ease;
}

.sf-related-card-title a:hover {
    color: #1e8e3e;
}

/* ==========================================================================
   RESPONSIVE STYLES
   ========================================================================== */

@media (max-width: 992px) {
    .sf-blog-card {
        flex-direction: column;
    }
    
    .sf-blog-card-image {
        width: 100%;
        min-width: 100%;
        height: 240px;
    }
    
    .sf-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sf-blog-hero {
        height: 300px;
    }
    
    .sf-blog-hero-title {
        font-size: 32px;
    }
    
    .sf-blog-hero-subtitle {
        font-size: 16px;
    }
    
    .sf-blog-title {
        font-size: 32px;
    }
    
    .sf-blog-card-title {
        font-size: 20px;
    }
    
    .sf-blog-card-content {
        padding: 20px;
    }
    
    .sf-share-modal-buttons {
        grid-template-columns: 1fr;
    }
    
    .sf-single-title {
        font-size: 28px;
    }
    
    .sf-single-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .sf-author-card {
        flex-direction: column;
        text-align: center;
    }
    
    .sf-related-grid {
        grid-template-columns: 1fr;
    }
    
    .sf-single-share {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .sf-blog-card-actions {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .sf-blog-share-btn {
        width: 100%;
        justify-content: center;
    }
}
