* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: #111;
}

a {
    color: inherit;
    text-decoration: none;
}

.page {
    width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* Główna część strony: header + main */
.content-area {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 0;
    background: #d9d5d5;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Szare tło po prawej stronie */
.right-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 35%;
    height: 100%;
    background: #7b7b7b;
    z-index: 1;
}

/* Treść ma być nad tłem */
header,
main {
    position: relative;
    z-index: 2;
}

/* =========================
   HEADER
========================= */
header {
    width: 100%;
    padding: 1.5% 3%;
    margin-left: 11.5%;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 0.5%;
    width: 100%;
}

.logo {
    width: 8%;
}

.logo img {
    display: block;
    width: 100%;
    max-width: 220px;
    height: auto;
    margin: 10%;
}

nav {
    display: flex;
    align-items: center;
    gap: 40%;
    flex-wrap: nowrap;
    margin-left: 6%;
}

nav a {
    font-size: 1.2vw;
    font-weight: 700;
    white-space: nowrap;
}

/* =========================
   MAIN
========================= */
main {
    position: relative;
    display: flex;
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Lewa część */
.left {
    width: 73%;
    padding: 2% 4% 2%;
}

.left h1 {
    margin-bottom: 5%;
    font-size: 1.8vw;
    font-weight: 600;
}

.left h2 {
    text-align: center;
    font-size: 1vw;
    font-weight: 800;
    margin-bottom: 2%;
}

.left-content {
    padding-left: 18%;
}

/* Treść tekstowa */
.intro {
    padding-right: 25%;
    display: flex;
    align-items: flex-start;
    gap: 6%;
    width: 100%;
}

.symbols {
    width: 20%;
    font-family: Georgia, serif;
    font-size: 4vw;
    line-height: 1.2;
    text-align: center;
}

.text-block {
    width: 100%;
    margin-right: 2%;
    text-align: justify;
}

/* Paragrafy w bloku tekstowym */
.text-block p {
    margin-bottom: 5%;
    font-size: 0.9vw;
    line-height: 1.4;
    margin-left: 10%;
}

p#two,
p#four {
    margin-left: -28%;
    line-height: 1.4;
}

/* Przycisk "Buy Now" */
.btn {
    display: inline-block;
    margin-top: 2%;
    padding: 2% 4%;
    background: #cf8d56;
    color: #000;
    font-size: 1vw;
    font-weight: 700;
    margin-left: -28%;
}

/* Prawa część */
.right {
    position: relative;
    width: 30%;
}

/* Biały środkowy blok z obrazkiem */
.middle-box {
    position: absolute;
    left: 68%;
    width: 20%;
    height: 90%;
    transform: translateX(-50%);
    z-index: 3;
    background-image: url('middle.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: #fff solid 2px;
}

/* =========================
   AUDIO
========================= */
.audio-panels {
    display: flex;
    gap: 20px;
    width: calc(100% - 40px);
    height: 45vh;
    margin-left: 0;
    margin-right: 30px;
    margin-bottom: 25px;
}

.leftmp3,
.rightwav {
    flex: 1;
    background: #d9d5d5;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 12px;
    margin: 10px 0;
    overflow-y: auto;
    min-height: 0;
}

.audio-file-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.audio-file-list li {
    margin-bottom: 8px;
    padding: 6px 8px;
    background: #d9d5d5;
    border-radius: 6px;
}

.audio-file-list a {
    color: #222;
    text-decoration: none;
    font-weight: 600;
    display: block;
}

.audio-file-list a:hover {
    color: #0077cc;
}

/* Author of recordings */
.left > p {
    font-size: 1vw;
    font-weight: 400;
    text-align: justify;
}

a#author-info {
    display: inline-block;
    margin-bottom: clamp(25px, 4vh, 60px);
}

p#terms {
    margin: 0 8% 2% 0;
    text-align: justify;
}

.left > p a {
    color: #222;
    text-decoration: none;
}

.left > p a:hover {
    color: #0077cc;
}

/* =========================
   FOOTER
========================= */
footer {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0 6%;
    background: #ffffff;
    gap: 30%;
    height: 10vh;
    min-height: 60px;
    flex-shrink: 0;
    padding-left: 15%;
    margin: 1% 0 1% 0;
}

.footer-logo-img {
    width: 120px;
    height: 120px;
}

.footer-copy {
    font-size: 1vw;
    font-weight: 400;
    color: #aaa7a7;
}

/* =========================
   LOGIN PAGE
========================= */
.login-box {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #d9d5d5;
    padding: 5%;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
}

.login-card h1 {
    font-size: 28px;
    margin-bottom: 20px;
}

.login-card p {
    margin-bottom: 15px;
    font-size: 16px;
}

.login-card input[type="password"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #bbb;
    font-size: 16px;
}

.login-card button {
    padding: 12px 24px;
    border: none;
    background: #cf8d56;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
}

.login-error {
    color: #b00020;
    margin-bottom: 15px;
}

/* =========================
   TABLET
========================= */
@media (max-width: 992px) {
    .content-area {
        min-height: auto;
    }

    .logo {
        width: 10%;
    }

    nav a {
        font-size: 2.5vw;
    }

    .left h1 {
        font-size: 3vw;
    }

    .symbols {
        font-size: 5vw;
    }

    .text-block p,
    .btn {
        font-size: 2vw;
    }

    .footer-copy {
        font-size: 2vw;
    }

    .left > p {
        font-size: 2vw;
    }
}

/* =========================
   MOBILE
   Obrazek pod menu, tekst pod obrazkiem
========================= */
@media (max-width: 768px) {
    html,
    body {
        height: auto;
        overflow-x: hidden;
        overflow-y: auto;
    }

    body {
        min-height: 100vh;
    }

    .page {
        min-height: 100vh;
        height: auto;
        overflow: visible;
    }

    .content-area {
        height: auto;
        min-height: auto;
        overflow: visible;
    }

    .right-bg {
        display: none;
    }

    header {
        margin-left: 0;
        padding: 3% 2%;
    }

    .header-inner {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .logo {
        width: 20%;
        min-width: 70px;
    }

    .logo img {
        margin: 5%;
    }

    nav {
        margin-left: 0;
        width: 100%;
        justify-content: center;
        gap: 15%;
    }

    nav a {
        font-size: 20px;
        font-weight: 600;
    }

    main {
        flex-direction: column;
        overflow: visible;
        min-height: auto;
    }

    /* Obrazek pod menu */
    .right {
        order: 1;
        width: 100%;
        display: flex;
        justify-content: center;
        min-height: auto;
    }

    .middle-box {
        position: relative;
        left: auto;
        transform: none;

        width: min(75vw, 280px);
        aspect-ratio: 436 / 615;
        height: auto;

        margin: 20px auto 30px auto;

        background-image: url('middle.png');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;

        border: #fff solid 2px;
        z-index: 3;
    }

    /* Tekst pod obrazkiem */
    .left {
        order: 2;
        width: 100%;
        padding: 0 6% 8%;
    }

    .left-content {
        padding-left: 0;
    }

    .left h1 {
        font-size: 22px;
        margin-bottom: 24px;
        text-align: center;
    }

    .left h2 {
        font-size: 16px;
        margin-bottom: 16px;
    }

    .intro {
        display: block;
        width: 100%;
        padding-right: 0;
    }

    .symbols {
        width: 100%;
        margin-bottom: 24px;
        font-size: 42px;
        text-align: center;
    }

    .text-block {
        width: 100%;
        margin-right: 0;
        text-align: justify;
    }

    /* Zachowane formatowanie paragrafów one, two, three, four */
    .text-block p {
        font-size: 15px;
        line-height: 1.45;
        margin-bottom: 24px;
    }

    p#one,
    p#three {
        margin-left: 10%;
    }

    p#two,
    p#four {
        margin-left: -8%;
        line-height: 1.45;
    }

    .btn {
        font-size: 15px;
        margin-left: -8%;
        padding: 10px 18px;
    }

    /* Audio na urządzeniach mobilnych */
    .audio-panels {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        height: auto;
        margin-left: 0;
        margin-right: 0;
        margin-bottom: 15px;
    }

    .leftmp3,
    .rightwav {
        width: 100%;
        height: 250px;
        padding: 10px;
        overflow-y: auto;
    }

    .audio-file-list li {
        margin-bottom: 6px;
        padding: 4px 6px;
    }

    .audio-file-list h2 {
        font-size: 14px;
        font-weight: 700;
        margin-bottom: 10px;
    }

    audio {
        width: 100%;
        height: 30px;
        margin: 0;
    }

    .left > p {
        font-size: 14px;
    }

    p#terms {
        margin: 0 0 20px 0;
    }

    a#author-info {
        margin-bottom: 25px;
    }

    footer {
        flex-direction: column;
        height: auto;
        min-height: auto;
        padding: 15px 2%;
        gap: 5px;
        margin: 0;
    }

    .footer-logo-img {
        width: 80px;
        height: 80px;
    }

    .footer-copy {
        font-size: 12px;
        text-align: center;
    }

    .login-box {
        padding: 3%;
        min-height: 100vh;
    }

    .login-card {
        padding: 25px 20px;
        max-width: 100%;
    }

    .login-card h1 {
        font-size: 22px;
        margin-bottom: 15px;
    }

    .login-card p {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .login-card input[type="password"] {
        padding: 10px;
        margin-bottom: 12px;
        font-size: 16px;
    }

    .login-card button {
        padding: 10px 20px;
        font-size: 14px;
        width: 100%;
    }

    .login-error {
        font-size: 13px;
    }
}

/* =========================
   EXTRA SMALL DEVICES
========================= */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .logo {
        width: 22%;
        min-width: 60px;
    }

    nav {
        gap: 12%;
    }

    nav a {
        font-size: 18px;
    }

    .middle-box {
        width: min(78vw, 240px);
        margin: 18px auto 28px auto;
    }

    .left {
        padding: 0 7% 10%;
    }

    .symbols {
        font-size: 36px;
    }

    .text-block p {
        font-size: 14px;
        line-height: 1.45;
    }

    p#one,
    p#three {
        margin-left: 8%;
    }

    p#two,
    p#four {
        margin-left: -8%;
    }

    .btn {
        font-size: 14px;
        margin-left: -8%;
    }

    .leftmp3,
    .rightwav {
        height: 200px;
    }
}

/* =========================
   LANDSCAPE MODE - MOBILE
========================= */
@media (max-height: 500px) and (orientation: landscape) {
    html,
    body {
        overflow-y: auto;
    }

    header {
        padding: 1% 2%;
    }

    .middle-box {
        width: min(35vw, 180px);
        margin: 10px auto 20px auto;
    }

    .left {
        padding: 1% 5% 4%;
    }

    .audio-panels {
        height: auto;
    }

    .leftmp3,
    .rightwav {
        height: 200px;
        max-height: 250px;
    }

    audio {
        height: 28px;
    }

    footer {
        padding: 1% 2%;
        gap: 10px;
    }

    .footer-logo-img {
        width: 60px;
        height: 60px;
    }

    .footer-copy {
        font-size: 12px;
    }
}