/**
 * Lettings Posts Block Section Styles
 * 
 * @package ACF Child Theme
 */

/* ============================================
   Main Section Container
   ============================================ */
.lettings-posts-block-section {
    width: 100%;
    padding: 60px 0;
    background-color: #ffffff;
}

/* ============================================
   Container - WordPress Layout Width
   ============================================ */
.lpb-container {
    max-width: var(--theme-normal-container-max-width, 1290px);
    width: var(--theme-container-width, 100%);
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   Lettings Grid - 3 Columns
   ============================================ */
.lpb-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 30px;
    margin-bottom: 60px;
}

/* ============================================
   Lettings Card
   ============================================ */
.lpb-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 30px;
}

.lpb-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* ============================================
   Card Image
   ============================================ */
.lpb-card-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    position: relative;
    margin-bottom: 20px;
}

.lpb-card-image a {
    display: block;
    width: 100%;
    height: 100%;
}

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

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

/* ============================================
   Card Content
   ============================================ */
.lpb-card-content {
    padding: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Card Title */
.lpb-card-title {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 22px;
    line-height: 1.3;
    color: #252525;
    margin: 0 0 12px 0;
}

.lpb-card-title a {
    color: #252525;
    text-decoration: none;
    transition: color 0.3s ease;
}

.lpb-card-title a:hover {
    color: #006a3c;
}

/* Card Listing Type */
.lpb-card-listing-type {
    display: block;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #252525;
    margin-bottom: 15px;
}

/* Card Description */
.lpb-card-description {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.6;
    color: #252525;
    margin: 0 0 20px 0;
    flex: 1;
}

/* ============================================
   Read More Link
   ============================================ */
.lpb-read-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #006a3c;
    text-decoration: none;
    transition: color 0.3s;
    margin-top: auto;
}

.lpb-read-more:hover {
    color: #f7b119;
    gap: 15px;
}

.lpb-read-more-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.lpb-read-more-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.lpb-read-more-text {
    line-height: 1;
}

/* ============================================
   Pagination
   ============================================ */
.lpb-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 60px;
}

.lpb-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.lpb-pagination .page-numbers li {
    margin: 0;
    padding: 0;
}

.lpb-pagination a.page-numbers,
.lpb-pagination span.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 15px;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #252525;
    background-color: #f5f6f6;
    border: 2px solid transparent;
    text-decoration: none;
    transition: all 0.3s ease;
}

.lpb-pagination a.page-numbers:hover {
    background-color: #006a3c;
    color: #ffffff;
    border-color: #006a3c;
}

.lpb-pagination span.page-numbers.current {
    background-color: #006a3c;
    color: #ffffff;
    border-color: #006a3c;
}

.lpb-pagination .page-numbers.dots {
    background-color: transparent;
    border-color: transparent;
    pointer-events: none;
}

/* Previous/Next buttons */
.lpb-pagination a.prev,
.lpb-pagination a.next {
    background-color: #006a3c;
    color: #ffffff;
    border-color: #006a3c;
}

.lpb-pagination a.prev:hover,
.lpb-pagination a.next:hover {
    background-color: #004d2a;
    border-color: #004d2a;
}

/* ============================================
   Responsive Design
   ============================================ */

/* Tablet - 2 Columns */
@media (max-width: 1024px) {
    .lpb-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 35px 25px;
    }
    
    .lpb-card-image {
        height: 220px;
    }
    
    .lpb-card-content {
        padding: 25px 20px;
    }
    
    .lpb-card-title {
        font-size: 20px;
    }
}

/* Mobile - 1 Column */
@media (max-width: 768px) {
    .lettings-posts-block-section {
        padding: 40px 0;
    }
    
    .lpb-container {
        padding: 0;
    }
    
    .lpb-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-bottom: 40px;
    }
    
    .lpb-card-image {
        height: 200px;
    }
    
    .lpb-card-content {
        padding: 20px 18px;
    }
    
    .lpb-card-title {
        font-size: 18px;
    }
    
    .lpb-card-description {
        font-size: 14px;
    }
    
    .lpb-read-more {
        font-size: 15px;
    }
    
    /* Pagination adjustments */
    .lpb-pagination {
        margin-top: 40px;
    }
    
    .lpb-pagination a.page-numbers,
    .lpb-pagination span.page-numbers {
        min-width: 40px;
        height: 40px;
        padding: 0 12px;
        font-size: 14px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .lettings-posts-block-section {
        padding: 30px 0;
    }
    
    .lpb-card-image {
        height: 180px;
    }
    
    .lpb-pagination .page-numbers {
        gap: 5px;
    }
    
    .lpb-pagination a.page-numbers,
    .lpb-pagination span.page-numbers {
        min-width: 35px;
        height: 35px;
        padding: 0 10px;
        font-size: 13px;
    }
}

/* ============================================
   Editor Preview Adjustments
   ============================================ */
.block-editor-block-list__block .lettings-posts-block-section {
    padding: 40px 20px;
}

.block-editor-block-list__block .lpb-pagination {
    display: none;
}

/* ============================================
   Accessibility
   ============================================ */
.lpb-card:focus-within {
    outline: 2px solid #006a3c;
    outline-offset: 2px;
}

.lpb-read-more:focus {
    outline: 2px solid #006a3c;
    outline-offset: 2px;
}

.lpb-pagination a.page-numbers:focus {
    outline: 2px solid #006a3c;
    outline-offset: 2px;
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

