/* Success Stories Page */
.success-stories-page {
    color: #333;
    font-family: "Helvetica Neue", Arial, sans-serif;
    background: #fff;
}

.success-stories-page .container-box {
    width: 100%;
    margin: 0 auto;
}

.success-stories-page .container-padding {
    padding: 0 150px;
}

/* Banner Section */
.stories-banner {
    width: 100%;
    height: 28.6vw;
    position: relative;
    overflow: hidden;
}

.stories-banner .banner-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Filters Section */
.stories-filters {
    padding: 30px 0;
    background: #fff;
    border-bottom: 1px solid #DEDEDE;
    margin-top: 65px;
}

.stories-filters .filters-wrapper {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* Search Box */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box .search-input {
    width: 240px;
    padding: 10px 40px 10px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    outline: none;
    transition: all 0.2s ease;
}

.search-box .search-input::placeholder {
    color: #999;
}

.search-box .search-input:hover {
    border-color: #ccc;
}

.search-box .search-input:focus {
    border-color: #9D0400;
    box-shadow: 0 0 0 2px rgba(146, 146, 105, 0.1);
}

.search-box .search-btn {
    position: absolute;
    right: 0;
    top: 0;
    width: 40px;
    height: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: color 0.2s ease;
}

.search-box .search-btn:hover {
    color: #9D0400;
}

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

/* Filter Dropdown */
.filter-dropdown {
    position: relative;
}

.filter-dropdown .filter-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 180px;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-dropdown .filter-btn:hover {
    border-color: #9D0400;
}

.filter-dropdown.open .filter-btn {
    border-color: #9D0400;
}

.filter-dropdown .filter-arrow {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #666;
    margin-left: 10px;
    transition: transform 0.2s ease;
}

.filter-dropdown.open .filter-arrow {
    transform: rotate(180deg);
}

.filter-dropdown .filter-options {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: none;
    list-style: none;
    padding: 0;
    margin: 4px 0 0 0;
}

.filter-dropdown.open .filter-options {
    display: block;
}

.filter-dropdown .filter-options li {
    padding: 10px 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.filter-dropdown .filter-options li:hover {
    background: #f5f5f5;
}

.filter-dropdown .filter-options li.active {
    background: #9D0400;
    color: #fff;
}

/* Cases Grid Section */
.stories-grid-section {
    padding: 30px 0 50px;
    background: #fff;
    min-height: calc(100vh - 500px);
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

/* Larger screens - show more items */
@media (min-width: 1600px) {
    .cases-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

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

.case-card {
    background: #fff;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: block;
    text-decoration: none;
}

.case-card:hover {
    transform: translateY(-4px);
    /* box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); */
}

.case-card .case-image {
    overflow: hidden;
    width: 330px;
    height: 220px;
}

.case-card .case-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.case-card:hover .case-image img {
    transform: scale(1.05);
}

.case-card .case-info {
    padding: 10px 0;
}

.case-card .case-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin: 0 0 5px 0;
    line-height: 1.4;
}

.case-card .case-location {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin: 0;
    line-height: 1.4;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results p {
    font-size: 16px;
    color: #666;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .cases-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

@media (max-width: 991px) {
    .success-stories-page .container-padding {
        padding: 0 40px;
    }
    
    .stories-banner {
        height: 50vw;
    }
    
    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .stories-filters .filters-wrapper {
        gap: 15px;
    }
    
    .filter-dropdown .filter-btn {
        min-width: 160px;
        padding: 8px 14px;
        font-size: 13px;
    }
}

@media (max-width: 767px) {
    .success-stories-page .container-padding {
        padding: 0 15px;
    }
    
    .stories-banner {
        height: 50vw;
    }
    
    .stories-filters {
        padding: 25px 0;
    }
    
    .stories-filters .filters-wrapper {
        flex-direction: column;
        gap: 12px;
    }
    
    .filter-dropdown {
        width: 100%;
    }

    .filter-dropdown .filter-btn {
        width: 100%;
        min-width: auto;
    }

    .search-box {
        width: 100%;
    }

    .search-box .search-input {
        width: 100%;
    }

    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .case-card .case-image {
        height: 140px;
    }
    
    .case-card .case-title {
        font-size: 13px;
    }
    
    .case-card .case-location {
        font-size: 12px;
    }
    
    .stories-grid-section {
        padding: 30px 0 50px;
    }
}

@media (max-width: 480px) {
    .stories-banner {
        height: 50vw;
    }
    
    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .case-card .case-image {
        height: 120px;
    }
    
    .case-card .case-info {
        padding: 10px 0;
    }
    
    .case-card .case-title {
        font-size: 12px;
    }
    
    .case-card .case-location {
        font-size: 11px;
    }
}

/* Loading More Indicator */
.load-more-indicator {
    margin-top: 20px;
}

.load-more-indicator .loading-text {
    color: #666;
    font-size: 14px;
}

.load-more-indicator .loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top-color: #9D0400;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 14px;
    width: 100%;
    grid-column: 1 / -1;
}

.loading-indicator::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 2px solid #ddd;
    border-top-color: #9D0400;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

/* Spin Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
