/* ========================================
   Biodiversity Page Styles
   ======================================== */

/* Hero Slider Section */
.biodiversity-hero {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.biodiversity-slider .owl-carousel .item {
    height: 500px;
    position: relative;
}

.biodiversity-slider .item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6));
}

.slider-content h1 {
    font-size: 48px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    color: #fff;
}

.slider-content p {
    font-size: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Owl Carousel Dots Customization */
#biodiversity-carousel .owl-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

#biodiversity-carousel .owl-dot {
    display: inline-block;
    margin: 0 5px;
}

#biodiversity-carousel .owl-dot span {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: block;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

#biodiversity-carousel .owl-dot:hover span {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

#biodiversity-carousel .owl-dot.active span {
    background: #38ef7d;
    border-color: white;
    width: 14px;
    height: 14px;
    box-shadow: 0 0 10px rgba(56, 239, 125, 0.8);
}

/* Statistics Section */
.stat-box {
    background: white;
    border-radius: 6px;
    padding: 20px 25px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    border-top: 3px solid #667eea;
}

.stat-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #667eea;
    border-radius: 6px 6px 0 0;
}

.stat-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
}

.stat-box-clickable {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-box-clickable:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* Xanh Statistics Boxes - Minimal custom CSS, using Bootstrap */
.xanh-stat-clickable {
    transition: all 0.3s ease;
}

.xanh-stat-clickable:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.xanh-stat-arrow {
    transition: all 0.3s ease;
}

.xanh-stat-clickable:hover .xanh-stat-arrow {
    opacity: 1 !important;
    transform: translateX(0) !important;
}

/* Pastel background colors for harmony */
.xanh-bg-green {
    background: linear-gradient(135deg, rgba(200, 242, 220, 0.3) 0%, rgba(255, 255, 255, 1) 100%);
}

.xanh-bg-blue {
    background: linear-gradient(135deg, rgba(207, 232, 255, 0.3) 0%, rgba(255, 255, 255, 1) 100%);
}

.xanh-bg-orange {
    background: linear-gradient(135deg, rgba(255, 235, 205, 0.3) 0%, rgba(255, 255, 255, 1) 100%);
}

.xanh-bg-purple {
    background: linear-gradient(135deg, rgba(230, 220, 250, 0.3) 0%, rgba(255, 255, 255, 1) 100%);
}

/* Subtle border colors */
.xanh-border-green {
    border-color: rgba(25, 135, 84, 0.25) !important;
}

.xanh-border-blue {
    border-color: rgba(13, 202, 240, 0.25) !important;
}

.xanh-border-orange {
    border-color: rgba(255, 193, 7, 0.25) !important;
}

.xanh-border-purple {
    border-color: rgba(111, 66, 193, 0.25) !important;
}

.xanh-stat-clickable:hover.xanh-border-green {
    border-color: rgba(25, 135, 84, 0.5) !important;
}

.xanh-stat-clickable:hover.xanh-border-blue {
    border-color: rgba(13, 202, 240, 0.5) !important;
}

.xanh-stat-clickable:hover.xanh-border-orange {
    border-color: rgba(255, 193, 7, 0.5) !important;
}

.xanh-stat-clickable:hover.xanh-border-purple {
    border-color: rgba(111, 66, 193, 0.5) !important;
}

/* Stat Box Color Variations */
.stat-box.green {
    border-top-color: #11998e;
}

.stat-box.green::before {
    background: #11998e;
}

.stat-box.green .icon {
    color: #11998e;
    opacity: 0.4;
}

.stat-box.orange {
    border-top-color: #f5576c;
}

.stat-box.orange::before {
    background: #f5576c;
}

.stat-box.orange .icon {
    color: #f5576c;
    opacity: 0.4;
}

.stat-box.blue {
    border-top-color: #4facfe;
}

.stat-box.blue::before {
    background: #4facfe;
}

.stat-box.blue .icon {
    color: #4facfe;
    opacity: 0.4;
}

.stat-box.purple {
    border-top-color: #764ba2;
}

.stat-box.purple::before {
    background: #764ba2;
}

.stat-box.purple .icon {
    color: #764ba2;
    opacity: 0.4;
}

.stat-box .icon {
    font-size: 32px;
    color: #e0e0e0;
    opacity: 0.35;
    margin-left: 15px;
}

.stat-box .number {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
    display: block;
    line-height: 1;
    color: #333;
}

.stat-box .label {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
}

/* Tabs Section */
.nav-tabs {
    border-bottom: 2px solid #38ef7d;
}

.nav-tabs .nav-link {
    border: none;
    color: #666;
    font-weight: 600;
    padding: 15px 25px;
    margin-right: 10px;
    border-radius: 10px 10px 0 0;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    color: #38ef7d;
    background-color: rgba(56, 239, 125, 0.1);
}

.nav-tabs .nav-link.active {
    color: white;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border-color: transparent;
}

/* Conservation Area Cards */
.conservation-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.conservation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.conservation-card-img {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.conservation-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.conservation-card:hover .conservation-card-img img {
    transform: scale(1.1);
}

.conservation-card-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.conservation-card-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.conservation-info-item {
    font-size: 14px;
    color: #555;
}

.conservation-info-item i {
    color: #38ef7d;
    margin-right: 10px;
    margin-top: 3px;
    min-width: 16px;
}

.conservation-stat-number {
    font-size: 24px;
    font-weight: 700;
    color: #11998e;
    display: block;
}

.conservation-stat-label {
    font-size: 12px;
    color: #999;
}

/* Section Title */
.section-title h2 {
    font-size: 32px;
    font-weight: 700;
    color: #333;
}

.section-title p {
    font-size: 15px;
    color: #666;
}

.section-title .title-divider {
    width: 70px;
    height: 3px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    margin: 15px auto 12px;
    border-radius: 2px;
}

/* Loading Spinner */
.spinner-border {
    color: #38ef7d;
}

/* ========================================
   Responsive Styles
   ======================================== */

/* Tablet */
@media (max-width: 768px) {
    .biodiversity-hero {
        height: 350px;
    }

    .biodiversity-slider .owl-carousel .item {
        height: 350px;
    }

    .slider-content h1 {
        font-size: 28px;
    }

    .slider-content p {
        font-size: 14px;
    }

    #biodiversity-carousel .owl-dots {
        bottom: 15px;
    }

    #biodiversity-carousel .owl-dot span {
        width: 10px;
        height: 10px;
    }

    #biodiversity-carousel .owl-dot.active span {
        width: 12px;
        height: 12px;
    }

    .section-title h2 {
        font-size: 26px;
    }

    .section-title p {
        font-size: 14px;
    }

    .stat-box {
        padding: 18px 20px;
    }

    .stat-box .icon {
        font-size: 30px;
        margin-left: 10px;
    }

    .stat-box .number {
        font-size: 26px;
        margin-bottom: 4px;
    }

    .stat-box .label {
        font-size: 12px;
    }

    .nav-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        flex-wrap: nowrap;
    }

    .nav-tabs::-webkit-scrollbar {
        display: none;
    }

    .nav-tabs .nav-link {
        padding: 10px 15px;
        font-size: 14px;
        margin-right: 5px;
        flex-shrink: 0;
    }

    .nav-tabs .nav-link i {
        display: none;
    }

    .conservation-card-title {
        font-size: 18px;
    }

    .conservation-card-description {
        font-size: 13px;
    }

    .conservation-stat-number {
        font-size: 20px;
    }

    .conservation-stat-label {
        font-size: 11px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .biodiversity-hero {
        height: 280px;
    }

    .biodiversity-slider .owl-carousel .item {
        height: 280px;
    }

    .slider-content h1 {
        font-size: 22px;
    }

    .slider-content p {
        font-size: 13px;
    }

    .section-title h2 {
        font-size: 22px;
    }

    .stat-box {
        padding: 15px 18px;
    }

    .stat-box .icon {
        font-size: 28px;
        margin-left: 10px;
    }

    .stat-box .number {
        font-size: 24px;
        margin-bottom: 4px;
    }

    .stat-box .label {
        font-size: 11px;
    }

    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        justify-content: flex-start;
    }

    .nav-tabs::-webkit-scrollbar {
        display: none;
    }

    .nav-tabs .nav-link {
        padding: 8px 12px;
        font-size: 13px;
        white-space: nowrap;
        flex-shrink: 0;
    }
}

/* Species Category Boxes */
.species-category-box {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.species-category-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.species-category-content {
    padding: 20px 15px;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 200px;
}

.species-category-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    transition: transform 0.3s ease;
}

.species-category-box.plant-box .species-category-icon {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.species-category-box.animal-box .species-category-icon {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
}

.species-category-box:hover .species-category-icon {
    transform: scale(1.1) rotate(5deg);
}

.species-category-title {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.species-category-description {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 0;
}

.species-category-btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(56, 239, 125, 0.3);
}

.species-category-box.plant-box .species-category-btn {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    box-shadow: 0 4px 15px rgba(56, 239, 125, 0.3);
}

.species-category-box.animal-box .species-category-btn {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3);
}

.species-category-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 239, 125, 0.4);
    color: white;
}

.species-category-box.animal-box .species-category-btn:hover {
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.4);
}

/* Responsive Styles for Species Category Boxes */
@media (max-width: 768px) {

    .species-category-content {
        padding: 15px 12px;
        min-height: 180px;
    }

    .species-category-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
        margin-bottom: 10px;
    }

    .species-category-title {
        font-size: 18px;
        margin-bottom: 6px;
    }

    .species-category-description {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .species-category-box {
        min-height: 160px;
    }

    .species-category-content {
        padding: 12px 10px;
        min-height: 160px;
    }

    .species-category-icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
        margin-bottom: 8px;
    }

    .species-category-title {
        font-size: 16px;
        margin-bottom: 5px;
    }

    .species-category-description {
        font-size: 11px;
    }
}

/* Species List Modal Styles */
#speciesListModal .modal-dialog {
    max-width: 1200px;
}

#speciesListModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.species-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

#species-list-tbody tr {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#species-list-tbody tr:hover {
    background-color: #f8f9fa;
}

#species-list-tbody td {
    vertical-align: middle;
}

#species-pagination .page-link {
    color: #11998e;
}

#species-pagination .page-item.active .page-link {
    background-color: #11998e;
    border-color: #11998e;
}

#species-pagination .page-link:hover {
    color: #38ef7d;
}
