.lm-section {
    position: relative;
    overflow: hidden;
    color: var(--color-navy);
}

/* Section backgrounds */
.lm-section.bg-white { background: var(--color-white); }
.lm-section.bg-cyan  { background: var(--color-cyan); }
.lm-section.bg-azure { background: var(--color-azure); }
.lm-section.bg-pink  { background: var(--color-pink); }

/* Header */
.lm-section .lm-header { max-width: 45rem; margin-bottom: 3.5rem; }
.lm-section.header-center .lm-header { margin-left: auto; margin-right: auto; text-align: center; }
.lm-section.header-left .lm-header   { margin-left: 0; text-align: left; }
.lm-section .lm-title { color: var(--color-navy); margin-bottom: 1.25rem; }
.lm-section .lm-header .content,
.lm-section .lm-header .content * { color: var(--color-navy); }
.lm-section .lm-header .content > *:last-child { margin-bottom: 0; }

/* Logo list (grid by default: 2 columns on mobile) */
.lm-section .lm-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.lm-section .lm-item { min-width: 0; margin: 0 0.5rem !important; }
.lm-section.display-slider .lm-list { display: flex; gap: 0; }
.lm-section .splide { visibility: visible; }

.lm-section .splide__pagination {
    padding-top: 20px !important;
}

/* Logo card */
.lm-section .lm-card {
    --lm-card-bg: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 1.25rem;
    border: 0;
    border-radius: var(--border-radius, 8px);
    background: var(--lm-card-bg);
    box-shadow: inset 0 0 0 2px var(--color-azure);
    font: inherit;
    color: inherit;
    transition: box-shadow .2s ease, transform .2s ease;
}
.lm-section button.lm-card { cursor: pointer; }
.lm-section button.lm-card:hover,
.lm-section button.lm-card:focus-visible {
    box-shadow: inset 0 0 0 2px var(--color-blue);
}
.lm-section button.lm-card:focus-visible { outline: 3px solid var(--color-purple); outline-offset: 2px; }

.lm-section.card-filled .lm-card { --lm-card-bg: var(--color-azure); box-shadow: none; }
.lm-section.card-filled button.lm-card:hover { box-shadow: inset 0 0 0 2px var(--color-blue); }
.lm-section.card-shadow .lm-card { box-shadow: 0 4px 18px rgba(15, 70, 113, .12); }
.lm-section.card-shadow button.lm-card:hover { transform: translateY(-2px); }

.lm-section .lm-logo {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}


/* Slider */
.lm-section .lm-slider .splide__arrow {
    width: 2.75rem;
    height: 2.75rem;
    background: var(--color-navy);
    opacity: 1;
}
.lm-section .lm-slider .splide__arrow svg { fill: var(--color-white); }
.lm-section .lm-slider .splide__arrow:hover:not(:disabled) { background: var(--color-purple); }
.lm-section .lm-slider .splide__arrow:disabled { opacity: .35; }
.lm-section .lm-slider .splide__arrow--prev { left: -1.5rem; }
.lm-section .lm-slider .splide__arrow--next { right: -1.5rem; }
.lm-section .lm-slider .splide__pagination { position: static; margin-top: 1.25rem; padding: 0; }
.lm-section .lm-slider .splide__pagination__page { background: var(--color-pink); opacity: 1; }
.lm-section .lm-slider .splide__pagination__page.is-active { background: var(--color-purple); transform: none; }

.lm-section .lm-slider .splide__list {
	justify-content: center;
}

/* Grid columns */
@media (min-width: 576px) {
    .lm-section.display-grid .lm-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 992px) {
    .lm-section.display-grid.cols-3 .lm-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lm-section.display-grid.cols-4 .lm-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .lm-section.display-grid.cols-5 .lm-list { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .lm-section.display-grid.cols-6 .lm-list { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* ---------- Modal ---------- */
html.lm-modal-open { overflow: hidden; }

.lm-section dialog.lm-modal {
    width: min(70rem, calc(100% - 3rem));
    max-width: none;
    max-height: calc(100vh - 3rem);
    max-height: calc(100dvh - 3rem);
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: var(--border-radius, 8px);
    background: var(--color-white);
    color: var(--color-navy);
    overflow: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
}
.lm-section dialog.lm-modal::backdrop {
    background: rgba(15, 70, 113, .75);
}
.lm-section dialog.lm-modal[open] { animation: lm-fade .25s ease; }
.lm-section dialog.lm-modal[open]::backdrop { animation: lm-fade .25s ease; }
@keyframes lm-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.lm-section .lm-modal-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 2.4fr;
    align-items: center;
    column-gap: 4rem;
    padding: 4rem;
}
.lm-section dialog.modal-logo-top .lm-modal-inner {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 2rem;
    justify-items: start;
}

.lm-section .lm-modal-media { display: flex; align-items: center; justify-content: center; }
.lm-section .lm-modal-logo {
    display: block;
    max-width: 100%;
    max-height: 14rem;
    width: auto;
    height: auto;
    object-fit: contain;
}
.lm-section .lm-modal-body { min-width: 0; }
.lm-section .lm-modal-title {
    margin: 0 0 1.5rem;
    padding-right: 2.5rem;
    font-size: 1.75rem;
    line-height: 1.25;
    color: var(--color-navy);
}
.lm-section .lm-modal-content { font-size: .9375rem; line-height: 1.6; }
.lm-section .lm-modal-content > *:last-child { margin-bottom: 0; }
.lm-section .lm-modal-body .buttons { margin-top: 2rem; }

/* Close button */
.lm-section .lm-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 2px solid var(--color-navy);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: background-color .2s ease;
}
.lm-section .lm-close span,
.lm-section .lm-close span::before {
    content: "";
    display: block;
    width: 1rem;
    height: 2px;
    background: var(--color-navy);
}
.lm-section .lm-close span { transform: rotate(45deg); }
.lm-section .lm-close span::before { transform: rotate(90deg); }
.lm-section .lm-close:hover,
.lm-section .lm-close:focus-visible { background: var(--color-azure); }
.lm-section .lm-close:focus-visible { outline: 3px solid var(--color-purple); outline-offset: 2px; }

/* Tablet / mobile */
@media (max-width: 991.98px) {
    .lm-section .lm-header { margin-bottom: 2.5rem; }
    .lm-section .lm-modal-inner {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 2rem;
        padding: 3.5rem 2rem 2.5rem;
    }
    .lm-section .lm-modal-media { justify-content: flex-start; }
    .lm-section .lm-modal-logo { max-height: 8rem; }
    .lm-section .lm-modal-title { font-size: 1.5rem; }
}

@media (max-width: 575.98px) {
    .lm-section dialog.lm-modal { width: calc(100% - 1.5rem); max-height: calc(100dvh - 1.5rem); }
    .lm-section .lm-modal-inner { padding: 3.5rem 1.25rem 1.75rem; }
    .lm-section .lm-close { top: .75rem; right: .75rem; }
}

@media (prefers-reduced-motion: reduce) {
    .lm-section dialog.lm-modal[open],
    .lm-section dialog.lm-modal[open]::backdrop { animation: none; }
}
