/**
 * Service Modals Component Styles
 * 
 * This file contains the CSS styles for the service modals component.
 * Modern, responsive design with improved user experience and accessibility.
 */

/* Modal Base Styles */
.service-modals {
    /* Container for all modals */
}

.service-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    overflow-y: auto;
}

.service-modal.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 1001;
    backdrop-filter: blur(4px);
}

.modal-container {
    position: relative;
    background-color: var(--card-bg, #fff);
    margin: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    box-shadow: none;
    z-index: 1002;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: none;
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}


/* Modal Header */
.modal-header {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    background-color: var(--accent-color, #ff8c00);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
    transition: border-color 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    flex-grow: 1;
}

.modal-header .service-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    margin-right: 1rem;
    flex-shrink: 0;
    font-size: 1.125rem;
}

/* Back button styles */
.modal-back {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    margin-right: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s, transform 0.2s;
}

.modal-back:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateX(-2px);
}

.modal-back:active {
    transform: translateX(-1px);
}

.modal-back svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* Close button styles */
.modal-close {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s, transform 0.2s;
}

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

.modal-close svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* Modal Content */
.modal-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    scroll-behavior: smooth;
}

.modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* New Design for service image and intro */
.service-intro {
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: var(--bg-secondary, #ffffff);
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    transition: background-color 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 768px) {
    .service-intro {
        flex-direction: row;
        min-height: 300px;
    }
}

.service-image-container {
    position: relative;
    overflow: hidden;
    min-height: 200px;
    flex: 1;
}

@media (min-width: 768px) {
    .service-image-container {
        flex: 0 0 45%;
    }
}

.service-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.6s ease;
}

.service-intro:hover .service-image {
    transform: scale(1.05);
}

.service-intro-content {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    background-color: var(--card-bg, #fff);
    transition: background-color 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.service-intro-badge {
    display: inline-flex;
    align-items: center;
    background-color: rgba(var(--accent-color-rgb, 255, 140, 0), 0.1);
    color: var(--accent-color, #ff8c00);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    margin-bottom: 1.25rem;
    align-self: flex-start;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.service-title-container {
    margin-bottom: 1.5rem;
}

.service-title-main {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--text-primary, #111827);
    transition: color 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    line-height: 1.2;
}

.service-tagline {
    font-size: 1.125rem;
    color: var(--text-secondary, #4b5563);
    margin: 0;
    transition: color 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    line-height: 1.5;
}

/* Content Wrapper */
.service-content-wrapper {
    padding: 2rem;
    background-color: var(--bg-primary, #f3f4f6);
    transition: background-color 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.service-detailed-content {
    font-size: 1.125rem;
    line-height: 1.75;
    margin-bottom: 2rem;
    color: var(--text-secondary, #4a5568);
    background-color: var(--card-bg, #fff);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color, #e5e7eb);
    transition: color 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                background-color 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.service-detailed-content p {
    margin-bottom: 1.5rem;
}

.service-detailed-content p:last-child {
    margin-bottom: 0;
}

/* Service Sections */
.service-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.service-section {
    background-color: var(--card-bg, #fff);
    border-radius: 0.5rem;
    padding: 1.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color, #e5e7eb);
    transition: background-color 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.3s ease,
                border-color 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.service-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.section-title {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text-primary, #2d3748);
    transition: color 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-title svg {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
    color: var(--accent-color, #ff8c00);
    transition: color 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.benefits-list,
.features-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.benefits-list li,
.features-list li {
    padding-left: 1.75rem;
    position: relative;
    margin-bottom: 0.75rem;
    color: var(--text-secondary, #4a5568);
    transition: color 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.3s ease;
}

.benefits-list li:hover,
.features-list li:hover {
    transform: translateX(5px);
}

.benefits-list li:before,
.features-list li:before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 1rem;
    height: 1rem;
    background-color: var(--accent-color, #ff8c00);
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    transition: background-color 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Process Steps */
.process-steps {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.process-step {
    display: flex;
    align-items: flex-start;
    transition: transform 0.3s ease;
}

.process-step:hover {
    transform: translateX(5px);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background-color: var(--accent-color, #ff8c00);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    margin-right: 1rem;
    flex-shrink: 0;
    transition: background-color 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.3s ease;
}

.process-step:hover .step-number {
    transform: scale(1.1);
}

.step-content {
    flex: 1;
    padding-top: 0.25rem;
    color: var(--text-secondary, #4a5568);
    transition: color 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Testimonial */
.service-testimonial {
    background-color: var(--card-bg, #fff);
    border-radius: 0.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color, #e5e7eb);
    transition: background-color 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.3s ease,
                border-color 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
}

.service-testimonial:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.testimonial-quote {
    position: absolute;
    top: 1rem;
    left: 1rem;
    opacity: 0.1;
    transition: opacity 0.3s ease;
}

.service-testimonial:hover .testimonial-quote {
    opacity: 0.15;
}

.testimonial-quote svg {
    width: 3rem;
    height: 3rem;
    color: var(--accent-color, #ff8c00);
    transition: color 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.service-testimonial blockquote {
    font-size: 1.125rem;
    line-height: 1.75;
    font-style: italic;
    margin: 0 0 1.5rem 0;
    padding: 0;
    color: var(--text-secondary, #4a5568);
    transition: color 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    z-index: 1;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.author-name {
    font-weight: 600;
    color: var(--text-primary, #2d3748);
    transition: color 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.author-location {
    font-size: 0.875rem;
    color: var(--text-secondary, #718096);
    transition: color 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Modal Footer */
.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color, #e5e7eb);
    text-align: center;
    position: sticky;
    bottom: 0;
    background-color: var(--card-bg, #fff);
    z-index: 10;
    transition: background-color 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-cta-button {
    display: inline-block;
    background-color: var(--accent-color, #ff8c00);
    color: white;
    font-weight: 600;
    padding: 0.75rem 2.5rem;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
    font-size: 1.125rem;
}

.modal-cta-button:hover {
    background-color: var(--accent-hover, #e67e00);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-cta-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
}

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

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

.modal-container {
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Mode Support - using data-theme attribute for consistency */
[data-theme="dark"] .modal-container {
    color: var(--text-primary, #e2e8f0);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4), 0 5px 10px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--border-color, #4b5563);
    background-color: var(--card-bg, #374151);
}

[data-theme="dark"] .modal-header {
    border-bottom-color: var(--border-color, #4a5568);
}

[data-theme="dark"] .service-intro {
    border-bottom-color: var(--border-color, #4a5568);
}

[data-theme="dark"] .service-intro-content {
    background-color: var(--card-bg, #374151);
}

[data-theme="dark"] .service-content-wrapper {
    background-color: var(--bg-primary, #111827);
}

[data-theme="dark"] .service-section {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3), 0 3px 5px rgba(0, 0, 0, 0.2);
    border: 2px solid var(--border-color, #4b5563);
    background-color: var(--card-bg, #374151);
}

[data-theme="dark"] .service-section:hover {
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.4), 0 6px 10px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .service-detailed-content {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3), 0 3px 5px rgba(0, 0, 0, 0.2);
    border: 2px solid var(--border-color, #4b5563);
    background-color: var(--card-bg, #374151);
}

[data-theme="dark"] .service-testimonial {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3), 0 3px 5px rgba(0, 0, 0, 0.2);
    border: 2px solid var(--border-color, #4b5563);
    background-color: var(--card-bg, #374151);
}

[data-theme="dark"] .service-testimonial:hover {
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.4), 0 6px 10px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .modal-footer {
    border-top-color: var(--border-color, #4b5563);
    border-top-width: 2px;
}

[data-theme="dark"] .service-intro-badge {
    background-color: rgba(var(--accent-color-rgb, 255, 159, 28), 0.15);
}

/* Responsive Adjustments */
@media (min-width: 1200px) {
    .modal-container {
        max-width: 1100px;
    }
    
    .service-sections {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    .service-sections {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .service-sections {
        grid-template-columns: 1fr;
    }
    
    .service-title-main {
        font-size: 1.75rem;
    }
    
    .service-intro-content {
        padding: 1.5rem;
    }
    
    .modal-container {
        margin: 1rem auto;
        min-height: calc(100vh - 2rem);
        max-height: calc(100vh - 2rem);
        width: 95%;
    }
}

@media (max-width: 640px) {
    .modal-container {
        width: 100vw;
        height: 100vh;
        margin: 0 !important;
        border-radius: 0 !important;
    }
    
    
    
    .modal-header {
        padding: 1rem;
    }
    
    .service-content-wrapper {
        padding: 1.25rem;
    }
    
    .service-detailed-content {
        padding: 1.5rem;
    }
    
    .service-title-main {
        font-size: 1.5rem;
    }
    
    .service-section {
        padding: 1.25rem;
    }
    
    .modal-footer {
        padding: 1.25rem;
    }
    
    .service-sections {
        gap: 1.25rem;
        margin-bottom: 1.25rem;
    }
}

/* Clickable Service Items */
.service-item[data-modal-target] {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.service-item[data-modal-target]:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1), 0 3px 5px rgba(0, 0, 0, 0.05);
}

.service-item[data-modal-target]:after {
    content: "";
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    background-color: var(--accent-color, #ff8c00);
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E");
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.service-item[data-modal-target]:hover:after {
    opacity: 1;
    transform: translate(5px, -50%);
}

/* Accessibility improvements */
.modal-close:focus,
.modal-back:focus,
.modal-cta-button:focus {
    outline: 2px solid var(--accent-color, #ff8c00);
    outline-offset: 2px;
}

/* Additional animation for opening items */
.service-detailed-content,
.service-section,
.service-testimonial {
    animation: fadeIn 0.5s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.service-section:nth-child(2) {
    animation-delay: 0.3s;
}

.service-section:nth-child(3) {
    animation-delay: 0.4s;
}

.service-testimonial {
    animation-delay: 0.5s;
}