/* Базовые переменные и сброс */
:root {
  --bg-color: #FDFBF7;
  --card-bg: #FFFFFF;
  --text-dark: #3A2E27;
  --text-muted: #8A7362;
  --accent: #C29B7F;
  --accent-hover: #A67D62;
  --border-radius: 32px;
  --shadow: 0 12px 36px rgba(138, 115, 98, 0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body { 
  font-family: system-ui, sans-serif; 
  background-color: var(--bg-color); 
  color: var(--text-dark); 
  padding: 20px; 
  line-height: 1.5; 
  display: flex; 
  flex-direction: column; 
  min-height: 100vh; 
  overflow-x: hidden; 
}

/* Шапка и навигация */
header { width: 100%; max-width: 1200px; margin: 0 auto 40px auto; padding: 15px 40px; background: rgba(255, 255, 255, 0.7); backdrop-filter: blur(20px); border-radius: 100px; display: flex; justify-content: space-between; align-items: center; border: 1px solid rgba(255, 255, 255, 0.9); }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.main-logo { width: 50px; height: auto; transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.logo:hover .main-logo { transform: rotate(-15deg) scale(1.1); }
.logo-text { font-family: 'Georgia', serif; font-style: italic; font-size: 1.6rem; font-weight: 700; color: var(--text-dark); }
nav { display: flex; gap: 30px; }
nav a { text-decoration: none; color: var(--text-muted); font-weight: 500; transition: color 0.3s; }
nav a:hover, nav a.active { color: var(--accent); }

/* Общая типографика и UI-элементы */
h1 { font-size: 2.4rem; line-height: 1.1; margin-bottom: 20px; font-weight: 800; }
h2 { font-size: 1.6rem; margin-bottom: 20px; font-weight: 700; }
p { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 25px; }
.divider { height: 1px; background: linear-gradient(90deg, transparent, rgba(194, 155, 127, 0.3), transparent); margin: 10px 0 25px 0; width: 100%; }

/* Кнопки */
.btn { display: inline-flex; align-items: center; padding: 16px 32px; background: var(--accent); color: #fff; font-weight: 600; text-decoration: none; border-radius: 100px; transition: 0.3s; border: none; position: relative; z-index: 2; }
.btn:hover { background: var(--accent-hover); box-shadow: 0 8px 20px rgba(194, 155, 127, 0.4); }
.btn-light { background: #fff; color: var(--accent); }
.btn-light:hover { background: var(--bg-color); color: var(--accent-hover); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1); }
.btn-sm { padding: 10px 24px; font-size: 0.95rem; border: 1px solid rgba(194, 155, 127, 0.3); }

/* --- ГЛАВНАЯ СТРАНИЦА --- */
.bento-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.2fr 0.9fr 1fr; gap: 24px; grid-template-areas: "intro photo works" "about contact works" "about contact socials"; flex-grow: 1; }
.card { background: var(--card-bg); border-radius: var(--border-radius); padding: 40px; box-shadow: var(--shadow); display: flex; flex-direction: column; position: relative; overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(138, 115, 98, 0.1); }

.card-intro { grid-area: intro; justify-content: center; }
.card-intro::before { content: ''; position: absolute; bottom: -20px; right: -20px; width: 170px; height: 170px; background-image: url('../img/ugol.svg'); background-repeat: no-repeat; background-size: contain; background-position: bottom right; opacity: 0.3; pointer-events: none; z-index: 0; }
.card-intro > * { position: relative; z-index: 1; }
.card-intro .btn { align-self: flex-start; }

.card-photo { grid-area: photo; padding: 0; min-height: 280px; }
.photo-img { width: 100%; height: 100%; object-fit: cover; }

.card-works { grid-area: works; justify-content: flex-start; }
.stock-title { font-size: 1.4rem; margin-bottom: 15px; font-weight: 700; color: var(--text-dark); text-align: center; }
.stock-container { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.work-tag { padding: 16px 24px; background: var(--bg-color); border-radius: 20px; text-decoration: none; color: var(--text-dark); font-weight: 500; display: flex; justify-content: space-between; margin-bottom: 12px; transition: 0.3s; border: 1px solid transparent; }
.work-tag:hover { background: #fff; border-color: var(--accent); transform: translateX(4px); box-shadow: 0 4px 12px rgba(138, 115, 98, 0.05); }

.card-about { grid-area: about; position: relative; overflow: hidden; padding-bottom: 105px; }
.card-about::before { content: ''; position: absolute; bottom: 70px; left: 50%; transform: translateX(-50%); width: 325px; height: 170px; background-image: url('../img/uzor.svg'); background-repeat: no-repeat; background-size: contain; background-position: center; opacity: 0.4; pointer-events: none; z-index: 0; }
.card-about > * { position: relative; z-index: 1; }
.link-arrow { color: var(--accent); font-weight: 600; text-decoration: none; }

.card-contact { grid-area: contact; align-items: flex-start; text-align: left; background: var(--accent); color: #fff; }
.card-contact::before { content: ''; position: absolute; bottom: -10px; left: -10px; width: 200px; height: 200px; background-image: url('../img/ugol.svg'); background-repeat: no-repeat; background-size: contain; background-position: bottom right; opacity: 0.4; pointer-events: none; z-index: 0; filter: brightness(0) invert(1); transform: scaleX(-1); }
.card-contact > * { position: relative; z-index: 1; }
.card-contact p, .card-contact h2 { color: #fff; margin-bottom: 10px; }
.card-contact .btn { align-self: flex-end; margin-top: 15px; }

.card-socials { grid-area: socials; flex-direction: row; justify-content: center; align-items: center; gap: 15px; padding: 35px 25px; flex-wrap: wrap; }
.soc-btn-text { padding: 12px 28px; background: var(--bg-color); color: var(--text-dark); text-decoration: none; border-radius: 100px; font-weight: 600; font-size: 0.95rem; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); border: 1px solid rgba(194,155,127,0.15); box-shadow: 0 4px 12px rgba(138, 115, 98, 0.04); letter-spacing: 0.3px; }
.soc-btn-text:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 10px 20px rgba(194, 155, 127, 0.25); }

/* --- СТРАНИЦА "ОБО МНЕ" --- */
.lace-card { max-width: 900px; margin: 0 auto 60px; background: var(--card-bg); border-radius: 32px; padding: 60px; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; z-index: 1; box-shadow: 0 8px 24px rgba(138, 115, 98, 0.08); }
.lace-card h1 { font-size: 2.8rem; margin-bottom: 30px; line-height: 1.2; }
.lace-card p { font-size: 1.15rem; margin-bottom: 25px; color: #4a3e36; max-width: 700px; }
.editor-link { color: var(--accent); font-weight: 700; text-decoration: none; transition: color 0.3s ease; }
.editor-link:hover { color: var(--accent-hover); text-decoration: underline; }
.lace-card .divider { max-width: 400px; margin: 15px 0 35px 0; }
.highlight-text { color: var(--accent); font-weight: normal; font-style: italic; font-size: 1rem; margin-top: 10px; }

/* --- ГАЛЕРЕИ (Серьги, Браслеты и т.д.) --- */
.page-container { max-width: 900px; margin: 0 auto; flex-grow: 1; width: 100%; }
.page-title { text-align: center; font-size: 2.8rem; font-weight: 800; margin-bottom: 40px; color: var(--text-dark); }
.back-btn { display: inline-block; margin-bottom: 20px; color: var(--text-muted); text-decoration: none; font-weight: 600; transition: 0.3s; }
.back-btn:hover { color: var(--accent); transform: translateX(-4px); }
.gallery-card { background: var(--card-bg); border-radius: var(--border-radius); padding: 40px; box-shadow: var(--shadow); }

/* Контейнер главной картинки */
.carousel-main { 
  width: 100%; 
  height: 700px; 
  border-radius: 20px; 
  overflow: hidden; 
  position: relative; 
  margin-bottom: 20px; 
  background-color: var(--bg-color);
  display: flex; /* Выравниваем картинку строго по центру */
  align-items: center;
  justify-content: center;
}

/* Настройки размытого заднего фона */
.blurred-bg {
  position: absolute;
  /* Делаем блок чуть больше контейнера, чтобы размытые края не светились */
  top: -30px; left: -30px; right: -30px; bottom: -30px; 
  background-size: cover;
  background-position: center;
  filter: blur(25px) opacity(0.5); /* Сила размытия и прозрачность */
  z-index: 1; /* Фон на заднем плане */
}

/* Настройки самой главной фотографии */
.main-photo {
  width: 100%;
  height: 100%;
  object-fit: contain; /* МАГИЯ ЗДЕСЬ: картинка вписывается целиком! */
  position: relative;
  z-index: 2; /* Фото поверх размытого фона */
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15)); /* Легкая тень, чтобы отделить фото от фона */
}

/* Убедимся, что плашка автора поверх всего */
.author-badge {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background-color: rgba(255, 255, 255, 0.7);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: #333;
  transition: background-color 0.3s ease;
  z-index: 10; /* Плашка выше фона и выше картинки */
  pointer-events: none;
}


.thumbnails { display: flex; gap: 15px; padding-bottom: 10px; scrollbar-width: none; overflow-x: auto; }
.thumbnails::-webkit-scrollbar { display: none; }
.thumb { width: 100px; height: 100px; border-radius: 12px; overflow: hidden; cursor: pointer; opacity: 0.6; transition: 0.3s ease; border: 2px solid transparent; flex-shrink: 0; }
.thumb img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.thumb:hover { opacity: 0.9; }
.thumb.active { opacity: 1; border-color: var(--accent); transform: translateY(-2px); }

/* Футер */
footer { max-width: 1200px; margin: 40px auto 0; padding: 20px; text-align: center; font-size: 0.85rem; color: var(--text-muted); border-top: 1px solid rgba(138, 115, 98, 0.2); line-height: 1.6; }

/* Адаптивность для мобильных */
@media (max-width: 992px) {
  .bento-container { grid-template-columns: 1fr; grid-template-areas: "intro" "photo" "works" "about" "contact" "socials"; }
  header { flex-direction: column; gap: 20px; border-radius: 30px; }
  .card-about::before { bottom: 0px; width: 250px; }
}
@media (max-width: 768px) {
  .carousel-main { height: 400px; }
  .gallery-card { padding: 20px; }
  .lace-card { padding: 40px 30px; }
}
img.protected-img, 
.carousel-track img, 
.thumbnails img {
  user-select: none;
  -webkit-user-drag: none;
  /* Не используй pointer-events: none, иначе сломаются клики по миниатюрам карусели! */
}
/* Плашка автора */
.author-badge {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background-color: rgba(255, 255, 255, 0.6); /* Полупрозрачный белый */
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: #333;
  transition: background-color 0.3s ease, opacity 0.3s ease;
  z-index: 10;
  pointer-events: none; /* Чтобы не мешала кликать на само фото, если нужно */
}

/* При наведении на главную картинку плашка становится ярче */
.carousel-main:hover .author-badge {
  background-color: rgba(255, 255, 255, 1);
}

/* Обертка для миниатюр со стрелками */
.thumbnail-slider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
}

/* Кнопки-стрелки */
.nav-arrow {
  background: none;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 18px;
  cursor: pointer;
  padding: 5px 10px;
  transition: background 0.2s;
}

.nav-arrow:hover {
  background: #eee;
}

/* Лента миниатюр */
.thumbnails {
  display: flex;
  gap: 10px;
  overflow-x: auto; /* Включаем горизонтальную прокрутку */
  scroll-behavior: smooth; /* Плавная прокрутка */
  scrollbar-width: none; /* Прячем ползунок в Firefox */
}

.thumbnails::-webkit-scrollbar {
  display: none; /* Прячем ползунок в Chrome/Safari */
}