/* ===== 城市卡片模块样式 ===== */

.city-cards-section {
    padding: 0;
}

.city-cards-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    color: #333;
}

.city-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.city-card-inner {
    min-height: 380px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px 24px 24px 24px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
    background-color: #000;
    background-size: cover;
    background-position: center;
}

.city-card-inner:hover {
    transform: translateY(-4px);
}

.city-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
}

/* ===== 内容容器 - 新增 align-items 防止子元素被拉伸 ===== */
.city-card-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 320px;
    /* 关键修复：让 .city-card-city-name 保持 inline-block 宽度，不被拉伸 */
    align-items: flex-start;
}

/* ===== 城市名称 - 弹性宽度 + SVG三角（无圆角） ===== */
.city-card-city-name {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 12px 0;
    /* 弹性宽度核心 */
    display: inline-block;
    width: auto;
    max-width: 100%;
    flex-shrink: 0;          /* 防止被 flex 容器压缩 */
    flex-grow: 0;            /* 防止被 flex 容器拉伸 */
    white-space: nowrap;     /* 防止文字换行 */
    /* 内边距：右侧多留空间给三角突出 */
    padding: 5px 25px 5px 18px;
    letter-spacing: 2px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    text-shadow: none;
    position: relative;
    background: #354574;
    border-radius: 0;        /* 无圆角 */
}

/* ===== SVG 三角（伪元素） ===== */
.city-card-city-name::after {
    content: '';
    position: absolute;
    right: -18px;            /* 向右突出，与 SVG 宽度一致 */
    top: 0;
    width: 18px;             /* 三角宽度 */
    height: 100%;            /* 与父元素等高 */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 100' preserveAspectRatio='none'%3E%3Cpolygon points='0,0 18,50 0,100' fill='%23354574'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    border: none;
    outline: none;
    flex-shrink: 0;          /* 防止被压缩 */
}

.city-card-points {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.city-card-points li {
    font-size: 15px;
    color: #ffffff;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.city-card-points li:last-child {
    border-bottom: none;
}

.city-card-btn {
    margin-top: auto;
}

.city-card-btn .wp-block-button__link {
    font-size: 15px;
    padding: 12px 24px;
    display: inline-block;
    text-align: center;
}

/* ============================================================
   响应式 - 从小到大排列（移动优先）
   ============================================================ */

/* === 手机端 (≤480px) === */
@media screen and (max-width: 480px) {
    /* 城市名称 */
    .city-card-city-name {
        font-size: 17px;
        padding: 6px 20px 6px 12px;
        letter-spacing: 0.5px;
    }
    .city-card-city-name::after {
        right: -12px;
        width: 12px;
    }

    /* 导游卡片 */
    .wppb-ul-user {
        height: 420px !important;
    }
    .wppb-ul-details {
        padding: 14px 18px 16px !important;
    }
    .guide-name {
        font-size: 16px !important;
    }
    .guide-tags,
    .guide-city {
        font-size: 12px !important;
    }
    .guide-profile-btn {
        font-size: 13px !important;
        padding: 8px 20px !important;
        min-width: 100px !important;
    }
    .intro-arrow {
        height: 10px !important;
    }
}

/* === 平板端 (481px - 768px) === */
@media screen and (max-width: 768px) {
    /* 城市名称 */
    .city-card-city-name {
        font-size: 20px;
        padding: 8px 26px 8px 14px;
        letter-spacing: 1px;
    }
    .city-card-city-name::after {
        right: -14px;
        width: 14px;
    }
}

/* === 桌面端 (≥769px) 使用默认样式，无需额外写 === */

/* ============================================================
   导游卡片样式（保持不变）
   ============================================================ */

div#wppb-ul-theme-vergrid {
    max-width: 2000px !important;
}
div.wppb-ul-container {
    max-width: 2000px !important;
}

.wppb-ul-user {
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
    border: 1px solid #e8ecf1 !important;
    height: 430px !important;
    padding: 0 !important;
    transition: none !important;
}

.wppb-ul-user:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
    border-color: #e8ecf1 !important;
    transform: none !important;
}

.wppb-ul-image-wrapper {
    position: relative !important;
    width: 100% !important;
    overflow: hidden !important;
    background: #ffffff !important;
    flex-shrink: 0 !important;
}

.wppb-ul-image {
    width: 100% !important;
    aspect-ratio: 1/1 !important;
    overflow: hidden !important;
}

.wppb-ul-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.intro-arrow {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 15px !important;
    overflow: hidden !important;
    z-index: 3 !important;
    pointer-events: none !important;
}

.intro-arrow svg {
    display: block !important;
    width: auto !important;
    height: 100% !important;
    fill: #ffffff !important;
    margin-left: 50% !important;
    transform: translateX(-50%) !important;
    -webkit-transform: translateX(-50%) !important;
    -ms-transform: translateX(-50%) !important;
    max-width: none !important;
}

.wppb-ul-details {
    padding: 18px 30px 20px !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    background: #ffffff !important;
    position: relative !important;
    z-index: 1 !important;
}

.guide-text-area {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
}

.guide-divider {
    border: 0 !important;
    border-top: 1px solid #e8ecf1 !important;
    margin: 0 0 16px 0 !important;
    width: 100% !important;
    flex-shrink: 0 !important;
}

.guide-button-area {
    flex-shrink: 0 !important;
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

.wppb-ul-details * {
    transition: none !important;
}

.guide-name {
    font-size: 20px !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
    margin: 0 0 20px 0 !important;
    line-height: 1.3 !important;
}

.guide-tags {
    font-size: 16px !important;
    color: #333 !important;
    margin: 0 0 10px 0 !important;
    line-height: 1.4 !important;
}

.guide-city {
    font-size: 16px !important;
    color: #333 !important;
    margin: 0 0 0 0 !important;
    line-height: 1.4 !important;
}

.guide-profile-btn {
    display: inline-block !important;
    text-align: center !important;
    font-size: 14px !important;
    padding: 10px 28px !important;
    width: auto !important;
    min-width: 130px !important;
    max-width: 100% !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    border-radius: 6px !important;
    transition: none !important;
    background: #354574 !important;
    color: #ffffff !important;
    border: none !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.guide-profile-btn:hover {
    text-decoration: none !important;
    opacity: 0.85 !important;
    background: #2a3a60 !important;
    color: #ffffff !important;
}

.wppb-ul-user .wppb-ul-details {
    top: 0 !important;
    position: relative !important;
}

.wppb-ul-details .wppb-ul-extra-info {
    opacity: 1 !important;
    transition: none !important;
}

.wppb-ul-user:hover .wppb-ul-details {
    top: 0 !important;
}

.wppb-ul-user:hover .wppb-ul-extra-info {
    opacity: 1 !important;
}