.stories-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    margin-top: 30px;
    padding-bottom: 50px;
    width: 100%;
    max-width: 1200px;
}

.story-card {
    width: 100%;
    min-height: 408px;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0px 4px 10px 0px #0000001A;
    overflow: hidden;
    transition: box-shadow 0.2s ease-out;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    contain: layout style paint;
}

/* Success modal ssss*/
.success-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1100;
}

.success-modal.show {
    display: flex;
    animation: fadeInOverlay 0.3s ease;
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.success-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.52);
}

.success-modal__dialog {
    position: relative;
    background: #FFFFFF;
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.22), 0 0 1px rgba(0, 0, 0, 0.08);
    max-width: 760px;
    width: 92%;
    max-height: 88vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.success-modal__close {
    position: absolute;
    top: 18px;
    right: 18px;
    border: none;
    background: rgba(0, 0, 0, 0.08);
    font-size: 24px;
    cursor: pointer;
    color: #0a0a0a;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.success-modal__close:hover {
    background: rgba(0, 0, 0, 0.12);
}

.success-modal__header {
    padding: 32px 28px 24px;
    background: linear-gradient(135deg, #0ADBCD 0%, #00a89e 100%);
    border-bottom: none;
}

.success-modal__header h3 {
    margin: 0;
    font-family: "Young Serif", serif;
    font-weight: 400;
    font-size: 28px;
    color: #FFFFFF;
    line-height: 1.2;
}

.success-modal__body {
    padding: 28px 28px 32px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #0ADBCD #f5f5f5;
}

.modal-section {
    margin-top: 24px;
}

.modal-section:first-child {
    margin-top: 0;
}

.modal-section h4 {
    margin: 0 0 12px;
    font-family: "Roboto";
    font-weight: 600;
    font-size: 16px;
    color: #0ADBCD;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-section p {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: #424242;
    font-family: "Roboto", sans-serif;
}

#successModalFeatures {
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 10px;
}

#successModalFeatures li {
    font-size: 15px;
    line-height: 1.6;
    color: #424242;
    font-family: "Roboto", sans-serif;
    position: relative;
    padding-left: 6px;
}

#successModalFeatures li::marker {
    color: #0ADBCD;
    font-weight: 600;
}

/* Image */
.story-card img {
    width: 100%;
    height: 208px;
    object-fit: cover;
}

/* Content */
.story-content {
    padding: 18px;
    text-align: left;    
}
/* Title */
.story-content h3 {
    font-family: "Roboto";
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #000;
}

/* Description - Only 3 lines */
.story-content p {
    font-size: 14px;
    line-height: 20px;  
    color: #444;
    margin: 0 0 14px 0;

    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* Read More */
.story-content a {
    color: #0ADBCD;
    font-size: 14px;
    text-decoration: none;
    font-weight: 600;
}

/* Hover Effect */
.story-card:hover {
    box-shadow: 0px 8px 20px 0px rgba(10, 219, 205, 0.3);
}

.story-card:hover::before {
    opacity: 1;
}

.story-card {
    position: relative;
}

.story-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #0ADBCD;
    opacity: 0;
    transition: opacity 0.2s ease-out;
    z-index: -1;
    border-radius: 12px;
}

.story-card:hover h3,
.story-card:hover p,
.story-card:hover a {
    color: #FFFFFF;
}
.story-content h3,
.story-content p,
.story-content a {
    text-align: left;     
}

@media (max-width: 1200px) {
    .stories-cards {
        gap: 24px;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .story-card {
        min-height: 380px;
    }
}

@media (max-width: 992px) {
    .stories-cards {
        gap: 22px;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        padding-bottom: 42px;
    }

    .story-card img {
        height: 196px;
    }

    .story-content h3 {
        font-size: 19px;
    }
}

@media (max-width: 768px) {
    .stories-cards {
        gap: 18px;
    }

    .story-card {
        min-height: 0;
    }

    .story-card img {
        height: 188px;
    }

    .story-content h3 {
        font-size: 18px;
    }

    .story-content p {
        font-size: 13px;
        line-height: 19px;
    }
}

@media (max-width: 576px) {
    .stories-cards {
        gap: 16px;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        padding-bottom: 36px;
    }

    .story-card img {
        height: 170px;
    }

    .story-content {
        padding: 16px;
    }

    .story-content h3 {
        font-size: 17px;
    }
}
