/* Festival Gallery Styles */

.festival-gallery-wrapper {
    padding: 20px 0;
    min-height: 500px;
}

.festival-filters {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.festival-filters select {
    padding: 12px 25px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    min-width: 200px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.festival-filters select:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.festival-filters label {
    font-weight: 600;
    color: #333;
    margin-right: 10px;
}

.festival-grid {
    display: grid;
    gap: 30px;
    margin-top: 30px;
}

.festival-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.festival-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.festival-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.festival-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.festival-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.festival-thumbnail {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.festival-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.festival-thumbnail:hover img {
    transform: scale(1.05);
}

.festival-info {
    padding: 20px;
}

.festival-info h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #333;
    line-height: 1.3;
}

.festival-info h3 a {
    color: inherit;
    text-decoration: none;
}

.festival-info h3 a:hover {
    color: #0073aa;
}

.festival-country,
.festival-director {
    color: #666;
    margin: 5px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.festival-country:before {
    content: "🌍";
    font-size: 12px;
}

.festival-director:before {
    content: "👤";
    font-size: 12px;
}

.festival-excerpt {
    color: #777;
    font-size: 14px;
    line-height: 1.6;
    margin-top: 10px;
}


/* Modal Styles */

.festival-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 999999;
    overflow-y: auto;
    align-items: center;
    justify-content: center;
}

body.festival-modal-open {
    overflow: hidden;
}

.festival-modal-content {
    position: relative;
    background: #fff;
    margin: 20px;
    padding: 20px;
    width: 95%;
    max-width: 1200px;
    border-radius: 10px;
    max-height: 90vh;
    overflow-y: auto;
}

.festival-close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 40px;
    color: #333;
    cursor: pointer;
    z-index: 100;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.festival-close-modal:hover {
    color: #ff0000;
    transform: rotate(90deg);
}

.festival-modal-slider {
    width: 100%;
    margin-bottom: 30px;
    position: relative;
}

.slider-item {
    text-align: center;
}

.slider-item img {
    max-width: 100%;
    max-height: 600px;
    width: auto;
    height: auto;
    margin: 0 auto;
    display: block;
    border-radius: 5px;
}


/* Slick slider customization */

.slick-prev,
.slick-next {
    width: 50px;
    height: 50px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.8) !important;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.slick-prev:hover,
.slick-next:hover {
    background: white !important;
}

.slick-prev:before,
.slick-next:before {
    font-family: 'dashicons';
    font-size: 30px;
    color: #333;
    opacity: 1;
}

.slick-prev {
    left: 20px;
}

.slick-next {
    right: 20px;
}

.slick-dots {
    bottom: -40px;
}

.slick-dots li button:before {
    font-size: 12px;
}

.festival-modal-info {
    padding: 30px;
    background: #f9f9f9;
    border-radius: 5px;
    margin-top: 20px;
}

.festival-modal-title {
    margin: 0 0 20px 0;
    font-size: 28px;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.festival-modal-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
    padding: 20px;
    background: white;
    border-radius: 5px;
}

.festival-modal-meta p {
    margin: 0;
    padding: 8px 12px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 14px;
}

.festival-modal-meta strong {
    color: #333;
    margin-right: 8px;
}

.festival-modal-excerpt {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 5px;
    font-style: italic;
}

.festival-modal-content {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

.festival-modal-content p {
    margin-bottom: 15px;
}


/* Loading spinner */

.loading-spinner {
    text-align: center;
    padding: 50px;
}

.loading-spinner .spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.error-message {
    text-align: center;
    padding: 50px;
    color: #ff0000;
    background: #fff5f5;
    border-radius: 5px;
}

.no-images {
    text-align: center;
    padding: 50px;
    color: #666;
    background: #f9f9f9;
    border-radius: 5px;
}


/* Countries Filter */

.festival-countries-filter {
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
}

.country-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.country-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.country-item:hover {
    border-color: #0073aa;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 115, 170, 0.1);
}

.country-item.active {
    border-color: #0073aa;
    background: #0073aa;
    color: white;
}

.country-item.active .country-name,
.country-item.active .country-count {
    color: white;
}

.country-flag {
    width: 30px;
    height: 20px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.country-name {
    font-weight: 600;
    color: #333;
    flex-grow: 1;
}

.country-count {
    color: #666;
    font-size: 12px;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 10px;
}


/* Responsive Design */

@media (max-width: 1200px) {
    .festival-modal-content {
        width: 95%;
        margin: 10px;
    }
}

@media (max-width: 1024px) {
    .festival-grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
    .festival-modal-meta {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .festival-grid-3,
    .festival-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .festival-filters {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
    }
    .festival-filters select {
        width: 100%;
        min-width: auto;
    }
    .festival-modal-content {
        padding: 15px;
        margin: 5px;
    }
    .festival-modal-meta {
        grid-template-columns: 1fr;
        padding: 15px;
    }
    .festival-modal-title {
        font-size: 24px;
    }
    .slick-prev,
    .slick-next {
        width: 40px;
        height: 40px;
    }
    .slick-prev {
        left: 10px;
    }
    .slick-next {
        right: 10px;
    }
    .country-item {
        min-width: 150px;
    }
}

@media (max-width: 480px) {
    .festival-grid-2,
    .festival-grid-3,
    .festival-grid-4 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .festival-thumbnail {
        height: 200px;
    }
    .festival-info {
        padding: 15px;
    }
    .festival-info h3 {
        font-size: 18px;
    }
    .festival-modal-content {
        padding: 10px;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
        height: 100vh;
    }
    .festival-close-modal {
        right: 15px;
        top: 15px;
        font-size: 30px;
        width: 35px;
        height: 35px;
        line-height: 35px;
    }
    .country-item {
        min-width: 100%;
    }
}