﻿/* Основные стили для всего сайта */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #0a0a2a 0%, #1a1a40 100%);
    color: #e0e0ff;
    min-height: 100vh;
    overflow-x: hidden;
    padding: 20px;
    padding-top: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Sticky Header Menu */
.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 40, 0.5);
    backdrop-filter: blur(15px);
    padding: 15px 0;
    z-index: 1000;
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-bottom: 2px solid #4a4aff;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.4);
}

.sticky-header.hidden {
    transform: translateY(-100%);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    padding: 0 20px;
}

.contact-info {
    display: flex;
    gap: 30px;
    align-items: center;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    color: #a5b4fc;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 25px;
    background: rgba(74, 74, 255, 0.1);
    border: 1px solid rgba(74, 74, 255, 0.3);
}

.contact-item:hover {
    background: rgba(74, 74, 255, 0.25);
    color: #00d4ff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.2);
}

.contact-icon {
    font-size: 1.2rem;
    color: #00d4ff;
}

/* Top and Bottom Art */
.art-frame {
    position: fixed;
    left: 0;
    width: 100%;
    height: 150px;
    z-index: -1;
    opacity: 0.7;
    pointer-events: none;
}

.art-top {
    top: 0;
    background: url('../assets/Futuristic_Glowing_Circuit_Traces_1.png') center/cover no-repeat;
    border-bottom: 2px solid #4a4aff;
}

.art-bottom {
    bottom: 0;
    background: url('../assets/Futuristic_Glowing_Circuit_Traces_2.png') center/cover no-repeat;
    border-top: 2px solid #4a4aff;
}

.container {
    max-width: 900px;
    width: 100%;
    margin-top: 80px;
    margin-bottom: 180px;
    z-index: 10;
    position: relative;
}

/* Main Title Style */
.main-title-container {
    background: rgba(20, 20, 60, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px 50px;
    margin-bottom: 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(74, 74, 255, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
}

.main-title-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.5);
}

.main-title-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #00d4ff, transparent);
    border-radius: 3px;
    box-shadow: 0 0 15px #00d4ff;
}

h1 {
    font-size: 3.2rem;
    background: linear-gradient(90deg, #00d4ff, #a855f7, #00d4ff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    margin-bottom: 15px;
    animation: gradient 3s ease infinite;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.title-icon {
    color: #00d4ff;
    margin-right: 20px;
    text-shadow: 0 0 10px #00d4ff;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.title-tagline {
    font-size: 1.2rem;
    color: #a5b4fc;
    opacity: 0.9;
    font-weight: 300;
    letter-spacing: 1px;
}

/* Service List */
.service-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Service Item */
.service-item {
    background: rgba(20, 20, 60, 0.3);
    border-left: 5px solid #4a4aff;
    border-radius: 10px;
    padding: 20px 15px;
    cursor: pointer;
    user-select: none;
    position: relative;
    opacity: 0;
    animation: slideIn 0.6s ease-out forwards;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s ease, box-shadow 0.4s ease, background 0.4s ease, border-color 0.4s ease;
}

.service-item:nth-child(1) {
    animation-delay: 0.1s;
}

.service-item:nth-child(2) {
    animation-delay: 0.2s;
}

.service-item:nth-child(3) {
    animation-delay: 0.3s;
}

.service-item:nth-child(4) {
    animation-delay: 0.4s;
}

.service-item:nth-child(5) {
    animation-delay: 0.5s;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.service-item:hover {
    transform: translateY(-5px);
    border-left-color: #00d4ff;
    background: rgba(30, 30, 80, 0.5);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.2);
}

/* Эффект при наведении аналогичный футеру и хедеру */
.service-item:hover .service-icon {
    transform: translateY(-2px) scale(1.1);
    transition: transform 0.3s ease;
}

/* Анимация для заголовка при наведении */
.service-item:hover .service-title {
    color: #00d4ff;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.service-item.active {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 212, 255, 0.3);
}

.service-item.active .service-icon {
    transform: rotate(45deg);
    color: #ff6b9d;
}

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.service-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #a5b4fc;
}

.service-icon {
    font-size: 1.8rem;
    color: #00d4ff;
    transition: transform 0.3s;
}

/* Service Description */
.service-description {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease-out, opacity 0.3s ease-out, margin-top 0.3s ease-out;
    margin-top: 0;
    padding-left: 10px;
    border-left: 2px dashed #4a4aff;
}

.service-item.active .service-description {
    max-height: 2000px;
    /* Увеличенная высота для контента */
    opacity: 1;
    margin-top: 25px;
}

.description-content {
    padding: 20px;
    background: rgba(10, 10, 40, 0.5);
    border-radius: 8px;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #ccd6f6;
}

.description-content strong {
    color: #00d4ff;
    display: block;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

/* Collapsing other items */
.service-item.collapsing {
    transition: transform 0.5s ease, margin-top 0.5s ease;
}

/* Contact Form Styles */
.contact-form-container {
    margin-top: 60px;
    width: 100%;
    max-width: 900px;
    background: rgba(20, 20, 60, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px 50px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(74, 74, 255, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
}

.contact-form-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.5);
}

.contact-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    width: 80%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #00d4ff, transparent);
    border-radius: 3px;
    box-shadow: 0 0 15px #00d4ff;
}

.form-title {
    text-align: center;
    font-size: 2.2rem;
    background: linear-gradient(90deg, #00d4ff, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 10px;
}

.form-subtitle {
    text-align: center;
    color: #a5b4fc;
    font-size: 1.1rem;
    margin-bottom: 30px;
    font-weight: 300;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #a5b4fc;
    font-size: 1.1rem;
    font-weight: 500;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 15px 20px;
    background: rgba(10, 10, 40, 0.5);
    border: 1px solid rgba(74, 74, 255, 0.3);
    border-radius: 10px;
    color: #e0e0ff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
    background: rgba(10, 10, 40, 0.7);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #8892b0;
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.submit-btn {
    display: block;
    width: 100%;
    padding: 18px;
    background: linear-gradient(90deg, #00d4ff, #4a4aff);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 212, 255, 0.3);
    background: linear-gradient(90deg, #00d4ff, #6c63ff);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Success Message Modal */
.success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.success-modal.active {
    opacity: 1;
    visibility: visible;
}

.success-content {
    background: rgba(20, 20, 60, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 50px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    border: 2px solid #00d4ff;
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.3);
    transform: scale(0.8);
    transition: transform 0.5s ease;
}

.success-modal.active .success-content {
    transform: scale(1);
}

.success-icon {
    font-size: 4rem;
    color: #00d4ff;
    margin-bottom: 20px;
    animation: successPulse 1.5s ease infinite;
}

@keyframes successPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.success-title {
    font-size: 2.2rem;
    color: #00d4ff;
    margin-bottom: 15px;
}

.success-text {
    color: #a5b4fc;
    font-size: 1.2rem;
    line-height: 1.6;
}

/* Footer Style */
footer {
    margin-top: 50px;
    width: 100%;
    max-width: 900px;
    background: rgba(20, 20, 60, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(74, 74, 255, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
}

footer:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.5);
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    width: 80%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #00d4ff, transparent);
    border-radius: 3px;
    box-shadow: 0 0 15px #00d4ff;
}

.footer-text {
    color: #a5b4fc;
    font-size: 1.4rem;
    margin-bottom: 25px;
    font-weight: 300;
    letter-spacing: 1px;
}

.footer-contacts {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #00d4ff;
    text-decoration: none;
    font-size: 1.2rem;
    padding: 12px 25px;
    border-radius: 30px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    transition: all 0.3s ease;
}

.footer-contact-link:hover {
    background: rgba(0, 212, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
}

.footer-contact-icon {
    font-size: 1.3rem;
    text-shadow: 0 0 8px #00d4ff;
}

/* Content Pages */
.content-page {
    max-width: 1000px;
    width: 100%;
    margin: 80px auto 180px;
    padding: 0 20px;
}

.content-page > #contact-form-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
}

.content-page #contact-form-container > .contact-form-container {
    margin-left: auto !important;
    margin-right: auto !important;
    float: none !important;
}

.page-title {
    text-align: center;
    margin-bottom: 50px;
}

.page-content {
    background: rgba(20, 20, 60, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px 50px;
    margin-bottom: 40px;
    border: 1px solid rgba(74, 74, 255, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.page-content h2 {
    color: #00d4ff;
    margin-top: 30px;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.page-content h3 {
    color: #a5b4fc;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.page-content p {
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 1.1rem;
}

.page-content ul,
.page-content ol {
    margin-left: 30px;
    margin-bottom: 25px;
}

.page-content li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #00d4ff;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 12px 25px;
    border-radius: 30px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    transition: all 0.3s ease;
    margin-bottom: 40px;
}

.back-link:hover {
    background: rgba(0, 212, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 212, 255, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding-top: 120px;
    }

    .sticky-header {
        padding: 12px 0;
    }

    .header-content {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px;
    }

    .contact-info {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    .contact-item {
        width: 100%;
        justify-content: center;
        font-size: 1rem;
        padding: 10px;
    }

    .container {
        margin-top: 40px;
        margin-bottom: 140px;
        padding: 0 15px;
    }

    .main-title-container {
        padding: 30px 20px;
        margin-bottom: 40px;
    }

    h1 {
        font-size: 2.5rem;
    }

    .title-tagline {
        font-size: 1.1rem;
    }

    .contact-form-container {
        padding: 30px 20px;
        margin-top: 40px;
    }

    .form-title {
        font-size: 1.8rem;
    }

    .form-subtitle {
        font-size: 1rem;
    }

    .form-input,
    .form-textarea {
        padding: 12px 15px;
    }

    footer {
        padding: 30px 20px;
    }

    .footer-text {
        font-size: 1.2rem;
    }

    .footer-contacts {
        flex-direction: column;
        gap: 15px;
    }

    .footer-contact-link {
        justify-content: center;
        font-size: 1.1rem;
        padding: 15px;
    }

    .service-title {
        font-size: 1.5rem;
    }

    .service-item {
        padding: 20px 15px;
        /* Начальная позиция для анимации */
        transform: translateY(20px);
        opacity: 0;
        animation: slideInMobile 0.6s ease-out forwards;
    }

    .service-item:hover {
        transform: translateY(-3px) !important;
    }

    .service-item.active {
        transform: translateY(-2px) !important;
        margin-bottom: 0;
    }

    /* Анимация для мобильных */
    @keyframes slideInMobile {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .service-item:nth-child(1) {
        animation-delay: 0.1s;
    }

    .service-item:nth-child(2) {
        animation-delay: 0.2s;
    }

    .service-item:nth-child(3) {
        animation-delay: 0.3s;
    }

    .service-item:nth-child(4) {
        animation-delay: 0.4s;
    }

    .service-item:nth-child(5) {
        animation-delay: 0.5s;
    }

    .service-description {
        overflow: visible;
    }

    .service-item.active .service-description {
        overflow: visible;
    }

    .description-content {
        padding: 15px;
        font-size: 1rem;
        line-height: 1.5;
    }

    .service-description .content-link {
        display: block;
        text-align: center;
        margin-top: 20px;
        padding: 12px 20px;
    }

    .success-content {
        padding: 30px 20px;
    }

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

    .success-title {
        font-size: 1.8rem;
    }

    .page-content {
        padding: 30px 20px;
    }

    /* =============================== */
    /* РЕШЕНИЕ ПРОБЛЕМЫ С ДВУМЯ КОЛОНКАМИ */
    /* =============================== */

    /* Для секций с двумя колонками на мобильных */
    .page-content .two-column-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }

    /* Исправляем контейнеры, которые вылазят за границы */
    .page-content>div[style*="grid-template-columns"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }

    /* Специфичные исправления для страниц услуг */
    .page-content .two-columns,
    .page-content .grid-columns {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }

    /* Исправляем для Vibe-Coding (3 колонки) */
    .page-content .three-column-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }

    .page-content>div[style*="grid-template-columns: repeat(3"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }

    /* Убираем фиксированную ширину для всех внутренних блоков */
    .page-content>div>div,
    .page-content div[style*="background:"] {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Гарантируем, что контент не выходит за пределы */
    .page-content * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Исправляем для страницы AI Expertise */
    .page-content>div[style*="display: grid; grid-template-columns: 1fr 1fr"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }

    /* Исправляем для страницы Vibe-Coding */
    .page-content>div[style*="display: grid; grid-template-columns: repeat(3"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }

    /* Убираем любые фиксированные значения ширины */
    .page-content div[style*="width:"] {
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }

    .title-tagline {
        font-size: 1rem;
    }

    .main-title-container {
        padding: 25px 15px;
    }

    .form-title {
        font-size: 1.6rem;
    }

    .footer-text {
        font-size: 1.1rem;
    }

    .service-title {
        font-size: 1.3rem;
    }

    .description-content {
        padding: 15px;
        font-size: 1rem;
    }

    .page-content {
        padding: 20px 15px;
    }
}

/* =============================== */
/* СТИЛИ ДЛЯ ССЫЛОК */
/* =============================== */

/* Основные стили для ссылок в контенте */
.content-link {
    color: #00d4ff;
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.content-link:hover {
    color: #a855f7;
}

/* Подчеркивание при наведении */
.content-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #00d4ff;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}

.content-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Ссылки в описаниях услуг */
.service-description .content-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    padding: 8px 15px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.service-description .content-link:hover {
    background: rgba(0, 212, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.2);
}

.service-description .content-link::after {
    display: none;
    /* Отключаем подчеркивание для этих ссылок */
}

/* Ссылки в основном контенте */
.page-content a {
    color: #00d4ff;
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.page-content a:hover {
    color: #a855f7;
    border-bottom-color: #00d4ff;
}

/* Ссылки в списках */
.page-content li a {
    display: inline-block;
    margin: 5px 0;
}

/* Ссылки в заголовках */
h2 a,
h3 a {
    color: inherit;
    text-decoration: none;
}

h2 a:hover,
h3 a:hover {
    color: #00d4ff;
}