.story-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
    height: 100%;
    /* full height of flex container */

}

.story-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.story-image {
    position: relative;
    overflow: hidden;
}

.story-image img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    transition: all 0.5s ease;
}

.story-card:hover .story-image img {
    transform: scale(1.1);
    filter: brightness(80%);
}

.story-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    color: #fff;
}

.story-tag {
    display: inline-block;
    background: #ff6b6b;
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 8px;
    text-decoration: none;
}

.story-overlay h3 a {
    color: #fff;
    text-decoration: none;
    font-size: 20px;
    font-weight: 600;
}

/* === CONTENT SECTION === */
.story-content {
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    flex: 1;
    /* allow content area to grow & fill card height */
}

.story-content p {
    font-size: 15px;
    color: #444;
    margin-bottom: 20px;
    flex: 1;
    /* allow paragraph block to take available space */
}

.story-content h4 {
    font-size: 15px;
    color: #777;
    margin-bottom: 15px;
}

.story-content h4 span {
    color: #222;
    font-weight: 600;
}

.btn-donate {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(90deg, #ff6b6b, #ff9472);
    color: #fff;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: auto;
    /* push button to bottom of story-content */
}

.btn-donate:hover {
    background: linear-gradient(90deg, #ff9472, #ff6b6b);
    transform: scale(1.05);
}

/* === MEDIA CONTAINERS === */
.story-media {
    position: relative;
    overflow: hidden;
}

.media-img,
.media-video {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.story-media.video video {
    border-radius: 0;
}

/* 🎬 Video play overlay */
.youtube-link {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 15px;
}

.youtube-link img {
    width: 100%;
    border-radius: 15px;
    transition: all 0.4s ease;
}

.youtube-link:hover img {
    transform: scale(1.05);
    filter: brightness(80%);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
}

.play-icon-img {
    width: 75px;
    height: 75px;
    opacity: 0.9;
    transition: all 0.3s ease;
    filter: drop-shadow(0px 3px 6px rgba(0, 0, 0, 0.4));
}

.youtube-link:hover .play-icon-img {
    opacity: 1;
    transform: scale(1.1);
}

/* === PDF CARD STYLES === */
.pdf-preview {
    background: linear-gradient(145deg, #f9f9f9, #e9e9e9);
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.pdf-preview:hover {
    border-color: #ff6b6b;
    background: #fff5f5;
}

.pdf-icon {
    width: 80px;
    margin-bottom: 12px;
    filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.1));
}

.pdf-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.pdf-card {
    display: flex;
    flex-direction: column;
    flex: 1;
    /* allow pdf‑card to fill its parent flex container as well */
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.4s ease;
    border: 1px solid #f1f1f1;
}

.pdf-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
}

/* ===== Header Section ===== */
.pdf-top {
    background: linear-gradient(135deg, #ff6b6b, #ff9472);
    color: #fff;
    padding: 40px 20px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.pdf-top::after {
    content: "";
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 60px;
    background: #fff;
    border-radius: 30px 30px 0 0;
}

.pdf-icon {
    width: 80px;
    background: #fff;
    border-radius: 50%;
    padding: 15px;
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.3);
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.pdf-card:hover .pdf-icon {
    transform: scale(1.1);
}

.pdf-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
    position: relative;
    z-index: 2;
}

.pdf-sub {
    font-size: 14px;
    opacity: 0.85;
    position: relative;
    z-index: 2;
}

/* ===== Body Section ===== */
.pdf-body {
    padding: 20px;
    text-align: center;
    flex: 1;
    /* allow pdf-body to fill available vertical space */
    display: flex;
    flex-direction: column;
}

.pdf-body p {
    font-size: 15px;
    color: #444;
    margin-bottom: 15px;
    flex: 1;
}

.pdf-meta {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.pdf-meta i {
    color: #ff6b6b;
    margin-right: 6px;
}

.pdf-card .btn-donate {
    display: inline-block;
    padding: 10px 24px;
    background: linear-gradient(90deg, #ff6b6b, #ff9472);
    border-radius: 25px;
    color: #fff;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: auto;
}

.pdf-card .btn-donate:hover {
    background: linear-gradient(90deg, #ff9472, #ff6b6b);
    transform: scale(1.05);
}

/* === TRUNCATE TO 3 LINES === */
.story-content p.truncate‑3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    line-height: 1.5em;
    max-height: calc(1.5em * 3);
}

/* Optional: link inside paragraph when truncated */
.story-content p.truncate‑3 .view‑more {
    font-weight: bold;
    text-decoration: underline;
    cursor: pointer;
}

/* === EQUAL HEIGHT ALIGNMENT VIA FLEX CONTAINER === */
/* Apply to the parent wrapper of your cards (for example .row) */
.row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    /* this ensures children stretch to equal height */
}

/* Optional: ensure each column wrapper allows the .story-card to fill it */
.col-sm-6,
.col-lg-4 {
    display: flex;
    flex-direction: column;
    padding-bottom: 20px;
}



/* Modal background */
.modal-video {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Show modal */
.modal-video.show {
    display: flex;
    opacity: 1;
}

/* Modal body (centered) */
.modal-video-body {
    position: relative;
    max-width: 900px;
    width: 90%;
    animation: fadeInUp 0.4s ease;
}

/* Video wrapper */
.modal-video-movie-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 ratio */
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

/* YouTube iframe */
.modal-video-movie-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Close button */
.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    color: #000;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: background 0.2s;
}

.modal-close-btn:hover {
    background: #fff;
}

/* Play button styling */
.play-video-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 65px;
    height: 65px;
    font-size: 28px;
    cursor: pointer;
    color: #000;
    transition: all 0.3s;
}

.play-video-btn:hover {
    background: #fff;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Animation */
@keyframes fadeInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}