:root {
    --primary: #2c7744;
    --secondary: #f0f7f4;
    --accent: #d35400;
    --text: #333;
    --bg: #ffffff;
    --card-bg: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--secondary);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


/* Header - Final fix for height and centering */
.hero {
    /* 背景图设置保持不变：半透明遮罩 + 图片路径 */
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('./assets/header-bg.jpg');
    /* 确保图片铺满 */
    background-size: cover;
    /* 图片居中对齐，保证左右平衡 */
    background-position: center center;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.7);
    margin-bottom: 40px;

    /* --- 【核心修改区域 Start】 --- */
    
    /* 1. 强制设定一个最小高度 */
    /* 500px 能确保大部分宽幅图片的主体内容都被包含进去 */
    min-height: 400px; 
    /* 如果你觉得还不够高，可以试着改成 600px，或者用相对单位比如 55vh (屏幕高度的55%) */
    /* min-height: 55vh; */ 

    /* 2. 使用 Flexbox 布局来让文字垂直居中 */
    display: flex;
    flex-direction: column;
    justify-content: center; /* 垂直方向居中 */
    align-items: center;     /* 水平方向居中 */
    
    /* 3. 减少 padding，因为现在靠 Flexbox 居中，不需要 huge padding 了 */
    padding: 20px; 
    text-align: center;
    
    /* --- 【核心修改区域 End】 --- */
}

/* 稍微调整一下文字样式，让它们更紧凑一些 */
.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    margin-bottom: 15px;
    line-height: 1.1;
}

.hero p {
    font-size: 1.3rem;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
}

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary);
    color: white;
}

/* Grid Layout */
.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding-bottom: 60px;
}

/* Card Style */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
}

.card-img-wrapper {
    height: 200px;
    overflow: hidden;
    background-color: #ddd;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    padding: 20px;
    flex-grow: 1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.bird-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

.bird-scientific {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
}

.price-tag {
    background-color: var(--secondary);
    color: var(--primary);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: bold;
}

.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.spec-item strong {
    display: block;
    color: #555;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.rating-box {
    background-color: #fff8e1;
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
    border-left: 4px solid #f1c40f;
}

.rating-score {
    font-weight: bold;
    color: #d35400;
}

.notes {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #555;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 5px;
    background: #e0e0e0;
}
.badge.male { background: #e3f2fd; color: #1565c0; }
.badge.female { background: #fce4ec; color: #c2185b; }

footer {
    text-align: center;
    padding: 40px 0;
    color: #888;
    font-size: 0.9rem;
}

/* --- New Tab Styles --- */

/* Tab Navigation Bar */
.tab-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 0;
}

.tab-link {
    background: none;
    border: none;
    padding: 15px 25px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-bottom: 4px solid transparent;
    transition: all 0.3s ease;
}

.tab-link:hover {
    color: var(--primary);
    background-color: rgba(44, 119, 68, 0.05);
}

.tab-link.active {
    color: var(--primary);
    border-bottom: 4px solid var(--primary);
}

/* Tab Content Visibility Logic */
.tab-content {
    display: none; /* 默认隐藏所有 Tab 内容 */
    animation: fadeIn 0.5s;
}

.tab-content.active {
    display: block; /* 只显示带有 active 类的 Tab */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Care Section Styles */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.info-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-left: 5px solid var(--primary);
}

.info-card h3 {
    margin-bottom: 15px;
    color: var(--text);
}

.info-card ul {
    padding-left: 20px;
    color: #555;
}

.info-card li {
    margin-bottom: 8px;
}

/* Warning Card Specifics */
.info-card.warning {
    border-left-color: #d32f2f;
    background-color: #fff5f5;
}

.info-card.warning h3 {
    color: #d32f2f;
}