/* Import Design System */
@import url('./design-system.css');
@import url('./components.css');

/* Legacy color variables - now mapped to design system */
:root {
    --projectColor: var(--ds-color-primary);
    --projectColorLight: var(--ds-color-primary-light);
    --projectCompareColor: var(--ds-color-warning-400);
    --bgColor: var(--ds-color-background);
    --textColor: var(--ds-color-text-primary);
    --greyColor: var(--ds-color-text-muted);
}

html, body {
    height: 100%;
}

body {
    font-family: var(--ds-font-body);
    background-color: var(--ds-color-background);
    color: var(--ds-color-text-primary);
    padding-bottom: 0; /* Remove padding, let footer handle spacing */
    margin: 0;
    font-size: var(--ds-text-base);
    display: flex;
    flex-direction: column;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }

/* --- Utility Classes --- */
.text-project { color: var(--ds-color-primary) !important; }
.bg-project { 
    background-color: var(--ds-color-primary) !important; 
    color: var(--ds-color-text-inverse) !important; 
}
.text-grey { color: var(--ds-color-text-muted) !important; }
.text-cut {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.shadow-project { box-shadow: var(--ds-shadow-base); }
.card-project {
    background: var(--ds-color-surface);
    border-radius: var(--ds-radius-md);
    border: 1px solid var(--ds-color-border);
    overflow: hidden;
    transition: all var(--ds-transition-base);
}

.card-project:hover {
    box-shadow: var(--ds-shadow-md);
    transform: translateY(-2px);
    border-color: var(--ds-color-border-hover);
}

/* --- Layout Structure --- */
.main {
    width: 100%;
    padding-bottom: 20px; /* Reduce padding */
    flex: 1 0 auto; /* Allow main to grow and push footer down */
    min-height: 300px; /* Minimum height to prevent too short pages */
}

.pc-footer {
    flex-shrink: 0;
}

/* Up/Banner Area */
.up {
    width: 100%;
    height: 200px; /* 400rpx */
    overflow: hidden;
    position: relative;
}
.up img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Full-width banner section for homepage */
.up-fullwidth {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}
.up-fullwidth img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Carousel Indicators (dots) */
.carousel-indicators {
    margin-bottom: 1rem;
}
.carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 4px;
    opacity: 0.5;
    background-color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}
.carousel-indicators button.active {
    opacity: 1;
    /* Keep same size and circular on mobile */
    width: 10px;
    height: 10px;
    border-radius: 50%; /* Stay circular */
    background-color: var(--ds-color-primary);
    border-color: var(--ds-color-primary);
    /* No transform - same size as inactive */
}

/* Carousel Controls (arrows) */
.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}
.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}
.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 30px;
    height: 30px;
    background-size: 100%;
}

/* Down/Content Area (For Index and Profile with Banner) */
.down {
    width: 100%;
    box-sizing: border-box;
    padding: var(--ds-space-2) var(--ds-space-4);
    margin-top: var(--ds-space-3);
    position: relative;
    z-index: 10;
    margin-left: auto;
    margin-right: auto;
}

/* Page Content Area (For News/Activities without Banner) */
.page-content {
    width: 100%;
    box-sizing: border-box;
    padding: var(--ds-space-2) var(--ds-space-4);
    position: relative;
    z-index: 10;
}

/* --- Components --- */

/* Professional Search Section */
.search-section {
    background: var(--ds-color-surface);
    padding: var(--ds-space-4) var(--ds-space-6);
    border-radius: var(--ds-radius-md);
    box-shadow: var(--ds-shadow-base);
    margin-bottom: var(--ds-space-6);
    display: flex;
    align-items: center;
    border: 1px solid var(--ds-color-border);
    transition: all var(--ds-transition-base);
}
.search-section:hover {
    box-shadow: var(--ds-shadow-md);
    border-color: var(--ds-color-border-hover);
}
.search-input-group {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}
.search-input-group i {
    position: absolute;
    left: var(--ds-space-4);
    color: var(--ds-color-text-muted);
    z-index: 5;
    font-size: var(--ds-text-base);
}
.search-input-group input {
    width: 100%;
    padding: var(--ds-space-3) var(--ds-space-4) var(--ds-space-3) var(--ds-space-12);
    border: 2px solid var(--ds-color-border);
    border-radius: var(--ds-radius-base) 0 0 var(--ds-radius-base);
    font-size: var(--ds-text-base);
    font-family: var(--ds-font-body);
    outline: none;
    background: var(--ds-color-surface);
    transition: all var(--ds-transition-fast);
    border-right: none;
    min-height: 44px;
}
.search-input-group input:focus {
    border-color: var(--ds-color-border-focus);
    background: var(--ds-color-surface);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}
.search-input-group input::placeholder {
    color: var(--ds-color-text-muted);
}
.search-btn {
    padding: var(--ds-space-3) var(--ds-space-6);
    background: var(--ds-color-primary);
    color: var(--ds-color-text-inverse);
    border: 2px solid var(--ds-color-primary);
    border-radius: 0 var(--ds-radius-base) var(--ds-radius-base) 0;
    font-size: var(--ds-text-base);
    font-weight: var(--ds-font-medium);
    font-family: var(--ds-font-body);
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--ds-transition-fast);
    min-height: 44px;
    display: flex;
    align-items: center;
}
.search-btn:hover {
    background: var(--ds-color-primary-hover);
    border-color: var(--ds-color-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--ds-shadow-md);
}

/* Sidebar Categories (Mobile) */
.menu .tab-item {
    cursor: pointer;
}

@media (max-width: 767px) {
    .down {
        display: flex;
        flex-direction: column;
        padding: var(--ds-space-2); /* Reduce side padding on mobile */
        box-sizing: border-box;
    }

    .down > .container {
        padding-left: 0;
        padding-right: 0;
    }

    .menu:not(.comm-list) {
        padding: var(--ds-space-2); /* Reduce menu container padding */
        justify-content: center; /* Ensure items are centered */
        width: 100%;
        margin: 0 auto var(--ds-space-4);
        box-sizing: border-box;
    }

    .down .menu:not(.comm-list) {
        margin-left: 0;
        margin-right: 0;
    }
    .menu:not(.comm-list) .item {
        padding: var(--ds-space-1); /* Reduce item padding to fit better */
    }

    .down .comm-list {
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .down .comm-list.menu {
        padding: 0;
    }

    .down .comm-list .item {
        padding: 10px 12px;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .down .comm-list .item .content {
        font-size: 13px;
        display: flex;
        align-items: center;
        min-width: 0;
    }

    .down .comm-list .item .content span {
        flex: 1;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .down .comm-list .item .my-icon-project {
        font-size: 16px;
        margin-right: 8px;
    }

    .down .comm-list .item.arrow::after {
        flex: 0 0 auto;
        line-height: 1;
    }

    .today-card {
        padding: 12px !important;
    }

    .today-card .today .title {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .today-card .item {
        padding: 8px 0;
    }

    .today-card .item .time {
        font-size: 11px;
        margin-bottom: 4px;
    }

    .today-card .item .project {
        font-size: 13px;
    }

    .down .cate-menu {
        order: -1; /* Put categories above content on mobile */
        margin-bottom: 15px;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        white-space: nowrap;
        padding: 5px;
    }
    .down .cate-menu div:first-child {
        display: none; /* Hide "Categories" title on mobile */
    }
    .down .cate-menu .tab-item {
        flex: 0 0 auto;
        padding: 8px 15px;
        border-bottom: none !important;
    }
    .down .cate-menu .tab-item.active {
        color: var(--projectColor);
        border-bottom: 2px solid var(--projectColor) !important;
    }

    #newsContent, #newsList, #meetList {
        padding-bottom: 80px;
    }
}
/* === MENU NAVIGATION === */
.menu:not(.comm-list), .cate-menu {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    background-color: var(--ds-color-surface);
    padding: var(--ds-space-4);
    margin-bottom: var(--ds-space-4);
    border-radius: var(--ds-radius-lg);
    border: 1px solid var(--ds-color-border);
    box-shadow: var(--ds-shadow-sm);
}

.menu:not(.comm-list) .item, .cate-menu .item {
    flex: 0 0 25%;
    max-width: 25%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    padding: var(--ds-space-3);
    transition: all var(--ds-transition-fast);
    border-radius: var(--ds-radius-md);
    text-decoration: none;
    color: inherit;
    text-align: center; /* Ensure text alignment is centered */
}

.menu:not(.comm-list) .item:hover, .cate-menu .item:hover {
    background: var(--ds-color-surface-hover);
    transform: translateY(-2px);
    box-shadow: var(--ds-shadow-md);
}

.menu:not(.comm-list) .item .img, .cate-menu .item .img {
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: var(--ds-space-3);
    border-radius: var(--ds-radius-full);
    background: linear-gradient(135deg, var(--ds-color-primary-light), var(--ds-color-primary));
    color: var(--ds-color-text-inverse);
    font-size: var(--ds-text-xl);
    transition: all var(--ds-transition-fast);
    box-shadow: var(--ds-shadow-sm);
}

.menu:not(.comm-list) .item .title, .cate-menu .item .title {
    font-size: var(--ds-text-sm);
    color: var(--ds-color-text-primary);
    font-weight: var(--ds-font-medium);
    text-align: center;
    line-height: 1.3;
}

.menu:not(.comm-list) .item .img img, .cate-menu .item .img img {
    width: 100%;
    height: 100%;
}

.menu:not(.comm-list) .item .title, .cate-menu .item .title {
    font-size: var(--ds-text-xs);
    color: var(--ds-color-text-primary);
    font-weight: var(--ds-font-medium);
    text-align: center;
    line-height: var(--ds-leading-tight);
}

/* List Items (News/Activities) */
.list-item {
    display: flex;
    padding: var(--ds-space-4);
    border-bottom: 1px solid var(--ds-color-border);
    background: var(--ds-color-surface);
    text-decoration: none;
    color: inherit;
    transition: all var(--ds-transition-base);
    align-items: center; /* Center content vertically */
}
.list-item:last-child { border-bottom: none; }
.list-item:hover {
    background: var(--ds-color-surface-hover);
    transform: translateY(-1px);
}

.list-item .left-pic {
    width: 110px;
    height: 80px;
    border-radius: var(--ds-radius-base);
    margin-right: var(--ds-space-4);
    object-fit: cover;
    background: var(--ds-color-surface-hover);
    flex-shrink: 0;
}

.list-item .right-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    min-height: 80px;
}

.list-item .title {
    font-size: var(--ds-text-base);
    font-weight: var(--ds-font-semibold);
    color: var(--ds-color-text-primary);
    line-height: var(--ds-leading-snug);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: var(--ds-space-2);
}

.list-item .desc {
    font-size: var(--ds-text-sm);
    color: var(--ds-color-text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: var(--ds-space-2);
}

.list-item .bottom {
    font-size: var(--ds-text-xs);
    color: var(--ds-color-text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

/* User Header (My Page) */
.upside {
    width: 100%;
    height: 200px; /* 400rpx */
    background-color: var(--projectColor);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.upside .upImg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0.3;
    z-index: 1;
}
.user-bar {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
}
.user-bar .avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
    overflow: hidden;
    margin-bottom: 10px;
}
.user-bar .avatar img { width: 100%; height: 100%; }
.user-bar .name { font-size: 18px; font-weight: bold; }
.user-bar .desc { font-size: 12px; opacity: 0.8; margin-top: 5px; }

/* Comm List (Menu in My Page) */
.comm-list {
    background: white;
    padding: 0;
    margin-bottom: 15px;
}
.comm-list .item {
    width: 100%; /* Reset from grid menu */
    height: auto;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f8f8f8;
    flex-wrap: nowrap;
}
.comm-list .item:last-child { border-bottom: none; }
.comm-list .item .content {
    display: flex;
    align-items: center;
    font-size: 14px;
}
.comm-list .item .my-icon-project {
    font-size: 18px;
    margin-right: 10px;
}
.comm-list .item.arrow::after {
    content: "›";
    color: #ccc;
    font-size: 20px;
}

/* Today Card */
.today-card {
    display: block !important;
    padding: 15px !important;
}
.today-card .today .title {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 10px;
    padding-left: 10px;
    border-left: 4px solid var(--projectColor);
}
.today-card .item {
    width: 100%;
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}
.today-card .item .time {
    font-size: 12px;
    color: #999;
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}
.today-card .item .project {
    font-size: 14px;
    font-weight: bold;
}

/* Tabbar */
.tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: var(--ds-color-surface);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid var(--ds-color-border);
    z-index: var(--ds-z-fixed);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}
.tabbar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--ds-color-text-muted);
    font-size: var(--ds-text-xs);
    font-weight: var(--ds-font-medium);
    text-decoration: none;
    flex: 1;
    padding: var(--ds-space-2);
    transition: all var(--ds-transition-fast);
    min-height: 44px;
    justify-content: center;
}
.tabbar-item.active {
    color: var(--ds-color-primary);
    transform: translateY(-1px);
}
.tabbar-item:hover,
.tabbar-item:focus {
    color: var(--ds-color-primary);
    background: var(--ds-color-surface-hover);
    outline: none;
}

.tabbar-item:focus-visible {
    outline: 3px solid var(--ds-color-border-focus);
    outline-offset: -2px;
}
.tabbar-item i {
    font-size: var(--ds-text-xl);
    margin-bottom: var(--ds-space-1);
    transition: transform var(--ds-transition-fast);
}
.tabbar-item.active i {
    transform: scale(1.1);
}

/* --- Responsive PC Design --- */
.pc-header { display: none; } /* Hidden on mobile */
.pc-footer { display: block; } /* Show footer on all devices */
.pc-footer .footer-main { display: none; } /* Hide detailed footer content on mobile */
.pc-footer .footer-bottom { display: block; } /* Show copyright on mobile */

/* === OFFICIAL HEADER STYLES === */
.official-header {
    background: var(--ds-color-surface);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.header-top {
    background: var(--ds-color-primary);
    color: var(--ds-color-text-inverse);
    padding: var(--ds-space-2) 0;
    font-size: var(--ds-text-xs);
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-info {
    display: flex;
    gap: var(--ds-space-6);
}

.header-info span {
    display: flex;
    align-items: center;
    gap: var(--ds-space-1);
}

.header-info i {
    font-size: var(--ds-text-sm);
}

.header-actions .login-link {
    color: var(--ds-color-text-inverse);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: var(--ds-space-1);
    padding: var(--ds-space-1) var(--ds-space-3);
    border-radius: var(--ds-radius-base);
    transition: all var(--ds-transition-fast);
}

.header-actions .login-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.header-actions .user-dropdown {
    color: var(--ds-color-text-inverse);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: var(--ds-space-2);
    padding: var(--ds-space-1) var(--ds-space-3);
    border-radius: var(--ds-radius-base);
    transition: all var(--ds-transition-fast);
}

.header-actions .user-dropdown:hover {
    background: rgba(255, 255, 255, 0.1);
}

.header-main {
    padding: var(--ds-space-4) 0;
    border-bottom: 1px solid var(--ds-color-border);
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.official-logo {
    display: flex;
    align-items: center;
    gap: var(--ds-space-4);
    text-decoration: none;
    transition: all var(--ds-transition-fast);
}

.official-logo:hover {
    transform: translateY(-1px);
}

.official-logo .logo-img {
    height: 60px;
    width: auto;
}

.official-logo .logo-text h1 {
    font-size: var(--ds-text-xl);
    font-weight: var(--ds-font-bold);
    color: var(--ds-color-primary);
    margin: 0;
    line-height: 1.2;
}

.official-logo .logo-text p {
    font-size: var(--ds-text-xs);
    color: var(--ds-color-text-muted);
    margin: var(--ds-space-1) 0 0 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.main-nav {
    display: flex;
    gap: var(--ds-space-2);
}

.main-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--ds-space-1);
    padding: var(--ds-space-3) var(--ds-space-4);
    color: var(--ds-color-text-secondary);
    text-decoration: none;
    border-radius: var(--ds-radius-base);
    transition: all var(--ds-transition-fast);
    position: relative;
    font-weight: var(--ds-font-medium);
}

.main-nav .nav-item i {
    font-size: var(--ds-text-lg);
}

.main-nav .nav-item span {
    font-size: var(--ds-text-sm);
}

.main-nav .nav-item:hover {
    background: var(--ds-color-surface-hover);
    color: var(--ds-color-primary);
}

.main-nav .nav-item.active {
    color: var(--ds-color-primary);
    background: var(--ds-color-primary-light);
}

.main-nav .nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: var(--ds-space-4);
    right: var(--ds-space-4);
    height: 3px;
    background: var(--ds-color-primary);
    border-radius: var(--ds-radius-sm) var(--ds-radius-sm) 0 0;
}

/* === SECTION TITLE STYLES === */
.section-title {
    display: flex;
    align-items: center;
    gap: var(--ds-space-3);
    margin-bottom: var(--ds-space-6);
    padding-bottom: var(--ds-space-3);
    border-bottom: 2px solid var(--ds-color-border);
    position: relative;
}

.section-title .title-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--ds-color-primary), var(--ds-color-primary-hover));
    color: var(--ds-color-text-inverse);
    border-radius: var(--ds-radius-base);
    font-size: var(--ds-text-lg);
}

.section-title .title-text {
    font-size: var(--ds-text-2xl);
    font-weight: var(--ds-font-bold);
    color: var(--ds-color-text-primary);
    font-family: var(--ds-font-heading);
}

.section-title .title-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, var(--ds-color-primary), transparent);
}

/* === OFFICIAL MENU STYLES === */
.official-menu {
    background: var(--ds-color-surface);
    border: 1px solid var(--ds-color-border);
}

.official-menu .item {
    position: relative;
    overflow: hidden;
}

.official-menu .item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--ds-color-primary-light), transparent);
    opacity: 0;
    transition: opacity var(--ds-transition-fast);
}

.official-menu .item:hover::before {
    opacity: 1;
}

.official-menu .item .img {
    position: relative;
    z-index: 1;
}

.official-menu .item .title {
    position: relative;
    z-index: 1;
}

/* === OFFICIAL FOOTER STYLES === */
.official-footer {
    background: #2d3748;
    color: #e2e8f0;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.footer-main {
    padding: var(--ds-space-12) 0 var(--ds-space-8);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--ds-space-8);
}

.footer-col h3 {
    color: #ffffff;
    font-size: var(--ds-text-lg);
    font-weight: var(--ds-font-semibold);
    margin-bottom: var(--ds-space-3);
}

.footer-col h4 {
    color: #ffffff;
    font-size: var(--ds-text-base);
    font-weight: var(--ds-font-semibold);
    margin-bottom: var(--ds-space-4);
    padding-bottom: var(--ds-space-2);
    border-bottom: 2px solid var(--ds-color-primary);
    display: inline-block;
}

.footer-col p {
    color: #cbd5e0;
    line-height: var(--ds-leading-relaxed);
    margin-bottom: var(--ds-space-4);
}

.footer-logo {
    height: 50px;
    width: auto;
    margin-bottom: var(--ds-space-3);
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: var(--ds-space-3);
}

.footer-col ul li a {
    color: #cbd5e0;
    text-decoration: none;
    transition: all var(--ds-transition-fast);
    display: inline-block;
}

.footer-col ul li a:hover {
    color: #ffffff;
    transform: translateX(4px);
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: var(--ds-space-2);
    color: #cbd5e0;
}

.footer-contact li i {
    color: var(--ds-color-primary);
    margin-top: 2px;
}

.footer-social {
    display: flex;
    gap: var(--ds-space-3);
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #4a5568;
    color: #cbd5e0;
    border-radius: var(--ds-radius-full);
    text-decoration: none;
    transition: all var(--ds-transition-fast);
    font-size: var(--ds-text-lg);
}

.footer-social a:hover {
    background: var(--ds-color-primary);
    color: #ffffff;
    transform: translateY(-2px);
}

.footer-bottom {
    background: #1a202c;
    padding: var(--ds-space-4) 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.footer-bottom p {
    margin: var(--ds-space-1) 0;
    font-size: var(--ds-text-xs);
    color: #a0aec0;
    line-height: 1.5;
}

.footer-bottom a {
    color: #a0aec0;
    text-decoration: none;
    transition: color var(--ds-transition-fast);
}

.footer-bottom a:hover {
    color: var(--ds-color-primary);
}

/* Mobile footer adjustments */
@media (max-width: 767px) {
    .footer-bottom {
        padding: var(--ds-space-3) var(--ds-space-2);
        padding-bottom: calc(var(--ds-space-3) + 60px); /* Add tabbar space to bottom padding */
        margin-bottom: 0; /* Remove margin */
    }
    
    .footer-bottom p {
        font-size: 11px;
        margin: 2px 0;
    }
}

/* ========================================
   Tablet Screens (576px - 767px)
   ======================================== */
@media (min-width: 576px) and (max-width: 767px) {
    /* Tablet-sized banner maintaining 2.46:1 ratio */
    .up-fullwidth {
        height: 320px; /* ~768px width × 320px height ≈ 2.4:1 */
    }
}

/* ========================================
   PC Screens (768px+)
   ======================================== */
@media (min-width: 768px) {
    /* Ensure no horizontal overflow for full-width banner */
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
    }
    
    body {
        background-color: #F5F5F5;
        padding-bottom: 0; /* No tabbar space needed */
        min-height: 100vh; /* Ensure body takes full viewport height */
    }

    main#main-content {
        max-width: none; /* Remove max-width for full-width banner */
        margin: 0;
        padding: 0;
        padding-bottom: 0;
        min-height: auto;
        display: flex;
        flex-direction: column;
    }

    /* Hide Mobile Tabbar */
    .tabbar { display: none; }

    /* Show PC Header */
    .pc-header {
        display: block;
        position: sticky;
        top: 0;
        z-index: var(--ds-z-sticky);
    }

    /* Layout Adjustments */
    .main {
        max-width: 1200px;
        margin: 0 auto;
        padding: var(--ds-space-6);
        padding-bottom: var(--ds-space-6);
        min-height: auto; /* Remove fixed min-height */
        display: flex;
        flex-direction: column;
    }
    
    /* Only apply min-height to pages with banners (index, profile) */
    .down {
        min-height: calc(100vh - 780px);
        max-width: 1200px;
        margin: 0 auto;
        padding: var(--ds-space-6);
    }

    /* Full-width banner on PC - break out of container */
    .up-fullwidth {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 780px; /* Match reference site: 1920x780 */
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw !important;
        margin-right: -50vw !important;
        margin-bottom: var(--ds-space-6);
        overflow: hidden;
        padding: 0 !important;
    }
    
    .up-fullwidth .carousel,
    .up-fullwidth .carousel-inner,
    .up-fullwidth .carousel-item {
        width: 100% !important;
        max-width: 100% !important;
        height: 100%;
    }
    
    .up-fullwidth img {
        object-fit: cover;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Index specific - regular banner (not used when up-fullwidth exists) */
    .up {
        height: 450px; /* Taller banner on PC */
        border-radius: var(--ds-radius-lg);
        margin-bottom: var(--ds-space-6);
        overflow: hidden;
        box-shadow: var(--ds-shadow-lg);
    }
    
    /* PC Carousel enhancements */
    .carousel-indicators {
        margin-bottom: 2rem;
        z-index: 15;
    }
    .carousel-indicators button {
        width: 12px;
        height: 12px;
        border-radius: 50%; /* Keep circular */
    }
    .carousel-indicators button.active {
        width: 12px; /* Same size, stay circular */
        height: 12px;
        border-radius: 50%; /* Stay circular */
        /* Only color changes, no size change */
    }
    .carousel-control-prev,
    .carousel-control-next {
        width: 60px;
        z-index: 15;
    }
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 40px;
        height: 40px;
    }
    
    /* Full-width carousel specific styles */
    .up-fullwidth .carousel-control-prev,
    .up-fullwidth .carousel-control-next {
        width: 80px;
    }
    .up-fullwidth .carousel-control-prev-icon,
    .up-fullwidth .carousel-control-next-icon {
        width: 50px;
        height: 50px;
    }
    .up-fullwidth .carousel-indicators {
        margin-bottom: 3rem;
    }
    .up-fullwidth .carousel-indicators button {
        width: 14px;
        height: 14px;
        border-radius: 50%; /* Keep circular */
    }
    .up-fullwidth .carousel-indicators button.active {
        width: 14px; /* Same size, stay circular */
        height: 14px;
        border-radius: 50%; /* Stay circular */
        /* Only color changes, no size change */
    }
    /* Layout adjustments for PC */
    .down, .page-content {
        margin-top: 0; /* Reset negative margin */
        padding: 0;
    }

    .down > .container {
        display: block;
        max-width: 1200px;
        margin: 0 auto;
        padding: 0;
    }

    .down > .container > h2 {
        margin-bottom: 0;
    }

    .page-content {
        display: flex;
        gap: var(--ds-space-6);
        align-items: flex-start;
    }
    
    /* Make menu a sidebar on PC */
    .page-content .cate-menu {
        width: 190px; /* Sidebar width */
        flex-shrink: 0;
        border-radius: var(--ds-radius-lg);
        padding: var(--ds-space-3);
        order: 2; /* Put menu on right side */
        display: flex;
        flex-direction: column; /* Stack vertically */
        background: var(--ds-color-surface);
        box-shadow: var(--ds-shadow-lg);
    }

    .page-content .cate-menu .item {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
        min-height: auto;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        padding: 10px 12px;
        text-align: left;
        margin-bottom: var(--ds-space-2);
    }
    .page-content .cate-menu > div:first-child {
        padding: var(--ds-space-4) var(--ds-space-4) !important;
        margin: calc(var(--ds-space-4) * -1) calc(var(--ds-space-4) * -1) var(--ds-space-3) !important;
        border-bottom: 1px solid var(--ds-color-border-light) !important;
        border-top-left-radius: var(--ds-radius-lg);
        border-top-right-radius: var(--ds-radius-lg);
        background: var(--ds-color-surface-hover);
        font-size: var(--ds-text-base);
        color: var(--ds-color-text-primary);
    }

    .page-content .cate-menu .tab-item {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 12px 12px;
        border-radius: var(--ds-radius-md);
        cursor: pointer;
        transition: background var(--ds-transition-fast), color var(--ds-transition-fast), transform var(--ds-transition-fast);
        position: relative;
    }

    .page-content .cate-menu .tab-item .title {
        font-size: var(--ds-text-sm);
        font-weight: var(--ds-font-medium);
        color: var(--ds-color-text-secondary);
    }

    .page-content .cate-menu .tab-item:hover {
        background: var(--ds-color-surface-hover);
        transform: translateX(2px);
    }

    .page-content .cate-menu .tab-item.active {
        background: var(--ds-color-primary-light);
    }

    .page-content .cate-menu .tab-item.active .title {
        color: var(--ds-color-primary);
        font-weight: var(--ds-font-semibold);
    }

    .page-content .cate-menu .tab-item.active::before {
        content: '';
        position: absolute;
        left: 0;
        top: 10px;
        bottom: 10px;
        width: 4px;
        border-radius: 0 var(--ds-radius-sm) var(--ds-radius-sm) 0;
        background: var(--ds-color-primary);
    }
    
    /* PC sidebar menu items - ONLY apply to .down (PC) */
    .down .menu:not(.comm-list) .item, .down .cate-menu .item {
        width: 100%; /* Full width in sidebar */
        flex-direction: row; /* Icon + Text horizontal */
        justify-content: flex-start;
        padding: var(--ds-space-4);
        min-height: auto;
        height: auto;
        border-bottom: 1px solid var(--ds-color-border-light);
        transition: all var(--ds-transition-base);
        border-radius: var(--ds-radius-md);
        margin-bottom: var(--ds-space-2);
    }
    
    .down .menu:not(.comm-list) .item:last-child, .down .cate-menu .item:last-child { 
        border-bottom: none; 
        margin-bottom: 0;
    }
    
    .down .menu:not(.comm-list) .item:hover, .down .cate-menu .item:hover {
        background: var(--ds-color-primary-light);
        color: var(--ds-color-primary);
        transform: translateX(4px);
        box-shadow: var(--ds-shadow-md);
    }
    
    .down .menu:not(.comm-list) .item .img, .down .cate-menu .item .img { 
        margin-bottom: 0; 
        margin-right: var(--ds-space-4); 
        width: 40px; 
        height: 40px; 
        font-size: var(--ds-text-lg); 
        flex-shrink: 0;
    }
    
    .down .menu:not(.comm-list) .item .title, .down .cate-menu .item .title { 
        font-size: var(--ds-text-base);
        font-weight: var(--ds-font-medium);
        text-align: left;
    }

    /* Content Area */
    #newsList, #meetList {
        flex: 1; /* Take remaining space */
        order: 1;
    }

    .list-item {
        border-radius: var(--ds-radius-md);
        margin-bottom: var(--ds-space-4);
        border: 1px solid var(--ds-color-border);
        transition: all var(--ds-transition-base);
        cursor: pointer;
    }
    .list-item:hover {
        transform: translateY(-2px);
        box-shadow: var(--ds-shadow-lg);
        border-color: var(--ds-color-border-hover);
    }
    .list-item .left-pic {
        width: 200px;
        height: 130px;
        border-radius: var(--ds-radius-base);
    }
    .list-item .title { 
        font-size: var(--ds-text-lg); 
        font-family: var(--ds-font-heading);
        margin-bottom: var(--ds-space-3); 
    }
    .list-item .desc { 
        font-size: var(--ds-text-base); 
        margin-bottom: var(--ds-space-3); 
        -webkit-line-clamp: 2; 
        line-height: var(--ds-leading-relaxed);
    }
    
    /* Hide Search Bar sticky wrapper on PC for Activities/News pages, replace with inline */
    .bg-project {
        background: transparent !important;
        padding: 0 !important;
        position: static !important;
        margin-bottom: var(--ds-space-6);
    }
    .bg-project > div {
        background: var(--ds-color-surface) !important;
        border: 1px solid var(--ds-color-border);
        border-radius: var(--ds-radius-full);
        max-width: 400px;
        padding: var(--ds-space-2) var(--ds-space-4);
        box-shadow: var(--ds-shadow-base);
        transition: all var(--ds-transition-fast);
    }
    .bg-project > div:hover {
        box-shadow: var(--ds-shadow-md);
        border-color: var(--ds-color-border-hover);
    }
    .bg-project input { 
        font-size: var(--ds-text-base); 
        border: none;
        outline: none;
        background: transparent;
        color: var(--ds-color-text-primary);
    }
    .bg-project input::placeholder {
        color: var(--ds-color-text-muted);
    }
    .bg-project i {
        color: var(--ds-color-primary);
    }

    /* Tabs on PC */
    .d-flex.justify-content-around {
        justify-content: flex-start !important;
        gap: 30px;
        padding: 15px 20px !important;
        border-radius: 10px;
    }
    
    /* PC Footer */
    .pc-footer {
        display: block;
        margin-top: auto;
    }
    
    .pc-footer .footer-main {
        display: block; /* Show detailed footer on PC */
    }

    /* Footer Grid Responsive */
    @media (max-width: 991px) {
        .footer-grid {
            grid-template-columns: 1fr 1fr;
        }
    }

    @media (max-width: 767px) {
        .footer-grid {
            grid-template-columns: 1fr;
        }
    }

    /* PC Profile Layout */
    .profile-container {
        display: flex;
        gap: 20px;
        align-items: flex-start;
    }
    .profile-left {
        width: 300px;
        flex-shrink: 0;
    }
    .profile-right {
        flex: 1;
    }
    
    /* Enhance Profile User Card */
    .pc-user-card {
        background: var(--ds-color-surface);
        border-radius: var(--ds-radius-md);
        padding: var(--ds-space-8) var(--ds-space-6);
        text-align: center;
        box-shadow: var(--ds-shadow-base);
        margin-bottom: var(--ds-space-6);
        border: 1px solid var(--ds-color-border);
        transition: all var(--ds-transition-base);
    }
    .pc-user-card:hover {
        box-shadow: var(--ds-shadow-md);
        transform: translateY(-1px);
    }
    .pc-user-card .avatar {
        width: 100px;
        height: 100px;
        border-radius: var(--ds-radius-full);
        margin: 0 auto var(--ds-space-4);
        border: 4px solid var(--ds-color-primary-light);
        overflow: hidden;
    }
    .pc-user-card .name {
        font-family: var(--ds-font-heading);
        font-size: var(--ds-text-xl);
        font-weight: var(--ds-font-bold);
        color: var(--ds-color-text-primary);
        margin-bottom: var(--ds-space-2);
    }
    .pc-user-card .desc {
        color: var(--ds-color-text-secondary);
        font-size: var(--ds-text-base);
        margin-bottom: var(--ds-space-6);
    }
    .pc-user-card .btn-edit {
        display: inline-block;
        padding: var(--ds-space-2) var(--ds-space-6);
        background: var(--ds-color-primary);
        color: var(--ds-color-text-inverse);
        border-radius: var(--ds-radius-full);
        font-size: var(--ds-text-sm);
        font-weight: var(--ds-font-medium);
        text-decoration: none;
        transition: all var(--ds-transition-fast);
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
    .pc-user-card .btn-edit:hover { 
        background: var(--ds-color-primary-hover);
        color: var(--ds-color-text-inverse);
        transform: translateY(-1px);
        box-shadow: var(--ds-shadow-md);
    }

    /* Enhance Profile Menu */
    .pc-menu-list {
        background: var(--ds-color-surface);
        border-radius: var(--ds-radius-md);
        overflow: hidden;
        border: 1px solid var(--ds-color-border);
        box-shadow: var(--ds-shadow-base);
    }
    .pc-menu-list .item {
        display: flex;
        align-items: center;
        padding: var(--ds-space-4) var(--ds-space-5);
        border-bottom: 1px solid var(--ds-color-border);
        cursor: pointer;
        transition: all var(--ds-transition-fast);
        min-height: 56px;
    }
    .pc-menu-list .item:last-child { border-bottom: none; }
    .pc-menu-list .item:hover { 
        background: var(--ds-color-surface-hover);
        transform: translateX(4px);
    }
    .pc-menu-list .item i {
        font-size: var(--ds-text-lg);
        margin-right: var(--ds-space-4);
        width: 24px;
        text-align: center;
    }
    .pc-menu-list .item span {
        font-size: var(--ds-text-base);
        font-weight: var(--ds-font-medium);
        color: var(--ds-color-text-primary);
        flex: 1;
    }
    .pc-menu-list .item::after {
        content: '\F285'; /* Bootstrap Icon chevron-right */
        font-family: 'bootstrap-icons';
        color: var(--ds-color-text-muted);
        font-size: var(--ds-text-base);
        transition: color var(--ds-transition-fast);
    }
    .pc-menu-list .item:hover::after {
        color: var(--ds-color-primary);
    }

    /* Enhance Right Side Cards */
    .pc-card-header {
        font-family: var(--ds-font-heading);
        font-size: var(--ds-text-lg);
        font-weight: var(--ds-font-semibold);
        padding: var(--ds-space-6);
        border-bottom: 1px solid var(--ds-color-border);
        display: flex;
        align-items: center;
        background: var(--ds-color-surface-hover);
    }
    .pc-card-header::before {
        content: '';
        display: block;
        width: 4px;
        height: 18px;
        background: var(--ds-color-primary);
        margin-right: var(--ds-space-3);
        border-radius: var(--ds-radius-sm);
    }
    .pc-profile-content {
        background: var(--ds-color-surface);
        border-radius: var(--ds-radius-md);
        box-shadow: var(--ds-shadow-base);
        border: 1px solid var(--ds-color-border);
        min-height: 400px;
        transition: all var(--ds-transition-base);
    }
    .pc-profile-content:hover {
        box-shadow: var(--ds-shadow-md);
        transform: translateY(-1px);
    }
}

/* === MOBILE OPTIMIZATIONS === */
@media (max-width: 576px) {
    .menu:not(.comm-list), .cate-menu {
        margin: var(--ds-space-3) 0 var(--ds-space-4);
        padding: var(--ds-space-3);
    }
    
    .menu:not(.comm-list) .item, .cate-menu .item {
        min-height: 85px;
        padding: var(--ds-space-2);
    }
    
    .menu:not(.comm-list) .item .img, .cate-menu .item .img {
        width: 42px;
        height: 42px;
        font-size: var(--ds-text-lg);
    }
    
    .menu:not(.comm-list) .item .title, .cate-menu .item .title {
        font-size: var(--ds-text-xs);
    }
}

/* === TABLET OPTIMIZATIONS === */
@media (min-width: 577px) and (max-width: 991px) {
    .menu:not(.comm-list), .cate-menu {
        margin: var(--ds-space-4) 0 var(--ds-space-5);
        padding: var(--ds-space-4);
    }
    
    .menu:not(.comm-list) .item, .cate-menu .item {
        min-height: 95px;
    }
}
/* === Volunteer Profile Mobile Styles (Added) === */
.profile-header-mobile {
    background: transparent;
    padding: 15px;
    padding-top: 10px;
}

.profile-user-info {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.profile-user-info .avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 15px;
    background: #eee;
    overflow: hidden;
}
.profile-user-info .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-user-info .info .name {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}
.profile-user-info .info .phone {
    font-size: 14px;
    color: #666;
    margin-top: 4px;
}

.volunteer-card {
    background: linear-gradient(135deg, #ff6b6b, #ff4757);
    border-radius: 12px;
    padding: 20px;
    color: white;
    position: relative;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(255, 71, 87, 0.3);
    min-height: 100px;
}
.volunteer-card .card-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
}
.volunteer-card .card-num {
    font-size: 13px;
    opacity: 0.9;
}
.volunteer-card .btn-view {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    color: #333;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 14px;
    color: #333;
    padding: 15px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.stats-row .stars {
    color: #ffc107; /* Gold/Orange */
    display: flex;
    align-items: center;
}
.stats-row .hours {
    display: flex;
    align-items: center;
    font-weight: bold;
}
.stats-row .hours i {
    color: #ff4757; /* Heart color */
    margin-right: 5px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 30px;
}
.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-size: 12px;
    color: #666;
    text-decoration: none;
}
.feature-item i {
    font-size: 24px;
    margin-bottom: 8px;
    color: #333;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 0 5px;
}
.section-header h3 {
    font-size: 16px;
    font-weight: bold;
    margin: 0;
    color: #333;
}
.section-header .more {
    font-size: 12px;
    color: #999;
    text-decoration: none;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}
.service-card {
    background: #fff;
    padding: 20px 10px;
    border-radius: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.service-card i {
    font-size: 24px;
    color: #ff4757;
    margin-bottom: 10px;
    background: rgba(255, 71, 87, 0.1);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}
.service-card span {
    font-size: 13px;
    color: #333;
    font-weight: 500;
}

/* ========================================
   Extra Large Screens (1400px+)
   ======================================== */
@media (min-width: 1400px) {
    /* Keep same height ratio as reference site */
    .up-fullwidth {
        height: 780px; /* 1920x780 ratio maintained */
    }
    
    .down {
        min-height: calc(100vh - 780px);
    }
}

/* ========================================
   Ultra Large Screens (1920px+)
   ======================================== */
@media (min-width: 1920px) {
    /* Full reference site dimensions */
    .up-fullwidth {
        height: 780px; /* Exact match: 1920x780 */
    }
    
    .down {
        min-height: calc(100vh - 780px);
    }
}
