/* Google Fonts - Elegant Pairing */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
    /* Colors - Soft Light Minimalist */
    --bg-overlay: rgba(255, 255, 255, 0.85);
    --bg-card: #FFFFFF;

    --text-primary: #334155;
    --text-secondary: #64748B;
    --accent-gold: #B4922B;

    --sidebar-text: #1a1a1a;

    /* Dimensions */
    --sidebar-width: 300px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    color: var(--text-primary);
    line-height: 1.7;
    font-weight: 300;

    background-image: url('../images/ruba.jpg');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: #f0f0f0;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

/* --- Layout Wrapper (The Floating Container) --- */
.layout-wrapper {
    display: flex;
    flex-direction: row;
    min-height: 90vh;
    max-width: 1200px;
    margin: 40px auto;
    background: transparent;
}

/* --- Sidebar --- */
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;

    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);

    border-radius: 20px 0 0 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.logo {
    display: block;
    margin-bottom: 4rem;
    text-align: left;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 20px;
}

.logo-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--sidebar-text);
    line-height: 1;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.5);
}

.logo-subtitle {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    letter-spacing: 2px;
    margin-top: 5px;
    text-transform: uppercase;
    display: block;
}

/* Hide menu toggle by default on DESKTOP */
.menu-toggle,
.menu-close {
    display: none;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.nav-link {
    color: var(--sidebar-text);
    font-weight: 600;
    font-size: 1rem;
    padding: 8px 0;
    position: relative;
    display: flex;
    align-items: center;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: -15px;
    height: 0;
    width: 3px;
    background-color: var(--sidebar-text);
    transition: height 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    padding-left: 5px;
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.2);
}

.nav-link:hover::before,
.nav-link.active::before {
    height: 100%;
}

/* Submenu Toggle Icon */
.submenu-toggle {
    margin-left: 10px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    padding: 10px;
    /* Increase hit area */
}

/* Rotate icon when open */
.nav-item-concerts.open .submenu-toggle {
    transform: rotate(180deg);
}

.nav-link i {
    margin-right: 10px;
    font-size: 1.1rem;
    color: #444;
}

/* --- Submenu --- */
.submenu {
    list-style: none;
    margin-left: 20px;
    /* Indent */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.5s ease;
    opacity: 0;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    /* Guide line */
}

/* Desktop Hover Effect - Only on devices that support hover */
@media (hover: hover) {
    .nav-item-concerts:hover .submenu {
        max-height: 200px;
        opacity: 1;
        margin-top: 5px;
        margin-bottom: 10px;
    }
}

/* Mobile/Click Open State */
.nav-item-concerts.open .submenu {
    max-height: 500px;
    /* Allow enough height */
    opacity: 1;
    margin-top: 5px;
    margin-bottom: 10px;
}

.submenu li a {
    font-size: 0.9rem;
    color: #666;
    padding: 5px 15px;
    display: block;
    position: relative;
    transition: all 0.2s;
}

.submenu li a:hover {
    color: var(--accent-gold);
    transform: translateX(5px);
}

.submenu li a::before {
    content: '-';
    margin-right: 5px;
    opacity: 0.5;
}


/* --- Main Content Area --- */
.main-content {
    flex: 1;
    background-color: var(--bg-overlay);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    padding: 60px 80px;
    border-radius: 0 20px 20px 0;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
    border-left: 1px solid rgba(255, 255, 255, 0.5);
    overflow-y: auto;
}

h1,
h2,
h3 {
    font-family: 'Playfair Display', serif;
    color: var(--text-primary);
    font-weight: 700;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 20px;
}

h2 {
    font-size: 1.8rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: var(--accent-gold);
}

h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.heading-highlight {
    color: var(--accent-gold);
    border-bottom: 2px solid rgba(180, 146, 43, 0.2);
    padding-bottom: 5px;
}


/* --- Components --- */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: var(--text-primary);
    border-radius: 50px;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.btn:hover {
    background: var(--text-primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.content-card {
    background-color: var(--bg-card);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}

.date-tag {
    font-size: 0.85rem;
    color: var(--accent-gold);
    display: block;
    margin-bottom: 10px;
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 600;
}

/* --- Article Content --- */
.article-body {
    line-height: 1.8;
    color: var(--text-primary);
    white-space: pre-line;
    /* Collapses code indentation but keeps newlines */
    font-size: 1.05rem;
}

@media (max-width: 900px) {
    .article-body {
        font-size: 1.1rem;
        /* Slightly larger on mobile */
        font-weight: 400;
        /* Normal weight for better readability */
        line-height: 1.7;
        /* Slightly tighter line height for mobile reading flow */
        padding: 0 5px;
        /* Extra localized padding if needed */
    }
}

/* --- Contact Page Grid --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 30px;
}

.form-input {
    width: 100%;
    padding: 15px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    /* Lighter border for light theme */
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: var(--accent-gold);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(180, 146, 43, 0.1);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* --- Footer --- */
.site-footer {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.9rem;
    color: #94a3b8;
    text-align: center;
}


/* --- Mobile Responsiveness --- */
@media (max-width: 900px) {
    body {
        background-attachment: scroll;
        background-position: center center;
    }

    .layout-wrapper {
        margin: 20px 10px;
        flex-direction: column;
        min-height: auto;
    }

    .sidebar {
        width: 100%;
        padding: 20px;
        background: rgba(255, 255, 255, 0.95);
        border-radius: 12px 12px 0 0;
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);

        display: flex;
        flex-direction: row;
        justify-content: space-between;
        /* Space items 100% apart */
        align-items: center;
        z-index: 1000;
    }

    /* Remove Nav from Flow */
    .sidebar nav {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        max-height: 0;
        /* Ensures it doesn't block clicks when closed? */
        pointer-events: none;
        /* Let clicks pass */
    }

    .logo {
        margin-bottom: 0;
        border: none;
        padding-bottom: 0;
    }

    .logo-title {
        font-size: 1.5rem;
    }

    .logo-subtitle {
        display: none;
    }

    .menu-toggle {
        display: block;
        font-size: 1.5rem;
        color: #333;
        cursor: pointer;
    }

    .menu-close {
        display: block;
        position: absolute;
        top: 15px;
        right: 20px;
        font-size: 1.5rem;
        color: #999;
        cursor: pointer;
        z-index: 1001;
    }

    .nav-links {
        pointer-events: auto;
        /* Re-enable clicks */
        position: absolute;
        top: 100%;
        /* Below the navbar */
        left: 0;
        width: 100%;
        background: white;
        padding: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        border-radius: 0 0 12px 12px;

        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.3s ease;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-link {
        color: #333;
        border-bottom: 1px solid #f1f5f9;
        padding: 15px 0;
    }

    .nav-link:hover,
    .nav-link.active {
        padding-left: 10px;
    }

    .nav-link::before {
        background-color: var(--accent-gold);
    }

    .main-content {
        margin: 0;
        padding: 30px 20px;
        background-color: rgba(255, 255, 255, 0.95);
        border-radius: 0 0 12px 12px;
        border-left: none;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    }

    .contact-grid {
        grid-template-columns: 1fr;
        /* Stack vertically on mobile */
        gap: 20px;
    }
}

/* --- Gallery Styles --- */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 2rem;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.album-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.album-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.album-cover {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.album-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.album-card:hover .album-overlay {
    opacity: 1;
}

.album-overlay i {
    color: #fff;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.album-card:hover .album-overlay i {
    transform: scale(1);
}

.album-info {
    padding: 20px;
}

.album-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.album-date {
    display: block;
    font-size: 0.85rem;
    color: var(--accent-gold);
    margin-bottom: 5px;
}

.album-count {
    display: block;
    font-size: 0.8rem;
    color: #999;
}

.heading-icon {
    margin-right: 10px;
    color: var(--accent-gold);
}