/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    padding: 20px;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from { 
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to { 
        opacity: 1;
        backdrop-filter: blur(10px);
    }
}

.modal-content {
    background: #1a1a1a;
    border-radius: 30px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid #333;
    position: relative;
    animation: modalSlide 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.1);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.modal-content::-webkit-scrollbar {
    display: none;
}

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

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: #333;
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: #00ff88;
    color: #000;
    transform: rotate(90deg);
}

.modal-header {
    padding: 3rem;
    text-align: center;
    border-bottom: 1px solid #333;
}

.modal-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    background: #222;
    border-radius: 25px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5rem;
}

.modal-subtitle {
    font-size: 1.1rem;
    color: #00ff88;
}

.modal-body {
    padding: 3rem;
}

.modal-description {
    color: #d0d0d0;
    line-height: 1.8;
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

/* Swiper Slider Styles */
.modal-gallery {
    width: 100%;
    height: 450px;
    margin-bottom: 2rem;
    border-radius: 15px;
    overflow: hidden;
    background: #222;
}

.modal-gallery .swiper {
    width: 100%;
    height: 100%;
    border-radius: 15px;
}

.modal-gallery .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #222;
    height: 100%;
}

.modal-gallery .swiper-slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.modal-gallery .swiper-button-next,
.modal-gallery .swiper-button-prev {
    color: #00ff88 !important;
    background: rgba(0, 0, 0, 0.8) !important;
    border-radius: 50% !important;
    width: 42px !important;
    height: 42px !important;
    border: 2px solid #00ff88 !important;
    margin-top: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

.modal-gallery .swiper-button-next:after,
.modal-gallery .swiper-button-prev:after {
    font-size: 18px !important;
    font-weight: bold !important;
}

.modal-gallery .swiper-button-next:hover,
.modal-gallery .swiper-button-prev:hover {
    background: #00ff88 !important;
    color: #000 !important;
    transform: translateY(-50%) scale(1.1) !important;
}

.modal-gallery .swiper-button-prev {
    left: 15px !important;
}

.modal-gallery .swiper-button-next {
    right: 15px !important;
}

.modal-gallery .swiper-pagination {
    bottom: 15px !important;
}

.modal-gallery .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.4) !important;
    opacity: 1 !important;
    width: 8px !important;
    height: 8px !important;
    margin: 0 4px !important;
}

.modal-gallery .swiper-pagination-bullet-active {
    background: #00ff88 !important;
    width: 24px !important;
    border-radius: 4px !important;
}

.modal-features {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.modal-features li {
    background: #222;
    padding: 1rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #d0d0d0;
}

.modal-features li::before {
    content: '✓';
    color: #00ff88;
    font-weight: bold;
    font-size: 1.2rem;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.modal-tag {
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.modal-link {
    padding: 1rem 2rem;
    border-radius: 15px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-link.primary {
    background: linear-gradient(135deg, #00ff88, #00ccff);
    color: #000;
}

.modal-link.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.3);
}

.modal-link.secondary {
    background: transparent;
    color: #00ff88;
    border: 2px solid #00ff88;
}

.modal-link.secondary:hover {
    background: #00ff88;
    color: #000;
}

/* Service Card Styles */
.service-card.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card.clickable:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 255, 136, 0.15);
    border-color: rgba(0, 255, 136, 0.3);
}

.service-price {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #00ff88, #00ccff);
    color: #000;
    border-radius: 15px;
    font-weight: 600;
    font-size: 1.1rem;
    text-align: center;
    display: inline-block;
    min-width: 120px;
}

/* Service Modal Specific Styles */
.modal-icon {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 1rem;
    line-height: 1;
}

.modal-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #00ff88;
    text-align: center;
    margin-top: 0.5rem;
    padding: 1rem;
    background: rgba(0, 255, 136, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(0, 255, 136, 0.2);
}

/* Service Modal Header Adjustments */
#service-mobile-modal .modal-header,
#service-web-modal .modal-header,
#service-games-modal .modal-header,
#service-ecommerce-modal .modal-header,
#service-desktop-modal .modal-header,
#service-crm-modal .modal-header {
    text-align: center;
    padding: 3rem 3rem 2rem;
    border-bottom: 1px solid #333;
}

/* Service Modal Body */
#service-mobile-modal .modal-body,
#service-web-modal .modal-body,
#service-games-modal .modal-body,
#service-ecommerce-modal .modal-body,
#service-desktop-modal .modal-body,
#service-crm-modal .modal-body {
    padding: 3rem;
}

#service-mobile-modal .modal-body h3,
#service-web-modal .modal-body h3,
#service-games-modal .modal-body h3,
#service-ecommerce-modal .modal-body h3,
#service-desktop-modal .modal-body h3,
#service-crm-modal .modal-body h3 {
    color: #00ff88;
    margin-bottom: 1.5rem;
    margin-top: 2rem;
    font-size: 1.3rem;
}

/* Modal Responsive */
@media (max-width: 768px) {
    .modal-content {
        border-radius: 20px;
        max-height: 95vh;
    }

    .modal-header {
        padding: 2rem;
    }

    .modal-body {
        padding: 2rem;
    }

    .modal-title {
        font-size: 2rem;
    }

    .modal-gallery {
        height: 350px;
    }

    .service-price {
        font-size: 1rem;
        min-width: 100px;
        padding: 0.4rem 0.8rem;
    }

    .modal-price {
        font-size: 1.3rem;
    }

    .modal-icon {
        font-size: 3rem;
    }

    #service-mobile-modal .modal-header,
    #service-web-modal .modal-header,
    #service-games-modal .modal-header,
    #service-ecommerce-modal .modal-header,
    #service-desktop-modal .modal-header,
    #service-crm-modal .modal-header {
        padding: 2rem 2rem 1.5rem;
    }

    #service-mobile-modal .modal-body,
    #service-web-modal .modal-body,
    #service-games-modal .modal-body,
    #service-ecommerce-modal .modal-body,
    #service-desktop-modal .modal-body,
    #service-crm-modal .modal-body {
        padding: 2rem;
    }

    .modal-features {
        grid-template-columns: 1fr;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-link {
        width: 100%;
        text-align: center;
    }
}

/* Mobile Phones */
@media (max-width: 480px) {
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        border-radius: 15px;
        max-height: 95vh;
        margin: 0;
    }
    
    .modal-close {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
    
    .modal-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .modal-body {
        padding: 0 1.5rem 1.5rem;
    }
    
    .modal-logo img {
        width: 50px;
        height: 50px;
    }
    
    .modal-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .modal-subtitle {
        font-size: 0.9rem;
    }
    
    .modal-description {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .modal-gallery {
        height: 250px;
        margin: 1.5rem 0;
    }
    
    .modal-features {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        margin: 1.5rem 0;
    }
    
    .modal-features li {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .modal-tags {
        gap: 0.5rem;
        margin: 1.5rem 0;
    }
    
    .modal-tag {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .modal-actions {
        gap: 0.8rem;
        margin-top: 1.5rem;
    }
    
    .modal-link {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
        border-radius: 8px;
    }
    
    /* Swiper navigation */
    .swiper-button-prev,
    .swiper-button-next {
        width: 35px;
        height: 35px;
    }
    
    .swiper-button-prev:after,
    .swiper-button-next:after {
        font-size: 14px;
    }
    
    .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
    }
}

/* Very Small Phones */
@media (max-width: 320px) {
    .modal {
        padding: 5px;
    }
    
    .modal-content {
        border-radius: 10px;
    }
    
    .modal-header {
        padding: 1rem 1rem 0.5rem;
    }
    
    .modal-body {
        padding: 0 1rem 1rem;
    }
    
    .modal-title {
        font-size: 1.3rem;
    }
    
    .modal-subtitle {
        font-size: 0.8rem;
    }
    
    .modal-description {
        font-size: 0.8rem;
    }
    
    .modal-gallery {
        height: 200px;
    }
    
    .modal-features li {
        padding: 0.6rem;
        font-size: 0.8rem;
    }
    
    .modal-tag {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }
    
    .modal-link {
        padding: 0.7rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Service Modal Specific Styles */
.modal-icon {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 1rem;
}

.modal-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4CAF50;
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 0.5rem 1rem;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

/* Service Cards Styles */
.service-card.clickable {
    cursor: pointer !important;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card.clickable:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.2);
    border-color: #4CAF50;
}

.service-card.clickable:active {
    transform: translateY(-2px);
}

.service-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #4CAF50;
    text-align: center;
    margin-top: 1rem;
    padding: 0.5rem;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.service-card.clickable::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(76, 175, 80, 0.1), transparent);
    transition: left 0.5s ease;
}

.service-card.clickable:hover::before {
    left: 100%;
}