/* =====================
   Image Card Styles (Gallery) - 50% gradient
   ===================== */
.image-card {
    position: relative;
    height: 320px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.image-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.image-card:hover .card-img {
    transform: scale(1.08);
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(transparent, rgba(0,0,0,0.7) 45%, rgba(0,0,0,0.93));
    display: flex;
    align-items: flex-end;
    padding: 1.75rem;
    color: white;
}

.overlay-content {
    width: 100%;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.card-text {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    opacity: 0.95;
    /* display: -webkit-box; */
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-badge {
    background-color: rgba(255,255,255,0.95);
    color: #212529;
    font-size: 0.8rem;
    padding: 0.4em 0.85em;
}

/* =====================
   Connected Button Group ( All | Category 1 | Category 2 )
   ===================== */
#filter-group {
    border: 1px solid #0d6efd;
    border-radius: 50px;
    overflow: hidden;
    display: inline-flex;
    flex-wrap: wrap;
}

#filter-group .btn {
    border: none;
    border-right: 1px solid #0d6efd;
    border-radius: 0;
    padding: 0.65rem 1.25rem;
    font-weight: 500;
}

#filter-group .btn:last-child {
    border-right: none;
}

#filter-group .btn:hover {
    background-color: #f8f9fa;
}

#filter-group .btn-check:checked + .btn {
    background-color: #0d6efd;
    color: white;
}

/* =====================
   Modal - Card Style - 25% gradient + constrained width
   ===================== */
.modal-card-wrapper {
    background: transparent;
    box-shadow: none;
    border: none;
}

.modal-card {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    max-height: 90vh;
}

.modal-card-img {
    width: 100%;
    height: auto;
    max-height: 68vh;
    object-fit: contain;
    display: block;
    background: #f8f9fa;
}

.modal-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 25%;
    background: linear-gradient(transparent, rgba(0,0,0,0.8) 50%, rgba(0,0,0,0.95));
    display: flex;
    align-items: flex-end;
    padding: 2rem 2rem 1.75rem;
    color: white;
}

.modal-overlay-content {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.modal-card-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    flex-shrink: 0;
}

.modal-card-text {
    font-size: 1.05rem;
    line-height: 1.5;
    margin: 0;
    flex: 1;
    min-width: 200px;
    opacity: 0.95;
}

.category-badge {
    background-color: rgba(255,255,255,0.95);
    color: #212529;
    font-size: 0.85rem;
    padding: 0.45em 0.9em;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Close Button */
.modal-close-btn {
    position: absolute;
    top: 25px;
    right: 25px;
    background: rgba(255,255,255,0.95);
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 20;
}

.modal-close-btn:hover {
    background: white;
    transform: scale(1.1);
}

/* Modal width control */
.modal-xl {
    max-width: 95%;
}

@media (min-width: 992px) {
    .modal-xl {
        max-width: 820px;
    }
}

/* =====================
   Mobile Improvements
   ===================== */
@media (max-width: 768px) {
    .modal-card {
        max-height: 95vh;
    }
    .modal-card-img {
        max-height: 58vh;
    }
    .modal-overlay {
        height: 32%;
        padding: 1.75rem 1.5rem 1.5rem;
    }
    .modal-overlay-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .modal-card-text {
        min-width: auto;
    }
    
    #filter-group {
        flex-direction: column;
        border-radius: 12px;
    }
    #filter-group .btn {
        border-right: none;
        border-bottom: 1px solid #0d6efd;
    }
    #filter-group .btn:last-child {
        border-bottom: none;
    }
}

