﻿
html {
    scroll-behavior: smooth;
}
/* style.css - This controls the 3-layer menu */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    /* This applies the texture to the entire website background */
    background-image: url('images/background.jpg');
    background-attachment: fixed; /* Keeps the texture still while you scroll */
}

/* PART B: The Solid Menu Bar */
nav {
    background-color: #2c3e50; /* Solid dark color */
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
}
/* 1. MAIN MENU BAR */
.menu-container {
    display: flex; /* FORCES horizontal layout */
    justify-content: flex-start; /* Changed from 'center' to 'flex-start' */
    list-style-type: none; /* Removes bullets */
    margin: 0;
    padding: 0;
    background-color: #333; /* Dark bar background */
    width: 100%;
    position: sticky; /* Keeps it at top */
    top: 0;
    z-index: 9999;
}

    /* 2. MENU ITEMS */
    .menu-container > li {
        position: relative; /* Needed for submenu positioning */
    }

        .menu-container > li > a {
            display: block;
            color: white; /* Main menu text is WHITE */
            padding: 14px 20px;
            text-decoration: none;
            font-weight: bold;
        }

            .menu-container > li > a:hover {
                background-color: #555;
            }

    /* 3. SUBMENU (The "Story" Dropdown) */
    .menu-container li ul {
        position: absolute;
        top: 100%; /* Sits right below the bar */
        left: 0;
        background-color: #ffffff; /* WHITE background for dropdown */
        min-width: 220px;
        display: none; /* Hidden until hover */
        list-style: none;
        padding: 0;
        margin: 0;
        box-shadow: 0px 4px 10px rgba(0,0,0,0.2);
    }

        /* 4. SUBMENU LINKS (Fixes the visibility) */
        .menu-container li ul li a {
            color: #333 !important; /* DARK text on white background */
            padding: 12px 15px;
            text-decoration: none;
            display: block;
            border-bottom: 1px solid #eee;
            text-align: left;
            font-weight: normal;
        }

            .menu-container li ul li a:hover {
                background-color: #f1f1f1;
                color: #000 !important;
            }

    /* 5. MAKE SUBMENU APPEAR */
    .menu-container li:hover > ul {
        display: block;
    }
    /* 1. Position the Third Level Menu to the Right */
    .menu-container li ul li ul {
        top: 0; /* Align it with the top of the parent menu item */
        left: 100%; /* Push it completely to the right of the second level */
        margin-top: -1px; /* Optional: aligns the borders perfectly */
    }

    /* 2. Show the Third Level only when hovering over its parent LI */
    .menu-container li ul li:hover > ul {
        display: block;
    }

    /* 3. Add an arrow to show there is a third level (Optional but helpful) */
    .menu-container li ul li > a:after {
        content: " »"; /* Adds a small arrow to menu items with sub-menus */
        float: right;
        color: #ccc;
    }

    /* 4. Remove the arrow if there is NO third level (Optional) */
    .menu-container li ul li > a:only-child:after {
        content: "";
    }

.menu-item {
    position: relative;
}

    .menu-item a {
        display: block;
        padding: 15px 25px;
        color: white;
        text-decoration: none;
    }

        .menu-item a:hover {
            background-color: #34495e;
        }

/* --- The 2nd Layer (Detail A, B, C, D) --- */
.submenu {
    display: none;
    position: absolute;
    background-color: #ecf0f1;
    min-width: 200px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    list-style: none;
    margin: 0;
    padding: 0;
}

    .submenu a {
        color: #2c3e50;
        border-bottom: 1px solid #ddd;
    }

        .submenu a:hover {
            background-color: #bdc3c7;
        }

/* Show 2nd layer when hovering over top menu */
.menu-item:hover .submenu {
    display: block;
}

/* --- The 3rd Layer (Detail A-1, A-2) --- */
.submenu li {
    position: relative; /* Anchor for the 3rd layer */
}

.second-layer {
    display: none;
    position: absolute;
    left: 100%; /* Pops out to the right */
    top: 0;
    background-color: #555; /* Darker gray for the deep layer */
    min-width: 180px;
    border-left: 3px solid #4facfe; /* Blue accent line */
    box-shadow: 5px 0px 15px rgba(0,0,0,0.3);
    z-index: 1001;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* THE MISSING TRIGGER: Show 3rd layer when hovering over its parent li */
.has-second-layer:hover > .second-layer {
    display: block;
}

.second-layer li a {
    padding: 12px 15px;
    font-size: 0.9em;
    color: #f0f0f0;
    border-bottom: 1px solid #666; /* Subtle divider for 3rd layer */
}

    .second-layer li a:hover {
        background-color: #666;
        color: #4facfe;
    }

/* Pop-left support for menus on the right side of the screen */
.pop-left .second-layer {
    left: auto;
    right: 100%;
    border-left: none;
    border-right: 3px solid #4facfe;
}
/* Simple Layout Styling */thead paragraph
.main-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 30px;
    background-color: #ffffff; /* Solid white so text is readable */
    box-shadow: 0px 4px 15px rgba(0,0,0,0.2);
    border-radius: 8px;
    text-align: left;         /* align left */
}

.content-header {
    border-bottom: 2px solid #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
}
/* ----------------------------------------- */
/* PROJECT 2: GREEN BRANDING STYLE           */
/* ----------------------------------------- */

.brand-name {
    color: #32CD32; /* The bright green from Project 1 */
    font-size: 36pt; /* Large and impactful */
    font-weight: bold; /* Makes the letters thick */
    font-style: italic; /* Keeps the slanted look of your original em tag */
    font-family: 'Arial Black', Gadget, sans-serif;
    /* This shadow is the secret to making it "pop" against the background image */
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
    display: inline-block; /* Helps with spacing */
    /* Add the line below to make it italic */
    font-style: italic;
}
/* This targets the specific link for the page the user is on */
.menu-item a.active {
    color: #FFD700 !important; /* A bright Gold color */
    font-weight: bold; /* Makes the text thicker */
    border-bottom: 2px solid #FFD700; /* Adds an underline for emphasis */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5); /* Makes it pop against the background */
}
/* Make the navigation bar stick to the top */
nav {
    position: -webkit-sticky; /* Support for Safari */
    position: sticky;
    top: 0; /* Tells it WHERE to stick */
    z-index: 9999; /* Ensures it stays ABOVE the slideshow and images */
    background-color: #333333; /* Use your specific background color so it isn't transparent */
    width: 100%; /* Ensures it spans the full width */
}

/* Optional: Add a shadow so it looks like it's floating over the content */
nav {
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

header h1 {
    margin: 0; /* This removes the extra space above your title */
}
/* Container for the story text */
.story-container {
    max-width: 800px; /* Keeps the lines from being too long and hard to read */
    margin: 20px auto;
    padding: 0 20px;
    line-height: 1.8; /* Gives the text nice breathing room */
    color: #333;
    font-family: "Microsoft YaHei", sans-serif;
}

/* Systematic paragraph styling */
.story-paragraph {
    margin-bottom: 1.5em;
    text-indent: 2em; /* Standard Chinese paragraph indentation */
    text-align: justify; /* Makes the edges look clean */
}

/* Styling for the author line */
.author {
    font-style: italic;
    color: #666;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Systematic Image Styling (Replacing the <table>) */
.image-box-left {
    float: left;
    margin: 0 20px 10px 0;
    width: 242px;
    text-align: center;
    border: 1px solid #ddd;
    padding: 5px;
    background: #f9f9f9;
}

    .image-box-left img {
        width: 100%;
        height: auto;
    }

    .image-box-left span {
        display: block;
        font-size: 0.8em;
        color: #555;
        margin-top: 5px;
    }

/* This handles the automatic paragraphing */
.easy-read-text {
    white-space: pre-line; /* Key: Preserves your 'Enter' key breaks */
    margin-bottom: 20px;
    line-height: 1.9; /* Slightly more space for Chinese characters */
    font-size: 1.1em;
    color: #333;
    text-align: justify;
}

/* Center-aligned image for between text blocks */
.image-box-center {
    display: block;
    margin: 30px auto; /* Adds space above and below the photo */
    text-align: center;
    max-width: 100%;
}

    .image-box-center img {
        max-width: 400px; /* Controls size of middle-of-text photos */
        height: auto;
        border: 1px solid #ddd;
        box-shadow: 2px 2px 10px rgba(0,0,0,0.1);
    }

    .image-box-center span {
        display: block;
        font-size: 0.9em;
        color: #666;
        margin-top: 8px;
    }

/* Container for the bottom links */
.story-footer {
    margin-top: 50px;
    padding-bottom: 50px;
    text-align: center;
}

    .story-footer hr {
        border: 0;
        border-top: 1px solid #eee;
        margin-bottom: 30px;
    }

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px; /* Space between buttons */
}

/* Button Styling */
.btn-back, .btn-list {
    text-decoration: none;
    padding: 10px 20px;
    border: 1px solid #333;
    border-radius: 4px;
    color: #333;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

    /* Hover Effect: Changes color when mouse moves over it */
    .btn-back:hover, .btn-list:hover {
        background-color: #333;
        color: #fff;
    }

.link-directory {
    list-style: none;
    padding: 0;
    margin-top: 30px;
}

    .link-directory li {
        margin-bottom: 15px;
        border-bottom: 1px solid #eee;
        padding-bottom: 10px;
    }

        .link-directory li a {
            font-size: 1.2em;
            color: #0056b3;
            text-decoration: none;
            transition: color 0.2s;
        }

            .link-directory li a:hover {
                color: #cc0000; /* Changes color when you hover */
                text-decoration: underline;
            }
/* Hub Directory Styling */
.hub-directory {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hub-link {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background-color: #f9f9f9;
    border-left: 5px solid #333;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

    .hub-link:hover {
        background-color: #eee;
        transform: translateX(10px); /* Subtle move to the right on hover */
        border-left-color: #cc0000;
    }

.hub-title {
    font-weight: bold;
    font-size: 1.1em;
}

.hub-date {
    font-size: 0.9em;
    color: #888;
}
/* Container for the link */
.hub-link {
    display: flex;
    align-items: center; /* Vertical centering */
    gap: 20px;
    padding: 15px;
    background-color: #ffffff;
    border: 1px solid #eee;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

    .hub-link:hover {
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        border-color: #333;
        transform: translateY(-2px);
    }

/* 1. The Box: Sets the physical size on the screen */
.hub-thumbnail {
    flex-shrink: 0;
    width: 120px; /* Change this number to make the box smaller or larger */
    height: 90px;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid #ddd; /* Adds a nice thin border around the photo */
}

    /* 2. The Image: Forces the photo to stay INSIDE the box */
    .hub-thumbnail img {
        width: 100%; /* Forces image to match box width */
        height: 100%; /* Forces image to match box height */
        object-fit: contain; /* Crops the photo so it doesn't look squashed */
        /* background-color: #f0f0f0;  Optional: adds a light grey background to fill the gaps */
       display: block; /* Removes extra space at the bottom */
    }

/* Content area */
.hub-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hub-title {
    font-size: 1.2em;
    font-weight: bold;
    color: #000;
}

.hub-description {
    font-size: 0.95em;
    color: #666;
}

.hub-date {
    font-size: 0.8em;
    color: #999;
    text-transform: uppercase;
}

/* Art Gallery Styles */
.art-gallery table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 20px;
    margin-top: 20px;
    margin-left: 0; /* This forces it to the left */
    margin-right: auto; /* This ensures it doesn't center itself */
}

.art-gallery td {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    vertical-align: top;
    text-align: center;
}

.art-gallery img {
    width: 100%;
    max-width: 480px;
    height: auto;
    border-radius: 4px;
    display: block;
    margin: 0 auto;
}

.art-caption {
    font-size: 0.9em;
    color: #444;
    margin-top: 12px;
    line-height: 1.5;
    text-align: left;
}

/* --- VASE IMAGE ZOOM EFFECT --- */

/* 1. This prepares the image for a smooth transition */
.art-gallery img {
    transition: transform 0.3s ease; /* Makes the zoom look smooth, not jumpy */
    cursor: pointer; /* Shows a hand icon so users know they can interact with it */
}

    /* 2. This is what happens when the mouse hovers over the image */
    .art-gallery img:hover {
        transform: scale(1.1); /* Zooms the image in by 10% */
        z-index: 10; /* Ensures the zoomed image stays on top of others */
        box-shadow: 0 10px 20px rgba(0,0,0,0.3); /* Adds a deeper shadow while zooming */
    }

body {
    font-family: sans-serif;
    font-size: 14px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 4px;
}

td {
    padding: 4px;
    vertical-align: top;
}

.caption {
    font-size: 0.85em;
    display: block;
    margin-top: 5px;
}

/* This prefix makes the rule apply ONLY to your vase gallery pages */
.art-gallery img {
    max-width: 640px; /* Restores the specific size for vases */
    max-height: 640px; /* Protects vertical photos from being too tall */
    width: auto; /* Keeps original proportions */
    height: auto; /* Keeps original proportions */
    display: block;
    margin-left: 0; /* Keeps them aligned left */
    transition: transform 0.3s ease; /* Keeps your hover zoom effect */
}

    /* Hover effect specifically for gallery images */
    .art-gallery img:hover {
        transform: scale(1.05);
    }

/* Ensure the table cell doesn't force centering */
.art-gallery td {
    text-align: left;
    vertical-align: top;
    padding: 15px;
    width: 640px; /* Matches your widest image */
}

/* --- BACK TO TOP BUTTON --- */
.back-to-top {
    position: fixed; /* Keeps it in the corner even when you scroll */
    bottom: 30px; /* Distance from the bottom edge */
    right: 30px; /* Distance from the right edge */
    background-color: #333333; /* Dark grey to match your menu */
    color: #ffffff !important;
    padding: 12px 18px;
    text-decoration: none;
    border-radius: 50px; /* Makes it look like a rounded pill */
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 10000; /* Ensures it stays on top of your vase images */
    transition: all 0.3s ease;
}

    .back-to-top:hover {
        background-color: #32CD32; /* Turns Green when you point at it */
        color: white;
        transform: translateY(-5px); /* Gentle lift effect */
    }
/* Floating Hub Button Style */
.back-to-hub {
    position: fixed; /* This makes it float! */
    bottom: 85px; /* Placed above the 'Top' button (which is at 30px) */
    right: 30px; /* Same side as the 'Top' button */
    background-color: #333; /* Dark grey */
    color: white !important;
    padding: 12px 18px;
    text-decoration: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 10000; /* Keeps it in front of images */
    transition: all 0.3s ease;
    display: block; /* Ensures it captures the padding area */
}

    .back-to-hub:hover {
        background-color: #007bff; /* Turns blue when you hover */
        transform: translateY(-5px);
    }

/* Ensure the Back to Top stays at the very bottom */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    /* (Keep your existing styles here) */
}

/* Forces the header text and navigation to align left */
#main-navigation,
.gallery-header,
h1,
.author {
    text-align: left !important;
    margin-left: 0 !important;
    margin-right: auto !important;
    display: block;
}

/* Ensures the horizontal line starts from the left */
hr {
    margin-left: 0;
    margin-right: auto;
    border: 0;
    border-top: 1px solid #ccc;
    width: 100%;
}
/* This ensures every cell in your gallery gets the white card look */
.art-gallery td {
    background-color: #ffffff !important; /* Forces white background */
    padding: 15px;
    border: 1px solid #eeeeee; /* Light border for definition */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* The "floating card" shadow */
    vertical-align: top;
}

* This allows home page images to be as big as they naturally are */
img {
    max-width: none;
    height: auto;
}
#top-menu, header, .navbar {
    position: relative; /* Or 'fixed' if your menu stays at the top when scrolling */
    z-index: 1000; /* Higher number means it sits on top of the gallery */
}