/* 基础样式 */
body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem; /* 使用相對單位 */
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    font-weight: 600;
    color: #2c3e50;
}

p {
    margin-bottom: 1.25rem; /* 20px 相當於 1.25rem */
}

a {
    color: #2980b9;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #1abc9c;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem; /* 20px 相當於 1.25rem */
    display: flex;
    flex-direction: row;
    flex-wrap: wrap; /* 新增：允許換行 */
}

/* 主图区域 */
.hero {
    position: relative;
    width: 100%;
    height: 25vh; /* 改用相對高度 */
    background-size: cover;
    background-position: center;
}

.hero2 {
    position: relative;
    width: 100%;
    height: 0px;
    background-size: cover;
    background-position: center;
}

/* Hero Text Section */

.hero-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgb(150, 150, 150);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.hero-text h1 {
    font-size: clamp(1.5rem, 6vw, 3rem); /* 24px 最大 */
    margin: 0;
    background: linear-gradient(135deg, #425870, #0f1720);
    -webkit-background-clip: text;
    color: transparent;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5),
                 -2px -2px 4px rgba(255, 255, 255, 0.5);
    letter-spacing: 0.125rem; /* 2px 約等於 0.125rem */
    font-weight: bold;
}

.hero-text p {
    font-size: clamp(1rem, 3vw, 1.5em); /* 流式字體 */
    margin: 0.625rem 0 0 0; /* 10px 相當於 0.625rem */
}

/* 导航栏 */
header .topnav {
    background-color: #2c3e50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 1.25rem; /* 10px 20px */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

header .topnav h1 a {
    font-size: 1.5rem; /* 24px */
    font-weight: bold;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.0625rem; /* 1px */
}

header nav {
    display: flex;
}

header nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
}

header nav ul li {
    margin-left: 1.25rem; /* 20px */
}

/* 下拉菜单 */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: rgba(52, 73, 94, 0.9);
    min-width: 10rem; /* 160px */
    z-index: 1;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem; /* 8px */
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.dropdown-content li {
    padding: 0.75rem 1rem; /* 12px 16px */
    display: block;
}

.dropdown-content li a {
    color: #ecf0f1;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.dropdown-content li a:hover {
    background-color: rgba(41, 128, 185, 0.7);
    color: #ffffff;
}

.dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
}

header nav ul li a {
    color: #ecf0f1;
    font-weight: bold;
    padding: 0.5rem 0.9375rem; /* 8px 15px */
    border-radius: 0.25rem; /* 4px */
    transition: background-color 0.3s ease;
}

header nav ul li a:hover {
    background-color: #34495e;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem; /* 24px */
    background: none;
    color: #ffffff;
    border: none;
    cursor: pointer;
    position: absolute;
    right: 1.25rem; /* 20px */
}

/* 左侧导航栏 */
.sidebar {
    width: 15.625rem; /* 250px */
    background-color: #34495e;
    color: #ecf0f1;
    padding: 1.25rem; /* 20px */
    margin-right: 1.25rem; /* 20px */
    border-radius: 0.5rem; /* 8px */
}

.sidebar ul {
    list-style-type: none;
    padding: 0;
}

.sidebar ul li {
    padding: 0.625rem 0; /* 10px */
    font-size: 1rem; /* 16px */
}

.sidebar ul li ul {
    padding-left: 1.25rem; /* 20px */
}

.sidebar ul li a {
    color: #ecf0f1;
    text-decoration: none;
}

.sidebar ul li a:hover {
    text-decoration: underline;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    background-color: white;
    padding: 1.25rem; /* 20px */
    border-radius: 0.5rem; /* 8px */
}

.main-content section {
    margin-bottom: 2.5rem; /* 40px */
}

.main-content h2 {
    font-size: 1.75rem; /* 28px */
    color: #2c3e50;
    border-bottom: 0.125rem solid #ecf0f1; /* 2px */
    padding-bottom: 0.625rem; /* 10px */
    margin-bottom: 1.25rem; /* 20px */
}

.main-content p {
    font-size: 1rem; /* 16px */
    line-height: 1.6;
}

.main-content table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.25rem; /* 20px */
}

.main-content table th, .main-content table td {
    padding: 0.75rem; /* 12px */
    border: 0.0625rem solid #ddd; /* 1px */
    text-align: left;
}

.main-content table th {
    background-color: #2980b9;
    color: white;
    font-weight: bold;
    text-align: center;
}

.main-content table tr:nth-child(even) {
    background-color: #f2f2f2;
}

.main-content table tr:hover {
    background-color: #e0e0e0;
}

/* 按钮样式 */
button {
    background-color: #2980b9;
    color: #ffffff;
    padding: 0.625rem 0.9375rem; /* 10px 15px */
    border: none;
    border-radius: 0.25rem; /* 4px */
    cursor: pointer;
    font-size: 1rem; /* 16px */
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #1abc9c;
}

button:focus {
    outline: none;
}

/* 页脚 */
footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    text-align: center;
    padding: 1.25rem; /* 20px */
    margin-top: 2.5rem; /* 40px */
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.1);
}

footer p {
    margin: 0;
}

/* 管理團隊樣式 */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* 自動調整列數 */
    gap: 1.25rem; /* 20px */
    justify-items: stretch;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 每行顯示兩列 */
    gap: 1.25rem; /* 20px */
    justify-items: stretch;
}

.team-member {
    background-color: #f9f9f9;
    padding: 1.25rem; /* 20px */
    border-radius: 0.5rem; /* 8px */
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.team-member:hover {
    box-shadow: 0 0.375rem 0.75rem rgba(0, 0, 0, 0.15);
    transform: translateY(-0.1875rem); /* -3px */
}

.profile-pic {
    width: 7.5rem; /* 120px */
    height: 7.5rem; /* 120px */
    border-radius: 50%;
    margin-right: 0.9375rem; /* 15px */
    object-fit: cover;
}

.info {
    font-size: 0.875rem; /* 14px */
    color: #2c3e50;
}

.info a {
    color: #2980b9;
    text-decoration: none;
}

.info a:hover {
    text-decoration: underline;
}

/* 小標題樣式 */
h3 {
    font-size: 1.375rem; /* 22px */
    color: #4b7591;
    margin-top: 1.875rem; /* 30px */
    border-bottom: 0.125rem solid #ecf0f1; /* 2px */
    padding-bottom: 0.625rem; /* 10px */
    margin-bottom: 1.25rem; /* 20px */
}

/* ADFP Cloud 2.0 Styles */

/* General container and section styling */
.adfp-section {
    
    padding: 1.25rem; /* 20px */
    color: #2c3e50;
    border-radius: 0.5rem; /* 8px */
}

.adfp-section h2 {
    font-size: 1.75rem; /* 28px */
    color: #1f3f54;
    margin-bottom: 1.25rem; /* 20px */
}

/* Quick Links */
.adfp-quick-links {
    display: flex;
    flex-wrap: wrap; /* 新增：允許換行 */
    justify-content: space-around;
    margin: 1.875rem 0; /* 30px */
    background: linear-gradient(135deg, #4b7591, #2c3e50);
    border-radius: 0.5rem; /* 8px */
    padding: 0.625rem; /* 10px */
    position: relative;
    overflow: hidden;
    z-index: 4;
}

.adfp-quick-links a {
    color: #ffffff;
    background-color: transparent;
    padding: 0.625rem 0.9375rem; /* 10px 15px */
    border-radius: 0.3125rem; /* 5px */
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-weight: bold;
    position: relative;
    z-index: 5;
    margin: 0.3125rem; /* 5px */
}

.adfp-quick-links a:hover {
    background-color: #1abc9c;
    color: #fff;
}

.adfp-quick-links::before,
.adfp-quick-links::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(160deg, transparent 20%, rgba(255, 255, 255, 0.1) 20%, rgba(255, 255, 255, 0.1) 30%, transparent 30%);
    z-index: 3;
}

.adfp-quick-links::after {
    background: linear-gradient(20deg, transparent 20%, rgba(255, 255, 255, 0.1) 20%, rgba(255, 255, 255, 0.1) 30%, transparent 30%);
}

/* Grid layout for sections */
.adfp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* 自動調整列數 */
    gap: 1.25rem; /* 20px */
    padding-bottom: 1.25rem; /* 20px */
    justify-items: stretch;
}

.adfp-grid1 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* 自動調整列數 */
    gap: 1.25rem; /* 20px */
    padding-bottom: 1.25rem; /* 20px */
    justify-items: stretch;
}

.adfp-member {
    background-color: #ffffff;
    border: 0.0625rem solid #e0e0e0; /* 1px */
    padding: 1.25rem; /* 20px */
    border-radius: 0.5rem; /* 8px */
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.adfp-member h3 {
    font-size: 1.25rem; /* 20px */
    color: #4b7591;
    margin-bottom: 0.625rem; /* 10px */
}

.adfp-member p {
    font-size: 0.875rem; /* 14px */
}

.adfp-member:hover {
    box-shadow: 0 0.375rem 0.75rem rgba(0, 0, 0, 0.15);
    transform: translateY(-0.1875rem); /* -3px */
}

/* Stylish heading container with gradient background */
.styled-heading {
    display: inline-block;
    padding: 0.9375rem 1.875rem; /* 15px 30px */
    position: relative;
    margin-bottom: 0.625rem; /* 10px */
    background: linear-gradient(135deg, #4b7591, #2c3e50);
    border-radius: 0.5rem; /* 8px */
    text-align: center;
    color: #fff;
    overflow: hidden;
}

.styled-heading h3 {
    font-size: 1.5rem; /* 24px */
    font-weight: bold;
    margin: 0;
    position: relative;
    letter-spacing: 0.0625rem; /* 1px */
    z-index: 1;
}

.styled-heading::before,
.styled-heading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(160deg, transparent 20%, rgba(255, 255, 255, 0.1) 20%, rgba(255, 255, 255, 0.1) 30%, transparent 30%);
    z-index: 0;
}

.styled-heading::after {
    background: linear-gradient(20deg, transparent 20%, rgba(255, 255, 255, 0.1) 20%, rgba(255, 255, 255, 0.1) 30%, transparent 30%);
}

.styled-heading .underline {
    display: block;
    margin-top: 0.625rem; /* 10px */
    width: 3.75rem; /* 60px */
    height: 0.25rem; /* 4px */
    background-color: #fff;
    margin-left: auto;
    margin-right: auto;
    border-radius: 0.125rem; /* 2px */
    z-index: 1;
}

/* 檔案專區樣式 */
.file-section {
    background-color: #f9f9f9;
    border-radius: 0.625rem; /* 10px */
    padding: 1.25rem; /* 20px */
    box-shadow: 0 0.25rem 0.625rem rgba(0, 0, 0, 0.1); /* 4px 10px */
    margin-top: 2.5rem; /* 40px */
}

.file-section h2 {
    font-size: 1.5rem; /* 24px */
    margin-bottom: 1.25rem; /* 20px */
    border-bottom: 0.125rem solid; /* 2px */
    padding-bottom: 0.625rem; /* 10px */
}

.file-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.file-section li {
    display: flex;
    align-items: center;
    margin-bottom: 0.9375rem; /* 15px */
    padding: 0.625rem; /* 10px */
    background-color: #ffffff;
    border-radius: 0.5rem; /* 8px */
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0.125rem 0.3125rem rgba(0, 0, 0, 0.1); /* 2px 5px */
}

.file-section li:hover {
    background-color: #ecf0f1;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2); /* 4px 8px */
}

.file-section li img {
    margin-right: 0.9375rem; /* 15px */
    width: 1.875rem; /* 30px */
    height: 1.875rem; /* 30px */
}

.file-section li a {
    text-decoration: none;
    color: #2980b9;
    font-size: 1rem; /* 16px */
    font-weight: 500;
    transition: color 0.3s ease;
}

.file-section li a:hover {
    color: #3498db;
}

.file-section li a:visited {
    color: #3498db;
}

@media screen and (max-width: 1600px) {

    
    header nav {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #2c3e50;
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 1000;
    }

    header nav.active {
        display: flex;
    }

    header nav ul {
        flex-direction: column;
        width: 100%;
    }

    .dropdown-content {
        position: static;
        background-color: rgba(44, 62, 80, 0.9);
    }

    .dropdown:hover .dropdown-content {
        display: block;
    }

    header nav ul li {
        margin: 0;
        width: 100%;
    }

    header nav ul li a {
        padding: 0.9375rem; /* 15px */
        text-align: center;
        border-bottom: 0.0625rem solid #34495e; /* 1px */
        font-size: 1.5rem; /* 24px */
    }

    .menu-toggle {
        display: block;

    }
}

/* 响应式设计 */
@media screen and (max-width: 1200px) {
    .container {
        padding: 1rem; /* 16px */
    }
    .sidebar {
        width: 20%;
        margin-right: 1rem; /* 16px */
    }

    .hero-text h1 {
        font-size: clamp(1.5rem, 6vw, 2rem); /* 24px 最大 */
    }

    .main-content {
        padding: 1rem; /* 16px */
    }
}

@media screen and (max-width: 992px) {
    .container {
        padding: 0.875rem; /* 14px */
    }
    .sidebar {
        width: 25%;
        margin-right: 0.875rem; /* 14px */
    }
    .main-content {
        padding: 0.875rem; /* 14px */
    }
}

@media screen and (max-width: 768px) {
    .sidebar {
        width: 100%;
        margin-bottom: 1.25rem; /* 20px */
    }

    .container {
        flex-direction: column;
        padding: 0.875rem; /* 14px */
    }

    .team-grid,
    .about-grid,
    .adfp-grid,
    .adfp-grid1 {
        grid-template-columns: 1fr; /* 單欄 */
    }

    .adfp-quick-links {
        flex-direction: column;
        align-items: center;
    }

    .adfp-quick-links a {
        width: 100%;
        text-align: center;
    }

    .file-section {
        padding: 1rem; /* 16px */
    }
}

@media screen and (max-width: 576px) {
    header .topnav h1 a {
        font-size: 1.25rem; /* 20px */
    }
    .dropdown-content {
        display: none;
    }

    .dropdown.active .dropdown-content {
        display: block;
    }
    .hero {
        height: 20vh; /* 更小的高度 */
    }
    .hero-text h1 {
        font-size: clamp(1.5rem, 6vw, 1.875rem); /* 24px 最大 */
    }

    .hero-text p {
        font-size: clamp(0.875rem, 4vw, 1.125rem); /* 18px 最大 */
        margin: 0.3125rem 0 0 0; /* 5px */
    }

    .team-member {
        flex-direction: column;
        text-align: center;
    }

    .profile-pic {
        margin-right: 0;
        margin-bottom: 0.625rem; /* 10px */
    }

    .adfp-section {
        max-width: 100%;
    }

    .adfp-grid1 {
        grid-template-columns: 1fr; /* 單欄 */
        max-width: 100%;
    }

    .adfp-quick-links {
        flex-direction: column;
        align-items: center;
    }

    .adfp-quick-links a {
        width: 90%;
        margin: 0.3125rem 0; /* 5px 0 */
    }

    .file-section li {
        flex-direction: column;
        align-items: flex-start;
    }

    .file-section li img {
        margin-right: 0;
        margin-bottom: 0.3125rem; /* 5px */
    }

    .file-section li a {
        font-size: 0.875rem; /* 14px */
    }
}
