/* CSS Reset & General Settings */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans HK', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: #1f2937;
    background-color: #fcfdfd;
    line-height: 1.6;
    scroll-behavior: smooth;
}

a {
    color: #262626;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #1e3a8a;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 13px 30px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    letter-spacing: 0.3px;
}

.btn-primary {
    background-color: #1e3a8a;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(30, 58, 138, 0.35);
}

.btn-primary:hover {
    background-color: #16297a;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(30, 58, 138, 0.45);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.55);
}

.btn-secondary:hover {
    background-color: #ffffff;
    color: #1e3a8a;
    transform: translateY(-2px);
}

.btn-block {
    display: block;
    width: 100%;
}

/* Hero Section */

/* 確保 Hero Section 是相對定位，並且有固定或最小高度 */
.hero-section {
    position: relative;
    overflow: hidden;
    min-height: 62vh; /* 內容精簡後，調低高度讓版面更緊湊聚焦 */
    display: flex;
    align-items: center;
    margin-top: 60px;
}

/* 幻燈片總容器（尺寸略大於容器，供 parallax 位移使用不露白邊） */
.hero-slideshow {
    position: absolute;
    top: -25%;
    left: 0;
    width: 100%;
    height: 150%;
    z-index: 1; /* 放到底層 */
    will-change: transform;
}

/* 單張幻燈片樣式 */
.hero-slideshow .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.5s ease-in-out; /* 淡入淡出速度：1.5秒 */
}

/* 顯示中的幻燈片 */
.hero-slideshow .slide.active {
    opacity: 1;
}

/* 半透明遮罩：防止圖片顏色太亮導致看不到文字，並加深左側漸層讓文字更突出 */
.slideshow-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(100deg, rgba(10, 15, 30, 0.72) 0%, rgba(10, 15, 30, 0.45) 45%, rgba(10, 15, 30, 0.25) 100%);
    z-index: 2;
}

/* 確保原本的內容在幻燈片之上（合併原本重複定義的屬性） */
.hero-container {
    position: relative;
    z-index: 3; /* 確保在遮罩之上 */
    min-height: 62vh;
    display: flex;
    align-items: center;
    gap: 40px;
}

.hero-content {
    flex: 1;
    padding: 40px 0;
}

.badge {
    background-color: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 7px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 20px;
    backdrop-filter: blur(2px);
}

/* 標題改用白色搭配陰影，於深色遮罩背景上更清晰突出 */
.hero-content h1 {
    font-size: 2.6rem;
    color: #ffffff;
    margin-bottom: 32px;
    line-height: 1.35;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    max-width: 640px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* 預設（桌面版）隱藏手機專用換行點 */
br.mobile-break {
    display: none;
}

/* Intro Section — 承接 Hero 之後的重點資訊區塊 */
.intro-section {
    background-color: #f4f6fb;
    padding: 55px 0;
    border-bottom: 1px solid #e7ebf3;
}

.intro-desc {
    text-align: center;
    max-width: 500px;
    margin: 0 auto 32px auto;
    font-size: 24px;
    color: #334155;
    line-height: 1.85;
}

.intro-meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.intro-meta .meta-item {
    background-color: #ffffff;
    color: #1f2937;
    font-size: 0.95rem;
    padding: 16px 26px;
    border-radius: 10px;
    border-left: 4px solid #1e3a8a;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
    margin-bottom: 0;
    width: 100%;
    max-width: 600px;
    text-align: left;
}

.intro-meta .meta-item strong {
    color: #1e3a8a;
    margin-right: 4px;
}

/* Section Common Styling */
.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2rem;
    color: #1e3a8a;
    margin-bottom: 10px;
}

.title-bar {
    width: 60px;
    height: 4px;
    background-color: #262626;
    margin: 0 auto 15px auto;
    border-radius: 2px;
}

.section-title p {
    color: #4b5563;
    max-width: 700px;
    margin: 0 auto;
}

/* Team Section */
.team-section {
    padding: 80px 0;
    background-color: #ffffff;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.team-card {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.member-info h3 {
    font-size: 1.25rem;
    color: #1e3a8a;
}

.designation {
    font-size: 0.9rem;
    color: #262626;
    font-weight: 600;
    margin-bottom: 12px;
}

.specialty {
    font-size: 0.95rem;
    color: #1e3a8a;
    font-weight: 600;
    margin-bottom: 15px;
}

.member-info h4 {
    font-size: 0.9rem;
    color: #334155;
    margin-bottom: 8px;
}

.qualifications {
    font-size: 0.85rem;
    color: #4b5563;
    padding-left: 15px;
    list-style-type: square;
}

.qualifications li {
    margin-bottom: 6px;
    line-height: 1.4;
}

/* Services Section */
.services-section {
    padding: 80px 0;
    background-color: #262626;
}

.services-section .section-title h2 {
    color: #ffffff;
}

.services-section .section-title p {
    color: #ffffff;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

.service-card {
    background-color: #262626;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    border: 1px solid #edf2f7;
    transition: all 0.3s;
}

.service-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 16px rgba(0,0,0,0.04);
}

.service-icon {
    font-size: 2rem;
    margin-bottom: 15px;
    text-align: center;
}

.service-card h3 {
    font-size: 1.15rem;
    color: #ffffff;
    margin-bottom: 12px;
    text-align: center;
}

.service-card p {
    font-size: 0.95rem;
    color: #ffffff;
    line-height: 1.5;
    text-align: center;
}

/* Slideshow / Gallery Section Styling */
.gallery-section {
    padding: 80px 0;
    background-color: #ffffff;
}

.slider-wrapper {
    max-width: 900px;
    position: relative;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    background: #e2e8f0;
}

.slider {
    position: relative;
    width: 100%;
    height: 500px;
}

.slide {
    display: none;
    width: 100%;
    height: 100%;
}

.slide.active {
    display: block;
}

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

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(17, 24, 39, 0.75);
    color: #ffffff;
    padding: 15px 25px;
    font-size: 1.05rem;
    text-align: center;
    backdrop-filter: blur(4px);
}

/* 左右切換按鈕 */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.3);
    color: #111827;
    border: none;
    font-size: 1.5rem;
    padding: 14px 18px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s, color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.slider-btn:hover {
    background: #1e3a8a;
    color: #ffffff;
}

.prev-btn { left: 20px; }
.next-btn { right: 20px; }

/* 圓點指示器 */
.slider-dots {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.dot.active, .dot:hover {
    background: #ffffff;
    transform: scale(1.2);
}

/* 動畫漸變特效 */
.fade {
    animation-name: fadeAnim;
    animation-duration: 0.6s;
}

@keyframes fadeAnim {
    from { opacity: 0.4; }
    to { opacity: 1; }
}

/* Contact Section */
.contact-section {
    padding: 80px 0;
    background-color: #f8fafc;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
}

.contact-form-wrapper, .contact-info-wrapper {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.01);
}

.contact-form-wrapper h3, .contact-info-wrapper h3 {
    font-size: 1.3rem;
    color: #1e3a8a;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 8px;
}

.contact-form-wrapper h3::after, .contact-info-wrapper h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 3px;
    background-color: #262626;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: #334155;
}

input[type="text"],
input[type="tel"],
input[type="email"],
textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    color: #1f2937;
    background-color: #ffffff;
    transition: border-color 0.3s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #1e3a8a;
}

.info-block p {
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.hours-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #e2e8f0;
    font-size: 0.95rem;
}

.urgent-notice {
    margin-top: 15px;
    background-color: #fff7ed;
    border: 1px solid #ffedd5;
    padding: 12px;
    border-radius: 6px;
    color: #c2410c;
    font-size: 0.9rem;
    font-weight: 500;
}

/* ============================= */
/* Scroll Reveal Animations      */
/* ============================= */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* 提高特異性，保留卡片原本 hover 過場的時間設定，避免被上面的規則覆蓋 */
.team-card.reveal {
    transition: transform 0.3s, box-shadow 0.3s, opacity 0.6s ease;
}

.service-card.reveal {
    transition: all 0.3s, opacity 0.6s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* 卡片式區塊依序漸進顯示，營造層次感 */
.team-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.team-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.team-grid .reveal:nth-child(4) { transition-delay: 0.24s; }

.services-grid .reveal:nth-child(2) { transition-delay: 0.06s; }
.services-grid .reveal:nth-child(3) { transition-delay: 0.12s; }
.services-grid .reveal:nth-child(4) { transition-delay: 0.18s; }
.services-grid .reveal:nth-child(5) { transition-delay: 0.24s; }
.services-grid .reveal:nth-child(6) { transition-delay: 0.3s; }
.services-grid .reveal:nth-child(7) { transition-delay: 0.36s; }
.services-grid .reveal:nth-child(8) { transition-delay: 0.42s; }
.services-grid .reveal:nth-child(9) { transition-delay: 0.48s; }

.contact-layout .reveal:nth-child(2) { transition-delay: 0.12s; }

/* 尊重使用者的減少動態偏好設定 */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .hero-slideshow {
        transform: none !important;
    }
}

/* Responsive Media Queries */
@media (max-width: 992px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }
    .slider {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .hero-container {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .hero-content {
        flex: 1;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 1.8rem;
        max-width: 100%;
    }

    .hero-actions {
        justify-content: center;
    }

    /* 手機版標題強制換行，桌面版隱藏此換行點 */
    br.mobile-break {
        display: block;
        content: "";
    }
    .slider {
        height: 280px;
    }
    .slide-caption {
        font-size: 0.9rem;
        padding: 10px;
    }
    .slider-dots {
        bottom: 45px;
    }
    .intro-section {
        padding: 40px 0;
    }
    .intro-desc {
        font-size: 18px;
    }
    .intro-meta {
        flex-direction: column;
        align-items: center;
    }
    .intro-meta .meta-item {
        justify-content: flex-start;
    }
}

/* Header 導覽列 */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #262626;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 4%;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

header.scrolled {
    box-shadow: 0 4px 18px rgba(0,0,0,0.18);
}
.logo {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1px;
}
.nav-menu {
    display: flex;
    align-items: center;
}
.nav-menu a {
    text-decoration: none;
    color: #ffffff;
    margin-left: 25px;
    font-weight: 500;
    transition: color 0.3s;
}
.nav-menu a:hover {
    color: #1e3a8a;
}
.lang-switch {
    border: 1px solid #ffffff;
    padding: 4px 12px;
    border-radius: 20px;
    color: #ffffff !important;
}
.lang-switch:hover {
    background-color: #ffffff;
    color: #1e3a8a !important;
}

/* 手機版漢堡按鈕 */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}
.hamburger span {
    width: 100%;
    height: 3px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* RWD 行動裝置排版 (768px 以下) */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #262626;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        padding: 20px 0;
        align-items: center;
        z-index: 1000;
    }
    .nav-menu a {
        margin: 12px 0 !important;
        font-size: 18px;
        width: 100%;
        text-align: center;
    }
    .nav-menu.active {
        display: flex;
    }
    /* 漢堡變形 X */
    .hamburger.active span:nth-child(1) {
        transform: translateY(7.5px) rotate(45deg);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: translateY(-7.5px) rotate(-45deg);
    }
}

/* 電腦版樣式優化 (當螢幕寬度大於 992px 時生效) */
@media (min-width: 992px) {
    .hero-section .hero-content {
        max-width: 55%; /* 內容精簡後，稍微加寬讓標題有更好的排版空間 */
        width: 55%;
        margin-right: auto; /* 確保內容靠左，右側留空給背景圖 */
    }
}

/* 手機版/平板版保持原樣 (維持 100% 滿版以方便閱讀) */
@media (max-width: 991px) {
    .hero-section .hero-content {
        width: 100%;
        max-width: 100%;
    }
}

.logo img {
    height: 40px; /* 依據你的導覽列高度調整 */
    width: auto;  /* 保持圖片比例 */
    display: block;
}

/* 圖片容器：設定固定高度或比例 */
.member-img {
    width: 100%;
    height: 300px; /* 可根據實際照片比例調整高度 */
    overflow: hidden;
    background-color: #f5f5f5; /* 圖片載入前的預設背景色 */
}

/* 圖片本身：置中且不變形 */
.member-img img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 關鍵：防變形，會自動裁切填滿容器 */
    object-position: center top; /* 聚焦在人像上半部/面部 */
    transition: transform 0.3s ease; /* 滑過時的微動畫效果 */
}

/* 視覺效果：滑鼠移上去時圖片微放大 */
.team-card:hover .member-img img {
    transform: scale(1.05);
}

/* 內文留白 */
.member-info {
    padding: 20px;
}

/* ===============================
   OSSCDC Professional Footer
================================= */
.osscdc-location .section-title h2 {
    color: #ffffff;
}

.osscdc-location .section-title p {
    color: #ffffff;
}

.osscdc-location {
  background: #1f1f1f;
  color: #fff;
  padding-top: 80px;
}

.divider {
  width: 50px;
  height: 2px;
  background: #bfbfbf;
  margin: 0 auto 20px;
  opacity: 0.5;
}

.location-map {
  position: relative;
  width: 100%;
  height: 520px;
  overflow: hidden;
}

.location-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(100%) contrast(105%) brightness(85%);
}

.location-map::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.25);
}

.map-button {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.map-button a {
  padding: 12px 36px;
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  background: rgba(255,255,255,0.08);
  transition: 0.3s ease;
}

.map-button a:hover {
  background: #fff;
  color: #1f1f1f;
}

/* ===== Footer ===== */

.osscdc-footer {
  background: #111;
  color: #ccc;
  padding: 60px 20px 30px;
}

.footer-container {
  max-width: 1100px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  gap: 60px;
  flex-wrap: wrap;
}

.footer-col {
  flex: 1;
  min-width: 220px;
}

.footer-col h4 {
  color: #fff;
  margin-bottom: 20px;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.5px;
}

.footer-col p {
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.7;
}

/* ===== Logo & Brand ===== */

.footer-brand {
  display: flex;
  flex-direction: column;
}

.footer-logo {
  max-width: 180px;
  margin-bottom: 25px;
}

/* ===== Social Icons ===== */

.social-icons {
  display: flex;
  gap: 12px;
}

.social-icons a {
  display: inline-block;
  padding: 8px 12px;
  font-size: 13px;
  border: 1px solid #333;
  color: #ccc;
  text-decoration: none;
  transition: 0.3s ease;
}

.social-icons a:hover {
  background: #fff;
  color: #111;
  border-color: #fff;
}

/* ===== Sitemap ===== */

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #ccc;
  text-decoration: none;
  font-size: 14px;
  transition: 0.3s ease;
}

.footer-links a:hover {
  color: #fff;
  padding-left: 5px;
}

/* ===== Emergency ===== */

.emergency-note {
  margin-top: 15px;
  font-size: 13px;
  color: #aaa;
}

/* ===== Footer Bottom ===== */

.footer-bottom {
  text-align: center;
  margin-top: 50px;
  padding-top: 20px;
  border-top: 1px solid #222;
  font-size: 13px;
  color: #777;
}

/* ===== Mobile ===== */

@media (max-width: 768px) {

  .location-map {
    height: 380px;
  }

  .footer-container {
    flex-direction: column;
    gap: 40px;
  }

  .footer-col {
    min-width: 100%;
  }

}
