/* Modal Pro - Frontend Styles */

/* Card Styles */
.modalpro-wrapper {
    position: relative;
}

.modalpro-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #035046 0%, #06d6a0 100%);
}

.modalpro-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25) !important;
}

.modalpro-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(3, 80, 70, 0.6) 0%, rgba(6, 214, 160, 0.4) 100%);
    transition: opacity 0.3s ease;
    z-index: 1;
}

.modalpro-card:hover .modalpro-card-overlay {
    opacity: 0.5 !important;
}

.modalpro-card-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 30px;
    max-width: 90%;
}

.modalpro-card-title {
    margin: 0 0 15px 0;
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.modalpro-card-description {
    margin: 0;
    font-size: 18px;
    color: #ffffff;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
    line-height: 1.5;
    opacity: 0.95;
}

/* Modal Styles */
.modalpro-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999999 !important;
    overflow-y: auto;
    animation: modalFadeIn 0.3s ease;
}

.modalpro-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modalpro-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 9999998 !important;
}

.modalpro-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    z-index: 9999999 !important;
    animation: modalSlideIn 0.4s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.modalpro-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.modalpro-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

.modalpro-modal-header {
    padding: 40px 40px 20px 40px;
    border-bottom: 2px solid #f0f0f0;
}

.modalpro-modal-header h2 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    color: #333333;
}

.modalpro-modal-body {
    padding: 40px;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
    color: #333333;
    line-height: 1.8;
    font-size: 16px;
}

.modalpro-modal-body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 20px 0;
}

.modalpro-modal-body video,
.modalpro-modal-body iframe {
    max-width: 100%;
    border-radius: 10px;
    margin: 20px 0;
}

.modalpro-modal-body h1,
.modalpro-modal-body h2,
.modalpro-modal-body h3,
.modalpro-modal-body h4,
.modalpro-modal-body h5,
.modalpro-modal-body h6 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #035046;
}

.modalpro-modal-body p {
    margin-bottom: 20px;
}

.modalpro-modal-body ul,
.modalpro-modal-body ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

/* Animations */
@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes modalSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
}

/* Body Lock */
body.modalpro-modal-open {
    overflow: hidden;
}

/* Override Elementor z-index when modal is open */
body.modalpro-modal-open .elementor-section,
body.modalpro-modal-open .elementor-container,
body.modalpro-modal-open .elementor-widget-gallery,
body.modalpro-modal-open .elementor-gallery,
body.modalpro-modal-open [class*="elementor"] {
    z-index: auto !important;
}

body.modalpro-modal-open .modalpro-modal,
body.modalpro-modal-open .modalpro-modal * {
    z-index: inherit;
}

/* Responsive */
@media (max-width: 768px) {
    .modalpro-card-title {
        font-size: 24px;
    }
    
    .modalpro-card-description {
        font-size: 16px;
    }
    
    .modalpro-modal-content {
        width: 95%;
        max-height: 95vh;
        border-radius: 15px;
    }
    
    .modalpro-modal-header {
        padding: 30px 25px 15px 25px;
    }
    
    .modalpro-modal-header h2 {
        font-size: 24px;
    }
    
    .modalpro-modal-body {
        padding: 25px;
        max-height: calc(95vh - 120px);
        font-size: 15px;
    }
    
    .modalpro-modal-close {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .modalpro-card-title {
        font-size: 20px;
    }
    
    .modalpro-card-description {
        font-size: 14px;
    }
    
    .modalpro-modal-header h2 {
        font-size: 20px;
    }
    
    .modalpro-modal-body {
        font-size: 14px;
        padding: 20px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .modalpro-card {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }
}

/* Print Styles */
@media print {
    .modalpro-modal {
        display: none !important;
    }
}
