/* ------------------------ Fix margin if admin bar is showing ------------------------ */
body.admin-bar:not(.wp-admin) header,
body.admin-bar:not(.wp-admin) .menu {
    margin-top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar:not(.wp-admin) header,
    body.admin-bar:not(.wp-admin) .menu {
        margin-top: 46px;
    }
}

/* ------------------------ Selecting the active menu item ------------------------ */


/* Active states for Header Menu */
.nav-menu__link--active {
    font-weight: 700;
    text-decoration: underline;
}

/* Disabled states for Header Menu */
.nav-menu__link--disabled {
    opacity: 0.6;
    cursor: default;
}

/* Active states for Burger Menu */
.menu__main-link--active {
    font-weight: 500;
    border-bottom: 2px solid #003501;
}

/* Active states for Footer Menu */
.footer__menu-link--active {
    font-weight: 700;
    text-decoration: underline;
}

/* Active states for Footer Documents Menu */
.footer__info-menu-link--active {
    font-weight: 700;
    text-decoration: underline;
}

/* Styles for disabled footer elements */
.footer__menu-link--disabled {
    opacity: 0.6;
    cursor: default;
}

/* ------------------------ Page Content Styles ------------------------ */
.page-header {
    margin-bottom: 3rem;
}

.page-header__title {
    margin-bottom: 1rem;
    margin-top: 5rem;
}

.page-header__excerpt {
    max-width: 800px;
    margin: 0 auto;
}

.page-content {
    max-width: 1000px;
    margin: 0 auto;
}

/* Gutenberg Block Styles */
.page-content .wp-block-heading {
    margin-top: 3.5rem;
    margin-bottom: 2rem;
}

.page-content .wp-block-heading:first-child {
    margin-top: 0;
}

.page-content .wp-block-paragraph {
    margin-bottom: 2rem;
    line-height: 1.7;
}

.page-content .wp-block-paragraph + .wp-block-paragraph {
    margin-top: 1.5rem;
}

.page-content .wp-block-image {
    margin: 3rem 0;
}

.page-content .wp-block-image img {
    border-radius: 8px;
    max-width: 100%;
    height: auto;
}

.page-content .wp-block-quote {
    border-left: 4px solid var(--color-primary, #007bff);
    padding-left: 2rem;
    margin: 3rem 0;
    font-style: italic;
}

.page-content .wp-block-list {
    margin: 2rem 0;
    padding-left: 1.5rem;
}

.page-content .wp-block-list li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.page-content .wp-block-list ul,
.page-content .wp-block-list ol {
    margin-top: 1rem;
}

.page-content .wp-block-separator {
    margin: 4rem auto;
    border: none;
    height: 1px;
    background-color: #ddd;
    max-width: 200px;
}

.page-content .wp-block-spacer {
    clear: both;
}

/* Columns */
.page-content .wp-block-columns {
    margin: 3rem 0;
}

.page-content .wp-block-column {
    padding: 0 1.5rem;
}

/* Buttons */
.page-content .wp-block-button {
    margin: 2rem 0;
}

.page-content .wp-block-button .wp-block-button__link {
    background-color: var(--color-primary, #007bff);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 4px;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.page-content .wp-block-button .wp-block-button__link:hover {
    background-color: var(--color-primary-dark, #0056b3);
}

.page-content .wp-block-button.is-style-outline .wp-block-button__link {
    background-color: transparent;
    border: 2px solid var(--color-primary, #007bff);
    color: var(--color-primary, #007bff);
}

.page-content .wp-block-button.is-style-outline .wp-block-button__link:hover {
    background-color: var(--color-primary, #007bff);
    color: white;
}

/* Tables */
.page-content .wp-block-table {
    margin: 3rem 0;
    overflow-x: auto;
}

.page-content .wp-block-table table {
    width: 100%;
    border-collapse: collapse;
}

.page-content .wp-block-table th,
.page-content .wp-block-table td {
    padding: 16px;
    border: 1px solid #ddd;
    text-align: left;
    line-height: 1.5;
}

.page-content .wp-block-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Gallery */
.page-content .wp-block-gallery {
    margin: 3rem 0;
}

.page-content .wp-block-gallery .blocks-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.page-content .wp-block-gallery .blocks-gallery-item img {
    border-radius: 8px;
    width: 100%;
    height: auto;
}

/* Cover Block */
.page-content .wp-block-cover {
    margin: 3rem 0;
    border-radius: 8px;
    overflow: hidden;
}

/* Video */
.page-content .wp-block-video {
    margin: 3rem 0;
}

.page-content .wp-block-video video {
    border-radius: 8px;
    width: 100%;
    height: auto;
}

/* Embed */
.page-content .wp-block-embed {
    margin: 3rem 0;
}

.page-content .wp-block-embed iframe {
    border-radius: 8px;
    width: 100%;
}

/* Custom spacing for text-heavy content */
.page-content > *:not(:last-child) {
    margin-bottom: 1.5rem;
}

.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4,
.page-content h5,
.page-content h6 {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.page-content h1:first-child,
.page-content h2:first-child,
.page-content h3:first-child,
.page-content h4:first-child,
.page-content h5:first-child,
.page-content h6:first-child {
    margin-top: 0;
}

/* Page Links (pagination) */
.page-links {
    margin: 2rem 0;
    text-align: center;
}

.page-links a,
.page-links > span {
    display: inline-block;
    margin: 0 0.25rem;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: var(--color-text, #333);
}

.page-links a:hover {
    background-color: var(--color-primary, #007bff);
    color: white;
    border-color: var(--color-primary, #007bff);
}

.page-links .current {
    background-color: var(--color-primary, #007bff);
    color: white;
    border-color: var(--color-primary, #007bff);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .page-header {
        margin-bottom: 2rem;
    }

    .page-content .wp-block-columns {
        flex-direction: column;
    }

    .page-content .wp-block-column {
        padding: 0;
        margin-bottom: 1rem;
    }

    .page-content .wp-block-table {
        font-size: 14px;
    }

    .page-content .wp-block-gallery .blocks-gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.5rem;
    }
}

.only-on-desktop {
    @media (max-width: 768px) {
        display: none;
    }
}

.only-on-mobile {
    @media (min-width: 768px) {
        display: none;
    }
}

/** Payment methods */
.footer__payment-methods {
    margin-left: 65px;
}

@media (max-width: 1200px) {
    .footer__payment-methods {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .footer__payment-methods_mobile {
        margin-top: 40px;
    }

    .footer__payment-methods_mobile span {
        line-height: 130%;
        font-size: 16px;
    }
}

/** Complianz banner customizations */
@media (min-width: 768px) {
    .cmplz-cookiebanner-container {
        font-family: Manrope, sans-serif !important;
    }

    .cmplz-title {
        font-family: Forum, sans-serif;
        font-size: 24px !important;
        font-style: normal !important;
        font-weight: 400 !important;
        line-height: 125% !important;
        letter-spacing: -0.24px !important;
    }

    .cmplz-body {
        margin-top: -10px !important;
    }

    .cmplz-header {
        grid-template-columns: 1fr 100px 100px !important;
    }

    .cmplz-title {
        grid-column: 1 !important;
        justify-self: flex-start !important;
    }

    .cmplz-links.cmplz-documents {
        justify-content: flex-start !important;
        margin-top: 5px !important;
        margin-bottom: 10px !important;
    }

    .cmplz-buttons {
        margin-top: -10px !important;
    }
}

@media (max-width: 425px) {
    .cmplz-title {
        display: block !important;
    }

    .cmplz-header {
        grid-template-columns: 5px 1fr 50px !important;
    }
}

.cmplz-close {
    position: relative !important;
    width: 36px !important;
    height: 36px !important;
}

.cmplz-close svg {
    display: none !important;
}

.cmplz-close::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36" fill="none"><path d="M26.7757 12.3078L19.0833 20.0001L26.7757 27.6925C27.0748 27.9918 27.0748 28.4766 26.7757 28.7757C26.6261 28.9253 26.4301 29 26.234 29C26.0379 29 25.842 28.9251 25.6923 28.7757L18.0001 21.0834L10.3077 28.7757C10.1582 28.9253 9.9621 29 9.76602 29C9.56994 29 9.37406 28.9251 9.22432 28.7757C8.92523 28.4764 8.92523 27.9916 9.22432 27.6925L16.9169 20.0001L9.22451 12.3078C8.92542 12.0085 8.92542 11.5237 9.22451 11.2246C9.5238 10.9255 10.0086 10.9255 10.3077 11.2246L18.0001 18.9169L25.6925 11.2246C25.9918 10.9255 26.4766 10.9255 26.7757 11.2246C27.0748 11.5237 27.0748 12.0087 26.7757 12.3078Z" fill="%23003501"/></svg>') !important;
    background-size: cover !important;
}
