/* Modern Modal Styles */
.modal {
    --primary-color: #262262;
    --secondary-color: #EF4036;
    --white-color: #ffffff;
    --transition-speed: 0.5s;
    --border-radius: 16px;
}

.modal-content {
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(38, 34, 98, 0.25);
    transform: scale(0.95) translateY(20px);
    opacity: 0;
    transition: all var(--transition-speed) cubic-bezier(0.34, 1.56, 0.64, 1);
    background: linear-gradient(145deg, #f9f9ff 0%, #ffffff 100%);
    border: 1px solid rgba(239, 64, 54, 0.1);
}

.modal.show .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Creative Header Design */
.modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3a2a8a 100%);
    color: var(--white-color);
    padding: 1.75rem;
    border-bottom: none;
    position: relative;
    overflow: hidden;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(239, 64, 54, 0.15) 0%, transparent 70%);
    transform: rotate(30deg);
}

.modal-title {
    font-weight: 800;
    font-size: 1.75rem;
    letter-spacing: 0.5px;
    position: relative;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.modal-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.btn-close {
    filter: invert(1) brightness(2);
    opacity: 0.8;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    transform: scale(0.9);
}

.btn-close:hover {
    opacity: 1;
    transform: scale(1.1) rotate(90deg);
}

/* Stylish Modal Body */
.modal-body {
    padding: 2.5rem;
    background-color: var(--white-color);
    position: relative;
}

.modal-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(90deg, var(--secondary-color) 0%, var(--primary-color) 100%);
}

.service-item {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(38, 34, 98, 0.08);
    transition: all 0.4s ease;
    position: relative;
    padding-left: 1.5rem;
}

.service-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(to bottom, var(--secondary-color) 0%, var(--primary-color) 100%);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.service-item:hover {
    transform: translateX(8px);
    border-bottom-color: rgba(239, 64, 54, 0.2);
}

.service-item:hover::before {
    width: 6px;
}

.service-item h6 {
    color: var(--primary-color);
    margin-bottom: 1.25rem;
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.service-item h6::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    margin-right: 12px;
    box-shadow: 0 0 0 4px rgba(239, 64, 54, 0.2);
}

.service-item ul {
    padding-left: 24px;
}

/* Add this to your existing modal CSS */
.service-item li {
    position: relative;
    padding: 0.6rem 0;
    padding-left: 2rem;
    margin-left: -1.5rem;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-left: 2px solid transparent;
}

.service-item li::before {
    content: '\f054';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 0.5rem;
    color: var(--secondary-color);
    font-size: 0.8rem;
    top: 1rem;
    transition: all 0.3s ease;
}

.service-item li:hover {
    padding-left: 2.5rem;
    border-left-color: var(--secondary-color);
    background: linear-gradient(to right, rgba(239, 64, 54, 0.03) 0%, transparent 80%);
}

.service-item li:hover::before {
    left: 0.8rem;
    color: var(--primary-color);
    transform: scale(1.2);
}

/* Animated left line effect */
.service-item li::after {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    height: 0;
    width: 2px;
    background: var(--secondary-color);
    transition: height 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.service-item li:hover::after {
    height: 100%;
}

/* Adjust spacing for the animation */
.service-item ul {
    padding-left: 1.5rem;
}

.service-item li {
    margin-bottom: 0.5rem;
}

/* Animated Footer */
.modal-footer {
    background: linear-gradient(to right, rgba(38, 34, 98, 0.03) 0%, rgba(239, 64, 54, 0.03) 100%);
    border-top: none;
    padding: 1.75rem 2.5rem;
    display: flex;
    justify-content: space-between;
    position: relative;
}

.modal-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 1px;
    background: linear-gradient(to right, transparent 0%, rgba(38, 34, 98, 0.1) 50%, transparent 100%);
}

.modal-footer .btn {
    border: none;
    border-radius: 50px;
    padding: 0.9rem 2.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(38, 34, 98, 0.1);
    text-transform: uppercase;
    font-size: 0.85rem;
}

.modal-footer .btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3a2a8a 100%);
    color: white;
}

.modal-footer .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(38, 34, 98, 0.3);
}

.modal-footer .btn-primary:active {
    transform: translateY(1px);
}

.modal-footer .btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
    transform: translateX(-100%);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.modal-footer .btn-primary:hover::after {
    transform: translateX(100%);
}

/* Creative Animations */
@keyframes floatIn {
    0% {
        transform: translateY(30px) scale(0.98);
        opacity: 0;
    }

    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes listItemIn {
    0% {
        opacity: 0;
        transform: translateX(-10px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.modal.show .modal-content {
    animation: floatIn var(--transition-speed) cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.service-item li {
    animation: listItemIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    opacity: 0;
}

.service-item li:nth-child(1) {
    animation-delay: 0.1s;
}

.service-item li:nth-child(2) {
    animation-delay: 0.2s;
}

.service-item li:nth-child(3) {
    animation-delay: 0.3s;
}

.service-item li:nth-child(4) {
    animation-delay: 0.4s;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        margin: 1rem;
    }

    .modal-header {
        padding: 1.25rem;
    }

    .modal-title {
        font-size: 1.4rem;
    }

    .modal-body {
        padding: 1.75rem;
    }

    .modal-footer {
        padding: 1.25rem;
        flex-direction: column;
        gap: 0.75rem;
    }

    .modal-footer .btn {
        width: 100%;
        padding: 0.8rem;
    }

    .service-item {
        margin-bottom: 1.75rem;
        padding-bottom: 1.25rem;
    }
}

/* Custom Scrollbar for Modal */
.modal-dialog-scrollable .modal-body {
    scrollbar-width: thin;
    scrollbar-color: var(--secondary-color) rgba(38, 34, 98, 0.1);
}

/* Webkit (Chrome, Safari, Edge) */
.modal-dialog-scrollable .modal-body::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.modal-dialog-scrollable .modal-body::-webkit-scrollbar-track {
    background: rgba(38, 34, 98, 0.05);
    border-radius: 10px;
    margin: 5px 0;
}

.modal-dialog-scrollable .modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--secondary-color), #ff6b6b);
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background-clip: padding-box;
}

.modal-dialog-scrollable .modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Firefox */
.modal-dialog-scrollable .modal-body {
    scrollbar-width: thin;
    scrollbar-color: var(--secondary-color) rgba(38, 34, 98, 0.1);
}

/* Scrollbar Animation */
@keyframes scrollbarPulse {
    0% {
        background: var(--secondary-color);
    }

    50% {
        background: #ff5252;
    }

    100% {
        background: var(--secondary-color);
    }
}

.modal-dialog-scrollable .modal-body::-webkit-scrollbar-thumb:active {
    animation: scrollbarPulse 1.5s infinite;
}

/* Scrollbar Corner */
.modal-dialog-scrollable .modal-body::-webkit-scrollbar-corner {
    background: transparent;
}

/* Custom Scrollbar for Modal - Transparent with No Arrows */
.modal-dialog-scrollable .modal-body {
    scrollbar-width: thin;
    scrollbar-color: var(--secondary-color) transparent;
    overflow-y: auto;
}

/* WebKit (Chrome, Safari) Scrollbar */
.modal-dialog-scrollable .modal-body::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.modal-dialog-scrollable .modal-body::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
    margin: 4px 0;
}

.modal-dialog-scrollable .modal-body::-webkit-scrollbar-thumb {
    background-color: var(--secondary-color);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
    transition: background-color 0.3s ease;
}

.modal-dialog-scrollable .modal-body::-webkit-scrollbar-thumb:hover {
    background-color: #e8352c;
}

/* Completely remove all scrollbar buttons/arrows */
.modal-dialog-scrollable .modal-body::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

.modal-dialog-scrollable .modal-body::-webkit-scrollbar-corner {
    background: transparent;
}

/* Firefox scrollbar customization */
@supports (-moz-appearance: none) {
    .modal-dialog-scrollable .modal-body {
        scrollbar-width: thin;
        scrollbar-color: var(--secondary-color) transparent;
    }
}