﻿html {
    font-size: 16px;
    min-height: 100%;
    position: relative;
}

body {
    background: #e9eef4;
    color: #0b2452;
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    overflow-x: hidden;
}

    body.loading-active {
        overflow: hidden;
    }

.container {
    max-width: none;
    padding: 0;
}

main {
    padding-bottom: 0 !important;
}

.navbar,
footer {
    display: none;
}

.loading-screen {
    align-items: center;
    background: #f3f5f9;
    display: flex;
    inset: 0;
    justify-content: center;
    position: fixed;
    transition: opacity 420ms ease, visibility 420ms ease;
    visibility: visible;
    z-index: 20;
    background-color: white;
}

body.is-ready .loading-screen {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.loading-card {
    align-items: center;
    animation: splashFadeIn 500ms ease;
    display: flex;
    flex-direction: column;
    gap: 0;
    justify-content: center;
    padding: 0 24px;
    text-align: center;
    width: min(760px, calc(100vw - 28px));
}

    .loading-card h1 {
        color: #0a1f58;
        font-size: clamp(17px, 5vw, 20px);
        font-weight: 800;
        letter-spacing: 0.02em;
        line-height: 1.3;
        margin: 0 0 18px;
    }

    .loading-card img {
        display: block;
        height: auto;
        width: min(86vw, 420px);
    }

@keyframes splashFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*.loading-dots {
    display: flex;
    align-items: center;
    color: #5b6373;
    font-size: clamp(11px, 3.2vw, 13px);
    gap: 10px;
    justify-content: center;
    letter-spacing: 0.03em;
}

.loading-dot {
    animation: loadingPulse 1.1s ease-in-out infinite;
    background: #0a1f58;
    border-radius: 50%;
    height: 6px;
    width: 6px;
}

.loading-dot:nth-child(2) {
    animation-delay: 0.15s;
}

.loading-dot:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes loadingPulse {
    0%,
    80%,
    100% {
        opacity: 0.25;
        transform: scale(0.85);
    }

    40% {
        opacity: 1;
        transform: scale(1);
    }
}*/

.portfolio-shell {
    background: #ffffff;
    border: 1px solid #9aa8bb;
    min-height: 100vh;
    overflow-x: hidden;
}

.portfolio-header {
    align-items: stretch;
    border-bottom: 1px solid #0b2452;
    display: grid;
    grid-template-columns: 235px minmax(0, 1fr);
}

.brand-panel {
    align-items: center;
    background: #ffffff;
    display: flex;
    justify-content: center;
    min-height: 92px;
    padding: 6px 10px;
}

.brand-link {
    align-items: center;
    display: flex;
    height: 100%;
    justify-content: center;
    width: 100%;
}

    .brand-link:focus-visible {
        outline: 2px solid #90aade;
        outline-offset: -2px;
    }

.brand-panel img {
    display: block;
    height: auto;
    max-height: 82px;
    max-width: 100%;
    object-fit: contain;
}

.portfolio-header h1 {
    align-items: center;
    background: #082765;
    color: #ffffff;
    display: flex;
    font-size: 3rem;
    font-weight: 800;
    justify-content: flex-start;
    letter-spacing: 0;
    line-height: 1.1;
    margin: 0;
    padding: 0 28px;
}

.portfolio-slider {
    padding: 20px 32px 34px;
}

.portfolio-viewport {
    overflow: hidden;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
    width: 100%;
}

    .portfolio-viewport.is-dragging {
        cursor: grabbing;
    }

.portfolio-list {
    align-items: start;
    display: flex;
    gap: 0;
    justify-content: stretch;
    overflow: visible;
    padding: 0;
    transition: transform 320ms ease;
    width: 100%;
}

    .portfolio-list.is-dragging {
        transition: none;
    }

.portfolio-item {
    align-items: center;
    display: flex;
    flex: 0 0 100%;
    flex-direction: column;
    min-width: 0;
    width: 100%;
}

.document-bar {
    align-items: center;
    background: #90aade;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px;
    min-height: 34px;
    width: 100%;
}

.document-title {
    color: #ffffff;
    display: inline-block;
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.1;
    max-width: 100%;
    overflow-wrap: anywhere;
    padding: 5px 10px;
    width: fit-content;
}

    .document-title:hover,
    .document-title:focus-visible {
        color: #ffffff;
    }

.download-link {
    align-items: center;
    color: #ffffff;
    display: flex;
    height: 34px;
    justify-content: center;
    text-decoration: none;
}

    .download-link svg {
        fill: currentColor;
        height: 24px;
        width: 24px;
    }

.preview-wrap {
    display: flex;
    justify-content: center;
    padding: 20px 0 0;
    width: 100%;
}

/*.pdf-preview {
    aspect-ratio: 0.707 / 1;
    background: #ffffff;
    border: 1px solid #0b2452;
    color: #ffffff;
    display: block;
    max-width: 438px;
    overflow: hidden;
    position: relative;
    text-decoration: none;
    touch-action: manipulation;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    width: min(438px, 100%);
}*/
.pdf-preview {
    position: relative;
    width: 100%;
    max-width: 438px;
    aspect-ratio: 210 / 297; /* A4 ratio */
    border: 1px solid #0b2452;
    overflow: hidden;
    background: #fff;
}

.portfolio-viewport.is-dragging .pdf-preview {
    cursor: grabbing;
}

.pdf-preview::after {
    background: rgba(0, 0, 0, 0.35);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
    z-index: 1;
}

.preview-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Shows the full image */
    background: #fff;
    user-select: none;
    -webkit-user-drag: none;
}

.view-button {
    align-items: center;
    background: #c7d4f2;
    color: #ffffff;
    display: flex;
    font-size: 1.40rem;
    font-weight: 600;
    height: 32px;
    justify-content: center;
    left: 50%;
    line-height: 1;
    max-width: calc(100% - 80px);
    min-width: 140px;
    position: absolute;
    text-align: center;
    text-decoration: none;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    border-radius: 12px;
}

    .view-button:hover,
    .view-button:focus-visible {
        background: #90aade;
        color: #ffffff;
    }

.portfolio-dots {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 18px 0 0;
}

.portfolio-dot {
    background: #b6c4df;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    height: 10px;
    padding: 0;
    transition: background 200ms ease, transform 200ms ease, width 200ms ease;
    width: 10px;
}

    .portfolio-dot.is-active {
        background: #082765;
        transform: scale(1.1);
        width: 28px;
    }

    .portfolio-dot:focus-visible {
        outline: 2px solid #d23939;
        outline-offset: 3px;
    }

.details-link {
    color: #082765;
    font-size: 1.15rem;
    font-weight: 700;
    padding: 0 32px 28px;
    text-align: center;
}



.empty-state {
    border: 1px dashed #90aade;
    margin: 24px 32px;
    padding: 48px 20px;
    text-align: center;
}

    .empty-state h2 {
        font-size: 1.4rem;
        margin: 0 0 8px;
    }

    .empty-state p {
        color: #4f607c;
        margin: 0;
    }

code {
    color: #082765;
}

@media (min-width: 900px) {
    .portfolio-shell {
        margin: 4px 8px;
    }
}

@media (max-width: 760px) {
    body {
        background: #dfe5ec;
    }

    .portfolio-shell {
        margin: 6px auto 0;
        max-width: 445px;
        min-height: 100vh;
    }

    .portfolio-header {
        border-bottom: 0;
        display: block;
    }

    .brand-panel {
        align-items: center;
        display: flex;
        justify-content: center;
        min-height: 88px;
        padding: 6px 0 4px;
    }

        .brand-panel img {
            max-height: 74px;
            max-width: 220px;
        }

    .portfolio-header h1 {
        font-size: 1.20rem;
        justify-content: center;
        min-height: 63px;
        padding: 0 14px;
        text-align: center;
    }

    .portfolio-slider {
        padding: 16px 18px 30px;
    }

    .portfolio-list {
        gap: 0;
    }

    .portfolio-item {
        width: 100%;
    }

    .document-bar {
        grid-template-columns: minmax(0, 1fr) 38px;
        min-height: 34px;
    }

    .document-title {
        font-size: 1.35rem;
        padding: 6px 10px;
    }

    .preview-wrap {
        padding-top: 14px;
    }



    .view-button {
        min-width: min(140px, calc(100% - 72px));
    }

    .pdf-preview {
        max-width: 360px;
    }

    .details-link {
        font-size: 1rem;
        padding: 0 18px 24px;
    }

    .preview-image {
        width: 100%;
        height: 100%;
        object-fit: cover; /* Fill container */
        display: block;
    }
}

@media (max-width: 420px) {
    .portfolio-shell {
        border-left: 0;
        border-right: 0;
        margin-top: 0;
    }

    .portfolio-slider {
        padding-left: 16px;
        padding-right: 16px;
    }

    .pdf-preview {
        max-width: 300px;
    }

    .view-button {
        min-width: 140px;
        font-size: 1.2rem;
    }

    .document-title {
        font-size: 1.2rem;
    }
}
