/* ================================================================
   BEETLES OF AFRICA — Desktop Home Styles
   Applies only to screens ≥ 1400px (matching .website-view breakpoint)
================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ================================================================
   NAVBAR DESKTOP OVERRIDE  (≥ 1400px)
================================================================ */
@media (min-width: 1400px) {

    .navbar-custom {
        background: #F8F5EF !important;
        background-image: none !important;
        border-bottom: 1px solid #E2DDD6 !important;
        box-shadow: none !important;
        min-height: 76px !important;
        padding: 0 20px !important;
        font-family: 'Inter', system-ui, sans-serif;
    }

    .desktop-logo img {
        height: 110px !important;
        width: 350px !important;
    }

    .navbar-nav .nav-link {
        color: #5A5651 !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        letter-spacing: 0.07em !important;
        text-transform: uppercase !important;
        padding: 8px 10px !important;
        transition: color 0.15s ease !important;
    }

    .navbar-nav .nav-link:hover {
        color: #1E3A1E !important;
        text-decoration: none !important;
    }

    .navbar-nav .nav-link.active,
    .navbar-nav .nav-item .nav-link:first-child {
        color: #1E3A1E !important;
    }

    /* Remove the bottom line active indicator */
    .navbar-nav .nav-link.active::after {
        display: none !important;
    }

    /* Style "Contribute" link as a filled pill button */
    .dh-contribute-nav-link {
        background: #1E3A1E !important;
        color: #F4F1EC !important;
        border-radius: 9999px !important;
        padding: 10px 20px !important;
        font-weight: 700 !important;
        transition: background 0.2s ease !important;
        margin-left: 8px;
    }

    .dh-contribute-nav-link:hover {
        background: #2D5A27 !important;
        color: #F4F1EC !important;
        text-decoration: none !important;
    }

    /* Inline search icon button in nav */
    .dh-nav-search-btn {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: 1px solid #E2DDD6;
        background: transparent;
        display: flex !important;
        align-items: center;
        justify-content: center;
        color: #5A5651;
        cursor: pointer;
        transition: border-color 0.15s, color 0.15s;
        margin-right: 4px;
    }

    .dh-nav-search-btn:hover {
        color: #1E3A1E;
        border-color: #C9A84C;
    }

    .dh-nav-search-item {
        display: flex;
        align-items: center;
    }
}

/* ================================================================
   DESKTOP FOOTER OVERRIDE  (≥ 1400px)
================================================================ */
@media (min-width: 1400px) {

    footer.dh-main-footer {
        background: #1A1A1A;
        color: #ddd;
        padding: 0;
        border-radius: 0;
        border-top: none;
        text-align: left;
        margin-top: 0;
    }

    .dh-footer-grid {
        max-width: 1280px;
        margin: 0 auto;
        padding: 56px 40px;
        display: grid;
        grid-template-columns: 1.4fr 1fr 1fr 1fr;
        gap: 40px;
    }

    .dh-footer-logo-text {
        font-family: Georgia, 'Times New Roman', serif;
        font-size: 18px;
        font-weight: 700;
        color: rgba(255,255,255,0.9);
        display: block;
        margin-bottom: 12px;
        text-decoration: none;
    }

    .dh-footer-tagline {
        color: #999;
        font-size: 13px;
        line-height: 1.7;
        max-width: 280px;
        margin: 0;
    }

    .dh-footer-col h4 {
        color: white;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        margin: 0 0 16px;
    }

    .dh-footer-col ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .dh-footer-col ul li {
        margin-bottom: 10px;
    }

    .dh-footer-col ul li a {
        color: #999;
        font-size: 13px;
        text-decoration: none;
        transition: color 0.15s;
        display: block;
    }

    .dh-footer-col ul li a:hover {
        color: #C9A84C;
        text-decoration: none;
    }

    .dh-footer-col ul li a.dh-footer-active-link {
        color: #C9A84C;
        font-weight: 600;
    }

    .dh-footer-bottom-bar {
        border-top: 1px solid #333;
    }

    .dh-footer-bottom-inner {
        max-width: 1280px;
        margin: 0 auto;
        padding: 18px 40px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .dh-footer-copyright {
        color: #777;
        font-size: 12px;
        margin: 0;
    }

    .dh-footer-lastupdate {
        color: #666;
        font-size: 11px;
    }

    /* Hide the simple mobile footer on desktop */
    footer.dh-mobile-footer {
        display: none !important;
    }

    /* Hide mobile bottom nav on desktop */
    .mobile-bottom-nav {
        display: none !important;
    }
}

/* =========================================================
   TABLET FOOTER (768px–1399px)
   Brings the full multi-column footer to tablet instead of
   the bare copyright-only mobile footer. Mirrors the desktop
   footer, tuned for the narrower tablet width.
   ========================================================= */
@media (min-width: 768px) and (max-width: 1399px) {

    /* Show the full footer, hide the simple mobile one */
    footer.dh-main-footer {
        display: block;
        background: #1A1A1A;
        color: #ddd;
        padding: 0;
        margin-top: 0;
        border: none;
        border-radius: 0;
        text-align: left;
    }

    footer.dh-mobile-footer {
        display: none !important;
    }

    .dh-footer-grid {
        max-width: 100%;
        margin: 0 auto;
        padding: 36px 28px;
        display: grid;
        grid-template-columns: 1.4fr 1fr 1fr 1fr;
        gap: 28px;
    }

    .dh-footer-logo-text {
        font-family: Georgia, 'Times New Roman', serif;
        font-size: 16px;
        font-weight: 700;
        color: rgba(255, 255, 255, 0.9);
        display: block;
        margin-bottom: 10px;
        text-decoration: none;
    }

    .dh-footer-tagline {
        color: #777;
        font-size: 12px;
        line-height: 1.6;
        max-width: 240px;
        margin: 0;
    }

    .dh-footer-col h4 {
        color: #999;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        margin: 0 0 14px;
    }

    .dh-footer-col ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .dh-footer-col ul li {
        margin-bottom: 9px;
    }

    .dh-footer-col ul li a {
        color: #9DB89A;
        font-size: 12px;
        text-decoration: none;
        transition: color 0.15s;
        display: block;
    }

    .dh-footer-col ul li a:hover {
        color: #C9A84C;
        text-decoration: none;
    }

    .dh-footer-col ul li a.dh-footer-active-link {
        color: #C9A84C;
        font-weight: 600;
    }

    .dh-footer-bottom-bar {
        border-top: 1px solid #333;
    }

    .dh-footer-bottom-inner {
        max-width: 100%;
        margin: 0 auto;
        padding: 16px 28px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .dh-footer-copyright {
        color: #555;
        font-size: 11px;
        margin: 0;
    }

    .dh-footer-lastupdate {
        color: #444;
        font-size: 10px;
    }
}

/* ================================================================
   SHARED UTILITY CLASSES  (used only inside .website-view)
================================================================ */
.dh-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ================================================================
   HERO SECTION
================================================================ */
.dh-hero {
    background: #1E3A1E;
    position: relative;
    overflow: hidden;
    font-family: 'Inter', system-ui, sans-serif;
}

.dh-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 85% 15%, rgba(201,168,76,0.14) 0%, transparent 55%),
        radial-gradient(ellipse at 8% 90%, rgba(45,90,39,0.45) 0%, transparent 50%);
    pointer-events: none;
}

.dh-hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    padding: 64px 40px;
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.dh-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(201,168,76,0.16);
    border: 1px solid rgba(201,168,76,0.35);
    color: #C9A84C;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 9999px;
    margin-bottom: 24px;
}

.dh-hero-title {
    font-family: Georgia, 'Times New Roman', serif;
    color: white;
    font-size: 52px;
    font-weight: 700;
    line-height: 1.08;
    margin: 0 0 20px;
}

.dh-hero-subtitle {
    color: #A9C4A6;
    font-size: 17px;
    line-height: 1.6;
    margin: 0 0 32px;
    max-width: 480px;
}

.dh-search-form {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 16px;
    padding: 6px 6px 6px 20px;
    max-width: 520px;
    border: 2px solid transparent;
    box-shadow: 0 8px 24px rgba(0,0,0,0.22);
    margin-bottom: 24px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.dh-search-form:focus-within {
    border-color: #C9A84C;
    box-shadow: 0 0 0 4px rgba(201,168,76,0.18);
}

.dh-search-form i {
    color: #7A7268;
    font-size: 15px;
    margin-right: 12px;
    flex-shrink: 0;
}

.dh-search-form input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    color: #1A1A1A;
    background: transparent;
    font-family: 'Inter', system-ui, sans-serif;
}

.dh-search-form input::placeholder {
    color: #AAA49D;
}

.dh-search-btn {
    background: #C9A84C;
    color: #1E3A1E;
    font-weight: 700;
    font-size: 14px;
    padding: 11px 22px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    font-family: 'Inter', system-ui, sans-serif;
}

.dh-search-btn:hover {
    background: #d9b962;
}

.dh-popular {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.dh-popular-label {
    color: #7E997B;
    font-size: 13px;
}

.dh-popular a {
    color: #A9C4A6;
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.15s;
}

.dh-popular a:hover {
    color: #C9A84C;
    text-decoration: underline;
}

/* Featured card on hero right */
.dh-hero-right {
    position: relative;
}

.dh-featured-card {
    background: #F4F1EC;
    border-radius: 24px;
    padding: 12px;
    box-shadow: 0 20px 48px rgba(0,0,0,0.3);
}

.dh-featured-img-wrap {
    border-radius: 16px;
    overflow: hidden;
    background: white;
}

.dh-featured-img {
    width: 100%;
    height: 300px;
    object-fit: contain;
    object-position: center;
    display: block;
}

.dh-featured-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
}

.dh-featured-name {
    font-family: Georgia, serif;
    font-size: 15px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0;
}

.dh-featured-sub {
    font-size: 12px;
    color: #7A7268;
    margin: 2px 0 0;
}

.dh-featured-badge {
    background: #1E3A1E;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 9999px;
}

/* Floating stat chip on the hero image */
.dh-stat-chip {
    position: absolute;
    bottom: -20px;
    left: -24px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 5;
}

.dh-stat-chip-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(201,168,76,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #C9A84C;
    font-size: 18px;
}

.dh-stat-chip-number {
    font-family: Georgia, serif;
    font-size: 18px;
    font-weight: 700;
    color: #1E3A1E;
    line-height: 1;
    display: block;
}

.dh-stat-chip-label {
    font-size: 11px;
    color: #7A7268;
    display: block;
    margin-top: 2px;
}

/* ================================================================
   QUICK NAV SECTION
================================================================ */
.dh-quick-nav {
    max-width: 1280px;
    margin: -36px auto 0;
    padding: 0 40px;
    position: relative;
    z-index: 20;
    font-family: 'Inter', system-ui, sans-serif;
}

.dh-quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.dh-qnav-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #E2DDD6;
    box-shadow: 0 4px 12px rgba(30,58,30,0.08);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dh-qnav-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(30,58,30,0.14);
    text-decoration: none;
    color: inherit;
}

.dh-qnav-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #F0EDE6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1E3A1E;
    font-size: 18px;
    flex-shrink: 0;
}

.dh-qnav-icon--gold {
    background: rgba(201,168,76,0.16);
    color: #C9A84C;
}

.dh-qnav-card h3 {
    font-size: 14px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0 0 2px;
}

.dh-qnav-card p {
    font-size: 12px;
    color: #7A7268;
    margin: 0;
}

/* ================================================================
   BEETLE FAMILIES SECTION
================================================================ */
.dh-families {
    padding: 64px 0 24px;
    font-family: 'Inter', system-ui, sans-serif;
}

.dh-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 32px;
}

.dh-section-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 32px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0;
}

.dh-section-subtitle {
    font-size: 15px;
    color: #7A7268;
    margin: 6px 0 0;
}

.dh-view-all {
    color: #2D5A27;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.2s ease;
    white-space: nowrap;
}

.dh-view-all:hover {
    gap: 12px;
    color: #2D5A27;
    text-decoration: none;
}

.dh-family-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 24px;
}

.dh-family-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #E2DDD6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    text-decoration: none;
    display: block;
    color: inherit;
}

.dh-family-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(30,58,30,0.14);
    text-decoration: none;
    color: inherit;
}

.dh-family-img-wrap {
    position: relative;
    /*height: 220px;*/
    height: 120px;
    padding: 12px;
    background: radial-gradient(circle at 50% 40%, #ffffff 0%, #f3efe8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fcfcfc;
}

.dh-family-img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.4s ease;
}

.dh-family-card:hover .dh-family-img {
    transform: scale(1.04);
}

.dh-family-info {
    padding: 10px 12px 12px;
    border-top: 1px solid #F0EDE6;
    /*padding: 16px 20px;*/
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dh-family-name {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 13px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0 0 2px;
}

.dh-family-desc {
    font-size: 12px;
    color: #7A7268;
    margin: 0;
    /* clamp to 1 line */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}


.dh-family-meta {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dh-species-count {
    font-size: 11px;
    font-weight: 600;
    color: #1E3A1E;
}

.dh-family-arrow {
    color: #C9A84C;
    font-size: 18px;
}

.dh-family-card:hover .dh-family-arrow {
    transform: translateX(4px);
}

/* ================================================================
   MAP SECTION
================================================================ */
.dh-map-section {
    padding: 48px 0 24px;
    font-family: 'Inter', system-ui, sans-serif;
}

.dh-map-card {
    background: white;
    border-radius: 24px;
    border: 1px solid #E2DDD6;
    overflow: hidden;
    display: grid;
    grid-template-columns: 360px 1fr;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.dh-map-info {
    background: #1E3A1E;
    padding: 36px;
    display: flex;
    flex-direction: column;
}

.dh-map-info-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(201,168,76,0.16);
    color: #C9A84C;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 9999px;
    align-self: flex-start;
    margin-bottom: 20px;
}

.dh-map-title {
    font-family: Georgia, 'Times New Roman', serif;
    color: white;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 12px;
}

.dh-map-desc {
    color: #A9C4A6;
    font-size: 14px;
    line-height: 1.7;
    margin: 0 0 28px;
}

.dh-map-legend {
    margin-bottom: 28px;
}

.dh-map-legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #D6E2D4;
    margin-bottom: 10px;
}

.dh-map-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dh-map-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: auto;
}

.dh-map-stat-box {
    background: rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 16px;
}

.dh-map-stat-num {
    font-family: Georgia, 'Times New Roman', serif;
    color: white;
    font-size: 22px;
    font-weight: 700;
    display: block;
    line-height: 1;
}

.dh-map-stat-label {
    color: #9DB89A;
    font-size: 11px;
    display: block;
    margin-top: 6px;
}

.dh-map-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    background: #C9A84C;
    color: #1E3A1E;
    font-weight: 700;
    font-size: 14px;
    padding: 12px;
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.2s;
    font-family: 'Inter', system-ui, sans-serif;
}

.dh-map-btn:hover {
    background: #d9b962;
    color: #1E3A1E;
    text-decoration: none;
}

.dh-map-visual {
    position: relative;
    min-height: 500px;
    overflow: hidden;
}

/* Override the default world-map-wrapper box styles inside the map card */
.dh-map-visual .world-map-wrapper,
.dh-map-visual #mapSection_desktopMap {
    height: 100%;
    min-height: 500px;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    background: transparent !important;
}

/* Leaflet container fills the panel */
.dh-map-visual .leaflet-container {
    height: 500px !important;
    border-radius: 0 !important;
}

/* The map div itself */
.dh-map-visual #desktopMap {
    height: 500px !important;
    width: 100% !important;
}

/* ================================================================
   RECENTLY ADDED + ABOUT SECTION
================================================================ */
.dh-recent-about {
    padding: 48px 0 24px;
    font-family: 'Inter', system-ui, sans-serif;
}

.dh-two-col {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 32px;
    align-items: start;
}

.dh-section-header-sm {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.dh-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dh-view-all {
    color: #2b6cb0;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s ease;
}

.dh-new-badge {
    background: #C9A84C;
    color: #1E3A1E;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 9999px;
}

.dh-recent-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.dh-recent-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #E2DDD6;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    text-decoration: none;
    display: block;
    color: inherit;
}

.dh-recent-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(30,58,30,0.12);
    text-decoration: none;
    color: inherit;
}

.dh-recent-img-wrap {
    height: 130px;
    overflow: hidden;
    background: #f5f3ee;
}

.dh-recent-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.dh-recent-info {
    padding: 12px 14px;
}

.dh-recent-name {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 13px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0 0 4px;
    line-height: 1.3;
    /* 2-line clamp */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dh-recent-family {
    font-size: 11px;
    color: #7A7268;
    margin: 0 0 4px;
}

.dh-recent-date {
    font-size: 10px;
    color: #AAA49D;
    margin: 0;
}

/* About card */
.dh-about-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #E2DDD6;
    padding: 28px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.dh-about-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.dh-about-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #2D5A27;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.dh-about-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 18px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0 0 2px;
}

.dh-about-sub {
    font-size: 12px;
    color: #7A7268;
    margin: 0;
}

.dh-about-text {
    font-size: 13px;
    line-height: 1.7;
    color: #5A5651;
    margin: 0 0 4px;
}

.dh-about-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #2D5A27;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.dh-about-read-more:hover {
    text-decoration: underline;
    color: #2D5A27;
}

.dh-about-stats {
    display: flex;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #E2DDD6;
}

.dh-about-stat {
    flex: 1;
    text-align: center;
}

.dh-about-stat-num {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 22px;
    font-weight: 700;
    color: #1E3A1E;
    display: block;
}

.dh-about-stat-label {
    font-size: 11px;
    color: #7A7268;
    display: block;
    margin-top: 2px;
}

.dh-about-divider {
    width: 1px;
    background: #E2DDD6;
    align-self: stretch;
}

/* Update notice */
.dh-update-notice {
    font-size: 12px;
    color: #AAA49D;
    margin-top: 10px;
}

.dh-update-notice .dh-update-date {
    color: #c62828;
    font-weight: 600;
}

/* News in about card */
.dh-news-block {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #E2DDD6;
}

.dh-news-heading {
    font-size: 11px;
    font-weight: 700;
    color: #1A1A1A;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0 0 10px;
}

.dh-news-item {
    padding: 10px 12px;
    background: #F8F5EF;
    border-left: 3px solid #C9A84C;
    border-radius: 0 8px 8px 0;
    margin-bottom: 8px;
}

.dh-news-item-title {
    font-size: 12px;
    font-weight: 700;
    color: #1E3A1E;
    display: block;
    margin-bottom: 3px;
}

.dh-news-item-body {
    font-size: 11px;
    color: #7A7268;
    margin: 0;
    line-height: 1.5;
}

/* ================================================================
   CONTRIBUTE BANNER
================================================================ */
.dh-contribute-section {
    padding: 40px 0 64px;
    font-family: 'Inter', system-ui, sans-serif;
}

.dh-contribute-inner {
    background: #1E3A1E;
    border-radius: 24px;
    padding: 40px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.dh-contribute-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 85% 15%, rgba(201,168,76,0.14) 0%, transparent 55%),
        radial-gradient(ellipse at 8% 90%, rgba(45,90,39,0.45) 0%, transparent 50%);
    pointer-events: none;
}

.dh-contribute-left {
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
    z-index: 1;
}

.dh-contribute-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(201,168,76,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #C9A84C;
    font-size: 24px;
    flex-shrink: 0;
}

.dh-contribute-title {
    font-family: Georgia, 'Times New Roman', serif;
    color: white;
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 6px;
}

.dh-contribute-subtitle {
    color: #A9C4A6;
    font-size: 15px;
    margin: 0;
    max-width: 560px;
    line-height: 1.5;
}

.dh-contribute-btn {
    background: #C9A84C;
    color: #1E3A1E;
    font-weight: 700;
    font-size: 15px;
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: background 0.2s;
    font-family: 'Inter', system-ui, sans-serif;
}

.dh-contribute-btn:hover {
    background: #d9b962;
    color: #1E3A1E;
    text-decoration: none;
}

/* Hide desktop view on mobile/tablet */
.dfc-page-view { display: none; font-family: 'Inter', system-ui, sans-serif; }

/* ---- Page Title Bar ---- */
.dfc-title-bar {
    background: #fff;
    border-bottom: 1px solid #E2DDD6;
}
.dfc-title-bar-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 24px 40px;
}
.dfc-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #7A7268;
    margin-bottom: 12px;
}
.dfc-breadcrumb a {
    color: #7A7268;
    text-decoration: none;
}
.dfc-breadcrumb a:hover { color: #2D5A27; }
.dfc-breadcrumb-sep {
    font-size: 8px;
    color: #BBB6AF;
}
.dfc-breadcrumb-current {
    color: #1E3A1E;
    font-weight: 600;
}
.dfc-title-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}
.dfc-title-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.dfc-page-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 32px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0;
}
.dfc-page-title span { color: #7A7268; font-weight: 400; }
.dfc-specimen-badge {
    background: #F0EDE6;
    color: #1E3A1E;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 999px;
}
.dfc-title-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}
.dfc-view-toggle {
    display: flex;
    align-items: center;
    background: #F4F1EC;
    border-radius: 10px;
    padding: 4px;
    border: 1px solid #E2DDD6;
    gap: 2px;
}
.dfc-view-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 500;
    color: #7A7268;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.dfc-view-btn.active {
    background: #fff;
    color: #1E3A1E;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.dfc-map-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #1E3A1E;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 9px;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
}
.dfc-map-toggle-btn i { color: #C9A84C; }
.dfc-map-toggle-btn:hover { background: #2D5A27; }

/* ---- Main 3-col layout ---- */
.dfc-main {
    max-width: 1320px;
    margin: 0 auto;
    padding: 32px 40px;
}
.dfc-layout {
    display: grid;
    grid-template-columns: 240px 1fr 380px;
    gap: 28px;
    align-items: start;
}
.dfc-layout.map-hidden {
    grid-template-columns: 240px 1fr;
}

/* ---- Filter Sidebar ---- */
.dfc-sidebar {
    position: sticky;
    top: 96px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #E2DDD6;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
    padding: 20px;
}
.dfc-sidebar-search {
    position: relative;
    margin-bottom: 20px;
}
.dfc-sidebar-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #7A7268;
    font-size: 11px;
}
.dfc-sidebar-search input {
    width: 100%;
    background: #FAFAF7;
    border: 1px solid #E2DDD6;
    border-radius: 9px;
    padding: 10px 12px 10px 32px;
    font-size: 13px;
    color: #1A1A1A;
    font-family: 'Inter', system-ui, sans-serif;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.dfc-sidebar-search input:focus {
    border-color: #2D5A27;
    box-shadow: 0 0 0 3px rgba(45,90,39,0.1);
}
.dfc-sidebar-search input::placeholder { color: #AAA49D; }
.dfc-filter-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #5A5651;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}
.dfc-filter-group { margin-bottom: 24px; }
.dfc-sort-select-wrap { position: relative; }
.dfc-sort-select-wrap select {
    width: 100%;
    appearance: none;
    background: #FAFAF7;
    border: 1px solid #E2DDD6;
    border-radius: 9px;
    padding: 10px 32px 10px 12px;
    font-size: 13px;
    color: #1A1A1A;
    font-family: 'Inter', system-ui, sans-serif;
    outline: none;
    cursor: pointer;
    box-sizing: border-box;
}
.dfc-sort-select-wrap select:focus { border-color: #2D5A27; }
.dfc-sort-select-wrap i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #7A7268;
    font-size: 10px;
    pointer-events: none;
}
/* Country checkboxes */
.dfc-country-list { display: flex; flex-direction: column; gap: 8px; }
.dfc-country-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}
.dfc-country-row label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #1A1A1A;
    cursor: pointer;
    flex: 1;
}
.dfc-country-row input[type="checkbox"] {
    accent-color: #1E3A1E;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.dfc-country-count {
    font-size: 11px;
    color: #7A7268;
    flex-shrink: 0;
}
/* Size range */
.dfc-size-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.dfc-size-row input {
    flex: 1;
    background: #FAFAF7;
    border: 1px solid #E2DDD6;
    border-radius: 9px;
    padding: 8px 4px;
    font-size: 13px;
    text-align: center;
    color: #1A1A1A;
    font-family: 'Inter', system-ui, sans-serif;
    outline: none;
    min-width: 0;
    box-sizing: border-box;
}
.dfc-size-row input:focus { border-color: #2D5A27; }
.dfc-size-sep { font-size: 12px; color: #7A7268; flex-shrink: 0; }
/* Rare toggle */
.dfc-rare-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    cursor: pointer;
}
.dfc-rare-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #1A1A1A;
    font-weight: 500;
}
.dfc-rare-label i { color: #C9A84C; font-size: 11px; }
.dfc-toggle-track {
    width: 36px;
    height: 20px;
    border-radius: 999px;
    background: #E2DDD6;
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
}
.dfc-toggle-track.on { background: #1E3A1E; }
.dfc-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    transition: left 0.2s;
}
.dfc-toggle-track.on .dfc-toggle-thumb { left: 18px; }
/* Clear filters btn */
.dfc-clear-btn {
    width: 100%;
    background: transparent;
    border: 1px solid #E2DDD6;
    border-radius: 9px;
    padding: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #5A5651;
    cursor: pointer;
    font-family: 'Inter', system-ui, sans-serif;
    transition: background 0.15s;
}
.dfc-clear-btn:hover { background: #FAFAF7; }

/* ---- Card Grid ---- */
.dfc-grid-area {}
.dfc-grid-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.dfc-grid-count {
    font-size: 13px;
    color: #7A7268;
}
.dfc-grid-count strong { color: #1A1A1A; font-weight: 600; }
.dfc-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
/* List view override */
.dfc-card-grid.list-view {
    grid-template-columns: 1fr;
}
.dfc-card-grid.list-view .dfc-card { flex-direction: row; }
.dfc-card-grid.list-view .dfc-card-img-wrap {
    width: 110px;
    height: 110px;
    flex-shrink: 0;
    border-radius: 16px 0 0 16px;
}
.dfc-card-grid.list-view .dfc-card-img-wrap img {
    border-radius: 16px 0 0 16px;
}

/* ---- Single beetle card ---- */
.dfc-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #E2DDD6;
    overflow: hidden;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}
.dfc-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(30,58,30,0.13);
    text-decoration: none;
}
.dfc-card-img-wrap {
    position: relative;
    background: #F0EDE8;
}
.dfc-card-img-wrap img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}
.dfc-card-size-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #1E3A1E;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
}
.dfc-card-rare-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #C9A84C;
    color: #1E3A1E;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.dfc-card-body { padding: 14px; }
.dfc-card-name {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 15px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0 0 8px;
    display: block;
}
.dfc-card-locality {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}
.dfc-card-locality i { color: #C9A84C; font-size: 11px; }
.dfc-card-locality span { font-size: 12px; color: #5A5651; }
.dfc-card-country { font-size: 11px; color: #7A7268; margin: 0; }

/* No results */
.dfc-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #7A7268;
    font-size: 14px;
}

/* Load more */
.dfc-load-more-wrap {
    margin-top: 32px;
    text-align: center;
}
.dfc-load-more-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 13px;
    color: #7A7268;
    margin-bottom: 16px;
}
.dfc-load-more-divider::before,
.dfc-load-more-divider::after {
    content: '';
    height: 1px;
    width: 96px;
    background: #E2DDD6;
}
.dfc-load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 12px;
    border: 1px solid #2D5A27;
    background: #fff;
    color: #2D5A27;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', system-ui, sans-serif;
    transition: background 0.15s;
}
.dfc-load-more-btn:hover { background: #F0EDE6; }
.dfc-load-more-btn:disabled { opacity: 0.4; cursor: default; }

/* ---- Map Panel ---- */
.dfc-map-panel {
    position: sticky;
    top: 96px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #E2DDD6;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
    overflow: hidden;
}
.dfc-map-header {
    background: #1E3A1E;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
}
.dfc-map-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.dfc-map-header-left i { color: #C9A84C; font-size: 14px; }
.dfc-map-header-title { color: #fff; font-size: 13px; font-weight: 600; }
.dfc-map-header-pins { color: #9DB89A; font-size: 11px; }
.dfc-map-expand-btn {
    background: transparent;
    border: none;
    color: #C9A84C;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}
/* Override the Leaflet map container height inside the panel */
.dfc-map-panel #mapSection_familyDesktopMap,
.dfc-map-panel #familyDesktopMap {
    height: 440px !important;
    width: 100% !important;
}
.dfc-map-legend {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-top: 1px solid #E2DDD6;
}
.dfc-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #5A5651;
}
.dfc-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.dfc-legend-dot.blue  { background: #3B82F6; }
.dfc-legend-dot.gold  { background: #C9A84C; }

/* ================================================================
   TABLET RESPONSIVE — .website-view / dh-* content (768px–1399px)
   The .phone-home is hidden at these widths; website-view shows.
================================================================ */
@media (min-width: 768px) and (max-width: 1399px) {

    /* Container padding */
    .dh-container { padding: 0 28px; }

    /* ---- Hero ---- */
    .dh-hero-inner {
        grid-template-columns: 1fr;
        padding: 48px 28px 40px;
        gap: 32px;
        max-width: 100%;
    }
    .dh-hero-right { display: none; }  /* hide featured beetle card; hero is text-only */
    .dh-hero-title  { font-size: 40px; }
    .dh-hero-subtitle { max-width: 100%; font-size: 16px; }
    .dh-search-form   { max-width: 100%; }

    /* ---- Quick nav ---- */
    .dh-quick-nav { padding: 0 28px; margin-top: -28px; }
    .dh-quick-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }

    /* ---- Families ---- */
    .dh-families { padding: 40px 0 16px; }
    .dh-family-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }

    /* ---- Map section ---- */
    .dh-map-section { padding: 36px 0 16px; }
    .dh-map-card    { grid-template-columns: 1fr; }
    .dh-map-info    { padding: 28px 28px 24px; }
    .dh-map-visual #desktopMap { height: 360px !important; }

    /* ---- Recently added + about ---- */
    .dh-recent-about { padding: 36px 0 16px; }
    .dh-two-col { grid-template-columns: 1fr; gap: 24px; }
    .dh-recent-grid { grid-template-columns: repeat(2, 1fr); }

    /* ---- Contribute ---- */
    .dh-contribute-section { padding: 32px 0 48px; }
    .dh-contribute-inner {
        flex-direction: column;
        gap: 24px;
        padding: 32px 28px;
        text-align: center;
    }
    .dh-contribute-left { flex-direction: column; gap: 16px; }

    /* ---- Section typography ---- */
    .dh-section-title { font-size: 26px; }
}

/* Small tablet (768px–1023px) — extra tightening */
@media (min-width: 768px) and (max-width: 1023px) {
    .dh-hero-title  { font-size: 32px; }
    .dh-hero-subtitle { font-size: 15px; }
    .dh-quick-grid { gap: 12px; }
    .dh-family-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .dh-recent-grid { gap: 12px; }
    .dh-section-title { font-size: 22px; }
    .dh-map-visual #desktopMap { height: 300px !important; }
}
