/* General Styles */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* header {
    text-align: center;
    margin: 20px 0;
} */

h1 {
    font-size: 36px;
    color: #f3e0eb;
    text-align: center;
    margin: 30px 0;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 300px;
    background-color: rgba(34, 34, 34, 0.92);
    box-shadow: -4px 0 8px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.sidebar.closed {
    transform: translateX(100%);
}

.sidebar-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sidebar h3 {
    text-align: center;
    font-size: 24px;
    color: #f3e0eb;
    margin-bottom: 20px;
}

.sidebar h4 {
    margin-top: 12px;
    margin-bottom: 10px;
    font-size: 18px;
    color: #e0e7f3;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    position: fixed;
    top: 20px;
    right: 310px;
    width: 40px;
    height: 40px;
    background-color: #0b76c7;
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    line-height: 40px;
    text-align: center;
    transition: background-color 0.3s ease;
    z-index: 1001;
}

.sidebar.closed + .sidebar-toggle {
    right: 10px;
}

.sidebar-toggle:hover {
    background-color: #c11b8a;
}

/* Filters */
.tag-filter {
    display: block;
    width: 100%;
    padding: 10px 20px;
    margin-bottom: 10px;
    background-color: #0b76c7;
    color: #e0e7f3;
    border: none;
    border-radius: 22px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 16px;
}

.tag-filter:hover {
    background-color: #c11b8a;
    color: #fff;
}

.type-filter {
    display: block;
    width: 100%;
    padding: 10px 20px;
    margin-bottom: 10px;
    background-color: #0b76c7;
    color: #e0e7f3;
    border: none;
    border-radius: 22px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 16px;
}

.type-filter:hover {
    background-color: #c11b8a;
    color: #fff;
}

.clear-filters {
    display: block;
    width: 100%;
    padding: 10px 20px;
    margin-bottom: 10px;
    background-color: #0b76c7;
    color: #e0e7f3;
    border: none;
    border-radius: 22px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 16px;
}

.clear-filters:hover {
    background-color: #c11b8a;
    color: #fff;
}

/* Media Grid */
#media-grid {
    margin: 20px auto;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    justify-content: center; /* Center the grid content when there are fewer items */
    max-width: 1200px; /* Prevent it from stretching too far */
}

/* Media Card */
.media-card {
    background-color: #333;
    border: 2px solid #444;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
    width: 100%;
}

.media-card h3 {
    padding-top: 10px;
    padding-bottom: 8px;
}

.media-card p {
    padding-top: 6px;
    padding-bottom: 10px;
}

.media-card:hover {
    border-color: #c11b8a; /* Border changes to magenta color upon hover */
    box-shadow: 0 0 15px rgba(193, 27, 138, 0.8); /* Magenta glow effect */
    transform: translateY(-4px); /* Subtle lift on hover */
}

/* Adjust Images */
.media-card img {
    width: 100%;
    height: 240px;
    object-fit: cover; /* Crop image to fit card dimensions */
    display: block;
    border: none;
}

/* Adjust Videos */
.media-card iframe {
    width: 100%;
    height: 240px;
    display: block;
    border: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 100%; /* Full width on mobile */
    }

    #media-grid {
        margin: 10px;
        grid-template-columns: 1fr; /* Single column on small screens */
    }

    .media-card iframe {
        height: 300px; /* Almost full width on mobile */
    }
}
