/**
 * Widget Blog Modern Fix V6 - Küçük kartlara PHP excerpt desteği
 * Hem büyük hem küçük kartlar yatay düzende
 */

/* Blog Modern Widget Container */
.widget-blog-modern {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-top: 1.5rem !important;
}

.widget-blog-modern .widget-blog-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #1a202c !important;
    margin-bottom: 20px !important;
    padding-bottom: 10px !important;
    border-bottom: 2px solid #006233 !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-blog-modern .widget-blog-title i {
    color: #006233;
    font-size: 16px;
}

/* Featured Blog Card - YATAY DÜZEN */
.blog-card-featured {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex !important;
    align-items: stretch;
    min-height: 180px;
}

.blog-card-featured:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.blog-card-featured .blog-card-image-wrapper {
    position: relative;
    overflow: hidden;
    width: 40% !important;
    min-width: 200px;
    flex-shrink: 0;
}

.blog-card-featured .blog-card-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.blog-card-featured .blog-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left !important;
}

.blog-card-featured .blog-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.blog-card-featured .blog-card-title a {
    color: #2d3748;
    text-decoration: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.blog-card-featured .blog-card-title a:hover {
    color: #006233;
}

.blog-card-featured .blog-card-meta {
    font-size: 12px;
    color: #a0aec0;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-card-featured .blog-card-excerpt {
    font-size: 13px;
    color: #718096;
    line-height: 1.5;
    margin-top: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Category Badge */
.blog-card-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #006233;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

/* Overlay */
.blog-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 98, 51, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-card-image-wrapper:hover .blog-card-overlay {
    opacity: 1;
}

.read-more-icon {
    background: #fff;
    color: #006233;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* Small Blog Cards - YATAY DÜZEN, EXCERPT İLE */
.blog-card-small {
    background: #fff;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    flex-direction: row !important; /* Zorla yatay */
}

.blog-card-small:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateX(3px);
}

/* Small Card Image - Solda */
.blog-card-small .blog-card-small-image {
    flex-shrink: 0;
    width: 80px !important;
    height: 80px !important;
}

.blog-card-small .blog-card-small-image img {
    width: 80px !important;
    height: 80px !important;
    object-fit: cover !important;
    border-radius: 6px !important;
    display: block !important;
}

/* Small Card Content - Sağda */
.blog-card-small .blog-card-small-content {
    flex: 1;
    min-width: 0;
    text-align: left !important;
    display: flex;
    flex-direction: column;
}

/* Small Card Title */
.blog-card-small .blog-card-small-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin: 0 0 4px 0 !important;
    text-align: left !important;
    order: 1;
}

.blog-card-small .blog-card-small-title a {
    color: #2d3748;
    text-decoration: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.blog-card-small .blog-card-small-title a:hover {
    color: #006233;
}

/* Small Card Excerpt - PHP'den gelen */
.blog-card-small .blog-card-small-excerpt,
.blog-card-small p.blog-card-small-excerpt {
    font-size: 12px !important;
    color: #718096 !important;
    line-height: 1.4 !important;
    margin: 4px 0 6px 0 !important;
    padding: 0 !important;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    order: 2;
}

/* Small Card Date */
.blog-card-small .blog-card-small-date {
    font-size: 11px !important;
    color: #a0aec0 !important;
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0 !important;
    order: 3;
}

.blog-card-small .blog-card-small-date i {
    font-size: 10px;
}

/* View All Button */
.blog-view-all {
    margin-top: 20px;
    text-align: center;
}

.btn-view-all-posts {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #006233;
    color: #fff !important;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-view-all-posts:hover {
    background: #004d26;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 98, 51, 0.3);
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
    .widget-blog-modern {
        padding: 20px 15px;
    }
    
    /* Featured card mobilde yatay kalır */
    .blog-card-featured {
        flex-direction: row !important;
        min-height: 140px;
    }
    
    .blog-card-featured .blog-card-image-wrapper {
        width: 35% !important;
        min-width: 120px;
    }
    
    .blog-card-featured .blog-card-content {
        padding: 15px;
    }
    
    .blog-card-featured .blog-card-title {
        font-size: 16px;
    }
    
    .blog-card-featured .blog-card-excerpt {
        font-size: 12px;
    }
    
    /* Small cards mobilde - YATAY KALIR */
    .blog-card-small {
        padding: 10px;
        gap: 10px !important;
        flex-direction: row !important; /* Mobilde de yatay */
    }
    
    .blog-card-small .blog-card-small-image {
        width: 70px !important;
        height: 70px !important;
    }
    
    .blog-card-small .blog-card-small-image img {
        width: 70px !important;
        height: 70px !important;
    }
    
    .blog-card-small .blog-card-small-title {
        font-size: 13px !important;
    }
    
    .blog-card-small .blog-card-small-excerpt,
    .blog-card-small p.blog-card-small-excerpt {
        font-size: 11px !important;
        -webkit-line-clamp: 1; /* Mobilde 1 satır */
    }
    
    .blog-card-small .blog-card-small-date {
        font-size: 10px !important;
    }
}

/* Çok küçük ekranlar */
@media (max-width: 480px) {
    .widget-blog-modern {
        padding: 15px 12px;
    }
    
    /* Featured card dikey düzene geçer */
    .blog-card-featured {
        flex-direction: column !important;
        min-height: auto;
    }
    
    .blog-card-featured .blog-card-image-wrapper {
        width: 100% !important;
        height: 150px;
    }
    
    /* Small cards - hala yatay */
    .blog-card-small {
        padding: 8px;
        gap: 8px !important;
        flex-direction: row !important; /* 480px'de de yatay */
    }
    
    .blog-card-small .blog-card-small-image {
        width: 60px !important;
        height: 60px !important;
    }
    
    .blog-card-small .blog-card-small-image img {
        width: 60px !important;
        height: 60px !important;
    }
    
    .blog-card-small .blog-card-small-title {
        font-size: 12px !important;
    }
    
    .blog-card-small .blog-card-small-excerpt,
    .blog-card-small p.blog-card-small-excerpt {
        display: none; /* Çok küçük ekranlarda excerpt gizle */
    }
}

/* Container düzeltmesi */
.modern-blog-cards {
    width: 100%;
    overflow: visible;
}

/* Service single page specific */
.service-single .widget-blog-modern {
    margin-top: 30px !important;
}

.service-single .blog-card-small {
    border: 1px solid #e2e8f0;
}

.service-single .blog-card-small:hover {
    border-color: #cbd5e0;
    background: #fafafa;
}

/* Override min-height from responsive-enhancements.css for blog widget links */
@media (max-width: 767px) {
    .widget-blog-modern a,
    .blog-card-featured a,
    .blog-card-small a,
    .blog-card-small-title a,
    .blog-card-title a,
    .btn-view-all-posts {
        min-height: auto !important;
        display: inline !important;
        align-items: normal !important;
    }
    
    /* Restore proper display for view all button */
    .btn-view-all-posts {
        display: inline-flex !important;
        align-items: center !important;
        min-height: auto !important;
    }
    
    /* Ensure small cards maintain their layout */
    .blog-card-small {
        display: flex !important;
    }
    
    /* Ensure featured card maintains its layout */
    .blog-card-featured {
        display: flex !important;
    }
}