/* dmh-video-gallery.css - BEM mapping of the provided Tailwind UI */

.dmh-vgal {
    font-family: 'Noto Sans Armenian', sans-serif !important;
    background-color: #ffffff;
    color: #111827;
    padding: 64px 0;
    line-height: 1.5;
}

.dmh-vgal * {
    box-sizing: border-box;
}

.dmh-vgal__wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
}

@media (min-width: 640px) {
    .dmh-vgal__wrap { padding: 0 24px; }
}

@media (min-width: 1024px) {
    .dmh-vgal__wrap { padding: 0 32px; }
}

/* Header */
.dmh-vgal__head {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 48px;
    gap: 24px;
}

@media (min-width: 768px) {
    .dmh-vgal__head {
        flex-direction: row;
        align-items: flex-end;
    }
}

.dmh-vgal__head-text {
    max-width: 48rem; /* 768px */
}

.dmh-vgal__title {
    font-family: 'Noto Sans Armenian', sans-serif !important;
    font-size: 30px;
    font-weight: 900;
    letter-spacing: -0.025em;
    color: #111827;
    margin: 0 0 16px 0;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .dmh-vgal__title { font-size: 36px; }
}

.dmh-vgal__sub {
    font-family: 'Noto Sans Armenian', sans-serif !important;
    font-size: 18px;
    color: #4b5563;
    margin: 0;
}

.dmh-vgal__btn {
    font-family: 'Noto Sans Armenian', sans-serif !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: #dc2626;
    color: #ffffff;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.dmh-vgal__btn:hover,
.dmh-vgal__btn:focus {
    background-color: #b91c1c;
    color: #ffffff;
}

/* Featured Video */
.dmh-vgal__feat {
    margin-bottom: 48px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    cursor: pointer;
    display: block; /* Treat as block element */
}

.dmh-vgal__feat-bg {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    background-color: #111827;
}

@media (min-width: 768px) {
    .dmh-vgal__feat-bg {
        padding-bottom: 50%; /* slightly shorter on desktop to fit screen, but tall enough to not cut off heads */
    }
}

.dmh-vgal__feat-bg img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.8;
    transition: opacity 0.7s ease-in-out, transform 0.7s ease-in-out;
}

.dmh-vgal__feat:hover .dmh-vgal__feat-bg img {
    opacity: 1;
    transform: scale(1.05);
}

.dmh-vgal__feat-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(17, 24, 39, 0.9), rgba(17, 24, 39, 0.2), transparent);
}

.dmh-vgal__feat-play-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

@keyframes dmh-vgal-pulse-scale {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

.dmh-vgal__feat-play {
    position: relative;
    width: 80px;
    height: 80px;
    background-color: rgba(220, 38, 38, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
    z-index: 1;
}

.dmh-vgal__feat-play::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background-color: rgba(220, 38, 38, 0.6);
    z-index: -1;
    animation: dmh-vgal-pulse-scale 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.dmh-vgal__feat-play .material-symbols-outlined {
    font-size: 36px;
    margin-left: 4px; /* visual center tweak for play icon */
}

.dmh-vgal__feat:hover .dmh-vgal__feat-play {
    background-color: #dc2626;
    transform: scale(1.1);
}

.dmh-vgal__feat:hover .dmh-vgal__feat-play::after {
    animation: none;
    opacity: 0;
}

.dmh-vgal__feat-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    pointer-events: none;
    color: #ffffff;
}

@media (min-width: 768px) {
    .dmh-vgal__feat-content {
        padding: 40px;
    }
}

.dmh-vgal__feat-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background-color: #dc2626;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 6px;
    margin-bottom: 16px;
}

.dmh-vgal__feat-badge .material-symbols-outlined {
    font-size: 14px;
}

.dmh-vgal__feat-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px 0;
    line-height: 1.2;
    text-shadow: 0 10px 15px rgba(0,0,0,0.5);
    color: #fff;
}

@media (min-width: 768px) {
    .dmh-vgal__feat-title { font-size: 36px; }
}

.dmh-vgal__feat-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: #e5e7eb;
}

@media (min-width: 768px) {
    .dmh-vgal__feat-meta { font-size: 16px; }
}

.dmh-vgal__feat-meta > span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dmh-vgal__feat-meta .material-symbols-outlined {
    font-size: 18px;
}

/* Category Filters */
.dmh-vgal__filters {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 24px;
    margin-bottom: 32px;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
    scroll-snap-type: x mandatory;
}

.dmh-vgal__filters::-webkit-scrollbar {
    display: none;
}

.dmh-vgal__filter {
    white-space: nowrap;
    padding: 10px 24px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    scroll-snap-align: start;
    border: none;
    background-color: transparent;
    color: #4b5563; /* text-gray-600 */
    cursor: pointer;
    font-family: inherit;
}

.dmh-vgal__filter:hover {
    background-color: #f3f4f6; /* bg-gray-100 */
    color: #111827;
}

.dmh-vgal__filter.active {
    background-color: #111827; /* bg-gray-900 */
    color: #ffffff;
}

/* Video Grid */
.dmh-vgal__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 768px) {
    .dmh-vgal__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .dmh-vgal__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.dmh-vgal__card {
    cursor: pointer;
    display: block; /* ensure takes normal flow */
    transition: auto;
}

.dmh-vgal__card.hidden {
    display: none;
}

.dmh-vgal__card-media {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    height: 224px; /* h-56 */
    background-color: #f3f4f6; /* bg-gray-100 */
}

.dmh-vgal__card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.dmh-vgal__card:hover .dmh-vgal__card-media img {
    transform: scale(1.05);
}

.dmh-vgal__card-ph {
    width: 100%;
    height: 100%;
    background-color: #e5e7eb;
}

.dmh-vgal__card-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

.dmh-vgal__card:hover .dmh-vgal__card-overlay {
    background-color: rgba(0, 0, 0, 0.1);
}

.dmh-vgal__card-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dmh-vgal__card-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dmh-vgal__card:hover .dmh-vgal__card-play {
    opacity: 1;
}

.dmh-vgal__card-play::before {
    content: '';
    display: block;
    width: 60px;
    height: 60px;
    background-color: rgba(220, 38, 38, 0.9);
    border-radius: 50%;
    position: absolute;
    z-index: 1;
    transition: all 0.3s ease;
}

.dmh-vgal__card-play::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(220, 38, 38, 0.6);
    z-index: 0;
    animation: dmh-vgal-pulse-scale 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.dmh-vgal__card:hover .dmh-vgal__card-play::before {
    background-color: #dc2626;
    transform: scale(1.1);
}

.dmh-vgal__card:hover .dmh-vgal__card-play::after {
    animation: none;
    opacity: 0;
}

.dmh-vgal__card-play .material-symbols-outlined {
    position: relative;
    color: #ffffff;
    font-size: 32px;
    margin-left: 4px;
    z-index: 1;
}

.dmh-vgal__card-dur {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 6px 10px;
    background-color: rgba(0, 0, 0, 0.85);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    border-radius: 6px;
    backdrop-filter: blur(4px);
    font-family: inherit;
}

.dmh-vgal__card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.dmh-vgal__card-cat {
    color: #dc2626;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dmh-vgal__card-date {
    color: #6b7280;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dmh-vgal__card-date .material-symbols-outlined {
    font-size: 14px;
}

.dmh-vgal__card-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    transition: color 0.3s ease;
    margin: 0 0 8px 0;
    line-height: 1.25;
    /* line-clamp-2 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dmh-vgal__card:hover .dmh-vgal__card-title {
    color: #dc2626;
}


/* Lightbox Modal (matches Tailwind) */
.dmh-vgal__lb {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none; /* toggled via js class .is-open */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dmh-vgal__lb.is-open {
    display: block;
    opacity: 1;
}

.dmh-vgal__lb-back {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.dmh-vgal__lb-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    pointer-events: none; /* Let clicks pass to background */
}

@media (min-width: 768px) {
    .dmh-vgal__lb-wrap { padding: 32px; }
}

.dmh-vgal__lb-box {
    position: relative;
    width: 100%;
    max-width: 1024px; /* max-w-5xl */
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    background-color: #111827;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    pointer-events: auto; /* re-enable clicks inside modal */
}

.dmh-vgal__lb.is-open .dmh-vgal__lb-box {
    transform: scale(1);
}

.dmh-vgal__lb-media {
    position: relative;
    background-color: #000;
    width: 100%;
    /* aspect-video */
    padding-bottom: 56.25%;
}

.dmh-vgal__lb-media iframe,
.dmh-vgal__lb-media video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.dmh-vgal__lb-info {
    padding: 24px;
    background-color: #111827;
    border-top: 1px solid #1f2937;
}

@media (min-width: 768px) {
    .dmh-vgal__lb-info { padding: 32px; }
}

.dmh-vgal__lb-title {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

@media (min-width: 768px) {
    .dmh-vgal__lb-title { font-size: 30px; }
}
