/* Modal Base Styles */
.service-modal {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

/* Visible state */
.service-modal.is-visible {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* Modal Overlay */
.service-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

/* Modal Dialog */
.service-modal__dialog {
    position: relative;
    max-width: 600px;
    max-height: 80vh;
    margin: 10vh auto 0;
    background: #141e27; /* Primary color */
    border: 1px solid rgba(192, 143, 55, 0.3); /* Accent color with opacity */
    border-radius: 8px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 15px rgba(192, 143, 55, 0.2);
    color: #ebeadb; /* Secondary color for text */
    transform: translateY(0);
    animation: slideIn 0.4s ease-out;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #c08f37 rgba(255, 255, 255, 0.08);
}

.service-modal__dialog::-webkit-scrollbar {
    width: 8px;
}

.service-modal__dialog::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
}

.service-modal__dialog::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #fcb044, #c08f37);
    border-radius: 999px;
    border: 1px solid rgba(20, 30, 39, 0.6);
}

.service-modal__dialog::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ffd27a, #fcb044);
}

/* Close button */
.service-modal__close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(252, 176, 68, 0.5);
    border-radius: 999px;
    color: #fcb044; /* Accent light color */
    background: rgba(252, 176, 68, 0.08);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 10px 18px -8px rgba(0, 0, 0, 0.45);
}

[dir="rtl"] .service-modal__close {
    right: 1rem;
    left: auto;
}

.service-modal__close:hover {
    background: linear-gradient(135deg, #ffd27a, #fcb044);
    color: #141e27;
    transform: scale(1.05) rotate(8deg);
    border-color: #ffd27a;
    box-shadow: 0 15px 24px -12px rgba(252, 176, 68, 0.5);
}

/* Modal Content Styling */
.service-modal__content h3 {
    color: #fcb044; /* Accent light color */
    margin-bottom: 1rem;
}

.service-modal__content p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.service-modal__list {
    list-style-type: none;
    padding: 0;
}

.service-modal__list li {
    position: relative;
    padding-right: 1.5rem;
    margin-bottom: 0.75rem;
}

.service-modal__list li:before {
    content: "•";
    color: #c08f37; /* Accent color */
    font-weight: bold;
    display: inline-block;
    width: 1.5rem;
    margin-right: -1.5rem;
}

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

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

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

/* Responsive styles for modals */
@media (max-width: 768px) {
    .service-modal__dialog {
        max-width: 90%;
        max-height: 85vh;
        margin: 5vh auto 0;
        padding: 1.5rem;
    }
    
    .service-modal__close {
        top: 0.5rem;
        left: 0.5rem;
        font-size: 1.5rem;
    }
    
    .service-modal__content h3 {
        font-size: 1.5rem;
    }
}

/* Right-to-left adjustments for Arabic */
[dir="rtl"] .service-modal__close {
    left: 1rem;
    right: auto;
}

[dir="rtl"] .service-modal__list li {
    padding-right: 0;
    padding-left: 1.5rem;
}

[dir="rtl"] .service-modal__list li:before {
    margin-right: 0;
    margin-left: -1.5rem;
}

/* Modal image styles */
.service-modal__image {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(192, 143, 55, 0.15);
}

.service-modal__image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}
