/* Base styles for mobile first */

.preapproved-designs {
    background-color: #F0F3F7;
    padding: 60px 0;
}

.preapproved-designs-content {
    max-width: 1150px;
    margin: 0 auto;
    text-align: center;
    padding: 0 20px;
}

.preapproved-designs-content h2 {
    font-size: 18px;
    color: #2d3a5b;
    margin-bottom: 24px;
    font-weight: 600;
    font-weight: 500;
}

.slick-initialized .slick-slide {
    margin: 0 10px;
}

.preapproved-designs-content p {
    text-align: center;
    font-size: 16px;
    line-height: 36px;
    color: #4a5568;
    margin-bottom: 16px;
}

/* Tabs */
.tab-buttons {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    margin: 32px 0;
    flex-wrap: wrap;
    overflow-x: auto;
    padding-bottom: 16px;
    padding-left: 20px;
    padding-right: 20px;
}

.tab {
    width: 100%;
    padding: 8px 16px;
    border: 2px solid #2d3a5b;
    border-radius: 50px;
    background: transparent;
    color: #2d3a5b;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab:hover,
.tab.is-active {
    background: #2d3a5b;
    color: white;
}

/* Carousel Section */
.resource-carousel {
    background: #CFD5DD;
    border-radius: 16px;
    padding: 16px;
    margin-top: 32px;
    display: none;
}

.resource-carousel.is-active {
    display: block;
}

.carousel-header {
    text-align: center;
    margin-bottom: 32px;
}


.carousel-header .title {
    font-size: 20px;
    margin-bottom: 20px;
    display: block;
    font-weight: 600;
    color: #4a5568;
}

.sqft {
    font-size: 24px;
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

.details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #4a5568;
}

/* Icons */
.icon-bed::before,
.icon-bath::before,
.icon-location::before {
    margin-right: 8px;
}

.icon-bed::before { content: "🛏️"; }
.icon-bath::before { content: "🛁"; }
.icon-location::before { content: "📍"; }

/* Slick Carousel Customization */
.carousel-cards {
    margin: 0 -10px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.carousel-cards.slick-initialized {
    opacity: 1;
    visibility: visible;
}

.resource-card {
    padding: 10px;
}

.card-image {
    height: 120px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
}

.card-image video {
    width: 100%;
    height: 100%;
}

.card-image svg {
    width: 100%;
    height: 100%;
    background: #fff;
    padding: 30px;
}

.hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(45, 58, 91, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.resource-card:hover .hover-overlay {
    opacity: 1;
}

.card-label {
    padding: 16px;
    display: block;
    text-align: left;
    font-weight: 500;
}


/* Remove the dots styles and add progress bar styles */
.slick-dots {
    display: none !important;
}

/* Progress Bar Container */
.carousel-progress {
    width: 60%;
    height: 4px;
    background: #E2E8F0;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

/* Progress Bar Active State */
.carousel-progress-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: #314B70;
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Smooth transition for slides */
.slick-slide {
    transition: transform 0.3s ease;
}

/* Fix for infinite slider clone issues */
.slick-slide.slick-cloned {
    visibility: visible !important;
}

/* Carousel Navigation */
.carousel-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 32px 0;
    padding: 0 20px;
}

.global-prev,
.global-next {
    width: 40px;
    height: 40px;
    z-index: 1;
    transition: opacity 0.3s ease;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    background: transparent;
}

/* Progress Bar Container */
.carousel-progress.global-progress {
    width: 80%;
    height: 4px;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

/* Progress Bar Active State */
.carousel-progress-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: #314B70;
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Hide individual carousel navigation */
.carousel-cards .slick-arrow,
.resource-carousel .carousel-progress {
    display: none !important;
}

/* Responsive Design - Mobile First */
/* Tablet (481px and up) */
@media (min-width: 481px) {
    .card-image {
        height: 160px;
    }
}

/* Medium tablets (768px and up) */
@media (min-width: 768px) {

    .preapproved-designs-content h2 {
        font-size: 24px;
    }

    .preapproved-designs-content p {
        font-size: 18px;
    }

    .tab-buttons {
        justify-content: center;
        gap: 16px;
    }

    .tab {
        padding: 12px 24px;
        font-size: 16px;
    }

    .resource-carousel {
        padding: 32px;
    }

    .details {
        flex-direction: row;
        justify-content: center;
        gap: 0;
    }

    .details span {
        padding-left: 16px;
    }

    .details span:first-child {
        padding-left: 0;
    }

    .details span::after {
        content: "|";
        margin-left: 16px;
        color: #4a5568;
    }

    .details span:last-child::after {
        display: none;
    }

    .sqft {
        font-size: 28px;
    }

    .carousel-navigation {
        gap: 32px;
    }
}

/* Desktop (1024px and up) */
@media (min-width: 1024px) {
    .tab {
        width: auto;
    }

    .card-image {
        height: 200px;
    }

    .carousel-progress {
        width: 60%;
    }
}

@media (min-width: 1200px) {
    .preapproved-designs {
        padding: 100px 0;
    }

    .preapproved-designs-content h2 {
        font-size: 52px;
        letter-spacing: 1px;
    }
}

/* Card link styles */
.resource-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Lightbox trigger styles */
.lightbox-trigger {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    width: 100%;
}
