/* 植物图库页面特定样式 */

/* 第一幕样式 */
.gallery-hero {
    width: 100%;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-hero .hero-image {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
}

.gallery-hero .hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8);
}

.gallery-hero .hero-content {
    text-align: center;
    color: white;
    max-width: 1000px;
    padding: 30px;
    z-index: 10;
    background-color: transparent;
    border-radius: 15px;
    margin-top: 190px;
}

.gallery-hero .hero-content h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.gallery-hero .hero-content p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* 搜索框样式 */
.search-container {
    max-width: 600px;
    margin: 50px auto;
    display: flex;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    background-color: white;
    transition: all 0.3s ease;
    position: relative;
}

.search-input {
    flex: 1;
    padding: 15px 50px 15px 20px;
    border: none;
    font-size: 1.1rem;
    outline: none;
    background-color: transparent;
    width: 100%;
    border-radius: 30px;
}

.search-container:focus-within {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    outline: 3px solid #88B04B;
    outline-offset: 2px;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.search-icon:hover {
    transform: translateY(-50%) scale(1.1);
}

/* 分类卡片样式 */
.category-cards {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 25px;
    margin: 60px 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.card-container {
    width: 24%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.card {
    width: 100%;
    height: 160px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.card-image {
    width: 100%;
    height: 100%;
}

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

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

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

.card-title {
    color: white;
    font-size: 1.1rem;
    margin-top: 12px;
    margin-bottom: 0;
    text-align: left;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.card-container:hover .card-title {
    color: #88B04B;
    text-decoration: underline;
}

.category-icon, .category-card {
    display: none;
}

/* 箭头按钮样式 */
.hero-buttons {
    margin-top: 60px;
    text-align: center;
}

.arrow-button {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.arrow-button span {
    display: inline-block;
    margin-bottom: 15px;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.arrow-down {
    display: inline-block;
    font-size: 1.3rem;
    font-weight: normal;
    transform: scaleX(1.5);
    transition: transform 0.3s ease;
    line-height: 1;
}

.arrow-button:hover .arrow-down {
    transform: scaleX(1.5) translateY(5px);
}

/* 探索按钮样式 */
.hero-button {
    background-color: #007844;
    color: white;
    padding: 12px 30px;
    font-size: 1.2rem;
    text-decoration: none;
    border-radius: 5px;
    border: 2px solid white;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.hero-button:hover {
    background-color: #88B04B;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

/* 第二幕样式 */
.photo-gallery {
    background-color: #f9f9f9;
    padding: 80px 20px;
    min-height: 100vh;
}

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

.section-header h2 {
    font-size: 2.5rem;
    color: #007844;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #88B04B;
}

/* 过滤按钮样式 */
.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 30px 0;
}

.filter-button {
    background-color: #fff;
    color: #333;
    border: 2px solid #ddd;
    padding: 10px 25px;
    font-size: 1.1rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-button:hover {
    border-color: #88B04B;
    color: #007844;
}

.filter-button.active {
    background-color: #007844;
    color: white;
    border-color: #007844;
}

/* 图片网格样式 */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    background-color: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.gallery-image {
    height: 220px;
    overflow: hidden;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.gallery-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 120, 68, 0);
    transition: background 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.gallery-item:hover::before {
    background: rgba(0, 120, 68, 0.05);
}

.gallery-item:active {
    transform: translateY(0) scale(0.98);
}

.gallery-info {
    position: relative;
    padding: 15px;
    padding-bottom: 20px;
    min-height: 120px;
    background-color: white;
    z-index: 2;
    transition: padding 0.3s ease;
}

.gallery-item:hover .gallery-info {
    padding-left: 20px;
}

.gallery-info h3 {
    font-size: 1.1rem;
    color: #007844;
    margin: 0 0 8px 0;
}

.gallery-info p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 加载更多按钮样式 */
.load-more {
    text-align: center;
    margin-top: 50px;
}

#load-more-btn {
    background-color: #007844;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1.1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#load-more-btn:hover {
    background-color: #88B04B;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* 响应式调整 */
@media (max-width: 992px) {
    .gallery-hero .hero-content {
        max-width: 90%;
        padding: 25px;
    }

    .gallery-hero .hero-content h1 {
        font-size: 2.5rem;
    }

    .category-cards {
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .card-container {
        width: 45%;
    }
    
    .card {
        height: 140px;
    }
}

@media (max-width: 768px) {
    .gallery-hero .hero-content {
        padding: 20px;
        margin-top: 180px;
    }

    .gallery-hero .hero-content h1 {
        font-size: 2rem;
    }

    .gallery-hero .hero-content p {
        font-size: 1.2rem;
    }

    .search-container {
        flex-direction: row;
        border-radius: 30px;
    }

    .search-input {
        padding: 12px 40px 12px 15px;
        border-radius: 30px;
    }

    .search-icon {
        right: 12px;
        width: 20px;
        height: 20px;
    }

    .category-cards {
        flex-wrap: wrap;
        gap: 10px;
    }

    .card-container {
        width: 45%;
    }
    
    .card {
        height: 130px;
    }

    .card-title {
        font-size: 0.9rem;
        margin-top: 10px;
    }
    
    .arrow-down {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .filter-buttons {
        gap: 10px;
    }

    .filter-button {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }

    .gallery-image {
        height: 180px;
    }
    
    .gallery-info {
        min-height: 130px;
    }
}

@media (max-width: 480px) {
    .gallery-hero .hero-content {
        margin-top: 150px;
    }

    .gallery-hero .hero-content h1 {
        font-size: 1.8rem;
    }

    .gallery-hero .hero-content p {
        font-size: 1rem;
    }

    .card-container {
        width: 100%;
    }
    
    .card-image {
        height: 150px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-image {
        height: 200px;
    }
    
    .gallery-info {
        min-height: 100px;
    }
    
    .gallery-info h3 {
        font-size: 1rem;
    }
    
    .gallery-info p {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }
}

/* 植物卡片分类标签样式 */
.gallery-item {
    position: relative;
}

.gallery-info {
    position: relative;
    padding-bottom: 35px; /* 为标签留出空间 */
}

.category-label {
    position: absolute;
    bottom: 8px;
    right: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    background-color: #007844;
    text-transform: uppercase;
    z-index: 2;
}

/* 不同类型的标签样式 */
.category-label.tree {
    background-color: #2E7D32; /* 深绿色 */
}

.category-label.leaf {
    background-color: #7CB342; /* 浅绿色 */
}

.category-label.flower {
    background-color: #E91E63; /* 粉红色 */
}

.category-label.fruit {
    background-color: #FF9800; /* 橙色 */
}

.category-label.bark {
    background-color: #795548; /* 棕色 */
} 