/* GO想專用樣式 */

/* 頂部導航區 */
.goxiang-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    max-width: 480px;
    margin: 0 auto;
}

.back-btn {
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s;
    flex-shrink: 0;
}

.back-btn:hover {
    background-color: rgba(255,255,255,0.2);
}

.page-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--white);
    margin: 0;
    flex: 1;
    text-align: center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-btn, .mailbox-btn {
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.search-btn:hover, .mailbox-btn:hover {
    background-color: rgba(255,255,255,0.2);
}

/* 搜尋容器 */
.search-container {
    padding: 0 20px 15px 20px;
    max-width: 480px;
    margin: 0 auto;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--white);
    border-radius: 25px;
    padding: 0 15px;
}

.search-icon {
    color: var(--text-secondary);
    margin-right: 10px;
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 0;
    font-size: 1rem;
    color: var(--text-primary);
    background: transparent;
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.clear-search {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: background-color 0.3s;
    flex-shrink: 0;
}

.clear-search:hover {
    background-color: var(--background-secondary);
}

/* 主要內容 */
.goxiang-main {
    max-width: 480px;
    margin: 0 auto;
    padding-bottom: 80px; /* 為底部CTA留出空間 */
    background: var(--background-primary);
}


/* 公告區塊 */
.latest-announcements, .all-announcements {
    padding: 20px; /* 恢復正常padding */
    max-width: 480px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.section-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.view-all-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: opacity 0.3s;
}

.view-all-btn:hover {
    opacity: 0.7;
}

/* 篩選按鈕 */
.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--background-secondary);
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* 公告列表 */
.announcements-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.announcement-item {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s;
    border-left: 4px solid transparent;
}

.announcement-item:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.announcement-item.emergency {
    border-left-color: #ff4757;
    background: linear-gradient(135deg, #fff 0%, #fff5f5 100%);
}

.announcement-item.event {
    border-left-color: #3742fa;
    background: linear-gradient(135deg, #fff 0%, #f5f5ff 100%);
}

.announcement-item.general {
    border-left-color: var(--primary-color);
}

.announcement-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 10px;
}

.announcement-type {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 10px;
    font-weight: 500;
    text-transform: uppercase;
}

.announcement-type.emergency {
    background: #ff4757;
    color: var(--white);
}

.announcement-type.event {
    background: #3742fa;
    color: var(--white);
}

.announcement-type.general {
    background: var(--primary-color);
    color: var(--white);
}

.announcement-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.announcement-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.announcement-content {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.announcement-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
}

.announcement-keywords {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.keyword-tag {
    font-size: 0.7rem;
    background: var(--background-secondary);
    color: var(--text-secondary);
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 500;
}

.event-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.event-location, .event-datetime {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 載入更多按鈕 */
.load-more-btn {
    width: 100%;
    background: var(--background-secondary);
    border: none;
    border-radius: var(--border-radius);
    padding: 15px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1rem;
    margin-top: 20px;
    transition: all 0.3s;
}

.load-more-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* 底部固定CTA */
.goxiang-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 50;
}

.bottom-cta {
    display: flex;
    max-width: 480px;
    margin: 0 auto;
    padding: 15px 20px;
    gap: 15px;
}

.cta-btn {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    border-radius: var(--border-radius);
    color: var(--white);
    cursor: pointer;
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    font-size: 0.9rem;
    font-weight: 500;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.cta-btn:active {
    transform: translateY(0);
}

.cta-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
}

/* Toast 通知 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--success-color, #2ed573);
    color: var(--white);
    padding: 15px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    max-width: 90%;
    min-width: 200px;
}

.toast.show {
    opacity: 1;
    visibility: visible;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-message {
    font-size: 0.9rem;
    font-weight: 500;
}

/* 載入動畫 */
.loading-skeleton {
    background: var(--background-secondary);
    border-radius: var(--border-radius);
    position: relative;
    overflow: hidden;
}

.loading-skeleton::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255,255,255,0.6), 
        transparent
    );
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

.skeleton-item {
    padding: 20px;
    margin-bottom: 15px;
}

.skeleton-title {
    height: 20px;
    width: 70%;
    margin-bottom: 10px;
}

.skeleton-content {
    height: 15px;
    width: 100%;
    margin-bottom: 8px;
}

.skeleton-content:last-child {
    width: 60%;
}

/* 響應式設計 */
@media (max-width: 480px) {
    .header-container {
        padding: 12px 15px;
    }
    
    .search-container {
        padding: 0 15px 12px 15px;
    }
    
    .latest-announcements, .all-announcements {
        padding: 15px; /* 恢復正常padding */
    }
    
    
    .bottom-cta {
        padding: 12px 15px;
        gap: 12px;
    }
    
    .cta-btn {
        padding: 12px 8px;
        font-size: 0.85rem;
    }
    
    .cta-icon {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 360px) {
    .filter-buttons {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .announcement-item {
        padding: 15px;
    }
    
    .event-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
