/* ================================================
   SERVICES CAROUSEL STYLES
   ================================================ */

.layout-services-carousel {
    overflow: visible;
}

.layout-services-carousel .content-wrapper {
    overflow: visible;
}

.layout-services-carousel .wrap,
.layout-services-carousel .wrap-wide,
.layout-services-carousel .wrap-narrow {
    overflow: visible;
}

.layout-services-carousel .section-col {
    overflow: visible;
}

.services-carousel-container {
    position: relative;
    overflow: visible;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.services-carousel-nav {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 1.5rem;
    pointer-events: none;
}

.services-carousel-nav .services-carousel-nav__btn {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    margin: 0;
    border: 2px solid var(--navy, #001f3f);
    border-radius: 999px;
    background: var(--bumblebee, #f9c365);
    color: var(--navy, #001f3f);
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.services-carousel-nav .services-carousel-nav__btn:hover,
.services-carousel-nav .services-carousel-nav__btn:focus-visible {
    background: var(--lemon, #f8e6a8);
    outline: none;
}

.services-carousel-nav .services-carousel-nav__btn.slick-disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.services-carousel-nav .services-carousel-nav__icon {
    display: block;
    width: 14px;
    height: 14px;
    background: currentColor;
    -webkit-mask: url(/wp-content/themes/coastshelter/svg/link-arrow.svg) center / contain no-repeat;
    mask: url(/wp-content/themes/coastshelter/svg/link-arrow.svg) center / contain no-repeat;
}

/* link-arrow.svg points ↗ at 0° — rotate to ← and → */
.services-carousel-nav .services-carousel-nav__btn--prev .services-carousel-nav__icon {
    transform: rotate(225deg);
}

.services-carousel-nav .services-carousel-nav__btn--next .services-carousel-nav__icon {
    transform: rotate(45deg);
}

.services-carousel-nav .services-carousel-nav__btn::before {
    display: none;
}

.services-carousel {
    position: relative;
    width: 125% !important;
}

.services-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    right: -120px;
    width: 120px;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.8));
    pointer-events: none;
    z-index: 10;
}

.services-carousel .carousel-item {
    padding: 0 20px 0 0;
}

/* Slick slider overrides */
.services-carousel.slick-initialized .carousel-item {
    display: block;
}

.services-carousel .slick-track {
    display: flex;
    align-items: stretch;
    margin-left: 0 !important;
}

.services-carousel .slick-slide {
    height: auto;
    display: flex !important;
}

.services-carousel .carousel-item {
    display: flex !important;
}

.services-carousel .carousel-item-link {
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
}

.carousel-item {
    flex: 0 0 auto;
    box-sizing: border-box;
}

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

.carousel-item-content {
    background: rgba(255, 255, 255, 0.95);
    /* Default white - overridden by color scheme classes */
    border-radius: 6px;
    padding: 24px;
    margin: 200px 24px 24px 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Color Scheme Support - 95% opacity */
.carousel-item-content.clrs-white {
    background: rgba(255, 255, 255, 0.95) !important;
}

.carousel-item-content.clrs-lemon {
    background: rgba(248, 230, 168, 0.95) !important;
}

/* SERVICES CAROUSEL - Background image support */
.services-carousel .carousel-item {
    position: relative;
    overflow: hidden;
}

.services-carousel .carousel-item-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    border-radius: 12px;
}

.services-carousel .carousel-item-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 0;
    border-radius: 12px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.services-carousel .carousel-item-background:hover::after {
    opacity: 1;
}

.services-carousel .carousel-item-link {
    position: relative;
    z-index: 1;
}

.services-carousel .carousel-item-content {
    position: relative;
}

/* Disable opacity changes on carousel hover */
.services-carousel .carousel-item-link:hover {
    opacity: 1 !important;
}

.carousel-item-icon {
    margin-bottom: 1.5rem;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #2c3e50;
}

.carousel-item-icon img {
    max-width: 50px;
    max-height: 50px;
    width: auto;
    height: auto;
}

.carousel-item-title {
    margin-bottom: 1rem;
}

.carousel-item-description {
    flex: 1;
}

.carousel-item-button {
    margin-top: auto;
}

.carousel-item-button .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 2px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

/* ================================================
   RESPONSIVE STYLES
   ================================================ */

/* Stacked layout for services carousel below 1200px */









@media (max-width: 1199px) {

    .services-carousel-nav {
        display: none !important;
    }

    .services-carousel {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .services-carousel .carousel-item {
        padding: 0 0 20px 0;
        width: 100% !important;
        flex: none !important;
    }

    .services-carousel::after {
        display: none;
    }

    .services-stacked .slick-track,
    .services-stacked .slick-slide {
        display: block !important;
        width: 100% !important;
    }
}

/* Mobile: 2 items with bleeding */
@media (max-width: 479px) {
    .services-carousel {
        width: calc(100% + 80px);
    }

    .services-carousel::after {
        right: -80px;
        width: 80px;
    }
}

/* Tablet: 3 items with bleeding */
@media (min-width: 480px) and (max-width: 767px) {
    .services-carousel {
        width: calc(100% + 100px);
    }

    .services-carousel::after {
        right: -100px;
        width: 100px;
    }
}

/* 2-column layout for tablet (768px - 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
    .services-carousel {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 20px !important;
        align-items: stretch !important;
        display: flex !important;
    }

    .services-carousel .carousel-item {
        width: calc(50% - 10px) !important;
        padding: 0 !important;
        display: flex !important;
        flex: 1 1 auto !important;
    }

    .services-carousel .carousel-item-link {
        display: flex !important;
        width: 100% !important;
        flex: 1 1 auto !important;
    }

    /*.services-carousel .carousel-item .carousel-item-content {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        justify-content: space-between !important;
        min-height: 100% !important;
        flex: 1 1 auto !important;
        align-items: flex-start !important;
        text-align: left !important;
    }*/
}

/* Desktop: 4 items with bleeding */
@media (min-width: 768px) {
    .services-carousel {
        width: calc(100% + 120px);
    }
}


@media (min-width: 992px) {
    .carousel-item-content {
        margin: 300px 24px 24px 24px;
    }

}

/* Carousel equal heights - only for 1200px+ */
@media (min-width: 1200px) {
    .services-carousel .carousel-item {
        height: 100% !important;
    }
}