/* Стили для страницы галереи */

/* Gallery styles */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end; /* выравнивание по правому краю */
    gap: 10px; /* добавляет отступы между кнопками */
    margin-bottom: 30px;
}

.filter-btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 600;
    background-color: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(15, 76, 129, 0.2);
}

.gallery-item {
    margin-bottom: 30px;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 20px;
    color: white;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .overlay {
    transform: translateY(0);
}

.gallery-item .overlay h5 {
    margin-bottom: 5px;
    font-weight: 700;
}

.gallery-item .overlay p {
    margin-bottom: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Video grid */
.video-grid .video-item {
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.video-grid .video-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
    position: relative;
    height: 220px;
    overflow: hidden;
}

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

.video-item:hover .video-thumbnail img {
    transform: scale(1.1);
}

.video-thumbnail .play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.video-item:hover .play-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
    padding: 20px;
    background-color: white;
}

.video-info h5 {
    font-weight: 700;
    margin-bottom: 10px;
}

.video-info p {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Countries tabs */
.countries-tabs {
    border-bottom: 2px solid rgba(15, 76, 129, 0.1);
    margin-bottom: 40px;
}

.countries-tabs .nav-link {
    padding: 15px 25px;
    font-weight: 600;
    color: var(--text-color);
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s ease;
}

.countries-tabs .nav-link.active, 
.countries-tabs .nav-link:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: transparent;
}

.countries-tabs .nav-link .country-count {
    display: inline-block;
    background-color: rgba(15, 76, 129, 0.1);
    color: var(--accent-color);
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 5px;
    transition: all 0.3s ease;
}

.countries-tabs .nav-link.active .country-count,
.countries-tabs .nav-link:hover .country-count {
    background-color: var(--primary-color);
    color: white;
}

/* Modal Video */
.modal-video .modal-content {
    background-color: transparent;
    border: none;
}

.modal-video .modal-body {
    padding: 0;
}

.modal-video .modal-dialog {
    max-width: 800px;
    margin: 30px auto;
}

.modal-video .close {
    position: absolute;
    right: -30px;
    top: 0;
    color: white;
    font-size: 2rem;
    opacity: 1;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Альбомы галереи */
.album-card {
    margin-bottom: 30px;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
}

.album-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.album-card-img {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.album-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.album-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 20px;
    color: white;
}

.album-card-body {
    padding: 20px;
    background-color: white;
}

.album-card-title {
    font-weight: 700;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.album-card-meta {
    color: #6c757d;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.album-card-meta i {
    margin-right: 5px;
}

.album-photos-count {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
}

.album-photos-count i {
    margin-right: 5px;
}

/* Медиа-запросы для адаптивности */
@media (max-width: 767px) {
    .video-thumbnail {
        height: 180px;
    }
    
    .album-card-img {
        height: 180px;
    }
    
    .gallery-item img {
        height: 200px;
    }
    
    .countries-tabs .nav-link {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .countries-tabs .nav-link .country-count {
        font-size: 0.7rem;
        padding: 1px 6px;
    }
}