/* ==========================================
   MODAL POP-UP STYLES
   ========================================== */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* Modal Container */
.modal-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: row;
}

.modal-container.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Modal Header - Portrait di Sisi Kiri */
.modal-header {
    position: relative;
    padding: 0;
    border-bottom: none;
    overflow: hidden;
    background: #f0f0f0;
    width: 350px;
    min-width: 350px;
    flex-shrink: 0;
}

.modal-header-image {
    width: 100%;
    height: 100%;
    min-height: 600px;
    object-fit: cover;
    object-position: center center;
    display: block;
    background-color: #e0e0e0;
}

/* Untuk gambar yang terlalu kecil, pastikan tetap center */
.modal-header-image[src*="placeholder"],
.modal-header-image[src=""] {
    object-fit: contain;
    padding: 20px;
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.modal-close-btn:hover {
    background: #ffffff;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.modal-close-btn i {
    font-size: 24px;
    color: #333;
}

/* Modal Body - Di Sisi Kanan */
.modal-body {
    padding: 40px;
    max-height: 90vh;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Custom Scrollbar */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

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

.modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 100%);
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #667eea 100%);
}

/* Modal Title */
.modal-title {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 15px;
    line-height: 1.3;
}

/* Modal Badge */
.modal-badge {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 100%);
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.info-item:hover {
    background: #edf2f7;
    transform: translateY(-2px);
}

.info-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 100%);
    border-radius: 10px;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}

.info-content h6 {
    font-size: 12px;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.info-content p {
    font-size: 15px;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

/* Description Section */
.description-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #e2e8f0;
}

.description-section h5 {
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.description-section h5 i {
    color: #667eea;
}

.description-section p {
    font-size: 15px;
    line-height: 1.8;
    color: #4a5568;
    text-align: justify;
}

/* Ormawa Logo in Modal - Portrait di Sisi Kiri */
.modal-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    min-height: 100%;
    width: 350px;
    min-width: 350px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.modal-logo-container::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #667eea20 0%, #764ba220 100%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.modal-logo {
    width: 180px;
    height: 180px;
    object-fit: contain;
    object-position: center center;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.1));
    animation: logoFloat 3s ease-in-out infinite;
    position: relative;
    z-index: 1;
    display: block;
    margin: 0 auto;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Contact Section in Modal */
.contact-section-modal {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-radius: 15px;
    border-left: 4px solid #667eea;
}

.contact-section-modal h5 {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.contact-item i {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 100%);
    border-radius: 8px;
    color: white;
    font-size: 16px;
}

.contact-item span {
    font-size: 15px;
    color: #4a5568;
}

/* Action Buttons */
.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #e2e8f0;
}

.modal-btn {
    flex: 1;
    padding: 15px 25px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.modal-btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.modal-btn-secondary {
    background: #ffffff;
    color: #667eea;
    border: 2px solid #667eea;
}

.modal-btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-height: 95vh;
        flex-direction: column;
        max-width: 500px;
    }

    .modal-header {
        width: 100%;
        min-width: 100%;
        height: 300px;
    }

    .modal-header-image {
        height: 300px;
        min-height: auto;
        object-fit: cover;
        object-position: center center;
    }

    .modal-body {
        padding: 25px;
        max-height: calc(95vh - 300px);
    }

    .modal-title {
        font-size: 22px;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-logo {
        width: 120px;
        height: 120px;
        object-fit: contain;
        object-position: center center;
        display: block;
        margin: 0 auto;
    }

    .modal-logo-container {
        padding: 30px;
        min-height: 200px;
        width: 100%;
    }
    
    .modal-logo-container::before {
        width: 200px;
        height: 200px;
    }
}

/* Animation Classes */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translate(-50%, -40%) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

.slide-up {
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}