/* Basic reset and typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
}

header {
    background-color: #8B4513;
    color: white;
    padding: 1rem;
    text-align: center;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.logo {
    width: 50px;
    height: 50px;
    margin-right: 1rem;
    border-radius: 50%;
    object-fit: cover;
}

header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 300;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

nav a:hover {
    text-decoration: underline;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

section {
    margin-bottom: 3rem;
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

section h2 {
    color: #8B4513;
    margin-bottom: 1rem;
    border-bottom: 2px solid #8B4513;
    padding-bottom: 0.5rem;
}

section p {
    margin-bottom: 0.2rem;
}

section h3 {
    color: #8B4513;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

/* --- 清單與縮排樣式 (List Indentation) --- */

/* 只針對 section 的「第一層」ol 和 ul 增加底部間距 */
section > ol,
section > ul {
    margin-bottom: 1rem;
}

/* 針對 section 內「所有」 ol 和 ul 增加縮排 
   (這樣巢狀清單才能正確地繼續往內縮) */
section ol,
section ul {
    padding-left: 2rem;
}

/* Photo Gallery */
.albums-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

.album-cover {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.album-cover:hover {
    transform: translateY(-5px);
}

.album-cover img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.album-cover h3 {
    color: #8B4513;
    margin: 1rem;
    font-size: 1.2rem;
}

.album-cover p {
    margin: 0 1rem 1rem;
    color: #666;
    font-size: 0.9rem;
}

.album-view {
    text-align: center;
}

.back-button {
    background-color: #8B4513;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.back-button:hover {
    background-color: #A0522D;
}

#album-title {
    color: #8B4513;
    margin-bottom: 1rem;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.photo-item {
    text-align: center;
    cursor: pointer;
}

.photo-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.photo-item img:hover {
    transform: scale(1.05);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

#modal-video {
    display: none;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Navigation arrows */
.prev,
.next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    -webkit-user-select: none;
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev:hover,
.next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}

/* Activities */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.activity {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.activity h3 {
    color: #8B4513;
    margin-bottom: 0.5rem;
}

.activity time {
    color: #666;
    font-size: 0.9rem;
}

.activity-form {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.activity-form h3 {
    margin-bottom: 1rem;
}

.activity-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.activity-form input,
.activity-form textarea {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

.activity-form textarea {
    height: 120px;
    resize: vertical;
}

.activity-form button {
    background-color: #8B4513;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.activity-form button:hover {
    background-color: #A0522D;
}

.activity-details {
    margin-top: 1rem;
}

.activity-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.activity-info h4 {
    margin: 0;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .activity-info {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

.activity-details > h4 {
    color: #8B4513;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: bold;
    border-bottom: 2px solid #8B4513;
    padding-bottom: 0.25rem;
}

.activity-details p {
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
}

.activity-details p strong {
    flex-shrink: 0;
    min-width: 8em;
    margin-right: 0.5em;
}

.activity-details p span {
    flex: 1;
}

.activity-details strong {
    color: #A0522D;
}

/* Knowledge List */
.knowledge-list {
    list-style: none;
    padding: 0;
}

.knowledge-list li {
    margin-bottom: 1rem;
}

.knowledge-list a {
    color: #8B4513;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: bold;
}

.knowledge-list a:hover {
    text-decoration: underline;
}

/* About Me */
#about p {
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        gap: 1rem;
    }

    main {
        padding: 1rem;
    }

    section {
        padding: 1rem;
    }

    .photo-grid {
        grid-template-columns: 1fr;
    }
}
