/* ======================================================
sancan-10.css — 三餐解忧铺 · 页面独有样式
依赖主题全局变量，移除与主题重复的工具栏、弹窗等
====================================================== */

/* ---------- 页面容器 ---------- */
.sancan-container {
    width: 100%;
    max-width: 1100px;
    padding: 20px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding-top: 90px; /* 为固定工具栏留出空间（主题已提供） */
}

/* ---------- 页眉 ---------- */
.page-header {
    text-align: center;
    margin-bottom: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 🆕 Logo 样式（去边框、放大尺寸） */
.page-logo {
    width: 400px; /* 🌟 放大至 140px，视觉更大气、更具品牌感 */
    height: 140px;
    object-fit: contain; /* 保持图片原始比例，防止拉伸变形 */
    margin-bottom: 0;
    
    /* 🌟 已移除 border-radius 和 box-shadow，呈现图片最干净的边缘 */
    
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.page-logo:hover {
    /* 悬停动画保留，但幅度稍微收敛，更适合大尺寸图片 */
    transform: scale(1.05) rotate(-2deg); 
}

.page-header h1 {
    font-size: 2.4rem;
    font-weight: 700;
    margin-top: 0; 
}

.page-header h1 .highlight {
    color: var(--accent-orange);
}

.page-header .subhead {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* ---------- 巨幅按钮 ---------- */
.hero-btn-wrapper {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 40px auto;
}
.hero-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    width: 100%;
    padding: 24px 32px;
    border-radius: 80px;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-mango));
    color: #2D2A24 !important;
    border: none;
    box-shadow: 0 12px 32px rgba(255, 138, 92, 0.3);
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
}
.hero-btn:hover {
    transform: scale(1.03) rotate(-0.5deg);
    box-shadow: 0 20px 48px rgba(255, 138, 92, 0.4);
}
.hero-btn .btn-icon {
    font-size: 2.4rem;
}
.hero-btn .btn-label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}
.hero-btn .btn-label small {
    font-size: 0.9rem;
    font-weight: 400;
    opacity: 0.75;
}

/* ---------- 地图区域 ---------- */
.map-section {
    width: 100%;
    max-width: 880px;
    margin: 10px auto 30px auto;
}
.map-section .map-title {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.map-section .map-title i {
    color: var(--accent-orange);
}
.map-container {
    position: relative;
    width: 100%;
    height: 55vh;
    max-height: 650px;
    background: var(--map-bg, rgba(255, 248, 240, 0.55));
    border-radius: 32px;
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    z-index: 5;
}

/* Leaflet 容器透明背景 */
.leaflet-container {
    background-color: transparent !important;
    font-family: inherit;
}
[data-theme="dark"] .leaflet-tile-container img {
    filter: invert(1) hue-rotate(180deg) brightness(0.65) contrast(1.15);
}
.leaflet-control-attribution {
    display: none !important;
}

/* 地图标签：纯文字，无背景，跟随主题 */
.custom-map-label {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    color: #4A3E31 !important;
    text-shadow: 0 0 6px #fff, 0 0 4px #fff, 0 0 2px #fff;
    text-align: center;
    white-space: normal !important;
    transition: all 0.2s ease;
}
.custom-map-label.active-label {
    color: #E65A22 !important;
    font-size: 14px !important;
    text-shadow: 0 0 6px #fff, 0 0 3px #fff;
}
[data-theme="dark"] .custom-map-label {
    color: #E3D8C8 !important;
    text-shadow: 0 0 6px #1F1B17, 0 0 4px #1F1B17, 0 0 2px #1F1B17;
}
[data-theme="dark"] .custom-map-label.active-label {
    color: #FFA375 !important;
}

/* 去除 Leaflet Tooltip 小箭头 */
.leaflet-tooltip-top:before,
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
    display: none !important;
}

/* 图例 */
.map-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 24px;
    margin-top: 16px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.map-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.map-legend .legend-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
}
.map-legend .legend-dot.active-dot {
    box-shadow: 0 0 0 2px rgba(255, 138, 92, 0.25);
}

/* ---------- 区域资讯指南面板 ---------- */
.info-guide-section {
    width: 100%;
    max-width: 880px;
    margin: 20px auto 40px auto;
    padding: 0 10px;
}
.info-guide-section .guide-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-left: 4px solid var(--accent-orange);
    padding-left: 10px;
}
.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.guide-card {
    background: var(--card-bg);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.guide-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}
.guide-card.active-card {
    cursor: pointer;
    border-color: var(--accent-orange);
    background: linear-gradient(135deg, rgba(255, 138, 92, 0.06), rgba(255, 255, 255, 0.9));
}
[data-theme="dark"] .guide-card.active-card {
    background: linear-gradient(135deg, rgba(255, 138, 92, 0.12), rgba(35, 30, 26, 0.9));
}
.guide-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}
.guide-card.active-card h3 {
    color: var(--accent-orange);
}
.guide-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ---------- 区域资讯指南面板 · 折叠功能补充 ---------- */
.guide-grid-wrapper {
    position: relative;
    overflow: hidden;
    /* 折叠时的最大高度：约等于1行卡片的高度（桌面端3列，所以是1行） */
    max-height: 220px; 
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 展开后取消高度限制 */
.guide-grid-wrapper.expanded-wrapper {
    max-height: none;
}

/* 🌟 新增：隐藏卡片的控制类（替代原来的嵌套容器方案） */
.guide-card-wrapper.guide-card-hidden {
    display: none;
}

/* 底部渐变遮罩 */
.guide-fade-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, transparent, var(--bg-primary, #FFF8F0));
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 2;
}

[data-theme="dark"] .guide-fade-overlay {
    background: linear-gradient(to bottom, transparent, var(--bg-primary, #1F1B17));
}

/* 展开/收起按钮样式 */
.guide-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 20px auto 0 auto;
    padding: 10px 28px;
    border: 1px solid var(--border-glass);
    border-radius: 50px;
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.guide-toggle-btn:hover {
    color: var(--accent-orange);
    border-color: var(--accent-orange);
    background: rgba(255, 138, 92, 0.06);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.guide-toggle-btn .toggle-icon {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .guide-grid-wrapper {
        /* 移动端单列布局，3个卡片的高度 */
        max-height: 480px; 
    }
    
    .guide-fade-overlay {
        height: 80px;
    }
}

/* ---------- 底部导航 ---------- */
.bottom-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px 32px;
    margin: 10px 0 40px 0;
    padding: 18px 28px;
    background: var(--card-bg);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 60px;
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-sm);
}
.bottom-nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
    padding: 6px 10px;
    border-radius: 40px;
}
.bottom-nav a i {
    color: var(--accent-orange);
}
.bottom-nav a:hover {
    color: var(--accent-orange);
    transform: translateY(-2px);
    background: rgba(255, 138, 92, 0.08);
}

/* ---------- 页脚 ---------- */
.footer-note {
    margin-top: 20px;
    margin-bottom: 30px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    opacity: 0.7;
    text-align: center;
}

/* ---------- 移动端适配 ---------- */
@media (max-width: 768px) {
    .sancan-container {
        padding-top: 75px;
    }
    .page-header h1 {
        font-size: 1.8rem;
    }
    .hero-btn {
        font-size: 1.4rem;
        padding: 18px 20px;
    }
    .map-container {
        height: 45vh;
    }
    .guide-grid {
        grid-template-columns: 1fr;
    }
    .bottom-nav {
        gap: 10px 18px;
        padding: 14px 18px;
        border-radius: 40px;
    }
    /* 🆕 缩小移动端 Logo 尺寸 */
    .page-logo {
        width: 200px; /* 移动端放大至 100px，保证在手机上也足够清晰醒目 */
        height: 100px;
        margin-top: 10px;
    }
}

/* ---------- 辅助类 ---------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- 移动端地图双指操作提示遮罩 ---------- */
#real-kl-map {
    position: relative; /* ensure standard positioning */
    overflow: hidden;
}

.map-gesture-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.55); /* 半透明黑底 */
    backdrop-filter: blur(4px);            /* 现代感十足的毛玻璃效果 */
    z-index: 9999;                         /* 确保盖在 Leaflet 所有图层之上 */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;                            /* 默认隐藏 */
    pointer-events: none;                  /* 极其关键：允许点击和触摸事件穿透自身，不干扰底层 */
    transition: opacity 0.3s ease;         /* 丝滑的淡入淡出动画 */
}

/* 当被激活时淡入显示 */
.map-gesture-overlay.is-active {
    opacity: 1;
}

/* 提示文字样式 */
.map-gesture-overlay .gesture-text {
    color: #ffffff;
    font-size: 15px;
    font-weight: 500;
    background: rgba(255, 138, 92, 0.95); /* 延续你品牌的主题橙色 */
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    letter-spacing: 0.5px;
    transform: translateY(10px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 遮罩出现时，文字有一个微微向上弹出的动效 */
.map-gesture-overlay.is-active .gesture-text {
    transform: translateY(0);
}