/* ===== Базовые стили ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: Arial, sans-serif; line-height: 1.6; color: #333; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ===== Шапка ===== */
header {
  background: #fff;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
  position: sticky;
  top: 0;
  z-index: 100;
}
.logo { font-weight: bold; font-size: 1.25rem; color: #2c3e50; }
nav ul { display: flex; gap: 1.5rem; }
nav a:hover { color: #007bff; }

/* ===== Главный экран ===== */
.hero {
  padding: 4.5rem 2rem;
  text-align: center;
  background: linear-gradient(rgba(38, 24, 70, 0.55), rgba(38, 24, 70, 0.55)),
    url('../img/hero.jpg') center / cover no-repeat;
  color: #fff;
}
.hero-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  max-width: 960px;
  margin: 0 auto;
}
.hero-photo {
  flex: 0 0 auto;
  width: 170px;
  height: 170px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}
.hero-text { text-align: left; }
.hero h1 { font-size: 2.8rem; margin-bottom: 0.5rem; }
.hero-role { font-size: 1.35rem; font-weight: 600; margin-bottom: 0.6rem; }
.hero p { font-size: 1.1rem; max-width: 640px; margin: 0 0 2rem 0; }
.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  background: #fff;
  color: #764ba2;
  font-weight: 600;
  border-radius: 6px;
  transition: 0.3s;
}
.btn:hover { background: #f0f0f0; transform: translateY(-2px); }

/* ===== О себе ===== */
.about { padding: 3rem 2rem; text-align: center; }
.about h2 { font-size: 2rem; margin-bottom: 1.5rem; }
.about p.bio { max-width: 720px; margin: 0 auto 2rem auto; font-size: 1.05rem; }
.stats { display: flex; justify-content: center; gap: 2.5rem; flex-wrap: wrap; max-width: 820px; margin: 0 auto; }
.stat { text-align: center; }
.stat-num { display: block; font-size: 2.6rem; font-weight: bold; color: #764ba2; line-height: 1.1; }
.stat-label { font-size: 0.9rem; color: #666; }

/* ===== Секция направлений (главная) ===== */
.features { padding: 3rem 2rem; text-align: center; background: #fff; }
.features h2 { font-size: 2rem; margin-bottom: 2rem; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}
.feature-card {
  padding: 1.5rem;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fafafa;
  text-align: left;
}
.feature-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; color: #2c3e50; }
.feature-card p { font-size: 0.95rem; color: #555; }

/* ===== Опыт — таймлайн ===== */
.experience { padding: 3rem 2rem; background: #f9f9f9; }
.experience h2 { font-size: 2rem; margin-bottom: 2rem; text-align: center; }
.timeline { max-width: 780px; margin: 0 auto; }
.timeline-item {
  padding: 0 0 1.4rem 1.6rem;
  border-left: 3px solid #d8cdee;
  position: relative;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item:before {
  content: '';
  position: absolute;
  left: -8px; top: 4px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #764ba2;
}
.timeline-date { font-size: 0.85rem; color: #999; }
.timeline-company { font-weight: bold; font-size: 1.05rem; color: #2c3e50; margin-top: 0.1rem; }
.timeline-position { font-weight: 500; color: #764ba2; margin: 0.15rem 0 0.3rem 0; }
.timeline-desc { font-size: 0.95rem; color: #555; }

/* ===== Навыки ===== */
.skills { padding: 3rem 2rem; text-align: center; background: #fff; }
.skills h2 { font-size: 2rem; margin-bottom: 1.5rem; }
.skill-tags {
  display: flex; flex-wrap: wrap; gap: 0.6rem;
  justify-content: center; max-width: 820px; margin: 0 auto;
}
.skill-tags li {
  background: #f0edf7; color: #5e3a8f;
  padding: 0.5rem 1rem; border-radius: 20px; font-size: 0.9rem;
}

/* ===== Форма заявки ===== */
.cta {
  padding: 3rem 2rem;
  background: #f9f9f9;
  text-align: center;
}
.cta h2 { font-size: 1.8rem; margin-bottom: 0.5rem; }
.cta .cta-sub { color: #666; margin-bottom: 1.5rem; }
.form-group {
  margin-bottom: 1rem;
  text-align: left;
  max-width: 400px;
  margin: 0 auto 1rem auto;
}
.form-group label { display: block; margin-bottom: 0.4rem; font-weight: 500; }
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.7rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: inherit;
}
button[type="submit"] {
  width: 100%;
  max-width: 400px;
  padding: 0.9rem;
  background: #764ba2;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.3s;
}
button[type="submit"]:hover { background: #5e3a8f; }
.contact-info { max-width: 400px; margin: 1.5rem auto 0 auto; }
.contact-info p { margin: 0.4rem 0; }
.contact-info a { color: #764ba2; font-weight: 500; }
.contact-info a:hover { text-decoration: underline; }

/* ===== Внутренние страницы ===== */
.page-hero {
  padding: 3rem 2rem;
  background: linear-gradient(135deg, #261846 0%, #4a2d7a 100%);
  color: #fff;
  text-align: center;
}
.page-hero h1 { font-size: 2.2rem; margin-bottom: 0.6rem; }
.page-hero p { max-width: 720px; margin: 0 auto; color: #d8cdee; font-size: 1.05rem; }

.breadcrumbs {
  max-width: 900px;
  margin: 1.2rem auto 0 auto;
  padding: 0 2rem;
  font-size: 0.85rem;
  color: #999;
}
.breadcrumbs a { color: #764ba2; }
.breadcrumbs a:hover { text-decoration: underline; }

.page { max-width: 820px; margin: 0 auto; padding: 2.5rem 2rem; }
.page h2 { font-size: 1.55rem; color: #2c3e50; margin: 1.8rem 0 0.8rem 0; }
.page h2:first-child { margin-top: 0; }
.page p { margin-bottom: 1rem; font-size: 1.02rem; }
.page ul.check { margin: 0 0 1.2rem 1.3rem; list-style: disc; }
.page ul.check li { margin-bottom: 0.45rem; font-size: 1rem; }
.page .meta-note { font-size: 0.9rem; color: #888; margin-bottom: 1.5rem; }

/* ===== Галерея фото с объекта ===== */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.8rem;
  margin: 1.2rem 0 1.8rem 0;
}
.gallery a {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #eee;
  background: #fafafa;
  transition: 0.3s;
}
.gallery a:hover { border-color: #d8cdee; box-shadow: 0 4px 14px rgba(118,75,162,.2); transform: translateY(-2px); }
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: 1/1;
}
.gallery.wide { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.gallery.wide img { aspect-ratio: 4/3; }
/* ===== Лайтбокс ===== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 10, 30, 0.92);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,.6);
}
.lightbox-close {
  position: absolute;
  top: 1rem; right: 1.4rem;
  color: #fff;
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 3rem;
  line-height: 1;
  cursor: pointer;
  background: rgba(255,255,255,0.12);
  border: none;
  border-radius: 50%;
  width: 56px; height: 56px;
  font-family: inherit;
  transition: 0.2s;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.28); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-counter {
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  color: #ccc;
  font-size: 0.95rem;
}

/* ===== Сетка карточек (услуги / кейсы) ===== */
.cards-section { padding: 2.5rem 2rem 3rem 2rem; }
.cards-section > h2 { font-size: 2rem; text-align: center; margin-bottom: 1.8rem; }
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}
.card {
  padding: 1.5rem;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fafafa;
  text-align: left;
  transition: 0.3s;
}
.card:hover { border-color: #d8cdee; box-shadow: 0 4px 14px rgba(118,75,162,.15); }
.card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; color: #2c3e50; }
.card p { font-size: 0.95rem; color: #555; margin-bottom: 0.8rem; }
.card .card-link { color: #764ba2; font-weight: 600; font-size: 0.9rem; }
.card .card-link:hover { text-decoration: underline; }

/* ===== CTA-блок внутренних страниц ===== */
.cta-block { background: #f0edf7; padding: 2.5rem 2rem; text-align: center; }
.cta-block h2 { font-size: 1.6rem; margin-bottom: 0.5rem; color: #2c3e50; }
.cta-block p { color: #666; margin-bottom: 1.2rem; }
.cta-block .btn { background: #764ba2; color: #fff; }
.cta-block .btn:hover { background: #5e3a8f; }

/* ===== Подвал ===== */
footer {
  padding: 2rem;
  text-align: center;
  background: #222;
  color: #ccc;
  font-size: 0.9rem;
}

/* ===== Связанные услуги / кейсы ===== */
.related { max-width: 820px; margin: 0 auto 2.5rem auto; padding: 0 2rem; }
.related h2 { font-size: 1.55rem; color: #2c3e50; margin-bottom: 0.9rem; }
.related ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0.9rem; }
.related li a { display: block; padding: 0.85rem 1.1rem; border: 1px solid #e5e0ef; border-radius: 8px; background: #fafafa; font-weight: 600; color: #2c3e50; font-size: 0.98rem; transition: 0.3s; }
.related li a:hover { border-color: #764ba2; color: #764ba2; transform: translateY(-2px); }

/* ===== Адаптив ===== */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.1rem; }
  .hero-role { font-size: 1.1rem; }
  nav ul { gap: 1rem; font-size: 0.9rem; }
  .stats { gap: 1.5rem; }
  .hero-inner { flex-direction: column; text-align: center; gap: 1.5rem; }
  .hero-photo { width: 130px; height: 130px; }
  .hero-text { text-align: center; }
  .hero p { margin: 0 auto 2rem auto; }
  .page-hero h1 { font-size: 1.7rem; }
}
