/**
 * Service Modal Styles
 * Modern, accessible modal implementation for service details
 */

/* Modal Container */
.service-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
}

.service-modal.is-active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

/* Modal Overlay */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 34, 68, 0.9); /* Navy blue overlay */
    cursor: pointer;
    animation: fadeIn 0.3s ease;
}

/* Modal Content */
.modal-content {
    position: relative;
    background: var(--color-white);
    border-radius: var(--radius-xl);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
}

/* Close Button */
.modal-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: var(--color-white);
    border: 2px solid var(--color-gray-light);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    z-index: 10;
}

.modal-close:hover {
    background: var(--color-gray-light);
    border-color: var(--color-gray);
    transform: rotate(90deg);
}

.modal-close svg {
    width: 20px;
    height: 20px;
    stroke: var(--color-gray-dark);
}

/* Modal Body */
.modal-body {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

/* Modal Image */
.modal-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Modal Text Content */
.modal-text {
    padding: var(--spacing-xl);
    padding-top: 0;
}

.modal-title {
    font-size: var(--font-size-3xl);
    color: var(--color-secondary);
    margin-bottom: var(--spacing-lg);
    font-weight: var(--font-weight-bold);
}

.modal-description {
    font-size: var(--font-size-md);
    line-height: var(--line-height-relaxed);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-xl);
}

/* Modal Features */
.modal-features {
    background: var(--color-gray-light);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-xl);
}

.modal-features h3 {
    font-size: var(--font-size-lg);
    color: var(--color-secondary);
    margin-bottom: var(--spacing-md);
    font-weight: var(--font-weight-semibold);
}

.modal-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: var(--spacing-sm);
}

.modal-features li {
    position: relative;
    padding-left: var(--spacing-lg);
    color: var(--color-text-primary);
    font-size: var(--font-size-base);
}

.modal-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-lg);
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.modal-actions .btn {
    flex: 1;
    min-width: 200px;
    text-align: center;
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: var(--font-size-base);
}

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

/* Responsive Design */
@media (min-width: 768px) {
    .modal-body {
        flex-direction: row;
    }
    
    .modal-image {
        flex: 0 0 40%;
        height: auto;
        min-height: 400px;
        border-radius: var(--radius-xl) 0 0 var(--radius-xl);
    }
    
    .modal-text {
        flex: 1;
        padding: var(--spacing-2xl);
    }
}

@media (max-width: 767px) {
    .service-modal {
        padding: 0;
    }
    
    .modal-content {
        max-height: 100vh;
        height: 100vh;
        max-width: 100%;
        border-radius: 0;
    }
    
    .modal-image {
        height: 200px;
        border-radius: 0;
    }
    
    .modal-text {
        padding: var(--spacing-lg);
    }
    
    .modal-title {
        font-size: var(--font-size-2xl);
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
}

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

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

/* Accessibility - Focus styles */
.modal-content *:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.modal-close:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Print styles - hide modals when printing */
@media print {
    .service-modal {
        display: none !important;
    }
}