/* ============================================================
   RESET & GLOBAL
============================================================ */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: "Quicksand", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    background: #fff3ef;
    color: #2c1c1b;
}

/* ============================================================
   MENU GÓRNE
============================================================ */
.menu {
    width: 100%;
    background-color: #8f6b6b;
    position: sticky;
    top: 0;
    z-index: 5000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.menu-inner {
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    padding: 1.2rem 3vw;

    display: flex;
    justify-content: space-between;
    align-items: center;

    position: relative;
}

.menu-logo {
    height: clamp(2rem, 5vh, 3.2rem);
    width: auto;
    display: block;
}

.menu-left,
.menu-right {
    display: flex;
    align-items: center;
    gap: 1.6rem;
}

.menu-link {
    font-size: clamp(1.2rem, 1.4vw, 1.5rem);
    font-weight: 400;
    text-decoration: none;
    color: #ffffff;
    opacity: 0.95;
    transition: opacity .2s ease;
}

.menu-link:hover,
.menu-link:focus {
    opacity: 1;
}

.menu-buy {
    font-weight: 900;
}

/* HAMBURGER ICON */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: .33rem;

    background: none;
    border: none;
    cursor: pointer;
    appearance: none;

    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);

    padding: .5rem;
    z-index: 9001;
}

.menu-toggle:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.burger-line {
    width: 2rem;
    height: .22rem;
    background: #ffffff;
    border-radius: 1rem;
    transition: all .3s ease;
}

.menu-toggle[aria-expanded="true"] .burger-line:nth-child(1) {
    transform: translateY(.55rem) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .burger-line:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .burger-line:nth-child(3) {
    transform: translateY(-.55rem) rotate(-45deg);
}

/* ============================================================
   MOBILE MENU (FULLSCREEN)
============================================================ */
.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;

    background: #8f6b6b;
    backdrop-filter: blur(2px);

    padding-top: 14vh;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3vh;

    z-index: 9000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-logo {
    width: clamp(3rem, 12vw, 5rem);
    margin-bottom: 2vh;
}

.mobile-menu-item {
    font-size: clamp(1.4rem, 6vw, 2.5rem);
    color: #ffffff;
    text-decoration: none;
    transition: color .2s ease;
}

.mobile-menu-item:hover {
    color: rgba(255,255,255,0.8);
}

.mobile-buy {
    font-weight: 900;
}

.mobile-menu-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;

    background: none;
    border: none;
    color: #ffffff;
    font-size: 2.4rem;

    cursor: pointer;
    z-index: 9100;
    transition: opacity .2s ease;
}

.mobile-menu-close:hover,
.mobile-menu-close:focus {
    opacity: 0.8;
}

/* ============================================================
   MENU – BREAKPOINTY (hamburger od 1050px)
============================================================ */
@media (max-width: 1050px) {
    .menu-right {
        display: none;
    }

    .menu-link {
        display: none; /* ukrywa „Wróć na półkę” w desktopowej wersji */
    }

    .menu-toggle {
        display: flex;
    }
}

@media (max-width: 600px) {
    .menu-inner {
        padding: 1rem 2.5vw;
    }

    .menu-toggle {
        right: 1.5rem;
    }
}

/* ============================================================
   GŁÓWNY WRAPPER POLITYKI
============================================================ */
.regulamin-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(40px, 6vw, 80px) 5vw;
    display: flex;
    gap: 40px;
}

/* SPIS TREŚCI */
.toc {
    position: sticky;
    top: 120px;
    flex: 0 0 260px;
    align-self: flex-start;
    background: #f0dfc8;
    padding: 20px;
    border-radius: 16px;
    height: fit-content;
    box-shadow: 0 6px 18px rgba(0,0,0,0.05);
}

.toc h3 {
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 10px;
}

.toc a {
    display: block;
    font-size: 15px;
    color: #2c1c1b;
    text-decoration: none;
    margin: 6px 0;
}

.toc a:hover {
    text-decoration: underline;
}

/* TREŚĆ DOKUMENTU */
.regulamin-content {
    flex: 1;
    background: #ffffff;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.04);
}

.regulamin-content h2 {
    font-size: clamp(24px, 3vw, 32px);
    margin-top: 6px;
    margin-bottom: 14px;
    font-weight: 900;
    color: #cc6d29;
}

.regulamin-content p,
.regulamin-content li {
    font-size: 16px;
    margin-bottom: 12px;
    color: #2c1c1b;
}

.regulamin-content ul {
    padding-left: 20px;
    margin-bottom: 14px;
}

/* LINK DO FORMULARZA (jeśli użyjesz) */
.download-form-link {
    display: inline-block;
    padding: 12px 22px;
    background: #8f6b6b;
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
    transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
}

.download-form-link:hover {
    background: #a38080;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

/* ============================================================
   STOPKA
============================================================ */
.footer {
    width: 100%;
    background: #8f6b6b;
    padding: 30px 0;
    text-align: center;
    margin-top: 40px;
}

.footer-copy {
    color: #ffffff;
    font-size: 16px;
    margin-bottom: 10px;
}

.footer-icons img {
    width: 34px;
    margin: 0 8px;
}

/* ============================================================
   RESPONSYWNOŚĆ – LAYOUT POLITYKI
============================================================ */
@media (max-width: 960px) {
    .regulamin-wrapper {
        gap: 28px;
    }
}

@media (max-width: 800px) {
    .regulamin-wrapper {
        flex-direction: column;
    }

    .toc {
        position: static;
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .regulamin-wrapper {
        padding: 30px 4vw;
    }

    .regulamin-content {
        padding: 24px;
    }

    .footer {
        padding: 24px 0;
        margin-top: 30px;
    }

    .footer-copy {
        font-size: 14px;
    }
}

@media (max-width: 400px) {
    .regulamin-content {
        padding: 20px 16px;
    }
}

/* ============================================================
   REDUCED MOTION (ACCESSIBILITY)
============================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .toc {
        scroll-behavior: auto;
    }
}
