/* Recipe Category Slider v2.4 - Inline Images & Fixed Height */

.recipe-category-slider-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Header Section */
.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.slider-title {
    font-size: 38px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    flex: 1;
    min-width: 200px;
    color:#460E10;
    font-style: normal;
    font-weight: 700;
    line-height: 90%;
    letter-spacing: -0.03em;
    text-transform: capitalize;
    text-align: center;

}

.slider-controls {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-shrink: 0;
}
.slider-controls .slider-navigation{
    
    gap:24px;
    display: flex;
}
/* Base + visited color */
.view-all-link:link,
.view-all-link:visited{
  color:#460E10;
  text-decoration:none;
}

/* Layout + typography */
.view-all-link{
  display:inline-flex;              /* place text and arrow on one line */
  align-items:center;
  gap:12px;                         /* space before arrow */
  white-space:nowrap;
  font-family: "Founders Grotesk","Bricolage Grotesque",sans-serif;
  font-weight:500;
  font-size: 20px;
  line-height:1.5;
  transition:color .25s ease, transform .25s ease;
    
}

/* Arrow on the right (scales with font size) */
.view-all-link::after{
  content:"";
  width:10px;                      
  height:16px;
  fill:red;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 17' fill='none'%3E%3Cpath d='M2 15.5L9 8.5L2 1.5' stroke='%23460E10' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Optional: subtle hover nudge */
@media (prefers-reduced-motion: no-preference){
  .view-all-link:hover::after{ transform: translateX(3px); }
}

/* Optional: darker hover color */
.view-all-link:hover,
.view-all-link:focus{
  color:#2f0809;
  outline:none;
}


.slider-controls button{
    background-color: #111;
  border: medium none;
  color: #2f0809;
  padding: 0;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: inline-flex;
  text-align: center;
  justify-content: center;
  align-items: center;
  background-color: #FFF5E5;
}
.slider-controls button.slider-btn-prev svg{
    margin-left: -2px;
}
.slider-controls button.slider-btn-next svg{
    margin-left: 1px;
}
.slider-controls button svg{
    /*! width:10px; */
        
    height: 13px;
    margin-left: -2px;
}
.slider-controls button:hover{
    background: #f0decd;
}

.slider-arrows {
    display: flex;
    gap: 8px;
}

.slider-arrow {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #6c757d;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.slider-arrow:hover {
    background: #495057;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.slider-arrow:active {
    transform: translateY(0);
}

.slider-arrow:disabled {
    background: #dee2e6;
    color: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Swiper Container - Fixed Height */
.recipe-category-slider-wrapper .swiper {
    width: 100%;
    height: auto;
    min-height: 280px; /* Default minimum height */
    overflow: hidden;
    border-radius: 12px;
}

/* Dynamic height based on data attribute */
.recipe-category-slider-wrapper[data-slide-height="200"] .swiper { min-height: 200px; }
.recipe-category-slider-wrapper[data-slide-height="220"] .swiper { min-height: 220px; }
.recipe-category-slider-wrapper[data-slide-height="240"] .swiper { min-height: 240px; }
.recipe-category-slider-wrapper[data-slide-height="260"] .swiper { min-height: 260px; }
.recipe-category-slider-wrapper[data-slide-height="280"] .swiper { min-height: 280px; }
.recipe-category-slider-wrapper[data-slide-height="300"] .swiper { min-height: 300px; }
.recipe-category-slider-wrapper[data-slide-height="320"] .swiper { min-height: 320px; }
.recipe-category-slider-wrapper[data-slide-height="340"] .swiper { min-height: 340px; }
.recipe-category-slider-wrapper[data-slide-height="360"] .swiper { min-height: 360px; }
.recipe-category-slider-wrapper[data-slide-height="380"] .swiper { min-height: 380px; }
.recipe-category-slider-wrapper[data-slide-height="400"] .swiper { min-height: 400px; }
.recipe-category-slider-wrapper[data-slide-height="420"] .swiper { min-height: 420px; }
.recipe-category-slider-wrapper[data-slide-height="440"] .swiper { min-height: 440px; }
.recipe-category-slider-wrapper[data-slide-height="460"] .swiper { min-height: 460px; }
.recipe-category-slider-wrapper[data-slide-height="480"] .swiper { min-height: 480px; }
.recipe-category-slider-wrapper[data-slide-height="500"] .swiper { min-height: 500px; }

.recipe-category-slider-wrapper .swiper-wrapper {
    display: flex;
    align-items: stretch;
}

/* Individual Slide */
.recipe-category-slide {
    height: auto;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.slide-link {
    display: block;
    height: 100%;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.slide-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

/* Image Container with Fixed Height */
.slide-image-container {
    position: relative;
    width: 100%;
    /* height: 280px; */
    /* Default height */
    height: 100%;
    overflow: hidden;
    border-radius: 12px;
    background: #f8f9fa;
}

/* Dynamic height for image container */
.recipe-category-slider-wrapper[data-slide-height="200"] .slide-image-container { height: 200px; }
.recipe-category-slider-wrapper[data-slide-height="220"] .slide-image-container { height: 220px; }
.recipe-category-slider-wrapper[data-slide-height="240"] .slide-image-container { height: 240px; }
.recipe-category-slider-wrapper[data-slide-height="260"] .slide-image-container { height: 260px; }
.recipe-category-slider-wrapper[data-slide-height="280"] .slide-image-container { height: 280px; }
.recipe-category-slider-wrapper[data-slide-height="300"] .slide-image-container { height: 300px; }
.recipe-category-slider-wrapper[data-slide-height="320"] .slide-image-container { height: 320px; }
.recipe-category-slider-wrapper[data-slide-height="340"] .slide-image-container { height: 340px; }
.recipe-category-slider-wrapper[data-slide-height="360"] .slide-image-container { height: 360px; }
.recipe-category-slider-wrapper[data-slide-height="380"] .slide-image-container { height: 380px; }
.recipe-category-slider-wrapper[data-slide-height="400"] .slide-image-container { height: 400px; }
.recipe-category-slider-wrapper[data-slide-height="420"] .slide-image-container { height: 420px; }
.recipe-category-slider-wrapper[data-slide-height="440"] .slide-image-container { height: 440px; }
.recipe-category-slider-wrapper[data-slide-height="460"] .slide-image-container { height: 460px; }
.recipe-category-slider-wrapper[data-slide-height="480"] .slide-image-container { height: 480px; }
.recipe-category-slider-wrapper[data-slide-height="500"] .slide-image-container { height: 500px; }

/* Inline Image Styling */
.slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    display: block;
}

.slide-link:hover .slide-image {
    transform: scale(1.05);
}

/* Text Overlay with Absolute Positioning */
.slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 40px 20px 20px;
    color: white;
    z-index: 2;
}

.slide-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    
    font-family: Bricolage Grotesque;
font-weight: 700;
font-style: Bold;
font-size: 22px;
line-height: 120%;
letter-spacing: 0%;
text-align: center;
text-transform: uppercase;
color:#FFF5E5;
    max-width: 80%;
    display: flex;
    margin: 0 auto 4px auto;
}

/* Category-specific overlay colors */
.recipe-category-slide[data-category="breakfast"] .slide-overlay {
    background: linear-gradient(transparent, rgba(255, 193, 7, 0.9));
}

.recipe-category-slide[data-category="main"] .slide-overlay,
.recipe-category-slide[data-category="dinner"] .slide-overlay {
    background: linear-gradient(transparent, rgba(220, 53, 69, 0.9));
}

.recipe-category-slide[data-category="dessert"] .slide-overlay {
    background: linear-gradient(transparent, rgba(111, 66, 193, 0.9));
}

.recipe-category-slide[data-category="lunch"] .slide-overlay,
.recipe-category-slide[data-category="salad"] .slide-overlay {
    background: linear-gradient(transparent, rgba(40, 167, 69, 0.9));
}

.recipe-category-slide[data-category="appetizer"] .slide-overlay {
    background: linear-gradient(transparent, rgba(255, 87, 34, 0.9));
}

.recipe-category-slide[data-category="snack"] .slide-overlay {
    background: linear-gradient(transparent, rgba(156, 39, 176, 0.9));
}

.recipe-category-slide[data-category="beverage"] .slide-overlay {
    background: linear-gradient(transparent, rgba(0, 150, 136, 0.9));
}

.recipe-category-slide[data-category="soup"] .slide-overlay {
    background: linear-gradient(transparent, rgba(255, 152, 0, 0.9));
}

/* Loading State */
.slide-image[src=""], .slide-image:not([src]) {
    background: linear-gradient(45deg, #f0f0f0 25%, transparent 25%), 
                linear-gradient(-45deg, #f0f0f0 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #f0f0f0 75%), 
                linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    animation: loading 1s linear infinite;
}

@keyframes loading {
    0% { background-position: 0 0, 0 10px, 10px -10px, -10px 0px; }
    100% { background-position: 20px 20px, 20px 30px, 30px 10px, 10px 20px; }
}

/* Error State */
.slide-image[alt]:after {
    content: attr(alt);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
    display: none;
}

.slide-image[src=""]:after,
.slide-image:not([src]):after {
    display: block;
    content: "Image not available";
}

/* Responsive Design - Bootstrap 5 Breakpoints */

/* Extra Small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    .slider-title {
        font-size: 34px
    }
    
    .slider-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .slider-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .slide-title {
        font-size: 1rem;
    }
    
    .slide-overlay {
        padding: 30px 15px 15px;
    }
    
    .recipe-category-slider-wrapper .swiper {
        min-height: 240px;
    }
    
    .slide-image-container {
        height: 240px;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .slider-title {
        font-size: 36px;
        text-align: left;
    }
    
    .slide-title {
        font-size: 1.1rem;
    }
    
    .recipe-category-slider-wrapper .swiper {
        min-height: 260px;
    }
    
    .slide-image-container {
        height: 260px;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .slider-title {
        font-size: 38px;
        text-align: left;
    }
    
    .slide-title {
        font-size: 20px;
        text-align: center;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .slider-title {
        font-size: 42px;
        text-align: left;
    }
    
    .slide-title {
        font-size: 1.2rem;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .slider-title {
        font-size: 48px;
        text-align: left;
    }
    
    .slide-title {
        font-size: 1.25rem;
    }
}

/* Extra extra large devices (larger desktops, 1400px and up) */
@media (min-width: 1400px) {
    .slider-title {
        font-size: 48px;
        text-align: left;
    }
    
    .slide-title {
        font-size: 22px;
    }
}

/* Accessibility Improvements */
.slider-arrow:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.slide-link:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .slide-overlay {
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.9)) !important;
    }
    
    .slide-title {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 1);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .slide-link,
    .slide-image,
    .slider-arrow {
        transition: none;
    }
    
    .slide-link:hover {
        transform: none;
    }
    
    .slide-link:hover .slide-image {
        transform: none;
    }
}

/* Print styles */
@media print {
    .recipe-category-slider-wrapper {
        break-inside: avoid;
    }
    
    .slider-arrows {
        display: none;
    }
    
    .slide-link:hover {
        transform: none;
        box-shadow: none;
    }
}

/* Dark mode support */
/* @media (prefers-color-scheme: dark) {
    .slider-title {
        color: #f8f9fa;
    }
    
    .view-all-link {
        color: #ff6b6b;
    }
    
    .view-all-link:hover {
        color: #ff5252;
    }
} */

/* Custom Swiper overrides for better integration */
.recipe-category-slider-wrapper .swiper-slide {
    height: auto;
    display: flex;
}

.recipe-category-slider-wrapper .swiper-slide .slide-link {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Ensure consistent spacing */
.recipe-category-slider-wrapper .swiper-slide:not(:last-child) {
    margin-right: var(--swiper-space-between, 20px);
}

/* Loading animation for the entire slider */
.recipe-category-slider-wrapper.loading {
    opacity: 0.7;
    pointer-events: none;
}

.recipe-category-slider-wrapper.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #e74c3c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* Additional Slide Styles */
.slide-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 8px 0 0 0;
    line-height: 1.4;
    font-weight: 400;
}

.slide-placeholder-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 100%;
    height: 100%;
    position: relative;
}

/* Ensure slide images cover the container properly */
.slide-image-container .slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* Improve slide overlay positioning for slides with text */
.slide-overlay .slide-text {
    display: block;
    margin-top: 5px;
    display: none;
}

/* Responsive adjustments for slide text */
@media (max-width: 768px) {
    .slide-text {
        font-size: 0.8rem;
        line-height: 1.3;
    }
    
    .slide-title {
        font-size: 24px;
        margin: 0px auto 6% auto;
        text-align: center;
        justify-content: center;
        max-width: 70%;
    }
}

@media (max-width: 480px) {
    .slide-text {
        font-size: 0.75rem;
        margin-top: 3px;
    }
    
    .slide-title {
        font-size: 27px;
    }
}