/* Posts Carousel Slider Styles */

.pcs-carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
}

/* Hide scrollbar but keep functionality */
.pcs-carousel-wrapper {
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding: 0 10px;
}

.pcs-carousel-wrapper::-webkit-scrollbar {
    display: none;
}

/* Mobile specific fixes */
@media (max-width: 768px) {
    .pcs-carousel-container {
        padding: 20px 0;
    }
    
    .pcs-carousel-wrapper {
        padding: 0 10px;
        justify-content: center;
    }
    
    .pcs-carousel-item {
        padding: 0 5px;
    }
    
    /* Ensure full items are shown on mobile */
    .pcs-carousel-item {
        min-width: 90vw;
    }
}

/* Override for dynamic mobile width */
@media (max-width: 768px) {
    .pcs-carousel-container:not(.mobile-view) .pcs-carousel-item {
        min-width: unset;
    }
}

/* Tablet specific fixes */
@media (min-width: 769px) and (max-width: 991px) {
    .pcs-carousel-item {
        min-width: 45vw;
    }
}

/* Mobile view class */
.pcs-carousel-container.mobile-view .pcs-carousel-item {
    min-width: 90vw;
}

.pcs-carousel-container.mobile-view .pcs-carousel-wrapper {
    justify-content: center;
}

.pcs-carousel-wrapper {
    display: flex;
    transition: transform 0.5s ease;
    width: 100%;
}

.pcs-carousel-item {
    flex: 0 0 auto;
    padding: 0 10px;
    box-sizing: border-box;
}

/* Ensure proper item sizing */
.pcs-carousel-item {
    min-width: 0;
}

/* Ensure proper centering */
.pcs-carousel-wrapper {
    align-items: center;
}

/* Mobile specific fixes */
@media (max-width: 768px) {
    .pcs-carousel-container {
        padding: 20px 0;
    }
    
    .pcs-carousel-wrapper {
        padding: 0 10px;
    }
    
    .pcs-carousel-item {
        padding: 0 5px;
    }
    
    /* Ensure full items are shown on mobile */
    .pcs-carousel-item {
        min-width: 90vw;
    }
}

/* Mobile view class */
.pcs-carousel-container.mobile-view .pcs-carousel-item {
    min-width: unset;
}

.pcs-carousel-container.mobile-view .pcs-carousel-wrapper {
    justify-content: center;
}

/* Tablet specific fixes */
@media (min-width: 769px) and (max-width: 991px) {
    .pcs-carousel-item {
        min-width: 45vw;
    }
}

/* Card Styles */
.pcs-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.pcs-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.pcs-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    /* Ensure proper box sizing */
    box-sizing: border-box;
}

/* Override default sizing when custom dimensions are applied */
.pcs-card-image[style*="width"]:not([style*="width: 100%"]):not([style*="width:100%"]) {
    width: auto !important;
}

.pcs-card-image[style*="height"]:not([style*="height: 100%"]):not([style*="height:100%"]) {
    height: auto !important;
}

/* Ensure proper sizing when height is auto */
.pcs-card-image[style*="height: auto"],
.pcs-card-image[style*="height:auto"] {
    height: auto !important;
}

/* Allow JavaScript to override dimensions properly */
.pcs-card-image[style*="width:"] {
    width: auto !important;
}

.pcs-card-image[style*="height:"] {
    height: auto !important;
}

/* More specific rules for exact matches */
.pcs-card-image[style*="width: 350px"] {
    width: 350px !important;
}

.pcs-card-image[style*="height: auto"] {
    height: auto !important;
}

/* Special case for 350px width with auto height */
.pcs-card-image[data-width="350px"][data-height="auto"] {
    width: 350px !important;
    height: auto !important;
}

.pcs-card-image[data-width="350px"][data-height="auto"] img {
    width: 350px !important;
    height: auto !important;
}

/* General case for fixed width images */
/* This rule was causing issues - removed entirely */
/* JavaScript will handle image sizing dynamically */

/* Handle special CSS values */
.pcs-card-image[style*="height: auto"] {
    height: auto !important;
}

.pcs-card-image[style*="width: auto"] {
    width: auto !important;
}

/* Ensure default sizing when no custom styles are applied */
.pcs-card-image:not([style*="width"]) {
    width: 100%;
}

.pcs-card-image:not([style*="height"]) {
    height: 200px;
}

/* Confirmation Dialog Styles */
#confirmation-dialog {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

#confirmation-dialog button {
    transition: all 0.3s ease;
}

#confirmation-dialog button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

#confirmation-dialog button:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Ensure image fills container */
.pcs-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Handle auto height images */
.pcs-card-image[style*="height: auto"] img,
.pcs-card-image[style*="height:auto"] img {
    height: auto;
    object-fit: cover;
}

/* Handle fixed width with auto height */
.pcs-card-image[style*="width: 350px"][style*="height: auto"] img {
    width: 350px;
    height: auto;
}

/* General rule for fixed width images with auto height */
.pcs-card-image[data-width]:not([data-width="100%"])[data-height="auto"] img {
    height: auto;
}

/* Special case for 350px width */
.pcs-card-image[data-width="350px"] img {
    width: 350px !important;
    height: auto !important;
}

/* Ensure proper sizing when container has fixed width */
.pcs-card-image[style*="width: 350px"] img {
    width: 350px !important;
    height: auto !important;
}

/* Dynamic rules for data attributes - fixed width with auto height */
.pcs-card-image[data-width]:not([data-width="100%"]):not([data-height="200px"]) img {
    height: auto !important;
}

/* Specific handling for image_width="350px" and image_height="auto" */
.pcs-card-image[data-width="350px"][data-height="auto"] img {
    width: 350px !important;
    height: auto !important;
}

/* General rule to ensure images with fixed widths get proper sizing */
.pcs-card-image[data-width][data-height="auto"] img {
    height: auto !important;
}

/* Dynamic rules for specific width values */
.pcs-card-image[data-width="300px"] img {
    width: 300px !important;
}

.pcs-card-image[data-width="400px"] img {
    width: 400px !important;
}

.pcs-card-image[data-width="500px"] img {
    width: 500px !important;
}

/* This rule was causing issues - removed */

/* Exception for 100% width */
.pcs-card-image[style*="width: 100%"] img,
.pcs-card-image[style*="width:100%"] img {
    width: 100% !important;
    height: 100% !important;
}

/* Allow JavaScript to override width */
.pcs-card-image[style*="width"] {
    width: auto;
}

.pcs-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.pcs-card:hover .pcs-card-image img {
    transform: scale(1.05);
}

.pcs-card-content {
    padding: 0 40px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.pcs-card-content:first-child {
    padding-top: 20px;
}

.pcs-card-content:last-child {
    /*padding-bottom: 20px;*/
    margin-top: -70px;
    z-index: 99;
}

.pcs-card-title {
    font-size: 1.5rem;
    margin: 0 0 10px 0;
    color: #333;
}

.pcs-card-excerpt {
    color: #666;
    /*margin-bottom: 20px;*/
    flex-grow: 1;
}

.pcs-card-buttons {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

.pcs-card-buttons-top {
    margin-bottom: 15px;
}

.pcs-card-buttons-bottom {
    margin-top: 15px;
    margin-bottom: 0;
}

.pcs-card-buttons-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    z-index: 10;
    margin: 0;
}

.pcs-card-buttons-overlay-top {
    top: 10px;
}

.pcs-card-buttons-overlay-bottom {
    bottom: 10px;
    top: auto;
}

/* Overlay button styles */
.pcs-card-buttons-overlay .pcs-button {
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.pcs-card-image-wrapper {
    position: relative;
}

.pcs-button {
    display: inline-block;
    padding: 5px 10px;
    text-decoration: none;
    border-radius: 4px;
    /*font-weight: bold;*/
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
    flex: 1;
    font-size: 14px;
}

.pcs-button-primary {
    background: #007bff;
    color: white;
}

.pcs-button-primary:hover {
    background: #0056b3;
}

.pcs-button-secondary {
    background: transparent;
    color: #007bff;
    border: 2px solid #007bff;
}

.pcs-button-secondary:hover {
    background: #007bff;
    color: white;
}

/* Navigation Arrows */
.pcs-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #333;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.pcs-carousel-arrow:hover {
    background: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.pcs-prev-arrow {
    left: 10px;
}

.pcs-next-arrow {
    right: 10px;
}

/* Dots Navigation */
.pcs-carousel-dots {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 10px;
}

.pcs-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background 0.3s ease;
}

.pcs-dot.active {
    background: #007bff;
}

/* Responsive Design */
@media (max-width: 992px) {
    .pcs-card-buttons {
        flex-direction: row;
    }
}

@media (max-width: 768px) {
    .pcs-carousel-arrow {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .pcs-prev-arrow {
        left: 5px;
    }
    
    .pcs-next-arrow {
        right: 5px;
    }
}