/* --- 1. Variables & Base Setup --- */
:root {
    --primary-teal: #008080;    /* Matches your WhatsApp button [cite: 1] */
    --slate-blue: #2c3e50;     /* Professional medical slate [cite: 4] */
    --accent-light: #e0f2f1;   /* Soft teal for icons */
    --white: #ffffff;
    --light-bg: #f8fafc;
    --text-main: #334155;
    --text-muted: #64748b;
    --transition: all 0.3s ease;
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang HK', 'Microsoft JhengHei', 'Segoe UI', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden; /* Prevents horizontal scrolling on mobile */
}

/* --- 2. Navigation --- */
/* --- Navigation Branding --- */
nav {
    background-color: #4bc3ca; 
    padding: 20px 0;
    width: 100%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2px;
    display: flex;
    align-items: center;
}
/* --- Top Bar Styling --- */
.nav-top {
    background: #4bc3ca;
    padding: 2px 0;
    font-size: 1.2rem;
    color: #ffffff;
}

.top-flex {
    display: flex;
    justify-content: flex-end;
    gap: 25px;
}

.lang-btn {
    text-decoration: none;
    color: #64748b;
    padding: 2px 8px;
}

.lang-btn.active {
    color: #ffffff;
    font-weight: bold;
}

/* --- Main Bar Styling --- */
.nav-main {
    padding: 4px 0;
}

.main-flex {
    display: flex;
    justify-content: center; 
    align-items: center;
    position: relative;
    padding: 10px 0;
}

.nav-links {
    display: flex;
    gap: 25px;
    list-style: none;
    margin-top: 15px;
}

.nav-links a {
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    font-size: 1.8rem; /* Adjust font size here */
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #0550da;
}

/* --- Dropdown Logic --- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #ffffff;
    min-width: 220px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.1);
    z-index: 1;
    border-top: 3px solid #4bc3ca;
    margin-top: 10px;
}

.dropdown-content a {
    color: #2c3e50;
    padding: 12px 16px;
    display: block;
    font-size: 0.95rem;
}

.dropdown-content a:hover {
    background-color: #f1f5f9;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Mobile Adjustment */
@media (max-width: 1024px) {
    .nav-links { display: none; } /* Consider adding a hamburger menu for mobile */
}
.nav-icon {
    height: 80px; /* Adjust height to fit your nav bar */
    width: auto;  /* Maintains aspect ratio */
    display: block;
    object-fit: contain; /* Ensures the icon isn't stretched */
}
.menu-checkbox, .hamburger-icon { display: none; }

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 15px; /* Space between the icon and "KL Medical Limited" text */
    text-decoration: none;
}
.brand-text {
    display: flex;
    flex-direction: column;
    color: #ffffff; /* White text for high contrast [cite: 151] */
}

.en-name {
    font-family: "Times New Roman", Times, serif; 
    font-weight: bold;
    font-size: 2rem;
    line-height: 1.1;
    display: block;
    /* Adjust this to help match the width of the Chinese text */
    letter-spacing: 0.5px; 
}

.zh-name {
    font-family: "MElleHK-Medium", "Microsoft JhengHei", sans-serif;
    font-size: 2rem;
    font-weight: 500;
    display: block;
    /* KEY PARAMETER: Increase or decrease this value until the 
       Chinese characters span the same width as the English text */
    letter-spacing: 4.5px; 
    /* Ensures the last character doesn't have extra space on the right */
    margin-right: -4.5px; 
    margin-top: 5px;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .en-name { font-size: 1.2rem; }
    .zh-name { font-size: 0.95rem; letter-spacing: 1px; }
    .nav-icon { height: 45px; }
}

/* --- Hero Banner Styles --- */
.hero-banner {
    background: linear-gradient(135deg, #b1b688 0%, #15bebe 100%); /* Branding Teal */
    color: white;
    padding: 60px 0;
    width: 100%;
}

.hero-container {
    max-width: 1400px; /* Aligned with your wider layout */
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-content {
    flex: 1;
    animation: fadeIn 1s ease-out;
}

.hero-year {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ffd700; /* Gold color for the year like the reference */
    margin-bottom: 10px;
}

.hero-title {
    font-family: "MElleHK-Medium", sans-serif;
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-btn {
    display: inline-block;
    background-color: #4bc3ca;
    color: #f2f3f3;
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.hero-image img {
    max-width: 500px;
    height: auto;
    border-radius: 20px;
}

/* --- 3. Responsive Grid System --- */
.container {
    max-width: 1600px;
    margin: 60px auto;
    padding: 0 20px;
}

.grid-menu {
    display: grid;
    /* This creates the responsiveness: 
       - 1 column on mobile 
       - 2 columns on tablets 
       - 3 columns on desktops */
    grid-template-columns: repeat(auto-fit, minmax(500px, 2fr)); 
    gap: 50px;
}

/* --- 4. Section Cards --- */
.menu-card {
    background: var(--white);
    padding: 40px 25px;
    text-align: center;
    border-radius: 15px;
    text-decoration: none;
    color: var(--slate-blue);
    border: 1px solid #e2e8f0;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.menu-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: var(--primary-teal);
}

.icon-circle {
    width: 70px;
    height: 70px;
    background: var(--accent-light);
    border-radius: 50%;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    transition: var(--transition);
}

.menu-card:hover .icon-circle {
    background: var(--primary-teal);
    color: white;
}

.menu-card h3 {
    font-size: 1.15rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.menu-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* --- 5. Interactive WhatsApp Button --- */
.whatsapp-float {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background-color: var(--primary-teal);
    color: white;
    padding: 4px 24px;
    border-radius: 50px;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-size: 1.6rem;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(0, 128, 128, 0.3);
    z-index: 9999;
    transition: var(--transition);
}

.whatsapp-icon {
    height:80px;
    width: 80px;  
    padding: 0 10px;
    display: block;
    object-fit: contain; 
}

.whatsapp-float:hover {
    background-color: #006666;
    transform: scale(1.05);
}

/* --- 6. Footer --- */
footer {
    background: #2c3e50; /* Dark slate */
    color: white;
    padding: 60px 0 20px;
    margin-top: 80px;
}

.footer-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap; /* Allows columns to stack on mobile */
    gap: 40px;
}

.footer-info, .footer-directory {
    flex: 1;
    min-width: 280px;
}

.footer-info h4, .footer-directory h4 {
    color: #4bc3ca; /* Your branding teal */
    margin-bottom: 20px;
    font-size: 1.2rem;
    border-left: 4px solid #4bc3ca;
    padding-left: 12px;
}

.footer-directory ul {
    list-style: none;
    padding: 0;
}

.footer-directory ul li {
    margin-bottom: 10px;
}

.footer-directory ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-directory ul li a:hover {
    color: #4bc3ca;
}

.footer-info p {
    font-size: 0.95rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 50px;
    padding-top: 20px;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Mobile responsive columns */
@media (max-width: 768px) {
    .top-flex {
        flex-direction: column; /* Stacks phone and language vertically */
        align-items: center;
        text-align: center;
        gap: 10px;
        padding: 10px 0;
    }

    .main-flex {
        flex-direction: column;
        gap: 15px;
    }

    .brand-text {
        text-align: center;
    }

    .nav-container, 
    .container, 
    .footer-content {
        max-width: 100%; /* Removes the 1400px restriction */
        width: 90%;      /* Gives a nice 5% gap on each side */
        margin: 0 auto;  /* Forces it to the middle */
        padding: 0;      /* Clears desktop padding */
    }

    .grid-menu {
        grid-template-columns: 1fr; /* Forces cards to take full width of the screen */
        justify-items: center;
    }

    .card {
        width: 100%;
        max-width: 400px; /* Prevents cards from becoming too giant on tablets */
    }
}

/* --- About Page Specifics --- */
.page-header {
    background-color: #f8fafc;
    padding: 30px 0; /* Slim height as requested */
    border-bottom: 1px solid #e2e8f0;
    text-align: center;
}

.page-header h1 {
    color: #4bc3ca;
    font-size: 2.2rem;
    font-family: "MElleHK-Medium", sans-serif;
}

.about-section {
    padding: 40px 0;
    line-height: 1.8;
}

.mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.mission-item {
    background: #ffffff;
    padding: 20px;
    border-left: 4px solid #4bc3ca;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.mission-item h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.core-values {
    background: #4bc3ca;
    color: white;
    padding: 40px;
    border-radius: 15px;
    margin: 40px 0;
}

.core-values h2 { margin-bottom: 20px; }
.core-values ul { list-style: none; padding: 0; }
.core-values li { margin-bottom: 15px; font-size: 1.1rem; }

footer {
    background: #2c3e50;
    color: white;
    padding: 60px 0 20px;
    width: 100%;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex; /* THIS FORCES HORIZONTAL LAYOUT */
    justify-content: space-between;
    gap: 40px;
}

.footer-column {
    flex: 1; /* Makes all 3 columns share the width equally */
    min-width: 250px;
}

.footer-column h4 {
    color: #4bc3ca;
    margin-bottom: 20px;
    border-left: 4px solid #4bc3ca;
    padding-left: 12px;
}

.footer-column ul {
    list-style: none;
}

.footer-column a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    line-height: 2;
}

@media (max-width: 900px) {
    .footer-content {
        flex-direction: column; /* Stacks columns on mobile */
        text-align: center;
    }
}