/* ~~~~~~~~~~ Mobilka home blocks (inc/mobilka-home-blocks.php) ~~~~~~~~~~ */
/* Sections sit on the site's blue background: white headings, white cards. */

.mobilka-section {
    padding: 2rem 0;
}

@media (min-width: 992px) {
    .mobilka-section {
        padding: 3rem 0;
    }
}

.mobilka-section__title {
    margin: 0 0 1.25rem !important; /* theme h2 margins */
    color: #fff;
    font-size: 1.625rem;
    font-weight: 900;
    line-height: 1.2;
    text-align: center;
}

@media (min-width: 992px) {
    .mobilka-section__title {
        margin-bottom: 2rem !important;
        font-size: 2.25rem;
    }
}

.mobilka-section__lead {
    max-width: 40rem;
    margin: -.5rem auto 1.5rem !important;
    color: #fff;
    font-size: 1rem;
    text-align: center;
}

.mobilka-section__more {
    margin: 1.25rem 0 0;
    text-align: center;
}

.mobilka-section__more a {
    color: #fff;
    font-weight: 700;
    text-decoration: underline;
}

.mobilka-section__more a:hover {
    color: #fff;
    text-decoration: none;
}

.mobilka-section__empty {
    padding: 1rem;
    background: #fff;
    text-align: center;
}

.mobilka-cta__button--secondary {
    background-color: #fff;
    border: 2px solid #1a1a1a;
    color: #1a1a1a;
    box-shadow: none;
}

.mobilka-cta__button--secondary:hover,
.mobilka-cta__button--secondary:focus {
    background-color: #f2f2f2;
    color: #1a1a1a;
}

/* Dark filled: stands out from the blue page and does not compete with the red "Buy SIM" */
.mobilka-cta__button--accent {
    background-color: #1a1a1a;
}

.mobilka-cta__button--accent:hover,
.mobilka-cta__button--accent:focus {
    background-color: #3a3a3a;
}


/* ~~~~~~~~~~ Section header with an image (template-parts/components/section-header.php) ~~~~~~~~~~ */

.mobilka-section__header--with-image {
    margin-bottom: 1.25rem;
}

.mobilka-section__header--with-image .mobilka-section__lead {
    margin-bottom: 0 !important;
}

@media (min-width: 768px) {
    .mobilka-section__header--with-image .mobilka-section__lead {
        max-width: none;
        margin: 0 !important;
    }
}

.mobilka-section__header-image {
    margin-top: 1rem;
    overflow: hidden;
    border-radius: .75rem;
    box-shadow: 0 3px 6px rgba(0, 0, 0, .16);
}

.mobilka-section__img {
    display: block;
    width: 100%;
    height: 9rem;
    object-fit: cover;
}

@media (min-width: 768px) {
    .mobilka-section__header--with-image {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 26rem);
        gap: 2rem;
        align-items: center;
        margin-bottom: 2rem;
    }

    .mobilka-section__header--with-image .mobilka-section__title,
    .mobilka-section__header--with-image .mobilka-section__lead {
        margin-left: 0;
        text-align: left;
    }

    .mobilka-section__header--with-image .mobilka-section__title {
        margin-bottom: .75rem !important;
    }

    .mobilka-section__header-image {
        margin-top: 0;
    }

    .mobilka-section__img {
        height: auto;
        aspect-ratio: 3 / 2;
    }
}


/* ~~~~~~~~~~ Hero ~~~~~~~~~~ */
/* Mobile: centered - title, SIM image, benefits 2x2, price card. Desktop: text left, image right. */

.mobilka-hero {
    padding: 1.5rem 0 1rem;
    color: #fff;
}

.mobilka-hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    align-items: center;
}

.mobilka-hero__content {
    display: contents;
}

.mobilka-hero__title {
    order: 1;
    margin: 0;
    color: #fff;
    font-size: 1.875rem;
    font-weight: 900;
    line-height: 1.15;
    text-align: center;
}

.mobilka-hero__lead {
    order: 2;
    margin: 0;
    font-size: 1.0625rem;
    line-height: 1.45;
    text-align: center;
}

.mobilka-hero__image {
    order: 3;
    width: 100%;
    max-width: 18rem;
    margin: 0 auto;
}

.mobilka-hero__bullets {
    order: 4;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mobilka-hero__bullets li {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-width: 0;
    padding: .5rem .75rem;
    border-radius: .75rem;
    background: rgba(255, 255, 255, .18);
    font-size: .875rem;
    font-weight: 700;
    line-height: 1.2;
}

.mobilka-hero__bullets .mobilka-icon {
    flex: none;
    width: 1.25rem;
    height: 1.25rem;
}

/* Price + buttons on a white card, so the red price and buttons stay readable on blue */
.mobilka-cta.mobilka-hero__cta {
    order: 5;
    margin: 0;
    padding: 1rem;
    border-radius: .75rem;
    background: #fff;
    color: #1a1a1a;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .15);
}

.mobilka-hero__cta .mobilka-cta__price {
    justify-content: center;
}

.mobilka-hero__cta .mobilka-cta__price-note {
    padding-left: .75rem;
    border-left: 1px solid #ddd;
}

/* Mobile: buttons one under the other, full width; from 768px: side by side */
.mobilka-hero__cta .mobilka-cta__buttons {
    flex-direction: column;
    gap: .625rem;
}

.mobilka-hero__cta .mobilka-cta__button {
    flex: none;
    width: 100%;
}

/* From 768px: two equal columns when both labels fit, otherwise one under the other (also equal) */
@media (min-width: 768px) {
    .mobilka-hero__cta .mobilka-cta__buttons {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    }

    .mobilka-hero__cta .mobilka-cta__button {
        white-space: nowrap;
    }
}

.mobilka-hero__img {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, .25));
}

@media (min-width: 768px) {
    .mobilka-hero {
        padding: 3rem 0;
    }

    .mobilka-hero__inner {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
        column-gap: 3rem;
    }

    .mobilka-hero__content {
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
    }

    .mobilka-hero__title,
    .mobilka-hero__lead {
        text-align: left;
    }

    /* 400px = native size of the SIM image (sim-card-simka.png, 400x259): larger would be blurry */
    .mobilka-hero__image {
        max-width: 25rem;
        margin: 0 auto;
    }

    .mobilka-hero__bullets {
        max-width: 30rem;
    }

    .mobilka-hero__cta .mobilka-cta__price {
        justify-content: flex-start;
    }
}

@media (min-width: 992px) {
    .mobilka-hero__title {
        font-size: 3rem;
    }

    .mobilka-cta.mobilka-hero__cta {
        max-width: 34rem;
    }
}


/* ~~~~~~~~~~ What do you need? ~~~~~~~~~~ */

.mobilka-paths__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .mobilka-paths__grid {
        grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
        gap: 1.5rem;
    }
}

.mobilka-paths__card {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    border-radius: .75rem;
    background: #fff;
    box-shadow: 0 3px 6px rgba(0, 0, 0, .16);
}

.mobilka-paths__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: #eef9fe;
    color: #0a7fa6;
}

.mobilka-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.mobilka-paths__title {
    margin: .75rem 0 0;
    font-size: 1.25rem;
    font-weight: 900;
}

.mobilka-paths__text {
    margin: .375rem 0 0;
    color: #444;
    font-size: .9375rem;
    line-height: 1.45;
}

.mobilka-paths__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-top: auto;
    padding-top: 1rem;
}

.mobilka-paths__price {
    font-size: 1.375rem;
    font-weight: 900;
}

.mobilka-paths__footer .mobilka-cta__button {
    flex: 0 1 auto;
    margin-left: auto; /* right-aligned also when there is no price */
    min-height: 2.75rem;
    padding: .5rem 1.25rem;
    font-size: 1rem;
}


/* ~~~~~~~~~~ Tariffs ~~~~~~~~~~ */
/* Cards in the style of the Calling Cards showcase: 2 per row on mobile, up to 4 on desktop */

.mobilka-tariffs__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

@media (min-width: 992px) {
    .mobilka-tariffs__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1.5rem;
    }
}

.mobilka-tariffs__card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: .875rem;
    border-radius: .75rem;
    background: #fff;
    box-shadow: 0 3px 6px rgba(0, 0, 0, .16);
}

@media (min-width: 576px) {
    .mobilka-tariffs__card {
        padding: 1.25rem;
    }
}

.mobilka-tariffs__title {
    margin: 0 !important;
    font-size: 1.125rem;
    font-weight: 900;
    line-height: 1.2;
}

.mobilka-tariffs__price {
    display: flex;
    flex-direction: column;
    margin: .375rem 0 0;
    padding-bottom: .625rem;
    border-bottom: 1px solid #e6e6e6;
}

.mobilka-tariffs__amount {
    color: #d20e0e;
    font-size: 1.75rem;
    font-weight: 900;
    line-height: 1.05;
}

.mobilka-tariffs__decimal {
    font-size: .64em; /* same ratio as .mobilka-price__decimals */
}

.mobilka-tariffs__period {
    margin-top: .125rem;
    color: #666;
    font-size: .8125rem;
}

.mobilka-tariffs__options {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin: .75rem 0 1rem;
    padding: 0;
    list-style: none;
    font-size: .8125rem;
    line-height: 1.35;
}

@media (min-width: 576px) {
    .mobilka-tariffs__options {
        font-size: .9375rem;
    }
}

.mobilka-tariffs__options li {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    min-width: 0;
    overflow-wrap: anywhere;
}

.mobilka-tariffs__option-icon {
    flex: none;
    color: #1a8fd6;
}

.mobilka-tariffs__option-icon .mobilka-icon {
    width: 1.125rem;
    height: 1.125rem;
}

.mobilka-tariffs__card .mobilka-tariffs__order {
    flex: none; /* .mobilka-cta__button has flex-basis 10rem: in a column it would be its height */
    width: 100%;
    margin-top: auto;
    min-height: 2.75rem;
    padding: .5rem;
    border: 0;
    font-size: 1rem;
    cursor: pointer;
}

/* ~~~~~~~~~~ Steps ~~~~~~~~~~ */

.mobilka-steps__list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: mobilka-step;
}

@media (min-width: 768px) {
    .mobilka-steps__list {
        grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
        gap: 1.5rem;
    }
}

.mobilka-steps__item {
    position: relative;
    padding: 1.25rem 1.25rem 1.25rem 4.25rem;
    border-radius: .75rem;
    background: #fff;
    box-shadow: 0 3px 6px rgba(0, 0, 0, .16);
    counter-increment: mobilka-step;
}

.mobilka-steps__item::before {
    content: counter(mobilka-step);
    position: absolute;
    left: 1.25rem;
    top: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: #d20e0e;
    color: #fff;
    font-weight: 900;
}

.mobilka-steps__title {
    margin: .25rem 0 0;
    font-size: 1.125rem;
    font-weight: 900;
}

.mobilka-steps__text {
    margin: .375rem 0 0;
    color: #444;
    font-size: .9375rem;
    line-height: 1.45;
}


/* ~~~~~~~~~~ Products showcase ~~~~~~~~~~ */

.mobilka-showcase__grid {
    padding: 0 !important;
}

@media (min-width: 992px) {
    .mobilka-showcase__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.mobilka-showcase .mobilka-product {
    border: 0;
    border-radius: .75rem;
    box-shadow: 0 3px 6px rgba(0, 0, 0, .16);
}

/* The showcase never has a single product: no horizontal card */
.mobilka-showcase .mobilka-products > .mobilka-product:only-of-type {
    flex-direction: column;
    text-align: center;
}


/* ~~~~~~~~~~ Trust ~~~~~~~~~~ */

.mobilka-trust__box {
    padding: 1.5rem;
    border-radius: .75rem;
    background: #fff;
    box-shadow: 0 3px 6px rgba(0, 0, 0, .16);
}

.mobilka-trust__heading {
    margin: 0 0 1.25rem !important;
    font-size: 1.5rem;
    font-weight: 900;
}

.mobilka-trust__list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .75rem 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 768px) {
    .mobilka-trust__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.mobilka-trust__item {
    position: relative;
    display: flex;
    flex-direction: column;
    padding-left: 1.75rem;
    font-size: .9375rem;
    line-height: 1.4;
}

.mobilka-trust__item::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: #d20e0e;
    font-weight: 900;
}

.mobilka-trust__item span {
    color: #555;
}

.mobilka-trust__payments {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e6e6e6;
}

.mobilka-trust__payments-title {
    font-weight: 700;
}

.mobilka-trust__logo {
    width: auto;
    max-height: 2.25rem;
}


/* ~~~~~~~~~~ Final CTA ~~~~~~~~~~ */

.mobilka-cta-block .mobilka-sim-strip {
    margin: 0;
}


/* ~~~~~~~~~~ Long SEO text, collapsed: add the CSS class "mobilka-collapsible" to a block ~~~~~~~~~~ */

.mobilka-collapsible.is-collapsed {
    position: relative;
    max-height: 14rem;
    overflow: hidden;
}

.mobilka-collapsible.is-collapsed::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3; /* the block's content has z-index 2 */
    height: 6rem;
    background: linear-gradient(rgba(255, 255, 255, 0), #fff);
    pointer-events: none;
}

.mobilka-collapsible-toggle {
    display: block;
    margin: .75rem auto 0;
    padding: .5rem 1.25rem;
    border: 2px solid #fff;
    border-radius: 999px;
    background: transparent;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}


/* ~~~~~~~~~~ Block editor: the site's blue page background, so white headings stay visible ~~~~~~~~~~ */

.editor-styles-wrapper .mobilka-hero,
.editor-styles-wrapper .mobilka-section {
    background-color: #00a1d6;
}
