/* Nature-Inspired Design for H.E. Hervey Website */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.6;
    color: #2d3748;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 50%, #e2e8f0 100%);
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 300;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    color: #1a365d;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h2 {
    font-size: 1.8rem;
    color: #2d5016;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.3rem;
    color: #4a5568;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.2rem;
    color: #4a5568;
    font-size: 1.1rem;
}

/* Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
.header {
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    box-shadow: 0 4px 20px rgba(45, 80, 22, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid #68d391;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 400;
    color: #1a365d;
    text-decoration: none;
    font-family: 'Georgia', serif;
    letter-spacing: 1px;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #5d6d7e;
    text-decoration: none;
    font-weight: 300;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.nav-link:hover {
    color: #2c3e50;
    background-color: #f8f9fa;
}

.nav-link.active {
    color: #2c3e50;
    background-color: #e9ecef;
}

/* Main Content */
.main-content {
    padding: 3rem 0;
    min-height: calc(100vh - 200px);
}

.hero {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-bottom: 3rem;
}

.hero h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.3rem;
    max-width: 600px;
    margin: 0 auto;
    color: rgba(255,255,255,0.9);
}

/* Grid System */
.grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.card p {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.card-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
}

.card-link:hover {
    color: #5a6fd8;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

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

.gallery-item:hover {
    transform: translateY(-2px);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

.gallery-item-content {
    padding: 1.5rem;
}

.gallery-item h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.gallery-item p {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Sections */
.section {
    margin-bottom: 4rem;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: #667eea;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 400;
    text-align: center;
    border: 2px solid #667eea;
}

.btn:hover {
    background: #5a6fd8;
    border-color: #5a6fd8;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
}

.btn-outline {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 400;
    text-align: center;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 0;
}

/* Modal/Lightbox */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    max-width: 90%;
    max-height: 80vh;
    position: relative;
    background: white;
    border-radius: 8px;
    padding: 2rem;
    overflow: auto;
    margin: auto;
    display: flex;
    flex-direction: column;
}

.modal-content h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    text-align: center;
}

.modal-image-container {
    position: relative;
    max-height: 50vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.modal-image {
    display: none;
    text-align: center;
    width: 100%;
}

.modal-image.active {
    display: block;
}

.modal-image img {
    max-width: 100%;
    max-height: 50vh;
    object-fit: contain;
    border-radius: 4px;
    margin: 0 auto;
}

.modal-dots {
    text-align: center;
    margin: 1rem 0;
    flex-shrink: 0;
}

.modal-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    margin: 0 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.modal-dot.active {
    background: #667eea;
}

.modal-nav {
    text-align: center;
    margin-top: 1rem;
    flex-shrink: 0;
}

.modal-nav button {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.modal-nav button:hover {
    background: #5a6fd8;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #2c3e50;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    background: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.modal-close:hover {
    background: #f8f9fa;
}

/* Gallery item cursor */
.gallery-item {
    cursor: pointer;
}

.gallery-item .image-count {
    color: #68d391;
    font-size: 0.8em;
    font-weight: 400;
    margin-left: 0.5rem;
}

/* Full resolution modal */
.full-resolution-modal {
    background: rgba(0,0,0,0.95);
}

.full-resolution-content {
    max-width: 95%;
    max-height: 95%;
    background: transparent;
    padding: 0;
    position: relative;
}

.full-image-container {
    position: relative;
    overflow: auto;
    max-height: 90vh;
    max-width: 90vw;
    background: #000;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.full-resolution-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    cursor: grab;
    transition: transform 0.3s ease;
    object-fit: contain;
}

.full-resolution-image:active {
    cursor: grabbing;
}

.full-image-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    padding: 10px;
    border-radius: 20px;
    display: flex;
    gap: 10px;
}

.full-image-controls button {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.full-image-controls button:hover {
    background: #5a6fd8;
}

.modal-instructions {
    text-align: center;
    margin-top: 1rem;
    color: #6c757d;
}

.modal-instructions small {
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Pagination */
.pagination-controls {
    margin-top: 2rem;
    text-align: center;
}

.pagination-info {
    margin-bottom: 1rem;
    color: #6c757d;
}

.pagination-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #dee2e6;
    background: white;
    color: #667eea;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.pagination-btn:hover:not(:disabled) {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Hero Section with Artwork */
.hero {
    background: linear-gradient(135deg, #68d391 0%, #38a169 30%, #2f855a 100%);
    color: white;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="10" cy="10" r="1" fill="white" opacity="0.1"/><circle cx="30" cy="25" r="1.5" fill="white" opacity="0.1"/><circle cx="60" cy="15" r="1" fill="white" opacity="0.1"/><circle cx="80" cy="35" r="1.5" fill="white" opacity="0.1"/><circle cx="20" cy="50" r="1" fill="white" opacity="0.1"/><circle cx="70" cy="60" r="1.5" fill="white" opacity="0.1"/><circle cx="40" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="90" cy="80" r="1.5" fill="white" opacity="0.1"/></svg>') repeat;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text {
    text-align: left;
}

.hero h1 {
    color: white;
    font-size: 3rem;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
    margin-bottom: 1rem;
    text-align: left;
}

.hero-subtitle {
    font-size: 1.4rem;
    color: #f0fff4;
    margin-bottom: 1rem;
    font-weight: 300;
}

.hero-description {
    font-size: 1.1rem;
    color: #f0fff4;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.btn-hero {
    display: inline-block;
    background: white;
    color: #2f855a;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    background: #f7fafc;
}

.hero-gallery {
    display: flex;
    justify-content: center;
    align-items: center;
}

.featured-artwork {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    max-width: 400px;
}

.artwork-preview {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    transition: all 0.3s ease, opacity 0.5s ease;
    border: 3px solid white;
    cursor: pointer;
}

.artwork-preview:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 35px rgba(0,0,0,0.4);
}

.artwork-preview:nth-child(3) {
    grid-column: 1 / -1;
    height: 100px;
}

/* Featured Cards with Images */
.featured-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: white;
    overflow: hidden;
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(45, 80, 22, 0.15);
    border-color: #68d391;
}

.card-image {
    height: 200px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    background: #f7fafc;
}

.collection-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.5s ease;
    cursor: pointer;
}

.featured-card:hover .collection-preview {
    transform: scale(1.1);
}

/* Enhanced Cards */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(45, 80, 22, 0.08);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 25px rgba(45, 80, 22, 0.12);
    transform: translateY(-2px);
}

/* Enhanced Buttons */
.btn-outline {
    border: 2px solid #68d391;
    color: #2f855a;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: #68d391;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(104, 211, 145, 0.3);
}

.btn {
    background: linear-gradient(135deg, #68d391 0%, #38a169 100%);
    color: white;
    transition: all 0.3s ease;
}

.btn:hover {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(56, 161, 105, 0.3);
}

/* Section Titles */
.section-title {
    text-align: center;
    color: #1a365d;
    font-size: 2.2rem;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #68d391, #38a169);
    border-radius: 2px;
}

/* Responsive Hero */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-text {
        text-align: center;
    }
    
    .hero h1 {
        font-size: 2.2rem;
        text-align: center;
    }
    
    .featured-artwork {
        grid-template-columns: 1fr;
        max-width: 250px;
    }
    
    .artwork-preview:nth-child(3) {
        grid-column: 1;
    }
}

.page-numbers {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.page-ellipsis {
    color: #6c757d;
    padding: 0 0.5rem;
}

.gallery-item.hidden {
    display: none;
}

/* Modal Thumbnails */
.modal-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
    max-height: 50vh;
    overflow-y: auto;
    padding: 0.5rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
    scroll-behavior: smooth;
    align-items: start;
    grid-auto-rows: min-content;
}

/* Custom scrollbar styling for thumbnails */
.modal-thumbnails::-webkit-scrollbar {
    width: 8px;
}

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

.modal-thumbnails::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.modal-thumbnails::-webkit-scrollbar-thumb:hover {
    background: #5a67d8;
}

.modal-thumbnail {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 100%;
    display: flex;
    flex-direction: column;
}

.modal-thumbnail:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.modal-thumbnail img {
    width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: contain;
    display: block;
    border-radius: 8px;
}

.modal-thumbnail-info {
    padding: 0.5rem;
    text-align: center;
}

.modal-thumbnail-info small {
    color: #6c757d;
    font-size: 0.8rem;
}

/* Full Size Image Modal Enhancements */
.full-resolution-modal .modal-content {
    width: 95vw;
    height: 95vh;
    max-width: none;
    max-height: none;
    padding: 1rem;
}

.full-image-container {
    position: relative;
    width: 100%;
    height: calc(100% - 60px);
    background: #000;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.full-resolution-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: grab;
    transition: transform 0.3s ease;
}

.full-resolution-image:active {
    cursor: grabbing;
}

.full-image-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    padding: 10px;
    border-radius: 25px;
    display: flex;
    gap: 10px;
    z-index: 1002;
}

.full-image-controls button {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.full-image-controls button:hover {
    background: #5a6fd8;
}

.full-image-controls button:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.image-info {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 1002;
}

/* Modal Responsiveness */
@media (max-width: 768px) {
    .modal-thumbnails {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.5rem;
        max-height: 40vh;
        padding: 0.25rem;
        align-items: start;
        grid-auto-rows: min-content;
    }
    
    .modal-thumbnail img {
        height: auto;
        max-height: 120px;
    }
    
    .full-image-controls {
        flex-wrap: wrap;
        gap: 5px;
        padding: 8px;
    }
    
    .full-image-controls button {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .full-resolution-modal .modal-content {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.p-1 { padding: 1rem; }
.p-2 { padding: 2rem; }
.p-3 { padding: 3rem; }

/* Search Container Styles */
.search-container {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 15px rgba(45, 80, 22, 0.08);
    border: 1px solid #e2e8f0;
}

.search-section {
    margin-bottom: 2rem;
}

.search-section h3 {
    color: #1a365d;
    margin-bottom: 1rem;
    text-align: center;
}

.search-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #68d391;
    box-shadow: 0 0 0 3px rgba(104, 211, 145, 0.1);
}

.search-clear {
    padding: 0.8rem 1.5rem;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    color: #2d3748;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-clear:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

/* Animal grid styles removed - no longer needed */

/* View Toggle Styles */
.view-toggle-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(45, 80, 22, 0.08);
    border: 1px solid #e2e8f0;
}

.view-toggle-section h3 {
    color: #1a365d;
    margin-bottom: 1rem;
}

.view-toggle-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.view-btn {
    padding: 0.8rem 1.5rem;
    border: 2px solid #68d391;
    background: white;
    color: #2f855a;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.view-btn:hover {
    background: #f0fff4;
}

.view-btn.active {
    background: #68d391;
    color: white;
}

/* Animal Section Styles */
.animal-section {
    margin-bottom: 3rem;
}

.animal-section .section-title {
    font-size: 1.8rem;
    color: #2d5016;
    margin-bottom: 1rem;
}

/* Gallery View Container */
.gallery-view {
    transition: opacity 0.3s ease;
}

.gallery-view.fade-out {
    opacity: 0;
}

/* Search Results Styles */
.gallery-item.hidden {
    display: none !important;
}

.search-results-info {
    background: #f0fff4;
    border: 1px solid #68d391;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #2d5016;
}

.no-results {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    color: #c53030;
}

/* Quick Navigation Styles */
.quick-nav-container {
    margin-bottom: 2rem;
}

.quick-nav-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(45, 80, 22, 0.08);
    border: 1px solid #e2e8f0;
}

.quick-nav-section h3 {
    margin-bottom: 1rem;
    color: #2d5016;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quick-nav-toggle {
    background: #68d391;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.quick-nav-toggle:hover {
    background: #48bb78;
}

.quick-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.quick-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    background: #f7fafc;
    color: #4a5568;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    text-align: center;
    font-size: 0.95rem;
    min-height: 48px; /* Ensure good click target size */
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-nav-link:hover {
    background: #68d391;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(104, 211, 145, 0.3);
}

/* Mobile Quick Navigation */
@media (max-width: 768px) {
    .quick-nav-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.5rem;
    }
    
    .quick-nav-link {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
        min-height: 44px; /* Good mobile touch target */
    }
}

/* Sticky Navigation */
.sticky-nav {
    position: fixed;
    top: 100px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 50;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    overflow: hidden;
}

.sticky-nav.collapsed {
    width: 60px;
    height: 60px;
    padding: 0;
}

.sticky-nav.expanded {
    max-width: 200px;
    max-height: 60vh;
    padding: 1rem;
    overflow-y: auto;
}

.sticky-nav-toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #68d391;
    border-radius: 12px;
    transition: background 0.3s ease;
    touch-action: manipulation; /* Better touch handling */
}

.sticky-nav-toggle:hover {
    background: #38a169;
}

.nav-toggle-icon {
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    pointer-events: none; /* Ensures clicks go to parent */
}

.sticky-nav-content {
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    padding-right: 60px;
}

.sticky-nav.expanded .sticky-nav-content {
    opacity: 1;
    transform: translateX(0);
}

.sticky-nav h4 {
    color: #2d3748;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    margin-top: 0;
}

.sticky-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sticky-nav li {
    margin-bottom: 0.25rem;
}

.sticky-nav a {
    color: #68d391;
    text-decoration: none;
    font-size: 0.8rem;
    display: block;
    padding: 0.25rem 0;
    transition: color 0.3s ease;
}

.sticky-nav a:hover {
    color: #38a169;
}

/* Responsive Search */
@media (max-width: 768px) {
    .search-container {
        padding: 1rem;
        margin-bottom: 2rem;
    }
    
    .search-controls {
        flex-direction: column;
        gap: 0.5rem;
        max-width: 100%;
    }
    
    .search-input {
        width: 100%;
        padding: 0.75rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .search-clear {
        padding: 0.75rem 1rem;
        width: 100%;
        max-width: 150px;
        margin: 0 auto;
    }
    
    .view-toggle-section {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .view-toggle-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .view-btn {
        width: 100%;
        max-width: 250px;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .animal-section .section-title {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .sticky-nav {
        display: none; /* Hide on mobile */
    }
}

/* Extra small phones */
@media (max-width: 480px) {
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .gallery-item img {
        height: 180px;
    }
    
    .search-input {
        padding: 0.6rem;
    }
    
    .view-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Landscape phones */
@media (max-width: 768px) and (orientation: landscape) {
    
    .search-container {
        margin-bottom: 1.5rem;
    }
    
    .view-toggle-section {
        margin-bottom: 1rem;
    }
}

/* Touch-friendly mobile optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    
    .view-btn {
        min-height: 44px;
    }
    
    .search-clear {
        min-height: 44px;
    }
    
    .gallery-item {
        padding-bottom: 0.5rem;
    }
    
    /* Reduce hover states that don't work on touch */
    
    .gallery-item:hover {
        transform: none;
    }
}