/* Modal Overlay Styles for Service Pages */
.service-modal-backdrop {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: 0;
    left: 250px;
    /* Respect Sidebar */
    width: calc(100% - 250px);
    height: 100%;
    background-color: rgba(45, 57, 68, 0.95);
    /* Main dark color #2D3944 with opacity */
    z-index: 10000;
    /* Highest priority */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-modal-backdrop.active {
    display: flex;
    opacity: 1;
}

.service-modal-content {
    position: relative;
    width: 95%;
    height: 95%;
    max-width: 1200px;
    background: white;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    border-radius: 8px;
    overflow: hidden;
    /* Prevent body scroll, use inner scroll */
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

#service-dynamic-content {
    overflow-y: auto;
    flex: 1;
    width: 100%;
}

.service-modal-backdrop.active .service-modal-content {
    transform: translateY(0);
}

.service-modal-close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    z-index: 10010;
    background: transparent;
    color: #ff6b6b;
    /* Initial Light Red */
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 40px;
    /* Larger X */
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
    /* Removed shadow/bg for pure X look, or keep if preferred */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.service-modal-close-btn:hover {
    background: transparent;
    color: #c0392b;
    /* Darker Red on Hover */
    transform: scale(1.2) rotate(90deg);
}

#service-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Mobile Adjustments */
@media (max-width: 1200px) {
    .service-modal-backdrop {
        left: 0;
        width: 100%;
    }

    .service-modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .service-modal-close-btn {
        top: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 36px;
        /* Larger for mobile visibility */
    }
}

/* =========================================
   DYNAMIC MODAL CONTENT STYLES
   (Migrated from OnePager Design)
   ========================================= */

/* OnePager Container */
.onepager-container {
    width: 100%;
    max-width: none;
    min-height: 100%;
    /* Fill available height */
    margin: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    border-radius: 0;
    box-shadow: none;
    background-color: #ffffff;
    background-image:
        linear-gradient(to bottom,
            rgba(255, 255, 255, 0.85) 0%,
            rgba(250, 250, 250, 0.8) 300px,
            rgba(235, 235, 235, 0.7) 100%),
        url('../assets/img/network-mesh.svg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

/* Hero Section */
.op-hero {
    padding: 60px 40px 40px 50px;
    margin-bottom: 30px;
}

.op-header-wrapper {
    display: flex;
    align-items: center;
    gap: 30px;
}

.op-hero-icon {
    font-size: 4rem;
    color: #e74c3c;
    line-height: 1;
    margin-bottom: 15px;
}

.op-hero h1 {
    font-size: 2.6rem;
    font-weight: 500;
    color: #2D3944;
    margin: 0;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.op-hero h1::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: #e74c3c;
    margin: 20px 0 0;
    border-radius: 2px;
}

/* Subtitle Bar */
.subtitle-bar {
    background: transparent;
    padding: 0 20px;
    text-align: center;
    margin-bottom: 100px;
}

.subtitle-bar p {
    margin: 0;
    color: #455a64;
    font-weight: 600;
    font-size: 1.8rem;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px 40px;
    padding: 0 50px;
    margin-bottom: 80px;
    position: relative;
    z-index: 2;
}

/* Info Boxes (Glassmorphism) */
.info-box {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.info-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.12);
    background: rgba(255, 255, 255, 0.8);
    z-index: 10;
}

.info-box h2 {
    color: #2D3944;
    font-size: 1.4rem;
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: 600;
    position: relative;
    display: inline-block;
    padding-bottom: 8px;
    border-bottom: none;
}

.info-box h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: #e74c3c;
}

.info-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.info-box ul li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    color: #546e7a;
    line-height: 1.6;
    font-size: 0.95rem;
}

.info-box ul li i {
    margin-right: 15px;
    color: #e74c3c;
    min-width: 20px;
    text-align: center;
    margin-top: 5px;
    font-size: 1rem;
}

.simple-text {
    font-size: 1.1rem;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 600;
}

.simple-text i {
    color: #e74c3c;
    font-size: 1.2rem;
}

/* Footer / CTA Area */
.op-footer {
    background: transparent;
    padding: 15px 30px 30px;
    margin-top: auto;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

.footer-cta {
    text-align: center;
    margin-bottom: 30px;
}

.footer-cta h3 {
    font-size: 2rem;
    color: #2D3944;
    margin-bottom: 15px;
    font-weight: 300;
}

.footer-cta p {
    color: #546e7a;
    font-size: 1.1rem;
}

.footer-btn-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 25px;
}

/* Action Buttons */
.modal-btn {
    padding: 12px 30px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.4);
    filter: brightness(1.1);
}

.btn-secondary {
    background: transparent;
    border: 2px solid #2D3944;
    color: #2D3944;
}

.btn-secondary:hover {
    background: #2D3944;
    color: white;
}

/* Footer Contact Details */
.footer-contact {
    text-align: center;
    border-top: 1px solid #e0e6ed;
    padding-top: 30px;
}

.footer-name {
    font-size: 1.4rem;
    margin: 0;
    color: #2D3944;
}

.footer-subline {
    display: block;
    color: #78909c;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.contact-list {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-list a {
    text-decoration: none;
    color: #546e7a;
    font-weight: 600;
    transition: color 0.3s;
}

.contact-list a:hover {
    color: #e74c3c;
}

.contact-list i {
    color: #e74c3c;
}

/* Popup Contact Form Styles */
.popup-contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.popup-contact-form .form-group {
    width: 100%;
    margin-bottom: 0;
}

.popup-contact-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.9em;
    color: #2c3e50;
    text-align: left;
}

.popup-contact-form input,
.popup-contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #dce4ec;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1em;
    background: #fdfdfd;
}

.popup-contact-form textarea {
    resize: vertical;
    min-height: 80px;
}

.popup-contact-form .checkbox-group {
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
}

.popup-contact-form .checkbox-group input {
    width: auto;
    margin-top: 3px;
}

.popup-contact-form .submit-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
}

.popup-contact-form .submit-btn:hover {
    transform: translateY(-2px);
}

/* Responsive Fixes */
@media (max-width: 1200px) {
    .op-hero {
        padding: 30px 20px;
    }

    .op-header-wrapper {
        align-items: flex-start;
        gap: 15px;
    }

    .op-hero-icon {
        font-size: 3rem;
        margin-top: 5px;
        min-width: 50px;
    }

    .op-hero h1 {
        font-size: 1.8rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        max-width: 100%;
    }

    .content-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }

    .info-box {
        padding: 20px;
    }

    .footer-btn-group {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        width: 100%;
    }

    .modal-btn {
        flex: 1;
        width: auto;
        min-width: 0;
        justify-content: center;
        padding: 12px 10px;
        white-space: nowrap;
    }

    .contact-list {
        flex-direction: column;
        gap: 15px;
        align-items: center;
        /* Center items horizontally */
    }
}