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

@font-face {
    font-family: "Ticketing";
    src: url("font/Ticketing.ttf") format("truetype");
}

html, body, * {
    font-family: 'Inter', Arial, sans-serif;
}

html, body {
	margin: 0;
	overflow-x: hidden;
	position: relative;
	background: #92d0ff;
}

.railway-title {
    width: 50% !important;
    margin: 0 0 0.5em 0;
    padding: 0.5em 0 0.3em 0;
    font-size: clamp(2.5em, 3vw, 4em);
    font-weight: 800;
    text-align: center;
    letter-spacing: 0.02em;
    line-height: 1.05;
    overflow-wrap: break-word;
    transform: translateX(50%);
}

.railway-info-container {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    padding: 2em;
    gap: 2em;
    z-index: 2;
}

.railway-info-container > div {
    flex: 1 1 0;
    min-width: 0;
}

.info-column {
    display: flex;
    flex-direction: column;
}

.info-list {
    flex: 0 0 40%;
    overflow: auto;
}

.info-video {
    flex: 0 0 60%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Responsive: stack on small screens */
@media (max-width: 800px) {
    .railway-info-container {
        flex-direction: column;
        gap: 1em;
    }
    .railway-info {
        width: 100%;
    }
    .railway-title {
        width: 100%;
        font-size: clamp(1.5em, 5vw, 2.5em);
    }
}

.track-container {
    position: relative;
    width: 100vw;
    height: auto;
    display: block;
}

.track-container .station-name {
    position: absolute;
    bottom: 38.5%;
    left: 25.25%;
    transform: translateX(-50%);
    font-size: clamp(0.5em, 1vw, 1.4em);
    color: #222;
    text-align: center;
    font-weight: bold;
    z-index: 1000;
}

.history-container {
    position: absolute;
    right: 2vw;
    bottom: 2vw;
    display: flex;
    gap: 1vw;
    z-index: 1000;
}

.history-container button {
    padding: 1vw 2vw;
    font-size: 2vw;
    border: none;
    border-radius: 0.4em;
    background: #ffd700;
    color: #222;
    cursor: pointer;
    box-shadow: 0 8px 8px rgba(0,0,0,0.18);
    transition: background 0.2s;
}

.history-container button:hover {
    background: #ffb700;
}

.information-container {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    left: 20%;
    bottom: 60%;
    transform: translate(50%, 50%);
    width: 30vw;
    height: 12vw;
    text-align: center;
}

.info-text {
    flex: 1;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 0.5em 1em;
    box-sizing: border-box;
    color: darkblue;
    font-size: clamp(1em, 2vw, 2em);
    box-shadow: 0 8px 8px rgba(0,0,0,0.18);
    border-radius: 18px;
}

.info-text-faded {
    opacity: 0.92;
    color: #3a4a6b;
    background: linear-gradient(120deg, rgba(255,255,255,0.45) 60%, rgba(230,240,255,0.25) 100%);
}

.info-text h3, .info-text h1 {
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 0.7vw;
    color: #1a2233;
}

@media (max-width: 900px) {
    .info-text {
        font-size: 2.8vw;
        padding: 4vw 3vw;
    }
}

.info-image {
    flex: 9;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 8px rgba(0,0,0,0.18);
}

.info-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#information-title {
    font-size: clamp(1em, 2vw, 2em);
    color: white;
    text-align: left;
    align-self: flex-start;
    width: 100%;
    padding-left: 0.2em;
}

#information-years {
    font-size: clamp(0.8em, 1.2vw, 1.5em);
    color: white;
    text-align: right;
    align-self: center;
    width: auto;
    padding-right: 0;
    flex-shrink: 0;
    margin-left: 1em;
}

.arrow-btn {
    position: absolute;
    left: 15%;
    bottom: 60%;
    transform: translate(50%, 50%);
    background: #ffd700;
    border: none;
    border-radius: 50%;
    width: 2em;
    height: 2em;
    font-size: 1.2em;
    color: #222;
    cursor: pointer;
    box-shadow: 0 8px 8px rgba(0,0,0,0.18);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

#arrow-left {
    left: calc(45% - 12vw - 2.5em);
}

#arrow-right {
    left: calc(45% + 22vw - 1.5em);
}

.arrow-btn:hover {
    background: #ffb700;
}

.description-container {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    right: 15%;
    bottom: 60%;
    transform: translate(50%, 50%);
    width: 25vw;
    height: auto;
    font-size: 0.6vw;
}

#loop-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

#loop-checkbox + label {
    position: relative;
    padding-left: 6vw;
    cursor: pointer;
    font-size: 1.1vw;
    user-select: none;
    color: #222;
    line-height: 4vw;
    height: 4vw;
    display: flex;
    align-items: center;
    font-weight: 600;
    letter-spacing: 0.03vw;
    border: 0.4vw solid #ffd700;
    border-radius: 0.6vw;
    background: #ffd700;
    box-shadow: 0 0.4vw 1.6vw rgba(0,0,0,0.08);
}

#loop-checkbox + label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 45%;
    transform: translateY(-45%);
    width: 4.5vw;
    height: 4vw;
    border: 0.4vw solid #ffd700;
    border-radius: 0.6vw;
    background: #fff;
    transition: background 0.2s, border-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#loop-checkbox:checked + label::after {
    content: "";
    position: absolute;
    left: 1.5vw;
    top: 10%;
    width: 1.2vw;
    height: 2.5vw;
    border: solid #222;
    border-width: 0 0.44vw 0.44vw 0;
    transform: rotate(45deg);
    pointer-events: none;
}

/* Checked state background */
#loop-checkbox:checked + label::before {
    background: #ffd700;
}

#segment {
    width: 100vw;
    height: auto;
    display: block;
}

.blank-block {
    height: 100vh;
    width: 100vw;
    background: transparent;
}

#train {
    position: absolute;
    left: 0;
    bottom: 18%;
    transition: left 10s cubic-bezier(0.66, 0, 0.34, 1);
    width: 100vw;
    height: 25vw;
}

@media only screen
and (max-device-width: 600px) {
    #train {
        max-height: 75px;
    }
}

#train.right {
    left: 200vw;
    transition: none;
}

#train.station {
    left: -60vw;
    transition: left 10s cubic-bezier(0.33, 1, 0.68, 1);
}

#train.center {
    left: 0;
}

#train.left {
    left: -100vw;
    transition: left 3s cubic-bezier(0.32, 0, 0.67, 0);
}

#segment {
    position: relative; /* Ensure the parent is positioned */
}

.video-section {
    height: 60%;
    margin: 0;
    overflow: hidden;
}

.video-section video {
    width: 100%;
    height: 14.4vw;
    object-fit: cover;
}

.background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: none;
    z-index: 1;
}

.video-darken {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.35);
    z-index: 2;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.video-overlay h1 {
    font-size: 2.5vw;
    font-weight: bold;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7);
    margin-top: 0;
    position: relative;
}

.jobs-btn {
    background: #FFD600;
    color: #222;
    font-size: 1.25vw;
    font-weight: bold;
    border: none;
    border-radius: 32px;
    padding: 1.1vw 2.8vw;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    margin-top: 2.5em;
}

.jobs-btn:hover {
    background: #FFC400;
}

/* Ticket */

.ticket {
    width: 100vw;
    height: 30vw;
    background: #F85007;
    display: flex;
    border: none;
    margin: 0;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.ticket::before {
    content: "";
    position: absolute;
    top: 20%;
    left: 0;
    width: 100%;
    height: 60%;
    background: #fff;
    z-index: 1;
}

.ticket .title-left {
    position: absolute;
    top: 5%;
    left: 2%;
    font-family: 'Ticketing', sans-serif;
    font-size: 2.75vw;
    color: #fff;
    z-index: 2;
}

.ticket .title-right {
    position: absolute;
    top: 5%;
    right: 1%;
    font-family: 'Ticketing', sans-serif;
    font-size: 2.75vw;
    color: #fff;
    z-index: 2;
}

.ticket .title-middle {
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Ticketing', sans-serif;
    font-size: 2.75vw;
    color: #fff;
    z-index: 2;
}

.ticket .about-left {
    position: absolute;
    top: 20%;
    left: 1%;
    font-size: 1.5vw;
    color: black;
    z-index: 2;
    width: 45%;
}

.ticket .about-right {
    position: absolute;
    top: 20%;
    right: 1%;
    font-size: 1.5vw;
    color: black;
    z-index: 2;
}

.ticket .about {
    position: absolute;
    top: 20%;
    left: 1%;
    font-size: 1.5vw;
    color: black;
    z-index: 2;
    width: 100%;
}

.ticket ul {
    gap: 1em;
    display: flex;
    flex-direction: column;
}

.ticket .logo {
    position: absolute;
    bottom: 5%;
    left: 1%;
    height: 10%;
    z-index: 3;
}

.ticket-small {
    width: 32vw;
    height: 24vw;
    border-radius: 1.25vw;
}

.ticket-small .title-left,
.ticket-small .title-right {
    font-size: 2vw;
}

.ticket-small .title-middle {
    padding-left: 5vw;
    width: 25vw;
    font-size: 1.5vw
}

.ticket-small .about-left,
.ticket-small .about-right,
.ticket-small .about {
    font-size: 0.8vw;
}

.ticket-small ul {
    font-size: 1.5vw;
    gap: 0.4vw;
}

.tickets-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 1vw;
}

.tickets-carousel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 2vw 0;
}

.ticket {
    transition: none;
    position: absolute;
    width: 100%;
    min-width: 35vw;
    max-width: 35vw;
    opacity: 1;
    pointer-events: none;
    box-shadow: 0 8px 8px rgba(0,0,0,0.18);
}

.ticket.active {
    opacity: 1;
    pointer-events: auto;
    position: relative;
    z-index: 2;
    transform: translateY(0.5vw);
}

.ticket.slide-out-down {
    animation: slideOutDown 2s forwards;
    z-index: 3;
}

.ticket.slide-in-up {
    animation: slideInUp 3s forwards;
    z-index: 4;
}

@keyframes slideOutDown {
    from { transform: translateY(0.5vw); opacity: 1; }
    to { transform: translateY(150%); opacity: 0; }
}

@keyframes slideInUp {
    from { transform: translateY(-150%); opacity: 1; }
    to { transform: translateY(0.5vw); opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 1000px) {
    .ticket-printer {
        width: 90vw;
        height: 20vw;
    }
    .ticket-view {
        width: 90vw;
        min-height: 40vw;
    }
}

.ticket-view {
    position: relative;
    width: 45vw;
    min-height: 30vw;
    display: flex;
    justify-content: center;
    overflow: hidden;
    padding-left: 2vw;
}
.ticket-nav {
    background: #ffd700;
    border: none;
    border-radius: 50%;
    width: 2em;
    height: 2em;
    font-size: 1.5vw;
    color: #222;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.ticket-printer {
    width: 60vw;
    height: 22vw;
    margin-left: 2vw;
    background: linear-gradient(180deg, #444 70%, #222 100%);
    border-radius: 1vw 1vw 1vw 1vw / 2vw 2vw 1vw 1vw;
    box-shadow: 0 0.5vw 2vw rgba(0,0,0,0.25);
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.ticket-printer::before {
    content: "";
    display: block;
    position: absolute;
    top: 2vw;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1vw;
    background: #bbb;
    border-radius: 0.5vw;
    box-shadow: 0 0.1vw 0.3vw #888;
}

.ticket-printer::after {
    content: "";
    display: block;
    position: absolute;
    bottom: 0.5vw;
    left: 50%;
    transform: translateX(-50%);
    width: 40vw;
    height: 3vw;
    background: repeating-linear-gradient(
            90deg,
            #fff 0 1vw,
            #eee 1vw 2vw
    );
    border-radius: 0 0 0.5vw 0.5vw;
    box-shadow: 0 0.2vw 0.5vw #aaa;
}

.printer-label {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Ticketing', 'Inter', Arial, sans-serif;
    font-size: 2vw;
    color: #fff;
    letter-spacing: 0.15em;
    font-weight: 700;
    z-index: 10;
    text-shadow: 0 2px 8px rgba(0,0,0,0.25);
    pointer-events: none;
}

.print-btn {
    position: absolute;
    right: 50%;
    bottom: 28%;
    transform: translate(50%, -50%);
    background: linear-gradient(180deg, #ff4747 0%, #b80000 100%);
    color: #fff;
    font-size: 2.5vw;
    font-weight: bold;
    border: 0.2vw solid #a10000;
    border-bottom: 0.4vw solid #7a0000;
    border-radius: 1vw;
    padding: 1vw 4vw;
    cursor: pointer;
    box-shadow: 0 0.6vw 1.2vw 0 #a10000, 0 0.2vw 0 #fff inset;
    z-index: 20;
    transition:
            background 0.2s,
            box-shadow 0.2s,
            transform 0.1s;
}

.print-btn:hover {
    background: linear-gradient(180deg, #ff6a3d 0%, #d80606 100%);
    box-shadow: 0 1vw 2vw 0 #a10000, 0 0.2vw 0 #fff inset;
}

.print-btn:active {
    background: linear-gradient(180deg, #d80606 0%, #a10000 100%);
    box-shadow: 0 0.2vw 0.4vw 0 #7a0000;
    transform: translate(50%, -45%) scale(0.97);
}

.page-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 8px 16px;
    font-size: 1.25vw;
    background: transparent;
    color: #e9f5ff;
    z-index: 1000;
    pointer-events: none;
    user-select: none;
}