/* Modal System Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    padding: 20px;
    overflow-y: hidden;
}

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

.policy-modal {
    background: linear-gradient(145deg, #1a1a1a, #2a2a2a);
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    max-height: 85vh;
    position: relative;
    transform: translateY(50px) scale(0.9);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid #3a3a3a;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.modal-overlay.active .policy-modal {
    transform: translateY(0) scale(1);
}

.modal-header {
    background: linear-gradient(135deg, #e63946, #ff4757);
    padding: 30px;
    border-bottom: 1px solid #3a3a3a;
    position: relative;
}

.modal-header h2 {
    color: #ffffff;
    margin: 0;
    font-size: 2rem;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.modal-header i {
    font-size: 1.8rem;
    opacity: 0.9;
}

.modal-close {
    position: absolute;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.1);
}

.modal-body {
    max-height: calc(85vh - 180px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #e63946 #2a2a2a;
}

.modal-body::-webkit-scrollbar {
    width: 10px;
}

.modal-body::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 5px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #e63946, #ff4757);
    border-radius: 5px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ff4757, #e63946);
}

.modal-content {
    padding: 40px;
    color: #e0e0e0;
    line-height: 1.8;
    font-size: 1rem;
    display: flex;
    flex-direction: column;
}

.modal-content h3 {
    color: #ffffff;
    font-size: 1.5rem;
    margin: 35px 0 20px 0;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    position: relative;
    padding-left: 25px;
}

.modal-content h3:first-child {
    margin-top: 0;
}

.modal-content h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 25px;
    background: linear-gradient(135deg, #e63946, #ff4757);
    border-radius: 3px;
}

.modal-content h4 {
    color: #e63946;
    font-size: 1.2rem;
    margin: 25px 0 15px 0;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
}

.modal-content p {
    margin-bottom: 18px;
    text-align: justify;
    color: #d0d0d0;
}

.modal-content ul {
    margin: 20px 0;
    padding-left: 30px;
}

.modal-content li {
    margin-bottom: 12px;
    position: relative;
    color: #d0d0d0;
}

.modal-content li::marker {
    color: #e63946;
}

.modal-content strong {
    color: #ffffff;
    font-weight: 600;
}

.modal-content em {
    color: #ff4757;
    font-style: italic;
}

.contact-infoz {
    background: linear-gradient(135deg, #2a2a2a, #3a3a3a);
    padding: 25px;
    border-radius: 15px;
    margin: 30px 0;
    border-left: 5px solid #e63946;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.contact-infoz h4 {
    color: #ffffff;
    margin: 0 0 15px 0;
    font-size: 1.3rem;
    font-family: 'Cinzel', serif;
}

.contact-infoz p {
    margin: 8px 0;
    color: #cccccc;
}

.contact-infoz a {
    color: #e63946;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-infoz a:hover {
    color: #ff4757;
    text-decoration: underline;
}

.modal-footer {
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    padding: 25px 40px;
    border-top: 1px solid #3a3a3a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.last-updated {
    color: #888;
    font-size: 0.95rem;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 8px;
}

.last-updated i {
    color: #e63946;
}

.modal-actions {
    display: flex;
    gap: 15px;
}

.btn-close {
    background: linear-gradient(45deg, #e63946, #ff4757);
    color: #ffffff;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}

.btn-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(230, 57, 70, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 15px;
    }
    
    .policy-modal {
        max-height: 90vh;
        border-radius: 15px;
    }
    
    .modal-header {
        padding: 25px 20px;
    }
    
    .modal-header h2 {
        font-size: 1.6rem;
    }
    
    .modal-close {
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .modal-content {
        padding: 30px 25px;
    }
    
    .modal-content h3 {
        font-size: 1.3rem;
        padding-left: 20px;
    }
    
    .modal-content h3::before {
        width: 4px;
        height: 20px;
    }
    
    .modal-footer {
        padding: 20px 25px;
        flex-direction: column;
        text-align: center;
    }
    
    .modal-actions {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .modal-overlay {
        padding: 10px;
    }
    
    .modal-header h2 {
        font-size: 1.4rem;
        gap: 10px;
    }
    
    .modal-content {
        padding: 25px 20px;
    }
    
    .modal-content h3 {
        font-size: 1.2rem;
    }
    
    .modal-content h4 {
        font-size: 1.1rem;
    }
    
    .btn-close {
        width: 100%;
        padding: 15px;
    }
}

/* Smooth animations for content */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-overlay.active .modal-content > * {
    animation: fadeInUp 0.6s ease forwards;
}

.modal-overlay.active .modal-content > *:nth-child(1) { animation-delay: 0.1s; }
.modal-overlay.active .modal-content > *:nth-child(2) { animation-delay: 0.15s; }
.modal-overlay.active .modal-content > *:nth-child(3) { animation-delay: 0.2s; }
.modal-overlay.active .modal-content > *:nth-child(4) { animation-delay: 0.25s; }
.modal-overlay.active .modal-content > *:nth-child(5) { animation-delay: 0.3s; }
.modal-overlay.active .modal-content > *:nth-child(6) { animation-delay: 0.35s; }
.modal-overlay.active .modal-content > *:nth-child(7) { animation-delay: 0.4s; }
.modal-overlay.active .modal-content > *:nth-child(8) { animation-delay: 0.45s; }

/* Focus styles for accessibility */
.modal-close:focus,
.btn-close:focus {
    outline: 2px solid #ff4757;
    outline-offset: 2px;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}