/*
 * ONE FAMILY public sites (lt / lv / ee). Look ported from the legacy onefamily.lv stylesheet,
 * rebuilt mobile-first around the content class contract:
 *   .hero (.hero__title, .hero__card) · .panel · .benefits > .benefit (.benefit__value[--text], .benefit__text, .benefit__icon)
 *   .brand-logos · .store-group (#anchor) > .store-group__logo + .store-list > .store · .terms
 */

:root {
    --purple: #642c8e;
    --purple-text: #662f8d;
    --blue: #0095cd;
    --orange: #ffaa07;
    --red: #ec3546;
    --text: #6b6b6b;
    --heading: #5a5a5a;
    --tile: #f1f2f2;
    --line: #dcdcdc;
    --panel-max: 1100px;
    --gutter: 16px;
    --font: Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #e5097f url(/images/bg.svg) center top / cover no-repeat fixed;
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
}

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

a { color: var(--blue); }

h1 {
    margin: 0 0 .75em;
    color: var(--heading);
    font-size: 24px;
    line-height: 1.2;
    text-transform: uppercase;
}

h2 {
    margin: 1.5em 0 .5em;
    color: var(--heading);
    font-size: 18px;
    text-transform: uppercase;
}

/* ---------- header ---------- */

.header {
    background: #fff url(/images/header-bg.svg) bottom center / auto 10px repeat-x;
    padding-bottom: 10px;
}

.header__inner {
    max-width: 1150px;
    margin: 0 auto;
    padding: 8px var(--gutter);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.logo {
    display: block;
    width: 140px;
    height: 72px;
    background: url(/images/logo.png) left center / contain no-repeat;
}

.menu ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 18px;
    margin: 0;
    padding: 0 0 6px;
    list-style: none;
}

.menu a {
    display: block;
    padding: 2px 0;
    border-bottom: 2px solid transparent;
    font-family: Ubuntu, Arial, sans-serif;
    font-size: 17px;
    text-decoration: none;
    white-space: nowrap;
    --c: var(--purple);
    color: var(--c);
}

.menu li:nth-child(4n+2) a { --c: var(--blue); }
.menu li:nth-child(4n+3) a { --c: var(--orange); }
.menu li:nth-child(4n+4) a { --c: var(--red); }

.menu a:hover,
.menu a:focus-visible,
.menu a.active { border-bottom-color: var(--c); }

/* ---------- content ---------- */

.content {
    flex: 1 0 auto;
    width: 100%;
    max-width: var(--panel-max);
    margin: 0 auto;
    padding: 0 var(--gutter) 20px;
}

.content > .panel:first-child { margin-top: 24px; }

.panel {
    background: #fff;
    padding: 20px var(--gutter);
    overflow-wrap: anywhere;
}

/* ---------- home hero ---------- */

.hero {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 8px;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0 16px;
}

.hero .hero__title {
    margin: 0;
    color: #fff;
    font-size: 26px;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .15);
}

.hero__card { width: 220px; }

/* ---------- benefit tiles ---------- */

.benefits {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.benefit {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: var(--tile);
    color: var(--purple-text);
    text-align: center;
}

.benefit p { margin: 0; }

.benefit__value {
    font-size: 44px;
    font-weight: bold;
    line-height: 1.1;
}

.benefit__value--text { font-size: 28px; }

.benefit__text {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 14px 0;
}

.benefit__icon { width: 30%; max-width: 90px; }

/* ---------- brand logos ---------- */

.brand-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 16px 32px;
    padding: 24px 0 4px;
}

.brand-logos img {
    display: block;
    max-height: 60px;
    width: auto;
}

.panel > h1 + .brand-logos { padding-top: 0; }

/* Kept for search engines and screen readers, not shown (store pages match the legacy look without a title). */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.panel { position: relative; }

/* First visible heading when the page title is hidden (terms pages): no extra gap at the top. */
.panel > h1.visually-hidden + h2 { margin-top: 0; }

/* ---------- stores ---------- */

.store-group {
    padding: 20px 0 0;
    border-top: 1px dotted var(--line);
    margin-top: 20px;
    scroll-margin-top: 12px;
}

.store-group__logo {
    display: block;
    max-height: 120px;
    width: auto;
    margin: 0 auto 12px;
}

/* Single-brand page (no logo row above, e.g. EE): logo on top, dotted line under it — like the legacy site. */
.panel > h1 + .store-group {
    border-top: 0;
    margin-top: 0;
    padding-top: 0;
}

.panel > h1 + .store-group > .store-group__logo { margin-bottom: 20px; }

.panel > h1 + .store-group > .store-list {
    border-top: 1px dotted var(--line);
    padding-top: 20px;
}

.store-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px 24px;
}

.store { font-size: 14px; }

/* ---------- long text ---------- */

.terms p, .terms li { hyphens: auto; }
.terms ol, .terms ul { padding-left: 1.4em; }
.terms li + li { margin-top: .4em; }
.terms__version { font-size: 13px; font-style: italic; }

.panel--not-found { text-align: center; padding-top: 48px; padding-bottom: 48px; }

/* ---------- footer ---------- */

.footer__inner {
    max-width: 1150px;
    margin: 0 auto;
    padding: 0 var(--gutter) 20px;
    color: #fff;
    font-size: 12px;
    text-align: right;
}

.footer__inner a { color: #fff; }

/* ---------- tablet ---------- */

@media (min-width: 768px) {
    :root { --gutter: 20px; }

    .header__inner {
        flex-direction: row;
        justify-content: space-between;
    }

    .logo { width: 177px; height: 90px; }
    .menu ul { justify-content: flex-end; padding: 0; gap: 4px 28px; }
    .menu a { font-size: 19px; }

    .hero {
        flex-direction: row;
        justify-content: space-between;
        padding: 30px 0 10px;
    }

    .hero .hero__title { flex: 0 1 60%; font-size: 32px; text-align: left; }
    .hero__card { width: 40%; max-width: 300px; }

    .terms p, .terms li { text-align: justify; }
    .benefits { grid-template-columns: repeat(3, 1fr); gap: 20px; }
    .benefit__value { font-size: 46px; }
    .store-list { grid-template-columns: repeat(2, 1fr); }
    h1 { font-size: 28px; }
}

/* ---------- desktop ---------- */

@media (min-width: 1024px) {
    body { font-size: 15px; }
    .menu a { font-size: 22px; }
    .hero { padding-top: 40px; }
    .hero .hero__title { font-size: 40px; }
    .hero__card { max-width: 350px; }
    .benefits { gap: 40px; }
    .benefit__value { font-size: 50px; }
    .benefit__value--text { font-size: 30px; }
    .store-list { grid-template-columns: repeat(3, 1fr); }
    h1 { font-size: 30px; }
}

@media (max-width: 767px) {
    body { background-attachment: scroll; }
}
