/**
 * Blog Display Pro - Styles
 */

/* ===========================================
   HERO SECTION
   =========================================== */

.bdp-hero-section {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.bdp-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.bdp-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.3);
    z-index: 2;
}

.bdp-hero-content {
    position: relative;
    z-index: 3;
    padding: 40px;
    max-width: 600px;
}

.bdp-hero-title {
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.2;
}

.bdp-hero-subtitle {
    font-size: 18px;
    color: #ffffff;
    margin: 0;
    opacity: 0.9;
}

/* Hero Position Classes */
.bdp-position-top-left .bdp-hero-content { align-self: flex-start; }
.bdp-position-top-center { align-items: flex-start; justify-content: center; }
.bdp-position-top-center .bdp-hero-content { text-align: center; }
.bdp-position-top-right { align-items: flex-start; justify-content: flex-end; }

.bdp-position-center-left { align-items: center; }
.bdp-position-center { align-items: center; justify-content: center; }
.bdp-position-center .bdp-hero-content { text-align: center; }
.bdp-position-center-right { align-items: center; justify-content: flex-end; }

.bdp-position-bottom-left { align-items: flex-end; }
.bdp-position-bottom-center { align-items: flex-end; justify-content: center; }
.bdp-position-bottom-center .bdp-hero-content { text-align: center; }
.bdp-position-bottom-right { align-items: flex-end; justify-content: flex-end; }

/* ===========================================
   BLOG POSTS
   =========================================== */

.bdp-posts-wrapper {
    width: 100%;
}

.bdp-post-item {
    margin-bottom: 40px;
}

.bdp-post-item:last-child {
    margin-bottom: 0;
}

/* Side by Side Layout - Text Left, Image Right */
.bdp-layout-side-by-side {
    display: flex;
    flex-direction: row;
    gap: 30px;
    align-items: flex-start;
}

.bdp-layout-side-by-side .bdp-post-content {
    width: calc(50% - 30px);
    order: 1;
}

.bdp-layout-side-by-side .bdp-post-image {
    width: 50%;
    order: 2;
}

/* Side by Side Reverse - Image Left, Text Right */
.bdp-layout-side-by-side-r {
    display: flex;
    flex-direction: row;
    gap: 30px;
    align-items: flex-start;
}

.bdp-layout-side-by-side-r .bdp-post-content {
    width: calc(50% - 30px);
    order: 2;
}

.bdp-layout-side-by-side-r .bdp-post-image {
    width: 50%;
    order: 1;
}

/* Stacked Layout */
.bdp-layout-stacked {
    display: flex;
    flex-direction: column;
}

.bdp-layout-stacked .bdp-post-image {
    margin-bottom: 20px;
}

/* Post Image */
.bdp-post-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Post Content */
.bdp-post-content {
    padding: 0;
}

.bdp-post-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.bdp-post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.bdp-post-title a:hover {
    color: #1a3a1a;
}

.bdp-post-excerpt {
    font-size: 15px;
    line-height: 1.7;
    color: #666;
    margin-bottom: 20px;
}

.bdp-post-excerpt p {
    margin: 0 0 15px 0;
}

.bdp-post-excerpt p:last-child {
    margin-bottom: 0;
}

/* Full Content Styling */
.bdp-post-full-content {
    font-size: 15px;
    line-height: 1.8;
    color: #444;
}

.bdp-post-full-content p {
    margin: 0 0 18px 0;
}

.bdp-post-full-content p:last-child {
    margin-bottom: 0;
}

.bdp-read-more {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    border-bottom: 2px solid #333;
    padding-bottom: 2px;
    transition: all 0.3s ease;
}

.bdp-read-more:hover {
    color: #1a3a1a;
    border-bottom-color: #1a3a1a;
}

/* ===========================================
   RECENT POSTS GALLERY
   =========================================== */

.bdp-recent-gallery {
    width: 100%;
}

.bdp-gallery-title {
    font-size: 28px;
    font-weight: 400;
    color: #333;
    margin: 0 0 30px 0;
}

.bdp-gallery-grid {
    display: grid;
    gap: 20px;
}

.bdp-gallery-grid.bdp-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.bdp-gallery-grid.bdp-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.bdp-gallery-grid.bdp-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.bdp-gallery-grid.bdp-columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

/* Masonry Layout */
.bdp-layout-masonry {
    display: block;
    column-count: 3;
    column-gap: 20px;
}

.bdp-layout-masonry.bdp-columns-2 { column-count: 2; }
.bdp-layout-masonry.bdp-columns-3 { column-count: 3; }
.bdp-layout-masonry.bdp-columns-4 { column-count: 4; }
.bdp-layout-masonry.bdp-columns-5 { column-count: 5; }

.bdp-layout-masonry .bdp-gallery-item {
    break-inside: avoid;
    margin-bottom: 20px;
}

/* Gallery Item */
.bdp-gallery-item {
    position: relative;
}

.bdp-gallery-item a {
    display: block;
    text-decoration: none;
}

.bdp-gallery-image {
    position: relative;
    overflow: hidden;
}

.bdp-gallery-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.bdp-gallery-item:hover .bdp-gallery-image img {
    transform: scale(1.05);
}

/* Gallery Overlay */
.bdp-gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.bdp-gallery-item:hover .bdp-gallery-overlay {
    opacity: 1;
}

.bdp-view-icon {
    font-size: 36px;
    color: #fff;
    font-weight: 300;
    line-height: 1;
}

/* Gallery Item Title */
.bdp-gallery-item-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin: 10px 0 0 0;
    transition: color 0.3s ease;
}

.bdp-gallery-item:hover .bdp-gallery-item-title {
    color: #1a3a1a;
}

.bdp-gallery-overlay-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
}

.bdp-gallery-overlay-title h3 {
    font-size: 14px;
    color: #fff;
    margin: 0;
}

/* No Posts */
.bdp-no-posts {
    text-align: center;
    color: #666;
    padding: 40px;
}

/* ===========================================
   RESPONSIVE
   =========================================== */

@media screen and (max-width: 1024px) {
    .bdp-layout-masonry.bdp-columns-5,
    .bdp-layout-masonry.bdp-columns-4 {
        column-count: 3;
    }
    
    .bdp-gallery-grid.bdp-columns-5,
    .bdp-gallery-grid.bdp-columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Tablet: Adjust side-by-side layout */
    .bdp-layout-side-by-side,
    .bdp-layout-side-by-side-r {
        gap: 25px;
    }
    
    .bdp-layout-side-by-side .bdp-post-content,
    .bdp-layout-side-by-side-r .bdp-post-content {
        width: calc(55% - 25px);
    }
    
    .bdp-layout-side-by-side .bdp-post-image,
    .bdp-layout-side-by-side-r .bdp-post-image {
        width: 45%;
    }
}

@media screen and (max-width: 768px) {
    .bdp-hero-section {
        min-height: 350px;
    }
    
    .bdp-hero-content {
        padding: 25px;
    }
    
    .bdp-hero-title {
        font-size: 26px;
    }
    
    /* Mobile: Stack layout by default */
    .bdp-layout-side-by-side,
    .bdp-layout-side-by-side-r {
        flex-direction: column;
        gap: 20px;
    }
    
    .bdp-layout-side-by-side .bdp-post-content,
    .bdp-layout-side-by-side .bdp-post-image,
    .bdp-layout-side-by-side-r .bdp-post-content,
    .bdp-layout-side-by-side-r .bdp-post-image {
        width: 100% !important;
        order: unset;
    }
    
    /* Image top, text bottom (default mobile) */
    .bdp-layout-side-by-side .bdp-post-image,
    .bdp-layout-side-by-side-r .bdp-post-image {
        order: 1;
        margin-bottom: 15px;
    }
    
    .bdp-layout-side-by-side .bdp-post-content,
    .bdp-layout-side-by-side-r .bdp-post-content {
        order: 2;
    }
    
    .bdp-layout-masonry.bdp-columns-3,
    .bdp-layout-masonry.bdp-columns-4,
    .bdp-layout-masonry.bdp-columns-5 {
        column-count: 2;
    }
    
    .bdp-gallery-grid.bdp-columns-3,
    .bdp-gallery-grid.bdp-columns-4,
    .bdp-gallery-grid.bdp-columns-5 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bdp-post-title {
        font-size: 20px;
        line-height: 1.4;
        margin-bottom: 12px;
    }
    
    .bdp-post-excerpt,
    .bdp-post-full-content {
        font-size: 14px;
        line-height: 1.6;
    }
    
    .bdp-post-excerpt p,
    .bdp-post-full-content p {
        margin-bottom: 12px;
    }
    
    .bdp-post-item {
        margin-bottom: 30px;
        padding-bottom: 30px;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }
    
    .bdp-post-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
    
    .bdp-read-more {
        font-size: 13px;
    }
}

@media screen and (max-width: 480px) {
    .bdp-hero-section {
        min-height: 280px;
    }
    
    .bdp-hero-title {
        font-size: 22px;
    }
    
    .bdp-hero-subtitle {
        font-size: 14px;
    }
    
    .bdp-layout-masonry.bdp-columns-2,
    .bdp-layout-masonry.bdp-columns-3,
    .bdp-layout-masonry.bdp-columns-4,
    .bdp-layout-masonry.bdp-columns-5 {
        column-count: 1;
    }
    
    .bdp-gallery-grid.bdp-columns-2,
    .bdp-gallery-grid.bdp-columns-3,
    .bdp-gallery-grid.bdp-columns-4,
    .bdp-gallery-grid.bdp-columns-5 {
        grid-template-columns: 1fr;
    }
    
    .bdp-gallery-title {
        font-size: 22px;
    }
    
    .bdp-post-title {
        font-size: 18px;
    }
    
    .bdp-post-excerpt,
    .bdp-post-full-content {
        font-size: 13px;
    }
    
    .bdp-post-item {
        margin-bottom: 25px;
        padding-bottom: 25px;
    }
}
