:root {
    --primary-color: #0A192F;
    --primary-light: #112240;
    --accent-color: #D4AF37;
    --accent-hover: #F2C94C;
    --text-dark: #333333;
    --text-light: #8892B0;
    --bg-white: #FFFFFF;
    --bg-light: #F8F9FA;
    --font-main: 'Inter', 'Noto Sans TC', sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

html[lang="zh-HK"] .lang-en { display: none; }
html[lang="en"] .lang-tc { display: none; }

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-white);
    overflow-x: hidden;
    padding-top: 70px; /* Offset for fixed header on sub-pages */
}

body.homepage { padding-top: 0; }

h1, h2, h3, h4 { color: var(--primary-color); font-weight: 700; line-height: 1.2; }
p { margin-bottom: 1rem; }

.lead-text { font-size: 1.15rem; color: #555; max-width: 800px; margin: 0 auto; }
.text-center { text-align: center; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 5rem 0; }
.bg-light { background-color: var(--bg-light); }
.bg-navy { background-color: var(--primary-color); color: var(--bg-white); }
.bg-navy h2 { color: var(--bg-white); }
.bg-navy .accent-line { background-color: var(--accent-color); }

.section-header { margin-bottom: 3rem; }
.section-header h2 { font-size: 2.5rem; margin-bottom: 1rem; }
.accent-line { height: 3px; width: 60px; background-color: var(--accent-color); margin-top: 10px; transition: width 0.3s ease; }
.accent-line.center { margin: 10px auto 0; }
.section:hover .accent-line { width: 100px; }

/* Navigation */
#navbar {
    position: fixed;
    top: 0; left: 0; width: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    display: flex; justify-content: space-between; align-items: center;
    max-width: 1200px; margin: 0 auto; padding: 1rem 2rem;
}

.logo a { font-size: 1.5rem; font-weight: 700; color: var(--primary-color); text-decoration: none; letter-spacing: 1px; }

.nav-menu { display: flex; list-style: none; align-items: center; gap: 2rem; }
.nav-link { text-decoration: none; color: var(--primary-color); font-weight: 500; font-size: 0.95rem; position: relative; transition: var(--transition); }
.nav-link::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px; background-color: var(--accent-color); transition: var(--transition); }
.nav-link:hover, .nav-link.active { color: var(--accent-color); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.lang-btn {
    background: transparent; border: 1px solid var(--primary-color); color: var(--primary-color);
    padding: 0.4rem 1rem; border-radius: 4px; cursor: pointer; font-weight: 600; transition: var(--transition);
}
.lang-btn:hover { background: var(--primary-color); color: white; }

/* Mobile Menu */
.menu-toggle { display: none; cursor: pointer; flex-direction: column; gap: 5px; }
.bar { width: 25px; height: 3px; background-color: var(--primary-color); transition: var(--transition); }

/* Hero Slider */
.hero { position: relative; height: 100vh; min-height: 600px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1s ease-in-out; background-size: cover; background-position: center; z-index: 1; }
.slide.active { opacity: 1; z-index: 2; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to right, rgba(10, 25, 47, 0.9) 0%, rgba(10, 25, 47, 0.6) 100%); z-index: 3; }
.hero-content { position: relative; z-index: 4; max-width: 800px; padding: 0 2rem; text-align: center; }
.hero-title { color: var(--bg-white); font-size: 3.5rem; margin-bottom: 1.5rem; text-shadow: 0 2px 4px rgba(0,0,0,0.3); }
.hero-subtitle { color: #CCD6F6; font-size: 1.25rem; margin-bottom: 2.5rem; }
.hero-buttons { display: flex; gap: 1rem; justify-content: center; }

/* Page Header (for subpages) */
.page-header { background: var(--primary-color); color: white; padding: 4rem 0 3rem; text-align: center; }
.page-header h1 { color: white; font-size: 2.5rem; margin-bottom: 1rem; }
.page-header .accent-line { background-color: var(--accent-color); margin: 0 auto; }

/* Buttons */
.btn { display: inline-block; padding: 0.8rem 2rem; font-weight: 600; text-decoration: none; border-radius: 4px; transition: var(--transition); cursor: pointer; border: none; font-size: 1rem; }
.btn-primary { background-color: var(--accent-color); color: var(--primary-color); box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3); }
.btn-primary:hover { background-color: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4); }
.btn-outline { background-color: transparent; border: 2px solid var(--bg-white); color: var(--bg-white); }
.btn-outline:hover { background-color: var(--bg-white); color: var(--primary-color); }
.btn-outline-dark { border: 2px solid var(--primary-color); color: var(--primary-color); }
.btn-outline-dark:hover { background-color: var(--primary-color); color: white; }

/* Grids */
.about-grid, .contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.about-image img { width: 100%; border-radius: 8px; box-shadow: 0 20px 40px rgba(0,0,0,0.1); transition: var(--transition); }
.about-image img:hover { transform: scale(1.02); }

.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2.5rem; }
.service-card { background: var(--bg-white); border-radius: 8px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.05); transition: var(--transition); border: 1px solid #eee; display: flex; flex-direction: column;}
.service-card:hover { transform: translateY(-10px); box-shadow: 0 15px 40px rgba(0,0,0,0.1); border-color: var(--accent-color); }
.service-image { height: 200px; overflow: hidden; position: relative; background: var(--primary-light); display: flex; align-items: center; justify-content: center; }
.service-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.service-card:hover .service-image img { transform: scale(1.1); }
.icon-placeholder { color: var(--accent-color); }
.service-content { padding: 2rem; flex-grow: 1; display: flex; flex-direction: column;}
.service-content h3 { margin-bottom: 1rem; font-size: 1.5rem; }
.service-content .btn { margin-top: auto; align-self: flex-start; }

/* Contact Forms */
.info-item { display: flex; align-items: flex-start; gap: 1.5rem; margin-bottom: 1.5rem; }
.info-icon { color: var(--accent-color); flex-shrink: 0; }
.info-text strong { color: var(--accent-color); display: block; margin-bottom: 0.2rem; }
.contact-form { background: var(--bg-white); padding: 2.5rem; border-radius: 8px; color: var(--text-dark); }
.form-group { margin-bottom: 1.5rem; }
.form-group input, .form-group textarea { width: 100%; padding: 1rem; border: 1px solid #ddd; border-radius: 4px; font-family: var(--font-main); font-size: 1rem; transition: var(--transition); }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 2px rgba(10, 25, 47, 0.1); }

/* Footer */
footer { background: #060F1C; color: #8892B0; padding: 3rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; margin-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 2rem;}
.footer-col h4 { color: white; margin-bottom: 1rem; font-size: 1.2rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { color: #8892B0; text-decoration: none; transition: var(--transition); }
.footer-links a:hover { color: var(--accent-color); padding-left: 5px; }

/* Animations (Intersection Observer) */
.fade-in { opacity: 0; transition: opacity 0.8s ease-in-out; }
.fade-in.visible { opacity: 1; }
.slide-up { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.slide-up.visible { opacity: 1; transform: translateY(0); }

/* Back to Top */
#back-to-top {
    position: fixed; bottom: 30px; right: 30px;
    background: var(--accent-color); color: var(--primary-color);
    width: 50px; height: 50px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none; opacity: 0; visibility: hidden;
    transition: var(--transition); box-shadow: 0 4px 10px rgba(0,0,0,0.2); z-index: 999;
}
#back-to-top.show { opacity: 1; visibility: visible; }
#back-to-top:hover { transform: translateY(-5px); background: var(--accent-hover); }

/* Dropdown Menu */
.dropdown { position: relative; }
.dropdown-content { display: none; position: absolute; background-color: var(--bg-white); min-width: 160px; box-shadow: 0 8px 16px rgba(0,0,0,0.1); z-index: 1; border-radius: 4px; top: 100%; }
.dropdown-content a { color: var(--text-dark); padding: 12px 16px; text-decoration: none; display: block; transition: var(--transition); font-weight: 500; font-size: 0.9rem;}
.dropdown-content a:hover { background-color: var(--bg-light); color: var(--accent-color); }
.dropdown:hover .dropdown-content { display: block; }

/* Accordion */
.accordion { background-color: var(--bg-light); color: var(--text-dark); cursor: pointer; padding: 18px; width: 100%; border: none; border-left: 4px solid transparent; text-align: left; outline: none; font-size: 1.1rem; transition: 0.4s; font-weight: 600; margin-bottom: 5px; border-radius: 4px; display: flex; justify-content: space-between; align-items: center;}
.accordion.active, .accordion:hover { background-color: #e9ecef; border-left-color: var(--accent-color); }
.accordion:after { content: '\002B'; color: var(--primary-color); font-weight: bold; margin-left: 5px; font-size: 1.5rem; }
.accordion.active:after { content: "\2212"; }
.panel { padding: 0 18px; background-color: white; max-height: 0; overflow: hidden; transition: max-height 0.2s ease-out; margin-bottom: 10px; border-radius: 4px; border: 1px solid transparent; }
.panel p { padding: 1rem 0; }
.accordion.active + .panel { border-color: #eee; }

/* Modal */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(10, 25, 47, 0.8); backdrop-filter: blur(5px); }
.modal-content { background-color: var(--bg-white); margin: 5% auto; padding: 2.5rem; border-radius: 8px; width: 90%; max-width: 500px; position: relative; animation: slideDown 0.3s ease-out; }
@keyframes slideDown { from { transform: translateY(-50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.close-modal { color: #aaa; position: absolute; top: 15px; right: 20px; font-size: 28px; font-weight: bold; cursor: pointer; transition: 0.2s; }
.close-modal:hover, .close-modal:focus { color: var(--primary-color); text-decoration: none; cursor: pointer; }

/* Careers & News Cards */
.card-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.news-card { border: 1px solid #eee; border-radius: 8px; overflow: hidden; background: var(--bg-white); transition: var(--transition); box-shadow: 0 5px 15px rgba(0,0,0,0.02);}
.news-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.08); border-color: var(--accent-color); }
.news-img { height: 200px; background: var(--primary-light); }
.news-body { padding: 1.5rem; }
.news-date { color: var(--text-light); font-size: 0.85rem; margin-bottom: 0.5rem; display: block;}
.job-card { padding: 2rem; border: 1px solid #eee; border-radius: 8px; margin-bottom: 1.5rem; background: var(--bg-white); transition: var(--transition); box-shadow: 0 2px 10px rgba(0,0,0,0.02);}
.job-card:hover { border-color: var(--accent-color); box-shadow: 0 5px 15px rgba(0,0,0,0.05);}
.job-card h3 { margin-bottom: 0.5rem; }
.job-meta { color: var(--text-light); font-size: 0.9rem; margin-bottom: 1rem; }

/* Responsive */
@media (max-width: 900px) { .about-grid, .contact-grid { grid-template-columns: 1fr; } .hero-title { font-size: 2.5rem; } }
@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    .nav-menu { position: absolute; top: 100%; left: -100%; width: 100%; background: var(--bg-white); flex-direction: column; padding: 2rem 0; box-shadow: 0 10px 10px rgba(0,0,0,0.1); transition: 0.3s; }
    .nav-menu.active { left: 0; }
    .hero-buttons { flex-direction: column; }
}
