@charset "UTF-8";

/* =========================================
   1) Flexible REM 方案及根节点设置
========================================= */
html {
    /* 750px设计稿 / 100 -> 1rem = 100px */
    font-size: 13.33333vw;
    /* 5) 移动端私有属性：消除点击高亮与长按菜单 */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

/* 2) 配合媒体查询覆盖主流手机尺寸及PC上限 */
@media screen and (max-width: 320px) {
    html { font-size: 42.666px; }
}
@media screen and (min-width: 321px) and (max-width: 749px) {
    html { font-size: 13.33333vw; }
}
@media screen and (min-width: 750px) and (max-width: 1200px) {
    /* PC端限制最大字号，避免过于巨大 */
    html { font-size: 50px; }
}
@media screen and (min-width: 1201px) {
    /* 大屏固定字号，不再随屏幕无限制放大 */
    html { font-size: 50px; }
}

/* =========================================
   基础全局设置：防溢出、防横向滚动
========================================= */
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.28rem; /* 对应 28px */
    background: #f5f5f5;
    color: #333;
    /* 7) 确保无横向滚动和元素溢出 */
    max-width: 100vw;
    overflow-x: hidden;
    width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
}

/* =========================================
   布局与容器
========================================= */
.content-wrapper {
    display: flex;
    flex-direction: column;
    padding: 0.3rem; /* 30px */
    gap: 0.3rem;
    width: 100%;
}

.main-content {
    flex: 1;
    width: 100%;
}

/* =========================================
   侧边子菜单
========================================= */
.sidebar {
    width: 100%;
    background: #ffffff;
    border: 0.02rem solid #e5e7eb;
    border-radius: 0.12rem;
    overflow: hidden;
    box-shadow: 0 0.04rem 0.16rem rgba(0, 0, 0, 0.08);
    /* 默认在手机端隐藏 */
    display: none;
}

.sidebar__header {
    background: #1165b3;
    color: #ffffff;
    padding: 0.32rem;
    text-align: center;
    font-size: 0.36rem;
    font-weight: 600;
    margin: 0;
}

.sidebar__menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
}

.sidebar__menu-item {
    width: 50%;
    border-bottom: 0.02rem solid #f3f4f6;
}

.sidebar__menu-item:nth-child(odd) {
    border-right: 0.02rem solid #f3f4f6;
}

.sidebar__menu-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem;
    color: #374151;
    font-size: 0.28rem;
    /* 7) 触控区域≥48px (即 0.96rem) */
    min-height: 0.96rem;
}

.sidebar__menu-link::before {
    content: '▶';
    color: #1165b3;
    margin-right: 0.1rem;
    font-size: 0.24rem;
}

.sidebar__menu-link--active {
    background: #f3f4f6;
    color: #1165b3;
    font-weight: 600;
}

/* =========================================
   标题与面包屑
========================================= */
.title-breadcrumb-container {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-top: 0.2rem;
    margin-bottom: 0.3rem;
}

.section-title {
    font-size: 0.44rem;
    font-weight: bold;
    color: #1f2937;
    margin: 0;
    border-left: 0.08rem solid #1165b3;
    padding-left: 0.2rem;
    line-height: 1.2;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 0.16rem;
    font-size: 0.24rem;
    color: #6b7280;
    align-items: center;
    flex-wrap: wrap;
}

.breadcrumb__link {
    color: #6b7280;
    min-height: 0.96rem;
    display: inline-flex;
    align-items: center;
}

.breadcrumb__item--active {
    color: #1165b3;
}

.section-divider {
    border: none;
    border-top: 0.02rem solid #e5e7eb;
    margin: 0.3rem 0;
}

/* =========================================
   公寓列表与卡片
========================================= */
.apartment-grid {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    width: 100%;
}

.apartment-card {
    background: #ffffff;
    border-radius: 0.16rem;
    overflow: hidden;
    box-shadow: 0 0.08rem 0.24rem rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    width: 100%;
}

.card-image {
    width: 100%;
}

/* 3) 图片使用max-width:100% + height:auto保持比例缩放 */
.card-image img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    width: 100%;
}

.card-content {
    padding: 0.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.card-title {
    font-size: 0.36rem;
    font-weight: bold;
    color: #1f2937;
    margin: 0;
    line-height: 1.4;
}

.card-desc {
    font-size: 0.28rem;
    color: #6b7280;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.28rem;
    font-size: 0.28rem;
    color: #4b5563;
    margin-bottom: 0.2rem;
}

.card-detail-item {
    display: flex;
    align-items: center;
    gap: 0.08rem;
}

.card-action {
    margin-top: 0.2rem;
    display: flex;
    justify-content: flex-end;
}

.card-btn {
    background-color: #3b82f6;
    color: white;
    padding: 0 0.3rem;
    border-radius: 0.08rem;
    font-size: 0.28rem;
    font-weight: 500;
    min-height: 0.96rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* =========================================
   学院新闻列表 (兼容原有类名)
========================================= */
.colleges-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
}

.college-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    padding: 0.3rem;
    border-bottom: 0.02rem solid #f0f0f0;
    gap: 0.2rem;
}

.college-image {
    width: 100%;
}
.college-image img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 0.08rem;
    width: 100%;
}

.college-content {
    display: flex;
    flex-direction: column;
    gap: 0.16rem;
}

.college-title {
    font-size: 0.32rem;
    font-weight: 600;
    color: #000;
    margin: 0;
    line-height: 1.5;
}

.college-desc {
    font-size: 0.28rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.college-date {
    font-size: 0.24rem;
    color: #999;
    margin: 0;
}

/* =========================================
   6) 关键组件断点样式：导航栏、底部Tab、表单、列表
========================================= */

/* (min-width: 361px) 大屏手机及平板样式 */
@media screen and (min-width: 361px) {
    /* 导航栏 */
    .mobile-navbar {
        height: 1rem;
        padding: 0 0.3rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .mobile-navbar__title {
        font-size: 0.36rem;
    }
    
    /* 底部Tab */
    .mobile-tab-bar {
        height: 1.1rem;
        display: flex;
        justify-content: space-around;
        align-items: center;
    }
    .mobile-tab-item {
        font-size: 0.24rem;
        min-height: 0.96rem;
    }

    /* 表单 */
    .mobile-form {
        padding: 0.3rem;
    }
    .mobile-form__input {
        height: 0.96rem;
        font-size: 0.32rem;
        padding: 0 0.2rem;
        margin-bottom: 0.3rem;
        width: 100%;
        border-radius: 0.08rem;
        border: 0.02rem solid #ccc;
    }

    /* 列表布局 */
    .title-breadcrumb-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .apartment-grid {
        gap: 0.4rem;
    }
}

/* (max-width: 360px) 小屏手机特化样式 */
@media screen and (max-width: 360px) {
    /* 导航栏 */
    .mobile-navbar {
        height: 0.88rem;
        padding: 0 0.2rem;
    }
    .mobile-navbar__title {
        font-size: 0.32rem;
    }
    
    /* 底部Tab */
    .mobile-tab-bar {
        height: 1rem;
    }
    .mobile-tab-item {
        font-size: 0.22rem;
    }

    /* 表单 */
    .mobile-form {
        padding: 0.2rem;
    }
    .mobile-form__input {
        height: 0.88rem;
        font-size: 0.28rem;
        padding: 0 0.16rem;
        margin-bottom: 0.2rem;
        width: 100%;
        border-radius: 0.08rem;
        border: 0.02rem solid #ccc;
    }

    /* 列表及组件紧凑化 */
    .apartment-grid {
        gap: 0.24rem;
    }
    .apartment-card {
        border-radius: 0.12rem;
    }
    .card-content {
        padding: 0.2rem;
    }
    .card-title {
        font-size: 0.32rem;
    }
    .card-btn {
        width: 100%;
        margin-top: 0.2rem;
    }

    .title-breadcrumb-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.16rem;
    }
    .sidebar__menu-item {
        width: 100%;
        border-right: none;
    }
}

/* =========================================
   PC 端回退适配 (保持在大屏上的基本可读性)
========================================= */
@media screen and (min-width: 768px) {
    .content-wrapper {
        flex-direction: row;
        max-width: 1200px;
        margin: 0 auto;
        align-items: flex-start;
        padding: 20px;
        gap: 30px;
    }
    .sidebar {
        width: 250px;
        flex-shrink: 0;
        /* PC端显示侧边栏 */
        display: block;
    }
    .sidebar__menu-item {
        width: 100%;
        border-right: none;
    }
    .sidebar__menu-link {
        min-height: auto;
        padding: 16px 20px;
        font-size: 16px;
    }
    .sidebar__header {
        font-size: 18px;
        padding: 16px 20px;
    }
    .main-content {
        flex: 1;
    }
    .apartment-card {
        flex-direction: row;
        align-items: stretch;
        border-radius: 8px;
        padding: 20px;
        min-height: 240px;
        gap: 28px;
    }
    .card-image {
        width: 300px;
        height: 190px;
        flex-shrink: 0;
        border-radius: 8px;
    }
    .card-image img {
        height: 100%;
    }
    .card-content {
        flex: 1;
        justify-content: space-between;
        padding: 0;
        gap: 10px;
    }
    .card-title {
        font-size: 22px;
        margin-bottom: 14px;
    }
    .card-desc {
        font-size: 15px;
        margin-bottom: 24px;
    }
    .card-btn {
        font-size: 14px;
        padding: 10px 20px;
        min-height: auto;
        border-radius: 4px;
    }
    .section-title {
        font-size: 28px;
        border-left-width: 4px;
        padding-left: 10px;
    }
    .breadcrumb__list {
        font-size: 14px;
    }
    .breadcrumb__link {
        min-height: auto;
    }
    .apartment-grid {
        gap: 24px;
    }
}
