/* ========================================
   响应式样式：手机端与平板端适配
   ======================================== */

@media (max-width: 1200px) {
  .course-grid,
  .advantages-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .header-inner {
    height: 64px;
  }

  .main-nav,
  .header-phone {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .main-nav.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    padding: 16px 20px;
    gap: 0;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    border-top: 1px solid var(--color-border);
  }

  .main-nav.mobile-open .nav-item {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--color-border);
  }

  .main-nav.mobile-open .nav-item:last-child {
    border-bottom: none;
  }

  .main-nav.mobile-open .nav-item > a {
    flex: 1;
    padding: 14px 0;
    border-bottom: none;
  }

  .main-nav.mobile-open .nav-item > a.active::after {
    display: none;
  }

  .main-nav.mobile-open .dropdown-toggle {
    display: inline-flex;
  }

  .main-nav.mobile-open .dropdown-menu {
    position: static;
    width: 100%;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: transparent;
    padding: 0 0 8px 16px;
  }

  .main-nav.mobile-open .nav-item.open .dropdown-menu {
    display: block;
  }

  .main-nav.mobile-open .dropdown-menu a {
    padding: 10px 0;
    border-bottom: none;
  }

  .main-nav.mobile-open .dropdown-menu a:hover {
    background: transparent;
  }

  .hero {
    min-height: 700px;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 56px;
  }

  .hero-inner {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding-top: 70px;
    gap: 32px;
  }

  .hero-text-slides {
    width: 100%;
  }

  .hero-card-side {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .hero-text {
    max-width: 100%;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero-card {
    width: 100%;
    max-width: 420px;
  }

  .page-banner {
    padding: 60px 0;
  }

  .page-banner h1 {
    font-size: 32px;
  }

  .news-layout {
    grid-template-columns: 1fr;
  }

  .news-sidebar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonial-grid {
    grid-template-columns: 1fr;
  }

  .contact-card {
    flex-direction: column;
  }

  .contact-qrcode {
    width: 100%;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding-y: 48px;
  }

  .container {
    padding: 0 16px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 28px;
  }

  .section-header.center {
    align-items: center;
  }

  .section-title h2 {
    font-size: 26px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .hero-desc {
    font-size: 15px;
  }

  .hero-actions {
    flex-direction: column;
    gap: 12px;
  }

  .hero-card {
    padding: 24px;
  }

  .hero-card-phone {
    font-size: 24px;
  }

  .hero-arrow {
    display: none;
  }

  /* 核心优势：手机端横向排列，允许横向滚动 */
  .advantages-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .advantages-grid::-webkit-scrollbar {
    display: none;
  }

  .advantage-card {
    flex: 0 0 72%;
    min-width: 220px;
    scroll-snap-align: start;
    padding: 22px 18px;
  }

  .advantage-card h3 {
    font-size: 16px;
  }

  /* 精品课程：手机端横向滚动 */
  .course-grid {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .course-grid::-webkit-scrollbar {
    display: none;
  }

  .course-card {
    flex: 0 0 78%;
    min-width: 260px;
    scroll-snap-align: start;
  }

  .course-img {
    height: 170px;
  }

  /* 就业保障：手机端横向排列 */
  .stats-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .stats-row::-webkit-scrollbar {
    display: none;
  }

  .stat-item {
    flex: 0 0 44%;
    min-width: 140px;
    scroll-snap-align: start;
    padding: 22px 14px;
  }

  .stat-item strong {
    font-size: 28px;
  }

  .job-promise {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    padding: 18px;
  }

  .promise-item {
    font-size: 14px;
    justify-content: center;
  }

  /* 师资力量轮播：平板/手机端一屏 1 张，箭头收到容器内 */
  .teachers-carousel {
    max-width: 100%;
  }

  .carousel-viewport {
    margin: 0 44px;
  }

  .carousel-btn.prev { left: 0; }
  .carousel-btn.next { right: 0; }

  .teacher-card {
    flex: 0 0 100%;
  }

  /* 学员评价：手机端单列堆叠 */
  .testimonial-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* 新闻资讯：手机端改为 2 列 */
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .news-img {
    height: 110px;
  }

  .news-body {
    padding: 14px;
  }

  .news-body h3 {
    font-size: 14px;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .news-date {
    font-size: 12px;
  }

  .news-body a {
    font-size: 13px;
  }

  .news-list-item {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .news-list-img {
    width: 100%;
    height: 200px;
  }

  .news-list-body h3 {
    font-size: 17px;
  }

  .news-sidebar {
    grid-template-columns: 1fr;
  }

  /* 联系方式：手机端压缩布局 */
  .contact-card {
    padding: 18px;
    gap: 18px;
  }

  .contact-info {
    gap: 10px;
  }

  .contact-row {
    gap: 10px;
    padding-bottom: 12px;
  }

  .contact-icon {
    width: 38px;
    height: 38px;
  }

  .contact-icon svg {
    width: 18px;
    height: 18px;
  }

  .contact-text strong {
    font-size: 15px;
  }

  .contact-text span {
    font-size: 12px;
  }

  .contact-row .btn {
    padding: 6px 14px;
    font-size: 13px;
  }

  .contact-qrcode {
    padding: 18px;
  }

  .contact-qrcode img {
    width: 130px;
    height: 130px;
  }

  .contact-qrcode p {
    font-size: 15px;
  }

  .contact-qrcode span {
    font-size: 12px;
  }

  .footer-main {
    gap: 28px;
  }
}

@media (max-width: 480px) {
  .logo-text {
    font-size: 15px;
  }

  .hero h1 {
    font-size: 26px;
  }

  .section-title h2 {
    font-size: 24px;
  }

  .course-grid,
  .advantages-grid,
  .stats-row {
    gap: 10px;
  }

  .course-card,
  .advantage-card {
    flex: 0 0 84%;
  }

  .stat-item {
    flex: 0 0 46%;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .news-img {
    height: 180px;
  }

  .teacher-photo {
    width: 100%;
    height: 220px;
  }

  .teacher-info h3 {
    font-size: 18px;
  }

  .teacher-info p {
    font-size: 13px;
  }

  /* 师资轮播箭头：手机端缩小 */
  .carousel-btn {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

  /* 学员评价头像：手机端微调 */
  .testimonial-card {
    padding: 22px;
  }

  .testimonial-avatar {
    width: 48px;
    height: 48px;
  }

  .testimonial-stars .star {
    width: 16px;
    height: 16px;
  }

  .job-promise {
    grid-template-columns: 1fr 1fr;
  }
}

/* ========================================
   新增内页响应式
   ======================================== */

@media (max-width: 1200px) {
  .teacher-grid-page {
    grid-template-columns: repeat(2, 1fr);
  }

  .honor-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .qualify-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-intro {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .about-intro-img img {
    height: 320px;
  }

  .campus-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .teacher-profile {
    grid-template-columns: 300px 1fr;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 992px) {

  .course-detail-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .course-detail-price {
    align-items: flex-start;
  }

  .teacher-profile {
    grid-template-columns: 1fr;
  }

  .teacher-profile-photo img {
    height: 340px;
  }

  .about-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .breadcrumb {
    margin-bottom: 20px;
    font-size: 13px;
  }

  /* 师资列表：手机端单列 */
  .teacher-grid-page {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .teacher-grid-page .teacher-photo {
    height: 260px;
  }

  /* 评价列表卡片间距 */
  .section-testimonials-page .testimonial-grid {
    gap: 16px;
  }

  /* 课程详情 */
  .course-detail-cover img {
    height: 220px;
  }

  .course-detail-head {
    padding: 20px;
  }

  .course-detail-title h1 {
    font-size: 22px;
  }







  /* 新闻详情 */
  .article-card {
    padding: 24px 20px;
  }

  .article-header h1 {
    font-size: 22px;
  }

  .article-meta {
    flex-wrap: wrap;
    gap: 8px 16px;
  }

  .article-img img {
    height: 200px;
  }

  .article-nav {
    flex-direction: column;
  }

  /* 师资详情 */
  .teacher-profile {
    padding: 22px;
    gap: 22px;
  }

  .teacher-profile-info h1 {
    font-size: 26px;
  }




  /* 评价详情 */
  .testimonial-detail-card {
    padding: 24px 20px;
    margin-bottom: 40px;
  }

  .testimonial-detail-author {
    flex-wrap: wrap;
  }

  .testimonial-date {
    margin-left: 0;
    width: 100%;
  }

  /* 关于我们 */
  .about-intro-text h2 {
    font-size: 26px;
  }

  .about-stats {
    gap: 12px;
    margin-bottom: 40px;
  }

  .about-stats .stat-item {
    padding: 22px 14px;
  }

  .about-stats .stat-item strong {
    font-size: 28px;
  }

  .about-section-block {
    margin-bottom: 40px;
  }

  .timeline {
    padding-left: 24px;
    gap: 24px;
  }

  .timeline::before {
    left: 0;
    transform: none;
  }

  .timeline-item,
  .timeline-item:nth-child(even) {
    width: 100%;
    align-self: auto;
    padding: 0;
  }

  .timeline-item::before,
  .timeline-item:nth-child(even)::before {
    left: -30px;
    right: auto;
    top: 8px;
    width: 12px;
    height: 12px;
  }

  .timeline-year {
    position: static;
    margin-bottom: 8px;
  }

  .honor-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .campus-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .campus-item img {
    height: 200px;
  }

  /* 联系我们 */
  .section-contact-page .contact-card {
    margin-bottom: 40px;
  }

  .contact-layout {
    gap: 20px;
  }

  .contact-form-block {
    padding: 24px 20px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-map,
  .map-placeholder {
    min-height: 300px;
  }
}

@media (max-width: 480px) {
  .honor-grid {
    grid-template-columns: 1fr;
  }

  .qualify-grid {
    grid-template-columns: 1fr;
  }



  .about-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .timeline {
    padding-left: 16px;
    gap: 20px;
  }

  .timeline-item::before,
  .timeline-item:nth-child(even)::before {
    left: -22px;
  }
}
