/* Footer design 1 - the template's footer-default (index.html:2989, and 24
 * more pages), measured at 1440, 1024, 768 and 390:
 * - the top row (.footer-top, 9141-9155): 32px above and below, a line above
 *   and under it; the logo at the start, the social buttons at the end, 8px
 *   apart: 52px circles with 20px glyphs from 992px (22px for Facebook), 38px
 *   with 16px under it (19498-19505);
 * - the body (.row-footer): from 1200px one row of three divided blocks,
 *   29% / 42% / 29% (20066-20087): the contact block 60px above and below
 *   with 24px before the line, the newsletter 32px each side (80px before and
 *   74px after from 1440px, 21283-21290), the link lists 32px after the line
 *   (80px from 1440px) spaced to both ends; 768-1199px two columns 24px apart
 *   and 32px between rows, the link lists across both (18692-18702), the body
 *   60px above and below (40px on phones);
 * - the bottom row under a line the footer's full width.
 * Every rule here is scoped to .dana-footer--d1 (conventions.md). */
.dana-footer--d1 .dana-footer__top { padding-block: 32px; border-block: 1px solid var(--dana-footer-line); }
/* The cloud edge replaces the line above the top row (.footer-cloud, 9389). */
.dana-footer--d1.dana-footer--edge-cloud .dana-footer__top { border-block-start: 0; }
/* With no block to show there is no body: the top row's line is the one above
   the next row. */
.dana-footer--d1 .dana-footer__top + :is(.dana-footer__legal-wrap, .dana-footer__bottom) { border-block-start: 0; }
.dana-footer--d1 .dana-footer__top-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 15px; }
.dana-footer--d1 .dana-footer__top .dana-footer__social-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.dana-footer--d1 .dana-footer__top .dana-footer__social-title { margin: 0; }
.dana-footer--d1 .dana-footer__top .dana-footer__social { gap: 8px; }
@media (min-width: 992px) {
  .dana-footer--d1 .dana-footer__top .dana-footer__social-link { inline-size: 52px; block-size: 52px; font-size: 20px; }
  .dana-footer--d1 .dana-footer__top .dana-footer__social-link--facebook { font-size: 22px; }
}

.dana-footer--d1 .dana-footer__body { padding-block: 40px; }
.dana-footer--d1 .dana-footer__newsletter .dana-footer__form { max-inline-size: 401px; }
@media (min-width: 576px) {
  .dana-footer--d1 .dana-footer__body { padding-block: 60px; }
}

/* 768-1199px: two columns, the link lists across both, each list as wide as
   the row shares (the template's 1fr 1fr) and never narrower than its
   longest link: lists that cannot sit side by side wrap to a new line. */
@media (min-width: 768px) and (max-width: 1199px) {
  .dana-footer--d1 .dana-footer__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
  .dana-footer--d1 .dana-footer__menus { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 32px 24px; }
  .dana-footer--d1 .dana-footer__menus > .dana-footer__menu { flex: 1 1 0; }
}

/* From 1200px: the three divided blocks. The link-list block is as wide as
   its lists side by side, at least 29% and at most 45% of the row; the
   newsletter gives way first, so long Arabic lists never break a link. A
   block that is not there leaves no line: each line is drawn before a block
   that follows another. */
@media (min-width: 1200px) {
  .dana-footer--d1 .dana-footer__body { padding-block: 0; }
  .dana-footer--d1 .dana-footer__row { display: flex; align-items: stretch; }
  .dana-footer--d1 .dana-footer__block { padding-block: 60px; min-inline-size: 0; }
  .dana-footer--d1 .dana-footer__block + .dana-footer__block { border-inline-start: 1px solid var(--dana-footer-line); }
  .dana-footer--d1 .dana-footer__contact { flex: 0 1 29%; padding-inline: 0 24px; }
  .dana-footer--d1 .dana-footer__newsletter { flex: 1 1 42%; padding-inline: 32px; }
  .dana-footer--d1 .dana-footer__menus {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-content: flex-start;
    gap: 32px 24px;
    flex: 0 0 auto;
    inline-size: max-content;
    min-inline-size: 29%;
    max-inline-size: 45%;
    padding-inline: 32px 0;
  }
  .dana-footer--d1 .dana-footer__block:first-child { padding-inline-start: 0; }
  .dana-footer--d1 .dana-footer__block:last-child { padding-inline-end: 0; }
  /* The template lifts the circles of multi-line contact lines by 3px
     (20063). */
  .dana-footer--d1 .dana-footer__info-item:not(:last-child) .dana-footer__info-icon { margin-block-start: -3px; }
}
@media (min-width: 1440px) {
  .dana-footer--d1 .dana-footer__newsletter { padding-inline: 80px 74px; }
  .dana-footer--d1 .dana-footer__menus { padding-inline-start: 80px; }
}
