/* 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;
}

.main-content {
    margin-top: 50px;  /* Additional spacing from navbar */
    padding: 0 20px;
}

.about-us-section {
    background-color: #ffffff;
    border-radius: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 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 15px; /* Adjusted horizontal padding */
    gap: 15px; /* Base gap */
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    /* margin-right: auto; Removed - let space-between handle spacing */
}

.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;
}

.section {
    padding: 50px 0;
    text-align: center;
}

.photo-gallery {
    padding: 50px 0;
    text-align: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.gallery-grid img {
    width: 100%;
    border-radius: 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

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

.section.incident-box {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9ff 100%);
    border: none;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 46, 125, 0.08);
    padding: 50px;
    margin: 40px auto;
    max-width: 1400px;  /* Increased from 1200px */
    position: relative;
    text-align: left;
}

.section.incident-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg, #002E7D 0%, #e4c829 100%);
    border-radius: 3px 0 0 3px;
}

.section.incident-box h2 {
    color: #002E7D;
    font-size: 2.8rem;
    margin-bottom: 35px;
    padding-left: 20px;
}

.section.incident-box p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 25px;
    padding-left: 20px;
}

.gm-message-content {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px 60px;  /* Increased horizontal padding */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.06);
    margin: 30px auto;
    position: relative;
    overflow: hidden;
    max-width: 1400px;  /* Added max-width to match incident-box */
}

.gm-photo {
    width: 280px;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.message-text {
    flex: 1;
    padding: 0 30px;
}

.message-text p {
    font-size: 1.2rem;
    line-height: 1.9;
    color: #444;
    font-style: italic;
    position: relative;
    padding: 0 40px;
}

.message-text p::before,
.message-text p::after {
    content: '"';
    font-family: Georgia, serif;
    font-size: 5rem;
    position: absolute;
    color: rgba(228, 200, 41, 0.3);
}

.message-text p::before {
    left: -20px; /* Adjusted for better alignment */
    top: -35px;  /* Adjusted for better alignment */
}

.message-text p:last-child::before {
    content: none; /* Removed the bottom quotation mark for the last paragraph */
}
.message-text p:last-child::after {
    content: none; /* Removed the bottom quotation mark for the last paragraph */
}

.message-text p::after {
    right: 15px; /* Adjusted for better alignment */
    bottom: 20px; /* Adjusted for better alignment */
}

.gm-signature {
    font-style: normal !important;
    color: #002E7D;
    font-weight: 700;
    font-size: 1.4rem;
    margin-top: 30px;
    padding: 20px 0 0 40px;
    border-top: 3px solid rgba(0, 46, 125, 0.1);
}

.gm-message-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-top: 20px;
}

.gm-photo {
    width: 200px;
    border-radius: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.message-text {
    flex: 1;
}

.message-text p {
    margin-bottom: 15px;
    font-style: italic;
}

.gm-signature {
    font-style: normal !important;
    color: #002E7D;
    font-weight: 600;
    margin-top: 20px;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    color: #002E7D;
    text-decoration: none;
    font-weight: 600;
    margin: 0 20px;
    transition: color 0.3s ease;
    cursor: pointer;
}

.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;
}

.dropdown-menu a {
    color: #002E7D;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9em;
}

.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: 0;
    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 */
}

/* Styles for the image grid view */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Adjust minmax for desired size */
    gap: 15px; /* Spacing between images */
    padding: 20px 0; /* Add some padding around the grid */
}

.image-grid-item {
    border: 1px solid #ddd;
    border-radius: 0;
    overflow: hidden; /* Ensure images don't overflow the container */
    aspect-ratio: 1 / 1; /* Make items square, adjust if needed */
}

.image-grid-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the area, cropping if necessary */
    transition: transform 0.3s ease;
}

.image-grid-item img:hover {
    transform: scale(1.05); /* Slight zoom on hover */
}

/* Ensure error messages don't try to use grid */
#album-list:not(.image-grid) {
    display: block; /* Or whatever the default display was */
}
.gm-photo {
    width: 200px;
    border-radius: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.message-text {
    flex: 1;
}

.message-text p {
    margin-bottom: 15px;
    font-style: italic;
}

.gm-signature {
    font-style: normal !important;
    color: #002E7D;
    font-weight: 600;
    margin-top: 20px;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    color: #002E7D;
    text-decoration: none;
    font-weight: 600;
    margin: 0 20px;
    transition: color 0.3s ease;
    cursor: pointer;
}

.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;
}

.dropdown-menu a {
    color: #002E7D;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9em;
}

.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: 0;
    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 */
}
