/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #f9fafb;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.center {
    text-align: center;
}

/* Header */
.header {
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
}

.logo-text {
    font-size: 24px;
    font-weight: bold;
    color: #ea580c; /* Orange-600 */
    margin-right: 15px;
}

.logo-desc {
    font-size: 12px;
    color: #6b7280;
    padding-left: 15px;
    border-left: 1px solid #d1d5db;
    display: none;
}

@media (min-width: 768px) {
    .logo-desc {
        display: block;
    }
}

.nav-list {
    display: none;
}

@media (min-width: 768px) {
    .nav-list {
        display: flex;
        gap: 25px;
        font-size: 14px;
        font-weight: 500;
        color: #374151;
    }

    .nav-list li:hover {
        color: #ea580c;
    }
}

/* Hero Section */
.hero {
    position: relative;
    height: 500px;
    overflow: hidden;
    background-color: #111; /* Fallback */
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(17, 24, 39, 0.7); /* Gray-900 with opacity */
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: #fff;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    /* margin-top: -50px; removed to center properly with flex */
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.8s ease-out 0.3s;
}

.hero-slide.active .hero-content h1 {
    transform: translateY(0);
    opacity: 1;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #e5e7eb;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.8s ease-out 0.5s;
}

.hero-slide.active .hero-content p {
    transform: translateY(0);
    opacity: 1;
}

.highlight {
    color: #f97316; /* Orange-500 */
    font-weight: bold;
    font-size: 1.5rem;
    margin: 0 5px;
}



/* Hero Controls */
.hero-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

.hero-btn.prev {
    left: 20px;
}

.hero-btn.next {
    right: 20px;
}

/* Hero Indicators */
.hero-indicators {
    position: absolute;
    top: 20px; /* Changed from bottom */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.indicator-dot {
    width: 12px;
    height: 12px;
    background: #CACACA;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.indicator-dot.active {
    background: #ea580c; /* Orange-600 */
    transform: scale(1.2);
}

/* Notification Bar */
.notification-container {
    position: relative;
    z-index: 20;
    margin-top: -60px;
    margin-bottom: 50px;
}

.notification-box {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 25px;
    border: 1px solid #f3f4f6;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.notification-title {
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.more-link {
    font-size: 14px;
    color: #6b7280;
}

.more-link:hover {
    color: #ea580c;
}

.notification-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: #4b5563;
}

.notification-item:hover {
    background-color: #f9fafb;
}

.notif-main {
    display: flex;
    align-items: center;
    flex: 1;
    overflow: hidden;
    margin-right: 20px;
}

.tag {
    font-size: 12px;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 10px;
    flex-shrink: 0;
}

.tag.top { background-color: #ef4444; }
.tag.new { background-color: #f97316; }

.notif-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-item:hover .notif-text {
    color: #ea580c;
}

.notif-date {
    color: #9ca3af;
    flex-shrink: 0;
}

/* Common Section Styles */
.section {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 30px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #1f2937;
}

.section-header p {
    color: #6b7280;
    font-size: 14px;
    max-width: 700px;
    margin: 0 auto;
}

.section-header.dark h2 { color: #fff; }
.section-header.dark p { color: #9ca3af; }

/* Buttons */
.btn-outline {
    border: 1px solid #d1d5db;
    background: transparent;
    color: #6b7280;
    padding: 6px 24px;
    border-radius: 9999px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-outline:hover {
    background: #ea580c;
    color: #fff;
    border-color: #ea580c;
}

.btn-more {
    padding: 10px 40px;
    border: 1px solid #d1d5db;
    border-radius: 9999px;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-more:hover {
    color: #ea580c;
    border-color: #ea580c;
}

.center-btn {
    text-align: center;
    margin-top: 50px;
}

/* Projects Section */
.projects-section {
    background-color: #fff;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 30px;
}

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #f3f4f6;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.card-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-body {
    padding: 24px;
}

.card-body h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 12px;
    color: #1f2937;
}

.card-body p {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 42px;
}

/* Team Section */
.team-section {
    background-color: #0f172a; /* Slate-900 */
    color: #fff;
}

.team-section .section-header {
    margin-bottom: 1px;
}

.team-showcase {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 50px;
    margin-bottom: 1px;
}

@media (min-width: 768px) {
    .team-showcase {
        flex-direction: row;
        justify-content: center;
    }
}

.teacher-image {
    width: auto;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    overflow: hidden;
    margin: 0 auto;
}

.teacher-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.teacher-info {
    max-width: 450px;
}

.teacher-info h3 {
    font-size: 40px;
    font-family: serif;
    margin-bottom: 24px;
}

.teacher-info ul li {
    font-size: 14px;
    color: #d1d5db;
    margin-bottom: 12px;
}

.teacher-info ul li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    margin-top: 8px;
    margin-right: 10px;
    flex-shrink: 0;
}

.team-carousel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

@media (min-width: 768px) {
    .team-carousel {
        margin-top: -100px; /* 调整与上方大人像的距离 */
    }
}

.carousel-items {
    display: flex;
    gap: 45px;
    overflow-x: auto;
    padding: 10px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.carousel-items::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.teacher-item {
    width: 100px;
    height: 100px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    opacity: 0.6;
    cursor: pointer;
    transition: opacity 0.3s, transform 0.3s;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .teacher-item {
        width: 140px;
        height: 140px;
    }
}

.teacher-item:hover {
    opacity: 1;
}

.teacher-item.active {
    opacity: 1;
    border: 2px solid #ea580c; /* 橙色高亮边框 */
}

.teacher-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-btn {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 24px;
    cursor: pointer;
}

.carousel-btn:hover {
    color: #fff;
}

/* Faculty More Button */
.team-carousel-more-wrapper {
    margin-top: 20px;
    text-align: center;
}

.team-carousel-more-wrapper .btn-more {
    display: inline-block;
    padding: 10px 40px;
    background-color: transparent;
    border: 1px solid #6b7280;
    color: #ffffff;
    text-decoration: none;
    border-radius: 9999px;
    transition: all 0.3s ease;
}

.team-carousel-more-wrapper .btn-more:hover {
    background-color: #6b7280;
    color: #fff;
}

/* Courses Section */
.courses-section {
    background-color: #f9fafb;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 25px;
}

@media (min-width: 768px) {
    .courses-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.organizer-tag {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    padding: 15px;
    color: #fff;
    font-size: 12px;
}

.organizer-tag::before {
    content: attr(data-org);
    background: #2563eb;
    padding: 2px 8px;
    border-radius: 4px;
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f3f4f6;
    padding-top: 15px;
    margin-top: 15px;
}

.price {
    color: #ef4444;
    font-weight: bold;
}

.btn-small {
    font-size: 12px;
    background: #fff7ed;
    color: #ea580c;
    border: 1px solid #ffedd5;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-small:hover {
    background: #ea580c;
    color: #fff;
}

/* Certificates Section */
.certificates-section {
    position: relative;
    padding: 80px 0;
    background: linear-gradient(to bottom, #374151, #1f2937);
    color: #fff;
}

.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
}

.relative {
    position: relative;
    z-index: 10;
}

.certificates-content-wrapper {
    margin: 0 auto;
}

.tabs {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 50px;
    width: 100%;
    padding: 0;
}

.tab-btn {
    padding: 8px 24px;
    border-radius: 9999px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(75, 85, 99, 0.5);
    color: #d1d5db;
    flex: 0 0 auto; /* Prevent shrinking */
}

.tab-btn:hover {
    background: #4b5563;
}

.tab-btn.active {
    background: #f97316;
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.certificates-grid {
    display: block;
    width: 100%;
    margin: 0 auto;
}

.cert-showcase-image {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    border: none;
    background: #fff;
}

.cert-showcase-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Footer styles moved to main.css */

@media (max-width: 768px) {
    .hero {
        height: 30vw; /* 适配移动端宽度，让图片完整显示 */
        min-height: 160px;
    }
    .hero-bg {
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
    }
    .hero-content h1 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    .hero-content p {
        font-size: 0.8rem;
        margin-bottom: 5px;
    }
    .highlight {
        font-size: 1rem;
    }
    .hero-btn {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
    
    /* Global Mobile Adjustments */
    .section {
        padding: 30px 0;
    }
    .section-header {
        margin-bottom: 30px;
    }
    .section-header h2 {
        font-size: 24px;
    }
    .center-btn {
        margin-top: 30px;
    }

    /* Notification Bar Mobile */
    .notification-container {
        margin-top: -30px;
        margin-bottom: 15px;
    }
    .notification-box {
        padding: 8px 10px;
    }
    .notification-header {
        padding-bottom: 2px;
        margin-bottom: 2px;
    }
    .notification-title {
        font-size: 14px;
    }
    .notification-title .icon {
        width: 16px !important;
        height: 16px !important;
    }
    .more-link {
        font-size: 12px;
    }
    .notification-item {
        padding: 2px 0;
        font-size: 12px;
    }
    .notif-main {
        margin-right: 5px;
    }
    .tag {
        font-size: 10px;
        padding: 0 3px;
    }

    /* Team Section Mobile */
    .teacher-info h3 {
        font-size: 28px;
        text-align: center;
    }
    .teacher-info ul {
        padding-left: 20px; /* Align list bullets better */
    }
    .team-carousel {
        margin-top: 20px;
    }
    .teacher-item {
        width: 80px;
        height: 80px;
    }
    .carousel-items {
        gap: 20px;
    }
}

/* Floating Sidebar */
.floating-sidebar {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    width: 80px;
}

.sidebar-item {
    position: relative;
    width: 100%;
    height: 80px;
    cursor: pointer;
    background-color: transparent;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #f5f5f5;
}

.sidebar-item:last-child {
    border-bottom: none;
}

.sidebar-item:first-child {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.sidebar-item:last-child {
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.sidebar-item .icon-wrapper {
    position: relative;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.item-text {
    font-size: 12px;
    color: #666;
    line-height: 1.2;
    transition: color 0.3s;
}

.sidebar-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.3s;
}

.icon-active {
    opacity: 0;
}

.sidebar-item.active {
    background-color: #a68d73;
}

.sidebar-item.active .icon-active {
    opacity: 1;
}

.sidebar-item.active .icon-normal {
    opacity: 0;
}

.sidebar-item.active .item-text {
    color: #fff;
}

/* Popup */
.sidebar-popup {
    position: absolute;
    right: 95px; /* Adjusted for wider sidebar */
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    width: 200px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10000;
}

.sidebar-item.active .sidebar-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

.popup-title {
    font-size: 16px;
    color: #333;
    margin-bottom: 12px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

.popup-qr {
    width: 100%;
    aspect-ratio: 1;
    background: #f9fafb;
    border-radius: 4px;
    overflow: hidden;
}

.popup-qr img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: static; /* Override previous absolute */
}

/* Arrow for popup */
.popup-arrow {
    position: absolute;
    top: 50%;
    right: -6px;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: translateY(-50%) rotate(45deg);
    box-shadow: 1px -1px 1px rgba(0,0,0,0.05);
}

/* Hotline Popup specific styles */
.hotline-popup {
    width: auto;
    padding: 10px 20px;
    border: 2px dashed #999;
    box-shadow: none;
    right: 90px;
}

.hotline-popup .popup-phone {
    font-size: 20px;
    color: #333;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    letter-spacing: 1px;
    white-space: nowrap;
}

.hotline-popup .popup-arrow {
    border-top: 2px dashed #999;
    border-right: 2px dashed #999;
    background: #fff;
    box-shadow: none;
    right: -8px;
    width: 14px;
    height: 14px;
}

/* Placeholder styles */
.icon-placeholder {
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #fff;
}

@media (max-width: 768px) {
    .floating-sidebar {
        width: 50px;
        right: 10px;
        border-radius: 8px;
    }

    .sidebar-item {
        height: 55px;
    }
    
    .sidebar-item:first-child {
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
    }

    .sidebar-item:last-child {
        border-bottom-left-radius: 8px;
        border-bottom-right-radius: 8px;
    }

    .sidebar-item .icon-wrapper {
        width: 20px;
        height: 20px;
        margin-bottom: 2px;
    }

    .item-text {
        font-size: 9px;
        transform: scale(0.9); /* 针对某些浏览器最小字体限制 */
    }
    
    /* 调整弹出层位置 */
    .sidebar-popup {
        right: 60px;
        width: 160px;
        padding: 15px;
    }
    
    .popup-title {
        font-size: 14px;
    }
    
    .hotline-popup {
        right: 55px;
        padding: 8px 15px;
    }
    
    .hotline-popup .popup-phone {
        font-size: 16px;
    }
}
