.carousel-component {
    position: relative;
    width: 100%;
    border-radius: 32px;
    min-height: 400px;
    aspect-ratio: 16 / 9;
    margin: 60px 0;
    overflow: hidden;
    background: #f5f5f7;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

@media (max-width: 1024px) {
    .carousel-component {
        margin: 48px 0;
    }
}

@media (max-width: 900px) {
    .carousel-component {
        border-radius: 16px;
        width: 100%;
        position: relative;
        left: 0;
        right: 0;
        margin: 1.5rem auto;
        min-height: 250px;
        max-width: none;
        aspect-ratio: 16 / 9;
    }

    /* Visual tweaks for large mode on mobile */
    .carousel-component.large-mode {
        border-radius: 0;
        margin: 0;
        height: 40vh;
        min-height: 250px;
    }

    /* Apply the full-bleed breakout only if not already alignfull */
    .carousel-component.large-mode:not(.alignfull) {
        width: 100vw;
        left: 50%;
        margin-left: -50vw !important;
        box-sizing: border-box;
        max-width: 100vw;
    }

    .carousel-prev, .carousel-next {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    .carousel-prev { left: 12px; }
    .carousel-next { right: 12px; }
}

@media (max-width: 480px) {
    .carousel-component {
        aspect-ratio: 1 / 1;
        min-height: 200px;
    }
    
    .carousel-component.large-mode {
        aspect-ratio: unset;
        height: 40vh;
    }
}

.carousel-component.large-mode {
    /* Visual tweaks for large mode on all sizes */
    border-radius: 0;
    aspect-ratio: unset;
    height: 60vh;
    min-height: 400px;
    max-height: none;
    margin-top: 0;
    margin-bottom: 0;
}

/* Apply the full-bleed breakout only when the element is NOT already using an alignfull utility */
.carousel-component.large-mode:not(.alignfull) {
    width: 100vw;
    position: relative;
    left: 50%;
    margin-left: -50vw;
    box-sizing: border-box;
    max-width: 100vw;
}

.carousel-inner {
    display: flex;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    width: auto;
}

.carousel-slide {
    width: 100%;
    min-width: 100%;
    flex-shrink: 0;
    height: 100%;
    transition: opacity 0.5s ease-in-out;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev:active,
.carousel-next:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-prev { left: 25px; }
.carousel-next { right: 25px; }


/* Stories Block Specifics */
.stories-block-component {
    background: transparent;
    margin: 60px 0;
    width: 100%;
    box-sizing: border-box;
}

.stories-block-component.is-skeleton {
    --stories-skeleton-base: rgba(103, 152, 173, 0.10);
    --stories-skeleton-highlight: rgba(255, 255, 255, 0.72);
}

.stories-block-header {
    width: 100%;
    margin-bottom: 20px;
}

.stories-block-eyebrow {
    margin: 0 0 18px;
    color: var(--brand-blue, #3c8dc7);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.stories-block-title {
    margin: 0;
    color: #365072;
    font-size: 52px;
    font-weight: 600;
    line-height: 1.1;
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px;
    width: 100%;
    padding: 0;
    box-sizing: border-box;
}

.story-card-wrapper {
    display: flex;
}

.story-card {
    background: #ffffff;
    border-radius: 0 0 32px 32px;
    display: flex;
    flex-direction: column;
    width: 100%;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.story-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.1);
    border-color: rgba(0,0,0,0.1);
}

.story-card-skeleton {
    pointer-events: none;
}

.story-card-skeleton-wrapper,
.story-card-skeleton {
    width: 100%;
}

.story-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    margin-bottom: 0;
    border-radius: 0;
    overflow: hidden;
    flex-shrink: 0;
}

.story-image.placeholder-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fbfbfd;
}

.story-image.placeholder-image::after {
    content: "📖";
    font-size: 48px;
    opacity: 0.3;
}

.stories-block-component.is-skeleton .skeleton-block,
.stories-block-component.is-skeleton .story-skeleton-line {
    position: relative;
    overflow: hidden;
    background: var(--stories-skeleton-base);
}

.stories-block-component.is-skeleton .skeleton-block::after,
.stories-block-component.is-skeleton .story-skeleton-line::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, var(--stories-skeleton-highlight), transparent);
    animation: stories-skeleton-shimmer 1.35s ease-in-out infinite;
}

.stories-block-component.is-skeleton .story-skeleton-line {
    height: 14px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.stories-block-component.is-skeleton .story-skeleton-line-title {
    height: 24px;
    width: 72%;
    margin-bottom: 20px;
}

.stories-block-component.is-skeleton .story-skeleton-line-short {
    width: 58%;
}

.stories-block-component.is-skeleton .story-skeleton-line-cta {
    width: 34%;
    margin-top: 28px;
    margin-bottom: 0;
}

.stories-block-component.is-skeleton.is-load-error .story-skeleton-line,
.stories-block-component.is-skeleton.is-load-error .skeleton-block {
    opacity: 0.55;
}

.stories-load-error {
    margin: 20px 0 0;
    color: #7a5c5c;
    font-size: 0.95rem;
}

.story-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.story-card:hover .story-image img {
    transform: scale(1.08);
}

.story-content {
    padding: 32px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.story-title {
    font-size: 26px;
    line-height: 1.2;
    margin: 0 0 16px 0;
    color: #1d1d1f;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.story-excerpt {
    font-size: 18px;
    line-height: 1.55;
    color: #424245;
    font-weight: 400;
}

.story-excerpt p {
    margin: 0;
}

.story-read-more {
    margin-top: auto;
    padding-top: 24px;
    font-size: 16px;
    font-weight: 600;
    color: var(--brand-blue, #3c8dc7);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.story-read-more::after {
    content: "→";
    font-size: 18px;
    transition: transform 0.3s ease;
}

.story-card:hover .story-read-more {
    gap: 12px;
}

.story-card:hover .story-read-more::after {
    transform: translateX(4px);
}

@keyframes stories-skeleton-shimmer {
    100% {
        transform: translateX(100%);
    }
}

@media (max-width: 1024px) {
    .stories-grid {
        gap: 30px;
    }
    .story-title {
        font-size: 22px;
    }
}

#user-stories {
    padding: 80px 0 100px;
    margin-top: 0;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(103, 152, 173, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(60, 141, 199, 0.05) 0%, transparent 40%),
        linear-gradient(180deg, #f8fbfc 0%, #ffffff 100%);
    border-radius: 32px;
}

#user-stories .stories-block-header {
    margin-bottom: 48px;
    text-align: center;
}

#user-stories .stories-block-eyebrow {
    margin-bottom: 12px;
}

#user-stories .stories-block-title {
    font-size: clamp(2.4rem, 4.5vw, 3.6rem);
    color: var(--text-primary, #1d1d1f);
    letter-spacing: -0.03em;
}

#user-stories .stories-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

#user-stories .story-card {
    border-radius: 0 0 24px 24px;
    border: 1px solid rgba(103, 152, 173, 0.1);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.03),
        0 12px 40px rgba(103, 152, 173, 0.06);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#user-stories .story-card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.06),
        0 32px 64px rgba(103, 152, 173, 0.12);
    border-color: rgba(103, 152, 173, 0.18);
}

#user-stories .story-image {
    aspect-ratio: 16 / 9;
}

#user-stories .story-title {
    font-size: 22px;
    letter-spacing: -0.02em;
}

#user-stories .story-excerpt {
    font-size: 15px;
    color: var(--text-secondary, #86868b);
    line-height: 1.6;
}

@media (max-width: 1200px) {
    #user-stories .stories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }
}

@media (max-width: 768px) {
    #user-stories {
        padding: 48px 0 64px;
    }

    #user-stories .stories-block-header {
        margin-bottom: 32px;
    }

    #user-stories .stories-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    #user-stories .story-card {
        border-radius: 0 0 20px 20px;
    }
}

@media (min-width: 1400px) {
    #user-stories .stories-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .stories-block-component {
        margin: 40px 0;
    }
    .stories-block-header {
        margin-bottom: 16px;
    }
    .stories-block-title {
        font-size: clamp(1.8rem, 7vw, 2.4rem);
    }
    .stories-block-eyebrow {
        margin-bottom: 14px;
    }
    .stories-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .story-card {
        border-radius: 0 0 24px 24px;
    }
    .story-content {
        padding: 24px;
    }
    .story-excerpt {
        font-size: 16px;
    }
    .story-title {
        font-size: 20px;
        margin-bottom: 12px;
    }
    .story-image {
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 480px) {
    .story-card {
        border-radius: 0 0 20px 20px;
    }
    .story-content {
        padding: 20px;
    }
    .story-read-more {
        padding-top: 20px;
    }
}
