/* ========================================
   FOOTER — ФОНД «Дорога жизни»
   Figma → 1С-Битрикс

   Структура шаблона:
   /local/templates/ваш_шаблон/
   ├── header.php        ← подключить CSS здесь
   ├── footer.php        ← HTML футера
   └── css/
       └── footer.css    ← этот файл
   ======================================== */

/* --- Variables --- */
:root {
  --footer-bg: #343333;
  --footer-text: #FFFFFF;
  --footer-text-muted: rgba(255, 255, 255, 0.6);
  --footer-text-check: rgba(255, 255, 255, 0.7);
  --footer-accent-green: #3EA74F;
  --footer-accent-orange: #EE7B2D;
  --footer-input-bg: #FFFFFF;
  --footer-input-placeholder: rgba(52, 51, 51, 0.4);
  --footer-border-color: rgba(255, 255, 255, 0.7);
  --footer-down-text: #343333;
  --footer-down-text-muted: rgba(52, 51, 51, 0.8);
  --footer-font: 'Roboto', sans-serif;
  --footer-radius: 10px;
  --footer-form-radius: 8px;
  --footer-btn-radius: 100px;
  --footer-checkbox-radius: 3px;
  --footer-input-radius: 6px;
  --footer-container-width: 1400px;
}

/* --- Footer Container --- */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px 0;
  width: 100%;
  font-family: var(--footer-font);
}

/* --- Top Section (dark block) --- */
.footer__top {
  width: 100%;
  max-width: var(--footer-container-width);
  background: var(--footer-bg);
  border-radius: var(--footer-radius);
  position: relative;
  padding: 40px 40px 30px;
  box-sizing: border-box;
  min-height: 460px;
}

/* --- Inner Layout Grid --- */
.footer__grid {
  display: grid;
  grid-template-columns: 335px 1fr;
  gap: 0;
  height: 100%;
}

.footer__left {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 40px;
}

.footer__right {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-left: 40px;
}

/* --- Logo --- */
.footer__logo {
  position: absolute;
  top: 40px;
  left: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.footer__logo-icon {
  width: 45px;
  height: 45px;
  flex-shrink: 0;
}

.footer__logo-icon svg {
  width: 100%;
  height: 100%;
}

.footer__logo-text {
  font-family: var(--footer-font);
  font-style: normal;
  font-weight: 800;
  font-size: 18px;
  line-height: 22px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--footer-text);
}

/* --- Contact Block --- */
.footer__contacts {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.footer__contacts-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer__contacts-label {
  font-family: var(--footer-font);
  font-style: normal;
  font-weight: 400;
  font-size: 14px;
  line-height: 110%;
  color: var(--footer-text);
  opacity: 0.6;
}

.footer__contacts-detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer__phone,
.footer__email {
  font-family: var(--footer-font);
  font-style: normal;
  font-weight: 800;
  font-size: 22px;
  line-height: 120%;
  color: var(--footer-text);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.footer__phone:hover,
.footer__email:hover {
  opacity: 0.8;
}

/* --- Footer Columns --- */
.footer__column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer__column-title {
  font-family: var(--footer-font);
  font-style: normal;
  font-weight: 800;
  font-size: 14px;
  line-height: 16px;
  text-transform: uppercase;
  color: var(--footer-text);
}

.footer__column-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0.6;
}

.footer__column-link {
  font-family: var(--footer-font);
  font-style: normal;
  font-weight: 400;
  font-size: 14px;
  line-height: 120%;
  color: var(--footer-text);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.footer__column-link:hover {
  opacity: 0.8;
}

/* --- Newsletter Section --- */
.footer__newsletter {
  position: absolute;
  right: 40px;
  top: 40px;
  width: 532px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.footer__newsletter-form {
  display: flex;
  flex-direction: column;
  padding: 30px;
  gap: 20px;
  background: var(--footer-accent-green);
  border-radius: var(--footer-form-radius);
  box-sizing: border-box;
}

.footer__newsletter-title {
  font-family: var(--footer-font);
  font-style: normal;
  font-weight: 500;
  font-size: 22px;
  line-height: 90%;
  color: var(--footer-text);
}

.footer__newsletter-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.footer__newsletter-input {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 16px;
  gap: 10px;
  background: var(--footer-input-bg);
  border-radius: var(--footer-input-radius);
  border: none;
  outline: none;
  box-sizing: border-box;
  height: 40px;
  min-width: 0;
  font-family: var(--footer-font);
  font-size: 14px;
  color: var(--footer-input-placeholder);
}

.footer__newsletter-input::placeholder {
  font-family: var(--footer-font);
  font-style: normal;
  font-weight: 400;
  font-size: 14px;
  line-height: 110%;
  color: var(--footer-input-placeholder);
  text-align: center;
}

.footer__newsletter-btn {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 10px 30px;
  gap: 10px;
  background: var(--footer-accent-orange);
  border-radius: var(--footer-btn-radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
  height: 40px;
  flex-shrink: 0;
}

.footer__newsletter-btn:hover {
  background: #d66e22;
}

.footer__newsletter-btn-text {
  font-family: var(--footer-font);
  font-style: normal;
  font-weight: 800;
  font-size: 13px;
  line-height: 15px;
  text-align: center;
  text-transform: uppercase;
  color: var(--footer-text);
  white-space: nowrap;
}

/* --- Checkboxes --- */
.footer__newsletter-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer__newsletter-checkbox {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.footer__newsletter-checkbox input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--footer-border-color);
  border-radius: var(--footer-checkbox-radius);
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.7;
  transition: background 0.2s ease;
}

.footer__newsletter-checkbox input[type="checkbox"]:checked {
  background: var(--footer-text);
  opacity: 1;
}

.footer__newsletter-checkbox-label {
  font-family: var(--footer-font);
  font-style: normal;
  font-weight: 400;
  font-size: 13px;
  line-height: 110%;
  color: var(--footer-text);
  opacity: 0.7;
}

/* --- Social Section --- */
.footer__social {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.footer__social-text {
  font-family: var(--footer-font);
  font-style: normal;
  font-weight: 400;
  font-size: 14px;
  line-height: 110%;
  color: var(--footer-text);
  opacity: 0.6;
  white-space: nowrap;
}

.footer__social-icons {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.footer__social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.footer__social-icon:hover {
  opacity: 0.8;
}

.footer__social-icon svg {
  width: 20px;
  height: 20px;
}

/* --- Down Section (copyright) --- */
.footer__down {
  width: 100%;
  max-width: var(--footer-container-width);
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  box-sizing: border-box;
}

.footer__copyright {
  font-family: var(--footer-font);
  font-style: normal;
  font-weight: 400;
  font-size: 13px;
  line-height: 110%;
  color: var(--footer-down-text);
  white-space: nowrap;
}

.footer__links {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer__link {
  font-family: var(--footer-font);
  font-style: normal;
  font-weight: 400;
  font-size: 13px;
  line-height: 110%;
  color: var(--footer-down-text);
  text-decoration: none;
  opacity: 0.8;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.footer__link:hover {
  opacity: 1;
}

/* ========================================
   RESPONSIVE — Adaptive Design
   ======================================== */

/* Tablet (max-width: 1200px) */
@media (max-width: 1200px) {
  .footer__top {
    padding: 30px 24px 24px;
  }

  .footer__grid {
    grid-template-columns: 280px 1fr;
  }

  .footer__newsletter {
    width: 460px;
    right: 24px;
    top: 30px;
  }

  .footer__right {
    grid-template-columns: repeat(2, 1fr);
    padding-left: 24px;
    row-gap: 30px;
  }

  .footer__logo {
    left: 24px;
    top: 30px;
  }
}

/* Small Tablet (max-width: 992px) */
@media (max-width: 992px) {
  .footer__top {
    min-height: auto;
  }

  .footer__grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
  }

  .footer__left {
    order: 1;
    justify-content: flex-start;
  }

  .footer__right {
    order: 2;
    grid-template-columns: repeat(4, 1fr);
    padding-left: 0;
  }

  .footer__newsletter {
    position: relative;
    right: auto;
    top: auto;
    width: 100%;
    order: 0;
  }

  .footer__logo {
    position: relative;
    left: auto;
    top: auto;
    margin-bottom: 10px;
  }
}

/* Mobile Large (max-width: 768px) */
@media (max-width: 768px) {
  .footer {
    padding: 24px 16px 0;
  }

  .footer__top {
    padding: 24px 20px 20px;
  }

  .footer__right {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 16px;
  }

  .footer__newsletter-row {
    flex-direction: column;
    gap: 10px;
  }

  .footer__newsletter-input {
    width: 100%;
  }

  .footer__newsletter-btn {
    width: 100%;
  }

  .footer__down {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    padding: 16px 0;
  }

  .footer__links {
    gap: 12px 20px;
  }

  .footer__phone,
  .footer__email {
    font-size: 18px;
  }
}

/* Mobile Small (max-width: 480px) */
@media (max-width: 480px) {
  .footer__right {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 12px;
  }

  .footer__newsletter-form {
    padding: 20px 16px;
    gap: 16px;
  }

  .footer__newsletter-title {
    font-size: 18px;
  }

  .footer__contacts {
    gap: 30px;
  }

  .footer__links {
    gap: 8px 16px;
  }

  .footer__link {
    font-size: 12px;
  }

  .footer__copyright {
    font-size: 12px;
  }

  .footer__social {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}