/*
Theme Name: Hello Elementor Child
Template: hello-elementor
Version: 1.0.0
Text Domain: hello-elementor-child
*/

/* Custom styles for the Meredyt website */

/* Red outline on click (button animation) */
.band-click-outline {
  position: fixed;
  display: block;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 2px solid #FF3344;
  background: transparent;
  pointer-events: none;
  z-index: 999999;
  transform-origin: center;
}


/* Hero section: social icons on the right */
#meredyt-hero {
  position: relative;
}

/* The video's inner wrapper must not be the positioning context, the icons anchor to the whole hero */
#meredyt-hero .e-background-video__content {
  position: static !important;
}

/* Icons stay on the right side of the hero, vertically centered */
#meredyt-hero .meredyt-hero-social-widget {
  position: absolute !important;
  top: 50%;
  right: 28px;
  bottom: auto;
  left: auto;

  width: auto !important;
  max-width: none;
  margin: 0;
  padding: 0;
  transform: translateY(-50%);
  z-index: 5;
}

.meredyt-hero-socials {
  --square-size: 52px;
  --icon-size: 28px;
  --corner-radius: 10px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.meredyt-hero-socials .hero-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 var(--square-size);

  width: var(--square-size);
  height: var(--square-size);
  box-sizing: border-box;
  border: 1px solid transparent;
  border-radius: var(--corner-radius);
  text-decoration: none;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.meredyt-hero-socials .hero-social img {
  display: block;
  width: var(--icon-size);
  height: var(--icon-size);
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.meredyt-hero-socials .hero-social-facebook {
  background: #1877f2;
}

.meredyt-hero-socials .hero-social-instagram {
  background: radial-gradient(
    circle at 30% 110%,
    #feda75 0%,
    #fa7e1e 25%,
    #d62976 50%,
    #962fbf 75%,
    #4f5bd5 100%
  );
}

.meredyt-hero-socials .hero-social-tiktok {
  background: #000;
  border-color: rgba(255, 255, 255, 0.12);
}

@media (hover: hover) {
  .meredyt-hero-socials .hero-social:hover {
    transform: translateY(-3px) scale(1.05);
    border-color: #b3192b;
    box-shadow: 0 6px 18px rgba(179, 25, 43, 0.25);
  }
}

.meredyt-hero-socials .hero-social:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

@media (max-width: 767px) {
  #meredyt-hero .meredyt-hero-social-widget {
    right: max(12px, env(safe-area-inset-right, 0px));
  }

  .meredyt-hero-socials {
    --square-size: 36px;
    --icon-size: 20px;
    --corner-radius: 7px;
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .meredyt-hero-socials .hero-social {
    transition: none;
  }

  .meredyt-hero-socials .hero-social:hover {
    transform: none;
  }
}


/* Repertoire: links in the song list */
ul.band-repertoire a.band-repertoire-link,
ul.band-repertoire a.band-repertoire-link:visited,
ul.band-repertoire a.band-repertoire-link:hover,
ul.band-repertoire a.band-repertoire-link:focus {
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    text-decoration: none;
}
ul.band-repertoire a.band-repertoire-link:focus-visible {
    outline: 2px solid #FF3344;
    outline-offset: 3px;
}


/* Back to top button */
#band-back-to-top {
  position: fixed;
  right: 32px;
  bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  z-index: 9999;

  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  overflow: visible;

  background: #FF3344;
  color: #F5F5F5;
  border: 0;
  border-radius: 0;
  cursor: pointer;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(15px) rotate(45deg);

  transition:
    opacity 0.25s ease,
    visibility 0.25s ease,
    transform 0.25s ease,
    background-color 0.2s ease;
}

#band-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) rotate(45deg);
}

#band-back-to-top:hover {
  background: #FF6673;
}

#band-back-to-top:focus-visible {
  outline: 2px solid #F5F5F5;
  outline-offset: 5px;
}

/* Expanding diamond outline */
#band-back-to-top::after {
  content: "";
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  border: 2px solid #FF3344;
  background: transparent;
  opacity: 0;
  pointer-events: none;
}

#band-back-to-top.is-clicked::after {
  animation: back-to-top-wave 650ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes back-to-top-wave {
  from {
    transform: scale(1);
    opacity: 0.9;
  }

  to {
    transform: scale(1.7);
    opacity: 0;
  }
}

/* Arrow */
#band-back-to-top svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(-45deg);
}

/* Smaller mobile button and horizontal overflow clipping */
@media (max-width: 767px) {
  html,
  body {
    overflow-x: clip;
  }

  #band-back-to-top {
    width: 34px;
    height: 34px;
    right: calc(28px + env(safe-area-inset-right, 0px));
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }

  #band-back-to-top svg {
    width: 18px;
    height: 18px;
  }

  #band-back-to-top::after {
    border-width: 1.5px;
  }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  #band-back-to-top {
    transition: none;
  }

  #band-back-to-top.is-clicked::after {
    animation: none;
  }
}


/* Social icons (footer / contacts) */
.meredyt-socials {
  --square-size: 52px;
  --icon-size: 28px;
  --corner-radius: 10px;

  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

.meredyt-socials .meredyt-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 var(--square-size);

  width: var(--square-size);
  height: var(--square-size);
  box-sizing: border-box;
  border: 1px solid transparent;
  border-radius: var(--corner-radius);
  text-decoration: none;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.meredyt-socials .meredyt-social-link img {
  display: block;
  width: var(--icon-size);
  height: var(--icon-size);
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.meredyt-socials .social-facebook {
  background: #1877f2;
}

.meredyt-socials .social-instagram {
  background:
    radial-gradient(
      circle at 30% 110%,
      #feda75 0%,
      #fa7e1e 25%,
      #d62976 50%,
      #962fbf 75%,
      #4f5bd5 100%
    );
}

.meredyt-socials .social-tiktok {
  background: #000;
  border-color: rgba(255, 255, 255, 0.12);
}

.meredyt-socials .meredyt-social-link:hover {
  transform: translateY(-3px) scale(1.05);
  border-color: #b3192b;
  box-shadow: 0 6px 18px rgba(179, 25, 43, 0.25);
}

.meredyt-socials .meredyt-social-link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

@media (max-width: 767px) {
  .meredyt-socials {
    --square-size: 44px;
    --icon-size: 24px;
    --corner-radius: 8px;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .meredyt-socials .meredyt-social-link {
    transition: none;
  }

  .meredyt-socials .meredyt-social-link:hover {
    transform: none;
  }
}


/* Random footer image */
#footer-random-image {
  display: block;
  width: 100%;
  max-width: 200px;
  max-height: 200px;
  height: auto;
  object-fit: cover;
  margin: auto;
}

@media (max-width: 767px) {
  #footer-random-image {
    width: 130px;
    height: 130px;
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
  }
}

/* Footer image: tap animation and credits */
#footer-random-image {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation; /* no double-tap zoom on phones */
  transition: transform 0.6s ease;
}

#footer-random-image.is-tapped {
  animation: footer-image-tap 0.25s ease;
}

@keyframes footer-image-tap {
  0%   { transform: scale(1) rotate(0deg); }
  40%  { transform: scale(0.94) rotate(var(--tap-tilt, -3deg)); }
  100% { transform: scale(1) rotate(0deg); }
}

/* Hidden credits below the image (floats, so the footer does not move) */
.footer-credits-anchor {
  position: relative;
}

.footer-credits {
  position: absolute;
  top: 100%;
  left: 50%;
  width: max-content;
  max-width: calc(100vw - 32px);
  opacity: 0;
  transform: translate(-50%, -6px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
  text-align: center;
  pointer-events: none;
  z-index: 2;
}

.footer-credits.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.footer-credits__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.footer-credits__title {
  margin: 14px 0 4px;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f5f5f5;
}

.footer-credits__title a {
  text-decoration: none;
  transition: color 0.2s ease;
  color: #FF3344;
}

.footer-credits__link {
  font-family: "Inter", sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(245, 245, 245, 0.7);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-credits__link:hover,
.footer-credits__link:focus-visible {
  color: #FF3344;
}

@media (max-width: 767px) {
  /* No free space under the image on phones: the image lifts up and
     shrinks a little, and the text appears in the space it leaves */
  #footer-random-image.is-lifted {
    transform: translateY(-12px) scale(0.8);
  }

  .footer-credits {
    top: calc(100% - 30px);
  }

  .footer-credits__title {
    margin: 0 0 2px;
  }

  .footer-credits__title,
  .footer-credits__link {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #footer-random-image,
  #footer-random-image.is-tapped {
    animation: none;
    transition: none;
  }

  .footer-credits {
    transition: opacity 0.3s ease;
    transform: translate(-50%, 0);
  }
}

.footer-credits__title a:hover,
.footer-credits__title a:focus-visible {
  color: #b3192b;
}

