/*Custom CSS dashboard*/
.navbar-nav .nav-item {
    padding: 5px 0px;
}

.navbar-expand-lg .nav-item.active {
    background: #d6edff !important;
}

.navbar-expand-lg .nav-item.active:after {
    border: 0 solid #008eff;
}

.navbar-vertical {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.7) 0%,
        rgba(37, 110, 255, 0.7) 100%
    );
}

/* V2 */

/* CSS RESET by Piccalilli */
/* Box sizing rules */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Prevent font size inflation */
html {
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}

/* Remove default margin in favour of better control in authored CSS */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
    margin-block-end: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role="list"],
ol[role="list"] {
    list-style: none;
}

/* Set core body defaults */
body {
    min-height: 100vh;
    line-height: 1.5;
}

/* Set shorter line heights on headings and interactive elements */
h1,
h2,
h3,
h4,
button,
input,
label {
    line-height: 1.1;
}

/* Balance text wrapping on headings */
h1,
h2,
h3,
h4 {
    text-wrap: balance;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
    text-decoration-skip-ink: auto;
    color: currentColor;
}

/* Make images easier to work with */
img,
picture {
    max-width: 100%;
    display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

/* Make sure textareas without a rows attribute are not tiny */
textarea:not([rows]) {
    min-height: 10em;
}

/* Anything that has been anchored to should have extra scroll margin */
:target {
    scroll-margin-block: 5ex;
}

/* Variable */

:root {
    --color-primary-red: #fb2529;
    --color-secondary-red: #830507;
}

/* Global Config */
:root {
    font-size: clamp(14px, 2vw, 18px);
}

html {
    scroll-behavior: smooth;
}

body {
    text-wrap: pretty;
}

section {
    padding: 3rem 2rem;
}

/* Scroll Bar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.6);
}

/* Utility */
.bg-primary-red {
    background: linear-gradient(
        to right,
        var(--color-primary-red),
        var(--color-secondary-red)
    );
}

.bg-image-1 {
    background: url("/assets/img/OJK-Accelerator-Web-bg-1.jpg");
    background-size: cover;
    background-position: center;
}

.bg-image-2 {
    background: url("/assets/img/OJK-Accelerator-Web-bg-2.jpg");
    background-size: cover;
    background-position: center;
}

.bg-image-3 {
    background: url("/assets/img/OJK-Accelerator-Web-bg-3.jpg");
    background-size: cover;
    background-position: center;
}

.bg-image-4 {
    background: url("/assets/img/OJK-Accelerator-Web-bg-4.jpg");
    background-size: cover;
    background-position: center;
}

.bg-image-wave {
    background-image: url("/assets/img/wave.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: right;
}

input::placeholder {
    color: white;
}

/* Custom style */

/* Layouts */
.start-red .navbar {
    position: relative;
    background: transparent;
}

/* background layer */
.start-red .navbar::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        var(--color-primary-red),
        var(--color-secondary-red)
    );
    opacity: 0;
    z-index: 0;

    animation: bg-fade-in linear forwards;
    animation-timeline: view();
    animation-range: 100vh 200vh;
}

/* keep content above */
.start-red .navbar > * {
    position: relative;
    z-index: 1;
}

@media (min-width: 992px) {
    .navbar .dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0;
    }
}

/* Force red background on mobile navbar */
@media (max-width: 991.98px) {
    .start-red .navbar {
        background: linear-gradient(
            to right,
            var(--color-primary-red),
            var(--color-secondary-red)
        ) !important;
    }

    .start-red .navbar::before {
        display: none;
    }
}

/* index */

.gallery-wrapper {
    overflow: hidden;
    width: 100%;
}

.gallery-track-left,
.gallery-track-right {
    display: flex;
    gap: 1rem;
    width: max-content;
}

.gallery-track-left {
    animation: marquee-to-left 20s linear infinite;
}

.gallery-track-right {
    animation: marquee-to-right 20s linear infinite;
}

.gallery-track-left img,
.gallery-track-right img {
    height: clamp(120px, 18vw, 360px);
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

/* about */

.timeline-scroll {
    overflow-x: auto;
    scroll-behavior: smooth;
}

.timeline-scroll::-webkit-scrollbar {
    height: 8px;
}

.timeline-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
}

.timeline-scroll::-webkit-scrollbar-thumb {
    background: var(--color-primary-red);
    border-radius: 999px;
}

.timeline-scroll::-webkit-scrollbar-button {
    display: block;
    width: 12px;
    height: 8px;
    background: var(--color-primary-red);
    border-radius: 4px;
}

.timeline-scroll::-webkit-scrollbar-button:hover {
    background: var(--color-secondary-red);
}

.timeline-scroll::-webkit-scrollbar-button:start {
    border-radius: 4px 0 0 4px;
}

.timeline-scroll::-webkit-scrollbar-button:end {
    border-radius: 0 4px 4px 0;
}

.timeline-scroll::-webkit-scrollbar-button:start:increment,
.timeline-scroll::-webkit-scrollbar-button:end:decrement {
    display: none;
}

.tlm-overlay {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 12px;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.tlm-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* Shell */
.tlm-shell {
    position: relative;
    width: 100%;
    max-width: 960px;
    max-height: calc(100vh - 24px);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.35);
    transform: translateY(24px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.tlm-overlay.is-open .tlm-shell {
    transform: translateY(0) scale(1);
}

/* Close button */
.tlm-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.12);
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.tlm-close:hover {
    background: rgba(0, 0, 0, 0.22);
}

/* Cover section */
.tlm-cover {
    background: #fff;
    padding: 28px 32px 20px;
    border-bottom: 3px solid var(--color-primary-red);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.tlm-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(251, 37, 41, 0.04) 0%,
        transparent 60%
    );
    pointer-events: none;
}

.tlm-cover-bar {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 6px;
    /* leave room for the close button sitting top-right */
    padding-right: 52px;
}

.tlm-cover-subtitle {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6c757d;
    line-height: 1.4;
}

.tlm-cover-year {
    font-size: 2.6rem;
    font-weight: 900;
    line-height: 1;
    color: var(--color-primary-red);
    letter-spacing: -0.02em;
}

.tlm-cover-divider {
    height: 3px;
    background: var(--color-primary-red);
    border-radius: 2px;
    margin-bottom: 18px;
    width: 56px;
}

.tlm-cover-body {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.tlm-cover-title-col {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
}

.tlm-pin {
    flex-shrink: 0;
    margin-top: 4px;
}

.tlm-cover-title {
    font-size: clamp(1.4rem, 3vw, 2.1rem);
    font-weight: 900;
    color: var(--color-primary-red);
    line-height: 1.15;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

/* Content section */
.tlm-content {
    flex: 1;
    overflow-y: auto;
    background: #fff;
    /* styled scrollbar matching project theme */
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary-red) transparent;
}

.tlm-content::-webkit-scrollbar {
    width: 5px;
}
.tlm-content::-webkit-scrollbar-track {
    background: transparent;
}
.tlm-content::-webkit-scrollbar-thumb {
    background: var(--color-primary-red);
    border-radius: 999px;
}

.tlm-content-label {
    background: var(--color-primary-red);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 8px 32px;
    flex-shrink: 0;
}

.tlm-content-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 200px;
}

/* Events list */
.tlm-events {
    padding: 24px 28px;
    border-right: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.tlm-event {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.tlm-event-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border: 2px solid var(--color-primary-red);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary-red);
    margin-top: 2px;
}

h6.tlm-event-title {
    color: var(--color-primary-red);
    margin: 0 0 5px;
    line-height: 1.35;
}

.tlm-event-desc {
    font-size: 0.75rem;
    color: #444;
    line-height: 1.55;
    margin: 0;
}

.tlm-cluster-list {
    columns: 3;
    column-gap: 16px;
    margin: 8px 0 0;
    padding-left: 18px;
    font-size: 0.72rem;
    color: #444;
}

.tlm-cluster-list li {
    margin-bottom: 4px;
    break-inside: avoid;
}

/* Photo grid */
.tlm-photos {
    padding: 24px 28px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    align-content: start;
    background: transparent;
}

.tlm-photo-item {
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #e9ecef;
}

.tlm-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.tlm-photo-item:hover img {
    transform: scale(1.04);
}

.tlm-photo-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}

/* Bottom nav */
.tlm-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    border-top: 1px solid #e9ecef;
    background: #fff;
    flex-shrink: 0;
}

.tlm-nav-arrows {
    display: flex;
    gap: 6px;
}

.tlm-nav-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: #1a1a1a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition:
        background 0.2s,
        transform 0.15s;
}

.tlm-nav-btn:hover {
    background: var(--color-primary-red);
    transform: scale(1.07);
}

.tlm-nav-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.tlm-nav-home {
    background: #6c757d;
}

.tlm-nav-home:hover {
    background: #1a1a1a;
}

/* Responsive */
@media (max-width: 768px) {
    .tlm-overlay {
        padding: 12px;
    }

    .tlm-shell {
        max-height: calc(100vh - 24px);
        border-radius: 16px;
    }

    .tlm-cover {
        padding: 20px 18px 14px;
    }

    .tlm-cover-year {
        font-size: 2rem;
    }
    .tlm-cover-title {
        font-size: 1.1rem;
    }

    .tlm-badge-icons {
        flex-direction: row;
    }

    .tlm-badge {
        width: 42px;
        height: 42px;
    }

    .tlm-content-label {
        padding: 8px 18px;
    }

    .tlm-content-body {
        grid-template-columns: 1fr;
    }

    .tlm-events {
        border-right: none;
        border-bottom: 1px solid #e9ecef;
        padding: 18px;
    }

    .tlm-photos {
        padding: 18px;
    }
}

@media (max-width: 480px) {
    .tlm-cover-year {
        font-size: 1.6rem;
    }
}

/* Animation */
@keyframes bg-fade-in {
    to {
        opacity: 1;
    }
}

@keyframes marquee-to-left {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

@keyframes marquee-to-right {
    from {
        transform: translateX(-50%);
    }
    to {
        transform: translateX(0);
    }
}
