/* General container for promotions */
.bp-promotions-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* Responsive grid */
    gap: 20px; /* Space between cards */
    padding: 20px 0;
}

/* Styles for individual promotion cards */
.bp-promotion-card {
    display: flex;
    flex-direction: column; /* Stack content vertically */
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden; /* Ensures image corners are rounded */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s ease-in-out;
}

.bp-promotion-card:hover {
    transform: translateY(-5px); /* Lift effect on hover */
}

.bp-promotion-link {
    flex-grow: 1; /* Allows the link area to take up available space */
    display: block;
    text-decoration: none;
    color: inherit;
}

.bp-card-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    overflow: hidden;
}

.bp-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the area without distortion */
}

.bp-card-content {
    padding: 15px;
    text-align: left;
}

.bp-card-title {
    font-size: 1.3em;
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
}

.bp-card-company,
.bp-card-date {
    font-size: 0.95em;
    color: #666;
    margin-bottom: 5px;
}

.bp-read-more {
    display: inline-block;
    margin-top: 10px;
    color: #0073aa;
    font-weight: bold;
}

/* Actions section at the bottom of the card */
.bp-card-actions {
    display: flex;
    justify-content: space-between; /* Puts book button and share on opposite ends */
    align-items: center;
    padding: 10px 15px; /* Add some padding around buttons */
    border-top: 1px solid #eee; /* Separator from content */
    background-color: #f9f9f9;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 10px; /* Space between elements if they wrap */
}

/* "Book now" button general styles */
.bp-book-now-button {
    display: inline-block;
    background-color: #ffff33; /* WordPress blue, or choose your color */
    color: #fff;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    white-space: nowrap; /* Prevent text from breaking */
}

.bp-book-now-button:hover {
    background-color: #ffff00; /* Darker shade on hover */
}

/* Share section in the card */
.bp-card-share {
    display: flex;
    align-items: center;
    gap: 8px; /* Space between share links */
    flex-wrap: wrap; /* Allow share links to wrap */
}

.bp-share-label {
    font-size: 0.9em;
    color: #666;
}

.bp-card-share a {
    text-decoration: none;
    font-size: 0.9em;
    padding: 3px 8px;
    border-radius: 3px;
    color: #fff; /* Default text color for share buttons */
    white-space: nowrap; /* Prevent text from breaking */
}

/* Share button specific colors */
.bp-card-share a.fb { background-color: #3b5998; }
.bp-card-share a.line { background-color: #00c300; }
.bp-card-share a.x { background-color: #1DA1F2; } /* Twitter blue */

/* Pagination styles */
.bp-pagination {
    margin-top: 30px;
    text-align: center;
}

.bp-pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex; /* Use flexbox for horizontal list */
    flex-wrap: wrap; /* Allow pagination items to wrap */
    justify-content: center;
    align-items: center;
    gap: 5px; /* Space between pagination items */
}

.bp-pagination li {
    display: inline-block; /* Ensure list items are side-by-side */
    margin: 0; /* Remove default margin */
}

.bp-pagination a,
.bp-pagination span {
    display: block;
    padding: 8px 12px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #0073aa;
    background-color: #f9f9f9;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.bp-pagination a:hover {
    background-color: #e9e9e9;
    color: #005177;
    border-color: #ccc;
}

.bp-pagination .current {
    background-color: #0073aa;
    color: #fff;
    border-color: #0073aa;
    font-weight: bold;
    cursor: default;
}

.bp-pagination .current:hover {
    background-color: #0073aa; /* Keep same color on hover for current page */
    color: #fff;
}

.bp-pagination .dots {
    border: none;
    background: none;
    cursor: default;
}

/* Styles for "No Promotion available" message */
.bp-no-promotions {
    text-align: center;
    font-size: 1.2em;
    color: #555;
    padding: 40px 20px;
    background-color: #f9f9f9;
    border: 1px dashed #ccc;
    border-radius: 8px;
    grid-column: 1 / -1; /* Make it span all columns */
}

/* Styles for the "Book now" button on single promotion pages */
.bp-single-book-now-container {
    text-align: center; /* Center the button */
    margin-top: 30px; /* Space above the button */
    margin-bottom: 30px; /* Space below the button */
    padding: 20px;
    background-color: #f5f5f5; /* Light background for the button container */
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.bp-single-book-now {
    font-size: 1.2em; /* Larger font for single page button */
    padding: 12px 30px; /* Larger padding */
    min-width: 200px; /* Ensure a decent minimum width */
}

/* Widget Styles */
.bp-promotions-widget-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bp-widget-item {
    display: flex;
    align-items: flex-start; /* Align items to the top */
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.bp-widget-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.bp-widget-item a {
    display: flex; /* Make the whole item clickable with flex */
    text-decoration: none;
    color: inherit;
    flex-grow: 1; /* Allow link area to expand */
}

.bp-widget-image {
    flex-shrink: 0; /* Prevent image from shrinking */
    width: 60px; /* Small fixed width for widget thumbnail */
    height: 60px;
    overflow: hidden;
    border-radius: 4px;
    margin-right: 10px;
}

.bp-widget-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bp-widget-content {
    flex-grow: 1; /* Allow content to take remaining space */
}

.bp-widget-title {
    font-size: 1em;
    margin: 0;
    color: #333;
    line-height: 1.3;
}

.bp-widget-date {
    font-size: 0.85em;
    color: #777;
    margin: 3px 0 0;
}

.bp-widget-readmore {
    font-size: 0.8em;
    color: #0073aa;
    margin-top: 5px;
    display: inline-block;
}

.bp-widget-book-now {
    margin-left: 10px; /* Space between content and book now button */
    flex-shrink: 0; /* Prevent button container from shrinking */
}

.bp-widget-book-now .bp-book-now-button {
    font-size: 0.8em; /* Smaller button in widget */
    padding: 5px 10px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .bp-promotions-container {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 15px;
    }

    .bp-card-image {
        height: 180px;
    }

    .bp-card-title {
        font-size: 1.2em;
    }

    .bp-card-actions {
        flex-direction: column; /* Stack buttons and share vertically */
        align-items: stretch; /* Stretch items to full width */
        padding: 10px;
    }

    .bp-book-now-button,
    .bp-card-share {
        width: 100%; /* Make buttons and share section full width */
        text-align: center;
        justify-content: center;
    }

    .bp-single-book-now {
        font-size: 1.1em;
        padding: 10px 20px;
        min-width: unset; /* Remove min-width for smaller screens */
        width: 100%; /* Make it full width on small screens */
    }
}

@media (max-width: 480px) {
    .bp-promotions-container {
        grid-template-columns: 1fr; /* Single column on very small screens */
        padding: 10px;
    }

    .bp-card-image {
        height: 150px;
    }

    .bp-card-content {
        padding: 10px;
    }

    .bp-card-actions {
        padding: 8px;
    }
}