/**
 * Recipes Archive Styles
 * Styling for [recipes] shortcode with 4-column grid layout
 * Consistent styling with products archive for brand cohesion
 */

/* Main Container - Uniform 1440px content width with minimal padding for better content width usage */
.handy-recipes-archive {
    max-width: 1440px;
    margin: 0 auto;
    padding: 20px 20px;
}

/* Filter Controls Removed: Now handled by unified filter system via [filter-recipes] shortcode */

/* Recipes Grid - 3 columns on desktop with standardized gap */
.handy-recipes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 30px;
    justify-content: center;
}

/* Recipe Cards - Match product styling consistency */
.recipe-card {
    background: white;
    border-radius: 60px;
    overflow: hidden;
    box-shadow: 10px 25px 0px #2329330F;
    margin-bottom: 60px;
}

.recipe-card:hover {
    
}

.recipe-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.recipe-card-link:hover {
    text-decoration: none;
    color: inherit;
}

/* Recipe Image Container */
.recipe-card-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.recipe-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recipe-card-image-placeholder {
    width: 100%;
    height: 100%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 1.125rem;
    font-weight: 500;
}

/* Category Icon - Removed per user feedback (not requested) */

/* Recipe Content */
.recipe-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.recipe-card-title {
    font-family: Poppins, sans-serif;
    margin: 0 0 12px 0;
    font-size: 1.625rem;
    font-weight: 700;
    letter-spacing: -0.82px;
    color: #0145AB;
    line-height: 1.2;
}

.recipe-card-description {
    font-family: Poppins, sans-serif;
    font-weight: 400;
    margin: 0 0 15px 0;
    line-height: 1.6;
    color: #3E434A;
    font-size: 1.125rem;
}

/* Recipe Meta (Prep Time & Servings) */
.recipe-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid #e9ecef;
    font-family: Poppins, sans-serif;
    position: relative;
}

.recipe-card-meta::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1px;
    height: 60%;
    background-color: #e9ecef;
}

.recipe-prep-time,
.recipe-servings {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 1rem;
    color: #6c757d;
}

.recipe-icon {
    font-size: 1.125rem;
    color: #0145AB;
}

.recipe-prep-time-text,
.recipe-servings-text {
    font-weight: 500;
    color: #3E434A;
}

/* Content truncation classes for JavaScript equalizer */
.recipe-card-title.title-truncated {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recipe-card-description.content-truncated {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

/* No Results - Match products styling */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    grid-column: 1 / -1; /* Span all columns */
}

.no-results p {
    font-size: 1.125rem;
    margin-bottom: 20px;
}

.btn-clear-filters {
    background: #6c757d;
    color: #FFFFFF;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    font-family: Poppins, sans-serif;
    font-weight: 600;
}

.btn-clear-filters:hover {
    background: #5a6268;
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    grid-column: 1 / -1; /* Span all columns */
}

/* Responsive Design - Match products responsive behavior */

/* Large Desktop and up: 1800px+ (maintains 3-column layout) */
@media (min-width: 1800px) {
    .handy-recipes-grid {
        /* Keep 3-column layout on very large screens */
    }
}

/* Tablet: 1600px and below - adjust for standardized card layout */
@media (max-width: 1600px) {
    .handy-recipes-archive {
        padding: 15px 40px;
    }
    
    .handy-recipes-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 35px;
        max-width: 100%;
    }
}

/* Medium Tablet: 1200px and below */
@media (max-width: 1200px) {
    .handy-recipes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .recipe-card-title {
        font-size: 2rem;
    }
    
    .recipe-card-content {
        padding: 15px;
    }
}

/* Mobile: 549px and below */
@media (max-width: 549px) {
    .handy-recipes-archive {
        padding: 10px 20px;
    }
    
    .handy-recipes-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }
    
    .recipe-card-image-container {
        height: 120px;
    }
    
    .recipe-card-content {
        padding: 15px;
    }
    
    .recipe-card-title {
        font-size: 1.5rem;
    }
    
    .recipe-card-description {
        font-size: 1rem;
    }
    
    .recipe-card-meta {
        font-size: 0.875rem;
    }
    
    .recipe-icon {
        font-size: 1rem;
    }
}

/* ==========================================================================
   Pagination Styles - Centered under middle column
   ========================================================================== */

/* Main pagination container - matches site's 1440px standard with centered layout */
.handy-pagination {
    max-width: 1440px;
    margin: 40px auto 20px auto;
    padding: 0 20px;
}

.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Base styling for all pagination elements */
.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 10px 16px;
    background: white;
    color: #3E434A;
    text-decoration: none;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-family: Poppins, sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(35, 41, 51, 0.06);
}

/* Hover effects for interactive elements */
.page-numbers:hover {
    background: #f8f9fa;
    border-color: #0145AB;
    color: #0145AB;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(35, 41, 51, 0.1);
}

/* Current page highlighting */
.page-numbers.current {
    background: #0145AB;
    color: white;
    border-color: #0145AB;
    cursor: default;
    transform: none;
    box-shadow: 0 2px 8px rgba(1, 69, 171, 0.3);
}

.page-numbers.current:hover {
    background: #0145AB;
    color: white;
    transform: none;
}

/* Previous and Next buttons - wider for better UX */
.prev-button.page-numbers,
.next-button.page-numbers {
    min-width: auto;
    padding: 10px 20px;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.prev-button.page-numbers:hover,
.next-button.page-numbers:hover {
    background: #0145AB;
    color: white;
    border-color: #0145AB;
}

/* Dots/ellipsis styling */
.page-numbers.dots {
    background: transparent;
    border: none;
    color: #6c757d;
    cursor: default;
    box-shadow: none;
    font-weight: 700;
    font-size: 1rem;
}

.page-numbers.dots:hover {
    background: transparent;
    color: #6c757d;
    transform: none;
    box-shadow: none;
}

/* Focus states for accessibility */
.page-numbers:focus {
    outline: 2px solid #0145AB;
    outline-offset: 2px;
}

/* Active/pressed state */
.page-numbers:active:not(.current):not(.dots) {
    transform: translateY(0);
    background: #e9ecef;
}

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

/* Tablet: 1600px and below */
@media (max-width: 1600px) {
    .handy-pagination {
        padding: 0 40px;
        margin: 35px auto 15px auto;
    }
}

/* Medium screens: 1200px and below */
@media (max-width: 1200px) {
    .pagination-container {
        gap: 6px;
    }
    
    .page-numbers {
        min-width: 40px;
        height: 40px;
        padding: 8px 12px;
        font-size: 0.813rem;
    }
    
    .prev-button.page-numbers,
    .next-button.page-numbers {
        padding: 8px 16px;
    }
}

/* Mobile: 549px and below */
@media (max-width: 549px) {
    .handy-pagination {
        padding: 0 20px;
        margin: 30px auto 10px auto;
    }
    
    .pagination-container {
        gap: 4px;
    }
    
    .page-numbers {
        min-width: 36px;
        height: 36px;
        padding: 6px 10px;
        font-size: 0.75rem;
        border-radius: 6px;
    }
    
    .prev-button.page-numbers,
    .next-button.page-numbers {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
    
    /* Hide some page numbers on very small screens to prevent overflow */
    .pagination-container {
        justify-content: center;
    }
}