:root {
    --text-primary: #111928;
    --text-secondary: #4B5563;
    --text-tertiary: #1F2A37;
    --bg-body: #FFFFFF;
    --bg-legal: #F9FAFB;
    --btn-active: #111928;
    --btn-shadow: rgba(0, 0, 0, 0.08);
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* =========================================
                STRONA GŁÓWNA
   ========================================= */

body {
    font-family: var(--font-main), sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    min-width: 1240px;
    overflow-x: auto;
    animation: fadein 1s;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

.container {
    width: 1200px;
    margin: 0 auto;
}

.site-header {
    padding: 16px 0;
}

.header-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.logo-center img {
    height: 68px;
}

.lang-switcher {
    justify-self: end;
    display: flex;
    gap: 8px;
}

.lang-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 34px;
    padding: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-tertiary);
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    background: var(--bg-body);
}

.lang-btn.active {
    background-color: var(--btn-active);
    color: var(--bg-body);
    border-color: var(--btn-active);
}

main {
    flex: 1 0 auto;
    display: block;
}

.hero-capsule {
    width: 1200px;
    height: 400px;
    margin: 0 auto 24px auto;
    background-image: url('../images/hero-bg.svg');
    background-size: cover;
    background-position: center;
    border-radius: 64px;
    display: flex;
    align-items: center;
    padding: 0 162px 0 130px;
    gap: 92px;
    overflow: visible;
}

.hero-phones {
    position: relative;
    flex: 0 0 346px;
    display: flex;
    justify-content: center;
}

.phones-img {
    width: 400px;
    max-width: none;
    height: auto;
    transform: translateY(43px);
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 28px;
    line-height: 1.2;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.hero-description {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 46px;
    line-height: 1.5;
    min-height: 126px;
}

.store-buttons {
    display: flex;
    gap: 16px;
}

.store-link img {
    height: 40px;
    transition: transform 0.2s;
}

.store-link:hover {
    transform: translateY(-3px);
}

.legal-buttons {
    width: 1200px;
    display: flex;
    justify-content: flex-start;
    padding-left: 623px;
    gap: 28px;
    position: relative;
    margin: 0 auto 60px;
}

.btn-white {
    display: flex;
    justify-content: center;
    font-size: 12px;
    background: var(--bg-body);
    width: 165px;
    padding: 8px 12px;
    border-radius: 12px;
    font-weight: 500;
    color: var(--text-tertiary);
    border: 1px solid #E5E7EB;
    transition: all 0.2s;
}

.btn-white:hover {
    transform: translateY(-1px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.12);
}

.site-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 32px 0 16px;
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: auto;

    .elcaro-logo {
        margin-top: 10px;
        height: 27px;
    }

    .contact-info {
        margin-top: 32px;
    }

    .contact-info a {
        color: #1A56DB;
        text-decoration: underline;
    }

    .contact-info a:hover {
        color: #004499;
    }

    .socials {
        display: flex;
        margin-top: 16px;

        .join-us {
            max-width: 60px;
            margin-right: 16px;
        }
    }

    .social-icons {
        display: flex;
        align-items: center;
        gap: 8px;

        li {
            list-style-type: none;

            img {
                max-width: 24px;
            }
        }
    }

    .footer-legal {
        text-align: center;
        margin-top: 16px;
        padding: 0 15px;
    }

    .footer-legal small {
        display: block;
        font-size: 12px;
        line-height: 1.5;
        color: var(--text-secondary);
    }
}

@media (max-width: 1240px) {
    body {
        min-width: 100%;
        overflow-x: hidden;
    }

    .container {
        width: 100%;
        max-width: 964px;
        padding: 0 24px;
    }

    main {
        margin-bottom: 0;
    }

    .hero-capsule {
        width: calc(100% - 48px);
        max-width: 964px;
        padding: 0 52px 0 52px;
        gap: 52px;
        margin-left: auto;
        margin-right: auto;
    }

    .legal-buttons {
        width: calc(100% - 48px);
        max-width: 964px;
        padding-left: 504px;
    }
}

@media (max-width: 1000px) {
    .hero-capsule {
        padding: 0 20px 0 20px;
        gap: 5px;
    }

    .legal-buttons {
        padding-left: 455px;
    }
}

@media (max-width: 888px) {
    .container {
        width: 100%;
        padding: 0 24px;
    }

    main {
        padding-top: 28px;
        padding-bottom: 60px;
    }

    .hero-capsule {
        width: 100%;
        height: auto;
        background: none;
        border-radius: 0;
        padding: 0 24px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 40px;
        margin: 0 0 40px 0;
    }

    .hero-phones {
        width: 100%;
        max-width: 752px;
        height: 312px;
        background-image: url('../images/hero-bg.svg');
        background-size: cover;
        background-position: center;
        border-radius: 50px;
        flex: 0 0 auto;
        display: flex;
        justify-content: center;
        align-items: center;
        overflow: visible;
        position: relative;
    }

    .phones-img {
        width: 330px;
        height: auto;
        margin-top: 0;
        transform: translate(10px, 43px);
    }

    .hero-text {
        width: 100%;
        max-width: 600px;
        text-align: start;
        margin-top: 60px;
        padding: 0;
    }

    .hero-description {
        margin-left: 0;
        margin-right: 0;
        margin-bottom: 32px;
    }

    .store-buttons {
        justify-content: start;
        margin-top: 32px;
    }

    .legal-buttons {
        width: calc(100% - 48px);
        max-width: 600px;
        margin: 0 auto 60px auto;
        padding-left: 0;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 16px;
    }

    .btn-white {
        width: auto;
        min-width: 140px;
    }
}

@media (max-width: 390px) {
    .container {
        width: 100%;
        padding: 0 16px;
    }

    .site-header {
        padding: 16px 0;
    }

    .header-grid {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .header-spacer {
        display: none;
    }

    main {
        padding-top: 36px;
        padding-bottom: 0;
    }

    .hero-capsule {
        width: 100%;
        height: auto;
        background: none;
        border-radius: 0;
        padding-left: 14px;
        padding-right: 14px;
        margin: 0 0 46px 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 32px;
    }

    .hero-phones {
        width: 340px;
        height: 312px;
        background-image: url('../images/hero-bg.svg');
    }

    .phones-img {
        width: 330px;
        height: auto;
        margin-top: 0;
        transform: translate(10px, 43px);
    }

    .hero-text {
        margin-top: 65px;
        width: 100%;
        max-width: 340px;
    }

    .hero-text h1 {
        font-size: 1.8rem;
    }

    .store-link img {
        height: 44px;
    }

    .legal-buttons {
        width: 100%;
        flex-direction: column;
        align-items: center;
        padding-left: 16px;
        padding-right: 16px;
    }

    .btn-white {
        width: 100%;
    }

    .site-footer {
        padding: 0 0 32px;
    }
}

@keyframes fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* =========================================
   STRONY PRAWNE (Regulamin / Polityka)
   ========================================= */

.legal-container {
    padding: 31px 16px;
}

.legal-body {
    background-color: var(--bg-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.legal-card {
    margin: auto;
    background-color: var(--bg-legal);
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 64px;
    padding: 48px;
    box-sizing: border-box;
}

.legal-logo {
    display: block;
    margin-bottom: 40px;
}

.legal-logo img {
    height: 90px;
}

.legal-card h1 {
    color: var(--text-primary);
    font-size: 28px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 16px;
    hyphens: auto;
    word-wrap: break-word;
}

.legal-text {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}

.legal-text p {
    margin-bottom: 16px;
}

.legal-text h3,
.legal-text strong {
    color: var(--text-primary);
    font-weight: 700;
    display: block;
    margin-top: 24px;
    margin-bottom: 8px;
}

.legal-text ol {
    padding-left: 26px;
    margin-bottom: 16px;
    margin-top: 8px;
}

.legal-text .legal-list {
    list-style-type: decimal;
}

.legal-text .legal-sublist-alpha {
    list-style-type: lower-alpha;
    margin-top: 8px;
    margin-bottom: 8px;
}

.legal-text .legal-sublist-roman {
    list-style-type: lower-roman;
    margin-top: 4px;
    margin-bottom: 4px;
}

.legal-text li {
    margin-bottom: 8px;
    padding-left: 4px;
}

.legal-text a:hover {
    text-decoration: underline;
}

.legal-text a {
    word-break: break-all;
}
