/* Campus Module Styles - PC */
.school-container {
    width: 100%;
    margin-bottom: 30px;
}
.school-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #4e6ef2; /* Primary Color */
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.school-header h2 {
    font-size: 24px;
    color: #333;
    margin: 0;
    font-weight: bold;
}
.school-header .more {
    font-size: 14px;
    color: #666;
    text-decoration: none;
}
.school-header .more:hover {
    color: #4e6ef2;
}
.school-cats {
    display: flex;
    gap: 15px;
}
.school-cats a {
    color: #666;
    font-size: 14px;
    text-decoration: none;
}
.school-cats a:hover {
    color: #4e6ef2;
}

/* List Layout */
.school-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Item Styles */
.school-item {
    display: flex;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    padding: 15px;
}
.school-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-color: #4e6ef2;
}
.school-thumb {
    width: 200px;
    height: 150px;
    flex-shrink: 0;
    margin-right: 20px;
    border-radius: 4px;
    overflow: hidden;
}
.school-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.school-item:hover .school-thumb img {
    transform: scale(1.05);
}
.school-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.school-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: bold;
}
.school-title a {
    color: #333;
    text-decoration: none;
}
.school-title a:hover {
    color: #4e6ef2;
}
.school-props {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 10px;
}
.school-props span {
    display: inline-flex;
    align-items: center;
    margin-right: 14px;
}
.school-props i {
    color: #999;
    margin-right: 0;
    padding-right: 6px;
}
.school-props em {
    font-style: normal;
}
.school-desc {
    color: #888;
    font-size: 13px;
    line-height: 1.5;
    height: 40px;
    overflow: hidden;
    margin-bottom: 10px;
}
.school-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f5f5f5;
    padding-top: 10px;
    font-size: 12px;
    color: #999;
}
.school-meta .btn-detail {
    background: #4e6ef2;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s;
}
.school-meta .btn-detail:hover {
    background: #3d5de0;
}

/* Page Layout */
.PageCampusMain {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    align-items: flex-start;
}
.PageCampusMainL {
    flex: 1 1 auto;
    min-width: 0;
}
.PageCampusMainR {
    width: 280px;
    flex: 0 0 280px;
    margin-left: 0;
}

/* Sidebar Widgets */
.school-contact-card,
.side-widget {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 16px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.school-contact-card {
    padding: 16px 4px;
    overflow: visible;
}
.school-contact-card h3,
.school-contact-card .contact-fw,
.school-contact-card .contact-vip,
.school-contact-card .contact-com,
.school-contact-card ul,
.school-contact-card .contact-im,
.school-contact-card .contact-tip {
    margin-left: 12px;
    margin-right: 12px;
}
.school-contact-card .contact-vd,
.school-contact-card .contact-btn {
    width: calc(100% - 24px);
    max-width: 272px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}
.school-contact-card .contact-v1,
.school-contact-card .contact-v0,
.school-contact-card .contact-d1,
.school-contact-card .contact-d0 {
    width: 50%;
    min-height: 64px;
    height: auto;
    float: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.5;
    box-sizing: border-box;
}
.school-contact-card .contact-vd {
    height: auto;
    min-height: 64px;
    padding: 8px 0;
    display: flex;
    align-items: stretch;
    overflow: visible;
}
.school-contact-card .contact-v1 b,
.school-contact-card .contact-v0 b,
.school-contact-card .contact-d1 b,
.school-contact-card .contact-d0 b {
    height: auto;
    line-height: 1.5;
    overflow: visible;
}
.school-contact-card .contact-btn {
    display: flex;
    gap: 8px;
    height: auto;
    padding: 8px 0;
}
.school-contact-card .contact-btn a {
    flex: 1 1 0;
}
.school-contact-card .contact-btn span {
    width: 100%;
    margin: 0;
    float: none;
    box-sizing: border-box;
}
.side-header {
    font-size: 16px;
    font-weight: bold;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
    color: #333;
}
.area-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.area-list a {
    display: block;
    padding: 5px 10px;
    background: #f5f5f5;
    color: #666;
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
}
.area-list a:hover {
    background: #4e6ef2;
    color: #fff;
}
.rank-list li {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}
.rank-list li:last-child {
    border-bottom: none;
}
.rank-list em,
.rank-list i {
    display: inline-block;
    width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    background: #ccc;
    color: #fff;
    font-size: 12px;
    font-style: normal;
    border-radius: 4px;
    margin-right: 10px;
    flex-shrink: 0;
}
.rank-list em { background: #ccc; }
.rank-list i { background: #d9d9d9; color: #666; }
.rank-list li:nth-child(1) em { background: #ff4d4f; }
.rank-list li:nth-child(2) em { background: #ff7a45; }
.rank-list li:nth-child(3) em { background: #ffa940; }
.rank-list .f_r {
    margin-left: 10px;
    color: #999;
    font-size: 12px;
    flex-shrink: 0;
}
.rank-list a {
    color: #666;
    text-decoration: none;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rank-list a:hover {
    color: #4e6ef2;
}

/* Search Box */
.sort-f {
    background: #fff;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 20px;
}
.sort-row {
    display: flex;
    border-bottom: 1px dashed #eee;
    padding: 10px 0;
}
.sort-row:last-child {
    border-bottom: none;
}
.sort-k {
    width: 60px;
    font-weight: bold;
    color: #333;
    padding-top: 5px;
}
.sort-v {
    flex: 1;
}
.sort-v ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.sort-v li {
    list-style: none;
}
.sort-v a {
    display: inline-block;
    padding: 4px 10px;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
}
.sort-v li.on a, .sort-v a:hover {
    background: #4e6ef2;
    color: #fff;
}

/* Detail Page Styles */
.school-detail-header {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}
.school-detail-media {
    width: 320px;
    flex: 0 0 320px;
}
.school-detail-thumb {
    width: 100%;
    height: 240px;
    border-radius: 12px;
    overflow: hidden;
    background: #f7f8fa;
}
.school-detail-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.school-detail-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.school-detail-title {
    font-size: 30px;
    font-weight: bold;
    color: #333;
    margin: 0 0 16px 0;
    line-height: 1.3;
}
.school-detail-props {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
}
.school-detail-prop {
    padding: 14px 16px;
    border: 1px solid #edf1f5;
    border-radius: 10px;
    background: #fafcff;
}
.school-detail-key {
    display: block;
    margin-bottom: 8px;
    color: #888;
    font-size: 13px;
}
.school-detail-value {
    display: block;
    color: #333;
    font-size: 15px;
    line-height: 1.6;
    font-weight: 500;
}
.school-detail-value a,
.school-detail-props a {
    color: #4e6ef2;
    word-break: break-all;
}
.school-detail-actions {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}
.school-action-btn {
    min-width: 144px;
    height: 44px;
    padding: 0 28px;
    font-size: 16px;
    border-radius: 22px;
    cursor: pointer;
}
.school-detail-stats {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    height: 40px;
    padding: 0 16px;
    border-radius: 20px;
    background: #f6f8fb;
    color: #666;
    font-size: 14px;
}
.school-detail-stats-media {
    width: 100%;
    margin-top: 12px;
    justify-content: flex-start;
    box-sizing: border-box;
}

.school-section {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.05);
}
.detail-tool-bar {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.05);
    padding: 0 16px;
    margin-bottom: 16px;
}
.detail-tool-bar .tool {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 18px;
    min-height: 44px;
    height: auto;
    margin: 0;
    padding: 10px 0;
    border: 0;
    background: transparent;
}
.detail-tool-bar .tool a {
    display: inline-flex;
    text-decoration: none;
}
.detail-tool-bar .tool i {
    display: inline-flex;
    align-items: center;
    height: auto;
    line-height: 20px;
    padding: 0 0 0 24px;
}
.detail-tool-bar .tool b {
    margin-left: 4px;
}
.section-header {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    border-bottom: 1px solid #eef2f6;
    padding-bottom: 14px;
    margin-bottom: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    line-height: 1.2;
}
.section-header .more {
    font-size: 14px;
    color: #666;
    font-weight: normal;
    text-decoration: none;
}
.section-header .more:hover {
    color: #4e6ef2;
}
.school-content,
.school-section .content {
    padding: 0;
    color: #555;
    font-size: 16px;
    line-height: 2;
    word-break: break-word;
}
.school-content p,
.school-section .content p {
    margin: 0 0 1em;
}
.school-section .content p:first-child,
.school-content p:first-child {
    margin-top: 0;
}
.school-section .content p:last-child,
.school-content p:last-child {
    margin-bottom: 0;
}
.school-section .content img,
.school-section .content table,
.school-content img,
.school-content table {
    max-width: 100%;
}
.school-section .content table,
.school-content table {
    display: block;
    overflow-x: auto;
}
.school-section .content blockquote,
.school-content blockquote {
    margin: 1.2em 0;
    padding: 14px 18px;
    border-left: 4px solid #4e6ef2;
    background: #f7faff;
    color: #666;
}
.school-section .content a,
.school-content a {
    color: #4e6ef2;
}

/* Course Grid */
.course-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
}
.course-item {
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    background: #fff;
}
.course-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
    border-color: #d8e7fb;
}
.course-thumb {
    height: 150px;
    overflow: hidden;
    background: #f7f8fa;
}
.course-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.course-item:hover .course-thumb img {
    transform: scale(1.05);
}
.course-title {
    padding: 14px 14px 8px;
    font-size: 14px;
    font-weight: bold;
    line-height: 1.7;
    min-height: 56px;
    overflow: hidden;
}
.course-title a {
    color: #333;
    display: -webkit-box;
    overflow: hidden;
    text-decoration: none;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.course-title a:hover {
    color: #4e6ef2;
}
.course-price {
    padding: 0 14px 14px;
    color: #ff4d4f;
    font-weight: bold;
    font-size: 15px;
}

/* Env Grid */
.env-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
}
.env-grid-item {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    height: 120px;
}
.env-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.env-grid-title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 12px;
    padding: 4px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* News List */
.news-list li {
    padding: 14px 0;
    border-bottom: 1px dashed #e7ebf0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.news-list li:last-child {
    border-bottom: none;
}
.news-list a {
    color: #333;
    text-decoration: none;
    line-height: 1.7;
}
.news-list a:hover {
    color: #4e6ef2;
}
.news-time {
    color: #999;
    font-size: 12px;
    flex-shrink: 0;
    margin-left: 16px;
}
.PageCampusMainR .school-item {
    flex-direction: column;
    padding: 12px;
}
.PageCampusMainR .school-thumb {
    width: 100%;
    height: 160px;
    margin-right: 0;
    margin-bottom: 12px;
}
.PageCampusMainR .school-props span {
    display: block;
    margin-right: 0;
    margin-bottom: 2px;
}
.PageCampusMainR .school-props span:last-child {
    display: none;
}
.PageCampusMainR .school-props i {
    margin-right: 2px;
    padding-right: 6px;
}
.PageCampusMainR .school-title {
    font-size: 16px;
    margin-bottom: 8px;
}
.PageCampusMainR .school-title a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.PageCampusMainR .school-desc,
.PageCampusMainR .school-meta > span {
    display: none;
}
.PageCampusMainR .school-meta {
    border-top: 0;
    padding-top: 2px;
    margin-top: 0;
    justify-content: flex-start;
}
.PageCampusMainR .school-meta .btn-detail {
    width: 100%;
    padding: 8px 0;
    text-align: center;
    box-sizing: border-box;
}

/* Normalize the school message form controls so text inputs and selects share the same height. */
#message_form input[type="text"],
#message_form input[type="password"],
#message_form select {
    height: 40px;
    line-height: 38px;
    padding: 0 12px;
    font-size: 14px;
    border: 1px solid #d9dee7;
    border-radius: 0;
    box-sizing: border-box;
    background: #fff;
}

#message_form select {
    padding-right: 32px;
}

#message_form #date {
    width: 136px !important;
}

#message_form textarea {
    min-height: 140px;
    padding: 12px;
    font-size: 14px;
    line-height: 1.7;
    border: 1px solid #d9dee7;
    border-radius: 0;
    box-sizing: border-box;
    background: #fff;
    resize: vertical;
}

#message_form input.btn-blue {
    min-width: 120px;
    height: 40px;
    line-height: 38px;
    border-radius: 0;
}

@media (max-width: 1280px) {
    .course-grid,
    .env-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .PageCampusMain {
        flex-direction: column;
    }
    .PageCampusMainR {
        width: auto;
        flex: 0 0 auto;
        margin-left: 0;
    }
    .school-detail-header {
        flex-direction: column;
    }
    .school-detail-media {
        width: 100%;
        flex: 0 0 auto;
    }
    .school-detail-thumb {
        width: 100%;
        height: 260px;
    }
    .school-detail-props {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
    .course-grid,
    .env-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .course-grid,
    .env-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}
