:root {
    --primary-color: #b4a996;
    --secondary-color: #888072;
    --text-color: #4e4e4e;
    --bg-color-1: #ffffff;
    --bg-color-2: #f8f8f8;
    --bg-color-3: #888072; 
    --hero-drop-color: #b4a996d3;
}
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--text-color);
}
header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-family: "Dancing Script", "Ma Shan Zheng", 'Roboto', sans-serif;
    font-size: 2.0rem;
    font-weight: bold;
    color: var(--primary-color);
}

.logo img {
    width: 40px;
    height: 40px;
    margin-right: 0.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: 1.5rem;
}

.nav-menu li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu li a:hover {
    color: var(--primary-color);
}

.privacy-note {
    text-align: left;
    font-style: italic;
    color: var(--primary-color);
    margin-top: 2rem;
    font-size: 0.9rem;
}
.privacy-note i {
    margin-right: 0.5rem;
}
.wechat-container {
    position: relative;
    display: inline-block;
}

.wechat-link {
    color: var(--primary-color);
    text-decoration: none;
    position: relative;
}

.qr-popover {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.qr-code {
    width: 150px;
    height: 150px;
    display: block;
}

.wechat-container:hover .qr-popover {
    opacity: 1;
    visibility: visible;
}

/* Optional: Add a small arrow to the popover */
.qr-popover::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    border-width: 8px;
    border-style: solid;
    border-color: white transparent transparent transparent;
    transform: translateX(-50%);
}
.contact-details a {
    color: var(--text-color);
    text-decoration: none;        /* Remove underline */
    transition: color 0.3s ease;  /* Smooth color transition on hover */
}
  
.contact-details  a:hover {
    color: var(--primary-color);               /* Color when hovering */
    text-decoration: underline;   /* Add underline on hover */
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.mobile-menu-toggle span {
    width: 30px;
    height: 3px;
    background: var(--primary-color);
    transition: all 0.3s linear;
}
section {
    padding: 6rem 2rem 2rem 3rem;
}
.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}
h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.intro-text h2 {
    font-size: 2rem;
}

p {
    margin-bottom: 1.5rem;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}
.cta-button:hover {
    background-color: var(--bg-color-3);
}

#introduction {
    background-color: var(--bg-color-1);
    padding: 3rem 0;
}

.hero-only {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem 0;
    background-image: url('assets/hero-banner.png');
    background-size: contain;
    background-position: top right;
    background-repeat: no-repeat;
}

/* Hero headline highlight and sizing */
.hero-only h1 {
    margin: 0 auto;
    font-size: clamp(1.25rem, 2vw + 0.5rem, 1.875rem);
    line-height: 1.3;
    font-weight: 600;
    text-align: center;
    color: var(--text-color);
    display: inline-block;
    max-width: min(42rem, 90%);
    background: linear-gradient(transparent 60%, var(--hero-drop-color) 60%);
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    text-wrap: balance;
}

@media (max-width: 768px) {
    .hero-only h1 {
        max-width: min(36rem, 95%);
        padding: clamp(1rem, 6vw, 1.5rem) clamp(1rem, 8vw, 2.25rem);
    }
}

.hero-only h3 {
    font-size: 2rem;
    text-align: center;
    max-width: 60%;
    margin: 0 auto;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.about-image-container {
    flex: 0 0 300px;
    text-align: center; /* Center the image and text */
}

.about-image {
    flex: 0 0 220px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    overflow: hidden;
}

.about-image img {
  width: 220px;     /* 原来 300px，改小 */
  height: 220px;
  object-fit: cover;
}

.about-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 1em;
}

.about-education {
    text-align: left;
    font-size: 0.9rem;   /* 原文较大，这里调小 */
    line-height: 1.4;
}

.about-training,
.about-education-list {
    text-align: left;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* 受训背景列表缩进微调 */
.about-education-list {
  padding-left: 1rem;
}

/* 桌面端左列保持紧凑 */
.about-image-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;   /* 元素间距小一些 */
}

.about-text {
    flex: 1;
}


#services {
    background-color: var(--bg-color-2);
    padding: 1rem 0;
}

.services-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 1rem;
    list-style-type: none;
    padding: 0;
    margin-top: 2rem;
}

.service-item {
    flex: 0 0 calc(25% - 0.8rem); /* 5 items per row, accounting for gap */
    display: flex;
    align-items: center;
}

.service-item i {
    font-size: 1.25rem;
    color: var(--text-color);
    margin-right: 0.75rem;
    width: 20px; /* Fixed width for alignment */
    text-align: center;
}

.service-item span {
    font-size: 0.9rem;
    color: var(--text-color);
}


@media (max-width: 1200px) {
    .service-item {
        flex: 0 0 calc(33.333% - 0.67rem); /* 3 items per row */
    }
}

@media (max-width: 480px) {
    .service-item {
        flex: 0 0 100%; /* 1 item per row */
    }

    .content-wrapper {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .logo img {
        width: 30px;
        height: 30px;
    }

    .about-image {
        flex: 0 0 150px;
        width: 150px;
        height: 150px;
    }
}


#contact {
    background-color: var(--bg-color-1);
    padding: 1rem 0;
}

#testimonial-section {
    background-color: var(--bg-color-2);
    padding: 1rem 0;
}

.contact-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Changed to align-items: flex-start */
    gap: 2rem; /* Reduced gap */
}

.contact-info,
.contact-description {
    flex: 1;
}

.contact-details {
    list-style-type: none;
    padding: 0;
    margin: 0; /* Added margin: 0 */
}
.about-image-container p {
  margin-top: 0.2rem;
  margin-bottom: 0.2rem;
}

.contact-details li {
    display: flex;
    align-items: center;
    margin-bottom: 1rem; /* Reduced margin-bottom */
}

.contact-details i {
    font-size: 1.25rem; /* Slightly reduced icon size */
    color: var(--text-color);
    margin-right: 0.75rem; /* Reduced margin-right */
    width: 20px; /* Reduced width */
    text-align: center;
}

.contact-description {
    text-align: left;
}

.contact-description p {
    margin-bottom: 1rem; /* Reduced margin-bottom */
}

.cta-button {
    display: inline-block;
    margin-top: 0.5rem; /* Reduced margin-top */
}

#contact h2 {
    margin-bottom: 1.5rem; /* Reduced margin-bottom for the heading */
}
.language-switch {
    position: relative;
}
.language-switch button {
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    padding: 0.2rem 0.5rem;
    transition: all 0.3s ease;
    height: 100%;
}
.language-switch button:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.language-switch button::after {
    content: "▼";
    font-size: 0.8rem;
    margin-left: 0.5rem;
}
.language-options {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: none;
    z-index: 1000;
    min-width: 120px;
    margin-top: 0.5rem;
}
.language-options.show {
    display: block;
}
.language-options a {
    display: block;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
}
.language-options a:last-child {
    border-bottom: none;
}
.language-options a:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);;
}
@media (max-width: 768px) {
    #introduction {
        padding: 2rem 0;
    }

    .hero-only h3 {
        font-size: 1.2rem;
        line-height: 1.6;
        padding: 0 1rem;
    }

    .intro-content {
        flex-direction: column;
    }
    .intro-image {
        width: 100%;
        margin-top: 2rem;
    }
    .contact-content {
        flex-direction: column;
        gap: 1.5rem; /* Further reduced gap for mobile */
    }
    
    .contact-info,
    .contact-description {
        width: 100%;
    }

    .about-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .about-image {
        flex: 0 0 200px;
        height: 200px;
        width: 200px;
    }

    .service-item {
        flex: 0 0 calc(50% - 0.5rem); /* 2 items per row */
    }
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        flex-direction: column;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        display: none;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        margin: 0;
        text-align: center;
        padding: 1rem;
    }

    .content-wrapper {
        padding: 0 1rem;
    }
    .language-switch {
        width: 100%;
    }
    .language-switch button {
        width: 80%;
        justify-content: space-between;
    }
    .language-options {
        position: static;
        width: 80%;
        margin-top: 0.5rem;
    }
}

footer {
    background-color: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: 1.5rem 0;
    font-size: 0.9rem;
}

footer p {
    margin: 0;
}

.testimonial-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
}

.testimonial {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 0px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: calc(32% - 20px);
    box-sizing: border-box;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.testimonial:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.testimonial-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 20px;
    object-fit: cover;
    border: 3px solid #f0f0f0;
}

.testimonial blockquote {
    font-size: 1.0em;
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 20px;
}

.testimonial-author {
    font-weight: bold;
    color: var(--text-color);
    margin-top: 15px;
    padding-top: 15px;
    padding-right: 20px;
    border-top: 1px solid #e0e0e0;
    text-align: right;
}

@media (max-width: 768px) {
    .testimonial {
        width: 100%;
    }
}

#activities {
    background-color: var(--bg-color-2);
    padding: 1rem 0;
}

.activity-carousel {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding-bottom: 1rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.activity-card {
    flex: 0 0 250px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    scroll-snap-align: start;
    transition: transform 0.3s ease;
}

.activity-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.activity-card h4 {
    font-size: 1.1rem;
    margin: 1rem 1rem 0.5rem;
    color: var(--text-color);
}

.activity-card p {
    font-size: 0.9rem;
    margin: 0 1rem 1rem;
    color: var(--text-color);
}

.activity-card:hover {
    transform: scale(1.03);
}

.activity-card {
    position: relative; /* Needed for date positioning */
}

.activity-date {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 0.8rem;
    color: var(--text-color);
    opacity: 0.8;
}


#psych-notes {
    background-color: var(--bg-color-1);
    padding: 1rem 0;
}

.notes-carousel {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding-bottom: 1rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;

    scrollbar-width: none;           /* Firefox */
    -ms-overflow-style: none;        /* IE 10+ */
}

.notes-carousel::-webkit-scrollbar {
    display: none;                   /* Chrome, Safari */
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

body > main {
    flex: 1;
}

.note-detail a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.note-detail a:hover {
    text-decoration: underline;
    color: #a08f74; /* Optional: slightly deeper gold on hover */
}

.markdown-body table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.markdown-body th, .markdown-body td { border: 1px solid #e6e6e6; padding: .6rem .75rem; text-align: left; }
.markdown-body thead th { background: #fafafa; color: var(--text-color); }
.markdown-body h3, .markdown-body h4 { color: var(--primary-color); margin: 1.2rem 0 .6rem; }
.markdown-body ul, .markdown-body ol { padding-left: 1.2rem; }
.markdown-body hr { border: 0; border-top: 1px solid #eee; margin: 1.25rem 0; }
.markdown-body {
    max-width: 800px; /* narrower than full content-wrapper */
    margin: 0 auto; /* center horizontally */
    background-color: rgba(250, 250, 250, 0.9); /* slight background */
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); /* subtle shadow */
}

.note-card-container {
    flex: 0 0 250px;
    background-color: var(--bg-color-2);
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    padding: 1rem;
    scroll-snap-align: start;
    font-size: 1.05rem;     /* larger font */
    line-height: 1.3;       /* tighter spacing */
    color: var(--text-color);
    height: 100px;           /* fixed height */
    display: flex;
    align-items: center;

    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.note-card-container a.note-card {
    text-decoration: none;
    color: inherit;
}

.note-card-container:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}


.note-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    height: 100%;
}

.note-title {
    flex: 1;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.note-footer {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.note-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.note-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.note-date {
    font-size: 0.8rem;
    color: #888;
}
.activity-carousel {
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* IE/Edge legacy */
}

.activity-carousel::-webkit-scrollbar {
  display: none;                /* Chrome/Safari */
}
/* Desktop appointment button */
.appointment-btn {
  background-color: var(--primary-color);
  color: #fff !important;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.appointment-btn:hover {
  background-color: transparent;
  border-color: var(--primary-color);
  color: var(--primary-color) !important;;
}

/* Mobile version */
@media (max-width: 768px) {
  .appointment-btn {
    display: block;
    width: 80%;
    margin: 0 auto;
    text-align: center;
  }
}

.half-space {
  display: block;
  height: 0.5em; /* roughly half a line */
}