/* Card container */
.dg-4950b4a0-card {
    background-color: transparent;
    border-radius: 12px;
    border: 1px solid #2a2a2a;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    width: 100% !important;
}
.dg-4950b4a0-card:hover {
    transform: translateY(-2px);
    border-color: #444444;
}

/* Outermost container wrapper class if needed */
.elementor-widget-dewty_gallery_4950b4a0 {
    width: 100% !important;
    display: block !important;
}

/* Media area with padding-bottom aspect-ratio hack */
.dewty-cover-wrapper {
    position: relative !important;
    width: 100% !important;
    padding-bottom: 75% !important; /* 4:3 Ratio */
    height: 0 !important;
    overflow: hidden !important;
    display: block !important;
    background-color: #1a1a1a;
}
.dewty-cover-wrapper img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    max-width: none !important;
    display: block !important;
}

/* Badges */
.dg-4950b4a0-badge-top {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    font-size: 11px;
    font-weight: 700;
    font-family: sans-serif;
    text-transform: uppercase;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    z-index: 10 !important;
    display: inline-block !important;
}

.dg-4950b4a0-badge-bottom {
    position: absolute !important;
    bottom: 12px !important;
    right: 12px !important;
    font-size: 11px;
    font-weight: 600;
    font-family: sans-serif;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    z-index: 10 !important;
    display: inline-block !important;
}

/* Footer */
.dg-4950b4a0-footer {
    flex-grow: 1;
}
.dg-4950b4a0-title {
    margin: 0;
}

/* Modal Styling */
.dg-4950b4a0-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(10, 10, 10, 0.98);
    display: flex;
    flex-direction: column;
    padding: 30px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

body.admin-bar .dg-4950b4a0-modal {
    top: var(--wp-admin--admin-bar--height, 32px);
}
@media screen and (max-width: 782px) {
    body.admin-bar .dg-4950b4a0-modal {
        top: 46px;
    }
}

.dg-4950b4a0-modal.is-active {
    opacity: 1;
    visibility: visible;
}

/* Modal Header */
.dg-4950b4a0-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #222222;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.dg-4950b4a0-modal-meta {
    flex-grow: 1;
}

.dg-4950b4a0-modal-title {
    margin: 0 0 5px 0;
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
    font-family: sans-serif;
}

.dg-4950b4a0-modal-subtitle {
    margin: 0;
    color: #888888;
    font-size: 14px;
    font-family: sans-serif;
}

.dg-4950b4a0-modal-close {
    background: #222222;
    border: none;
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.2s ease;
}
.dg-4950b4a0-modal-close:hover {
    background: #333333;
}

/* Grid layout */
.dg-4950b4a0-modal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 1024px) {
    .dg-4950b4a0-modal-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .dg-4950b4a0-modal-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .dg-4950b4a0-modal-grid {
        grid-template-columns: 1fr;
    }
}

/* Grid Item */
.dg-4950b4a0-grid-item {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
    background-color: #1a1a1a;
}

.dg-4950b4a0-grid-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.dg-4950b4a0-grid-item:hover .dg-4950b4a0-grid-img {
    transform: scale(1.05);
}
