/*
Theme Name: HKU Safe Autonomous System Lab
Theme URI: https://safelab.hku.hk
Author: HKU Safe Autonomous System Lab
Author URI: https://safelab.hku.hk
Description: A modern and interactive theme for HKU Safe Autonomous System Lab
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hku
*/

/* 全局重置与基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    overflow-x: hidden;
}

a {
    color: #0056b3;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #003d82;
}

img {
    max-width: 100%;
    height: auto;
}

/* 布局容器 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.site-content {
    min-height: 60vh; /* 确保内容区域有最小高度 */
}

/* 可访问性 */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    clip: auto !important;
    clip-path: none;
    display: block;
    height: auto;
    left: 5px;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    color: #0056b3;
    font-size: 14px;
    font-weight: 700;
}

/* 基本排版 */
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 20px;
    font-weight: 700;
    line-height: 1.2;
    color: #2d3748;
}

p {
    margin: 0 0 20px;
}

ul, ol {
    margin: 0 0 20px 20px;
}

blockquote {
    margin: 0 0 20px;
    padding: 10px 20px;
    border-left: 4px solid #0056b3;
    background-color: #f8f9fa;
    font-style: italic;
}

/* 自定义按钮 */
.button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0056b3;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.button:hover {
    background-color: #003d82;
    color: #fff;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 540px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 576px) {
    .container {
        max-width: 100%;
        padding: 0 10px;
    }
}

/* 主题样式将在其他CSS文件中定义 */

/* 修复导航菜单中"Research Focus"文本重叠的问题 */
.nav-menu .menu-item {
    white-space: nowrap;
    height: auto;
}

.nav-menu .menu-item a {
    display: block;
    white-space: nowrap;
    line-height: 1.5;
    height: auto;
    padding: 0.5rem 1rem; 
}

/* 特别处理"Research Focus"菜单项 */
.nav-menu .menu-item a[href*="research"] {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
} 