/* 至美环境 - 自定义样式 */

/* ===== 全局样式 ===== */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --white-color: #ffffff;
}

body {
    font-family: 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* ===== 导航栏样式 ===== */
.navbar {
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

/* ===== 轮播图样式 ===== */
.carousel {
    position: relative;
}

.carousel-item {
    transition: transform 0.6s ease-in-out;
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 25px;
    height: 25px;
    background-size: 100% 100%;
}

.carousel-indicators {
    bottom: 20px;
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.carousel-indicators .active {
    background-color: #ffffff;
    transform: scale(1.2);
}

.hero-slide {
    min-height: 500px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.hero-slide .container {
    position: relative;
    z-index: 2;
}

.min-vh-50 {
    min-height: 50vh;
}

/* 响应式轮播图 */
@media (max-width: 768px) {
    .hero-slide {
        min-height: 400px;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 8%;
    }
    
    .carousel-indicators [data-bs-target] {
        width: 10px;
        height: 10px;
        margin: 0 3px;
    }
}

@media (max-width: 576px) {
    .hero-slide {
        min-height: 350px;
    }
    
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 20px;
        height: 20px;
    }
}

/* ===== 卡片样式 ===== */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

.service-card {
    height: 100%;
}

.service-card:hover {
    transform: translateY(-3px);
}

/* ===== 按钮样式 ===== */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #1e7e34 0%, #155724 100%);
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    border: none;
    color: #212529;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e0a800 0%, #d39e00 100%);
    color: #212529;
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    border: none;
}

.btn-info:hover {
    background: linear-gradient(135deg, #138496 0%, #117a8b 100%);
}

/* ===== 表单样式 ===== */
.form-control, .form-select {
    border-radius: 8px;
    padding: 0.6rem 1rem;
    border: 1.5px solid #e1e5e9;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    transform: translateY(-1px);
}

.form-label {
    font-weight: 600;
    color: #555;
    margin-bottom: 0.5rem;
}

/* ===== 徽章样式 ===== */
.badge {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
}

/* ===== 分页样式 ===== */
.pagination .page-link {
    border-radius: 6px;
    margin: 0 2px;
    border: none;
    padding: 0.5rem 0.75rem;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    border-color: var(--primary-color);
}

/* ===== 返回顶部按钮 ===== */
#backToTop {
    border-radius: 50%;
    width: 50px;
    height: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

#backToTop:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* ===== 表格样式 ===== */
.table {
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none;
    font-weight: 600;
    padding: 1rem;
}

.table tbody td {
    padding: 0.8rem 1rem;
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.04);
}

/* ===== 模态框样式 ===== */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    color: white;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
}

.modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* ===== 警报样式 ===== */
.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.5rem;
}

.alert-success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(40, 167, 69, 0.05) 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(220, 53, 69, 0.05) 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 193, 7, 0.05) 100%);
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-info {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.1) 0%, rgba(23, 162, 184, 0.05) 100%);
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* ===== 页脚样式 ===== */
footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

footer a:hover {
    color: var(--primary-color) !important;
    transition: color 0.3s ease;
}

/* ===== 加载动画 ===== */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .hero-slide {
        min-height: 400px;
    }
    
    .hero-slide h1 {
        font-size: 2rem;
    }
    
    .hero-slide .lead {
        font-size: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 576px) {
    .hero-slide {
        min-height: 350px;
        text-align: center;
    }
    
    .hero-slide h1 {
        font-size: 1.75rem;
    }
    
    .btn-group .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

/* ===== 工具类 ===== */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.box-shadow {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.box-shadow-lg {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.border-radius {
    border-radius: 8px;
}

.border-radius-lg {
    border-radius: 12px;
}

.transition {
    transition: all 0.3s ease;
}

/* ===== 自定义滚动条 ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
}

/* ===== 打印样式 ===== */
@media print {
    .navbar, .btn, footer, #backToTop {
        display: none !important;
    }
    
    .container {
        max-width: none !important;
    }
    
    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
}

/* ===== 暗色主题支持 ===== */
@media (prefers-color-scheme: dark) {
    .bg-light {
        background-color: #2c3e50 !important;
        color: #ecf0f1;
    }
    
    .text-muted {
        color: #95a5a6 !important;
    }
    
    .card {
        background-color: #34495e;
        color: #ecf0f1;
    }
    
    .form-control, .form-select {
        background-color: #34495e;
        border-color: #5a6c7d;
        color: #ecf0f1;
    }
    
    .form-control:focus, .form-select:focus {
        background-color: #34495e;
        border-color: var(--primary-color);
        color: #ecf0f1;
    }
}