﻿@import url('https://fonts.googleapis.com/css2?family=Liu+Jian+Mao+Cao&family=Noto+Sans+SC:wght@100..900&family=Noto+Sans:wdth@62.5..100&display=swap');
/* === TITLE BLOCK === */
.title-block {
    background-color: rgba(var(--c2-rgb), 0.85);
    min-height: 110vh;
    padding: 80px 20px 40px;
    position: relative;
    z-index: 2;
}

.title-block-inner {
    width: 100%;
    max-width: 1200px;
    min-width: 640px;
    padding: 0 20px;
    margin: 0 auto;
}

.title-container {
    height: 120px;
    min-height: 120px;
    color: var(--c5);
    text-align: center;
    padding-top: 20px;
}

.section-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 2rem;
}

.section-body {
    padding: 40px 40px;
    background-color: var(--primary-white);
    color: var(--c5);
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 800px;
    margin: auto;
    margin-top: -20px;
}





/* Lightbox Overlay */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}


/* Lightbox Content */
.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* Lightbox Image */
.lightbox-image {
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
    display: block;
    margin: auto;
}

.lightbox-caption {
    position: absolute;
    bottom: 24px;
    left: 24px;
    color: #fff;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.4);
    padding: 6px 12px;
    border-radius: 4px;
    max-width: 80vw;
    line-height: 1.4;
    pointer-events: none;
}

@media (max-width: 768px) {
    .lightbox-caption {
        font-size: 0.85rem;
        bottom: 16px;
        left: 16px;
        padding: 4px 10px;
        max-width: 90vw;
    }
}

/* Close Button */
.close-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 22px;
    background: #ff5a3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

    .close-btn:hover {
        background: #e0482e;
    }

/* Navigation Buttons */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 24px;
    font-weight: bold;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.nav-btn:hover {
    background: #ddd;
}

.nav-btn.left {
    left: 12px;
}

.nav-btn.right {
    right: 12px;
}

.nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}





.travelog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.travelog-post-card {
    display: block;
    background: var(--primary-white);
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: var(--c5);
    overflow: hidden;
    transition: transform 0.2s ease;
}

.travelog-post-card:hover {
    transform: translateY(-4px);
}

.cover-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
}

.cover-image.zoom {
    transform: scale(1.05);
}

.post-content {
    padding: 1rem;
}

.post-content h2 {
    font-size: 1.25rem;
    font-weight: bold;
    margin: 0;
}

.post-content .post-date {
    font-size: 0.9rem;
    color: var(--c4);
    margin: 0.25rem 0;
}

.post-content .excerpt {
    font-size: 1rem;
    color: var(--c5);
    margin-top: 0.5rem;
    line-height: 1.6;
}

/* === Travelog Post View Styles === */

.travelog-post-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

    .travelog-post-header h1 {
        font-size: 2.5rem;
        font-weight: 700;
        color: var(--c5);
        margin-bottom: 0.5rem;
        line-height: 1.2;
    }

.travelog-post-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5em 0;
}

.travelog-post-date,
.travelog-post-location {
    font-size: 0.95rem;
}



.travelog-post-date {
    font-size: 1rem;
    color: var(--c5);
    padding-top:20px;
}

.travelog-post-cover {
    margin-bottom: 2rem;
    text-align: center;
}

    .travelog-post-cover img {
        max-width: 100%;
        border-radius: 10px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        object-fit: cover;
    }

.travelog-post-body {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--c5);
}

    .travelog-post-body p {
        margin-bottom: 1.5em;
        text-align: justify;
    }

    .travelog-post-body img {
        max-width: 100%;
        margin: 1.5rem 0;
        border-radius: 6px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    }

/* Previous/Next Post Navigation */
.travelog-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--hover-gray);
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-link {
    text-decoration: none;
    padding: 12px 18px;
    border-radius: 6px;
    background-color: var(--primary-gray);
    color: var(--c5);
    font-weight: 500;
    transition: background-color 0.3s ease;
    max-width: 48%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-link:hover {
    background-color: var(--hover-gray);
    color: var(--primary-orange);
}

.nav-link.prev {
    text-align: left;
}

.nav-link.next {
    text-align: right;
    margin-left: auto;
}

.post-p {
    padding-bottom: 20px;
}


/* class book */

.classbook-wrapper {
    width: 90%;
    margin: 0 auto;
    font-size: 16px;
}

.classbook-header,
.classbook-row {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr 1fr;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid #ccc;
}

.classbook-header {
    font-weight: bold;
    background-color: var(--hover-gray);
}

.classbook-row.rowon {
    background-color: #f9f9f9;
}

.classbook-row.rowoff {
    background-color: #fff;
}

.classbook-col {
    word-break: break-word;
}

.text-right {
    text-align: right;
}

.classbook-row.empty {
    text-align: center;
    padding: 20px;
    font-style: italic;
}

.classbook-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid #ccc;
}

.pagination-controls img {
    vertical-align: middle;
    margin-right: 5px;
}

/* Responsive Behavior */
@media (max-width: 768px) {
    .classbook-header {
        display: none;
    }

    .classbook-row {
        display: block;
        border: 1px solid #ccc;
        margin-bottom: 10px;
    }

    .classbook-col {
        display: flex;
        justify-content: space-between;
        padding: 8px 10px;
        border-bottom: 1px solid #eee;
    }

        .classbook-col:last-child {
            border-bottom: none;
        }

        .classbook-col::before {
            content: attr(data-label);
            font-weight: bold;
            margin-right: 10px;
        }
}


/* classmate */
.classmate-profile-wrapper {
    width: 90%;
    margin: 0 auto;
    font-size: 16px;
}

.classmate-card {
    background-color: #fff;
    border: 1px solid #000;
    padding: 20px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.classmate-title {
    text-align: center;
    font-weight: bold;
    margin-bottom: 1em;
}

.profile-empty {
    text-align: center;
    font-style: italic;
    padding: 20px;
}

.classmate-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-group {
    display: flex;
    flex-wrap: wrap;
}

.info-label {
    flex: 0 0 150px;
    font-weight: bold;
    text-align: right;
    padding-right: 10px;
}

.info-value {
    flex: 1;
    word-break: break-word;
}

hr {
    margin: 20px 0;
    border: none;
    border-top: 1px solid #ddd;
}

.classmate-backlink {
    margin-top: 20px;
    text-align: right;
}

/* Responsive handling */
@media (max-width: 768px) {
    .info-group {
        flex-wrap: wrap;
        flex-direction: row;
        margin-bottom: 4px;
    }

    .info-label {
        flex: 0 0 auto;
        font-weight: bold;
        margin-right: 6px;
        padding: 0;
        text-align: left;
    }

    .info-value {
        flex: 1 1 auto;
        padding: 0;
        margin: 0;
    }
}



/* Row stays split: date left, location right */
.travelog-post-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    position: relative; /* anchor for the bar */
    overflow: visible;
}

/* Location as a text-like button (so it can be focused/clicked) */
.travelog-post-location.as-link {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: help;
}

/* Full-width tooltip bar, rendered under the row without changing layout */
.tooltip-bar {
    position: absolute;
    left: 0;
    right: 0; /* -> width: 100% of content block */
    top: calc(100% + 8px); /* just below the row */
    z-index: 999;
    /* styling */
    text-align: left;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,.15);
    background: var(--tooltip-bg, #111);
    color: var(--tooltip-fg, #fff);
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
    font-size: .95rem;
    line-height: 1.5;
    writing-mode: horizontal-tb; 
    white-space: pre-wrap;
}

/* Arrow aligned to the right side (where the location sits) */
.tooltip-bar::before {
    content: "";
    position: absolute;
    top: -8px;
    right: 16px; /* tweak if you want it nearer the text */
    border: 8px solid transparent;
    border-bottom-color: var(--tooltip-bg, #111);
}

/* Alpine cloak */
[x-cloak] {
    display: none !important;
}

