/*
Theme Name: Memory Gallery Theme
Description: A custom horizontal timeline gallery theme.
Version: 1.0
Text Domain: memory-gallery
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400&family=Space+Grotesk:wght@500;700&display=swap');

:root {
    --bg-dark: #22252A;
    --text-white: #FFFFFF;
    --text-dark: #21242B;
    --border-gray: #4E5054;

    --font-title: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: var(--font-body);
    overflow: hidden;
    /* We'll scroll horizontally inside a container */
}

a {
    text-decoration: none;
    color: inherit;
}

/* Header */
.site-header {
    height: 68px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: var(--bg-dark);
    /* match background */
}

.site-title {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 16px;
    line-height: 24px;
    text-transform: uppercase;
    color: var(--text-white);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 24px;
}

.main-navigation a {
    font-family: var(--font-title);
    font-weight: 500;
    font-size: 16px;
    line-height: 24px;
    color: var(--text-white);
}

.lang-switcher {
    width: 82px;
    height: 40px;
    background-color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-dark);
    font-family: var(--font-title);
    font-weight: 500;
    font-size: 16px;
    cursor: pointer;
}

/* Filter (Bottom Left) */
.timeline-filter {
    position: fixed;
    bottom: 24px;
    left: 24px;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-gray);
    padding: 4px;
    display: flex;
    gap: 0;
    z-index: 100;
}

.filter-item {
    display: flex;
    align-items: center;
    padding: 15px 14px;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.filter-item.active {
    background-color: var(--text-white);
    color: var(--text-dark);
}

.filter-item:not(.active) {
    color: var(--text-white);
}

.filter-text {
    font-family: var(--font-title);
    font-weight: 500;
    font-size: 14px;
    line-height: 1;
}

.filter-circle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}


/* Main Timeline Container */
.site-main.timeline-wrapper {
    height: 100vh;
    width: 100vw;
    padding-top: 68px;
    /* header offset */
    position: relative;
}

.timeline-scroll-container {
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    display: flex;
    align-items: center;
    /* center timeline vertically */
    padding: 0;
    position: relative;
}

/* Scrollbar styling */
.timeline-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.timeline-scroll-container::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

.timeline-scroll-container::-webkit-scrollbar-thumb {
    background: var(--border-gray);
    border-radius: 4px;
}

/* The curved dashed line */
.timeline-path-bg {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 200px;
    width: 100%;
    z-index: 1;
    pointer-events: none;
}

.timeline-events-container {
    position: relative;
    /* Nodes positioned absolutely inside */
    z-index: 2;
    height: 100%;
}

/* Timeline Node Anchor (0 height, absolute positioned) */
.node-anchor {
    position: absolute;
    width: 0;
    height: 0;
}

.timeline-node {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Align content to the left */
    position: absolute;
    width: max-content;
}

.node-visuals {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 46px;
    /* width of the circle */
}

/* node-bottom: dot is at the top, shift up and left so dot center sits exactly on anchor */
.node-bottom .timeline-node {
    top: -8px;
    left: -23px;
    /* half of node-visuals width */
}

/* node-top: dot is at the bottom, shift down and left so dot center sits exactly on anchor */
.node-anchor.node-top .timeline-node {
    bottom: -8px;
    left: -23px;
    flex-direction: column-reverse;
}

.node-anchor.node-top .node-visuals {
    flex-direction: column-reverse;
}

/* The dot on the line */
.node-dot {
    width: 16px;
    height: 16px;
    background-color: var(--text-white);
    border: 3px solid var(--border-gray);
    border-radius: 50%;
    flex-shrink: 0;
    z-index: 3;
}

/* The connector bar */
.node-connector {
    width: 2px;
    height: 33px;
    background-color: var(--border-gray);
    flex-shrink: 0;
}

/* The glowing circle */
.node-circle {
    width: 46px;
    height: 46px;
    border: 1px solid var(--node-color);
    border-radius: 23px;
    padding: 4px;
    box-shadow: 0px 0px 15.46px 0px var(--node-color);
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.node-circle-inner {
    width: 36px;
    height: 36px;
    background-color: var(--node-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.node-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.node-anchor.node-top .node-content {
    flex-direction: column-reverse;
    margin-bottom: 12px;
}

.node-anchor.node-bottom .node-content {
    flex-direction: column;
    margin-top: 12px;
}

.node-date {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(14px, 1.8vh, 18px);
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--text-white);
    margin-bottom: 8px;
}

.node-anchor.node-top .node-date {
    margin-bottom: 0;
    margin-top: 8px;
}

.node-title {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(14px, 1.8vh, 18px);
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--text-white);
}

.node-image {
    width: clamp(124px, 18vh, 186px);
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    object-fit: cover;
}

.node-anchor.node-bottom .node-image {
    margin-top: 12px;
}

.node-anchor.node-top .node-image {
    margin-bottom: 12px;
}

.node-image-placeholder {
    width: clamp(124px, 18vh, 186px);
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    background-color: var(--border-gray);
    margin-top: 12px;
}

.node-anchor.node-top .node-image-placeholder {
    margin-top: 0;
    margin-bottom: 12px;
}