/* 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;
    display: flex;
    flex-direction: column;
}

.main-content {
    margin-top: 50px;
    padding: 0 20px;
    max-width: 1400px; /* Limit content width for better readability */
    margin-left: auto;
    margin-right: auto;
}

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

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 15px;
    gap: 15px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    height: 45px;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

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

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

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

.dropdown-toggle {
    color: #002E7D;
    text-decoration: none;
    font-weight: 600;
    margin: 0 15px;
    transition: color 0.3s ease;
    cursor: pointer;
    font-size: 1.0rem;
    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;
    top: 100%;
}

.dropdown-menu a {
    color: #002E7D;
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.95rem;
    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;
    position: relative;
    text-align: left;
}

/* Product Grid and Cards Enhancements */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive columns */
    gap: 30px; /* Increased gap */
    margin-top: 30px;
}

.product-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0; /* Added subtle border */
    border-radius: 10px; /* Softer corners */
    box-shadow: 0 10px 20px rgba(0, 46, 125, 0.15), 0 5px 10px rgba(0, 0, 0, 0.08); /* Enhanced shadow for depth */
    padding: 25px; /* Increased padding */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Ensures button aligns at bottom */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden; /* Ensures image corners are rounded if image is flush */
}

.product-card img {
    width: 100%;
    max-height: 200px; /* Or a suitable height */
    object-fit: cover; /* Ensures image covers the area well */
    border-radius: 6px; /* Slightly rounded corners for the image */
    margin-bottom: 20px; /* Space below image */
}

.product-card h3 {
    font-size: 1.4rem; /* Slightly larger heading */
    color: #002E7D;
    margin-bottom: 12px; /* Increased space below heading */
    font-weight: 700;
}

.product-card p {
    font-size: 1rem; /* Slightly larger paragraph text */
    color: #333;
    line-height: 1.7; /* Improved line spacing */
    margin-bottom: 25px; /* Increased space below paragraph */
    flex-grow: 1;
}

.product-card .cta-button {
    background-color: #002E7D; /* Primary blue */
    color: white;
    padding: 12px 25px; /* Improved padding */
    text-decoration: none;
    border-radius: 25px; /* Rounded button */
    font-weight: 600;
    text-align: center;
    display: inline-block; /* Or block if it should take full width */
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: 2px solid transparent;
    margin-top: auto; /* Pushes button to the bottom of the card */
}

.product-card .cta-button:hover {
    background-color: #e4c829; /* Accent yellow on hover */
    color: #002E7D; /* Dark blue text on hover for contrast */
    transform: translateY(-2px);
    border: 2px solid #002E7D;
}

.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;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.06);
    margin: 30px auto;
    position: relative;
    overflow: hidden;
    max-width: 1400px;
}

.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 --- */
.footer {
    background-color: #002E7D;
    color: #f0f0f0;
    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;
}

.footer-map-section,
.footer-contact-section,
.footer-links-section {
    flex: 1;
    min-width: 300px;
    max-width: 450px;
    text-align: center;
}

.footer-map-section .map-container {
    max-width: 100%;
    margin: 0 auto 20px;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

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

main {
    flex-grow: 1;
}

footer, .footer {
    margin-top: auto;
}

/* Styles for the image grid view (used for products) */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    padding: 20px 0;
}

.image-grid-item {
    border: 1px solid #ddd;
    border-radius: 0;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.image-grid-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* --- Footer Styling (Copied from index.css) --- */
.footer {
    background-color: #002E7D;
    color: #f0f0f0;
    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;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.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;
    flex-direction: column;
    min-height: 100vh;
}

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

/* Find the existing 'footer' or '.footer' selector */
footer, .footer {
    /* Remove any position: fixed/absolute, bottom: 0, width: 100% */
    margin-top: auto;
}

/* Product Specifications Section */
.product-specifications {
    margin: 20px auto 30px;
    padding: 12px 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    max-width: 600px;
    width: 85%;
    text-align: center;
}

.product-specifications li {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 6px 10px;
    margin-bottom: 4px;
    font-size: 0.85rem;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-specifications li strong {
    color: #002E7D;
    font-weight: 600;
    margin-right: 8px;
    font-size: 0.85rem;
}

.product-specifications li span {
    flex-grow: 1;
    text-align: right;
}
