/* 时刻表查询页面样式 */

/* 英雄区域 */
.hero {
    background: linear-gradient(135deg, #3498db, #1a6ca4);
    color: #fff;
    padding: 60px 5%;
    border-radius: 10px;
    margin: 20px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/metro-pattern.png');
    opacity: 0.1;
    z-index: 0;
}

.hero-content {
    flex: 1;
    position: relative;
    z-index: 1;
    padding-right: 30px;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.6s ease-out;
}

.hero p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 25px;
    max-width: 600px;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease-out;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    animation: fadeInUp 1s ease-out;
}

.btn {
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background-color: #fff;
    color: #2980b9;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background-color: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

.hero-image {
    flex: 0 0 40%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
    animation: fadeInRight 1s ease-out;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
}

/* 时刻表查询区域 */
.timetable-section {
    margin-bottom: 2rem;
    animation: fadeIn 1s ease;
}

.search-container {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.search-container h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-size: 1.8rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.form-group input {
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(26, 115, 232, 0.3);
}

.submit-group {
    align-self: flex-end;
}

.search-button {
    padding: 12px 25px;
    background-color: var(--accent-color);
    color: #333;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 1.5rem;
}

.search-button:hover {
    background-color: #e8ac04;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* 结果容器 */
.results-container {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    display: none; /* 初始隐藏，有结果时通过JS显示 */
}

.results-container.active {
    display: block;
    animation: slideUp 0.8s ease;
}

/* 小贴士部分 */
.quick-tips {
    margin: 2rem 0;
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    animation: fadeIn 1s ease;
}

.quick-tips h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-size: 1.8rem;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.tip-item {
    padding: 1.5rem;
    text-align: center;
    background-color: var(--light-bg);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.tip-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.tip-item .icon {
    margin-bottom: 1rem;
}

.tip-item .icon img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.tip-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.tip-item p {
    color: #666;
    font-size: 0.95rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .search-button {
        margin-top: 1rem;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 40px 5%;
    }
    
    .hero-content {
        padding-right: 0;
        margin-bottom: 30px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-image {
        flex: 0 0 auto;
        width: 80%;
    }
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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