/* ==========================================
   专科技术学院 - 自定义样式
   科技简约风格
   ========================================== */

/* ========== 全局样式 ========== */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --dark-color: #212529;
    --light-color: #f8f9fa;

    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-tech: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    --gradient-overlay: linear-gradient(135deg, rgba(13, 110, 253, 0.9) 0%, rgba(102, 126, 234, 0.9) 100%);

    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);

    --transition-fast: all 0.3s ease;
    --transition-smooth: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    overflow-x: hidden;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0b5ed7;
}

/* ========== 导航栏样式 ========== */
.navbar {
    padding: 1rem 0;
    transition: var(--transition-fast);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    transition: var(--transition-fast);
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.nav-link {
    position: relative;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    transition: var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #fff;
    transition: var(--transition-fast);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

/* ========== Hero 主横幅样式 ========== */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    background: var(--gradient-tech);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: floatBg 20s ease-in-out infinite;
}

@keyframes floatBg {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-overlay);
    opacity: 0.8;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out;
}

.hero-section p {
    animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-section .btn {
    animation: fadeInUp 1s ease-out 0.6s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== 按钮样式 ========== */
.btn {
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* ========== 特色卡片样式 ========== */
.feature-card {
    background: #fff;
    border-radius: 15px;
    transition: var(--transition-fast);
    border: 1px solid transparent;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.feature-card:hover .feature-icon {
    transform: rotate(360deg) scale(1.1);
}

/* ========== 专业卡片样式 ========== */
.major-card {
    border-radius: 15px;
    transition: var(--transition-fast);
    overflow: hidden;
    cursor: pointer;
}

.major-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.major-card .card-body {
    padding: 2rem;
}

.major-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.major-card:hover .major-icon {
    transform: scale(1.15) rotate(5deg);
}

/* ========== 新闻卡片样式 ========== */
.news-card {
    border-radius: 15px;
    transition: var(--transition-fast);
    overflow: hidden;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.news-card .badge {
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

/* ========== 数据统计样式 ========== */
.stat-item {
    position: relative;
    padding: 2rem;
}

.stat-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 50px;
    height: 3px;
    background: rgba(255, 255, 255, 0.5);
    transform: translateX(-50%);
    transition: var(--transition-fast);
}

.stat-item:hover::after {
    width: 80px;
}

.stat-item h2 {
    animation: countUp 2s ease-out;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========== 页面头部 ========== */
.page-header {
    padding: 150px 0 80px;
    background: var(--gradient-tech);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.breadcrumb {
    background: transparent;
    margin-bottom: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.7);
}

/* ========== 专业详情样式 ========== */
.major-detail {
    padding: 2rem;
    border-radius: 15px;
    background: #fff;
    transition: var(--transition-fast);
}

.major-detail:hover {
    box-shadow: var(--shadow-md);
}

.major-icon-large {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: var(--transition-fast);
}

.major-detail:hover .major-icon-large {
    transform: scale(1.1) rotate(5deg);
}

/* ========== 页脚样式 ========== */
footer {
    margin-top: 3rem;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, #667eea 50%, var(--primary-color) 100%);
}

footer .footer-content {
    padding: 3rem 0 1.5rem;
}

footer h5, footer h6 {
    color: #fff;
    position: relative;
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
}

footer h5::after, footer h6::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition-fast);
    display: inline-block;
    padding: 0.25rem 0;
}

footer a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

footer .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 0.5rem;
    transition: var(--transition-fast);
}

footer .social-links a:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
}

footer .contact-info {
    color: rgba(255, 255, 255, 0.7);
}

footer .contact-info i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

footer .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
    margin-top: 2rem;
}

footer .footer-bottom p {
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

footer .footer-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

footer .footer-logo i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

@media (max-width: 767.98px) {
    footer .footer-content {
        padding: 2rem 0 1rem;
    }

    footer h5::after, footer h6::after {
        width: 40px;
        height: 2px;
    }

    footer .text-md-end {
        text-align: start !important;
        margin-top: 0.5rem;
    }
}

/* ========== 表单样式 ========== */
.form-control,
.form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: var(--transition-fast);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* ========== 时间线样式 ========== */
.timeline {
    position: relative;
    padding-left: 50px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -35px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid #fff;
    box-shadow: 0 0 0 3px var(--primary-color);
}

/* ========== 联系卡片样式 ========== */
.contact-card {
    background: #fff;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition-fast);
    border: 2px solid transparent;
    height: 100%;
}

.contact-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.contact-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: var(--transition-fast);
}

.contact-card:hover .contact-icon {
    transform: scale(1.15) rotate(360deg);
}

/* ========== 地图容器 ========== */
.map-container {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    height: 400px;
    background: #e9ecef;
}

/* ========== 响应式设计 ========== */
@media (max-width: 991.98px) {
    .hero-section {
        height: auto;
        min-height: 500px;
        padding: 120px 0 60px;
    }

    .hero-section h1 {
        font-size: 2.5rem !important;
    }

    .navbar-collapse {
        background: rgba(13, 110, 253, 0.95);
        padding: 1rem;
        border-radius: 10px;
        margin-top: 1rem;
    }

    .nav-link::after {
        display: none;
    }

    .stat-item {
        padding: 1rem;
    }

    .page-header {
        padding: 120px 0 60px;
    }
}

@media (max-width: 767.98px) {
    .hero-section h1 {
        font-size: 2rem !important;
    }

    .hero-section p {
        font-size: 1rem !important;
    }

    .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }

    .major-icon-large {
        width: 100px;
        height: 100px;
    }

    .feature-icon {
        width: 60px;
        height: 60px;
    }

    .contact-icon {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 575.98px) {
    .hero-section {
        min-height: 400px;
    }

    .hero-section h1 {
        font-size: 1.75rem !important;
    }

    .display-4 {
        font-size: 2rem !important;
    }

    .btn-lg {
        padding: 0.6rem 1.5rem;
        font-size: 1rem;
    }
}

/* ========== 动画效果 ========== */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(13, 110, 253, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* ========== 工具类 ========== */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--gradient-primary);
}

.bg-gradient-tech {
    background: var(--gradient-tech);
}

.shadow-hover {
    transition: var(--transition-fast);
}

.shadow-hover:hover {
    box-shadow: var(--shadow-lg);
}

/* ========== 加载动画 ========== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== 学费卡片样式 ========== */
.card[style*="border-width: 2px"] {
    position: relative;
}

.card[style*="border-width: 2px"]::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #764ba2 100%);
    border-radius: inherit;
    z-index: -1;
}

/* ========== Accordion 优化 ========== */
.accordion-button {
    font-weight: 600;
    padding: 1.25rem 1.5rem;
    border-radius: 15px !important;
}

.accordion-button:not(.collapsed) {
    background-color: rgba(13, 110, 253, 0.05);
    color: var(--primary-color);
}

.accordion-button:focus {
    box-shadow: none;
    border-color: transparent;
}

.accordion-item {
    border-radius: 15px !important;
    overflow: hidden;
}

.accordion-body {
    padding: 1.5rem;
    line-height: 1.8;
}

/* ========== 表单优化 ========== */
.needs-validation .form-control:invalid,
.needs-validation .form-select:invalid {
    border-color: #ced4da;
}

.needs-validation.was-validated .form-control:valid,
.needs-validation.was-validated .form-select:valid {
    border-color: var(--success-color);
}

.needs-validation.was-validated .form-control:invalid,
.needs-validation.was-validated .form-select:invalid {
    border-color: var(--danger-color);
}

/* ========== 平板设备优化 ========== */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-section h1 {
        font-size: 2.75rem !important;
    }

    .major-icon-large {
        width: 120px;
        height: 120px;
    }

    .timeline {
        padding-left: 40px;
    }
}

/* ========== 小屏幕优化 ========== */
@media (max-width: 575.98px) {
    .card-body.p-4.p-md-5 {
        padding: 1.5rem !important;
    }

    .timeline {
        padding-left: 30px;
    }

    .timeline::before {
        left: 10px;
    }

    .timeline-item::before {
        left: -25px;
        width: 10px;
        height: 10px;
    }

    .accordion-button {
        font-size: 0.9rem;
        padding: 1rem;
    }

    .contact-icon {
        width: 50px !important;
        height: 50px !important;
    }
}

/* ========== 触摸设备优化 ========== */
@media (hover: none) and (pointer: coarse) {
    .feature-card:hover,
    .major-card:hover,
    .news-card:hover,
    .contact-card:hover {
        transform: none;
    }

    .btn:hover {
        transform: none;
    }

    .nav-link::after {
        display: none;
    }
}

/* ========== 打印样式 ========== */
@media print {
    .navbar,
    footer,
    .btn {
        display: none;
    }
}
