/**
 * Web Stories Styling
 */

/* Section Styling */
.stories-section {
    margin-bottom: 30px;
}

/* Make sure the Web Stories heading is visible */
.post--items-title {
    display: block;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative !important;
    height: auto !important;
    width: auto !important;
    clip: auto !important;
    overflow: visible !important;
    margin-bottom: 20px;
}

.post--items-title .h4 {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0 0 20px 0;
    padding: 0 0 10px 0;
    border-bottom: 2px solid #e74c3c;
    display: inline-block;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: #333;
}

.view-all-btn {
    display: inline-block;
    color: #fff;
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.3s;
}

.view-all-btn:hover {
    color: #fff;
    text-decoration: none;
}

/* Stories Row Styling */
.stories-row {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    padding-bottom: 10px;
    gap: 15px;
}

.stories-row::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

/* Stories Grid Styling for Category Pages */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Story Item Styling */
.story-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex: 0 0 auto;
    width: 200px;
    height: 350px;
}

.story-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.story-link {
    display: block;
    text-decoration: none;
    position: relative;
    height: 100%;
    width: 100%;
}

.story-link:hover {
    text-decoration: none;
}

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

.story-title-web {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.5));
    z-index: 1;
    padding: 15px;
}

.story-title-web p {
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
    line-height: 1.5;
    text-align: center;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

/* Pagination Styling */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.pagination {
    display: inline-flex;
    border-radius: 4px;
    overflow: hidden;
}

.pagination li {
    display: inline-block;
}

.pagination li a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-right: 0;
    color: #444;
    text-decoration: none;
    background-color: #fff;
}

.pagination li:last-child a {
    border-right: 1px solid #ddd;
}

.pagination li.active a {
    background-color: #d9534f;
    color: #fff;
    border-color: #d9534f;
}

.pagination li.disabled a {
    color: #aaa;
    cursor: not-allowed;
}

.pagination li:not(.active):not(.disabled) a:hover {
    background-color: #f8f8f8;
}

/* Responsive styles */
@media (min-width: 768px) {
    .stories-row {
        flex-wrap: nowrap;
        overflow-x: visible;
    }
    
    .story-item {
        width: calc(16.66% - 12.5px); /* 6 items per row with gap */
    }
    
    .stories-grid .story-item {
        width: 100%;
    }
    
    .stories-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 992px) {
    .stories-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 767px) {
    .story-item {
        width: 180px;
        height: 280px;
    }
    
    .story-title p {
        font-size: 14px;
        line-height: 1.4;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    .stories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stories-grid .story-item {
        width: 100%;
        height: 280px;
    }
} 