/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    color: #1a1a1a;
    background-color: #f5f7fa;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background: linear-gradient(135deg, #004aad 0%, #0066cc 100%);
    color: #fff;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    z-index: 5;
    margin-top: 60px;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://source.unsplash.com/random/1920x200?abstract') no-repeat center/cover;
    opacity: 0.1;
    z-index: -1;
    transform: translateY(0);
    transition: transform 0.5s ease;
}

header:hover::before {
    transform: translateY(-20px);
}

header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 98, 0, 0.5);
    animation: fadeInDown 1s ease-out, glow 2s ease-in-out infinite alternate;
    margin: 0 auto;
    text-align: center;
}

nav {
    background: #fff;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

nav a {
    text-decoration: none;
    color: #004aad;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    border-radius: 8px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: #ff6200;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 80%;
}

nav a:hover {
    color: #ff6200;
    background: rgba(255, 98, 0, 0.1);
    transform: translateY(-2px);
}

nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 98, 0, 0.2), transparent);
    transition: left 0.8s ease;
}

nav:hover::before {
    left: 100%;
}

main {
    flex: 1;
    overflow-y: auto;
    padding: 2rem 0 5rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background: linear-gradient(135deg, #add8e6 0%, #bfefff 100%); /* Синий фон для отступов */
}

.content-block {
    max-width: 900px; /* Ограничение ширины для текста */
    width: 85%; /* Адаптивная ширина */
    margin: 0 auto;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2); /* Тень для отделения */
    text-align: center;
}

.content-block > * {
    max-width: 800px; /* Ограничение ширины текста внутри блока */
    margin: 0 auto;
    text-align: justify; /* Выравнивание текста по ширине */
    word-wrap: break-word; /* Автоматический перенос слов */
}

section {
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease-out;
}

h1, h2, h3 {
    color: #004aad;
    font-weight: 700;
    margin: 0 auto;
    text-align: center;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: #ff6200;
    margin: 0.5rem auto;
    border-radius: 2px;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

p {
    font-size: 1rem;
    color: #4a4a4a;
    margin-bottom: 1.2rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 2rem;
    background: #ff6200;
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(255, 98, 0, 0.3);
    margin: 1rem auto; /* Усиленное центрирование */
}

.cta-button-wrapper {
    display: flex;
    justify-content: center; /* Центрирование кнопки */
    width: 100%;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    background: #e55a00;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(255, 98, 0, 0.4);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: #fff;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 1s ease-out 0.2s;
    animation-fill-mode: backwards;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #ff6200;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}

footer {
    background: linear-gradient(135deg, #004aad 0%, #0066cc 100%);
    color: #fff;
    text-align: center;
    padding: 1.5rem;
    font-size: 1rem;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 10;
}

footer p {
    font-weight: 600;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.7), 0 0 15px rgba(255, 98, 0, 0.4);
    animation: glow 2s ease-in-out infinite alternate;
}

/* Анимации */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glow {
    from {
        text-shadow: 0 0 8px rgba(255, 255, 255, 0.7), 0 0 15px rgba(255, 98, 0, 0.4);
    }
    to {
        text-shadow: 0 0 12px rgba(255, 255, 255, 1), 0 0 20px rgba(255, 98, 0, 0.6);
    }
}

/* Адаптивность */
@media (min-width: 1280px) {
    .content-block {
        padding: 3rem 4rem;
    }
}

@media (max-width: 768px) {
    header {
        margin-top: 80px;
    }

    header h1 {
        font-size: 1.8rem;
    }

    nav {
        height: 80px;
        padding: 0.5rem;
    }

    nav ul {
        flex-direction: column;
        gap: 0.8rem;
    }

    nav a {
        font-size: 0.95rem;
        padding: 0.4rem 0.8rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    h3 {
        font-size: 1.3rem;
    }

    .cta-button {
        padding: 0.8rem 1.8rem;
        font-size: 0.95rem;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    .content-block {
        padding: 1.5rem;
        width: 90%;
    }

    main {
        padding: 1rem 0 4rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 1. ascended.2rem;
        margin-top: 70px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    nav {
        height: 70px;
    }

    main {
        padding: 1rem 0 3rem;
    }

    .content-block {
        padding: 1rem;
        width: 95%;
    }

    .cta-button {
        width: 100%;
        padding: 0.9rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    footer {
        padding: 1rem;
        font-size: 0.9rem;
    }
}

/* Плавная прокрутка */
html {
    scroll-behavior: smooth;
}