/* =========================
   БАЗА
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #edf1f7;              /* светлый фон */
    --bg-soft: #f6f8fc;         /* ещё светлее */
    --shadow-dark: #c3cedd;
    --shadow-light: #ffffff;
    --text-main: #1f2933;
    --text-muted: #6b7280;
    --accent: #2563eb;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Типографика */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 16px;
}

.section-title {
    font-size: 2.2rem;
    padding: 20px;
    margin-bottom: 2rem;
    text-align: center;
}

/* Общий отступ секций */
section {
    padding: 40px 0;
}

/* =========================
   НЕОМОРФНЫЕ ПАТТЕРНЫ
========================= */

.card {
    background: var(--bg);
    border-radius: 24px;
    box-shadow:
        6px 6px 12px var(--shadow-dark),
        -6px -6px 12px var(--shadow-light);
}

.card--inset {
    box-shadow:
        inset 4px 4px 8px var(--shadow-dark),
        inset -4px -4px 8px var(--shadow-light);
}

/* =========================
   КНОПКИ
========================= */

.btn {
    background-color: var(--bg);
    border: none;
    border-radius: 30px;
    padding: 14px 28px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        6px 6px 12px var(--shadow-dark),
        -6px -6px 12px var(--shadow-light);
    white-space: nowrap;
    line-height: 1;
}

.btn:hover,
.btn:focus {
    box-shadow:
        inset 6px 6px 12px var(--shadow-dark),
        inset -6px -6px 12px var(--shadow-light);
}

.btn-primary {
    color: var(--accent);
}

.btn-outline {
    background-color: var(--bg-soft);
}

.hero__buttons .btn {
    margin-top: 0;
}

/* =========================
   ХЕДЕР И НАВИГАЦИЯ
========================= */

.header {
    background: var(--bg);
    padding: 20px 0 10px;
    box-shadow:
        inset 2px 2px 4px var(--shadow-dark),
        inset -2px -2px 4px var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo__text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
}

.nav__list {
    list-style: none;
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

.nav__list li {
    margin: 0;
}

.nav__list a {
    background-color: var(--bg);
    border-radius: 30px;
    padding: 10px 20px;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        4px 4px 8px var(--shadow-dark),
        -4px -4px 8px var(--shadow-light);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav__list a:hover,
.nav__list a:focus {
    box-shadow:
        inset 4px 4px 8px var(--shadow-dark),
        inset -4px -4px 8px var(--shadow-light);
}

.nav__list a.active {
    box-shadow:
        inset 4px 4px 8px var(--shadow-dark),
        inset -4px -4px 8px var(--shadow-light);
}

.burger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.burger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-main);
    margin: 4px 0;
    transition: 0.3s;
}

/* =========================
   HERO / ОБО МНЕ / ПРОЕКТ
========================= */

.hero,
.about-hero,
.portfolio-hero,
.project-hero {
    background: var(--bg);
}

.hero__inner,
.about-hero__inner,
.project-hero__inner {
    display: flex;
    align-items: center;
    gap: 48px;
}

.hero__content,
.about-hero__content,
.project-hero__content {
    flex: 1;
}

.hero__title,
.project-hero__title,
.about-hero__title {
    font-size: 2.4rem;
    margin-bottom: 20px;
}

.hero__subtitle,
.project-hero__subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.hero__status {
    font-size: 1rem;
    color: #059669;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero__buttons {
    display: flex;
    gap: 16px;
}

/* Аватар / видео-аватар */
.hero__image,
.about-hero__image {
    width: 172px;
    height: 172px;
    border-radius: 50%;
    background: var(--bg);
    padding: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow:
        8px 8px 16px var(--shadow-dark),
        -8px -8px 16px var(--shadow-light);
}

.avatar-video {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow:
        4px 4px 8px var(--shadow-dark),
        -4px -4px 8px var(--shadow-light);
    cursor: pointer;
}

.avatar-video video,
.hero__image img,
.about-hero__image img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: none;
}

/* Превью на странице проекта */
.project-hero__image img {
    width: auto;
    max-width: 600px;
    height: auto;
    max-height: 400px;
    display: block;
    margin: 0 auto;
    border-radius: 20px;
    background: var(--bg);
    padding: 4px;
    box-shadow:
        8px 8px 16px var(--shadow-dark),
        -8px -8px 16px var(--shadow-light);
}

/* =========================
   ПРЕИМУЩЕСТВА
========================= */

.advantages {
    background: var(--bg);
}

.advantages__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.advantage-card {
    padding: 24px;
    text-align: center;
    background: var(--bg);
    border-radius: 24px;
    box-shadow:
        6px 6px 12px var(--shadow-dark),
        -6px -6px 12px var(--shadow-light);
}

.advantage-icon {
    font-size: 2.4rem;
    margin-bottom: 16px;
}

/* =========================
   КАРТОЧКИ ПРОЕКТОВ (главная)
========================= */

.featured-projects {
    background: var(--bg);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    margin-bottom: 32px;
}

.projects-grid .project-card {
    max-width: 320px;
    margin: 0 auto;
}

/* Базовая карточка проекта (фиксированная высота) */
.project-card {
    position: relative;
    width: 300px;
    height: 420px; /* фиксированная высота */
    background-color: var(--bg);
    border-radius: 24px;
    box-shadow:
        6px 6px 12px var(--shadow-dark),
        -6px -6px 12px var(--shadow-light);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    padding-top: 180px; /* место под превью */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow:
        10px 10px 18px var(--shadow-dark),
        -10px -10px 18px var(--shadow-light);
}

.project-card__preview {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 180px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow:
        8px 8px 16px var(--shadow-dark),
        -8px -8px 16px var(--shadow-light);
    background: var(--bg);
    padding: 4px;
}

.project-card__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    border: none;
}

.project-card__content {
    padding: 0 14px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-card__type {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* ограничиваем описание, чтобы не растягивало карточку */
.project-card__desc {
    color: #374151;
    margin-bottom: 16px;
    flex: 1;
    overflow: hidden;
}

/* Статусы */
.project-status {
    margin-top: auto;
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    box-shadow:
        inset 2px 2px 4px rgba(0, 0, 0, 0.04),
        inset -2px -2px 4px rgba(255, 255, 255, 0.9);
}

.project-status.ready { background: #e6f7ee; color: #059669; }
.project-status.dev { background: #e3edff; color: #1d4ed8; }
.project-status.planned { background: #f3e8ff; color: #7e22ce; }

/* =========================
   СТРАНИЦА "ОБО МНЕ"
========================= */

.about-content {
    background: var(--bg);
}

.about-bio {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 10px;
}

.about-actions {
    display: flex;
    gap: 16px;
    margin-top: 24px;
    justify-content: center;
    align-items: center;
}

/* =========================
   УСЛУГИ
========================= */

.services-section {
    background: var(--bg);
}

.services-table {
    background: var(--bg);
    border-radius: 24px;
    box-shadow:
        6px 6px 12px var(--shadow-dark),
        -6px -6px 12px var(--shadow-light);
    margin: 32px 0;
    display: grid;
    grid-template-columns: 1fr 2fr minmax(100px, 1fr) 1fr;
    gap: 0;
    width: 100%;
    border-bottom: 1px solid #cbd5e1;
}

.services-row {
    display: contents;
}

.services-cell {
    padding: 16px;
    border-bottom: 1px solid #cbd5e1;
    line-height: 1.5;
}

.services-row.header .services-cell {
    font-weight: 700;
    text-align: center;
    border-bottom: 2px solid var(--shadow-dark);
}

.services-cell:nth-child(3),
.services-cell:nth-child(4) {
    text-align: center;
}

.services-cta-section {
    text-align: center;
    margin-bottom: 60px;
}

.services-cta-text {
    font-size: 1.3rem;
    margin-bottom: 24px;
}

/* =========================
   КОНТАКТЫ
========================= */

.contact-section {
    background: var(--bg);
}

.contact-info {
    text-align: center;
    margin-bottom: 24px;
    font-size: 1.05rem;
    line-height: 1.8;
}

.contact-info a {
    color: var(--accent);
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

.contact-cta {
    text-align: center;
    margin-bottom: 24px;
    font-size: 1.1rem;
    font-weight: 600;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto 20px;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 20px;
    font-family: inherit;
    font-size: 1rem;
    background: var(--bg);
    box-shadow:
        inset 2px 2px 4px var(--shadow-dark),
        inset -2px -2px 4px var(--shadow-light);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    box-shadow:
        inset 4px 4px 8px var(--shadow-dark),
        inset -4px -4px 8px var(--shadow-light);
}

/* =========================
   ДЕТАЛИ ПРОЕКТА / ГАЛЕРЕЯ
========================= */

.project-details {
    background: var(--bg);
}

.project-details h2 {
    margin: 32px 0 16px;
    font-size: 1.75rem;
}

.project-cta {
    margin-top: 40px;
    text-align: center;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.gallery-frame {
    width: 100%;
    height: 200px;
    padding: 6px;
    background: var(--bg);
    border-radius: 24px;
    box-shadow:
        6px 6px 12px var(--shadow-dark),
        -6px -6px 12px var(--shadow-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gallery-frame img,
.gallery-frame video {
    width: 100%;
    height: 100%;
    border-radius: 18px;
    object-fit: cover;
}

.gallery-video-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.6);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    z-index: 2;
}

.video-wrapper {
    width: 320px;
    height: 200px;
    display: inline-block;
    padding: 8px;
    background: var(--bg);
    border-radius: 24px;
    box-shadow:
        6px 6px 12px var(--shadow-dark),
        -6px -6px 12px var(--shadow-light);
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    border-radius: 24px;
}

/* Модалка */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.modal-content {
    background: var(--bg-soft);
    border-radius: 20px;
    max-width: 90vw;
    max-height: 90vh;
    padding: 24px;
    position: relative;
}

.modal-img {
    max-width: 80vw;
    max-height: 70vh;
    display: block;
    margin: 0 auto;
    border-radius: 12px;
}

.modal-close,
#modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: #ffffff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-main);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    z-index: 10000;
    line-height: 1;
}

.modal-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    transform: translateY(-50%);
}

.modal-nav button {
    background: rgba(255,255,255,0.9);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
}

/* =========================
   КАРУСЕЛЬ ПОРТФОЛИО
========================= */

.portfolio-category {
    margin-bottom: 40px;
}

.portfolio-category h2 {
    text-align: center;
    margin-bottom: 14px;
    font-size: 2rem;
}

.project-card-wrapper {
    flex: 0 0 324px;
    padding-left: 16px;
    padding-top: 12px;
}

.carousel {
    position: relative;
    margin-top: 16px;
    --card-width: 300px;
    --gap: 32px;
}

.carousel-track {
    display: flex;
    gap: 32px;
    padding: 60px 4px 40px 4px;
    scroll-behavior: smooth;
    width: calc(3 * var(--card-width) + 2 * var(--gap));
    margin: 0 auto;
    overflow: hidden;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg);
    border: none;
    font-size: 18px;
    cursor: pointer;
    box-shadow:
        4px 4px 8px var(--shadow-dark),
        -4px -4px 8px var(--shadow-light);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.carousel-btn.prev { left: 16px; }
.carousel-btn.next { right: 16px; }

/* =========================
   ФУТЕР
========================= */

.footer {
    background: #0f172a;
    color: #e5e7eb;
    width: 100%;
}

.footer__inner-wrapper,
.footer__bottom-wrapper {
    padding: 40px 0 20px;
}

.footer__inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer__col h3 {
    margin-bottom: 16px;
    font-size: 1.2rem;
    color: #5b5e61;
	text-decoration: underline 1.5px;
}

.footer__col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer__col ul li {
    margin-bottom: 10px;
}

.footer__col a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer__col a:hover {
    color: #ffffff;
}

.footer__bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #334155;
    color: #94a3b8;
}

/* =========================
   АДАПТИВ
========================= */

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    h1 { font-size: 2.25rem; }
    h2 { font-size: 2rem; }
    .section-title { font-size: 2rem; }

    .hero__inner,
    .about-hero__inner,
    .project-hero__inner {
        flex-direction: column;
        text-align: center;
    }

    .hero__image,
    .about-hero__image {
        margin-bottom: 24px;
    }

    .hero__buttons,
    .about-actions {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .nav__list {
        display: none;
    }

    .nav.active .nav__list {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg);
        padding: 20px;
        box-shadow:
            4px 4px 8px var(--shadow-dark),
            -4px -4px 8px var(--shadow-light);
        gap: 16px;
    }

    .burger-menu {
        display: block;
    }

    .advantages__grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .footer__inner {
        grid-template-columns: 1fr;
    }

    .project-card-wrapper {
        flex: 0 0 100%;
        max-width: 324px;
        margin: 0 auto;
        padding-left: 16px;
    }

    .carousel-track {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .carousel-btn {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .carousel-btn.prev { left: 6px; }
    .carousel-btn.next { right: 12px; }
}
