/* Reset and base styles */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body {
    padding-top: 100px;
    font-family: 'DM Sans', 'Noto Sans TC', 'Noto Sans SC', sans-serif;
    background-color: #eaf1fa;
    background-image: url('data:image/svg+xml;utf8,<svg width="60" height="30" viewBox="0 0 60 30" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="15" cy="15" r="10" stroke="%2399aabb" stroke-width="1" fill="none" opacity="0.10"/><circle cx="45" cy="15" r="10" stroke="%2399aabb" stroke-width="1" fill="none" opacity="0.10"/><line x1="25" y1="15" x2="35" y2="15" stroke="%2399aabb" stroke-width="1" opacity="0.10"/></svg>');
    background-size: 60px 30px;
    background-repeat: repeat;
    background-position: center center;
    background-attachment: fixed;
    color: #1d1d1d;
    line-height: 1.6;
    min-height: 100vh;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #ffffff;
    padding: 15px 0; /* Base padding - slightly reduced */
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border-bottom: 7px solid #e4c829; /* Added yellow line */
}

.nav-container {
    display: flex;
    justify-content: space-between; /* <<< Change this back */
    align-items: center;
    max-width: 1800px; /* Adjusted max-width */
    margin: 0 auto; /* Center the container */
    padding: 0 15px 0 30px; /* Adjusted horizontal padding */
    gap: 15px; /* Base gap */
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: 15px; /* Added margin to push it right */
}

.logo {
    height: 45px; /* Base logo height - slightly reduced */
    flex-shrink: 0; /* Prevent logos from shrinking disproportionately */
}

.nav-links {
    display: flex; /* Ensure nav links are in a flex container */
    align-items: center; /* Vertically align links */
    flex-wrap: nowrap; /* Prevent wrapping by default */
    /* overflow: hidden; */
    /* Ensure margin-left: auto; is REMOVED if it exists */
}

.nav-links a {
    color: #002E7D;
    text-decoration: none;
    font-weight: 600;
    margin: 0 15px; /* Base margin */
    transition: color 0.3s ease;
    font-size: 1.0rem;  /* Base font size */
    white-space: nowrap; /* Prevent link text wrapping */
}

.nav-links a:hover {
    color: #e4c829;
}

.company-names {
    display: flex;
    flex-direction: column;
}

.company-name, .company-name-translated {
    font-size: 1rem;
    font-weight: 600;
    color: #0a3083; /* Changed color to black */
}

/* Also include dropdown styles if not already present and consistent */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    color: #002E7D;
    text-decoration: none;
    font-weight: 600;
    margin: 0 15px; /* Match nav-links a margin */
    transition: color 0.3s ease;
    cursor: pointer;
    font-size: 1.0rem; /* Match nav-links a font-size */
    white-space: nowrap;
}

.dropdown-toggle i {
    margin-left: 5px;
    font-size: 0.8em;
}

.dropdown-menu {
    display: none;
    position: absolute;
    background-color: #ffffff;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 4px;
    padding: 8px 0;
    z-index: 1001;
    left: 0; /* Align dropdown to the left of the toggle */
    top: 100%; /* Position below the toggle */
}

.dropdown-menu a {
    color: #002E7D;
    padding: 10px 16px; /* Adjusted padding */
    text-decoration: none;
    display: block;
    font-size: 0.95rem; /* Slightly smaller font */
    white-space: nowrap;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a:hover {
    background-color: #f8f9fa;
    color: #e4c829;
}

/* --- Footer Styling (Copied from index.css) --- */
.footer {
    background-color: #002E7D; /* Dark blue background for the whole footer */
    color: #f0f0f0; /* Light default text color for the footer */
    padding-top: 30px; 
}

.footer-content {
    display: flex;
    flex-direction: row; 
    flex-wrap: wrap; 
    justify-content: center; 
    align-items: flex-start; 
    max-width: 1400px; 
    margin: 0 auto; 
    padding: 20px 20px 20px; 
    gap: 40px; 
}

/* Style for the individual sections */
.footer-map-section,
.footer-contact-section,
.footer-links-section {
    flex: 1; 
    min-width: 300px; 
    max-width: 450px; 
    text-align: center; 
    /* Removed background, padding, border-radius, shadow from individual sections */
}

.footer-map-section .map-container {
    max-width: 100%; 
    margin: 0 auto 20px; /* Add bottom margin to map */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); /* Slightly darker shadow for contrast */
}

.footer-map-section .map-container iframe {
    display: block;
    width: 100%;
    height: 250px; 
}

.footer-contact-section h4,
.footer-links-section h4 {
    margin-bottom: 20px; 
    font-size: 1.4rem; 
    color: #ffffff; 
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-contact-section p {
    margin: 0;
    line-height: 1.7;
    color: #d0d0d0; 
}

.footer-links-section a {
    display: block; 
    margin: 10px 0; 
    color: #e0e0e0; 
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-links-section a:hover {
    color: #e4c829; 
}

.footer-copyright {
    text-align: center;
    padding: 10px 0; 
    margin-top: 10px; 
    border-top: 1px solid #00408a; 
    color: #a0a0a0; 
    font-size: 0.9rem;
    background-color: #002159; 
}

body {
    display: flex; /* Added */
    flex-direction: column; /* Added */
    min-height: 100vh; /* Added - Ensures body takes full viewport height */
}

/* Find the existing 'main' selector or add it if it doesn't exist */
main {
    flex-grow: 1; /* Added - Allows main content to expand */
}

/* Find the existing 'footer' or '.footer' selector */
footer, .footer { /* Use whichever selector is already present, or both */
    /* Remove any position: fixed/absolute, bottom: 0, width: 100% */
    margin-top: auto; /* Added - Pushes footer down */
}

main.container.section {
    max-width: center;
    padding: 20px 20px;
}

#category-title {
    text-align: center;
    color: #1A2E3B; 
    font-size: 2.8em;
    font-weight: 700; 
    border-bottom: 3px solid #DDE2E5; 
    letter-spacing: -0.5px;
    background-color: #002E7D; 
    text-align: center;
    color: #ffffff;
    font-size: 1.5em;
    padding: 05px 25px; /* Reduced top/bottom padding */
    margin-left: auto; 
    margin-right: auto; 
    margin-bottom: 0; 
    max-width: auto; 
    border-top-left-radius: 8px; 
    border-top-right-radius: 8px; 
}

/* Gallery Album Display Styles */
#album-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;

    gap: 15px; /* Increased space between albums */
    padding: 20px 0;
    align-items: flex-start; /* Align items to the start of the cross axis */
}

.album-item {
    display: block; /* Make the whole item clickable */
    text-decoration: none; /* Remove underline from link */
    color: inherit; /* Inherit text color */
    background-color: #f9f9f9; /* Add a light background color */
    border: 1px solid #ccc; /* Make border slightly more visible */
    border-radius: 8px; /* Optional: Rounded corners */
    overflow: hidden; /* Hide overflow for rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Enhance shadow for more depth */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth hover effect */
    flex: 0 0 auto; /* Prevent shrinking/growing, base size on width */
    flex: 1 1 auto; /* Allow flex items to grow and shrink */
    max-width: 250px; /* Set a max-width for each album item */
    height: 250px; /* Set a fixed height for each album item */
}

.album-item:hover {
    transform: none; /* Remove the scaling effect on hover */
    box-shadow: none; /* Remove the box shadow effect on hover */
    cursor: default; /* Change cursor back to default */
}

.album-item img {
    width: 100%;
    height: 160px; /* Set a fixed height for the image */
    display: block; /* Remove extra space below image */
    object-fit: cover; /* Cover the area, cropping if necessary */
}

.album-info {
    padding: 15px;
    text-align: center;
    background-color: #e9ecef; /* Light grey background for caption area */
}

.album-info h5 {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 1.1rem;
    font-weight: 700; /* Make heading text bolder */
    color: #002E7D; /* Album title color */
    font-family: 'Montserrat', sans-serif; /* Professional font */
    text-decoration: none; /* Ensure no underline */
}

.album-info p {
    margin-bottom: 0;
    font-size: 0.9rem;
    color: #555; /* Album description color */
    font-family: 'Open Sans', sans-serif; /* Professional font */
    text-decoration: none; /* Ensure no underline */
}

/* Style for when no albums are found */
#album-list:empty::before {
    content: 'No albums found in this category.';
    display: block;
    text-align: center;
    font-size: 1.2rem;
    color: #555;
    margin-top: 20px;
}

/* Styles for individual photos when an album is being viewed (inside #album-list.album-grid) */
#album-list.album-grid figure.gallery-item {
    /* Adjust container if needed, e.g., for spacing */
    margin: 5px; /* Reduced margin to decrease gaps */
    background-color: #fff; /* Optional: background for each item */
    border: 1px solid #eee; /* Optional: border for each item */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); /* Optional: subtle shadow */
    /* border-radius: 4px; Removed */
    /* overflow: hidden; Removed */
}

#album-list.album-grid figure.gallery-item img {
    max-height: 200px; /* Further reduced height for in-album photos */
    width: 100%; /* Make image responsive within its container */
    object-fit: cover; /* Cover the area, may crop; use 'contain' to see full image */
    display: block; /* Remove extra space below image */
    /* border-radius: 4px; If you want image corners rounded, ensure figure has overflow:hidden */
}

/* Style for when no albums are found */
#album-list:empty::before {
    content: 'No albums found in this category.';
    display: block;
    text-align: center;
    font-size: 1.2rem;
    color: #555;
    margin-top: 20px;
}
