/* ============================================================
   Скульптор Галиулин — общие стили
   ============================================================ */

/* ---------- ПЕРЕМЕННЫЕ ---------- */
:root {
    --bg: #fafafa;
    --bg-card: #ffffff;
    --bg-soft: #f4f4f4;
    --border: #e4e4e4;
    --text: #1f1f1f;
    --text-soft: #8a8a8a;
    --accent: #b38b6d;
    --accent-dark: #9c7a5f;
    --link: #00376b;
    --like: #ed4956;
    --radius: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.25);
    --container: 640px;
    --container-wide: 1160px;
    --transition: 0.25s ease;
}

/* ---------- СБРОС / ГЛОБАЛ ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}
.container--wide { max-width: var(--container-wide); }

/* ---------- ШАПКА ---------- */
.header {
    position: sticky; top: 0; z-index: 200;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
}
.header__inner {
    max-width: var(--container-wide);
    margin: 0 auto; padding: 12px 20px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.header__logo {
    display: flex; align-items: center; gap: 10px;
    color: inherit; text-decoration: none;
}
.header__logo:hover { text-decoration: none; }
.header__icon { font-size: 26px; line-height: 1; }
.header__title { font-size: 20px; font-weight: 800; letter-spacing: -0.4px; }
.header__title span { color: var(--accent); }
.header__back {
    font-size: 14px; font-weight: 600; color: var(--link);
    padding: 6px 12px; border-radius: 20px;
    transition: background var(--transition), color var(--transition);
}
.header__back:hover { background: var(--bg-soft); }
.header__back--edit { background: var(--accent); color: #fff; }
.header__back--edit:hover { background: var(--accent-dark); }

.header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.header__contact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    padding: 9px 18px;
    border-radius: 30px;
    transition: background var(--transition), transform var(--transition);
    white-space: nowrap;
}
.header__contact:hover { background: var(--accent-dark); transform: translateY(-1px); }
.header__contact:active { transform: translateY(0); }

/* ---------- МОДАЛКА КОНТАКТОВ ---------- */
.contact-modal {
    position: fixed; inset: 0; z-index: 1100;
    display: none; align-items: center; justify-content: center;
    padding: 20px;
}
.contact-modal.is-open { display: flex; }
.contact-modal__backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.7);
    animation: fadeIn .25s ease;
}
.contact-modal__content {
    position: relative; z-index: 1;
    background: var(--bg-card); border-radius: var(--radius-lg);
    max-width: 400px; width: 100%;
    padding: 32px 26px;
    box-shadow: var(--shadow-lg);
    animation: slideUp .3s ease;
}
.contact-modal__close {
    position: absolute; top: 12px; right: 16px;
    font-size: 26px; line-height: 1; color: var(--text-soft);
    transition: color var(--transition);
}
.contact-modal__close:hover { color: var(--text); }
.contact-modal__title { font-size: 22px; font-weight: 800; margin-bottom: 18px; }
.contact-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
}
.contact-item:last-child { border-bottom: none; }
.contact-item__icon { font-size: 20px; width: 26px; text-align: center; }
.contact-item a {
    color: var(--link); font-weight: 600;
    transition: color var(--transition);
}
.contact-item a:hover { color: var(--accent); }

/* ---------- АНИМАЦИИ ---------- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   ГЛАВНАЯ
   ============================================================ */
.section {
    padding: 56px 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}
.section:last-child { border-bottom: none; }
.section--alt { background: var(--bg-soft); }
.section-title {
    font-size: 26px;
    font-weight: 800;
    text-align: center;
    letter-spacing: -0.5px;
    margin-bottom: 32px;
}
.section-title span { color: var(--accent); }

/* Блок «О скульпторе» */
.about-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}
.about-grid > img {
    width: 190px;
    height: 190px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent);
    box-shadow: var(--shadow-md);
}
.about-photo-placeholder {
    width: 190px;
    height: 190px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    color: #555;
    background: linear-gradient(135deg, #2a2a2a 0%, #111 100%);
    border: 4px solid var(--accent);
    box-shadow: var(--shadow-md);
}
.about-text {
    font-size: 15px;
    line-height: 1.65;
    text-align: center;
}
.about-text p { margin-bottom: 14px; }
.about-text h3 {
    margin: 24px 0 10px;
    font-size: 17px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.2px;
}
.about-text ul {
    display: inline-block;
    text-align: left;
    margin: 8px 0 0;
    list-style: none;
}
.about-text ul li {
    position: relative;
    padding: 4px 0 4px 20px;
}
.about-text ul li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* Блок «Команда» */
.team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.team-member {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px 14px;
    text-align: center;
    border: 1px solid var(--border);
    transition: transform var(--transition), box-shadow var(--transition);
}
.team-member:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.team-member img {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 12px;
    border: 3px solid var(--accent);
    background: var(--bg-soft);
}
.team-member__placeholder {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    color: #555;
    background: linear-gradient(135deg, #2a2a2a 0%, #111 100%);
    border: 3px solid var(--accent);
}
.team-member h4 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.team-member p { font-size: 13px; color: var(--text-soft); line-height: 1.4; }

/* Фильтр категорий */
.works-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 28px;
}
.works-filter__btn {
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--bg-soft);
    color: var(--text);
    border: 1px solid var(--border);
    transition: all var(--transition);
    white-space: nowrap;
    text-decoration: none;
}
.works-filter__btn:hover { background: #ececec; }
.works-filter__btn.is-active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* Сетка работ */
.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.works-empty {
    text-align: center;
    color: var(--text-soft);
    font-size: 15px;
    padding: 40px 0;
}

/* Карточка работы */
.work-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), box-shadow var(--transition);
    color: inherit;
    text-decoration: none;
}
.work-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.work-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.work-card__media {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #111;
}
.work-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.work-card:hover .work-card__media img { transform: scale(1.05); }
.work-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    background: linear-gradient(135deg, #2a2a2a 0%, #111 100%);
    color: #555;
    user-select: none;
}
.work-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}
.work-card__body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}
.work-card__title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}
.work-card__desc {
    font-size: 13px;
    color: var(--text-soft);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.work-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
}
.work-card__cats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.work-card__cat {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    background: rgba(179, 139, 109, 0.12);
    padding: 3px 8px;
    border-radius: 10px;
}
.work-card__likes {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-soft);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 44px;
}
.pagination__link {
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    transition: all var(--transition);
    text-decoration: none;
    cursor: pointer;
}
.pagination__link:hover { background: #ececec; }
.pagination__link.is-active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    cursor: default;
}
.pagination__link.is-disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================================
   СТРАНИЦА РАБОТЫ
   ============================================================ */
.breadcrumbs {
    padding: 22px 0 6px;
    font-size: 13px;
    color: var(--text-soft);
}
.breadcrumbs a { color: var(--link); transition: color var(--transition); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span { margin: 0 6px; opacity: 0.5; }

.work-page { padding: 20px 0 60px; }
.work-page__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr);
    gap: 40px;
    align-items: start;
}

.work-gallery {
    background: #111;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    aspect-ratio: 1 / 1;
}
.work-gallery__track {
    display: flex; height: 100%;
    transition: transform 0.35s ease;
}
.work-gallery__track img {
    width: 100%; height: 100%;
    flex-shrink: 0; object-fit: cover;
}
.work-gallery__placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 120px; color: #444;
    background: linear-gradient(135deg, #2a2a2a 0%, #111 100%);
    user-select: none;
}
.work-gallery__nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(255,255,255,.9); color: var(--text);
    font-size: 24px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    z-index: 3; box-shadow: var(--shadow-sm);
    transition: background var(--transition);
}
.work-gallery__nav:hover { background: #fff; }
.work-gallery__nav--prev { left: 14px; }
.work-gallery__nav--next { right: 14px; }
.work-gallery__dots {
    position: absolute; bottom: 14px; left: 50%;
    transform: translateX(-50%);
    display: flex; gap: 8px; z-index: 3;
}
.work-gallery__dots button {
    width: 9px; height: 9px; border-radius: 50%;
    background: rgba(255,255,255,.5);
    transition: background var(--transition), transform var(--transition);
    padding: 0;
}
.work-gallery__dots button.is-active {
    background: #fff; transform: scale(1.25);
}

.work-info { display: flex; flex-direction: column; gap: 16px; }
.work-info__cats { display: flex; flex-wrap: wrap; gap: 6px; }
.work-info__cat {
    font-size: 12px; font-weight: 600; color: var(--accent);
    background: rgba(179,139,109,.12);
    padding: 5px 12px; border-radius: 12px;
}
.work-info__title {
    font-size: 32px; font-weight: 800;
    line-height: 1.15; letter-spacing: -0.5px;
}
.work-info__date { font-size: 13px; color: var(--text-soft); }
.work-info__desc { font-size: 16px; line-height: 1.65; color: #333; }

.like-btn {
    display: inline-flex; align-items: center; gap: 10px;
    align-self: flex-start;
    font-size: 16px; font-weight: 700;
    color: var(--text);
    padding: 10px 20px;
    border-radius: 30px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.like-btn:hover { background: #ececec; }
.like-btn:active { transform: scale(0.96); }
.like-btn__icon {
    width: 22px; height: 22px;
    flex-shrink: 0;
    fill: #c4c4c4;
    transition: fill .25s, transform .25s;
}
.like-btn.is-liked { color: var(--like); border-color: rgba(237,73,86,.3); background: #fff5f6; }
.like-btn.is-liked .like-btn__icon {
    fill: var(--like);
    transform: scale(1.15);
}
.like-btn.is-error {
    border-color: #dc2626;
    color: #dc2626;
}

.work-nav {
    margin-top: 40px; padding-top: 28px;
    border-top: 1px solid var(--border);
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.work-nav__item {
    display: flex; flex-direction: column; gap: 6px;
    padding: 18px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.work-nav__item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}
.work-nav__item--next { text-align: right; }
.work-nav__label {
    font-size: 12px; font-weight: 600; color: var(--text-soft);
    text-transform: uppercase; letter-spacing: 0.5px;
}
.work-nav__title { font-size: 15px; font-weight: 700; color: var(--text); }
.work-nav__empty {
    background: transparent;
    border: 1px dashed var(--border);
    cursor: default; opacity: 0.5;
}
.work-nav__empty:hover {
    transform: none; box-shadow: none; border-color: var(--border);
}

.not-found { padding: 80px 20px; text-align: center; }
.not-found__icon { font-size: 72px; margin-bottom: 16px; }
.not-found__title { font-size: 26px; font-weight: 800; margin-bottom: 12px; }
.not-found__text { color: var(--text-soft); margin-bottom: 24px; }
.not-found__back {
    display: inline-block;
    background: var(--accent); color: #fff;
    font-weight: 700; padding: 12px 28px;
    border-radius: 40px;
    transition: background var(--transition);
}
.not-found__back:hover { background: var(--accent-dark); }

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 900px) {
    .works-grid { grid-template-columns: repeat(2, 1fr); }
    .work-page__layout { grid-template-columns: 1fr; gap: 24px; }
    .work-gallery { aspect-ratio: 4 / 3; }
    .work-info__title { font-size: 26px; }
}

@media (max-width: 640px) {
    .section { padding: 40px 0; }
    .section-title { font-size: 22px; margin-bottom: 24px; }
    .header__inner { padding: 10px 14px; }
    .header__title { font-size: 17px; }
    .header__icon { font-size: 22px; }
    .header__contact { font-size: 13px; padding: 8px 14px; }
    .works-grid { grid-template-columns: 1fr; gap: 16px; }
    .team-grid { gap: 12px; }
    .team-member { padding: 18px 10px; }
    .team-member img { width: 72px; height: 72px; }
    .team-member__placeholder { width: 72px; height: 72px; font-size: 32px; }
    .about-grid > img { width: 150px; height: 150px; }
    .about-photo-placeholder { width: 150px; height: 150px; font-size: 56px; }
    .work-info__title { font-size: 22px; }
    .work-info__desc { font-size: 15px; }
    .work-nav { grid-template-columns: 1fr; }
    .work-nav__item--next { text-align: left; }
    .work-gallery__nav { width: 36px; height: 36px; font-size: 20px; }
}

@media (max-width: 400px) {
    .works-filter__btn { font-size: 12px; padding: 7px 12px; }
    .pagination__link { min-width: 36px; height: 36px; font-size: 13px; padding: 0 10px; }
    .header__title { font-size: 15px; }
    .header__contact { font-size: 12px; padding: 7px 12px; }
}