/* EduRealm v34 - responsywna strona główna. Zachowuje motyw i układ desktopowy. */
.home-page,
.home-page * {
  box-sizing: border-box;
}

.home-page {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

.home-page main,
.home-page .section-container,
.home-page .section-text,
.home-page .discord-content,
.home-page .footer-content {
  min-width: 0;
  max-width: 100%;
}

.home-page .section-text iframe {
  display: block;
  width: 100%;
  max-width: 760px;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: clamp(12px, 2vw, 22px);
  background: #050507;
  box-shadow: 0 22px 55px rgba(0, 0, 0, .38);
}

.home-page .home-video {
  width: 100%;
}

.home-page .section-text p:has(iframe) {
  width: 100%;
  margin: 0;
}

.home-page .section-text img.studio {
  display: block;
  width: min(100%, 300px);
  height: 120px;
  aspect-ratio: 5 / 2;
  margin: 0 0 22px;
  object-fit: cover;
  object-position: center;
}

.home-page .discord-content {
  display: grid;
  grid-template-columns: minmax(0, 620px) 350px;
  align-items: center;
  justify-content: space-between;
  gap: clamp(44px, 7vw, 120px);
}

.home-page .discord-text {
  width: 100%;
  max-width: 620px;
  min-width: 0;
}

.home-page .discord-widget,
.home-page .discord-widget iframe {
  display: block;
  width: min(100%, 350px);
  max-width: 100%;
}

.home-page .home-menu-toggle {
  display: none;
}

/* Laptopy i mniejsze monitory - zmniejszamy dekoracje bez utraty naprzemiennego rytmu. */
@media (max-width: 1280px) {
  .home-page main {
    gap: clamp(120px, 14vw, 180px);
  }

  .home-page .half-circle {
    width: clamp(500px, 52vw, 620px);
    height: clamp(500px, 52vw, 620px);
  }

  .home-page .section-text {
    width: 47%;
  }

  .home-page .left-side .section-text {
    margin-right: 5%;
  }

  .home-page .right-side .section-text {
    margin-left: 6%;
  }

  .home-page .circle-number {
    font-size: clamp(2.4rem, 4.5vw, 3.45rem);
  }
}

/* Tablet: autorskie koła stają się czytelnymi kartami, zamiast wychodzić poza ekran. */
@media (max-width: 980px) {
  .home-page header {
    height: 184px;
  }

  .home-page .header-content {
    width: 100%;
    padding: 14px clamp(14px, 3vw, 28px) 0;
    align-items: flex-start;
    gap: 12px;
  }

  .home-page .header-content nav ul {
    gap: 8px clamp(12px, 2.4vw, 22px);
  }

  .home-page main {
    width: min(100% - 30px, 760px);
    margin: 210px auto 0;
    padding: 0 0 96px;
    gap: 34px;
  }

  .home-page .section-container,
  .home-page .section-container.left-side,
  .home-page .section-container.right-side {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
    gap: 0;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 28px;
    background:
      radial-gradient(circle at 90% 10%, rgba(255, 234, 0, .08), transparent 32%),
      linear-gradient(145deg, #1a1b23, #101116);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .24);
  }

  .home-page .half-circle,
  .home-page .left-side .half-circle,
  .home-page .right-side .half-circle {
    position: relative;
    inset: auto;
    order: -1;
    width: 100%;
    height: auto;
    min-height: 118px;
    padding: 22px clamp(22px, 5vw, 38px);
    justify-content: flex-start;
    border-radius: 0;
    opacity: 1;
    transform: none;
    box-shadow: none;
    background:
      radial-gradient(circle at 84% 20%, rgba(13, 13, 17, .15), transparent 28%),
      #ffea00;
  }

  .home-page .left-side .circle-number,
  .home-page .right-side .circle-number,
  .home-page .circle-number {
    margin: 0;
    font-size: clamp(1.65rem, 5.2vw, 2.55rem);
    line-height: 1;
    text-align: left;
  }

  .home-page .section-text,
  .home-page .left-side .section-text,
  .home-page .right-side .section-text {
    width: 100%;
    margin: 0;
    padding: clamp(24px, 5vw, 42px);
    opacity: 1;
    transform: none;
  }

  .home-page .section-text h2 {
    margin-bottom: 16px;
    font-size: clamp(1.65rem, 5vw, 2.35rem);
    overflow-wrap: anywhere;
  }

  .home-page .section-text p {
    font-size: clamp(.98rem, 2.3vw, 1.08rem);
    line-height: 1.68;
    overflow-wrap: anywhere;
  }

  .home-page .discord-section {
    margin-top: 70px;
    padding: 82px 0 70px;
  }

  .home-page .discord-wave-top {
    top: -95px;
    height: 105px;
  }

  .home-page .discord-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    width: min(100% - 30px, 760px);
    padding: 0;
    gap: 36px;
  }

  .home-page .discord-text {
    width: min(100%, 680px);
    max-width: 680px;
    min-width: 0;
    text-align: center;
  }

  .home-page .discord-text h2 {
    font-size: clamp(1.8rem, 6vw, 2.65rem);
    overflow-wrap: anywhere;
  }

  .home-page .discord-widget {
    justify-self: center;
  }

  .home-page .footer-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    width: min(100% - 30px, 760px);
    padding: 42px 0;
  }

  .home-page .footer-left,
  .home-page .footer-right {
    display: block;
    width: auto;
    text-align: left;
  }

  .home-page .contact-box {
    display: block;
    max-width: none;
  }
}

/* Telefon: dwurzędowa nawigacja, duże pola dotykowe i pełna szerokość treści. */
@media (max-width: 620px) {
  .home-page header {
    height: 124px;
  }

  .home-page .header-content {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between !important;
    padding: 12px 14px 0;
    gap: 12px;
  }

  .home-page .header-content .logo {
    width: 122px;
    height: 47px;
  }

  .home-page .home-menu-toggle {
    display: inline-flex;
    min-width: 98px;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 14px;
    border: 1px solid rgba(13, 13, 17, .32);
    border-radius: 13px;
    background: #0d0d11;
    color: #fff;
    font: inherit;
    font-size: .86rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .22);
  }

  .home-page .home-menu-bars {
    display: grid;
    width: 18px;
    gap: 4px;
  }

  .home-page .home-menu-bars i {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: #ffea00;
    transition: transform .2s ease, opacity .2s ease;
  }

  .home-page .home-menu-toggle[aria-expanded="true"] .home-menu-bars i:first-child {
    transform: translateY(6px) rotate(45deg);
  }

  .home-page .home-menu-toggle[aria-expanded="true"] .home-menu-bars i:nth-child(2) {
    opacity: 0;
  }

  .home-page .home-menu-toggle[aria-expanded="true"] .home-menu-bars i:last-child {
    transform: translateY(-6px) rotate(-45deg);
  }

  .home-page .header-content .home-primary-nav {
    position: absolute;
    top: 72px;
    right: 14px;
    width: min(290px, calc(100vw - 28px));
    margin: 0;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 18px;
    background: rgba(15, 16, 22, .98);
    box-shadow: 0 24px 55px rgba(0, 0, 0, .48);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px) scale(.98);
    transform-origin: top right;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }

  .home-page .header-content .home-primary-nav.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .home-page .header-content .home-primary-nav ul {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    width: 100%;
  }

  .home-page .header-content nav li {
    min-width: 0;
  }

  .home-page .header-content .home-primary-nav a {
    display: flex;
    min-height: 46px;
    align-items: center;
    padding: 8px 14px;
    border-radius: 11px;
    color: #fff;
    font-size: .9rem;
    line-height: 1.2;
    text-align: left;
    white-space: nowrap;
  }

  .home-page .header-content .home-primary-nav a:hover,
  .home-page .header-content .home-primary-nav a:focus-visible {
    background: rgba(255, 234, 0, .11);
    color: #ffea00;
  }

  .home-page .header-content .home-primary-nav a::after {
    display: none;
  }

  .home-page main {
    width: min(100% - 20px, 560px);
    margin-top: 142px;
    gap: 20px;
    padding-bottom: 72px;
  }

  .home-page .section-container,
  .home-page .section-container.left-side,
  .home-page .section-container.right-side {
    border-radius: 21px;
  }

  .home-page .half-circle,
  .home-page .left-side .half-circle,
  .home-page .right-side .half-circle {
    min-height: 92px;
    padding: 17px 20px;
  }

  .home-page .circle-number,
  .home-page .left-side .circle-number,
  .home-page .right-side .circle-number {
    font-size: clamp(1.35rem, 8vw, 1.8rem);
  }

  .home-page .section-text,
  .home-page .left-side .section-text,
  .home-page .right-side .section-text {
    padding: 22px 18px 25px;
  }

  .home-page .section-text h2 {
    font-size: clamp(1.35rem, 7vw, 1.85rem);
    letter-spacing: -.02em;
  }

  .home-page .section-text p {
    font-size: .96rem;
    line-height: 1.62;
  }

  .home-page .section-text img.studio {
    width: min(100%, 230px);
    height: 92px;
  }

  .home-page .discord-section {
    margin-top: 48px;
    padding: 68px 0 56px;
  }

  .home-page .discord-content {
    width: min(100% - 22px, 560px);
    gap: 28px;
  }

  .home-page .discord-text p {
    font-size: .98rem;
  }

  .home-page .discord-btn {
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: center;
  }

  .home-page .discord-widget,
  .home-page .discord-widget iframe {
    width: 100%;
  }

  .home-page .discord-widget iframe {
    height: min(500px, 72vh);
    min-height: 380px;
  }

  .home-page .footer-content {
    grid-template-columns: minmax(0, 1fr);
    width: min(100% - 28px, 560px);
    gap: 24px;
    padding: 36px 0 22px;
  }

  .home-page .contact-box {
    padding: 20px;
  }

  .home-page .footer-bottom {
    padding-inline: 16px;
    text-align: center;
  }

  .home-page .footer-left a,
  .home-page .contact-link {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
  }
}

@media (max-width: 380px) {
  .home-page .home-menu-toggle {
    min-width: 88px;
    padding-inline: 11px;
  }

  .home-page .section-text,
  .home-page .left-side .section-text,
  .home-page .right-side .section-text {
    padding-inline: 15px;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .home-page header {
    position: absolute;
  }

  .home-page main {
    margin-top: 205px;
  }
}

@media (hover: none) {
  .home-page .section-container:hover,
  .home-page .half-circle:hover .circle-number {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-page .half-circle,
  .home-page .section-text {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Duże telewizory - ograniczamy długość wiersza i nie rozciągamy treści bez końca. */
@media (min-width: 1900px) {
  .home-page .header-content,
  .home-page .discord-content,
  .home-page .footer-content {
    max-width: 1680px;
  }

  .home-page .section-text {
    max-width: 760px;
  }

  .home-page .section-text p,
  .home-page .discord-text p {
    font-size: 1.18rem;
  }
}
