/* Video Gallery Container */
.videos-gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Gallery Grid */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
    margin-bottom: 40px;
    animation: fadeInUp 0.6s ease-out;
}

/* Video Card Wrapper */
.video-card-wrapper {
    perspective: 1000px;
    cursor: pointer;
}

/* Video Card */
.video-card {
    background: var(--flyeverest-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateY(0) rotateX(0);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid rgba(102, 126, 234, 0.08);
}

.video-card-wrapper:hover .video-card {
    transform: translateY(-12px) rotateX(2deg);
    box-shadow: 0 20px 48px rgba(102, 126, 234, 0.25);
    border-color: rgba(102, 126, 234, 0.2);
}

/* Thumbnail Container */
.video-thumbnail {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #098fe3 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.video-card-wrapper:hover .video-thumbnail img {
    transform: scale(1.08) rotate(1deg);
}

/* Play Button Overlay */
.play-icon-wrapper {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 2;
}

.video-card-wrapper:hover .play-icon-wrapper {
    background: rgba(0, 0, 0, 0.4);
}

.play-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #098fe3 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: scale(0.9);
}

.video-card-wrapper:hover .play-icon {
    transform: scale(1.1);
    box-shadow: 0 12px 36px rgba(102, 126, 234, 0.6);
}

/* Video Type Badge */
.video-type-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #667eea 0%, #098fe3 100%);
    color: white;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    z-index: 3;
    animation: slideInDown 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* View Count Badge */
.view-count-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    background: var(--flyeverest-bg);
    color: #667eea;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 4px;
    animation: slideInDown 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s backwards;
}

/* Card Body */
.video-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Video Title */
.video-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--ap-color);
    margin-bottom: 10px;
    margin-top: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.video-card-wrapper:hover .video-card-title {
    color: #87a1ff;
}

/* Video Description */
.video-card-description {
    font-size: 13px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
    margin-top: 0;
    flex: 1;
}


[data-theme="light"] .video-card-description {
 color: #7f8c8d;
}


[data-theme="dark"] .video-card-description {
 color: #a9baba;
}


/* Video Meta */
.video-card-meta {
    font-size: 12px;
    color: #95a5a6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #ecf0f1;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Pagination */
.videos-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

.videos-pagination ul {
    display: flex;
    list-style: none;
    padding: 0;
    gap: 8px;
    flex-wrap: wrap;
}

.videos-pagination a,
.videos-pagination span {
    padding: 10px 14px;
    border: 2px solid #667eea;
    border-radius: 8px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 40px;
    justify-content: center;
}

.videos-pagination a:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.videos-pagination .pagination-active {
    background: linear-gradient(135deg, #667eea 0%, #098fe3 100%);
    color: white;
    border-color: transparent;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 40px;
    justify-content: center;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Modal Styles */
.video-modal-content {
    max-width: 900px;
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #098fe3 100%);
    border: none;
    padding: 20px 24px;
    border-radius: 16px 16px 0 0;
}

.modal-header .modal-title {
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.modal-body {
    padding: 24px;
    background: #f8f9fa;
    border-radius: 0 0 16px 16px;
}

.video-player-modal {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
}

.video-player-modal video,
.video-player-modal iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.modal-video-description {
    background: white;
    padding: 16px;
    border-radius: 12px;
    line-height: 1.6;
    color: #555;
    font-size: 14px;
}

.modal-video-description p {
    margin-bottom: 12px;
}

.modal-video-description p:last-child {
    margin-bottom: 0;
}

.modal-video-meta {
    display: flex;
    gap: 20px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #ecf0f1;
    font-size: 13px;
    color: #7f8c8d;
    flex-wrap: wrap;
}

.modal-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }

    .video-thumbnail {
        height: 160px;
    }

    .video-card-title {
        font-size: 14px;
    }

    .video-card-body {
        padding: 16px;
    }

    .play-icon {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
}

@media (max-width: 576px) {
    .videos-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .video-thumbnail {
        height: 200px;
    }

    .play-icon {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .video-type-badge,
    .view-count-badge {
        font-size: 10px;
        padding: 4px 8px;
    }

    .videos-pagination ul {
        gap: 4px;
    }

    .videos-pagination a,
    .videos-pagination span {
        padding: 8px 10px;
        font-size: 12px;
    }
}


/*
.modal-dialog {
    max-width: 1100px !important;
    width: 95%;
}

.video-player-modal {
    padding-bottom: 56.25%;
    background: #000;
}

.video-player-modal video,
.video-player-modal iframe {
    width: 100%;
    height: 100%;
    border-radius: 12px;
}*/


/*

.video-ratio-16-9 {
    padding-bottom: 56.25%; 
}

.video-ratio-4-3 {
    padding-bottom: 75%; 
}

.video-ratio-9-16 {
    padding-bottom: 177.78%; 
}


.video-player-modal iframe,
.video-player-modal video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

*/


.video-player {
    position: relative;
    width: 100%;
    background: #000;
    overflow: hidden;
}


.ratio-16x9 {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
}


.ratio-9x16 {
  position: relative;
  width: 100%;
  max-width: 420px; 
  padding-bottom: 55%;
  margin: auto;
}


.ratio-16x9 iframe, .ratio-16x9 video,
.ratio-9x16 iframe, .ratio-9x16 video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.player-iframe,
.video-player video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}
	
	
@media (max-width: 768px) {
.ratio-9x16 {
  width: 100%;
  max-width: 100%; 
  padding-bottom: 177%;
}

}

