:root{
--primary-color: #bf023f;
--light-primary-color: #e3055a;
}

.web-stories-section {
background-color: #fff;
padding: 50px 0;
}

.web-stories-title {
color: var(--primary-color);
font-size: 3.5rem;
font-weight: 700;
margin-bottom: 10px;
}

.web-stories-subtitle {
margin-bottom: 20px;
color: #333;
}

.web-stories-description {
color: #666;
font-size: 1.2rem;
}

.stories-container {
margin-top: 30px;
}

.story-card {
position: relative;
border-radius: 6px;
overflow: hidden;
margin-bottom: 10px; /* Reduced to make room for category tags */
cursor: pointer;
height: 550px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
transition: transform 0.3s ease;
}

.story-card:hover {
transform: translateY(-5px);
}

.story-img-container {
position: relative;
height: 100%;
width: 100%;
overflow: hidden;
}

.story-img {
width: 100%;
height: 100%;
object-fit: cover;
}

.story-title {
position: absolute;
bottom: 0;
left: 0;
right: 0;
padding: 15px;
background: linear-gradient(to top, rgba(0, 0, 0, 1.85), rgba(0, 0, 0, 0.8) 30%, transparent);
color: white;
font-size: 1.1rem;
line-height: 1.4;
}

/* Category tags styling below cards */
.category-tag {
font-size: 0.75rem;
font-weight: 500;
margin-bottom: 15px;
color: #666;

}

.category-tag .featured {
color: #666;
}

.category-tag .bullet {
margin: 0 5px;
color: #666;
}

.category-tag .category {
color: #666;
}

/* Blue side border styling - only visible on hover */
.side-border {
position: absolute;
top: 0;
right: 0;
bottom: 0;
width: 8px;
background-color: #419BF9;
opacity: 0;
transition: opacity 0.3s ease;
}

.story-card:hover .side-border {
opacity: 1;
}

/* Play button styling - only visible on hover */
.play-button {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 60px;
height: 60px;
background-color: rgba(255, 255, 255, 0.8);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
opacity: 0;
transition: opacity 0.3s ease;
}

.story-card:hover .play-button {
opacity: 1;
}

.play-triangle {
width: 0;
height: 0;
border-top: 12px solid transparent;
border-bottom: 12px solid transparent;
border-left: 20px solid #333;
margin-left: 5px; /* Slight adjustment for visual center */
}

.showcase-mobile {
position: relative;
text-align: center;
}

.phone-mockup {
max-width: 100%;
height: auto;
}

/* Layout Controls */
.layout-controls {
display: flex;
justify-content: flex-end;
margin: 30px 0 20px 0;
gap: 10px;
}

.layout-btn {
background: #f8f9fa;
border: 2px solid #dee2e6;
padding: 8px 12px;
border-radius: 6px;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
}

.layout-btn:hover {
border-color: var(--primary-color);
background: #fff;
}

.layout-btn.active {
background: var(--primary-color);
border-color: var(--primary-color);
color: white;
}

.layout-btn svg {
width: 20px;
height: 20px;
}

/* Layout Classes - UPDATED */
.story-item {
padding: 0 10px;
margin-bottom: 20px;
}

#stories-container {
display: flex;
flex-wrap: wrap;
margin-top: 30px;
}

/* DESKTOP LAYOUT - WRAPPED IN MEDIA QUERY */
@media (min-width: 769px) {
/* Desktop: 4 cards per row (default) */
.layout-default .story-item {
    flex: 0 0 25%;
    max-width: 25%;
}

/* Desktop: 8 cards per row (compact) */
.layout-compact .story-item {
    flex: 0 0 12.5%;
    max-width: 12.5%;
}

.layout-compact .story-card {
    height: 300px;
}

.layout-compact .story-title {
    font-size: 0.9rem;
    padding: 10px;
}
}

/* MOBILE STYLES - FIXED AND ENHANCED */
@media (max-width: 768px) {
.web-stories-title {
    font-size: 2.5rem;
}

.showcase-mobile {
    display: none;
}

/* Base mobile layout - 1 card per row for all by default */
.story-item {
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

/* Mobile: 1 card per row (default) - MOST SPECIFIC SELECTOR */
#stories-container.layout-default .story-item {
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

/* Mobile: 2 cards per row (compact) - MOST SPECIFIC SELECTOR */
#stories-container.layout-compact .story-item {
    flex: 0 0 50% !important;
    max-width: 50% !important;
}

.story-card {
    height: 500px;
    margin: 5px;
}

#stories-container.layout-compact .story-card {
    height: 350px;
}

.story-title {
    font-size: 1.2rem;
    padding: 15px;
}

#stories-container.layout-compact .story-title {
    font-size: 1rem;
    padding: 12px;
}

.play-button {
    width: 50px;
    height: 50px;
}

.category-tag {
    font-size: 0.7rem;
    margin: 6px;
}
}

/* Extra small screens */
@media (max-width: 480px) {
.layout-controls {
    margin: 20px 0 15px 0;
}

.layout-btn {
    padding: 6px 10px;
}

.layout-btn svg {
    width: 18px;
    height: 18px;
}
}