@import './reset.css';

:root {
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  --primary-color: #fff100;
  --primary-color-2: #221f20;
  --primary-color-3: #d1ab66;
  --white: #fff;
  --color-1: #d9d9d9;
  --color-2: #6f6f6f;
  --ccolor-5: #f8e7ca;

  font-family: 'Rubik', Arial, sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

.header_outer {
  box-shadow: 0 4px 10px 1px rgba(0, 0, 0, 0.25);
  background: linear-gradient(
    180deg,
    #e1e1e1 0%,
    rgba(255, 255, 255, 0) 47%,
    #e1e1e1 100%
  );
}

.header_inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  min-height: 84px;
}

.logo {
  background-color: var(--white);
  padding: 16px 26px;
  flex-shrink: 1;
}

.header_nav_outer {
  flex-grow: 1;
  border-left: 1px solid var(--color-1);
  padding: 0 15px;
  display: flex;
}
.header_nav_inner {
  display: flex;
  font-weight: 500;
  font-size: 16px;
  color: var(--primary-color-2);
  border: 1px solid transparent;

  li {
    cursor: pointer;
    padding: 14px;
    display: grid;
    place-content: center;
    border: 1px solid transparent;

    &:hover {
      border: 1px solid var(--color-1);
      background: linear-gradient(180deg, #d7d7d7 0%, #fff 47%, #d7d7d7 98.5%);
    }
  }
}

.header_details {
  display: flex;
  gap: 52px;
  align-items: center;
  margin-right: 32px;
}

.header_phone,
.footer_phone {
  font-weight: 500;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 2px;

  &::before {
    display: block;
    content: '';
    width: 24px;
    height: 24px;
    background: url('/public/phone.svg');
  }
}

.header_lang {
  cursor: pointer;
  & span {
    font-weight: 500;
    font-size: 16px;
  }
}

.lang-btn {
  margin: 0;
  padding: 0;
  font-weight: normal;
  background: none;
  border: none;
  cursor: pointer;
}

.lang-btn.active {
  font-weight: bold;
}

.mobile-menu {
  display: contents;
}

.burger-menu,
.close-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 52px 32px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.gold-rates {
  background: var(--white);
}

.calculator {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #e1e1e1 98.5%),
    url('/public/bg-1.png');
  background-position: right;
  background-repeat: no-repeat;
}
.gold-rates,
.calculator {
  border-radius: 25px;
  box-shadow: 0 4px 10px 1px rgba(0, 0, 0, 0.25);
  padding: 65px 68px;

  & h2 {
    font-weight: 500;
    font-size: 40px;
    color: var(--primary-color-2);
    margin-bottom: 50px;
  }
}

.gold-rates_list {
  display: flex;
  flex-direction: column;
  gap: 35px;
  margin-bottom: 31px;
}

.gold-rates_list-item {
  border: 1px solid var(--color-1);
  background: linear-gradient(180deg, #e1e1e1 0%, #fff 47%, #e1e1e1 98.5%);
  padding: 23px 40px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  & .gold-rates_list-item-price {
    font-weight: 500;
  }
}

.gold-rates_date {
  font-weight: 400;
  font-size: 20px;
  color: var(--color-2);
}

.calculator-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 33px;
}

.input-group {
  border-radius: 25px;
  background-color: #fff;
  border: 1px solid #e0e0e0;
  padding: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;

  & select,
  & input {
    width: 80px;
    padding: 8px;
    border: none;
    background-color: transparent;
    font-size: 16px;
    color: #333;
    text-align: center;
    text-align-last: center;
    -moz-text-align-last: center;
  }
  & select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
  }
}

.input-group label {
  font-weight: 400;
  font-size: 20px;
  text-align: center;
}

.calculator-results {
  display: flex;
  justify-content: space-between;
  margin-bottom: 40px;
}

.calculator-result {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calculator-result_desc {
  font-weight: 400;
  font-size: 24px;
  text-align: center;
  color: var(--primary-color-2);
}

.calculator-result_num {
  font-weight: 400;
  font-size: 36px;
  text-align: center;
  color: var(--primary-color-2);
}

.calculator_desc {
  font-weight: 400;
  font-size: 20px;
  color: var(--color-2);
}

.about-us {
  max-width: 1440px;
  width: 100%;
  padding: 0 100px;
  padding-bottom: 85px;
  margin: 0 auto;
}
.about-us_header {
  font-weight: 500;
  font-size: 40px;
  color: var(--primary-color-2);
  margin-bottom: 26px;
}
.about-us_desc {
  font-weight: 400;
  font-size: 24px;
  color: var(--primary-color-2);
  margin-bottom: 26px;
  white-space: pre-line;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 34px;
}
.stat-item {
  box-shadow: 0 4px 10px 1px rgba(0, 0, 0, 0.25);
  background: linear-gradient(
    180deg,
    rgba(255, 241, 0, 50%) 0%,
    #fff100 41.85%,
    rgb(255, 241, 0) 50%,
    rgba(255, 241, 0, 50%) 100%
  );
  border-radius: 25px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 14px;
  padding: 20px;
}

.stat-number {
  font-weight: 500;
  font-size: 32px;
  text-align: center;
  color: var(--color-2);
}
.stat-description {
  font-weight: 400;
  font-size: 32px;
  text-align: center;
  color: var(--color-2);
}
.license-link {
  font-weight: 400;
  font-size: 20px;
  color: var(--color-2);
}

.footer_outer {
  background: linear-gradient(180deg, #e1e1e1 0%, #fff 47%, #e1e1e1 98.5%);
  background: linear-gradient(
    180deg,
    #e1e1e1 0%,
    rgba(255, 255, 255, 0) 47%,
    #e1e1e1 100%
  );
}

.footer_inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  min-height: 129px;
}

.footer_nav_outer {
  flex-grow: 1;
  padding: 0 15px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* lemon_it */
.footer_nav_outer {
  max-width: 60%; /* Устанавливаем максимальную ширину для меню */
}

.footer_nav_inner {
  display: flex;
  font-weight: 500;
  font-size: 16px;
  color: var(--primary-color-2);
  border: 1px solid transparent;
  height: 84px;

  li {
    cursor: pointer;
    padding: 14px;
    display: grid;
    place-content: center;
    border: 1px solid transparent;

    &:hover {
      border: 1px solid var(--color-1);
      background: linear-gradient(180deg, #e1e1e1 0%, #fff 47%, #e1e1e1 98.5%);
    }
  }
}

.footer_phone {
  max-height: 84px;
}

.footer_logo {
  padding-top: 16px;
  padding-left: 33px;
  padding-right: 40px;
}

.footer_license {
  font-weight: 500;
  font-size: 16px;
  color: var(--color-2);
  padding-left: 14px;
  padding-bottom: 12px;

  /* lemon_it */
  white-space: normal; /* Разрешаем перенос текста */
  max-width: 100%; /* Максимальная ширина — 100% родительского контейнера */
  margin-bottom: 10px; /* Добавляем отступ снизу, чтобы создать пространство перед телефоном */
}

@media (max-width: 1200px) {
  .content {
    grid-template-columns: 1fr;
    padding: 32px 16px;
  }

  .gold-rates,
  .calculator {
    padding: 40px 32px;
  }

  .about-us {
    padding: 0 32px 60px;
  }

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

  .footer_logo {
    padding: 20px;
    padding-bottom: 0;
  }

  .footer_inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .footer_nav_inner {
    display: none;
  }

  .footer_license {
    padding: 10px;
  }

  .footer_phone {
    margin-bottom: 30px;
    /* lemon_it */
    white-space: nowrap; /* Запрещаем перенос текста для номера телефона */
  }
}

@media (max-width: 1124px) {
  .burger-menu {
    display: block;
  }

  .mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--white);
    z-index: 1000;
    padding: 60px 20px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .mobile-menu.active {
    display: flex;
  }

  .close-menu {
    display: block;
  }

  .burger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color-2);
    margin: 5px 0;
  }

  .close-menu {
    font-size: 24px;
    position: absolute;
    top: 20px;
    right: 20px;
  }

  .header_nav_outer {
    flex-grow: 0;
    border-left: none;
    padding: 0;
  }

  .header_nav_inner {
    flex-direction: column;
    align-items: center;

    & li:hover {
      background: inherit;
      border-color: transparent;
    }
  }

  .header_details {
    flex-direction: column;
    margin-right: 0;
    margin-top: 20px;
  }
}

@media (max-width: 768px) {
  .gold-rates,
  .calculator {
    padding: 30px 20px;
  }

  .gold-rates h2,
  .calculator h2,
  .about-us_header {
    font-size: 32px;
    margin-bottom: 30px;
  }

  .calculator-group {
    grid-template-columns: 1fr;
  }

  .input-group {
    padding: 12px;
  }

  .calculator-results {
    flex-direction: column;
    gap: 20px;
  }

  .about-us_desc {
    font-size: 20px;
  }

  .stat-number,
  .stat-description {
    font-size: 24px;
  }

  .header_nav_inner li,
  .footer_nav_inner li {
    padding: 10px;
  }

  .header_details {
    flex-direction: column;
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .gold-rates h2,
  .calculator h2,
  .about-us_header {
    font-size: 28px;
  }

  .gold-rates_list-item {
    padding: 15px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .calculator-result_desc {
    font-size: 20px;
  }

  .calculator-result_num {
    font-size: 28px;
  }

  .calculator_desc {
    font-size: 16px;
  }

  .about-us_desc {
    font-size: 18px;
  }

  .stat-number,
  .stat-description {
    font-size: 20px;
  }
}
.carousel {
  max-width: 1400px;
  margin: 0 auto;
  padding: 25px 32px 28px;
  position: relative;

  @media (max-width: 1200px) {
    padding: 32px 16px;
  }
}

.carousel-container {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  aspect-ratio: 1276 / 615;

  position: relative;
  overflow: hidden;
  border-radius: 25px;
  box-shadow: 0 4px 10px 1px rgba(0, 0, 0, 0.25);
}

.carousel-wrapper {
  display: flex;
  transition: transform 0.5s ease;
  height: 100%;
  width: 100%;
}

.carousel-item {
  flex: 0 0 100%;
  position: relative;

  & img {
    object-fit: contain;
    object-position: center;
    width: 100%;
    height: 100%;
  }
}

.carousel-item h2 {
  font-size: 36px;
  margin-bottom: 20px;
  color: #333;
}

.carousel-item p {
  font-size: 18px;
  color: #555;
}

.arrow-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.5);
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;

  @media (max-width: 768px) {
    width: 40px;
    height: 40px;

    & img {
      scale: 0.7;
    }
  }
}

.arrow-button:disabled {
  opacity: 1;
  cursor: pointer;
}

.arrow-button.prev {
  left: 10px;
  & img {
    margin-left: -6px;
  }
}

.arrow-button.next {
  right: 10px;
  & img {
    margin-right: -6px;
  }
}

.dots-container {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
}

.dot {
  width: 20px;
  height: 20px;
  background-color: #d9d9d9;
  border-radius: 50%;
  margin: 0 7px;
  cursor: pointer;

  @media (max-width: 768px) {
    width: 12px;
    height: 12px;
  }
}

.dot.active {
  background-color: #221f20;
}

/* аккордеон  */

.accordion {
  max-width: 1440px;
  min-width: 100vw;
  padding: 100px;
  padding-top: 60px;
  margin-bottom: 46px;
  box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.25);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #e1e1e1 98.5%),
    url('/public/bg-2.png');
  background-position: right;
  background-size: contain;
  background-repeat: no-repeat;

  @media (max-width: 1124px) {
    padding: 30px;
    padding-top: 60px;
  }
}

.accordion-title {
  max-width: 1240px;
  margin: 0 auto;
  font-weight: 500;
  font-size: 40px;
  margin-bottom: 29px;

  @media (max-width: 768px) {
    font-size: 32px;
  }
}
.accordion-container {
  overflow: hidden;
  max-width: 1240px;
  margin: 0 auto;
}

.accordion-header {
  background-color: transparent;
  color: #333;
  cursor: pointer;
  width: 100%;
  text-align: left;
  border: none;
  outline: none;
  transition: 0.4s;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 400;
  font-size: 32px;
  border-bottom: 2px solid #d1ab66;
  padding: 0;

  @media (max-width: 768px) {
    font-size: 20px;
  }
}

.accordion-header:after {
  content: '';
  float: right;
  margin-left: 5px;
  min-width: 27px;
  height: 16px;
  background: url('/public/arrow-accordion.svg') no-repeat center;
  transition: all 0.3s ease-in-out;
  background-size: contain;
}

@media (max-width: 768px) {
  .accordion-header:after {
    min-width: 20px;
    margin: 5px 0;
  }
}
.active:after {
  transform-origin: center;
  rotate: 180deg;
}
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease-out;
  font-weight: 400;
  font-size: 20px;
  margin-top: 15px;
  margin-bottom: 18px;

  @media (max-width: 768px) {
    font-size: 16px;
  }
}
.map-outer {
  margin: 0 auto;
  padding: 0 32px;
  max-width: 1440px;
}
.map-container {
  display: flex;
  border-radius: 25px;
  overflow: hidden;
  height: 621px;
  box-shadow: 0 4px 10px 1px rgba(0, 0, 0, 0.25);
  margin-bottom: 52px;
  display: flex;
}

.sidebar {
  padding-top: 62px;
  padding-left: 68px;
  padding-right: 29px;
  flex-basis: 35%;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  font-weight: 500;
  font-size: 40px;
  color: #000;
  margin-bottom: 22px;
}
.sidebar-select-wrapper {
  position: relative;
}
.sidebar-select-list {
  border: 1px solid #d9d9d9;
  width: 100%;
  height: 70px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);

  font-weight: 400;
  font-size: 24px;
  padding: 21px 36px;

  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.sidebar-select-list::-ms-expand {
  display: none;
}

.sidebar-select-icon {
  position: absolute;
  right: 36px;
  top: 52%;
  translate: 0 -50%;
  z-index: 10000;
  margin-left: 5px;
  min-width: 27px;
  height: 16px;
}

#map {
  flex-grow: 1;
}

#branchesList {
  margin-top: 20px;
}

.branch-item {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  height: 120px;

  img {
    height: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    object-position: center;
  }
}

.branch-item-text {
  font-weight: 400;
  font-size: 16px;
  color: #221f20;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.branches-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow-y: auto;
  height: auto;
}

.gm-style-iw-chr {
  position: absolute;
  display: flex;
  top: 0;
  right: 0;
}

.gm-style-iw.gm-style-iw-c {
  padding-top: 14px !important;
}

@media screen and (max-width: 1024px) {
  .map-outer {
    padding: 0 32px;
  }
  .map-container {
    display: flex;
    flex-direction: column;
    height: auto;
    box-shadow: unset;
    gap: 16px;
    overflow: visible;
  }

  .sidebar {
    max-height: 700px;
    padding: 20px;
    padding-bottom: 0;
    box-shadow: 0 4px 10px 1px rgba(0, 0, 0, 0.25);
    border-radius: 16px;
  }

  .sidebar-select-list {
    height: auto;
    padding: 16px;
    font-size: 16px;
  }
  .branch-item {
    height: 90px;
  }
  .branch-item-text {
    font-size: 14px;
  }

  #map {
    box-shadow: 0 4px 10px 1px rgba(0, 0, 0, 0.25);
    min-height: 400px;
    border-radius: 16px;
  }
}
