/* Dallas Barbershop - CSS Variables */
:root {
  /* Simplified Color Palette */
  --background-primary: #1a1a1a;
  --background-secondary: #242424;
  --text-primary: #ffffff;
  --text-secondary: #888888;
  --accent-primary: #b08d57; /* Bronze/Gold */
  --accent-secondary: #4b5320; /* Dark Olive */
  --border-color: #333333;

  /* Fonts */
  --font-primary:
    'Garet', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Lexend', 'Garet', Georgia, serif;
  --font-display: 'Lexend', 'Garet', Arial, sans-serif;
}

/* Font Face Declarations */
@font-face {
  font-family: 'Lexend';
  src: url('/assets/fonts/Lexend-Variable.woff2') format('woff2');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Garet';
  src: url('/assets/fonts/Garet-Book.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Garet';
  src: url('/assets/fonts/Garet-Heavy.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Image Optimization */
img {
  max-width: 100%;
  height: auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: optimize-quality;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-primary);
  background-color: var(--background-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-width: 320px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: 1px;
}

h1 {
  position: relative;
  font-size: clamp(2.5rem, 5vw + 1rem, 4.5rem);
  font-weight: 400;
  font-family: var(--font-display);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  letter-spacing: 2px;
}

h2 {
  font-size: clamp(2rem, 3vw + 1rem, 3.2rem);
  font-weight: 400;
  font-family: var(--font-display);
  letter-spacing: 1.5px;
}

h3 {
  font-size: clamp(1.5rem, 2vw + 0.5rem, 2.2rem);
  font-weight: 700;
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.7;
}

/* Layout */
.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 5rem 0;
  overflow: hidden; /* Запобігає горизонтальному скролу з анімаціями */
  position: relative;
}

.section:nth-child(even) {
  background-color: var(--background-secondary);
}

/* Розділення між секціями */
.section:not(.hero):before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(176, 141, 87, 0.3) 50%,
    transparent 100%
  );
  opacity: 0.6;
}

.section:not(.hero) {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.section.about {
  background: linear-gradient(
    135deg,
    var(--background-primary) 0%,
    rgba(36, 36, 36, 0.8) 100%
  );
}

.section.services {
  background: var(--background-secondary);
  position: relative;
}

.section.masters {
  background: linear-gradient(
    135deg,
    rgba(30, 30, 30, 0.9) 0%,
    var(--background-primary) 100%
  );
}

.section.contacts {
  background: var(--background-secondary);
  position: relative;
}

/* Покращені ефекти переходів між секціями */
.section.contacts::before {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(176, 141, 87, 0.5) 50%,
    transparent 100%
  );
  opacity: 0.8;
}

/* Fix для відступів між секціями в мобільних пристроях */
@media (max-width: 576px) {
  .section {
    padding: 3rem 0;
  }

  .section + .section {
    padding-top: 2rem;
  }
}

/* Header */
header {
  background: rgba(26, 26, 26, 0.4);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.5rem 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  transition:
    all 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.4s ease;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  transform: translateY(0);
}

header.scrolled {
  background: rgba(26, 26, 26, 0.85);
  padding: 1rem 0;
  border-bottom: 1px solid rgba(176, 141, 87, 0.15);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

/* Mobile header styles and menu open state */
@media (max-width: 968px) {
  header {
    background: rgba(26, 26, 26, 0.4) !important;
    padding: 1.5rem 0 !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
    z-index: 10001 !important;
  }

  header.scrolled {
    background: rgba(26, 26, 26, 0.4) !important;
    padding: 1.5rem 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
  }

  /* Hide header elements when mobile menu is open, except burger button */
  body.menu-open header {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    border-bottom: none !important;
  }

  body.menu-open .logo-header,
  body.menu-open .nav-left,
  body.menu-open .nav-right,
  body.menu-open .header-content .lang-switcher {
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease !important;
  }

  /* Keep burger button visible and functional */
  body.menu-open .mobile-menu-btn {
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 10001 !important;
  }
}

header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(176, 141, 87, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  z-index: -1;
}

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

.logo-header {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--accent-primary);
  text-decoration: none;
  letter-spacing: 2px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  z-index: 10;
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-header .logo-text {
  letter-spacing: 1px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  font-weight: 700;
}

.logo-header .logo-divider {
  display: block;
  width: 20px;
  height: 20px;
  filter: brightness(0) saturate(100%) invert(59%) sepia(26%) saturate(906%)
    hue-rotate(25deg) brightness(101%) contrast(88%);
  position: relative;
  transition: all 0.3s ease;
}

.logo-header .logo-divider::before,
.logo-header .logo-divider::after {
  display: none;
}

.logo-header.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.logo-header:hover {
  color: #d5aa6d;
}

.logo-header:hover .logo-text {
  text-shadow: 0 0 15px rgba(213, 170, 109, 0.5);
}

.logo-header:hover .logo-divider {
  transform: scale(1.2) rotate(15deg);
  filter: brightness(0) saturate(100%) invert(71%) sepia(30%) saturate(1006%)
    hue-rotate(25deg) brightness(111%) contrast(88%);
}

.nav-left,
.nav-right {
  flex: 1;
}

.nav-left {
  display: flex;
  justify-content: flex-start;
}

.nav-right {
  display: flex;
  justify-content: flex-end;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
  margin: 0;
}

.nav-menu a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 0;
  letter-spacing: 0.5px;
  font-size: 1rem;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--accent-primary);
  text-shadow: 0 0 15px rgba(213, 170, 109, 0.5);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--accent-primary),
    rgba(213, 170, 109, 0.5)
  );
  transition:
    width 0.3s ease,
    opacity 0.3s ease,
    transform 0.3s ease;
  opacity: 0;
  transform: translateY(3px);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
  opacity: 1;
  transform: translateY(0);
}

.lang-switcher {
  display: flex;
  gap: 0.5rem;
  margin-left: 2rem;
}

.lang-switcher a {
  padding: 0.3rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.lang-switcher a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--accent-primary);
  z-index: -1;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.lang-switcher a:hover::before,
.lang-switcher a.active::before {
  transform: translateY(0);
}

.lang-switcher a:hover,
.lang-switcher a.active {
  color: #000;
  border-color: var(--accent-primary);
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  z-index: 11;
  width: 40px;
  height: 40px;
  position: relative;
  cursor: pointer;
}

.menu-icon {
  display: block;
  position: relative;
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  transition: all 0.3s ease;
  margin: 0 auto;
}

.menu-icon::before,
.menu-icon::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  transition: all 0.3s ease;
  left: 0;
}

.menu-icon::before {
  top: -8px;
}

.menu-icon::after {
  bottom: -8px;
}

.mobile-menu-btn.active .menu-icon {
  background-color: transparent;
}

.mobile-menu-btn.active .menu-icon::before {
  transform: rotate(45deg);
  top: 0;
}

.mobile-menu-btn.active .menu-icon::after {
  transform: rotate(-45deg);
  bottom: 0;
}

body.menu-open {
  overflow: hidden;
}

/* Mobile Navigation Styles */
@media (max-width: 968px) {
  .nav-left,
  .nav-right {
    display: none;
  }

  .header-content .lang-switcher {
    display: none; /* Приховуємо перемикач мови в хедері на мобільних пристроях */
  }

  .logo-header {
    position: static;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    font-size: 1.8rem;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
  }

  .logo-header .logo-text {
    font-size: 1.8rem;
  }

  .logo-header .logo-divider {
    width: 22px;
    height: 22px;
    margin: 0 12px;
  }

  .mobile-menu-btn {
    display: block;
    margin-left: 10px;
    position: relative;
    z-index: 10001; /* Вище за мобільну навігацію */
  }

  .header-content {
    padding: 0 1rem;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .lang-switcher {
    margin-left: 1rem;
    order: 2;
  }

  .mobile-nav {
    position: fixed !important;
    top: -100vh !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(20, 20, 20, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999 !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 2rem;
    pointer-events: auto;
    box-sizing: border-box;
  }

  .mobile-nav.active {
    top: 0 !important;
  }

  .mobile-nav .nav-menu {
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    text-align: center;
    margin-bottom: 2rem;
    padding: 0;
  }

  .mobile-nav .nav-menu a {
    font-size: 1.6rem;
    padding: 1rem 0;
    display: block;
    text-transform: uppercase;
    letter-spacing: 2px;
    width: 100%;
  }

  .mobile-nav .nav-menu a::after {
    height: 2px;
    bottom: -5px;
    background: var(--accent-primary);
    opacity: 0.3;
    transform: scaleX(0);
    left: 30%;
    right: 30%;
    width: auto;
    transition: all 0.3s ease;
  }

  .mobile-nav .nav-menu a:hover::after,
  .mobile-nav .nav-menu a.active::after {
    opacity: 1;
    transform: scaleX(1);
    left: 20%;
    right: 20%;
  }

  .mobile-nav .lang-switcher {
    margin: 2rem 0 0 0;
    justify-content: center;
    gap: 1rem;
    width: 100%;
  }

  .mobile-nav .lang-switcher a {
    padding: 0.5rem 1.5rem;
    font-size: 1rem;
  }
}

/* Ensure mobile nav is hidden on desktop */
@media (min-width: 969px) {
  .mobile-nav {
    display: none !important;
  }
}

/* Hero Section */
.hero {
  height: 100vh; /* fallback */
  height: 100svh; /* small viewport height */
  background: var(--background-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 760px;
}

/* Video Background */
.video-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.video-foreground {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.video-foreground video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translateX(-50%) translateY(-50%);
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  object-fit: cover;
}

.video-foreground video.active {
  opacity: 1;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(20, 20, 20, 0.85) 0%,
    rgba(20, 20, 20, 0.65) 50%,
    rgba(20, 20, 20, 0.85) 100%
  );
  z-index: 2;
  backdrop-filter: blur(1px);
}

/* Hero Content Container */
.hero-content {
  max-width: 1000px;
  z-index: 10;
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

/* Hero Main Title */
.hero-main-title h1 {
  position: relative;
  font-size: clamp(4.5rem, 14vw, 9rem);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 2px;
  margin: 0 0 1.8rem 0;
  line-height: 0.85;
  isolation: isolate;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.1),
    0 2px 0 rgba(0, 0, 0, 0.05),
    0 3px 3px rgba(0, 0, 0, 0.1),
    0 0 30px rgba(0, 0, 0, 0.2);
}

.title-line-1,
.title-line-2 {
  display: block;
  position: relative;
}

.title-line-1 {
  letter-spacing: 6px;
  font-weight: 800;
}

.title-line-2 {
  letter-spacing: 4px;
  font-weight: 700;
}

.hero-subtitle {
  font-size: 1.4rem;
  color: #ffffff;
  margin: 0 0 3rem 0;
  text-shadow: 0 0 15px rgba(0, 0, 0, 0.6);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 5px;
  position: relative;
  display: block;
  text-transform: uppercase;
}

.hero-btn {
  font-size: 1rem;
  padding: 1rem 2.5rem;
  background-color: transparent;
  color: var(--text-primary);
  border: 2px solid var(--text-primary);
  border-radius: 0;
  font-weight: 500;
  letter-spacing: 2px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-block;
  font-family: var(--font-display);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.hero-btn:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background-color: var(--accent-primary);
  transition: all 0.4s ease;
  z-index: -1;
}

.hero-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent-primary);
}

.hero-btn:hover:before {
  width: 100%;
}

/* Hero Bottom Left */
.hero-bottom-left {
  position: absolute;
  bottom: 6rem;
  left: 20%;
  text-align: left;
  z-index: 10;
  max-width: 400px;
}

.hero-tagline {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin: 0;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.4;
  position: relative;
  padding-left: 20px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.hero-tagline:before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 70%;
  background-color: var(--accent-primary);
}

/* Hero Bottom Right - Phone Numbers */
.hero-bottom-right {
  position: absolute;
  bottom: 6rem;
  right: 20%;
  text-align: right;
  z-index: 10;
}

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

.contact-phones a {
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: 1.5px;
  transition: all 0.3s ease;
  line-height: 1.2;
  display: inline-block;
  padding: 0;
  margin: 0;
  line-height: 0.8;
  position: relative;
  margin-bottom: 5px;

  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-phone-number {
  margin-top: -1px;
}

.contact-phones a:hover {
  color: var(--accent-primary);
}

.contact-phones a:hover::after {
  width: 100%;
}

/* Hero Bottom Content Container */
.hero-bottom-content-container {
  position: absolute;
  bottom: 6rem;
  left: 0;
  width: 100%;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  padding: 0 20%;
}

@media screen and (max-width: 1600px) {
  .hero-bottom-content-container {
    padding: 0 15%;
    bottom: 1.5rem;
    width: 140%;
    left: auto;
  }
}

@media screen and (max-width: 1380px) {
  .hero-bottom-content-container {
    padding: 0 10%;
    bottom: 2rem;
    width: 140%;
    left: auto;
  }
}

@media (max-width: 1200px) {
  .hero-bottom-content-container {
    padding: 0 5%;
  }

  .hero-main-title h1 {
    font-size: 8rem;
    margin-bottom: 0.2em;
  }
}

@media (max-width: 992px) {
  .hero {
    min-height: 800px;
  }

  .hero-bottom-content-container {
    flex-direction: column;
    align-items: center;
    padding: 0 10%;
  }

  .hero-main-title h1 {
    font-size: 6rem;
    margin-bottom: 0.2em;
  }

  .hero-bottom-left,
  .hero-bottom-right {
    position: static;
    width: 100%;
    text-align: center;
  }

  .hero-tagline {
    padding-left: 0;
    padding-bottom: 12px;
  }

  .hero-tagline:before {
    left: 50%;
    bottom: 0;
    top: auto;
    transform: translateX(-50%);
    width: 50px;
    height: 1px;
  }

  .contact-phones {
    flex-direction: column;
    align-items: center;
    margin-top: 12px;
  }
}

@media (max-width: 768px) {
  .hero-bottom-content-container {
    bottom: 10rem;
  }

  .hero {
    min-height: 800px;
    height: 100svh;
  }

  .hero-content {
    padding-top: 120px; /* Increase top padding to ensure content is visible */
  }

  .hero-main-title h1 {
    font-size: clamp(3rem, 10vw, 4rem); /* Responsive font sizing */
    margin-bottom: 0.2em;
  }

  .title-line-1,
  .title-line-2 {
    display: block;
    text-align: center;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-btn {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
  }

  .hero-tagline {
    font-size: 1rem;
    opacity: 0.85;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 16px;
    padding-bottom: 12px;
  }

  .hero-bottom-content-container {
    bottom: 3.5rem;
    padding: 0 5%; /* Reduce side padding for more space */
  }
}

@media (max-width: 576px) {
  .hero-bottom-content-container {
    bottom: 5rem;
    gap: 2rem;
  }

  .hero {
    min-height: 800px;
  }

  .hero-content {
    padding-top: 120px; /* Increase top padding to ensure content is visible */
  }

  .hero-main-title h1 {
    font-size: clamp(2rem, 10vw, 3rem); /* Responsive font sizing */
  }

  .title-line-1,
  .title-line-2 {
    display: block;
    text-align: center;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-btn {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
  }

  .hero-tagline {
    font-size: 1rem;
    opacity: 0.85;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal; /* Allow wrapping */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit to 2 lines */
    line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .hero-bottom-content-container {
    bottom: 3.5rem;
    padding: 0 5%; /* Reduce side padding for more space */
  }
}

/* Extra small devices optimization */
@media (max-width: 380px) {
  .hero {
    min-height: 600px;
  }

  .hero-main-title h1 {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }

  .hero-subtitle {
    font-size: 0.85rem;
    margin-bottom: 1.2rem;
  }

  .hero-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }

  .hero-tagline {
    display: none; /* Hide tagline on very small devices to reduce clutter */
  }

  .hero-bottom-content-container {
    bottom: 2.5rem;
  }

  .contact-phones a {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
  }

  .hero-phone-number {
    margin-top: 0px;
  }
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: var(--text-secondary);
  z-index: 10;
  animation: pulse 2s ease-in-out infinite;
}

.scroll-indicator span {
  font-size: 0.8rem;
  display: block;
  margin-bottom: 0.7rem;
  text-shadow: none;
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.8;
}

.scroll-arrow {
  width: 18px;
  height: 18px;
  border: 2px solid var(--accent-primary);
  border-top: none;
  border-right: none;
  transform: rotate(-45deg);
  margin: 0 auto;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: rotate(-45deg) translateY(0);
  }
  40% {
    transform: rotate(-45deg) translateY(-5px);
  }
  60% {
    transform: rotate(-45deg) translateY(-3px);
  }
}

/* Spotlight Effects - чіткі промені прожекторів */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    /* Промінь зверху зліва */
    linear-gradient(140deg, rgba(176, 141, 87, 0.4) -30%, transparent 25%),
    /* Промінь справа вгорі */
      linear-gradient(220deg, rgba(176, 141, 87, 0.35) -20%, transparent 20%),
    /* Промінь зліва внизу */
      linear-gradient(60deg, rgba(75, 83, 32, 0.25) -20%, transparent 25%);
  pointer-events: none;
  animation: spotlight-beams 40s linear infinite;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    /* Промінь справа внизу */
    linear-gradient(320deg, rgba(176, 141, 87, 0.45) -30%, transparent 25%),
    /* Центральний промінь */
      linear-gradient(180deg, rgba(176, 141, 87, 0.15) -10%, transparent 45%),
    /* Атмосферний промінь */
      linear-gradient(
        90deg,
        rgba(75, 83, 32, 0.08) -10%,
        transparent 15%,
        rgba(176, 141, 87, 0.1) 80%,
        transparent 100%
      );
  pointer-events: none;
  animation: spotlight-secondary 35s ease-in-out infinite alternate;
}

@keyframes spotlight-beams {
  0% {
    opacity: 0.85;
    background-position: 0% 0%;
  }
  33% {
    opacity: 0.95;
    background-position: 3% -1%;
  }
  66% {
    opacity: 0.9;
    background-position: -2% 1%;
  }
  100% {
    opacity: 0.85;
    background-position: 0% 0%;
  }
}

@keyframes spotlight-secondary {
  0% {
    opacity: 0.8;
    background-position: 0% 0%;
  }
  50% {
    opacity: 1;
    background-position: -1% 1%;
  }
  100% {
    opacity: 0.8;
    background-position: 1% -1%;
  }
}

@keyframes ambient-atmosphere {
  0%,
  100% {
    opacity: 0.8;
    transform: scale(1);
  }
  33% {
    opacity: 1;
    transform: scale(1.02);
  }
  66% {
    opacity: 0.9;
    transform: scale(0.98);
  }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1.2rem 2.5rem;
  background: linear-gradient(
    45deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 700;
  font-family: var(--font-primary);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: 0 4px 15px rgba(176, 141, 87, 0.2);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(176, 141, 87, 0.4);
  background: linear-gradient(
    45deg,
    var(--accent-secondary),
    var(--accent-primary)
  );
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--accent-primary);
  color: var(--accent-primary);
  box-shadow: none;
}

.btn-secondary:hover {
  background: var(--accent-primary);
  color: var(--text-primary);
  box-shadow: 0 8px 25px rgba(176, 141, 87, 0.3);
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text-primary);
  position: relative;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  border-radius: 2px;
}

/* Services Section */
.services {
  background-color: var(--background-secondary);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.service-item {
  background-color: rgba(36, 36, 36, 0.7);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.service-item:hover {
  transform: translateY(-5px);
  border-color: var(--accent-primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  background-color: rgba(40, 40, 40, 0.8);
}

.service-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.8rem;
  gap: 1rem;
}

.service-name {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
  line-height: 1.3;
}

.service-price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-primary);
  text-shadow: 0 0 10px rgba(176, 141, 87, 0.3);
  flex-shrink: 0;
  min-width: fit-content;
}

.service-time {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  opacity: 0.8;
  border-top: 1px dashed rgba(176, 141, 87, 0.3);
  padding-top: 0.8rem;
}

.service-time > div {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.service-btn {
  background: transparent;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.4rem 1rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  border: 1px solid rgba(136, 136, 136, 0.4);
  opacity: 0;
  transform: translateY(5px);
}

.service-item:hover .service-btn {
  opacity: 1;
  transform: translateY(0);
}

.service-btn:hover {
  background: var(--accent-primary);
  color: var(--text-primary);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(176, 141, 87, 0.3);
}

/* Masters Section */
.masters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.master-card {
  background-color: var(--background-secondary);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.master-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.master-image {
  width: 100%;
  aspect-ratio: 4/5;
  position: relative;
  overflow: hidden;
}

.master-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transition: transform 0.3s ease;
}

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

.master-info {
  padding: 1rem;
  position: relative;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.master-info::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-primary),
    transparent
  );
}

.master-name {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.master-position {
  font-size: 0.9rem;
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
  font-weight: 500;
  letter-spacing: 1px;
}

.master-desc {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
  margin-bottom: 0;
}

.master-book-btn {
  display: block;
  width: 100%;
  padding: 1rem 2rem;
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  color: white;
  text-decoration: none;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  margin-top: auto;
}

.master-book-btn::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 ease;
}

.master-book-btn:hover::before {
  left: 100%;
}

.master-book-btn:hover {
  box-shadow: 0 5px 15px rgba(176, 141, 87, 0.4);
}

@media (max-width: 768px) {
  .masters-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .master-image {
    aspect-ratio: 3/4;
  }
}

/* About Section */
.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-description {
  font-size: 1.1rem;
  margin-bottom: 3rem;
  color: var(--text-primary);
  opacity: 0.9;
  line-height: 1.8;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
}

.about-subtitle {
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin-bottom: 2rem;
  letter-spacing: 1px;
  position: relative;
  display: inline-block;
}

.about-subtitle::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: var(--accent-primary);
}

.advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.advantage-item {
  padding: 2.5rem;
  background: linear-gradient(
    145deg,
    rgba(40, 40, 40, 0.8),
    rgba(30, 30, 30, 0.5)
  );
  border-radius: 6px;
  border-left: 3px solid var(--accent-primary);
  transition: all 0.3s ease;
  text-align: left;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.advantage-item:hover {
  transform: translateY(-5px);
  background: linear-gradient(
    145deg,
    rgba(45, 45, 45, 0.8),
    rgba(35, 35, 35, 0.5)
  );
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.advantage-item:hover .advantage-icon {
  transform: translateY(-3px);
}

.advantage-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 1.8rem;
  transition: all 0.3s ease;
  filter: drop-shadow(0 3px 5px rgba(176, 141, 87, 0.3));
}

.advantage-icon img {
  width: 100%;
  height: 100%;
  filter: brightness(0) saturate(100%) invert(59%) sepia(26%) saturate(906%)
    hue-rotate(25deg) brightness(101%) contrast(88%);
}

.advantage-title {
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 1.2rem;
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.advantage-desc {
  color: var(--text-primary);
  opacity: 0.8;
  font-size: 1rem;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .advantages-grid {
    grid-template-columns: 1fr;
  }

  .advantage-item {
    padding: 1.5rem;
  }
}

/* Contacts Section */
.contacts {
  background-color: var(--background-secondary);
  position: relative;
}

.contacts::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-primary),
    transparent
  );
  opacity: 0.5;
}

.contacts-content {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: stretch;
}

.contact-info {
  padding: 2rem;
  background-color: rgba(26, 26, 26, 0.5);
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border-left: 3px solid var(--accent-primary);
  display: flex;
  flex-direction: column;
}

.contact-info h3 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-size: 1.3rem;
  position: relative;
  padding-bottom: 0.5rem;
  font-family: var(--font-heading);
  letter-spacing: 1px;
}

.contact-info h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: var(--accent-primary);
}

.contact-item p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.contacts .contact-phones {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.contacts .contact-phones a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
  display: inline-block;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  transition: all 0.3s ease;
  letter-spacing: 1px;
  border-left: 2px solid var(--accent-primary);
}

.contacts .contact-phones a:hover {
  background: rgba(0, 0, 0, 0.4);
  color: var(--accent-primary);
  transform: translateY(-2px);
}

.social-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  color: var(--text-primary);
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.social-links a svg {
  width: 24px;
  height: 24px;
  transition: all 0.3s ease;
}

.social-links a:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.social-links a:hover svg {
  transform: scale(1.1);
}

.map-container {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  height: 100%;
  min-height: 450px;
  position: relative;
}

.map-container iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
}

/* Contacts section adjustments */
.contacts-content {
  align-items: stretch;
}

.contact-info {
  gap: 0;
}

.contact-item {
  padding-bottom: 1rem;
}

.contact-item:last-child {
  padding-bottom: 0;
}

.map-container {
  height: 100%;
}

.map-container iframe {
  height: 100%;
}

@media (max-width: 992px) {
  .contacts-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .contacts-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .map-container {
    min-height: 350px;
  }
}

@media (max-width: 576px) {
  .contacts .contact-phones a {
    font-size: 1rem;
    padding: 10px 8px;
    width: 100%;
    text-align: center;
    white-space: normal;
  }

  .contact-info {
    padding: 1.5rem;
  }

  .map-container {
    min-height: 300px;
  }
}

/* Footer */
footer {
  background-color: var(--background-primary);
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

footer p {
  color: var(--text-secondary);
  margin: 0;
}

/* Smaller logo for very small screens */
@media (max-width: 600px) {
  .logo-header {
    font-size: 1.4rem;
  }

  .logo-header .logo-text {
    font-size: 1.4rem;
  }

  .logo-header .logo-divider {
    width: 16px;
    height: 16px;
    margin: 0 8px;
  }
}

/* Smaller logo for very small screens */
@media (max-width: 392px) {
  .hero-content {
    padding-top: 60px;
  }

  .logo-header {
    font-size: 1.2rem;
  }

  .logo-header .logo-text {
    font-size: 1.2rem;
  }

  .logo-header .logo-divider {
    width: 14px;
    height: 14px;
    margin: 0;
  }

  .header-content {
    justify-content: space-between !important;
    padding: 0 1.6rem;
  }

  /* Keep mobile menu button visible on the right */
  .mobile-menu-btn {
    display: block !important;
    position: static !important;
    margin-left: auto !important;
  }

  /* Hide logo text, keep only SVG on the left */
  .logo-header .logo-text {
    display: none !important;
  }

  /* Position logo SVG on the left */
  .logo-header {
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: auto !important;
    gap: 0 !important;
    order: -1 !important;
  }

  .logo-header .logo-divider {
    width: 32px !important;
    height: 32px !important;
    margin: 0 !important;
  }

  /* Ensure header stays clean and minimal */
  header {
    padding: 1rem 0 !important;
  }
}
