/* Modal Components - Mobile First */

/* Base Modal Styles */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    width: 100%;
    height: 100%;
    overflow: hidden;
    outline: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 0.5rem;
    max-width: 500px;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    outline: 0;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    border-top-left-radius: calc(0.5rem - 1px);
    border-top-right-radius: calc(0.5rem - 1px);
}

.modal-title {
    margin-bottom: 0;
    line-height: 1.5;
    font-size: 1.25rem;
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1.5rem;
}

/* Quick Contact Modal Styles */
.service-link {
    text-decoration: none;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.service-link:hover {
    background: #e9ecef;
    transform: translateX(5px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.service-link i {
    font-size: 1.25rem;
    color: #0d6efd;
    width: 24px;
    text-align: center;
}

.service-link strong {
    color: #0d6efd;
    font-size: 0.95rem;
    display: block;
}

.service-link p {
    font-size: 0.85rem;
    margin-top: 2px;
}

/* Modal Services Links */
.modal-body .services-list {
    margin: 1rem 0;
}

.modal-body .services-list a {
    display: flex;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.75rem;
    text-decoration: none;
    color: #2c3e50;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.modal-body .services-list a:hover {
    background: #e9ecef;
    transform: translateX(5px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.modal-body .services-list a i,
.modal-body .services-list a img {
    margin-right: 1rem;
    font-size: 1.5rem;
    color: #0d6efd;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body .services-list .service-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #0d6efd;
}

.modal-body .services-list .service-description {
    font-size: 0.875rem;
    color: #6c757d;
    margin: 0;
}

.modal-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    padding: 1rem;
    border-top: 1px solid #dee2e6;
    border-bottom-right-radius: calc(0.5rem - 1px);
    border-bottom-left-radius: calc(0.5rem - 1px);
}

.modal-footer > * {
    margin: 0.25rem;
}

/* Modal Animations */

.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -50px);
}

.modal.show .modal-dialog {
    transform: none;
}

/* Modal Sizes and Responsive */

/* Tablet and up */
@media (min-width: 768px) {
    .modal-dialog {
        margin: 1.75rem auto;
        max-width: 500px;
    }

    .modal-sm {
        max-width: 300px;
    }
}

/* Desktop and up */
@media (min-width: 992px) {
    .modal-lg {
        max-width: 800px;
    }

    .modal-xl {
        max-width: 1140px;
    }

    .modal-body {
        padding: 2rem;
    }

    .modal-header,
    .modal-footer {
        padding: 1.5rem;
    }
}
    
    .modal-content {
        border-radius: 12px;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .modal-footer > * {
        margin: 0.25rem 0;
    }

/* Floating Contact Button */
.floating-btn {
    position: fixed;
    z-index: 1070;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgb(13 110 253 / 25%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #0d6efd;
    color: white;
    border: none;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgb(13 110 253 / 25%);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgb(13 110 253 / 0.35%);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgb(13 110 253 / 25%);
    }
}

.floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgb(13 110 253 / 0.4%);
    animation: none;
}

.floating-btn.contact {
    right: 20px;
    bottom: 20px;
}

@media (max-width: 768px) {
    .floating-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

/* Modal Backdrop */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    width: 100vw;
    height: 100vh;
    background-color: #000;
}

.modal-backdrop.fade {
    opacity: 0;
}

.modal-backdrop.show {
    opacity: 0.5;
}
