/* Hero Section - Premium Redesign (Matching Home Page Style) */
.hero-section {
    height: 85vh;
    position: relative;
    overflow: hidden;
    margin-top: -20px;
}

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

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    background-color: transparent !important;
}

.hero-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(98deg, rgba(6, 24, 16, 0.82) 0%, rgba(8, 39, 25, 0.64) 35%, rgba(12, 44, 30, 0.36) 58%, rgba(14, 54, 38, 0.18) 100%),
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.08), transparent 52%);
    z-index: 2;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 3;
    color: #fff;
    padding-top: 16vh;
    text-align: left;
    max-width: 760px;
    animation: heroFadeIn 0.9s ease-out;
}

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

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.4rem, 4.8vw, 4.25rem);
    font-weight: 700;
    margin-bottom: 1.2rem;
    text-shadow: 0 8px 24px rgba(0,0,0,0.36);
    line-height: 1.18;
    letter-spacing: -0.35px;
    color: #ffffff;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.hero-badges .badge {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.92);
    color: #1f2937;
    font-weight: 600;
    padding: 0.65rem 1.25rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.hero-badges .badge:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    background: #ffffff;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0) translateX(-50%);}
    40% {transform: translateY(-10px) translateX(-50%);}
    60% {transform: translateY(-5px) translateX(-50%);}
}

.text-shadow {
    text-shadow: 2px 4px 12px rgba(0,0,0,0.6), 0 0 40px rgba(0,0,0,0.3);
}

/* Breadcrumb Custom */
.breadcrumb-custom {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-block;
}

.breadcrumb-custom .breadcrumb {
    margin: 0;
    background: transparent;
}

.breadcrumb-custom .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-custom .breadcrumb-item a:hover {
    color: white;
}

.breadcrumb-custom .breadcrumb-item.active {
    color: white;
}

.breadcrumb-custom .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.7);
}

/* Section Padding */
.section-padding {
    padding: 5rem 0;
}

@media (max-width: 768px) {
    .section-padding {
        padding: 3rem 0;
    }
}

/* Stat Cards - Enhanced with gradients */
.stat-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 20px !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, rgba(255,255,255,0.5), rgba(255,255,255,0.9), rgba(255,255,255,0.5));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.stat-card .display-4 {
    font-weight: 900;
    line-height: 1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

/* Gradient backgrounds for stat cards */
.bg-primary-gradient {
    background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
}

/* Card Hover Effects - Enhanced */
.card-hover {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 20px !important;
    position: relative;
    overflow: hidden;
}

.card-hover::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(46, 125, 50, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.card-hover:hover::after {
    width: 400px;
    height: 400px;
}

.card-hover:hover {
    transform: translateY(-15px) rotate(1deg);
    box-shadow: 0 25px 50px rgba(0,0,0,0.2) !important;
}

/* Image Cover - Fixed aspect ratio and positioning */
.img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), filter 0.4s ease;
}

.card-hover:hover .img-cover {
    transform: scale(1.15) rotate(-2deg);
    filter: brightness(1.1) contrast(1.05);
}

/* Card Body */
.card-hover .card-body {
    padding: 1.75rem;
    position: relative;
    z-index: 1;
}

.card-hover .card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #2e7d32;
    font-weight: 700;
    transition: color 0.3s ease;
}

.card-hover:hover .card-title {
    color: #1b5e20;
}

/* Badge Enhancements */
.badge {
    padding: 0.5rem 1rem;
    font-weight: 600;
    border-radius: 20px;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
}

/* Dipterocarp Genus Cards */
.border {
    transition: all 0.3s ease;
}

.border:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(46, 125, 50, 0.15);
    background: white !important;
}

.border i {
    transition: transform 0.3s ease;
}

.border:hover i {
    transform: scale(1.2) rotate(10deg);
}

/* Border Left Primary */
.border-left-primary {
    border-left: 5px solid #1976d2 !important;
    transition: all 0.3s ease;
}

.border-left-primary:hover {
    border-left-width: 8px !important;
    transform: translateX(5px);
}

/* Table Custom - Enhanced */
.table-custom {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.table-custom thead {
    background: linear-gradient(135deg, #2e7d32, #4caf50, #66bb6a);
    color: white;
}

.table-custom thead th {
    border: none;
    padding: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 1px;
}

.table-custom tbody tr {
    transition: all 0.4s ease;
}

.table-custom tbody tr:hover {
    background: linear-gradient(90deg, #f8fdf8 0%, #e8f5e9 50%, #f8fdf8 100%);
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.15);
}

.table-custom tbody td {
    padding: 1.25rem;
    vertical-align: middle;
}

/* Card Headers */
.card-header {
    border-radius: 16px 16px 0 0 !important;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

/* List Group */
.list-group-item-action {
    transition: all 0.3s ease;
    border-radius: 10px !important;
    margin-bottom: 6px;
    border: none;
}

.list-group-item-action:hover {
    background: linear-gradient(90deg, #e3f2fd 0%, #bbdefb 100%);
    transform: translateX(8px);
    padding-left: 2rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.list-group-item-action i {
    transition: transform 0.3s ease;
}

.list-group-item-action:hover i {
    transform: scale(1.2);
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUp 0.8s ease forwards;
}

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

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* Pulse animation for icons */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.border i {
    animation: pulse 2s ease-in-out infinite;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Hero badges */
.hero-content .badge {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Responsive Hero - Premium */
@media (max-width: 992px) {
    .hero-content {
        padding-top: 18vh;
        text-align: center;
        margin: 0 auto;
    }

    .hero-badges {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.25rem;
        line-height: 1.22;
    }

    .hero-section {
        height: 72vh;
    }

    .hero-badges .badge {
        font-size: 0.85rem;
        padding: 0.55rem 1rem;
    }

    .scroll-indicator {
        bottom: 20px;
    }
}

/* Enhanced shadows */
.shadow-sm {
    box-shadow: 0 6px 16px rgba(0,0,0,0.1) !important;
}

.shadow-sm:hover {
    box-shadow: 0 12px 32px rgba(0,0,0,0.15) !important;
}

/* Section titles */
h2 {
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #2e7d32, #4caf50, #66bb6a);
    border-radius: 2px;
}

.text-center h2::after {
    left: 50%;
}

/* Floating animation for cards */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.card-hover:hover {
    animation: float 3s ease-in-out infinite;
}

/* ========== FLORA GALLERY STYLES ========== */
.gallery-item-flora {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: #1a1a1a;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    aspect-ratio: 4/3;
}

.gallery-item-flora::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(135deg, transparent, rgba(46, 125, 50, 0.3));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 3;
    pointer-events: none;
}

.gallery-item-flora:hover::before {
    opacity: 1;
}

.gallery-item-flora img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item-flora:hover img {
    transform: scale(1.08);
}

.gallery-overlay-flora {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 50%, transparent 100%);
    color: white;
    padding: 1.5rem;
    transform: translateY(0);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.gallery-item-flora:hover .gallery-overlay-flora {
    background: linear-gradient(to top, rgba(46, 125, 50, 0.95) 0%, rgba(46, 125, 50, 0.8) 60%, transparent 100%);
    padding: 2rem 1.5rem;
}

.gallery-overlay-flora h6 {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.gallery-overlay-flora .meta {
    font-size: 0.8rem;
    opacity: 0.9;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.gallery-overlay-flora .meta span {
    background: rgba(255,255,255,0.15);
    padding: 3px 8px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.gallery-item-flora:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(46, 125, 50, 0.2);
}

@media (max-width: 768px) {
    .gallery-item-flora {
        border-radius: 16px;
    }
    
    .gallery-overlay-flora {
        padding: 1rem;
    }
    
    .gallery-overlay-flora h6 {
        font-size: 0.9rem;
    }
}

/* ========== FLORA MODAL STYLES ========== */

/* Card Image Overlay Gradient */
.card-img-overlay-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
    pointer-events: none;
}

/* Flora Detail Button */
.btn-flora-detail {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #2e7d32 0%, #43a047 100%);
    color: white;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
    overflow: hidden;
    position: relative;
}

.btn-flora-detail::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-flora-detail:hover::before {
    left: 100%;
}

.btn-flora-detail:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(46, 125, 50, 0.4);
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
}

.btn-flora-detail .btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.btn-flora-detail:hover .btn-icon {
    transform: translateX(4px);
}

/* Flora Modal - Premium Design */
.modal-flora .modal-content {
    border: none;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0,0,0,0.25);
    animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-flora .modal-header {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #f8fdf8 0%, #e8f5e9 100%);
}

.modal-title-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modal-flora .modal-title {
    font-size: 1.5rem;
    color: #1b5e20;
    font-family: 'Playfair Display', serif;
    margin-bottom: 0;
}

.btn-close-flora {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0,0,0,0.08);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: none;
}

.btn-close-flora:hover {
    background: rgba(0,0,0,0.15);
    transform: rotate(90deg);
}

.btn-close-flora::before {
    content: '×';
    font-size: 1.5rem;
    line-height: 1;
    color: #333;
}

.modal-flora .modal-body {
    padding: 2rem;
    background: white;
}

.flora-modal-image-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.flora-modal-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.flora-modal-image:hover {
    transform: scale(1.03);
}

.flora-modal-content {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.flora-modal-content p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #374151;
    text-align: justify;
}

.flora-modal-content p::first-letter {
    font-size: 1.3em;
    font-weight: 700;
    color: #2e7d32;
}

.modal-flora .modal-footer {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #f8fdf8 0%, #e8f5e9 100%);
}

.btn-secondary-flora {
    padding: 12px 28px;
    background: white;
    color: #2e7d32;
    border: 2px solid #2e7d32;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary-flora:hover {
    background: #2e7d32;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

/* Scrollbar Custom for Modal Content */
.flora-modal-content::-webkit-scrollbar {
    width: 8px;
}

.flora-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.flora-modal-content::-webkit-scrollbar-thumb {
    background: #43a047;
    border-radius: 4px;
}

.flora-modal-content::-webkit-scrollbar-thumb:hover {
    background: #2e7d32;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-flora .modal-body {
        padding: 1.25rem;
    }
    
    .flora-modal-image {
        height: 220px;
    }
    
    .flora-modal-content p {
        font-size: 0.95rem;
        line-height: 1.7;
    }
    
    .btn-flora-detail {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
}
