﻿/* Fonts */
:root {
  --default-font: "Roboto", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --heading-font: "Raleway", sans-serif;
  --nav-font: "PoppinsLocal", sans-serif;
}

/* Global Colors - The following color variables are used throughout the website. Updating them here will change the color scheme of the entire website */
:root { 
  --background-color: #ffffff; /* Background color for the entire website, including individual sections */
  --default-color: #272829; /* Default color used for the majority of the text content across the entire website */
  --heading-color: #45505b; /* Color for headings, subheadings and title throughout the website */
  --accent-color: #0563bb; /* Accent color that represents your brand on the website. It's used for buttons, links, and other elements that need to stand out */
  --surface-color: #ffffff; /* The surface color is used as a background of boxed elements within sections, such as cards, icon boxes, or other elements that require a visual separation from the global background. */
  --contrast-color: #ffffff; /* Contrast color for text, ensuring readability against backgrounds of accent, heading, or default colors. */
}

/* Nav Menu Colors - The following color variables are used specifically for the navigation menu. They are separate from the global colors to allow for more customization options */
:root {
  --nav-color: #45505b;  /* The default color of the main navmenu links */
  --nav-hover-color: #0563bb; /* Applied to main navmenu links when they are hovered over or active */
  --nav-mobile-background-color: #ffffff; /* Used as the background color for mobile navigation menu */
  --nav-dropdown-background-color: #ffffff; /* Used as the background color for dropdown items that appear when hovering over primary navigation items */
  --nav-dropdown-color: #212529; /* Used for navigation links of the dropdown items in the navigation menu. */
  --nav-dropdown-hover-color: #0563bb; /* Similar to --nav-hover-color, this color is applied to dropdown navigation links when they are hovered over. */
}

/* Color Presets - These classes override global colors when applied to any section or element, providing reuse of the sam color scheme. */

.light-background {
  --background-color: #f9f9f9;
  --surface-color: #ffffff;
}

.dark-background {
  --background-color: #060606;
  --default-color: #ffffff;
  --heading-color: #ffffff;
  --surface-color: #252525;
  --contrast-color: #ffffff;
}

/* Smooth scroll */
:root {
  scroll-behavior: smooth;
}


/*--------------------------------------------------------------
# test - This is a test comment to ensure the CSS file is working correctly.
--------------------------------------------------------------*/

/*--------------------------------------------------------------
# General Styling & Shared Classes
--------------------------------------------------------------*/
body {
  color: var(--default-color);
  background-color: var(--background-color);
  font-family: var(--default-font);
}

.body_img img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.body_img .img-mask::before {
    content: "";
    background: color-mix(in srgb, var(--background-color), transparent 30%);
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: 0.3s;
}

a:hover {
  color: color-mix(in srgb, var(--accent-color), transparent 25%);
  text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--heading-color);
  font-family: var(--heading-font);
}

/* 歡迎訊息彈跳動畫 */
.bounce-in-center {
    opacity: 0;
    animation: bounceInCenter 1s both;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    font-size: 1.5rem;
}

@keyframes bounceInCenter {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 歡迎訊息滑入動畫 */
.slide-in-bottom {
    opacity: 0;
    transform: translateY(40px);
    animation: slideInBottom 0.8s cubic-bezier(.68,-0.55,.27,1.55) forwards;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    font-size: 1.5rem;
}

@keyframes slideInBottom {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/*--------------------------------------------------------------
# Global Header
--------------------------------------------------------------*/
.header {
  color: var(--default-color);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  padding: 0 15px;
  transition: all ease-in-out 0.3s;
  overflow-y: auto;
  z-index: 997;
  min-width: 200px;
}

@media (max-width: 1199px) {
  .header {
    background-color: var(--background-color);
    border-right: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
    width: 300px;
    left: -100%;
  }
}

@media (min-width: 1200px) and (max-width: 1600px) {
  .header~main {
    margin-left: 160px;
  }

  .header~main .hero {
    margin-left: -160px;
    width: 100vw;
  }
}

.header.header-show {
  left: 0;
}

.header .header-toggle {
  color: var(--contrast-color);
  background-color: var(--accent-color);
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 9999;
  transition: background-color 0.3s;
}

.header .header-toggle:hover {
  color: var(--contrast-color);
  background-color: color-mix(in srgb, var(--accent-color) 90%, white 15%);
}



/*--------------------------------------------------------------
# search-bar Journal
--------------------------------------------------------------*/

.search-bar {
    max-width: 420px;
    padding: 10px 18px;
    margin-bottom: 24px;
    margin-left: auto;
    margin-right: auto;
    border: 2px solid #4e9af1; /* 主色系框線 */
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 1px 8px rgba(30,107,184,0.06);
}

    .search-bar input[type="text"] {
        font-size: 1rem;
        padding: 8px 14px;
    }

    .search-bar button {
        font-size: 1rem;
        padding: 8px 18px;
    }

    .search-bar:focus-within {
        box-shadow: 0 4px 24px rgba(0,0,0,0.13);
        border-color: #0563bb; /* 聚焦時主色加深 */
    }

        .search-bar input[type="text"] {
        flex: 1;
        border: none;
        outline: none;
        background: #fff;
        padding: 12px 20px;
        border-radius: 24px;
        font-size: 1.1rem;
        color: #333;
        box-shadow: 0 1px 4px rgba(0,0,0,0.04);
        transition: box-shadow 0.2s;
    }

        .search-bar input[type="text"]:focus {
            box-shadow: 0 2px 8px rgba(0,0,0,0.10);
        }

    .search-bar button {
        background: linear-gradient(90deg, #4e9af1 0%, #1e6bb8 100%);
        color: #fff;
        border: none;
        border-radius: 24px;
        padding: 12px 28px;
        font-size: 1.1rem;
        font-family: inherit;
        font-weight: bold;
        letter-spacing: 1px;
        cursor: pointer;
        box-shadow: 0 1px 4px rgba(0,0,0,0.08);
        transition: background 0.2s, box-shadow 0.2s;
        position: relative;
        overflow: hidden;
    }

        .search-bar button::after {
            content: "🔍";
            position: absolute;
            right: 18px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 1.2rem;
            opacity: 0.7;
            pointer-events: none;
        }

        .search-bar button:hover {
            background: linear-gradient(90deg, #1e6bb8 0%, #4e9af1 100%);
            box-shadow: 0 2px 8px rgba(0,0,0,0.13);
        }

@media (max-width: 600px) {
    .search-bar {
        max-width: 98vw;
        width: 100%;
        padding: 10px 4px;
        margin-bottom: 18px;
        border-radius: 14px;
        box-shadow: 0 1px 6px rgba(30,107,184,0.08);
    }

        .search-bar > div {
            flex-direction: column !important;
            gap: 8px !important;
            align-items: stretch !important;
        }

        .search-bar input[type="text"] {
            width: 100%;
            font-size: 1rem;
            padding: 10px 12px;
            border-radius: 14px;
            margin-bottom: 6px;
        }

        .search-bar button {
            width: 100%;
            font-size: 1rem;
            padding: 10px 12px;
            border-radius: 14px;
            margin-bottom: 6px;
        }

        .search-bar label,
        .search-bar select,
        #page-info {
            font-size: 0.98rem !important;
        }

        .search-bar select {
            width: 100px;
            min-width: 80px;
            border-radius: 14px;
            padding: 8px 10px;
        }

    #page-info {
        margin-left: 0 !important;
        margin-top: 6px;
        display: block;
        text-align: right;
    }
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 900px) {
    .search-results-list {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 18px;
        max-width: 900px;
    }
}

.search-result-item {
    background: linear-gradient(90deg, #f8f8f8 0%, #e0e0e0 100%);
    border-radius: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    border-left: 4px solid #4e9af1;
    position: relative;
    width: 100%;
}

.search-result-index {
    display: inline-block;
    width: 2em;
    height: 2em;
    line-height: 2em;
    text-align: center;
    font-weight: 600;
    font-size: 1em;
    color: #333;
    background: #e9ecef;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
}

.search-result-title,
.search-result-author,
.search-result-issue,
.search-result-page,
.search-result-pdf {
    font-size: 1rem;
    color: #333;
    margin-bottom: 6px;
    word-break: break-all;
}

.search-result-title {
    font-weight: 600;
    color: #1e6bb8;
    font-family: var(--heading-font);
    margin-bottom: 10px;
}

.search-result-author::before {
    content: "👤 作者：";
    margin-right: 2px;
    color: #4e9af1;
}

.search-result-issue::before {
    content: "📖 期數：";
    margin-right: 2px;
    color: #4e9af1;
}

.search-result-page::before {
    content: "📄 頁次：";
    margin-right: 2px;
    color: #4e9af1;
}

.search-result-pdf::before {
    content: "📎 查詢結果：";
    color: #4e9af1;
    margin-right: 2px;
}

@media (max-width: 600px) {
    .search-results-list {
        max-width: 98vw;
    }

    .search-result-item {
        padding: 10px 8px;
        border-radius: 10px;
    }

    .search-result-title,
    .search-result-author,
    .search-result-issue,
    .search-result-page,
    .search-result-pdf {
        font-size: 0.95rem;
    }
}

.page-loading {
    width: 50px;
    height: 50px;
    position: relative;
    margin: 20px auto;
    display: block;
}

    .page-loading::after {
        content: ' ';
        display: block;
        width: 100%;
        height: 100%;
        background-size: contain;
        background-image: url('/assets/images/dark-loader.gif');
    }

/* 美化每頁顯示選單 */
#page-size {
    border: 1px solid #4e9af1;
    border-radius: 18px;
    padding: 8px 18px;
    font-size: 1rem;
    background: #fff;
    color: #1e6bb8;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    transition: border-color 0.2s, box-shadow 0.2s;
}

    #page-size:focus {
        border-color: #0563bb;
        box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    }

/* 美化分頁按鈕 */
#pagination button {
    background: linear-gradient(90deg, #4e9af1 0%, #1e6bb8 100%);
    color: #fff;
    border: none;
    border-radius: 18px;
    padding: 8px 18px;
    margin: 0 4px 6px 0;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: background 0.2s, box-shadow 0.2s;
    outline: none;
}

    #pagination button.active,
    #pagination button:active {
        background: linear-gradient(90deg, #1e6bb8 0%, #4e9af1 100%);
        font-weight: bold;
        box-shadow: 0 2px 8px rgba(0,0,0,0.13);
    }

    #pagination button:disabled {
        background: #e0e0e0;
        color: #aaa;
        cursor: not-allowed;
        box-shadow: none;
    }

    #pagination button:hover:not(:disabled) {
        background: linear-gradient(90deg, #1e6bb8 0%, #4e9af1 100%);
        color: #fff;
        box-shadow: 0 2px 8px rgba(0,0,0,0.13);
    }

#global-loading {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.global-loading-spinner {
    width: 48px;
    height: 48px;
    border: 5px solid #e9ecef;
    border-top: 5px solid #4e73df;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.global-loading-text {
    color: #333;
    font-size: 1.1em;
    font-weight: 500;
}


/*--------------------------------------------------------------
# Activity 
--------------------------------------------------------------*/

.activity-card {
    border: 2px solid #1976d2;
    border-radius: 0.8rem;
    /*box-shadow: 0 4px 16px rgba(25,118,210,0.08);
    background: transparent;*/
}

.activity-left {
    min-width: 120px;
    border-right: 1px solid #64b5f6;
    padding-right: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.activity-date-title {
    color: #1976d2;
    font-weight: 600;
    letter-spacing: 1px;
}

.activity-date-value {
    background: #2196f3;
    color: #fff;
    border-radius: 1.5rem;
    padding: 0.5rem 1.2rem;
    font-size: 1.1em;
    margin-top: 0.5rem;
    margin-left: 0.5rem;
    box-shadow: 0 2px 8px #90caf9;
}

.detail-btn {
    background: linear-gradient(90deg,#64b5f6 60%,#52357B 100%);
    color: #fff;
    border-radius: 1.2rem;
    font-weight: 500;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px #90caf9;
    transition: background 0.3s, color 0.3s;
}

    .detail-btn:hover, .detail-btn:focus {
        background: linear-gradient(90deg, #1976d2 60%, #0d47a1 100%) !important;
        color: #fff !important;
    }

.activity-right {
    flex-grow: 1;
    min-width: 320px;
    max-width: 100%;
    padding-left: 1.5rem;
}

.activity-row {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px dashed #64b5f6;
    margin-right: 10px;
}

.activity-label {
    color: #1976d2;
    font-weight: 500;
    margin-top: 0.5em;
}

.activity-class {
    background: #90caf9;
    color: #0d47a1;
    border-radius: 1rem;
    padding: 0.2rem 0.8rem;
    font-size: 1em;
}

.activity-period {
    font-size: 1em;
    color: #1976d2;
    margin-top: 0.8rem;
    white-space: normal;
}

.activity-search-form:focus-within {
    box-shadow: 0 0 0 0.15rem #1976d233;
    border-color: #1976d2;
}

.activity-search-form .form-control:focus {
    box-shadow: none;
    border-color: #1976d2;
}

.activity-search-form .btn-primary:hover,
.activity-search-form .btn-primary:focus {
    background: #1976d2;
}

@media (max-width: 767.98px) {
    .activity-card-body {
        flex-direction: column !important;
    }

    .activity-left, .activity-right {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/*--------------------------------------------------------------
# news 增刪改查
--------------------------------------------------------------*/
input[readonly] {
    background-color: #e9ecef;
    color: #495057;
}

#news .form-group {
    margin-bottom: 10px;
}

#news th.content-col, td.content-col {
    width: 400px;
    max-width: 400px;
    word-break: break-all;
    white-space: normal;
}

#news.section {
    width: 100vw;
    min-height:100vh;
    margin: 80px;
    padding: 0 0.5rem;
}

@media (max-width: 768px) {

    #news.section {
        margin: 10px;
    }
}

/*--------------------------------------------------------------
# timeline 
--------------------------------------------------------------*/

.timeline {
    position: relative;
    margin: 20px auto;
    padding-left: 30px;
    border-left: 2px solid #0563bb;
    max-width: 600px; /* 可依需求調整最大寬度 */
}

.timeline-item {
    margin-bottom: 20px;
    position: relative;
}

.timeline-title {
    font-size: 1.1em;
    color: #333;
    font-weight: 600;
}

.timeline-date {
    font-weight: bold;
    color: #0563bb;
    margin-bottom: 5px;
    margin-left: 10px;
}

.timeline-content {
    background: #f5f5f5;
    padding: 10px 15px;
    border-radius: 5px;
    display: inline-block;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 8px;
    width: 12px;
    height: 12px;
    background: #0563bb;
    border-radius: 50%;
}

/*--------------------------------------------------------------
# Navigation Menu
--------------------------------------------------------------*/
.navmenu {
    padding: 0;
    z-index: 9997;
}

.navmenu ul {
  list-style: none;
  padding: 0 0 20px 0;
  margin: 0;
  width: 140px;
}

.navmenu a,
.navmenu a:focus {
  color: var(--nav-color);
  font-family: var(--nav-font);
  display: flex;
  align-items: center;
  padding: 10px 18px;
  margin-bottom: 8px;
  font-size: 15px;
  border-radius: 50px;
  background: color-mix(in srgb, var(--default-color), transparent 92%);
  height: 56px;
  width: 100%;
  overflow: hidden;
  transition: 0.3s;
}


.navmenu a i,
.navmenu a:focus i {
  font-size: 20px;
}

.navmenu a span,
.navmenu a:focus span {
  padding: 0 5px 0 7px;
}

/*20250909 laurence menu bar 不縮進去*/
/*@media (min-width: 992px) {

  .navmenu a,
  .navmenu a:focus {
    max-width: 56px;
  }

  .navmenu a span,
  .navmenu a:focus span {
    display: none;
  }
}*/

.navmenu a:hover,
.navmenu .active,
.navmenu .active:focus,
.navmenu li:hover>a {
  color: var(--contrast-color);
  background: var(--nav-hover-color);
}

.navmenu a:hover,
.navmenu li:hover>a {
  max-width: 100%;
  color: var(--contrast-color);
}

.navmenu a:hover span,
.navmenu li:hover>a span {
  display: block;
}

/*--------------------------------------------------------------
# Global Footer
--------------------------------------------------------------*/
.footer {
  color: var(--default-color);
  background-color: var(--background-color);
  font-size: 14px;
  text-align: center;
  padding: 30px 0;
  position: relative;
}

.footer h3 {
  font-size: 36px;
  font-weight: 700;
  position: relative;
  padding: 0;
  margin: 0 0 15px 0;
}

.footer p {
  font-size: 15;
  font-style: italic;
  padding: 0;
  margin: 0 0 30px 0;
}

.footer .social-links {
  margin: 0 0 30px 0;
}

.footer .social-links a {
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-color);
  color: var(--contrast-color);
  line-height: 1;
  margin: 0 4px;
  border-radius: 50%;
  text-align: center;
  width: 36px;
  height: 36px;
  transition: 0.3s;
}

.footer .social-links a:hover {
  background: color-mix(in srgb, var(--accent-color), transparent 20%);
  text-decoration: none;
}

.footer .copyright {
  padding-top: 25px;
  border-top: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
}

.footer .credits {
  font-size: 13px;
  padding-top: 5px;
}

/*--------------------------------------------------------------
# Preloader
--------------------------------------------------------------*/
#preloader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  overflow: hidden;
  background: var(--background-color);
  transition: all 0.6s ease-out;
}

#preloader:before {
  content: "";
  position: fixed;
  top: calc(50% - 30px);
  left: calc(50% - 30px);
  border: 6px solid #ffffff;
  border-color: var(--accent-color) transparent var(--accent-color) transparent;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: animate-preloader 1.5s linear infinite;
}

@keyframes animate-preloader {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/*--------------------------------------------------------------
# Scroll Top Button
--------------------------------------------------------------*/
.scroll-top {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  right: 15px;
  bottom: -15px;
  z-index: 99999;
  background-color: var(--accent-color);
  width: 44px;
  height: 44px;
  border-radius: 50px;
  transition: all 0.4s;
}

.scroll-top i {
  font-size: 24px;
  color: var(--contrast-color);
  line-height: 0;
}

.scroll-top:hover {
  background-color: color-mix(in srgb, var(--accent-color), transparent 20%);
  color: var(--contrast-color);
}

.scroll-top.active {
  visibility: visible;
  opacity: 1;
  bottom: 15px;
}

/*--------------------------------------------------------------
# Disable aos animation delay on mobile devices
--------------------------------------------------------------*/
@media screen and (max-width: 768px) {
  [data-aos-delay] {
    transition-delay: 0 !important;
  }
}

/*--------------------------------------------------------------
# Global Sections
--------------------------------------------------------------*/
section,
.section {
  color: var(--default-color);
  background-color: var(--background-color);
  padding: 60px 0;
  overflow: clip;
}

/*--------------------------------------------------------------
# Global Section Titles
--------------------------------------------------------------*/
.section-title {
  text-align: center;
  padding-bottom: 30px;
  position: relative;
}

.section-title h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 20px;
  position: relative;
}

.section-title h2:before {
  content: "";
  position: absolute;
  display: block;
  width: 160px;
  height: 1px;
  background: color-mix(in srgb, var(--default-color), transparent 60%);
  left: 0;
  right: 0;
  bottom: 1px;
  margin: auto;
}

.section-title h2::after {
  content: "";
  position: absolute;
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent-color);
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
}

.section-title p {
  margin-bottom: 0;
}

.info-highlight {
    font-size: 1.15rem;
    background: linear-gradient(90deg,#e3f2fd 0%,#fff 100%);
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(25,118,210,0.10);
    padding: 1rem 1.5rem;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
    text-align: left;
    display: block;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}


    .info-highlight .first-char {
        font-size: 1.35em;
        font-weight: bold;
        color: #1565c0;
    }

/* 手機排版優化 */
@media (max-width: 600px) {
    .info-highlight {
        max-width: 98vw;
        padding: 0.8rem 0.5rem;
        font-size: 1rem;
        border-radius: 0.7rem;
    }
}


/*--------------------------------------------------------------
# Global Section Activity
--------------------------------------------------------------*/

.text-secondary, .text-success, .text-danger {
    margin-left: 10px;
    white-space: nowrap !important;
    text-align: left !important;
}






/*--------------------------------------------------------------
# Hero Section
--------------------------------------------------------------*/
.hero {
  width: 100%;
  min-height: 100vh;
  position: relative;
  padding: 80px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

/*.hero:before {
  content: "";
  background: color-mix(in srgb, var(--background-color), transparent 30%);
  position: absolute;
  inset: 0;
  z-index: 2;
}*/

.hero .container {
  position: relative;
  z-index: 3;
}

.hero h2 {
  margin: 0;
  font-size: 64px;
  font-weight: 700;
}

.hero p {
  margin: 5px 0 0 0;
  font-size: 26px;
}

.hero p span {
  letter-spacing: 1px;
  border-bottom: 2px solid var(--accent-color);
}

.hero .social-links {
  margin-top: 25px;
}

.hero .social-links a {
  font-size: 20px;
  display: inline-block;
  color: color-mix(in srgb, var(--default-color), transparent 30%);
  line-height: 1;
  margin-right: 20px;
  transition: 0.3s;
}

.hero .social-links a:hover {
  color: var(--accent-color);
}

@media (max-width: 768px) {
  .hero h2 {
    font-size: 32px;
  }

  .hero p {
    font-size: 20px;
  }
}

/*--------------------------------------------------------------
# About Section
--------------------------------------------------------------*/
.about .content h2 {
  font-weight: 700;
  font-size: 24px;
}

.about .content ul {
  list-style: none;
  padding: 0;
}

.about .content ul li {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

.about .content ul strong {
  margin-right: 10px;
}

.about .content ul i {
  font-size: 16px;
  margin-right: 5px;
  color: var(--accent-color);
  line-height: 0;
}

/*--------------------------------------------------------------
# Stats Section
--------------------------------------------------------------*/
.stats i {
  background-color: var(--accent-color);
  color: var(--contrast-color);
  width: 54px;
  height: 54px;
  font-size: 24px;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.stats .stats-item {
  margin-top: 10px;
  width: 100%;
  position: relative;
  text-align: center;
  z-index: 0;
}

.stats .stats-item span {
  font-size: 36px;
  display: block;
  font-weight: 700;
  color: color-mix(in srgb, var(--default-color), transparent 20%);
}

.stats .stats-item p {
  padding: 0;
  margin: 0;
  color: color-mix(in srgb, var(--default-color), transparent 50%);
  font-size: 16px;
}

/*--------------------------------------------------------------
# Resume Section
--------------------------------------------------------------*/

.resume .resume-title {
    color: #49436b;
    font-size: 26px;
    font-weight: 700;
    margin-top: 20px;
    margin-bottom: 20px;
}

.resume .resume-item {
  padding: 0 0 20px 20px;
  margin-top: -2px;
  border-left: 2px solid var(--accent-color);
  position: relative;
}

.resume .resume-item h4 {
  line-height: 18px;
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--default-color), transparent 20%);
  margin-bottom: 10px;
}

.resume .resume-item h5 {
  font-size: 16px;
  padding: 5px 15px;
  display: inline-block;
  font-weight: 600;
  margin-bottom: 10px;
}

.resume .resume-item ul {
  padding-left: 20px;
}

.resume .resume-item ul li {
  padding-bottom: 10px;
}

.resume .resume-item:last-child {
  padding-bottom: 0;
}

.resume .resume-item::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50px;
  left: -9px;
  top: 0;
  background: var(--background-color);
  border: 2px solid var(--accent-color);
}

/*--------------------------------------------------------------
# Portfolio Section
--------------------------------------------------------------*/
.portfolio .portfolio-filters {
  padding: 0;
  margin: 0 auto 20px auto;
  list-style: none;
  text-align: center;
}

.portfolio .portfolio-filters li {
  cursor: pointer;
  display: inline-block;
  padding: 8px 20px 10px 20px;
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  margin-bottom: 5px;
  border-radius: 50px;
  transition: all 0.3s ease-in-out;
  font-family: var(--heading-font);
}

.portfolio .portfolio-filters li:hover,
.portfolio .portfolio-filters li.filter-active {
  color: var(--contrast-color);
  background-color: var(--accent-color);
}

.portfolio .portfolio-filters li:first-child {
  margin-left: 0;
}

.portfolio .portfolio-filters li:last-child {
  margin-right: 0;
}

@media (max-width: 575px) {
  .portfolio .portfolio-filters li {
    font-size: 14px;
    margin: 0 0 10px 0;
  }
}

.portfolio .portfolio-item {
  position: relative;
  overflow: hidden;
}

.portfolio .portfolio-item .portfolio-info {
  opacity: 0;
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -100%;
  z-index: 3;
  transition: all ease-in-out 0.5s;
  background: color-mix(in srgb, var(--background-color), transparent 10%);
  padding: 15px;
}

.portfolio .portfolio-item .portfolio-info h4 {
  font-size: 18px;
  font-weight: 600;
  padding-right: 50px;
}

.portfolio .portfolio-item .portfolio-info p {
  color: color-mix(in srgb, var(--default-color), transparent 30%);
  font-size: 14px;
  margin-bottom: 0;
  padding-right: 55px;
}

.portfolio .portfolio-item .portfolio-info .preview-link,
.portfolio .portfolio-item .portfolio-info .details-link {
  position: absolute;
  right: 50px;
  font-size: 24px;
  top: calc(50% - 14px);
  color: color-mix(in srgb, var(--default-color), transparent 30%);
  transition: 0.3s;
  line-height: 0;
}

.portfolio .portfolio-item .portfolio-info .preview-link:hover,
.portfolio .portfolio-item .portfolio-info .details-link:hover {
  color: var(--accent-color);
}

.portfolio .portfolio-item .portfolio-info .details-link {
  right: 14px;
  font-size: 28px;
}

.portfolio .portfolio-item:hover .portfolio-info {
  opacity: 1;
  bottom: 0;
}


/*--------------------------------------------------------------
# Contact Section
--------------------------------------------------------------*/
.contact .info-item+.info-item {
  margin-top: 40px;
}

.contact .info-item i {
  color: var(--accent-color);
  background: color-mix(in srgb, var(--accent-color), transparent 92%);
  font-size: 20px;
  width: 44px;
  height: 44px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50px;
  transition: all 0.3s ease-in-out;
  margin-right: 15px;
}

.contact .info-item h3 {
  padding: 0;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 5px;
}

.contact .info-item p {
  padding: 0;
  margin-bottom: 0;
  font-size: 14px;
}

.contact .info-item:hover i {
  background: var(--accent-color);
  color: var(--contrast-color);
}

.contact .php-email-form {
  height: 100%;
}

.contact .php-email-form input[type=text],
.contact .php-email-form input[type=email],
.contact .php-email-form textarea {
  font-size: 14px;
  padding: 10px 15px;
  box-shadow: none;
  border-radius: 0;
  color: var(--default-color);
  background-color: color-mix(in srgb, var(--background-color), transparent 50%);
  border-color: color-mix(in srgb, var(--default-color), transparent 80%);
}

.contact .php-email-form input[type=text]:focus,
.contact .php-email-form input[type=email]:focus,
.contact .php-email-form textarea:focus {
  border-color: var(--accent-color);
}

.contact .php-email-form input[type=text]::placeholder,
.contact .php-email-form input[type=email]::placeholder,
.contact .php-email-form textarea::placeholder {
  color: color-mix(in srgb, var(--default-color), transparent 70%);
}

.contact .php-email-form button[type=submit] {
  color: var(--contrast-color);
  background: var(--accent-color);
  border: 0;
  padding: 10px 30px;
  transition: 0.4s;
  border-radius: 50px;
}

.contact .php-email-form button[type=submit]:hover {
  background: color-mix(in srgb, var(--accent-color), transparent 25%);
}

/*--------------------------------------------------------------
# Book Section Section
--------------------------------------------------------------*/
/* 美化 .thumbnail 書籍縮圖 */
.thumbnail {
    /*display: inline-block;*/
    width: 90px;
    height: 120px;
    background: linear-gradient(120deg, #e0e7ef 0%, #cfd8e3 100%);
    margin: 0 8px 12px 8px;
    cursor: pointer;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(30,107,184,0.10);
    border: 2px solid #4e9af1;
    position: relative;
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.18s;
    overflow: hidden;
    vertical-align: middle;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start; /* 使內容靠左 */
    text-align: left; /* 文字左對齊 */
    padding: 12px 10px; /* 增加內距讓文字不貼邊 */
}

    .thumbnail:hover,
    .thumbnail:focus {
        border-color: #0563bb;
        box-shadow: 0 4px 16px rgba(30,107,184,0.18);
        transform: translateY(-4px) scale(1.04);
        z-index: 2;
    }

    .thumbnail[data-aos] {
        transition: box-shadow 0.2s, border-color 0.2s, transform 0.18s, opacity 0.3s;
    }

    .thumbnail::after {
        content: "";
        display: block;
        position: absolute;
        inset: 0;
        border-radius: 12px;
        pointer-events: none;
        box-shadow: 0 0 0 2px rgba(30,107,184,0.08);
        opacity: 0.5;
    }

    .thumbnail[data-book-id]:before {
        position: absolute;
        top: 6px;
        left: 0;
        right: 0;
        text-align: center;
        font-size: 0.95rem;
        color: #4e9af1;
        font-weight: 600;
        letter-spacing: 1px;
        opacity: 0.7;
        z-index: 1;
    }

.books {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    flex-wrap: wrap;
    width: 100%;
    min-height: 120px;
    gap: 8px;
}

.search-more-link-a {
    color: #0563bb !important;
    font-weight: 600;
    font-size: 1.08rem;
    transition: color 0.2s, background 0.2s, text-decoration 0.2s;
    text-decoration: underline dotted #0563bb 1.5px;
    cursor: pointer;
    background: transparent;
    border-radius: 6px;
    padding: 2px 6px;
    display: inline-block;
}

    .search-more-link-a:hover,
    .search-more-link-a:focus {
        color: #1e6bb8 !important;
        background: #eaf4ff;
        text-decoration: underline solid #1e6bb8 2px;
    }


@media (max-width: 600px) {
    .books {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    .thumbnail {
        width: 96vw !important;
        min-width: 0 !important;
        max-width: 98% !important;
        height: auto !important;
        font-size: 1rem !important;
        margin: 0 auto 10px auto !important;
        box-sizing: border-box !important;
        padding: 14px 10px !important;
    }
}
