/* Enhanced Festival Details Modal */

.festival-details-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 9999;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.festival-details-modal .modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    margin: 3% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 94vh;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0,0,0,0.3);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255,255,255,0.2);
}

.festival-details-modal .modal-header {
    background: linear-gradient(135deg,#fd7b21,#ff8c42);
    color: white;
    padding: 30px 35px;
    position: relative;
    overflow: hidden;
}

.festival-details-modal .modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="10" cy="50" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="30" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.festival-details-modal .modal-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.festival-details-modal .modal-close {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.festival-details-modal .modal-close:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1) rotate(90deg);
}

.festival-details-modal .modal-body {
    padding: 35px;
    max-height: calc(94vh - 100px);
    overflow-y: auto;
    position: relative;
}

.festival-details-modal .modal-body::-webkit-scrollbar {
    width: 8px;
}

.festival-details-modal .modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.festival-details-modal .modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg,#fd7b21,#ff8c42);
    border-radius: 10px;
}

.festival-details-modal .festival-loading {
    text-align: center;
    padding: 60px;
    color: #666;
    font-size: 18px;
    position: relative;
}

.festival-details-modal .festival-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #fd7b21;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-top: 30px;
}

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

.festival-details-modal .festival-details-content {
    animation: fadeInUp 0.5s ease;
}

.festival-details-modal .festival-detail-header {
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 2px solid #f1f3f4;
}

.festival-details-modal .festival-detail-header h4 {
    color: #2c3e50;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 20px;
    background: linear-gradient(135deg,#fd7b21,#ff8c42);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.festival-details-modal .festival-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid #dee2e6;
}

.festival-details-modal .festival-meta span {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.festival-details-modal .festival-meta span:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.festival-details-modal .festival-meta i {
    color: #667eea;
    width: 18px;
    text-align: center;
    font-size: 16px;
}

.festival-details-modal .festival-description {
    margin-bottom: 35px;
    line-height: 1.8;
    color: #5a6c7d;
    font-size: 16px;
    text-align: justify;
    background: white;
    padding: 25px;
    border-radius: 15px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.festival-details-modal .festival-facilities,
.festival-details-modal .festival-organizer,
.festival-details-modal .festival-map {
    margin-bottom: 30px;
    background: white;
    padding: 25px;
    border-radius: 15px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.festival-details-modal .festival-facilities h5,
.festival-details-modal .festival-organizer h5,
.festival-details-modal .festival-map h5 {
    color: #2c3e50;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #fd7b21;
    display: inline-block;
}

.festival-details-modal .festival-facilities ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.festival-details-modal .festival-facilities li {
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
}

.festival-details-modal .festival-facilities li:hover {
    background: linear-gradient(135deg,#fd7b21,#ff8c42);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(253,123,33,0.3);
}

.festival-details-modal .festival-facilities li:hover i {
    color: white;
}

.festival-details-modal .festival-facilities i {
    color: #28a745;
    width: 20px;
    font-size: 18px;
}

.festival-details-modal .festival-organizer p {
    color: #5a6c7d;
    line-height: 1.6;
    margin: 0;
    font-size: 16px;
}

.festival-details-modal .map-placeholder {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    color: #6c757d;
    transition: all 0.3s ease;
}

.festival-details-modal .map-placeholder:hover {
    border-color: #fd7b21;
    background: linear-gradient(135deg, #fd7b21 0%, #ff8c42 100%);
}

.festival-details-modal .map-placeholder p {
    margin: 0 0 10px 0;
    font-weight: 700;
    font-size: 18px;
    color: #495057;
}

.festival-details-modal .map-placeholder small {
    color: #6c757d;
    font-size: 14px;
    display: block;
    margin-top: 10px;
}

.festival-details-modal .error {
    color: #dc3545;
    text-align: center;
    padding: 40px;
    font-size: 16px;
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-radius: 15px;
    border: 1px solid #f5c6cb;
}

/* Enhanced Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeInUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* RTL Support for Enhanced Modal */
[dir="rtl"] .festival-details-modal .modal-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .festival-details-modal .festival-meta {
    flex-direction: row-reverse;
}

[dir="rtl"] .festival-details-modal .festival-facilities li {
    flex-direction: row-reverse;
}

[dir="rtl"] .festival-details-modal .festival-facilities ul {
    direction: rtl;
}

/* Responsive Enhanced Modal */
@media (max-width: 768px) {
    .festival-details-modal .modal-content {
        width: 95%;
        margin: 10px auto;
        max-height: 95vh;
        border-radius: 15px;
    }
    
    .festival-details-modal .modal-header {
        padding: 20px 25px;
    }
    
    .festival-details-modal .modal-title {
        font-size: 20px;
    }
    
    .festival-details-modal .modal-body {
        padding: 25px;
    }
    
    .festival-details-modal .festival-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .festival-details-modal .festival-detail-header h4 {
        font-size: 22px;
    }
    
    .festival-details-modal .festival-facilities ul {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .festival-details-modal .modal-content {
        width: 98%;
        margin: 5px auto;
        border-radius: 10px;
    }
    
    .festival-details-modal .modal-header {
        padding: 15px 20px;
    }
    
    .festival-details-modal .modal-body {
        padding: 20px;
    }
    
    .festival-details-modal .modal-title {
        font-size: 18px;
    }
    
    .festival-details-modal .modal-close {
        font-size: 24px;
        width: 35px;
        height: 35px;
    }
    
    .festival-details-modal .festival-detail-header h4 {
        font-size: 20px;
    }
    
    .festival-details-modal .festival-meta span {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .festival-details-modal .festival-description {
        padding: 20px;
        font-size: 15px;
    }
    
    .festival-details-modal .festival-facilities,
    .festival-details-modal .festival-organizer,
    .festival-details-modal .festival-map {
        padding: 20px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .festival-details-modal .modal-content {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        color: white;
    }
    
    .festival-details-modal .festival-description {
        background: rgba(255,255,255,0.05);
        color: #ecf0f1;
    }
    
    .festival-details-modal .festival-facilities,
    .festival-details-modal .festival-organizer,
    .festival-details-modal .festival-map {
        background: rgba(255,255,255,0.05);
        color: #ecf0f1;
    }
    
    .festival-details-modal .festival-facilities li {
        background: rgba(255,255,255,0.1);
        color: white;
    }
}
