/**
 * Posts Slider Block Styles - Swiper.js Integration
 * Matches the exact design from the provided HTML/CSS example
 */

.posts-slider-swiper {
    max-width: 100%;
    overflow: hidden;
    margin: 0 auto;
    padding-top: 50px;
    padding-bottom: 50px
    ;
     }

/* Header */
.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    
}

.slider-title {
    font-size: 24px;
    font-weight: 600;
    color: #00578d;
    margin: 0;
}

.slider-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.nav-button {
    width: 30px!important;
    height: 30px!important;
    border: 1px solid #d1d5db;
    font-size: 18px!important;
    border-radius: 50%;
    background: white;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
    position: static !important;
    margin: 0 !important;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    padding: 0 !important;
    font-weight: normal!important;
}
.swiper-button-prev{
    margin-right: 20px!important;
}
.nav-button svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    pointer-events: none;
    display: block;
    font-weight: bold;
}

.nav-button:hover {
    background: #f9fafb;
    color: #374151;
}

.nav-button:disabled,
.nav-button.swiper-button-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    background: #f3f4f6;
    border-color: #e5e7eb;
}

.nav-button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.nav-button:active {
    transform: scale(0.95);
}

.view-all-btn {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.view-all-btn:hover {
    text-decoration: none;
}

/* Swiper Container */
.posts-slider-swiper .swiper {

    overflow: visible;
}

.posts-slider-swiper .swiper-wrapper {
    align-items: stretch;
}

.posts-slider-swiper .swiper-slide {
    height: auto;
    display: flex;
}

/* Cards */
.card {
    width: 100%;

    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    border:1px solid #0000001a;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-header {
    position: relative;
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
}

.card-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.new-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #d3f1ff;
    color: #343434;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

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

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.card-description {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 16px 0;
    flex-grow: 1;
    margin-bottom: 8px!important;
}


.data-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
   
}

.data-meta-left {
    display: flex;
    align-items: center;
}

.data-meta-date {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.data-meta-date svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.data-meta-right {
    display: flex;
    align-items: center;
}

.data-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    color: #343434;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid #e3e3e3;
    font-size: 14px;
    font-weight: 500;
    
}

.data-view-btn:hover {    
    color: #343434;
    text-decoration: none;
   
}

.data-view-btn svg {
    width: 16px;
    height: 16px;
   
}

.view-all-btn {
    padding: 10px 15px;
    color: #00578d;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid #e3e3e3;
    font-size: 14px;
    font-weight: 500;
    
}

.view-all-btn:hover {
    text-decoration: none;
}

/* Swiper Pagination */
.posts-slider-swiper .swiper-pagination {
    position: static;
    margin-top: 24px;
    text-align: center;
}

.posts-slider-swiper .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #d1d5db;
    opacity: 1;
    margin: 0 4px;
    transition: background-color 0.2s ease;
}

.posts-slider-swiper .swiper-pagination-bullet-active {
    background: #3b82f6;
}

/* Hide default Swiper navigation */
.posts-slider-swiper .swiper-button-next:not(.nav-button),
.posts-slider-swiper .swiper-button-prev:not(.nav-button) {
    display: none !important;
}

/* Ensure our custom navigation buttons are visible */
.posts-slider-swiper .nav-button {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Force visibility for navigation buttons */
.slider-controls .nav-button {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 100 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .slider-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
       
    }
    
    .slider-controls {
        justify-content: space-between;
    }
    
  
    
    
    
    .nav-button {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .slider-title {
        font-size: 20px;
    }
    
    .card-header {
        height: 180px;
    }
    
    .card-content {
        padding: 12px;
    }
    
    .card-title {
        font-size: 15px;
        margin-bottom: 8px!important;
    }
    
    .card-description {
        font-size: 12px;
        margin-bottom: 12px!important;

    }
    
    .card-footer {
        
        gap: 8px;
        align-items: flex-start;
    }
    
    .card-view {
        align-self: flex-end;
    }
}

/* Navigation buttons spacing handled by parent gap */

.swiper-button-next:after, .swiper-button-prev:after {
    display: none;
}