/*
Theme Name: WildPhoto Portfolio by Smithographs
Theme URI: https://smithographs.com
Author: Chris Smith
Author URI: https://smithographs.com
Description: A wildlife and nature photography portfolio theme driven by a multi-taxonomy knowledge graph with automated species and place resolution, JSON-LD structured data, and hierarchical galleries.
Version: 2.14.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wildphoto
Tags: photography, portfolio, gallery, wildlife, nature, taxonomy, knowledge-graph, custom-post-types
*/

/* ========================================
   CSS Reset & Base Styles
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fafafa;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: #2c5f4f;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #1a3a2e;
}

/* ========================================
   Layout Structure
   ======================================== */

.site-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: #1a1a1a;
    border-bottom: none;
    padding: 18px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header .site-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Brand lockup — matches splash animation final frame */
.brand-lockup {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}

.brand-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    font-size: 30px;
    color: rgb(240, 224, 192);
    text-transform: lowercase;
    letter-spacing: 0.28em;
    line-height: 1;
}

.brand-divider {
    display: block;
    width: 100%;
    height: 1px;
    background: rgba(232, 213, 176, 0.8);
    margin: 6px 0 5px;
}

.brand-tagline {
    font-family: Georgia, 'Times New Roman', serif;
    font-variant: small-caps;
    font-size: 8.5px;
    letter-spacing: 0.04em;
    line-height: 1;
    white-space: nowrap;
}

.tagline-filler {
    color: rgb(136, 136, 136);
}

.tagline-keyword {
    color: rgb(232, 213, 176);
}

/* Navigation */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    font-family: Georgia, 'Times New Roman', serif;
    font-variant: small-caps;
    font-size: 13px;
    letter-spacing: 0.08em;
    font-weight: 400;
    color: rgb(136, 136, 136);
    transition: color 0.2s;
}

.main-navigation a:hover {
    color: rgb(232, 213, 176);
}

/* Dropdown sub-menus */
.main-navigation ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: column;
    gap: 0;
    background: #1a1a1a;
    min-width: 160px;
    padding: 8px 0;
    border-top: 1px solid rgb(232, 213, 176);
    z-index: 1000;
}

.main-navigation li:hover > ul {
    display: flex;
}

.main-navigation ul ul li {
    position: relative;
}

.main-navigation ul ul a {
    display: block;
    padding: 6px 18px;
    white-space: nowrap;
    font-size: 12px;
}

/* Main Content */
.site-content {
    padding: 60px 0;
    min-height: 60vh;
}

/* Footer */
.site-footer {
    background: #2c2c2c;
    color: #fff;
    padding: 40px 0;
    margin-top: 80px;
    text-align: center;
    font-family: Georgia, 'Times New Roman', serif;
    font-variant: small-caps;
    font-size: 13px;
    letter-spacing: 0.06em;
}

.site-footer a {
    color: #fff;
}

/* ========================================
   Gallery Styles
   ======================================== */

/* Filter container — shared by both layouts */
.gallery-filters {
    background: #fff;
    padding: 20px 24px;
    border-radius: 8px;
    margin-bottom: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ---- Dropdown Bar Layout ---- */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.filter-dropdown {
    position: relative;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    color: #444;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.filter-btn:hover {
    border-color: #2c5f4f;
    color: #2c5f4f;
}

.filter-btn.active {
    border-color: #2c5f4f;
    background: #eaf3f0;
    color: #2c5f4f;
}

.filter-arrow {
    font-size: 10px;
    line-height: 1;
}

.filter-reset-btn {
    border-color: transparent;
    background: #f0f0f0;
    color: #666;
    margin-left: auto;
}

.filter-reset-btn:hover {
    background: #e0e0e0;
    color: #333;
}

/* Dropdown menu panel */
.filter-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 220px;
    max-height: 320px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 500;
    padding: 6px 0;
}

.filter-dropdown.open > .filter-menu {
    display: block;
}

.filter-menu-item {
    padding: 4px 12px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    transition: background 0.15s;
}

.filter-menu-item.depth-0 {
    font-weight: 600;
    padding-top: 6px;
    padding-bottom: 6px;
}

.filter-menu-item:not(.depth-0) {
    color: #666;
    border-left: 2px solid #d0ddd8;
    margin-left: 12px;
    font-weight: 400;
}

.filter-menu-item:hover {
    background: #eaf3f0;
    color: #2c5f4f;
}

/* "More" secondary taxonomy menu */
.filter-more-menu {
    min-width: 240px;
}

.filter-more-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    transition: background 0.15s;
}

.filter-more-item:hover {
    background: #eaf3f0;
    color: #2c5f4f;
}

.filter-submenu {
    display: none;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    background: #fafafa;
    max-height: 240px;
    overflow-y: auto;
}

.filter-submenu.open {
    display: block;
}

/* Active filter pills */
.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0;
}

.filter-pills:not(:empty) {
    margin-top: 12px;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 12px;
    background: #eaf3f0;
    color: #2c5f4f;
    border: 1px solid #c5ddd5;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.filter-pill-label {
    color: #888;
    font-weight: 400;
}

.filter-pill-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: none;
    background: transparent;
    color: #2c5f4f;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    padding: 0;
    transition: background 0.15s;
}

.filter-pill-remove:hover {
    background: rgba(44, 95, 79, 0.15);
}

/* ---- Cascading Tier Submenus ---- */

.cascade-container {
    position: relative;
    min-width: 220px;
}

.cascade-tier {
    display: none;
    min-width: 220px;
    max-height: 320px;
    overflow-y: auto;
    padding: 6px 0;
}

.cascade-tier--active {
    display: block;
}

.cascade-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: #333;
    cursor: default;
    transition: background 0.15s;
}

.cascade-item-label {
    flex: 1;
    padding: 6px 12px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.cascade-item-label:hover {
    background: #eaf3f0;
    color: #2c5f4f;
}

.cascade-item-chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 100%;
    min-height: 32px;
    border: none;
    border-left: 1px solid #eee;
    background: transparent;
    color: #999;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    padding: 0;
    flex-shrink: 0;
}

.cascade-item-chevron:hover {
    background: #f0f0f0;
    color: #2c5f4f;
}

.cascade-item--expanded {
    background: #f5f9f7;
}

.cascade-item--expanded > .cascade-item-label {
    color: #2c5f4f;
    font-weight: 500;
}

.cascade-mobile-header {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

.cascade-back-btn {
    border: none;
    background: transparent;
    color: #2c5f4f;
    font-size: 14px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.15s;
}

.cascade-back-btn:hover {
    background: #eaf3f0;
}

/* Desktop: absolute-positioned child panels */
@media (min-width: 769px) {
    .cascade-container {
        overflow: visible;
    }

    .filter-menu[data-menu-style="cascading"] {
        overflow: visible;
        max-height: none;
    }

    .filter-submenu[data-menu-style="cascading"] {
        overflow: visible;
        max-height: none;
    }

    .cascade-tier:not([data-parent-slug="__root__"]) {
        position: absolute;
        top: 0;
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 8px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.12);
        z-index: 510;
    }

    .cascade-tier--flip:not([data-parent-slug="__root__"]) {
        /* JS sets left dynamically; this class signals rightward overflow was detected */
    }
}

/* Mobile: in-place navigation */
@media (max-width: 768px) {
    .cascade-container.cascade--navigated .cascade-mobile-header {
        display: flex;
    }

    .cascade-item-chevron {
        width: 40px;
        min-height: 40px;
        font-size: 14px;
    }

    /* Slide transitions */
    .cascade-tier {
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .cascade-tier.cascade-tier--slide-out-left {
        transform: translateX(-100%);
        opacity: 0;
    }

    .cascade-tier.cascade-tier--slide-in-right {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ---- Classic Form Layout (fallback / grouped) ---- */

.filter-group {
    margin-bottom: 25px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #555;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}

.filter-group select {
    width: 100%;
    max-width: 400px;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.filter-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-apply {
    background: #2c5f4f;
    color: #fff;
}

.btn-apply:hover {
    background: #1a3a2e;
}

.btn-reset {
    background: #f0f0f0;
    color: #333;
}

.btn-reset:hover {
    background: #e0e0e0;
}

/* Gallery Grid */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.gallery-item-info {
    padding: 15px;
}

.gallery-item-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

.gallery-item-meta {
    font-size: 12px;
    color: #888;
}

/* Taxonomy breadcrumbs */
.taxonomy-breadcrumbs {
    padding: 20px 0;
    font-size: 14px;
    color: #666;
}

.taxonomy-breadcrumbs a {
    color: #2c5f4f;
}

.taxonomy-breadcrumbs span {
    margin: 0 8px;
}

/* ========================================
   Lightbox Styles
   ======================================== */

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: calc(100vh - 180px);
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    background: none;
    border: none;
    width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    transition: opacity 0.3s;
}

.lightbox-close:hover {
    opacity: 0.7;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 60px;
    color: #fff;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.6);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Lightbox bottom bar: filmstrip + caption stacked */
.lightbox-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.85);
}

.lightbox-caption {
    padding: 8px 20px;
    text-align: center;
    color: #fff;
    width: 100%;
}

.lightbox-title {
    font-size: 16px;
    margin-bottom: 2px;
}

.lightbox-meta {
    font-size: 13px;
    color: #ccc;
}

/* Lightbox Filmstrip */
.lightbox-filmstrip {
    width: 100%;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 6px 80px 0;
}

.lightbox-filmstrip-track {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 5px 0;
    max-width: 100%;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.lightbox-filmstrip-track::-webkit-scrollbar {
    display: none;
}

.lightbox-filmstrip-thumb {
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.5;
    transition: opacity 0.2s, border-color 0.2s, transform 0.2s;
}

.lightbox-filmstrip-thumb:hover {
    opacity: 0.8;
}

.lightbox-filmstrip-thumb.active {
    border-color: #fff;
    opacity: 1;
    transform: scale(1.08);
}

.lightbox-filmstrip-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ========================================
   Inline Gallery (Blog Embeds)
   ======================================== */

.inline-gallery {
    margin: 30px 0;
    background: #111;
    border-radius: 8px;
    overflow: hidden;
}

.inline-gallery-viewport {
    position: relative;
    width: 100%;
    padding-bottom: 66.67%; /* 3:2 aspect ratio bounding box */
    background: #111;
}

.inline-gallery-viewport .inline-gallery-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.inline-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    color: #fff;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s, background 0.3s;
}

.inline-gallery:hover .inline-gallery-nav {
    opacity: 1;
}

.inline-gallery-nav:hover {
    background: rgba(0, 0, 0, 0.6);
}

.inline-gallery-prev {
    left: 12px;
}

.inline-gallery-next {
    right: 12px;
}

.inline-gallery-counter {
    position: absolute;
    top: 10px;
    right: 12px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.3s;
}

.inline-gallery:hover .inline-gallery-counter {
    opacity: 1;
}

.inline-gallery-filmstrip {
    padding: 8px 12px;
    overflow: hidden;
}

.inline-gallery-filmstrip-track {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.inline-gallery-filmstrip-track::-webkit-scrollbar {
    display: none;
}

.inline-gallery-thumb {
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.5;
    transition: opacity 0.2s, border-color 0.2s;
}

.inline-gallery-thumb:hover {
    opacity: 0.8;
}

.inline-gallery-thumb.active {
    border-color: #fff;
    opacity: 1;
}

.inline-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.inline-gallery-caption {
    padding: 10px 14px;
    color: #ccc;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 14px;
}

.inline-gallery-title {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}

.inline-gallery-title:hover {
    text-decoration: underline;
}

.inline-gallery-meta {
    color: #999;
    font-size: 13px;
}

/* ========================================
   Archive/Taxonomy Pages
   ======================================== */

.archive-header {
    text-align: center;
    margin-bottom: 60px;
}

.archive-title {
    font-size: 36px;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 15px;
    color: #333;
}

.archive-description {
    font-size: 16px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Child taxonomy links */
.taxonomy-children {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.taxonomy-child-item {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.taxonomy-child-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.taxonomy-child-item h3 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 8px;
}

.taxonomy-child-item .count {
    font-size: 14px;
    color: #888;
}

/* ========================================
   Gallery (Curated) Styles
   ======================================== */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.gallery-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #fff;
    text-decoration: none;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    color: #fff;
}

.gallery-card-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.gallery-card-placeholder {
    width: 100%;
    height: 300px;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-card-placeholder .dashicons {
    font-size: 60px;
    width: 60px;
    height: 60px;
    color: #999;
}

.gallery-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
}

.gallery-card-title {
    font-size: 18px;
    font-weight: 500;
}

.gallery-card-count {
    font-size: 13px;
    opacity: 0.85;
}

.section-title {
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 1px;
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
    color: #333;
}

.gallery-children {
    margin-bottom: 20px;
}

/* ========================================
   Single Photo Page
   ======================================== */

.single-photo-content {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.single-photo-image {
    margin-bottom: 30px;
    text-align: center;
}

.single-photo-image img {
    margin: 0 auto;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.photo-details {
    max-width: 800px;
    margin: 0 auto;
}

.photo-title {
    font-size: 28px;
    font-weight: 300;
    margin-bottom: 20px;
    color: #333;
}

.photo-taxonomies {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.photo-taxonomy-group h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: 10px;
}

.photo-taxonomy-group ul {
    list-style: none;
}

.photo-taxonomy-group li {
    margin-bottom: 5px;
}

.photo-taxonomy-group a {
    font-size: 14px;
}

/* ========================================
   Blog Styles
   ======================================== */

.blog-posts {
    max-width: 900px;
    margin: 0 auto;
}

.blog-post {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 40px;
}

.blog-post h2 {
    font-size: 28px;
    margin-bottom: 15px;
}

.blog-post-meta {
    color: #888;
    font-size: 14px;
    margin-bottom: 20px;
}

.blog-post-excerpt {
    line-height: 1.8;
    margin-bottom: 20px;
}

.read-more {
    display: inline-block;
    padding: 8px 20px;
    background: #2c5f4f;
    color: #fff;
    border-radius: 4px;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}

.read-more:hover {
    background: #1a3a2e;
    color: #fff;
}

.blog-post .entry-content p {
    margin-bottom: 1.4em;
}

.blog-post .entry-content p:last-child {
    margin-bottom: 0;
}

.blog-post .entry-content h2,
.blog-post .entry-content h3 {
    margin-top: 0.8em;
    margin-bottom: 0.8em;
}

.blog-post .entry-content pre.wp-block-code,
.blog-post .entry-content pre {
    background: #f5f5f5 !important;
    padding: 24px 20px !important;
    margin: 24px 0 !important;
    border-radius: 4px !important;
    overflow-x: auto !important;
    line-height: 1.6 !important;
}

.blog-post .entry-content pre.wp-block-code code,
.blog-post .entry-content pre code {
    font-size: 13px !important;
    font-family: 'SF Mono', 'Menlo', 'Consolas', monospace !important;
    color: #333 !important;
}

/* ========================================
   Homepage Carousel
   ======================================== */

.homepage {
    padding: 0;
}

.homepage-carousel {
    position: relative;
    background: #111;
    height: 45vh;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    position: relative;
}

.carousel-slide {
    position: absolute;
    transition: transform 1.2s ease, opacity 1.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
}

.carousel-slide.slide-center {
    transform: scale(1);
    opacity: 1;
    z-index: 2;
}

.carousel-slide.slide-left,
.carousel-slide.slide-right {
    transform: scale(0.75);
    opacity: 0.5;
    z-index: 1;
}

.carousel-slide.slide-left {
    transform: translateX(-55vw) scale(0.75);
}

.carousel-slide.slide-right {
    transform: translateX(55vw) scale(0.75);
}

.carousel-slide.slide-hidden {
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    transform: scale(0.6);
}

/* Center slide: preserve actual aspect ratio */
.carousel-slide.slide-center img {
    object-fit: contain;
    max-height: calc(45vh - 20px);
    max-width: 60vw;
    height: auto;
    width: auto;
}

/* Side slides: uniform crop for visual consistency */
.carousel-slide.slide-left img,
.carousel-slide.slide-right img {
    object-fit: cover;
    width: 20vw;
    height: calc(45vh * 0.8);
    border-radius: 4px;
}

/* Caption overlay — center slide only */
.slide-caption {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    text-align: center;
    padding: 24px 16px 12px;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.carousel-slide.slide-center .slide-caption {
    opacity: 1;
}

.slide-caption a {
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-decoration: none;
}

.slide-caption a:hover {
    color: rgb(232, 213, 176);
}

/* Carousel navigation arrows */
.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0,0,0,0.4);
    color: #fff;
    border: none;
    font-size: 36px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.homepage-carousel:hover .carousel-prev,
.homepage-carousel:hover .carousel-next {
    opacity: 1;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(0,0,0,0.7);
}

.carousel-prev {
    left: 16px;
}

.carousel-next {
    right: 16px;
}

/* Carousel dots */
.carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 8px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.3s ease, transform 0.3s ease;
}

.carousel-dot.active {
    background: #fff;
    transform: scale(1.3);
}

/* ========================================
   Homepage About Section
   ======================================== */

.homepage-about {
    padding: 3rem 0;
}

.homepage-about .site-wrapper {
    max-width: 800px;
}

.homepage-about h2 {
    text-align: center;
    font-size: 28px;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    color: #333;
}

.homepage-about p {
    line-height: 1.8;
    font-size: 16px;
    color: #555;
    margin-bottom: 1em;
}

.homepage-about-link {
    text-align: center;
    margin-top: 1.5rem;
}

.homepage-about-link a {
    font-family: Georgia, 'Times New Roman', serif;
    font-variant: small-caps;
    font-size: 14px;
    letter-spacing: 0.06em;
    color: #2c5f4f;
}

.homepage-about-link a:hover {
    color: #1a3a2e;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .homepage-carousel {
        height: 35vh;
    }

    .carousel-slide.slide-center img {
        max-height: calc(35vh - 20px);
        max-width: 85vw;
    }

    .carousel-slide.slide-left,
    .carousel-slide.slide-right {
        display: none;
    }

    .carousel-prev,
    .carousel-next {
        display: none;
    }

    .site-header .site-wrapper {
        flex-direction: column;
        gap: 16px;
    }

    .brand-name {
        font-size: 22px;
    }

    .brand-tagline {
        font-size: 6.3px;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .main-navigation ul ul {
        position: static;
        transform: none;
        border-top: none;
        padding: 4px 0 0;
        min-width: 0;
        background: transparent;
    }

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

    .gallery-item img {
        height: 250px;
    }

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

    .gallery-card-image img,
    .gallery-card-placeholder {
        height: 250px;
    }

    .lightbox-nav {
        width: 50px;
        height: 50px;
        font-size: 40px;
    }

    .archive-title {
        font-size: 28px;
    }

    /* Lightbox filmstrip mobile */
    .lightbox-filmstrip {
        padding: 0 20px;
    }

    .lightbox-filmstrip-thumb {
        flex: 0 0 45px;
        width: 45px;
        height: 45px;
    }

    /* Inline gallery mobile */
    .inline-gallery-nav {
        width: 36px;
        height: 36px;
        font-size: 30px;
        opacity: 1;
    }

    .inline-gallery-counter {
        opacity: 1;
    }

    .inline-gallery-thumb {
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
    }

    .inline-gallery-caption {
        flex-direction: column;
        gap: 2px;
    }
}

/* ========================================
   Copyright Protection
   ======================================== */

.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.photo-gallery img,
.single-photo-image img,
.lightbox-image,
.gallery-card img {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: none;
}

.photo-copyright {
    font-size: 12px;
    color: #888;
    margin-top: 20px;
    text-align: center;
}

/* IUCN conservation status badge */
.iucn-status {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.6;
}
.iucn-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.5px;
    vertical-align: middle;
    margin-right: 4px;
}
.iucn-detail {
    color: #999;
    font-size: 12px;
}
