/**
 * DW Bulletin Widget Styles
 * 
 * @package Dasom_Church
 * @since 1.34.0
 */

/* Bulletin widgets */
.dw-bulletin-widget,
.dw-single-bulletin-container {
    pointer-events: auto;
}

/* Bulletin Image Template */
.dw-bulletin-image-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dw-bulletin-image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.dw-bulletin-image-item {
    /* border removed to allow Elementor Group_Control_Border to work */
    /* border-radius removed to allow Elementor card_border_radius control to work */
    overflow: hidden;
    background: #fff;
    /* box-shadow removed to allow Elementor Group_Control_Box_Shadow to work */
    transition: box-shadow 0.3s ease;
}

/* Image Position Layouts */
.dw-bulletin-image-item.image-left {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
}

.dw-bulletin-image-item.image-top {
    display: flex;
    flex-direction: column;
}

/* Aspect Ratio Support */
.dw-bulletin-image-item.aspect-16-9 .dw-bulletin-image {
    aspect-ratio: 16/9;
}

.dw-bulletin-image-item.aspect-4-3 .dw-bulletin-image {
    aspect-ratio: 4/3;
}

.dw-bulletin-image-item.aspect-3-2 .dw-bulletin-image {
    aspect-ratio: 3/2;
}

.dw-bulletin-image-item.aspect-1-1 .dw-bulletin-image {
    aspect-ratio: 1/1;
}

.dw-bulletin-image-item.aspect-2-3 .dw-bulletin-image {
    aspect-ratio: 2/3;
}

.dw-bulletin-image-item.aspect-3-4 .dw-bulletin-image {
    aspect-ratio: 3/4;
}

.dw-bulletin-image-item.aspect-9-16 .dw-bulletin-image {
    aspect-ratio: 9/16;
}

/* Default hover effect removed to allow Elementor hover controls to work */
/* .dw-bulletin-image-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
} */

.dw-bulletin-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
}

/* Image positioning adjustments */
.dw-bulletin-image-item.image-left .dw-bulletin-image {
    width: 40%;
    max-width: 300px;
}

.dw-bulletin-image-item.image-top .dw-bulletin-image {
    width: 100%;
}

.dw-bulletin-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Image overlay support */
.dw-bulletin-image::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
}

.dw-bulletin-content {
    padding: 15px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Content positioning for different image positions */
.dw-bulletin-image-item.image-left .dw-bulletin-content {
    padding-left: 20px;
}

.dw-bulletin-image-item.image-top .dw-bulletin-content {
    padding-top: 20px;
}

.dw-bulletin-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
}

.dw-bulletin-meta {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #666;
    gap: 8px;
    justify-content: flex-start;
    text-align: left;
}

.dw-bulletin-date {
    font-weight: 500;
}

.dw-bulletin-separator {
    color: #ccc;
    font-weight: bold;
}

.dw-bulletin-download-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.dw-bulletin-download {
    background: #007cba;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.dw-bulletin-download:hover {
    background: #005a87;
    color: #fff;
    text-decoration: none;
}

/* Bulletin Button Template */
.dw-bulletin-button-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dw-bulletin-button-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.dw-bulletin-item {
    /* border removed to allow Elementor Group_Control_Border to work */
    /* border-radius removed to allow Elementor card_border_radius control to work */
    padding: 15px 20px;
    background: #fff;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Default hover effect removed to allow Elementor hover controls to work */
/* .dw-bulletin-item:hover {
    border-color: #007cba;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.15);
    transform: translateY(-1px);
} */

/* Hover effects for button template */
.dw-bulletin-item[data-hover="lift"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dw-bulletin-item[data-hover="shadow"]:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.dw-bulletin-item[data-hover="scale"]:hover {
    transform: scale(1.02);
}

/* Card hover effects for both templates */
.dw-bulletin-image-item[data-hover="lift"]:hover,
.dw-bulletin-item[data-hover="lift"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dw-bulletin-image-item[data-hover="shadow"]:hover,
.dw-bulletin-item[data-hover="shadow"]:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.dw-bulletin-image-item[data-hover="scale"]:hover,
.dw-bulletin-item[data-hover="scale"]:hover {
    transform: scale(1.02);
}

.dw-bulletin-image-item[data-hover="glow"]:hover,
.dw-bulletin-item[data-hover="glow"]:hover {
    box-shadow: 0 0 20px rgba(0, 124, 186, 0.3);
}

.dw-bulletin-item .dw-bulletin-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.4;
}

.dw-bulletin-item .dw-bulletin-meta {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #666;
    gap: 8px;
    justify-content: flex-start;
    text-align: left;
}

.dw-bulletin-item .dw-bulletin-date {
    font-weight: 500;
}

.dw-bulletin-item .dw-bulletin-separator {
    color: #ccc;
    font-weight: bold;
}

.dw-bulletin-item .dw-bulletin-download {
    background: #007cba;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.dw-bulletin-item .dw-bulletin-download:hover {
    background: #005a87;
    color: #fff;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dw-bulletin-image-list {
        gap: 15px;
    }
    
    .dw-bulletin-image-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .dw-bulletin-image-item {
        border-radius: 6px;
    }
    
    .dw-bulletin-image {
        height: 150px;
    }
    
    .dw-bulletin-content {
        padding: 12px 15px;
    }
    
    .dw-bulletin-title {
        font-size: 15px;
    }
    
    .dw-bulletin-meta {
        font-size: 13px;
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .dw-bulletin-button-list {
        gap: 8px;
    }
    
    .dw-bulletin-button-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .dw-bulletin-item {
        padding: 12px 15px;
        border-radius: 6px;
    }
    
    .dw-bulletin-item .dw-bulletin-title {
        font-size: 15px;
    }
    
    .dw-bulletin-item .dw-bulletin-meta {
        font-size: 13px;
        flex-wrap: wrap;
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .dw-bulletin-image-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .dw-bulletin-button-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .dw-bulletin-image {
        height: 120px;
    }
    
    .dw-bulletin-content {
        padding: 10px 12px;
    }
    
    .dw-bulletin-title {
        font-size: 14px;
    }
    
    .dw-bulletin-meta {
        font-size: 12px;
    }
    
    .dw-bulletin-download {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .dw-bulletin-item {
        padding: 10px 12px;
    }
    
    .dw-bulletin-item .dw-bulletin-title {
        font-size: 14px;
    }
    
    .dw-bulletin-item .dw-bulletin-meta {
        font-size: 12px;
    }
    
    .dw-bulletin-item .dw-bulletin-download {
        padding: 3px 8px;
        font-size: 11px;
    }
    
    /* Mobile: Force top layout for better mobile experience */
    .dw-bulletin-image-item.image-left {
        flex-direction: column;
    }
    
    .dw-bulletin-image-item.image-left .dw-bulletin-image {
        width: 100%;
        max-width: none;
    }
    
    .dw-bulletin-image-item.image-left .dw-bulletin-content {
        padding-left: 12px;
        padding-top: 12px;
    }
}

/* Pagination Styles */
.dw-bulletin-pagination {
    margin-top: 30px;
    text-align: center;
}

.dw-pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dw-pagination-prev,
.dw-pagination-next {
    display: inline-block;
    padding: 8px 16px;
    background-color: #007cba;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.dw-pagination-prev:hover,
.dw-pagination-next:hover {
    background-color: #005a87;
    color: #ffffff;
    text-decoration: none;
}

.dw-pagination-numbers {
    display: flex;
    gap: 5px;
    align-items: center;
}

.dw-pagination-number {
    display: inline-block;
    padding: 8px 12px;
    background-color: #f8f9fa;
    color: #333333;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
}

.dw-pagination-number:hover {
    background-color: #e9ecef;
    color: #333333;
    text-decoration: none;
}

.dw-pagination-number.current {
    background-color: #007cba;
    color: #ffffff;
}

.dw-pagination-number.current:hover {
    background-color: #005a87;
    color: #ffffff;
}

.dw-pagination-dots {
    color: #666666;
    font-size: 14px;
    padding: 0 5px;
}

/* Responsive pagination */
@media (max-width: 768px) {
    .dw-pagination-wrapper {
        gap: 5px;
    }
    
    .dw-pagination-prev,
    .dw-pagination-next {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .dw-pagination-number {
        padding: 6px 10px;
        font-size: 13px;
        min-width: 35px;
    }
}

@media (max-width: 480px) {
    .dw-pagination-numbers {
        gap: 3px;
    }
    
    .dw-pagination-number {
        padding: 5px 8px;
        min-width: 30px;
    }
}

/* DW Single Bulletin Widget Styles */
.dw-single-bulletin-container {
    max-width: 100%;
    margin: 0 auto;
}

.dw-single-bulletin-date {
    font-size: 18px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 20px;
    text-align: center;
}

.dw-single-bulletin-pdf-container {
    text-align: center;
    margin-bottom: 30px;
}

.dw-single-bulletin-pdf {
    display: inline-block;
    background-color: #007cba;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.dw-single-bulletin-pdf:hover {
    background-color: #005a87;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.dw-single-bulletin-images {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    margin-top: 20px;
}

.dw-single-bulletin-image-item {
    width: 100%;
    max-width: 900px;
    text-align: center;
    background: #ffffff;
    /* border-radius removed to allow Elementor card_border_radius control to work */
    padding: 15px;
    /* box-shadow removed to allow Elementor Group_Control_Box_Shadow to work */
    /* border removed to allow Elementor Group_Control_Border to work */
    transition: all 0.3s ease;
}

.dw-single-bulletin-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    object-fit: contain;
}

/* Default hover effect removed to allow Elementor hover controls to work */
/* .dw-single-bulletin-image:hover {
    transform: scale(1.02);
} */

/* Single Bulletin Hover Effects - Now controlled by Elementor hover controls */
/* .dw-single-bulletin-image-item[data-hover="lift"]:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.dw-single-bulletin-image-item[data-hover="shadow"]:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.dw-single-bulletin-image-item[data-hover="scale"]:hover {
    transform: scale(1.05);
}

.dw-single-bulletin-image-item[data-hover="glow"]:hover {
    box-shadow: 0 0 20px rgba(0, 124, 186, 0.4);
}

.dw-single-bulletin-image-item[data-hover="none"]:hover {
    transform: none;
    box-shadow: inherit;
} */

/* Responsive Design */
@media (max-width: 768px) {
    .dw-single-bulletin-date {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .dw-single-bulletin-pdf {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .dw-single-bulletin-images {
        gap: 15px;
    }
    
    .dw-single-bulletin-image-item {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .dw-single-bulletin-date {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .dw-single-bulletin-pdf {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .dw-single-bulletin-images {
        gap: 12px;
    }
}

/* Bulletin View Button Styles */
.dw-bulletin-view {
    background-color: #28a745;
    color: #ffffff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 8px;
    text-decoration: none;
    display: inline-block;
}

.dw-bulletin-view:hover {
    background-color: #218838;
    color: #ffffff;
    text-decoration: none;
}

/* Print Styles */
@media print {
    .dw-bulletin-download {
        display: none;
    }
    
    .dw-bulletin-item {
        border: 1px solid #000;
        box-shadow: none;
    }
    
    .dw-bulletin-pagination {
        display: none;
    }
    
    .dw-single-bulletin-pdf {
        display: none;
    }
}
