/* =============================================
   BLOG LISTING PAGE - Cards
   ============================================= */

/* Base card styles */
#blogs-container .hover {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

#blogs-container .hover:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

#blogs-container .post-image {
    position: relative;
    overflow: hidden;
    margin-bottom: 0 !important;
}

#blogs-container .post-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

#blogs-container .post-image .d-tagline {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
}

#blogs-container .post-image .d-tagline span {
    font-size: 11px;
    padding: 5px 12px;
    border-radius: 20px;
}

#blogs-container .pt-2 {
    padding: 16px 20px 20px !important;
    display: flex;
    flex-direction: column;
    flex: 1;
}

#blogs-container .pt-2 h4 {
    font-size: 18px;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#blogs-container .pt-2 h4 a {
    text-decoration: none;
    transition: color 0.2s ease;
}

#blogs-container .pt-2 p {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

#blogs-container .relative {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

#blogs-container .fs-14 {
    font-size: 13px !important;
    color: #888;
}

/* =============================================
   BLOG DETAIL PAGE
   ============================================= */

.blog-read {
    margin-bottom: 20px;
}

.blog-read img {
    border-radius: 10px;
}

.blog-read #blog-content p {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 18px;
}

.blog-read #blog-content h2,
.blog-read #blog-content h3,
.blog-read #blog-content h4 {
    margin-top: 28px;
    margin-bottom: 14px;
    line-height: 1.4;
}

/* Sidebar widgets */
.widget-post h4 {
    font-size: 20px;
    margin-bottom: 20px;
}

.de-bloglist-type-1 li {
    display: flex;
    align-items: center;
    gap: 12px;
}

.de-bloglist-type-1 .d-image {
    flex-shrink: 0;
}

.de-bloglist-type-1 .d-image img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.de-bloglist-type-1 .d-content h4 {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 4px;
}

.widget_tags ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* =============================================
   RESPONSIVE - Large Laptops (1200px - 1399px)
   ============================================= */
@media (max-width: 1399px) {
    #blogs-container .post-image img {
        height: 200px;
    }

    #blogs-container .pt-2 h4 {
        font-size: 17px;
    }
}

/* =============================================
   RESPONSIVE - Medium Laptops (992px - 1199px)
   ============================================= */
@media (max-width: 1199px) {
    #blogs-container .post-image img {
        height: 180px;
    }

    #blogs-container .pt-2 h4 {
        font-size: 16px;
    }

    #blogs-container .pt-2 p {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }

    .blog-read #blog-content p {
        font-size: 15px;
    }
}

/* =============================================
   RESPONSIVE - Tablets (768px - 991px)
   ============================================= */
@media (max-width: 991px) {
    /* Blog listing - 2 columns from Bootstrap col-md-6 already handles this */
    #blogs-container .post-image img {
        height: 200px;
    }

    #blogs-container .pt-2 {
        padding: 14px 16px 16px !important;
    }

    #blogs-container .pt-2 h4 {
        font-size: 16px;
        text-align: left !important;
    }

    #blogs-container .pt-2 p {
        font-size: 14px;
        text-align: left !important;
        -webkit-line-clamp: 3;
    }

    #blogs-container .fs-14 {
        text-align: left !important;
    }

    #blogs-container .relative {
        text-align: left !important;
    }

    /* Blog detail - sidebar goes below content */
    .blog-read #blog-content p {
        font-size: 15px;
        line-height: 1.75;
        text-align: left !important;
    }

    .blog-read #blog-content h2,
    .blog-read #blog-content h3,
    .blog-read #blog-content h4 {
        text-align: left !important;
    }

    .widget-post h4,
    .widget_tags h4 {
        text-align: left !important;
    }

    .de-bloglist-type-1 .d-content h4 {
        text-align: left !important;
    }

    .de-bloglist-type-1 .d-date {
        text-align: left !important;
    }

    /* Sidebar spacing on tablet */
    .col-lg-4 .widget {
        margin-top: 20px;
    }
}

/* =============================================
   RESPONSIVE - Large Phones (576px - 767px)
   ============================================= */
@media (max-width: 767px) {
    /* Blog listing - single column */
    #blogs-container .col-lg-4.col-md-6 {
        width: 100%;
        max-width: 100%;
    }

    #blogs-container .post-image img {
        height: 220px;
    }

    #blogs-container .pt-2 {
        padding: 14px 16px 18px !important;
    }

    #blogs-container .pt-2 h4 {
        font-size: 18px;
        text-align: left !important;
    }

    #blogs-container .pt-2 p {
        font-size: 14px;
        text-align: left !important;
        -webkit-line-clamp: 3;
    }

    #blogs-container .fs-14 {
        text-align: left !important;
    }

    #blogs-container .relative {
        text-align: left !important;
    }

    /* Blog detail */
    .blog-read img {
        border-radius: 8px;
    }

    .blog-read #blog-content p {
        font-size: 15px;
        line-height: 1.7;
        text-align: left !important;
    }

    .blog-read #blog-content h2,
    .blog-read #blog-content h3,
    .blog-read #blog-content h4 {
        text-align: left !important;
    }

    .widget-post h4,
    .widget_tags h4 {
        text-align: left !important;
    }

    .de-bloglist-type-1 .d-content h4 {
        text-align: left !important;
    }

    .de-bloglist-type-1 .d-date {
        text-align: left !important;
    }

    /* Subheader */
    #subheader h1 {
        font-size: 28px;
    }

    #subheader h2 {
        font-size: 24px;
    }

    #subheader h5 {
        font-size: 14px;
    }
}

/* =============================================
   RESPONSIVE - Medium Phones (480px - 575px)
   ============================================= */
@media (max-width: 575px) {
    #blogs-container .post-image img {
        height: 200px;
    }

    #blogs-container .pt-2 h4 {
        font-size: 17px;
    }

    #blogs-container .pt-2 p {
        font-size: 13px;
    }

    #blogs-container .hover {
        border-radius: 8px;
    }

    /* Blog detail */
    .blog-read #blog-content p {
        font-size: 14px;
        line-height: 1.7;
    }

    .blog-read #blog-content h2 {
        font-size: 22px;
    }

    .blog-read #blog-content h3 {
        font-size: 20px;
    }

    .blog-read #blog-content h4 {
        font-size: 18px;
    }

    /* Sidebar popular posts */
    .de-bloglist-type-1 .d-image img {
        width: 70px;
        height: 52px;
    }

    .de-bloglist-type-1 .d-content h4 {
        font-size: 13px;
    }

    /* Subheader */
    #subheader h1 {
        font-size: 24px;
    }

    #subheader h2 {
        font-size: 22px;
    }
}

/* =============================================
   RESPONSIVE - Small Phones (< 480px)
   ============================================= */
@media (max-width: 479px) {
    #blogs-container .post-image img {
        height: 180px;
    }

    #blogs-container .pt-2 {
        padding: 12px 14px 16px !important;
    }

    #blogs-container .pt-2 h4 {
        font-size: 16px;
    }

    #blogs-container .pt-2 p {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }

    #blogs-container .fs-14 {
        font-size: 12px !important;
    }

    #blogs-container .post-image .d-tagline span {
        font-size: 10px;
        padding: 4px 10px;
    }

    /* Blog detail */
    .blog-read #blog-content p {
        font-size: 14px;
        line-height: 1.65;
    }

    .blog-read #blog-content h2 {
        font-size: 20px;
    }

    .blog-read #blog-content h3 {
        font-size: 18px;
    }

    .blog-read #blog-content h4 {
        font-size: 16px;
    }

    /* Subheader */
    #subheader h1 {
        font-size: 22px;
    }

    #subheader h2 {
        font-size: 20px;
    }

    #subheader .crumb {
        font-size: 12px;
    }
}

/* =============================================
   RESPONSIVE - Very Small Phones (< 360px)
   ============================================= */
@media (max-width: 359px) {
    #blogs-container .post-image img {
        height: 160px;
    }

    #blogs-container .pt-2 h4 {
        font-size: 15px;
    }

    #blogs-container .pt-2 p {
        font-size: 12px;
    }

    .blog-read #blog-content p {
        font-size: 13px;
    }

    .de-bloglist-type-1 .d-image img {
        width: 60px;
        height: 45px;
    }

    .de-bloglist-type-1 .d-content h4 {
        font-size: 12px;
    }
}
@media (max-width: 500px) {
    #subheader h1 {
        font-size: 34px;
    }
}

/* ===================== */
/* MOBILE SECTION SPACING REDUCTION */
/* ===================== */
@media (max-width: 768px) {
    section {
        padding-top: 40px !important;
        padding-bottom: 40px !important;
    }
}

@media (max-width: 500px) {
    section {
        padding-top: 30px !important;
        padding-bottom: 30px !important;
    }
}
