/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
}

/* Search Container */
.search-container {
    position: relative;
    max-width: 500px;
    margin: 20px auto;
    width: 70%;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

#search {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border-radius: 25px;
    border: 1px solid #ddd;
    font-size: 16px;
}

/* Container */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
    padding: 20px;
    max-width: 1200px;
    margin: auto;
    transition: transform 0.3s ease-out;
}

.shift-right {
    transform: translateX(60px);
}

/* Story Card */
.story-card {
    width: 300px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background: transparent;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
    margin: 0 auto;
}

.story-card:hover {
    transform: scale(1.05);
}

/* Media Section */
.story-media {
    width: 100%;
    height: 220px;
    position: relative;
    border-bottom: 2px solid #007bff;
}

.story-image,
.story-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.3s ease-in-out;
    border-radius: 10px 10px 0 0;
}

.story-video {
    opacity: 0;
    pointer-events: none;
}

.story-media:hover .story-video {
    opacity: 1;
}

.story-media:hover .story-image {
    opacity: 0;
}

/* Info Section */
.story-info {
    padding: 15px;
    background: transparent;
    text-align: center;
    border-radius: 0 0 10px 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
    color: #151414;
}

.story-info h5 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 10px;
}

.story-info p {
    font-size: 1rem;
    color: #151414;
    margin: 5px 0;
    line-height: 1.4;
    word-break: break-word;
    padding: 0 10px;
}

.play-now {
    display: block;
    width: 90%;
    text-align: center;
    padding: 10px;
    margin: 10px auto 5px;
    background: #007bff;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background 0.3s, transform 0.2s;
}

.play-now:hover {
    background: #0056b3;
    transform: scale(1.05);
}

/* Video Modal Styles */
.video-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    top: 50%;
    transform: translateY(-50%);
}

#modalVideo {
    width: 100%;
    display: block;
}

.close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover {
    color: #ccc;
}

/* Tablet Responsive */
@media screen and (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        display: none;
    }

    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.9);
        z-index: 1000;
    }

    .container {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 30px;
        padding: 15px;
        justify-items: center;
    }

    .story-card {
        width: 300px;
    }

    .story-media {
        height: 220px;
    }

    .story-info {
        min-height: 120px;
        padding: 12px;
    }
}

/* Mobile Responsive */
@media screen and (max-width: 480px) {
    .container {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 10px;
        gap: 20px;
    }

    .story-card {
        width: 300px;
    }

    .story-media {
        height: 200px;
    }

    .story-info {
        padding: 10px;
    }

    .story-info h5 {
        font-size: 1.2rem;
        white-space: normal;
        line-height: 1.2;
    }

    .story-info p {
        font-size: 0.9rem;
        margin: 4px 0;
    }

    .play-now {
        padding: 8px;
        font-size: 0.9rem;
        margin-top: 8px;
    }
}
