/**
 * Berco block styles: loaded on the site and in the editor.
 *
 * Contents
 *   1. Text and links
 *   2. Widget titles and sidebar
 *   3. Red button
 *   4. Pattern helpers (grey box, document list, home cards, captions)
 */


/* ------------------------------------------------------------------
 * 1. Text and links
 * ------------------------------------------------------------------ */

.entry-content ul:not([class*="berco-"]):not(.wp-block-social-links),
.editor-styles-wrapper ul.wp-block-list {
    list-style: square;
}

.berco-page {
    line-height: 1.6;
}

.berco-page :where(p, ul) {
    margin-top: 0;
}


/* ------------------------------------------------------------------
 * 2. Widget titles and sidebar
 * ------------------------------------------------------------------ */

.berco-widget__title {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    align-self: flex-start;
    padding-bottom: 4px;
    margin: 0 0 14px;
    font-family: var(--wp--preset--font-family--heading);
    font-size: 20px;
    font-weight: 400;
    line-height: 1.3;
    color: var(--wp--preset--color--contrast);
    border-bottom: 2px solid var(--wp--preset--color--primary);
}

.berco-widget__icon {
    display: inline-flex;
    color: var(--wp--preset--color--primary);
}

.berco-widget__icon svg {
    width: 16px;
    height: 16px;
}

.berco-sidebar {
    display: flex;
    flex-direction: column;
    gap: 34px;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.6;
    color: var(--wp--preset--color--contrast-alt);
}

.berco-sidebar .berco-widget {
    display: flex;
    flex-direction: column;
}

.berco-sidebar p {
    margin: 0;
}

.berco-sidebar a {
    font-weight: 500;
    color: var(--wp--preset--color--primary);
    text-decoration: none;
}

.berco-sidebar a:hover {
    color: var(--wp--preset--color--contrast);
}

.berco-sidebar a.berco-plain-link {
    font-weight: 300;
    color: inherit;
}

.berco-sidebar a.berco-strong-link {
    font-weight: 700;
}

/* Rent links, and any menu or list a widget adds. */
.berco-links,
.berco-sidebar .berco-widget ul {
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
    list-style: none;
}

.berco-links a,
.berco-sidebar .berco-widget ul a {
    display: block;
    padding: 6px 0;
    border-bottom: 1px solid var(--wp--preset--color--border);
}


/* ------------------------------------------------------------------
 * 3. Red button (footer, and the "Red button" style of core/button)
 * ------------------------------------------------------------------ */

a.berco-button {
    display: inline-block;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
    background-color: var(--wp--preset--color--primary);
    border-radius: 3px;
}

a.berco-button:hover {
    color: #fff;
    text-decoration: none;
    background-color: var(--wp--preset--color--primary-hover);
}


/* ------------------------------------------------------------------
 * 4. Pattern helpers
 * ------------------------------------------------------------------ */

/* Bold underlined red links in the "How to Apply" box. */
.berco-big-links a {
    font-size: 17px;
    font-weight: 700;
    text-decoration: underline;
}

/* Document list with PDF icons. */
.berco-docs {
    padding: 0;
    margin: 0;
    list-style: none;
}

.berco-docs li {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 3px 0 3px 24px;
    background: url("../icons/file-pdf.svg") no-repeat left center / 16px 18px;
}

.berco-docs a {
    font-weight: 400;
}

.berco-docs .berco-docs__size {
    font-size: 13px;
}

/* Section heading with a grey rule (Documents "Attachments"). */
.berco-ruled {
    padding-bottom: 6px;
    border-bottom: 1px solid var(--wp--preset--color--border);
}

/* Home cards: image, centered red heading, line of text. */
.berco-card .wp-block-image {
    margin: 0 0 14px;
}

.berco-card h3 a {
    color: var(--wp--preset--color--primary);
    text-decoration: none;
}

.berco-card h3 a:hover {
    color: var(--wp--preset--color--contrast);
}

/* FAQ accordion (core/details). */
.berco-faq.wp-block-details {
    padding: 10px 14px;
    background: var(--wp--preset--color--surface);
    border: 1px solid var(--wp--preset--color--border);
}

.berco-faq.wp-block-details summary {
    font-weight: 500;
    color: var(--wp--preset--color--contrast);
    cursor: pointer;
}

.berco-faq.wp-block-details[open] summary {
    margin-bottom: 10px;
    color: var(--wp--preset--color--primary);
}

.berco-faq.wp-block-details p {
    margin: 0 0 10px;
}

/* Form spot shown until the HC Booking form is chosen. */
.berco-form-spot {
    padding: 24px;
    text-align: center;
    color: var(--wp--preset--color--muted);
    border: 2px dashed var(--wp--preset--color--border);
}

/* Map embed */
.berco-map iframe {
    display: block;
    width: 100%;
    height: 320px;
    border: 0;
}


/* ------------------------------------------------------------------
 * 5. Page layouts (the Berco page patterns)
 * ------------------------------------------------------------------ */

.berco-page.berco-page {
    padding-top: 30px;
    padding-bottom: 60px;
}

.berco-page--home.berco-page--home {
    padding-top: 0;
    padding-bottom: 30px;
}

/* Main column: 15px between blocks, like the old site. */
.berco-main.berco-main > * + * {
    margin-block-start: 15px;
}

.berco-main > h1:first-child {
    margin-bottom: 6px;
}

.berco-main > .berco-subtitle {
    margin-block-start: 24px;
}

.berco-main ul.wp-block-list:not(.berco-docs) {
    padding-left: 40px;
    margin: 0;
}

.berco-main ul.wp-block-list:not(.berco-docs) li + li {
    margin-top: 4px;
}

.berco-small {
    font-size: 14px;
}

.berco-subhead {
    font-weight: 700;
    color: var(--wp--preset--color--contrast);
}

.berco-main .wp-block-image {
    margin-bottom: 0;
}

/* Grey "How to Apply" box. */
.berco-box.berco-box {
    padding: 20px 30px 26px;
    background: var(--wp--preset--color--surface);
}

.berco-box.berco-box > * + * {
    margin-block-start: 12px;
}

.berco-box h4 {
    margin: 0;
    font-size: 20px;
}

.berco-box > .berco-box__second {
    margin-block-start: 24px;
}

.berco-box .berco-big-links {
    padding-left: 40px;
    margin: 0;
}

/* Documents */
h3.berco-ruled {
    font-size: 20px;
}

.berco-main ul.berco-docs li + li {
    margin-top: 6px;
}

/* Investors logos */
.berco-logos.berco-logos {
    gap: 40px;
    margin-block-start: 50px;
}

.berco-logos .wp-block-image {
    margin: 0;
}

/* Sidebar column next to the content. */
.berco-layout.berco-layout {
    align-items: flex-start;
}

.berco-layout > .berco-main {
    min-width: 0;
}

/* Home: Our Mission and the image cards. */
.berco-mission.berco-mission {
    padding: 40px 0 10px;
}

.berco-mission h3 {
    margin: 0 0 18px;
    font-size: 24px;
}

.berco-mission > p + p {
    margin-block-start: 15px;
}

.berco-cards.berco-cards {
    padding: 30px 0 30px;
    text-align: center;
}

.berco-card.berco-card > * + * {
    margin-block-start: 10px;
}

.berco-card .wp-block-image {
    margin: 0;
}

.berco-card .wp-block-image img {
    width: 100%;
    aspect-ratio: 600 / 330;
    object-fit: cover;
}

.berco-card h2 {
    margin-top: 16px;
    font-size: 26px;
}

.berco-card h2 a {
    color: var(--wp--preset--color--contrast);
    text-decoration: none;
}

.berco-card h2 a:hover {
    color: var(--wp--preset--color--primary);
}

/* Home banner slider: caption boxes on the right, bar dots at the bottom. */
.hc-slider.berco-banner {
    max-width: 1100px;
    background: #b5b2b5;
}

.berco-banner .berco-slide.wp-block-cover {
    padding: 0 4.8% 0 0;
}

.berco-banner .berco-slide .wp-block-cover__inner-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
    width: auto;
    max-width: 38%;
    margin-top: 6%;
}

.berco-banner .berco-slide .wp-block-cover__inner-container > * {
    margin: 0;
}

.berco-banner .berco-slide__title {
    padding: 6px 14px;
    font-family: var(--wp--preset--font-family--heading);
    font-size: 28px;
    line-height: 1.2;
    color: #fff;
    background: var(--wp--preset--color--primary);
}

.berco-banner .berco-slide__text {
    padding: 10px 14px;
    font-size: 14px;
    color: #fff;
    text-align: right;
    background: rgba(39, 49, 61, 0.7);
}

.berco-banner .hc-slider__dots {
    top: auto;
    bottom: 8px;
    gap: 6px;
}

.berco-banner .hc-slider__dot {
    width: 14px;
    height: 6px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 0;
    box-shadow: none;
}

.berco-banner .hc-slider__dot[aria-current="true"] {
    background: var(--wp--preset--color--primary);
    box-shadow: none;
}

.berco-banner .hc-slider__arrow {
    display: none;
}

@media (max-width: 781px) {

    .berco-banner .berco-slide .wp-block-cover__inner-container {
        max-width: 70%;
        margin-top: 0;
    }

    .berco-banner .berco-slide__title {
        font-size: 18px;
    }

    .berco-banner .berco-slide__text {
        display: none;
    }
}

.berco-box ul.berco-big-links {
    list-style: square;
}

.berco-main > .wp-block-image:not(.is-resized) img {
    width: 100%;
}
