/* ============================================
   Service Modal System
   ============================================ */

/* Service card updated styling */
.service-link {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.service-link:hover {
    color: var(--color-accent);
    gap: 0.75rem;
}

/* Service Modal */
.service-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease-out;
}

.service-modal.active {
    display: flex;
}

.service-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.service-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
    z-index: 1;
}

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

.service-modal-header {
    background: linear-gradient(135deg, #2E6E9E 0%, #1f4d6b 100%);
    color: white;
    padding: 2rem;
    border-radius: 16px 16px 0 0;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: sticky;
    top: 0;
    z-index: 2;
}

.service-modal-icon {
    font-size: 3.5rem;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.service-modal-title {
    flex-grow: 1;
}

.service-modal-title h2 {
	color: white;
    font-size: 1.75rem;
    margin: 0;
    line-height: 1.3;
}

.service-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.service-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.service-modal-body {
    padding: 2rem;
}

.service-modal-description {
    color: #4A4A4A;
    line-height: 1.8;
    font-size: 1.0625rem;
    margin-bottom: 2rem;
    white-space: pre-line; /* Preserve line breaks from textarea */
}

.service-modal-description p {
    margin-bottom: 1rem;
}

.service-modal-description ul,
.service-modal-description ol {
    margin: 1rem 0 1rem 1.5rem;
}

.service-modal-description li {
    margin-bottom: 0.5rem;
}

.service-modal-cta {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    border: 2px solid #e0e0e0;
}

.service-modal-cta h3 {
    color: #2E6E9E;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.service-modal-cta p {
    color: #666;
    margin-bottom: 1.5rem;
}

.service-modal-cta .btn {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .service-modal {
        padding: 0;
        align-items: flex-end;
    }
    
    .service-modal-content {
        max-height: 90vh;
        border-radius: 16px 16px 0 0;
        animation: slideUpMobile 0.3s ease-out;
    }
    
    @keyframes slideUpMobile {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
    
    .service-modal-header {
        padding: 1.5rem;
        flex-wrap: wrap;
    }
    
    .service-modal-icon {
        font-size: 2.5rem;
    }
    
    .service-modal-title h2 {
        font-size: 1.5rem;
    }
    
    .service-modal-body {
        padding: 1.5rem;
    }
    
    .service-modal-description {
        font-size: 1rem;
    }
    
    .service-modal-cta {
        padding: 1.5rem;
    }
}

/* Smooth scrollbar for modal */
.service-modal-content::-webkit-scrollbar {
    width: 8px;
}

.service-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.service-modal-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.service-modal-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

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