/**
 * ========================================
 * Custom Footer Styles for Safer Ukraine
 * ========================================
 * Based on SaferAccess2026 Drupal site footer design
 * Includes: ticker animation, decorative bars, scroll effects
 */

/* ROOT VARIABLES */
:root {
  --c-black: #1d2327;
  --c-white: #ffffff;
  --c-text-light: rgba(255, 255, 255, 0.7);
  --c-brand-primary: #ebcf01;
  --c-brand-primary-light: #ebcf01;
  --ease-cubic: cubic-bezier(0.4, 0, 0.2, 1);
  --font-weight-light: 300;
}

#footer {
  background: #021327;
  clip-path: inset(0 0 0 0);
}

/* TICKER SECTION */
#footer-first {
  position: relative;
  padding: 2rem 0;
  overflow: hidden;
}


.paragraph--ticker--link {

  a {
    padding: 1rem 0;

    & {
      display: flex;
      position: relative;
      align-items: center;
      line-height: 1em;
      color: rgba(255,255,255, 0.5);
      contain: paint;
    }

    span {
      display: block;
    }

    svg {
      display: block;
      width: 1.25em;
      height: auto;
      margin: 0 0.5em;
    }
  }

  .ticker-items {
    flex-shrink: 0;
    min-width: 100vw;
    display: flex;
    animation: ticker 120s forwards infinite linear;

    .ticker-item {
      display: flex;
      flex-shrink: 0;
    }
  }
}

@keyframes ticker {

  0% {
    transform: none;
  }

  100% {
    transform: translateX(-100%);
  }
}


#footer-first {

  .paragraph--ticker--link {

    .ticker-item {
      padding-right: 1em;
    }

    a {
      font-size: 6vw;
      font-weight: 300;
      line-height: 1.25em;

      &::before {
        background: var(--c-black);
      }

      &:hover {
        color: var(--c-brand-primary-light);
      }
    }
  }
}



#footer-second {

  > .inner {
    padding: 8rem 0;

    & {
      position: relative;
      font-size: 0.85rem;
      line-height: 1.6em;
      color: color-mix(in srgb, #fff, transparent 30%);
  
      > * {
        padding: 1rem;

        @media screen and (min-width: 1200px) {
          padding: 1rem 2rem;
        }
      }
    }
  }
	
	.block-logo {
		font-size: 3em;
		line-height: 1em;
		font-weight: 700;
		color: #fff;
	}


  h2 {
    font-size: 1rem;
    line-height: 1.2em;
    margin-bottom: 0.5em;
    font-weight: 300;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.1em;
  }

  ul {
    padding: 0;
    margin: 0;
    list-style: none;
  }

  a:not([class]),
  a.ext,
  a.is-active {
    position: relative;
    color: #fff;

    &::after {
      content: "";
      position: absolute;
      left: 0;
      bottom: -2px;
      width: 0%;
      height: 1px;
      background: #ebcf01;
      transition: all 0.25s;
    }

    &:hover {

      &::after {
        width: 100%;
      }
    }
  }

  @media screen and (max-width: 767px) {
    text-align: center;
    padding-bottom: 10vw;
  }

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

    > .inner {
      display: flex;
      justify-content: space-between;
    }
  }

  @media screen and (min-width: 992px) and (max-width: 1199px) {
    font-size: var(--font-size-body-xsmall);
    line-height: 1.5em;
  }

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

    > * {
      transform: translateY(80px);
      opacity: 0;
    }

    &.loaded > * {
      transform: translateY(0);
      opacity: 1;
      transition: all 1s var(--ease-cubic);

      &:nth-child(2) {
        transition-delay: 0.25s;
      }

      &:nth-child(3) {
        transition-delay: 0.5s;
      }

      &:nth-child(4) {
        transition-delay: 0.75s;
      }

      &:nth-child(5) {
        transition-delay: 1s;
      }
    }
  }
}


#footer {
  position: relative;
  background: #021327;
  transition: all 1s var(--ease-cubic);
}

#footer-main {
  border-top: 2px solid rgba(255,255,255, 0.1);

  > .inner {
    padding: 0 4rem;
    max-width: 1400px;

    & {
      margin: auto;
    }
  }
}

ul.social {
  margin: 0;
  padding: 0;
  list-style: none;

  & {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
  }

  a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3em;
    height: 3em;
    border-radius: 0.5em;

    svg {
      display: block;
      width: 50%;
      height: auto;
    }
  }

  @media screen and (max-width: 767px) {
    margin-bottom: 1.5em;
    width: 100%;
    justify-content: center;
    li {
      margin: 0 0.25em!important;
    }
  }

  @media screen and (min-width: 768px) {
    li {
      margin-top: 0!important;
    }
    li:not(:last-child) {
      margin-right: 1em!important;
    }
  }
}

.block--contact {

  nav {
    button {
      display: none;
    }
  }

  ul.social {
    margin-top: 1.5em!important;
    margin-bottom: 0.5em;

    li {

      a {
        width: 2em;
        height: 2em;
        color: #000!important;
        background: var(--c-brand-primary-light);

        svg {
          width: 60%;
        }

        &:hover {
          background: rgba(255,255,255, 1);
          color: #000!important;
        }
      }

      @media screen and (min-width: 768px) {
        
        &:not(:last-child) {
          margin-right: 0.5rem;
        }
      }
    }

    @media screen and (min-width: 768px) and (max-width: 999px) {
      justify-content: center;    
    }
  }

  @media screen and (max-width: 999px) {
    ul.social {
      margin: 2em auto!important;
    }
  }
}

#footer .bars {
  position: absolute;
  bottom: 0;
  left: 10px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 0 20px;
  
  .bar {
    width: 9vw;
    background: #ffd801;
    transform: skewY(-15deg) rotate(15deg) translateX(-4vw);
    transform-origin: 50% 0;
    height: 0;
    transition: all 1s var(--ease-cubic);
  }
  
  .bar-1 {
    transition-delay: 0.1s;
  }
  
  .bar-2 {
    background: #fff;
    margin-left: 3vw;
    margin-right: -1.85vw;
    transition-delay: 0.2s;
    transform: skewY(-15deg) rotate(15deg) translateX(-6vw);
  }
  
  .bar-3 {
    transition-delay: 0.3s;
  }
  
  &.loaded {
    .bar-1 {
      height: 13vw;
      transform: skewY(-15deg) rotate(15deg) translateX(0);
    }
    
    .bar-2 {
      height: 23vw;
      transform: skewY(-15deg) rotate(15deg) translateX(0);
    }
    
    .bar-3 {
      height: 13vw;
      transform: skewY(-15deg) rotate(15deg) translateX(0);
    }
  }
}