/*
 * Локальна заміна Tilda-блоків головної.
 * Фон кожного блоку задається в розмітці через background-image.
 */

.home-hero,
.home-contacts {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: #111;
  color: #fff;
}

.home-hero {
  min-height: clamp(520px, 72vh, 760px);
}

#rec411207005.home-hero {
  min-height: clamp(520px, 72vh, 760px);
}

.home-hero__bg {
  position: absolute;
  inset: -10%;
  z-index: 0;
  overflow: hidden;
  animation: hero-bg-drift 24s ease-in-out infinite;
  will-change: transform;
}

.home-hero__bg-image {
  width: 115%;
  height: 115%;
  object-fit: cover;
  filter: blur(4px) saturate(1.05);
  transform: none;
}

.home-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(115deg, rgba(0,0,0,.58) 0%, rgba(0,0,0,.38) 55%, rgba(0,0,0,.5) 100%);
}


.home-hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  width: min(1120px, 100%);
  min-height: inherit;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 56px) clamp(16px, 4vw, 32px);
  box-sizing: border-box;
  --hero-mobile-width: min(72vw, 280px);
}

.home-hero__cluster {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.home-hero__album-wrap {
  position: relative;
  flex: 0 0 auto;
  width: min(100%, 380px);
  animation: hero-album-rise 1.1s cubic-bezier(.22,1,.36,1) both;
}

.home-hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  flex: 0 1 auto;
  max-width: 520px;
  min-width: 0;
  padding-top: 0;
  text-align: left;
}

.home-hero__album-glow {
  position: absolute;
  inset: 8% 5% -6%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,.28) 0%, transparent 68%);
  filter: blur(18px);
  z-index: 0;
}

.home-hero__album {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 36px 64px rgba(0,0,0,.48)) drop-shadow(0 12px 24px rgba(0,0,0,.32));
  transform-origin: center bottom;
  animation: hero-album-sway 5.5s ease-in-out infinite;
}

.home-hero__title {
  margin: 0 0 22px;
  color: #fff !important;
  font-family: "Roboto", sans-serif;
  font-size: clamp(28px, 4.2vw, 52px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-shadow: 0 4px 28px rgba(0,0,0,.55), 0 2px 8px rgba(0,0,0,.4);
  animation: hero-title-rise .75s cubic-bezier(.22,1,.36,1) both, hero-title-glow 5s ease-in-out infinite .6s;
}

.home-hero__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  border-radius: 16px;
  border: 2px solid #fff;
  background: #fff;
  color: #111 !important;
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 14px 36px rgba(0,0,0,.32), 0 4px 12px rgba(0,0,0,.2);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  animation: hero-cta-rise 1s cubic-bezier(.22,1,.36,1) .28s both;
}

.home-hero__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0,0,0,.28);
  background: #f3f3f3;
}

.home-hero__cta:active {
  transform: translateY(0);
}

.home-hero__cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@keyframes hero-bg-drift {
  0%, 100% { transform: scale(1.04) translate3d(0, 0, 0); }
  50% { transform: scale(1.14) translate3d(-3%, -2%, 0); }
}

@keyframes hero-album-sway {
  0%, 100% { transform: perspective(1200px) rotateY(-7deg) rotateX(3deg) translateY(0); }
  50% { transform: perspective(1200px) rotateY(7deg) rotateX(2deg) translateY(-4px); }
}

@keyframes hero-album-rise {
  from { opacity: 0; transform: translateY(36px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes hero-title-rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes hero-title-glow {
  0%, 100% { text-shadow: 0 4px 28px rgba(0,0,0,.55), 0 2px 8px rgba(0,0,0,.4); }
  50% { text-shadow: 0 6px 36px rgba(0,0,0,.62), 0 3px 12px rgba(0,0,0,.48); }
}

@keyframes hero-cta-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media screen and (min-width: 980px) {
  .home-hero__cluster {
    gap: 24px;
  }

  .home-hero__album-wrap {
    width: min(36vw, 380px);
  }
}

@media screen and (max-width: 979px) {
  .home-hero__cluster {
    flex-direction: column;
    align-items: stretch;
    width: var(--hero-mobile-width);
    max-width: calc(100vw - 32px);
    gap: 10px;
  }

  .home-hero__album-wrap {
    width: 100%;
    max-width: 100%;
    order: -1;
  }

  .home-hero__album {
    animation: hero-album-sway 5.5s ease-in-out infinite;
    will-change: transform;
  }

  .home-hero__content {
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    text-align: center;
  }

  .home-hero__title {
    text-align: center;
    width: 100%;
  }

  .home-hero__cta {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    align-self: stretch;
  }
}

@media screen and (max-width: 767px) {
  .home-hero,
  #rec411207005.home-hero {
    /* svh не змінюється при хованні адресного рядка — на відміну від dvh */
    height: 80svh;
    min-height: 80svh;
    max-height: 80svh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
  }

  .home-hero__inner {
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    padding: max(16px, env(safe-area-inset-top)) 16px 52px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
  }

  .home-hero__cluster {
    --hero-mobile-width: min(76vw, 280px);
    width: var(--hero-mobile-width);
    gap: 12px;
    flex-shrink: 0;
    padding-bottom: 8px;
  }

  .home-hero__title {
    font-size: clamp(22px, 7vw, 34px);
    margin-bottom: 14px;
  }

  .home-hero__cta {
    padding: 14px 20px;
    font-size: 13px;
    margin-bottom: 0;
  }

  .home-hero__bg {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero__bg {
    animation: none !important;
  }
  .home-hero__album,
  .home-hero__album-wrap,
  .home-hero__title,
  .home-hero__cta {
    animation: none !important;
  }
  .home-hero__album {
    transform: perspective(1200px) rotateY(-4deg) rotateX(2deg);
  }
}

.home-board {
  box-sizing: border-box;
  overflow: visible;
  padding: 52px 24px;
  border-top: 1px solid #d8d8d8;
  border-bottom: 1px solid #d8d8d8;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  color: #111;
}

.home-board__inner {
  box-sizing: border-box;
  width: min(100%, 1120px);
  margin-left: auto;
  margin-right: auto;
}

.home-board__content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home-board__content .online-board__grid,
.home-board__content .online-board__skeleton {
  width: 100%;
}

.home-board__title {
  margin: 0;
  color: #111;
  font-family: "Roboto", sans-serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

.home-board__title::after {
  display: block;
  width: 48px;
  height: 2px;
  margin: 12px auto 0;
  background: currentColor;
  content: "";
}

.home-board__descr {
  max-width: 640px;
  margin: 16px auto 0;
  color: #333;
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.5;
  text-align: center;
}

.home-board__descr--after {
  margin: 20px auto 0;
  max-width: 720px;
}

/* Поточні стилі карток .online-board лишаються базовими. */
.home-board .online-board {
  width: 100%;
  max-width: 1120px;
  margin: 12px auto 0;
}

.home-contacts {
  min-height: 320px;
  background: #111;
}

.home-contacts__media {
  position: absolute;
  z-index: 0;
  inset: -6px;
  background: url("/static/img/backgrounds/contacts.jpg") center / cover no-repeat;
  filter: blur(3px);
}

.home-contacts__overlay {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.home-contacts__inner {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  padding: 32px 24px;
  text-align: center;
}

.home-contacts__content {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  display: flex;
  min-height: 320px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  text-align: center;
}

.home-contacts__title {
  margin: 0 0 12px;
  color: #fff;
  font-family: "Roboto", sans-serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.home-contacts__hours {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.88);
  font-family: "Roboto", sans-serif;
  font-size: 15px;
  letter-spacing: 0.04em;
}

.home-contacts__socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.home-contacts__social {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.home-contacts__social a {
  display: flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  color: #fff;
  transition: background 0.2s ease, color 0.2s ease;
}

.home-contacts__social a:hover {
  background: #fff;
  color: #111;
}

.home-contacts__social svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
}

.home-contacts__socials a {
  display: inline-block;
  padding: 11px 18px;
  border: 1px solid #fff;
  border-radius: 100px;
  color: #fff;
  font-family: "Roboto", sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.home-contacts__socials a:hover {
  background: #fff;
  color: #111;
}

@media screen and (max-width: 979px) {
}

@media screen and (max-width: 767px) {
  .home-board {
    padding: 28px 12px;
  }

  .home-board__title {
    font-size: 22px;
  }

  .home-board__descr {
    margin-top: 10px;
    padding: 0 8px;
    font-size: 13px;
    line-height: 1.35;
  }

  .home-board .online-board {
    margin-top: 6px;
  }

  .home-contacts__title {
    font-size: 24px;
  }
}

@media screen and (max-width: 480px) {
  .home-contacts__inner {
    padding: 28px 14px;
  }

  .home-contacts__content {
    padding: 28px 14px;
  }

  .home-contacts__socials {
    gap: 10px;
  }

  .home-contacts__socials a {
    padding: 10px 20px;
    font-size: 12px;
  }
}

@media screen and (min-width: 768px) and (max-width: 1199px) {
  .home-hero,
  #rec411207005.home-hero {
    min-height: clamp(380px, 48vh, 520px);
  }

  .home-hero__inner {
    padding: 20px 24px 32px;
  }

  .home-hero__cluster {
    gap: 16px;
  }

  .home-hero__album-wrap {
    width: min(34vw, 280px);
  }

  .home-hero__title {
    margin-bottom: 14px;
    font-size: clamp(26px, 3.6vw, 38px);
  }

  .home-hero__cta {
    padding: 12px 22px;
    font-size: 13px;
  }

  .home-board {
    padding: 28px 20px 32px;
  }

  .home-board__title {
    font-size: 26px;
  }
}
