.recent-stories-section {
    margin-bottom: 3rem;
}

.stories-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.recent-stories-section h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
    text-align: center;
}

.view-all-stories-link {
    font-size: 0.9rem;
    color: #888;
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
}

.view-all-stories-link:hover {
    color: #feaf50;
    text-decoration: none;
}

/* Container and scroll setup */
.stories-container {
    position: relative;
    width: 100%;
}

.stories-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 60px;
}

.stories-scroll::-webkit-scrollbar {
    display: none;
}

/* Scroll arrows */
.stories-container .scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stories-container .scroll-left {
    left: 10px;
}

.stories-container .scroll-right {
    right: 10px;
}

.stories-container .scroll-arrow:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

/* Story cards */
.story-card {
    flex: 0 0 auto;
    width: 500px;
    height: 375px; /* 4:3 ratio */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease-in-out;
}

/* Darkening overlay on the background image */
.story-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
    transition: background 0.3s ease;
}

.story-card:hover .story-overlay {
    background: rgba(0, 0, 0, 0.65);
}

.story-card:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    color: inherit;
}

/* Card content layout - centralized */
.story-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

/* Text content box with glassmorphism */
.story-text-box {
    background: rgba(40, 40, 40, 0.4);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

.story-text-box h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    line-height: 1.3;
}

.story-text-box p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.read-button {
    background: var(--accent-color, #feaf50);
    color: #000;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    display: inline-block;
    pointer-events: none;
    margin-top: 8px;
}

.story-card:hover .read-button {
    background: #ff9f30;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(254, 175, 80, 0.4);
}

/* No stories message */
.no-stories {
    width: 100%;
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.6);
}

.no-stories p {
    font-size: 1rem;
    margin: 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .recent-stories-section h2 {
        font-size: 1.5rem;
    }

    .stories-scroll {
        padding: 0 20px;
    }

    .stories-container .scroll-arrow {
        display: none;
    }

    .story-card {
        width: 350px;
        height: 262px;
    }

    .story-content {
        padding: 20px;
    }

    .story-text-box {
        padding: 24px;
        gap: 12px;
    }

    .story-text-box h3 {
        font-size: 1.2rem;
    }

    .story-text-box p {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }

    .read-button {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .story-card {
        width: 300px;
        height: 225px;
    }

    .story-content {
        padding: 16px;
    }

    .story-text-box {
        padding: 20px;
        gap: 10px;
    }

    .story-text-box h3 {
        font-size: 1.1rem;
        line-height: 1.2;
    }

    .story-text-box p {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
    }

    .read-button {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
}
