/* Services Page Specific Styles */

/* Services Section */
.services-section {
    padding: 4rem 0 6rem;
    min-height: 60vh;
}

/* Loading Overlay */
.loading-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
    gap: 1rem;
}

.loading-overlay p {
    color: #ccc;
    font-size: 1.1rem;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-top: 3rem;
}

/* Service Card */
.service-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 242, 255, 0.1), rgba(255, 0, 255, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.service-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 
        0 25px 50px rgba(0, 242, 255, 0.3),
        0 0 30px rgba(255, 0, 255, 0.2);
    border-color: rgba(0, 242, 255, 0.4);
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:hover .service-image img {
    transform: scale(1.1);
}

.service-card:hover .service-overlay {
    opacity: 1;
}

/* Service Image */
.service-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease;
}

.service-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #00f2ff, #ff00ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #ffffff;
    opacity: 0.8;
}

.service-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.service-overlay i {
    font-size: 2.5rem;
    color: #ffffff;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Service Content */
.service-content {
    padding: 2rem;
    position: relative;
    z-index: 3;
}

.service-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff;
    background: linear-gradient(45deg, #00f2ff, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.service-description {
    color: #ccc;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Service Actions */
.service-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-view, .btn-link {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    flex: 1;
    justify-content: center;
    min-width: 120px;
}

.btn-view {
    background: linear-gradient(45deg, #00f2ff, #ff00ff);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 242, 255, 0.3);
}

.btn-view:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 242, 255, 0.4);
}

.btn-link {
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #00f2ff;
    transform: translateY(-2px);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 0;
}

.empty-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, #00f2ff, #ff00ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 3rem;
    color: #ffffff;
    opacity: 0.8;
}

.empty-state h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.empty-state p {
    color: #ccc;
    font-size: 1.1rem;
}

/* Enhanced Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 2rem;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content:not(.contacts-modal) {
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 242, 255, 0.3);
    border-radius: 25px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
    box-shadow: 
        0 25px 50px rgba(0, 242, 255, 0.3),
        0 0 30px rgba(255, 0, 255, 0.2);
}

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

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 1;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.modal-body {
    padding: 2rem;
}

.modal-image {
    width: 100%;
    height: 350px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 2rem;
    position: relative;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: rgba(0, 0, 0, 0.1);
}

.modal-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #00f2ff, #ff00ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: #ffffff;
    opacity: 0.8;
}

.modal-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #ffffff;
    background: linear-gradient(45deg, #00f2ff, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

.modal-description {
    margin-bottom: 2rem;
}

.modal-description p {
    color: #ccc;
    line-height: 1.8;
    font-size: 1.1rem;
    white-space: pre-wrap;
    text-align: center;
}

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

.modal-actions .btn-primary,
.modal-actions .btn-secondary {
    padding: 1rem 2rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    min-width: 150px;
    justify-content: center;
}

.modal-actions .btn-primary {
    background: linear-gradient(45deg, #00f2ff, #ff00ff);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 242, 255, 0.3);
}

.modal-actions .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 242, 255, 0.4);
}

.modal-actions .btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.modal-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #00f2ff;
    transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .service-card {
        margin: 0 1rem;
    }
    
    .service-image {
        height: 200px;
    }
    
    .service-content {
        padding: 1.5rem;
    }
    
    .service-title {
        font-size: 1.4rem;
    }
    
    .service-actions {
        flex-direction: column;
    }
    
    .btn-view, .btn-link {
        width: 100%;
    }
    
    .modal {
        padding: 0.5rem;
        overflow: hidden;
    }
    
    .modal-content:not(.contacts-modal) {
        max-height: 98vh;
        width: 100%;
        margin: 0;
        border-radius: 20px;
        overflow: hidden;
    }
    
    .modal-body {
        padding: 1.5rem;
        overflow-y: auto;
        max-height: calc(98vh - 4rem);
    }
    
    .modal-image {
        height: 250px;
    }
    
    .modal-info h2 {
        font-size: 2rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions .btn-primary,
    .modal-actions .btn-secondary {
        width: 100%;
    }
    
    /* Скрываем footer когда открыт модал */
    .modal-open .footer {
        display: none;
    }
    
    /* Предотвращаем горизонтальную прокрутку */
    .modal-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
    
    /* Убираем отступы у модала на мобилке */
    .modal {
        padding: 0;
    }
}

@media (max-width: 480px) {
    .services-section {
        padding: 2rem 0 4rem;
    }
    
    .service-card {
        margin: 0 0.5rem;
    }
    
    .service-image {
        height: 180px;
    }
    
    .service-content {
        padding: 1rem;
    }
    
    .service-title {
        font-size: 1.2rem;
    }
    
    .modal {
        padding: 0;
    }
    
    .modal-content:not(.contacts-modal) {
        max-height: 100vh;
        border-radius: 0;
    }
    
    .modal-body {
        padding: 1rem;
        max-height: calc(100vh - 2rem);
    }
    
    .modal-image {
        height: 200px;
    }
    
    .modal-info h2 {
        font-size: 1.5rem;
    }
    
    /* Полностью скрываем footer на очень маленьких экранах */
    .modal-open .footer {
        display: none !important;
    }
}

/* Scrollbar Styling */
.modal-content:not(.contacts-modal)::-webkit-scrollbar {
    width: 8px;
}

.modal-content:not(.contacts-modal)::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.modal-content:not(.contacts-modal)::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #00f2ff, #ff00ff);
    border-radius: 4px;
}

.modal-content:not(.contacts-modal)::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #00d4e0, #e600e6);
} 