/*
 * Стили для сайта барбершопа «Скандинавский бродобрей».
 * Темные тона, контрастные акценты и плавные анимации создают
 * атмосферу уюта и мужского уюта. Типографика сочетает элегантность
 * с современностью, обеспечивая читабельность на всех устройствах.
 */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Montserrat:wght@400;500;600&display=swap');

/* Переменные для основных цветов */
:root {
  --background: #0f0f0f;
  --foreground: #f5f5f5;
  --accent: #d97706; /* тёплый оранжевый для акцентов */
  --secondary: #5a4637; /* коричнево‑серый */
  --card-bg: #1b1b1b;
  --border-radius: 0.5rem;
  --transition: 0.3s ease;
}

/* Универсальный стиль для основных кнопок на сайте. Используется в хедере,
   герое, секциях «О нас» и в других местах. Задаёт фон, цвет текста,
   отступы и плавное изменение при наведении. */
.cta-button {
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1.4rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-block;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
  z-index: -1;
}

.cta-button:hover {
  background: #b36404;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(217, 119, 6, 0.3);
}

.cta-button:hover::before {
  left: 100%;
}

/* Сброс базовых стилей */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', sans-serif;
  color: var(--foreground);
  background-color: var(--background);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--foreground);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent);
}

/* Шапка сайта */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  backdrop-filter: blur(4px);
  z-index: 1000;
  background: rgba(15, 15, 15, 0.8);
  transition: all var(--transition);
}

header.scrolled {
  background: rgba(15, 15, 15, 0.95);
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

header .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
}

header .logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  position: relative;
}

header .logo::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

header .logo:hover::after {
  width: 100%;
}

header .nav-links {
  display: flex;
  align-items: center;
}

header .nav-links a {
  margin-left: 1.5rem;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}

header .nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

header .nav-links a:hover::after {
  width: 100%;
}

header .cta-button {
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1.4rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  margin-left: 2rem;
  transition: all var(--transition);
}

header .cta-button:hover {
  background: #b36404;
  transform: translateY(-2px);
}

/* Бургер меню */
.burger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  width: 24px;
  height: 18px;
  position: relative;
}

.burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--foreground);
  margin-bottom: 4px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Контейнер для центрирования контента */
.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Геройский блок */
.hero {
  width: 100%;
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--foreground);
  padding-top: 4rem;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: -1;
  transition: transform 0.1s ease-out;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.8) 100%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  padding: 0 2rem;
  text-align: center;
  animation: fadeInUp 1s ease-out;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: #d1d1d1;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-buttons .cta-button {
  padding: 0.8rem 1.8rem;
  font-size: 1rem;
  margin: 0;
}

/* Секции */
section {
  padding: 5rem 0;
  width: 100%;
}



h2.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

h2.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--accent);
}

/* Блок преимуществ */
.features {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}

.feature {
  flex: 1 1 calc(25% - 2rem);
  background: var(--background);
  padding: 2rem;
  border-radius: var(--border-radius);
  text-align: center;
  transition: all var(--transition);
  opacity: 0;
  transform: translateY(20px);
}

.feature.animate-in {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.6s ease;
}

.feature:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.feature svg {
  width: 50px;
  height: 50px;
  margin-bottom: 1rem;
  fill: var(--accent);
  transition: all var(--transition);
}

.feature:hover svg {
  transform: scale(1.1);
}

.feature-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

/* Категории услуг */
.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.category-card {
  flex: 1 1 calc(33.333% - 2rem);
  background: var(--background);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(20px);
}

.category-card.animate-in {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.6s ease;
}

.category-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.4);
}

.category-card .image-container {
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.category-card .image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: all var(--transition);
}

.category-card:hover .image-container img {
  transform: scale(1.05);
}

.category-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.category-content h3 {
  font-family: 'Playfair Display', serif;
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
}

.category-content p {
  flex: 1;
  font-size: 0.95rem;
  color: #c9c9c9;
  margin-bottom: 1rem;
}

.category-content a {
  align-self: flex-start;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  transition: all var(--transition);
}

.category-content a:hover {
  background: #b36404;
  transform: translateY(-2px);
}

/* Блок команды */
.team {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.team-member {
  flex: 1 1 calc(33.333% - 2rem);
  background: var(--background);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: all var(--transition);
  opacity: 0;
  transform: translateY(20px);
}

.team-member.animate-in {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.6s ease;
}

.team-member:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.5);
}

.member-image {
  overflow: hidden;
  height: 320px;
}

.team-member img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: all var(--transition);
}

.team-member:hover img {
  transform: scale(1.05);
}

.team-member .member-info {
  padding: 1.5rem;
  text-align: center;
}

.team-member .member-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin-bottom: 0.3rem;
}

.team-member .member-role {
  font-size: 0.9rem;
  color: #c9c9c9;
  margin-bottom: 0.8rem;
}

.team-member .member-bio {
  font-size: 0.9rem;
  color: #b5b5b5;
}

/* Секция об истории */
.about {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
}

.about .about-image {
  flex: 1 1 50%;
  overflow: hidden;
  border-radius: var(--border-radius);
}

.about .about-image img {
  width: 100%;
  border-radius: var(--border-radius);
  display: block;
  object-fit: cover;
  transition: all var(--transition);
}

.about .about-image:hover img {
  transform: scale(1.03);
}

.about .about-text {
  flex: 1 1 50%;
}

.about .about-text h3 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.about .about-text p {
  margin-bottom: 1rem;
  color: #ccc;
}

.about .about-text .cta-button {
  display: inline-block;
  margin-top: 1rem;
}

/* Секция статей */
.articles {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.article {
  flex: 1 1 calc(33.333% - 2rem);
  background: var(--background);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(20px);
}

.article.animate-in {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.6s ease;
}

.article:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.4);
}

.article-image {
  height: 200px;
  background-size: cover;
  background-position: center;
  transition: all var(--transition);
}

.article:hover .article-image {
  transform: scale(1.05);
}

.article-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-content h4 {
  font-family: 'Playfair Display', serif;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.article-content p {
  flex: 1;
  font-size: 0.9rem;
  color: #c9c9c9;
  margin-bottom: 1rem;
}

.article-content a {
  align-self: flex-start;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  transition: all var(--transition);
}

.article-content a:hover {
  background: #b36404;
  transform: translateY(-2px);
}

/* Отзывы */
.testimonials {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.testimonial-item {
  flex: 1 1 calc(33.333% - 2rem);
  background: var(--background);
  padding: 2rem;
  border-radius: var(--border-radius);
  position: relative;
  transition: all var(--transition);
  opacity: 0;
  transform: translateY(20px);
}

.testimonial-item.animate-in {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.6s ease;
}

.testimonial-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.4);
}

.testimonial-item::before {
  content: '"';
  position: absolute;
  top: 10px;
  left: 20px;
  font-size: 4rem;
  color: var(--accent);
  opacity: 0.3;
  font-family: serif;
  line-height: 1;
}

.testimonial-item p {
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.testimonial-author {
  font-weight: 600;
  color: var(--accent);
}

/* Контакты */
.contact {
  max-width: 600px;
  margin: 0 auto;
  background: var(--background);
  padding: 2.5rem;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.contact h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.contact p {
  margin-bottom: 2rem;
  color: #ccc;
}

.contact form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact form input,
.contact form textarea {
  padding: 0.8rem;
  border: 1px solid #444;
  border-radius: var(--border-radius);
  background: #1b1b1b;
  color: var(--foreground);
  font-family: 'Montserrat', sans-serif;
  transition: all var(--transition);
}

.contact form input:focus,
.contact form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.2);
}

.contact form textarea {
  min-height: 120px;
  resize: vertical;
}

.contact form button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  align-self: flex-start;
}

.contact form button:hover {
  background: #b36404;
  transform: translateY(-2px);
}

/* Футер */
footer {
  background: #0a0a0a;
  padding: 4rem 0 2rem;
  border-top: 1px solid #222;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}

.footer-content > div {
  flex: 1 1 30%;
}

.footer-content h4 {
  font-family: 'Playfair Display', serif;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.footer-content ul {
  list-style: none;
}

.footer-content li {
  margin-bottom: 0.5rem;
}

.footer-content a {
  color: #ccc;
  transition: all var(--transition);
}

.footer-content a:hover {
  color: var(--accent);
  padding-left: 5px;
}

/* Кнопка наверх */
#backToTop {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 999;
}

#backToTop.show {
  opacity: 1;
  visibility: visible;
}

#backToTop:hover {
  background: #b36404;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(217, 119, 6, 0.4);
}

#backToTop svg {
  width: 24px;
  height: 24px;
}

/* Мобильная кнопка записи */
.cta-mobile {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  z-index: 999;
  display: none;
  transition: all var(--transition);
}

.cta-mobile:hover {
  background: #b36404;
  transform: translateX(-50%) translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

/* Анимации */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Медиа-запросы для адаптивности */
@media (max-width: 1024px) {
  .features {
    gap: 1.5rem;
  }
  
  .feature {
    flex: 1 1 calc(50% - 1.5rem);
  }
  
  .categories {
    gap: 1.5rem;
  }
  
  .category-card {
    flex: 1 1 calc(50% - 1.5rem);
  }
  
  .team {
    gap: 1.5rem;
  }
  
  .team-member {
    flex: 1 1 calc(50% - 1.5rem);
  }
  
  .articles {
    gap: 1.5rem;
  }
  
  .article {
    flex: 1 1 calc(50% - 1.5rem);
  }
  
  .testimonials {
    gap: 1.5rem;
  }
  
  .testimonial-item {
    flex: 1 1 calc(50% - 1.5rem);
  }
}

@media (max-width: 768px) {
  header .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(15, 15, 15, 0.95);
    flex-direction: column;
    padding: 1rem 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
  }
  
  header .nav-links.active {
    display: flex;
  }
  
  header .nav-links a {
    margin: 0.5rem 0;
    padding: 0.5rem 2rem;
    width: 100%;
  }
  
  header .cta-button {
    display: none;
  }
  
  .burger {
    display: flex;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .feature {
    flex: 1 1 100%;
  }
  
  .category-card {
    flex: 1 1 100%;
  }
  
  .team-member {
    flex: 1 1 100%;
  }
  
  .about {
    flex-direction: column;
  }
  
  .about .about-image,
  .about .about-text {
    flex: 1 1 100%;
  }
  
  .article {
    flex: 1 1 100%;
  }
  
  .testimonial-item {
    flex: 1 1 100%;
  }
  
  .footer-content > div {
    flex: 1 1 100%;
  }
  
  .cta-mobile {
    display: block;
  }
}

@media (max-width: 480px) {
  .section-container {
    padding: 0 1rem;
  }
  
  .hero-content {
    padding: 0 1rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  h2.section-title {
    font-size: 1.8rem;
  }
  
  .feature {
    padding: 1.5rem;
  }
  
  .category-content,
  .team-member .member-info,
  .article-content {
    padding: 1rem;
  }
  
  .contact {
    padding: 1.5rem;
  }
}