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

body {
  --bg-image: url("materials/images/img_bg_light.jpg");
  --bg-overlay: rgba(255, 255, 255, 0.35);
}

body.dark-theme {
  --bg-image: url("materials/images/img_bg_dark.jpg");
  --bg-overlay: rgba(0, 0, 0, 0.35);
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Roboto",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  scroll-behavior: smooth;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

/* Theme Variables - Light */
body {
  --bg-page: #fafaff;
  --bg-card: #ffffff;
  --bg-subtle: #f5f5f5;
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-light: #808080;
  --border-light: #e0e0e0;
  --border-medium: #cccccc;
  --accent-purple: #8b5cf6;
  --accent-yellow: #fcd34d;
  --accent-gray: #6b7280;
}

/* Theme Variables - Dark */
body.dark-theme {
  --bg-page: #0a0a0f;
  --bg-card: #1a1a24;
  --bg-subtle: #252530;
  --text-primary: #f5f5f5;
  --text-secondary: #b8b8c8;
  --text-light: #808090;
  --border-light: #2a2a3a;
  --border-medium: #3a3a4a;
  --accent-purple: #a78bfa;
  --accent-yellow: #fde047;
  --accent-gray: #9ca3af;
}

body {
  background: var(--bg-page);
  color: var(--text-primary);
}

/* Header Styles */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}

.header-content {
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-purple);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.logo:hover {
  opacity: 0.8;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--accent-purple);
}

.theme-toggle {
  padding: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}

.theme-toggle:hover {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
  color: white;
}

/* Mobile Navigation */
.mobile-menu-btn {
  display: none;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
}

@media (max-width: 781px) {
  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border-light);
  }
}

/* Hero Section */
.hero {
  padding: 120px 24px 80px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  margin-bottom: 48px;
  line-height: 1.6;
}

.hero-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}

.hero-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  transition: all 0.3s ease;
}

.hero-feature:hover {
  transform: translateY(-4px);
  border-color: var(--accent-purple);
}

.feature-icon {
  color: var(--accent-purple);
  flex-shrink: 0;
}

.feature-text {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: left;
}

/* Button Styles */
.btn-primary {
  border-radius: 25px;
  padding: 16px 40px;
  background: var(--accent-purple);
  color: white;
  font-weight: 600;
  font-size: 18px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 54px;
}

.btn-primary:hover {
  background: #7c3aed;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

/* Section Styles */
.section {
  padding: 80px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 48px;
  line-height: 1.6;
}

/* Accordion Styles */
.directions-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.accordion-item {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.accordion-item:hover {
  border-color: var(--accent-purple);
}

.accordion-trigger {
  width: 100%;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: transparent;
  border: none;
  text-align: left;
  transition: all 0.2s ease;
}

.accordion-trigger:hover {
  background: var(--bg-subtle);
}

.direction-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.direction-icon {
  color: var(--accent-purple);
  flex-shrink: 0;
}

.direction-info h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.direction-info p {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 400;
}

.accordion-icon {
  transition: transform 0.3s ease;
  color: var(--text-secondary);
}

.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion-item.active .accordion-content {
  max-height: 2000px;
}

.direction-content {
  padding: 0 24px 24px 24px;
}

.direction-description {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* Media Gallery */
.media-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.media-item {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.media-item:hover {
  transform: scale(1.05);
}

.media-item img,
.media-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  background: rgba(0, 0, 0, 0.6);
  padding: 12px;
  border-radius: 50%;
  pointer-events: none;
}

/* Process Section */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.process-card {
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  transition: all 0.3s ease;
}

.process-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-purple);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.1);
}

.process-icon {
  color: var(--accent-purple);
  margin-bottom: 16px;
}

.process-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.process-description {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Contact Section */
.contact-content {
  text-align: center;
}

.contact-methods {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.contact-btn:hover {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
  color: white;
  transform: translateY(-2px);
}

.contact-info {
  margin-top: 32px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  display: inline-block;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.contact-detail:last-child {
  margin-bottom: 0;
}

/* Footer */
.footer {
  padding: 32px 24px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
  text-align: center;
}

.footer-text {
  color: var(--text-light);
  font-size: 14px;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 24px;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  overflow: hidden;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.7);
  border: none;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s ease;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.9);
}

#modal-media-container img,
#modal-media-container video {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
}

/* Responsive Design */
@media (max-width: 781px) {
  .hero {
    padding: 100px 16px 60px;
  }

  .section {
    padding: 60px 16px;
  }

  .hero-features {
    grid-template-columns: 1fr;
  }

  .process-grid {
    grid-template-columns: 1fr;
  }

  .media-gallery {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .contact-methods {
    flex-direction: column;
    align-items: stretch;
  }
}

/* SEO-контент — видимий для Google, прихований для користувача */
.seo-directions {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/*==================== FLOATING BG BY GPT ==========================*/
body::before,
body::after {
  content: "";
  position: fixed;
  top: -25%;
  left: -35%;
  width: 170%;
  height: 170%;

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  transform: var(--parallax-transform, translate(0, 0)) rotate(15deg)
    scale(1.05);

  filter: blur(2.5px);

  pointer-events: none;
  z-index: -1;
  will-change: transform, opacity;
}

body::before {
  content: "";
  position: fixed;
  top: -25%;
  left: -35%;
  width: 170%;
  height: 170%;

  background:
    linear-gradient(var(--bg-overlay), var(--bg-overlay)), var(--bg-image);

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  transform: translate(var(--px, 0px), var(--py, 0px)) rotate(15deg) scale(1.05);

  filter: blur(2.5px);
  z-index: -1;
  pointer-events: none;
  will-change: transform;
}

@keyframes bg-float {
  0% {
    transform: rotate(15deg) translateY(0) scale(1.05);
  }
  50% {
    transform: rotate(15deg) translateY(-40px) scale(1.08);
  }
  100% {
    transform: rotate(15deg) translateY(0) scale(1.05);
  }
}

/*==================== CAROUSEL ==========================*/
.carousel-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

.carousel-wrap {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg-subtle);
}

.carousel-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.carousel-slide {
  min-width: 100%;
  aspect-ratio: 16 / 7;
}

@media (max-width: 781px) {
  .carousel-slide {
    aspect-ratio: 4 / 3;
  }
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
  z-index: 2;
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

.carousel-btn--prev {
  left: 14px;
}
.carousel-btn--next {
  right: 14px;
}

@media (max-width: 781px) {
  .carousel-btn {
    width: 32px;
    height: 32px;
  }
}

.carousel-timer {
  height: 3px;
  background: var(--border-light);
  border-radius: 2px;
  margin: 10px 0 0;
  overflow: hidden;
}

.carousel-timer-bar {
  height: 100%;
  width: 0%;
  background: var(--accent-purple);
  border-radius: 2px;
  transition: width linear;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px 0 0;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-medium);
  border: none;
  cursor: pointer;
  padding: 0;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.carousel-dot.active {
  background: var(--accent-purple);
  transform: scale(1.35);
}
