/* ========================================
   MEDIA VIDEOS SECTION
   ======================================== */

.media-section {
    padding: 40px 0 80px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #1a1a2e 100%);
    min-height: 100vh;
}

.media-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   SEARCH BOX
   ======================================== */

.media-search {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
}

.media-search__form {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    width: 100%;
    max-width: 500px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(201, 162, 39, 0.3);
    border-radius: 50px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.media-search__form:focus-within {
    border-color: #c9a227;
    box-shadow: 0 0 20px rgba(201, 162, 39, 0.2);
}

.media-search__input {
    flex: 1;
    padding: 14px 25px;
    background: transparent;
    border: none;
    outline: none;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    color: #ffffff;
    text-align: right;
}

.media-search__input::placeholder {
    color: #6b7280;
}

.media-search__btn {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #c9a227 0%, #a88a1e 100%);
    border: none;
    border-radius: 50%;
    margin: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.media-search__btn svg {
    width: 22px;
    height: 22px;
    color: #1a1a2e;
}

.media-search__btn:hover {
    transform: scale(1.05);
}

.media-search__count {
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    color: #6b7280;
}

.media-search__count span {
    color: #c9a227;
    font-weight: 700;
}

/* ========================================
   VIDEOS GRID - 5 COLUMNS CENTERED
   ======================================== */

.videos-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 50px;
    justify-content: center;
}

/* ========================================
   VIDEO CARD
   ======================================== */

.video-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(201, 162, 39, 0.3);
}

.video-card__thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #0d0d1a;
}

.video-card__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.video-card:hover .video-card__thumbnail img {
    transform: scale(1.05);
}

.video-card__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-card:hover .video-card__overlay {
    opacity: 1;
}

.video-card__play {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #c9a227 0%, #a88a1e 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    transform: scale(0.8);
}

.video-card:hover .video-card__play {
    transform: scale(1);
}

.video-card__play svg {
    width: 28px;
    height: 28px;
    color: #1a1a2e;
    margin-right: -3px;
}

.video-card__content {
    padding: 15px;
    text-align: center;
}

.video-card__title {
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-card__description {
    font-family: 'Cairo', sans-serif;
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Duration Badge */
.video-card__duration {
    width: 20%;
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Cairo', sans-serif;
    font-size: 11px;
    font-weight: 500;
    z-index: 2;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
    direction: ltr;
}

.video-card__duration svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* Video Card Meta (below content) */
.video-card__meta {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.video-card__views {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.8rem;
    color: #6b7280;
}

.video-card__views svg {
    width: 14px;
    height: 14px;
    color: #c9a227;
    flex-shrink: 0;
}

/* ========================================
   VIDEO MODAL
   ======================================== */

.video-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.video-modal--active {
    opacity: 1;
    visibility: visible;
}

.video-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
}

.video-modal__container {
    position: relative;
    width: 90%;
    max-width: 1000px;
    background: #1a1a2e;
    border-radius: 20px;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

.video-modal--active .video-modal__container {
    transform: scale(1) translateY(0);
}

.video-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    background: rgba(201, 162, 39, 0.1);
    border-bottom: 1px solid rgba(201, 162, 39, 0.2);
}

.video-modal__title {
    font-family: 'Cairo', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.video-modal__close {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-modal__close svg {
    width: 20px;
    height: 20px;
    color: #ffffff;
}

.video-modal__close:hover {
    background: #c9a227;
}

.video-modal__close:hover svg {
    color: #1a1a2e;
}

.video-modal__body {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
}

.video-modal__body iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* ========================================
   PAGINATION
   ======================================== */

.media-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    direction: ltr;
}

.pagination__btn {
    width: 45px;
    height: 45px;
    background: rgba(201, 162, 39, 0.1);
    border: 2px solid rgba(201, 162, 39, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination__btn svg {
    width: 20px;
    height: 20px;
    color: #c9a227;
}

.pagination__btn:hover:not(.pagination__btn--disabled) {
    background: #c9a227;
    border-color: #c9a227;
}

.pagination__btn:hover:not(.pagination__btn--disabled) svg {
    color: #1a1a2e;
}

.pagination__btn--disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination__numbers {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination__number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #a0a0a0;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.pagination__number:hover {
    color: #c9a227;
    background: rgba(201, 162, 39, 0.1);
}

.pagination__number--active {
    color: #1a1a2e;
    background: linear-gradient(135deg, #c9a227 0%, #e8d5a3 100%);
}

.pagination__dots {
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    color: #6b7280;
    padding: 0 5px;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1200px) {
    .videos-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }
}

@media (max-width: 1024px) {
    .videos-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .videos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .media-container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .media-section {
        padding: 30px 0 60px;
    }

    .videos-grid {
        grid-template-columns: 1fr;
        max-width: 350px;
        margin-left: auto;
        margin-right: auto;
    }

    .video-modal__container {
        width: 95%;
        border-radius: 15px;
    }

    .video-modal__header {
        padding: 15px 20px;
    }

    .video-modal__title {
        font-size: 1rem;
    }

    .pagination__number {
        width: 35px;
        height: 35px;
        font-size: 0.85rem;
    }

    .pagination__btn {
        width: 38px;
        height: 38px;
    }
}
