/* Footer BEM Styles - Pure BEM Implementation */
/* ========================================== */

/* Footer main block */
.footer {
  font-family: 'Futura New Book', sans-serif;
  font-size: 14px;
  line-height: 120%;
  font-style: normal;
  font-weight: normal;
  letter-spacing: 0.04em;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px 50px;
  padding-top: 0;
  box-sizing: content-box;
}

.footer__container {
  width: 100%;
  align-items: normal;
  display: flex;
  justify-content: flex-start;
  flex-direction: column;
  margin: 0;
}

/* Remove borders from form elements within footer */
.footer pre,
.footer fieldset,
.footer input,
.footer textarea,
.footer table,
.footer table * {
  border: none !important;
}

/* Social and Mailing Section */
.footer__social-mailing {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #E8EBED;
}

.footer__social-mailing-row {
  display: flex;
  align-items: center;
  min-height: 136px;
}

.footer__social {
  width: 50%;
  display: flex;
  align-items: center;
}

.footer__social-content {
  display: flex;
  align-items: center;
  gap: 30px;
}

.footer__social-title {
  margin: 0;
  margin-top: 0;
  font-size: 24px;
  line-height: 110%;
  font-weight: 400;
}

.footer__social-list {
  display: flex;
  gap: 20px;
  align-items: center;
}

.footer__social-item {
  display: block;
  transition: opacity 0.3s ease;
}

.footer__social-item:hover {
  opacity: 0.7;
}

.footer__social-icon svg > path {
  stroke: #BA0C2F;
}

/* Mailing Section */
.footer__mailing {
  width: 50%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.footer__mailing-content {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer__mailing-title {
  margin: 0;
  margin-top: 0;
  font-size: 24px;
  line-height: 110%;
  font-weight: 400;
  flex-basis: 240px;
  white-space: nowrap;
}

.footer__mailing-form {
  flex-basis: 220px;
}

.footer__mailing-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  background: transparent;
  border: 1px solid #BA0C2F;
  border-radius: 32px;
  color: #BA0C2F;
  text-decoration: none;
  font-family: 'Futura New Book', sans-serif;
  font-size: 16px;
  transition: all 0.3s ease;
}

.footer__mailing-button:hover,
.footer__mailing-button:focus {
  background: #BA0C2F;
  color: white;
  text-decoration: none;
}

/* Main Widgets Section */
.footer__widgets {
  display: flex;
  justify-content: space-between;
  margin: 80px auto 60px;
  width: 100%;
  max-width: 120rem;
  overflow: hidden;
}

.footer__widget {
  padding: 0;
  padding-bottom: 5px;
  width: 138px;
  box-sizing: border-box;
}

.footer__widget-title {
  display: inline-block;
  color: #2c2c2c;
  font-weight: 700;
  text-transform: uppercase;
  padding-bottom: 25px;
  text-decoration: none;
}

.footer__widget-content {
  /* Content wrapper for widgets */
}

.footer__widget-link {
  display: inline-block;
  color: #2c2c2c;
  padding-bottom: 10px;
  text-decoration: none;
}

.footer__widget-link:hover {
  opacity: 0.7;
}

/* Logo and Contacts Section */
.footer__logo-contacts {
  padding: 10px 0 40px;
  border-bottom: 1px solid #E8EBED;
  color: #A5ACB3;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  width: 100%;
  max-width: 120rem;
  overflow: hidden;
}

.footer__logo {
  flex-shrink: 0;
}

.footer__logo-link {
  display: block;
}

.footer__logo-image {
  width: 60px;
  height: 56px;
  max-width: 100%;
  height: auto;
}

.footer__contacts {
  display: flex;
  gap: 20px;
}

.footer__contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer__contact-link {
  display: flex;
  align-items: center;
  gap: 12px;    
  color: #A5ACB3;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.footer__contact-link:hover {
  opacity: 0.7;
}

.footer__contact-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.footer__contact-icon-hover {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.footer__contact-text {
  font-size: 14px;
  line-height: 1.4;
}

/* Copyright Section */
.footer__copyright {
  padding: 15px 0 5px;
  width: 100%;
  max-width: 120rem;
  margin: 10px auto;
  overflow: hidden;
  box-sizing: border-box;
  font-weight: 700;
  font-size: 14px;
  line-height: 18px;
  letter-spacing: 0.08em;
}

.footer__copyright-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer__copyright-left {
  display: flex;
  align-items: center;
  gap: 60px;
}

.footer__copyright-text {    
  color: #A5ACB3;
  margin: 0;
  white-space: nowrap;
}

.footer__copyright-nav {
  /* Navigation wrapper */
}

.footer__copyright-menu {
  display: flex;
  gap: 60px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer__copyright-menu li {
  list-style: none;
  white-space: nowrap;
}

.footer__copyright-link {
  color: #A5ACB3;
  text-transform: none;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.footer__copyright-link:hover {
  opacity: 0.7;
}

/* Search Form */
.footer__search {
  width: 100%;
  max-width: 308px;
  height: 52px;
  position: relative;
  margin-left: auto;
}

.footer__search-input {
  width: 100%;
  height: 52px;
  padding: 15px 60px 15px 24px;
  font-family: 'Futura New', sans-serif;
  font-size: 16px;
  color: #A5ACB3;
  letter-spacing: 0.04em;
  background-color: #F2F4F5;
  border: none;
  border-radius: 32px;
  outline: none;
  box-sizing: border-box;
}

.footer__search-input::placeholder {
  color: #A5ACB3;
}

.footer__search-button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: url('../images/icon-search.png') no-repeat center;
  background-size: 20px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background-color: transparent;
}

/* Mobile Logo variants */
.footer__logo-link--mobile {
  display: none;
}

.footer__logo-link--desktop {
  display: block;
}

/* Responsive Design */
@media screen and (max-width: 1199.99px) {
  .footer__social,
  .footer__mailing {
    width: 100%;
  }

  .footer__social-mailing-row {
    flex-direction: column;
    gap: 0;
    padding: 40px 0;
  }

  .footer__social-content,
  .footer__mailing-content {
    justify-content: center;
  }

}

@media screen and (max-width: 1200px) {
  .footer {
    padding: 0 16px 50px;
  }

  .footer__social-mailing-row {
    padding-top: 0;
  }

  .footer__social-content {
    flex-wrap: wrap;
    justify-content: center;
    min-height: unset;
    padding: 40px 0;
    border-bottom: 1px solid #E8EBED;
    margin: 0;
    gap: 24px;
    width: 100%;
  }

  .footer__mailing-content {
    flex-wrap: wrap;
    justify-content: center;
    min-height: unset;
    padding: 40px 0;
    border-bottom: 1px solid #E8EBED;
    margin: 0;
  }

  .footer__mailing-button {
    width: -webkit-fill-available;
  }

  .footer__social-title,
  .footer__mailing-title {
    width: 100%;
    text-align: center;
    margin: 0 !important;
  }

  .footer__social-list {
    gap: 24px;
  }

  .footer__social-mailing {
    border: none;
  }

  .footer__contacts {
    flex-direction: column;
    text-align: left;
  }

  .footer__copyright-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-direction: column;
  }

  /* Widgets on mobile become accordion */
  .footer__widgets {
    flex-direction: column;
    margin: 0 0 56px;
  }

  .footer__widget {
    width: 100%;
    border-bottom: 1px solid #E8EBED;
    padding: 20px 0;
  }

  .footer__widget:last-child {
    border-bottom: none;
  }

  /* Accordion functionality */
  .footer__widget-title {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0 8px 19px 0;
    box-sizing: border-box;
  }

  .footer__widget-title:after {
    content: '';
    width: 12px;
    height: 12px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/></svg>') no-repeat center;
    background-size: contain;
    transition: transform 0.3s ease-out;
  }

  .footer__widget-title.active:after {
    transform: rotate(180deg);
  }

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

  .footer__widget-content.active {
    max-height: 1000px;
  }

  /* Hide text widgets on mobile */
  .footer__widget--text {
    display: none;
  }

  /* Logo and contacts mobile layout */
  .footer__logo-contacts {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
    gap: 24px;
  }

  /* Copyright mobile layout */
  .footer__copyright-content {
    flex-direction: column-reverse;
    gap: 24px;
  }

  .footer__copyright-menu {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .footer__copyright-link {
    font-size: 16px;
    padding-bottom: 16px;
  }

  /* Mobile logo display */
  .footer__logo-link--mobile {
    display: block;
    padding: 24px 0;
  }

  .footer__logo-link--desktop {
    display: none;
  }

  /* Search form mobile */
  .footer__search {
    margin: 0 auto 20px;
  }

  .footer__copyright-text {
    text-align: center;
    font-size: 12px;
  }
}

@media screen and (max-width: 767px) {
  .footer__logo-contacts {
    padding: 0;  
  }
  .footer__widgets {
    margin: 0 0 20px;
  }
}

@media screen and (min-width: 768px) {

  .footer__widget-content {
    max-height: none;
  }

  .footer__widget-title:after {
    display: none;
  }

  .footer__logo-link--mobile {
    display: none;
  }

  .footer__logo-link--desktop {
    display: block;
  }

  .footer__copyright-content {
    position: relative;
  }
}

/* Footer Menu Widget with Accordion */
.wsfooterwdget {
  width: 100%;
}

.wsfooterwdget .menu {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}

.wsfooterwdget .menu-item {
  margin: 0;
  padding: 0;
}

.wsfooterwdget .menu-item a {
  color: #2c2c2c;
  text-decoration: none;
  transition: color 0.3s ease;
  display: block;
  padding: 5px 0;
}

.wsfooterwdget .menu-item a:hover {
  color: #BA0C2F;
}

.wsfooterwdget .menu-item:first-child a {
  font-family: 'Futura New Demi', sans-serif;
  font-weight: 500;
  color: #2C2C2C;
  font-size: 16px;
  padding-bottom: 12px;
  text-transform: uppercase;
}
