/* Google Web Stories - Glassy / Glossy Design */

.f433-stories-container {
    width: 100%;
    margin-bottom: 2rem;
    position: relative;
    font-family: 'Inter', Roboto, sans-serif;
    padding: 0 16px;
    /* Match standard padding */
    box-sizing: border-box;
    max-width: 1050px;
    margin-left: auto;
    margin-right: auto;
}

.f433-stories-header {
    margin-bottom: 1rem;
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.f433-stories-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text, #ffffff);
    /* Fallback to white if var not defined */
    margin: 0;
}

/* --- Carousel Layout (Mobile First) --- */
.f433-stories-list.view-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding-bottom: 1rem;
    /* Space for shadow/hover if any left, or just spacing */
    /* Hide scrollbar */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE 10+ */
}

.f433-stories-list.view-carousel::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.f433-story-item {
    flex: 0 0 auto;
    width: 140px;
    /* Base width for mobile */
    aspect-ratio: 3/4;
    position: relative;
    box-sizing: border-box;
    /* Important for border */
    border-radius: 12px;
    overflow: hidden;
    scroll-snap-align: start;

    /* Modern Gradient Border (Blue -> Purple -> Pink) */
    background: linear-gradient(90deg, #FC466B 0%, #3F5EFB 100%) border-box;
    border: 2px solid transparent;

    /* Remove shadow and movement */
    box-shadow: none;
    transform: none;
    transition: none;
    /* Keep it still */
}

/* Desktop Styles */
@media (min-width: 768px) {
    .f433-story-item {
        width: 180px;
        border-radius: 16px;
    }
}

/* Ensure no movement on hover */
@media (hover: hover) {
    .f433-story-item:hover {
        transform: none;
        box-shadow: none;
        /* Optionally add brightness or opacity change if 'modern' implies some interactivity without movement */
        filter: brightness(1.1);
        transition: filter 0.2s ease;
    }
}

/* --- Grid Layout (Archive) --- */
.f433-stories-list.view-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 640px) {
    .f433-stories-list.view-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .f433-stories-list.view-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* --- Story Card Content --- */
.f433-story-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
    /* Ensure link content respects the border radius/overflow */
    border-radius: inherit;
}

.f433-story-image,
.f433-story-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Ensure image respects border radius if parent overflow doesn't catch it for some reason */
    border-radius: inherit;
}

/* Fallback background if image fails or loading */
.f433-story-image {
    background: #1a1a1a;
}

/* Glassmorphism Badge */
.f433-story-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 2;
}

.f433-story-badge svg {
    width: 14px;
    height: 14px;
    color: white;
    fill: currentColor;
}

/* Overlay & Text */
.f433-story-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 12px 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 1%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-sizing: border-box;
    border-bottom-left-radius: inherit;
    border-bottom-right-radius: inherit;
}

.f433-story-title-text {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    /* Limit lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    /* Standard property */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Utilities --- */
.f433-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}