/* Import common page styles */
@import url("../pagestyle.css");

.product-group-page {
  background: linear-gradient(135deg, var(--light-color) 0%, #f0f8ff 100%);
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.page-hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hero Section */
.pg-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: calc(
    100vh - 50px
  ); /* Adjusted to sum with breadcrumb to 100vh on desktop */
  gap: 0;
  position: relative;
  overflow: hidden;
  background: var(--tertiary-light);
}

.pg-hero::before {
  content: "";
  position: absolute;
  top: 15%;
  left: 12%;
  width: 250px; /* Уменьшен размер */
  height: 250px; /* Уменьшен размер */
  background-color: rgba(176, 135, 11, 0.04); /* Светлый оттенок primary */
  border-radius: 50%;
  z-index: 0;
}

.pg-hero::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 18%;
  width: 300px; /* Уменьшен размер */
  height: 300px; /* Уменьшен размер */
  background-color: rgba(226, 183, 59, 0.03); /* Светлый оттенок secondary */
  border-radius: 50%;
  z-index: 0;
}

.pg-hero__gallery {
  position: relative;
}

.pg-hero__details {
  background: transparent;
  padding: clamp(2rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}

.pg-title {
  font-size: 5rem;
  font-weight: 100;
  color: var(--white);
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.pg-meta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.pg-region-box {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--secondary-color);
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  width: fit-content;
  box-shadow: 0 4px 15px rgba(176, 135, 11, 0.3);
  transition: all 0.3s ease;
}

.pg-region-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(176, 135, 11, 0.4);
}

.pg-region-box i {
  color: var(--white);
  font-size: 1.3rem;
  flex-shrink: 0;
}

.pg-region {
  font-size: 1.3rem;
  color: var(--white);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.pg-price {
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--secondary-light);
  letter-spacing: 0.03em;
}

.pg-desc {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--light-color);
  margin-bottom: 2.5rem;
  opacity: 1;
  font-weight: 300;
  max-width: 600px;
}

.pg-cta .btn {
  padding: 1.2rem 2.5rem;
  font-size: 1.2rem;
  font-weight: 400;
  background: transparent;
  color: var(--white);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(176, 135, 11, 0.3);
  border: 2px solid var(--white);
  letter-spacing: 0.05em;
}

/* Slider Styles */
.pg-slider {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.pg-slide {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.pg-slide:hover {
  transform: scale(1.02);
}

.pg-slider__track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease;
}

.pg-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}

.pg-slide img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.pg-slider__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: var(--white);
  border: none;
  width: 50px;
  height: 50px;
  cursor: pointer;
  z-index: 10;
  border-radius: 50%;
  transition: background 0.3s ease;
}

.pg-slider__nav--prev {
  left: 1rem;
}

.pg-slider__nav--next {
  right: 1rem;
}

.pg-slider__nav:hover {
  background: var(--primary-color);
}

.pg-slider__dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.pg-slider__dots button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.3s ease;
}

.pg-slider__dots button.active {
  background: var(--primary-color);
}

/* Tabs Section */
.pg-tabs {
  background: var(--shadow-color);
  height: auto;
  min-height: 100vh;
  position: relative;
  padding-top: 0;
  overflow: visible; /* Allow sticky to work */
}

.pg-tabs::before {
  content: "";
  position: absolute;
  top: 25%;
  left: 8%;
  width: 200px; /* Уменьшен размер */
  height: 200px; /* Уменьшен размер */
  background-color: rgba(176, 135, 11, 0.04); /* Светлый оттенок primary */
  border-radius: 50%;
  z-index: 0;
}

.pg-tabs::after {
  content: "";
  position: absolute;
  top: 40%;
  right: 12%;
  width: 240px; /* Уменьшен размер */
  height: 240px; /* Уменьшен размер */
  background-color: rgba(226, 183, 59, 0.03); /* Светлый оттенок secondary */
  border-radius: 50%;
  z-index: 0;
}

.pg-tabs__nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  border-bottom: 1px solid var(--light-gray);
  background: var(--glass-20);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.pg-tabs__nav.sticky {
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  margin-bottom: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.pg-tab {
  background: none;
  border: none;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--light-color);
  cursor: pointer;
  position: relative;
  transition: color 0.3s ease;
}

.pg-tab.is-active {
  color: var(--secondary-light);
}

.pg-tab.is-active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary-color);
}

.pg-tabs__panel {
  display: none;
}

.pg-tabs__panel.is-active {
  display: block;
}

.pg-textwrap {
  margin: 0 auto;
  position: relative;
  z-index: 1;
  max-width: 1400px;
  padding: 100px 0;
}

.pg-textwrap h2 {
  font-size: 2.8rem;
  font-weight: 300;
  color: var(--secondary-color);
  width: 100%;
  max-width: 1200px;
  margin-bottom: 1.5rem;
}

.pg-textwrap p {
  font-size: 1.4rem;
  line-height: 1.7;
  color: var(--white);
  opacity: 0.9;
  width: 100%;
  margin-bottom: 2.2rem;
  max-width: 1200px;
  font-weight: 300;
}

.pg-bullets {
  list-style: none;
  padding: 0;
}

.pg-bullets li {
  padding: 0.5rem 0;
  position: relative;
  padding-left: 1.5rem;
}

.pg-bullets li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

/* Tab Loader */
.tab-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  min-height: 300px;
}

.tab-loader i {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.tab-loader p {
  font-size: 1.2rem;
  color: var(--shadow-color);
  opacity: 0.7;
}

/* ========================= */
/* PRODUCT FEATURES STYLES   */
/* ========================= */

.product-features-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 0;
  position: relative;
}

.product-features-container::before {
  content: "";
  position: absolute;
  top: 20%;
  left: 15%;
  width: 200px; /* Уменьшен размер */
  height: 200px; /* Уменьшен размер */
  background-color: rgba(176, 135, 11, 0.04); /* Светлый оттенок primary */
  border-radius: 50%;
  z-index: 0;
}

.product-features-container::after {
  content: "";
  position: absolute;
  bottom: 30%;
  right: 20%;
  width: 240px; /* Уменьшен размер */
  height: 240px; /* Уменьшен размер */
  background-color: rgba(226, 183, 59, 0.03); /* Светлый оттенок secondary */
  border-radius: 50%;
  z-index: 0;
}

.features-empty {
  text-align: center;
  padding: 3rem;
  color: var(--shadow-medium);
  font-size: 1.1rem;
}

.features-category {
  background: var(--glass-20);
  border-left: 4px solid var(--secondary-color);
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1;
}

.features-category:hover {
  transform: translateY(-2px);
}

.features-category-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--light-color);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.features-category-title i {
  color: var(--secondary-color);
  font-size: 1.4rem;
  flex-shrink: 0;
}

.features-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.feature-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--glass-white-30);
}

.feature-label {
  font-size: 0.9rem;
  color: var(--light-gray);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.feature-value {
  font-size: 1.1rem;
  color: var(--light-color);
  font-weight: 600;
}

.features-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.feature-checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  background: var(--shadow-color);
  transition: all 0.3s ease;
  font-size: 1rem;
  color: var(--light-color);
  border: 1px solid transparent;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.feature-checkbox-item:hover {
  background: var(--light-gray);
  transform: translateX(5px);
  border-color: var(--primary-light);
  color: var(--shadow-color);
}

.feature-checkbox-item i {
  color: var(--primary-color);
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* Responsive for features */
@media (max-width: 768px) {
  .product-features-container {
    gap: 1.5rem;
  }

  .features-category {
    padding: 1.5rem 1rem;
  }

  .features-category-title {
    font-size: 1.3rem;
  }

  .features-list {
    grid-template-columns: 1fr;
  }

  .features-checkboxes {
    grid-template-columns: 1fr;
  }

  .feature-checkbox-item {
    padding: 0.7rem 0.8rem;
  }
}

@media (max-width: 480px) {
  .features-category-title {
    font-size: 1.2rem;
  }

  .feature-item {
    padding: 0.6rem 0;
  }

  .feature-label {
    font-size: 0.85rem;
  }

  .feature-value {
    font-size: 1rem;
  }
}

/* Layouts */
.pg-layouts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.pg-layout {
  background: var(--light-color);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.pg-layout:hover {
  transform: translateY(-5px);
}

.pg-layout img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.pg-layout__info {
  padding: 1.5rem;
  text-align: center;
}

.pg-layout__info h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--shadow-color);
  margin-bottom: 0.5rem;
}

.pg-layout__info p {
  font-size: 1.1rem;
  color: var(--primary-color);
  font-weight: 500;
}

/* Location Section */
.pg-location {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100vh;
  gap: 0;
  position: relative;
}

.pg-location::before {
  content: "";
  position: absolute;
  top: 30%;
  left: 20%;
  width: 260px; /* Уменьшен размер */
  height: 260px; /* Уменьшен размер */
  background-color: var(--glass-15); /* Тёмный с вариацией */
  border-radius: 50%;
  z-index: 0;
}

.pg-location::after {
  content: "";
  position: absolute;
  top: 55%;
  right: 25%;
  width: 320px; /* Уменьшен размер */
  height: 320px; /* Уменьшен размер */
  background-color: rgba(32, 34, 39, 0.12); /* Вариация тёмного */
  border-radius: 50%;
  z-index: 0;
}

.pg-location__col {
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.pg-location__map iframe {
  width: 100%;
  height: 100%;
  border: none;
  aspect-ratio: 16 / 9;
}

.pg-location__area {
  background: var(--shadow-color);
  color: var(--white);
  padding: clamp(2rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pg-mini-slider {
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.pg-mini-slider__track {
  display: flex;
  transition: transform 0.5s ease;
}

.pg-mini-slide {
  flex: 0 0 100%;
}

.pg-mini-slide img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.pg-mini-slider__dots {
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.pg-mini-slider__dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.3s ease;
}

.pg-mini-slider__dots button.active {
  background: var(--primary-color);
}

.pg-nearby {
  list-style: none;
  padding: 0;
}

.pg-nearby li {
  padding: 0.5rem 0;
  position: relative;
  padding-left: 1.5rem;
}

.pg-nearby li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

/* Breadcrumb Section */
.breadcrumb-section {
  height: 50px;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  padding: 0 clamp(1rem, 5vw, 2.5rem);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--light-color);
}

.breadcrumb a {
  color: var(--light-color);
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: 500;
}

.breadcrumb a:hover {
  color: var(--primary-color);
}

.breadcrumb-separator {
  color: var(--shadow-color);
  opacity: 0.6;
}

.breadcrumb-current {
  color: var(--shadow-color);
  font-weight: 600;
}

/* Responsive */
@media (max-width: 1199px) {
  .pg-hero,
  .pg-location {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .pg-title {
    font-size: 4.5rem;
  }

  .pg-region-box {
    padding: 0.7rem 1.3rem;
  }

  .pg-region-box i {
    font-size: 1.2rem;
  }

  .pg-region {
    font-size: 1.2rem;
  }

  .pg-price {
    font-size: 1.8rem;
  }

  .pg-desc {
    font-size: 1.2rem;
  }

  .pg-hero__gallery {
    order: 1;
    height: 50vh;
  }

  .pg-hero__details {
    order: 2;
  }

  .pg-location__map {
    order: 1;
    height: 50vh;
  }

  .pg-location__area {
    order: 2;
  }

  .pg-tabs {
    padding-top: 0;
    overflow: visible;
  }

  .pg-tabs__nav {
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.5rem 1rem;
    top: 80px;
  }

  .pg-layouts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .pg-title {
    font-size: 3rem;
  }

  .pg-region-box {
    padding: 0.6rem 1.2rem;
  }

  .pg-region-box i {
    font-size: 1.1rem;
  }

  .pg-region {
    font-size: 1.1rem;
  }

  .pg-price {
    font-size: 1.5rem;
  }

  .pg-desc {
    font-size: 1.1rem;
  }

  .pg-cta .btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
  }

  .pg-hero__gallery {
    order: 1;
    height: 50vh;
  }

  .pg-hero__details {
    order: 2;
  }

  .pg-location__map {
    order: 1;
    height: 50vh;
  }

  .pg-location__area {
    order: 2;
  }

  .pg-textwrap {
    padding: 0 1rem;
  }

  .pg-tabs {
    padding-top: 0;
  }

  .pg-tabs__nav {
    position: relative; /* Remove sticky on mobile for normal flow */
    top: auto;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
  }

  .pg-tabs__nav.sticky {
    position: relative !important; /* Disable sticky on mobile */
    top: auto !important;
  }

  .pg-layouts {
    grid-template-columns: 1fr;
  }

  /* Hide breadcrumb on mobile */
  .breadcrumb-section {
    display: none;
  }

  /* Restore hero height on mobile since breadcrumb is hidden */
  .pg-hero {
    height: 100vh;
  }
}

@media (max-width: 480px) {
  .expand-gallery-close {
    width: 45px;
    height: 45px;
    top: 12px;
    right: 12px;
    z-index: 2004; /* Higher than everything */
  }

  .close-x {
    width: 20px;
    height: 20px;
  }

  .close-x::before,
  .close-x::after {
    height: 2px;
  }

  /* Full screen image - no padding */
  .expand-gallery-main {
    padding: 0;
    width: 100vw;
    height: 100vh;
  }

  .expand-gallery-main::before,
  .expand-gallery-main::after {
    display: none; /* Hide decorative elements on mobile */
  }

  .expand-gallery-main img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0;
    border: none;
  }

  /* Hide navigation sidebar completely on mobile */
  .expand-gallery-nav {
    display: none;
  }

  /* Counter - smaller and repositioned */
  .expand-gallery-counter {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 20px;
    font-size: 14px;
    z-index: 2003;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .expand-gallery-close {
    width: 40px;
    height: 40px;
    top: 10px;
    right: 10px;
  }

  .close-x {
    width: 18px;
    height: 18px;
  }

  /* Full screen in landscape too */
  .expand-gallery-main {
    padding: 0;
    width: 100vw;
    height: 100vh;
  }

  .expand-gallery-main::before,
  .expand-gallery-main::after {
    display: none;
  }

  .expand-gallery-main img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0;
    border: none;
  }

  /* Hide navigation in landscape mobile too */
  .expand-gallery-nav {
    display: none;
  }

  .expand-gallery-counter {
    bottom: 15px;
    padding: 6px 16px;
    font-size: 13px;
  }
}

/* Modal Styles */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(42, 71, 89, 0.85);
  backdrop-filter: blur(10px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: var(--white);
  width: 90%;
  max-width: 550px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.4s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-content::before {
  content: "";
  position: absolute;
  top: 12%;
  left: 15%;
  width: 160px; /* Уменьшен размер */
  height: 160px; /* Уменьшен размер */
  background-color: rgba(176, 135, 11, 0.04); /* Светлый оттенок primary */
  border-radius: 50%;
  z-index: 0;
}

.modal-content::after {
  content: "";
  position: absolute;
  bottom: 18%;
  right: 18%;
  width: 200px; /* Уменьшен размер */
  height: 200px; /* Уменьшен размер */
  background-color: rgba(226, 183, 59, 0.03); /* Светлый оттенок secondary */
  border-radius: 50%;
  z-index: 0;
}

.modal-header {
  background: var(--shadow-color);
  padding: 30px;
  text-align: center;
  position: relative;
}

.modal-title {
  color: var(--light-color);
  font-size: 28px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 25px;
  background: none;
  border: none;
  color: var(--light-color);
  font-size: 32px;
  cursor: pointer;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.modal-close:hover {
  color: var(--primary-color);
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.2);
}

.modal-body {
  padding: 40px 35px;
  position: relative;
  z-index: 1;
}

.form-group {
  margin-bottom: 30px;
}

.form-label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--shadow-color);
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-label.required::after {
  content: " *";
  color: #e74c3c;
}

.form-input,
.form-textarea {
  width: calc(100% - 40px); /* 18px + 18px + border (2px * 2) */
  padding: 18px 20px;
  border: 2px solid var(--light-gray);
  background: var(--white);
  font-size: 16px;
  font-family: "Gilroy", sans-serif;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(208, 195, 42, 0.15);
  transform: translateY(-2px);
}

.form-input.error,
.form-textarea.error {
  border-color: #e74c3c;
  box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.15);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  font-family: "Gilroy", sans-serif;
}

.form-row {
  display: flex;
  gap: 20px;
}

.form-row .form-group {
  flex: 1;
}

.contact-options {
  display: flex;
  gap: 20px;
}

.contact-options .form-group {
  flex: 1;
}

.form-note {
  font-size: 14px;
  color: var(--shadow-color);
  opacity: 0.7;
  margin-top: 12px;
  font-style: italic;
}

.form-submit {
  background: linear-gradient(
    45deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: var(--shadow-color);
  border: none;
  padding: 20px 45px;
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.4s ease;
  width: 100%; /* Кнопка остаётся 100% - у неё нет внутреннего padding влияющего на ширину контента */
  font-family: "Gilroy", sans-serif;
  box-shadow: 0 4px 12px rgba(208, 195, 42, 0.2);
}

.form-submit:hover {
  transform: translateY(-3px) scale(1.02);
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.error-message {
  color: #e74c3c;
  font-size: 14px;
  margin-top: 8px;
  display: none;
  font-weight: 500;
}

.success-message {
  background: var(--light-color);
  color: var(--success-color);
  padding: 18px 20px;
  margin-bottom: 25px;
  text-align: center;
  font-weight: 600;
  display: none;
  border-left: 5px solid var(--success-color);
}

.features-cards-section {
  position: relative;
}

.cards-grid {
  width: 100vw;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  justify-items: center;
}

.feature-card {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
  cursor: pointer;
}

.feature-card:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 10px;
  background: var(--primary-light);
  z-index: 4;
  transition: all 0.4s ease;
}

.feature-card:hover::after {
  width: 100%;
  transition: all 0.4s ease;
}

.feature-card:hover .feature-title {
  color: var(--primary-light);
}

.card-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  filter: brightness(0.7) contrast(1.1);
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(42, 71, 89, 0.6),
    rgba(208, 195, 42, 0.4)
  );
  z-index: 2;
}

.card-content {
  position: relative;
  z-index: 3;
  padding: 2rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--white);
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.feature-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1.2;
}

.feature-text {
  font-size: 1rem;
  line-height: 1.6;
  opacity: 0.9;
  margin: 0;
}

/* ========================= */
/* EXPAND GALLERY           */
/* ========================= */

.expand-gallery-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(20, 20, 30, 0.98) 100%
  );
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.4s ease;
  backdrop-filter: blur(10px);
}

.expand-gallery-overlay.active {
  display: block;
  opacity: 1;
  animation: expandFadeIn 0.4s ease;
}

@keyframes expandFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.expand-gallery-container {
  width: 100%;
  height: 100%;
  display: flex;
  position: relative;
  overflow: hidden;
}

/* Close Button - Fixed and Professional */
.expand-gallery-close {
  position: fixed;
  top: 25px;
  left: 25px;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2003;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  background: transparent;
}

.expand-gallery-close:hover {
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 6px 30px rgba(176, 135, 11, 0.6);
}

.expand-gallery-close:active {
  transform: rotate(90deg) scale(0.95);
}

.close-x {
  position: relative;
  width: 28px;
  height: 28px;
}

.close-x::before,
.close-x::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 3px;
  background: var(--light-color);
  border-radius: 2px;
}

.close-x::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.close-x::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* Main Image Display */
.expand-gallery-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 240px 80px 40px;
  overflow: hidden;
  position: relative;
}

.expand-gallery-main::before {
  content: "";
  position: absolute;
  top: 15%;
  left: 10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(176, 135, 11, 0.15) 0%,
    transparent 70%
  );
  border-radius: 50%;
  z-index: 0;
  animation: pulseGlow 4s ease-in-out infinite;
}

.expand-gallery-main::after {
  content: "";
  position: absolute;
  bottom: 15%;
  right: 30%;
  width: 350px;
  height: 350px;
  background: radial-gradient(
    circle,
    rgba(226, 183, 59, 0.12) 0%,
    transparent 70%
  );
  border-radius: 50%;
  z-index: 0;
  animation: pulseGlow 4s ease-in-out infinite 2s;
}

@keyframes pulseGlow {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

.expand-gallery-main img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(176, 135, 11, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  z-index: 1;
  border: 3px solid rgba(176, 135, 11, 0.3);
}

.expand-gallery-main img:hover {
  transform: scale(1.02);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8), 0 0 50px rgba(176, 135, 11, 0.5);
}

/* Navigation Sidebar */
.expand-gallery-nav {
  position: fixed;
  right: 0;
  top: 0;
  width: 220px;
  height: 100vh;
  background: linear-gradient(
    180deg,
    rgba(32, 34, 39, 0.95) 0%,
    rgba(20, 20, 25, 0.98) 100%
  );
  border-left: 3px solid var(--primary-color);
  display: flex;
  flex-direction: column;
  z-index: 2001;
  box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
}

.expand-nav-btn {
  width: 100%;
  height: 60px;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(32, 34, 39, 0.9) 100%
  );
  border: none;
  border-bottom: 2px solid rgba(176, 135, 11, 0.4);
  color: var(--primary-color);
  font-size: 22px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.expand-nav-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(176, 135, 11, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.expand-nav-btn:hover::before {
  left: 100%;
}

.expand-nav-btn:hover {
  background: linear-gradient(
    90deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  color: var(--shadow-color);
  border-bottom-color: var(--primary-light);
  box-shadow: inset 0 0 20px rgba(176, 135, 11, 0.3);
}

.expand-nav-btn:active {
  transform: scale(0.98);
}

.expand-nav-btn i {
  transition: transform 0.3s ease;
}

.expand-nav-prev:hover i {
  transform: translateY(-3px);
}

.expand-nav-next:hover i {
  transform: translateY(3px);
}

/* Thumbnails Container */
.expand-thumbnails {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  background: linear-gradient(
    180deg,
    rgba(20, 20, 25, 0.5) 0%,
    rgba(32, 34, 39, 0.3) 100%
  );
}

/* Custom scrollbar for thumbnails */
.expand-thumbnails::-webkit-scrollbar {
  width: 8px;
}

.expand-thumbnails::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}

.expand-thumbnails::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 4px;
  border: 2px solid rgba(0, 0, 0, 0.3);
}

.expand-thumbnails::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    var(--primary-light),
    var(--secondary-light)
  );
}

/* Thumbnail Items */
.expand-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  cursor: pointer;
  border: 3px solid rgba(176, 135, 11, 0.2);
  border-radius: 6px;
  transition: all 0.3s ease;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.expand-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(176, 135, 11, 0.1) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
  pointer-events: none;
}

.expand-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  filter: brightness(0.8) contrast(1.1);
}

.expand-thumb:hover {
  border-color: var(--primary-light);
  box-shadow: 0 6px 25px rgba(176, 135, 11, 0.4);
  transform: translateX(-5px);
}

.expand-thumb:hover::before {
  opacity: 1;
}

.expand-thumb:hover img {
  transform: scale(1.12);
  filter: brightness(1) contrast(1.2);
}

.expand-thumb.active {
  border-color: var(--primary-color);
  border-width: 4px;
  box-shadow: 0 0 25px rgba(176, 135, 11, 0.8),
    inset 0 0 20px rgba(176, 135, 11, 0.2);
  transform: translateX(-8px);
}

.expand-thumb.active::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(176, 135, 11, 0.3) 0%,
    rgba(226, 183, 59, 0.2) 100%
  );
  pointer-events: none;
  z-index: 2;
  border-radius: 3px;
}

.expand-thumb.active img {
  filter: brightness(1.1) contrast(1.2);
}

/* Image Counter */
.expand-gallery-counter {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.9),
    rgba(32, 34, 39, 0.95)
  );
  color: var(--white);
  padding: 18px 40px;
  font-size: 22px;
  font-weight: 700;
  border: 3px solid var(--primary-color);
  border-radius: 50px;
  z-index: 2002;
  letter-spacing: 0.15em;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 30px rgba(176, 135, 11, 0.4);
  backdrop-filter: blur(10px);
}

.expand-gallery-counter span {
  color: var(--primary-color);
  font-weight: 800;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .expand-gallery-close {
    width: 50px;
    height: 50px;
    top: 20px;
    right: 20px;
  }

  .close-x {
    width: 24px;
    height: 24px;
  }

  .expand-gallery-main {
    padding: 60px 180px 60px 30px;
  }

  .expand-gallery-nav {
    width: 160px;
  }

  .expand-nav-btn {
    height: 50px;
    font-size: 20px;
  }

  .expand-thumbnails {
    padding: 15px 10px;
    gap: 12px;
  }

  .expand-gallery-counter {
    bottom: 30px;
    padding: 15px 35px;
    font-size: 20px;
  }
}

@media (max-width: 768px) {
  .expand-gallery-close {
    width: 48px;
    height: 48px;
    top: 15px;
    right: 15px;
  }

  .close-x {
    width: 22px;
    height: 22px;
  }

  .close-x::before,
  .close-x::after {
    height: 2.5px;
  }

  .expand-gallery-main {
    padding: 50px 130px 50px 20px;
  }

  .expand-gallery-nav {
    width: 120px;
  }

  .expand-nav-btn {
    height: 45px;
    font-size: 18px;
  }

  .expand-thumbnails {
    padding: 12px 8px;
    gap: 10px;
  }

  .expand-thumb {
    border-width: 2px;
  }

  .expand-thumb.active {
    border-width: 3px;
  }

  .expand-gallery-counter {
    bottom: 25px;
    padding: 12px 28px;
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .expand-gallery-close {
    width: 45px;
    height: 45px;
    top: 12px;
    right: 12px;
    z-index: 2004; /* Higher than everything */
  }

  .close-x {
    width: 20px;
    height: 20px;
  }

  .close-x::before,
  .close-x::after {
    height: 2px;
  }

  /* Full screen image - no padding */
  .expand-gallery-main {
    padding: 0;
    width: 100vw;
    height: 100vh;
  }

  .expand-gallery-main::before,
  .expand-gallery-main::after {
    display: none; /* Hide decorative elements on mobile */
  }

  .expand-gallery-main img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0;
    border: none;
  }

  /* Hide navigation sidebar completely on mobile */
  .expand-gallery-nav {
    display: none;
  }

  /* Counter - smaller and repositioned */
  .expand-gallery-counter {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 20px;
    font-size: 14px;
    z-index: 2003;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .expand-gallery-close {
    width: 40px;
    height: 40px;
    top: 10px;
    right: 10px;
  }

  .close-x {
    width: 18px;
    height: 18px;
  }

  /* Full screen in landscape too */
  .expand-gallery-main {
    padding: 0;
    width: 100vw;
    height: 100vh;
  }

  .expand-gallery-main::before,
  .expand-gallery-main::after {
    display: none;
  }

  .expand-gallery-main img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0;
    border: none;
  }

  /* Hide navigation in landscape mobile too */
  .expand-gallery-nav {
    display: none;
  }

  .expand-gallery-counter {
    bottom: 15px;
    padding: 6px 16px;
    font-size: 13px;
  }
}
