/*
Theme Name: WHMO Member Portal
Template: twentytwentyfive
Version: 2.0.1
Author: WHMO Dev
Text Domain: whmo-theme
*/

/* 全局box-sizing修复 - 解决content-box+width:100%+padding导致的20px偏移 */
*, *::before, *::after { box-sizing: border-box; }


/* ========== WHMO 主题定制 ========== */

/* 整体色调 - 深红+金 */
:root {
    --whmo-red: #8B0000;
    --whmo-red-light: #a00000;
    --whmo-red-dark: #5c0000;
    --whmo-gold: #DAA520;
    --whmo-gold-light: #e6b84d;
    --whmo-bg: #fafafa;
    --whmo-text: #333;
    --whmo-text-light: #888;
}

/* 隐藏TT5默认的header/footer，自定义导航已注入 */
.wp-block-navigation { display: none !important; }
.wp-block-site-title { display: none !important; }

/* ========== 顶部导航栏 ========== */
#whmo-topnav {
    background: #8B0000;
    position: sticky;
    top: 0;
    z-index: 9999;
}
.whmo-topnav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
.whmo-topnav-logo-row {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0 6px;
}
.whmo-topnav-brand {
    color: #fff;
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    white-space: nowrap;
}
.whmo-topnav-brand:hover {
    opacity: 0.9;
}
.whmo-nav-brand-text {
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 2px;
}
.whmo-topnav-menu-row {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    padding: 4px 0 8px;
}
.whmo-nav-link {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
}
.whmo-nav-link:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}
.whmo-nav-register {
    background: rgba(255,255,255,0.2);
    font-weight: 600;
}
.whmo-nav-logout {
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 4px;
    padding: 4px 12px;
}

/* ========== 第一屏：Hero ========== */
.whmo-hero {
    background: linear-gradient(135deg, #3a0a0a 0%, var(--whmo-red-dark) 30%, var(--whmo-red) 60%, #8b2020 100%);
    color: #fff;
    padding: 100px 20px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.whmo-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(218,165,32,0.08) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 80%, rgba(218,165,32,0.05) 0%, transparent 60%);
    pointer-events: none;
}
.whmo-hero-inner { position: relative; z-index: 1; }
.whmo-hero-badge {
    display: inline-block;
    border: 1px solid var(--whmo-gold);
    color: var(--whmo-gold);
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 13px;
    letter-spacing: 3px;
    margin-bottom: 20px;
}
.whmo-hero h1 {
    font-size: 3.2em;
    margin-bottom: 16px;
    color: #fff;
    letter-spacing: 12px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.whmo-hero p {
    font-size: 1.15em;
    opacity: 0.85;
    max-width: 520px;
    margin: 0 auto 36px;
    line-height: 1.8;
}
.whmo-hero .whmo-hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
.whmo-hero .whmo-btn-hero {
    display: inline-block;
    padding: 14px 36px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}
.whmo-btn-hero-primary {
    background: var(--whmo-gold);
    color: var(--whmo-red-dark) !important;
    box-shadow: 0 4px 15px rgba(218,165,32,0.3);
}
.whmo-btn-hero-primary:hover {
    background: var(--whmo-gold-light);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(218,165,32,0.4);
}
.whmo-btn-hero-outline {
    background: transparent;
    color: #fff !important;
    border: 2px solid rgba(255,255,255,0.6);
}
.whmo-btn-hero-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
}

/* ========== 通用区块 ========== */
.whmo-section { padding: 60px 20px; }

.whmo-section-title {
    text-align: center;
    font-size: 1.8em;
    margin-bottom: 8px;
}
.whmo-section-subtitle {
    text-align: center;
    color: var(--whmo-text-light);
    margin-bottom: 40px;
    font-size: 15px;
}
.whmo-section-title-sm {
    font-size: 1.3em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid;
}

/* 第二屏：深色底功能卡片 */
.whmo-section-dark {
    background: #1a1a2e;
    color: #eee;
}
.whmo-section-dark .whmo-section-title { color: #fff; }
.whmo-section-dark .whmo-section-subtitle { color: rgba(255,255,255,0.5); }

.whmo-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.whmo-feature-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 28px 16px;
    text-align: center;
    transition: all 0.3s;
}
a.whmo-feature-card {
    text-decoration: none;
    color: inherit;
    display: block;
}
.whmo-feature-card:hover {
    background: rgba(255,255,255,0.12);
    border-color: var(--whmo-gold);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.whmo-feature-icon { font-size: 2.2em; margin-bottom: 12px; }
.whmo-feature-card h3 {
    color: var(--whmo-gold);
    margin-bottom: 8px;
    font-size: 1.05em;
}
.whmo-feature-card p {
    color: rgba(255,255,255,0.55);
    font-size: 13px;
    line-height: 1.6;
}

/* 第三屏：浅色底公告+活动 */
.whmo-section-light {
    background: #f5f0eb;
}
.whmo-section-light .whmo-section-title-sm {
    color: var(--whmo-red);
    border-color: var(--whmo-gold);
}
.whmo-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}
.whmo-col { }
.whmo-list-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 14px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.whmo-list-item:last-of-type { border-bottom: none; }
.whmo-list-item-title {
    color: var(--whmo-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s;
}
.whmo-list-item-title:hover { color: var(--whmo-red); }
.whmo-list-item-date {
    font-size: 12px;
    color: #aaa;
    white-space: nowrap;
    margin-left: 12px;
}
.whmo-list-item-meta {
    display: block;
    font-size: 13px;
    color: #aaa;
    margin-top: 4px;
}
.whmo-more-link {
    display: inline-block;
    margin-top: 16px;
    color: var(--whmo-red);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}
.whmo-more-link:hover { color: var(--whmo-red-light); }
.whmo-empty { color: #bbb; font-size: 14px; }

/* 第四屏：关于洪门（酒红底） */
.whmo-section-red {
    background: linear-gradient(135deg, var(--whmo-red-dark), var(--whmo-red));
    color: #fff;
    position: relative;
    overflow: hidden;
}
.whmo-section-red::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(218,165,32,0.08) 0%, transparent 70%);
    pointer-events: none;
}
.whmo-about {
    display: flex;
    align-items: center;
    gap: 60px;
    position: relative;
    z-index: 1;
}
.whmo-about-text { flex: 1; }
.whmo-about-text h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: var(--whmo-gold);
    letter-spacing: 2px;
}
.whmo-about-text p {
    line-height: 1.9;
    opacity: 0.85;
    margin-bottom: 12px;
    font-size: 15px;
}
.whmo-about-image {
    flex: 0 0 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.whmo-about-seal {
    width: 160px;
    height: 160px;
    border: 3px solid var(--whmo-gold);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: whmo-seal-glow 3s ease-in-out infinite;
}
@keyframes whmo-seal-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(218,165,32,0.15); }
    50% { box-shadow: 0 0 40px rgba(218,165,32,0.3); }
}
.whmo-seal-ring {
    font-size: 3.5em;
    color: var(--whmo-gold);
    font-weight: 700;
    line-height: 1;
}
.whmo-seal-text {
    font-size: 13px;
    color: var(--whmo-gold);
    letter-spacing: 6px;
    margin-top: 4px;
}

/* ========== 底部信息栏 ========== */
.whmo-footer {
    background: #111;
    color: #ccc;
    padding: 50px 20px 0;
}
.whmo-footer-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.whmo-footer-col h4 {
    color: #fff;
    font-size: 15px;
    margin-bottom: 16px;
    letter-spacing: 1px;
}
.whmo-footer-col p {
    font-size: 13px;
    line-height: 1.7;
    color: #999;
}
.whmo-footer-contact {
    margin-top: 12px;
    color: var(--whmo-gold) !important;
}
.whmo-footer-col a {
    display: block;
    color: #999;
    text-decoration: none;
    font-size: 13px;
    padding: 4px 0;
    transition: color 0.2s;
}
.whmo-footer-col a:hover { color: var(--whmo-gold); }
.whmo-footer-qrcode { margin-top: 8px; }
.whmo-qr-placeholder {
    width: 90px;
    height: 90px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 12px;
}
.whmo-footer-bottom {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 0;
    text-align: center;
}
.whmo-footer-bottom p {
    font-size: 12px;
    color: #666;
}
.whmo-footer-bottom a {
    color: #888;
    text-decoration: none;
}
.whmo-footer-bottom a:hover { color: var(--whmo-gold); }

/* ========== 优化WHMO插件表单 ========== */
.whmo-form {
    border-color: #eee;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* 会员级别颜色 */
.whmo-level-observer { background: #999; color: #fff; }
.whmo-level-member { background: #1976D2; color: #fff; }
.whmo-level-director { background: #F57C00; color: #fff; }
.whmo-level-standing { background: var(--whmo-gold); color: #333; font-weight: 700; }

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .whmo-hero { padding: 50px 16px 40px; }
    .whmo-hero h1 { font-size: 1.8em; letter-spacing: 4px; }
    .whmo-hero p { font-size: 1em; margin-bottom: 24px; }
    .whmo-section { padding: 36px 16px; }
    .whmo-section-title { font-size: 1.4em; }
    .whmo-section-subtitle { font-size: 13px; margin-bottom: 28px; }
    .whmo-two-col { grid-template-columns: 1fr; gap: 24px; }
    .whmo-about { flex-direction: column; text-align: center; gap: 30px; }
    .whmo-about-image { flex: none; }
    .whmo-about-text h2 { font-size: 1.4em; }
    .whmo-about-text p { font-size: 14px; }
    .whmo-footer-inner { grid-template-columns: 1fr 1fr; gap: 20px; }
    .whmo-footer-col { text-align: center; }
    .whmo-footer-qrcode { margin-top: 12px; }
    .whmo-topnav-inner { padding: 0 8px; }
    .whmo-topnav-brand { font-size: 16px; }
    .whmo-nav-brand-text { font-size: 16px; letter-spacing: 1px; }
    .whmo-hero .whmo-btn-hero { padding: 10px 20px; font-size: 13px; }
    .whmo-topnav-menu-row { flex-wrap: wrap; gap: 2px; padding: 4px 0 6px; }
    .whmo-nav-link { padding: 4px 8px; font-size: 12px; }
    .whmo-features { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .whmo-feature-card { padding: 20px 12px; }
    .whmo-feature-icon { font-size: 1.8em; margin-bottom: 8px; }
    .whmo-feature-card h3 { font-size: 0.95em; }
    .whmo-feature-card p { font-size: 12px; }
    .whmo-seal-ring { font-size: 2.8em; }
    .whmo-seal-text { font-size: 11px; letter-spacing: 4px; }
    .whmo-about-seal { width: 130px; height: 130px; }
}

/* 超小屏 480px */
@media (max-width: 480px) {
    .whmo-hero { padding: 40px 12px 36px; }
    .whmo-hero h1 { font-size: 1.5em; letter-spacing: 2px; }
    .whmo-hero p { font-size: 0.9em; }
    .whmo-hero .whmo-btn-hero { padding: 10px 16px; font-size: 12px; flex: 1; min-width: 0; }
    .whmo-hero .whmo-hero-buttons { gap: 10px; }
    .whmo-section { padding: 28px 12px; }
    .whmo-section-title { font-size: 1.2em; }
    .whmo-features { grid-template-columns: 1fr; }
    .whmo-feature-card { padding: 16px 10px; }
    .whmo-footer-inner { grid-template-columns: 1fr; gap: 16px; }
    .whmo-footer-col h4 { margin-bottom: 10px; }
    .whmo-topnav-logo-row { padding: 8px 0 4px; }
    .whmo-topnav-brand { font-size: 14px; }
    .whmo-nav-brand-text { font-size: 14px; }
    .whmo-nav-link { padding: 3px 6px; font-size: 11px; }
    .whmo-about-seal { width: 110px; height: 110px; }
    .whmo-seal-ring { font-size: 2.4em; }
    .whmo-seal-text { font-size: 10px; letter-spacing: 3px; }
}
.whmo-hero-badge a { color: inherit; text-decoration: none; }
.whmo-hero-badge a:hover { text-decoration: underline; }

/* 覆盖TT5对wp-site-blocks的宽度约束 */
.wp-site-blocks {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow-x: hidden !important;
}

/* 覆盖TT5的 :where(.wp-site-blocks) > * 对子元素的约束 */
.wp-site-blocks > .whmo-hero,
.wp-site-blocks > .whmo-section,
.wp-site-blocks > .whmo-footer,
.wp-site-blocks > #whmo-topnav {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100%;
}
