/* Gallery Page Specific Styles */

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #000 0%, #2a2a2a 100%);
    color: #FFD700;
    padding: 70px 20px;
    text-align: center;
}

.hero h1 {
    font-size: 56px;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 20px;
    color: #FFF;
}

/* Content Container */
.content-container {
    max-width: 1600px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Filters Bar */
.filters-bar {
    background-color: #1a1a1a;
    padding: 25px 30px;
    margin-bottom: 40px;
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

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

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-label {
    color: #FFD700;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select {
    padding: 10px 12px;
    font-size: 15px;
    background-color: #2a2a2a;
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 5px;
    color: #e0e0e0;
    font-family: 'Georgia', serif;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-select:focus {
    outline: none;
    border-color: #FFD700;
    background-color: #333;
}

.filter-select:hover {
    border-color: rgba(255, 215, 0, 0.6);
}

.filter-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
}

.filter-button {
    padding: 10px 25px;
    font-size: 14px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Georgia', serif;
}

.apply-filter {
    background-color: #FFD700;
    color: #000;
}

.apply-filter:hover {
    background-color: #FFF;
    transform: scale(1.05);
}

.clear-filter {
    background-color: transparent;
    color: #e0e0e0;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.clear-filter:hover {
    background-color: #2a2a2a;
    border-color: rgba(255, 215, 0, 0.6);
    transform: scale(1.05);
}

.results-info {
    text-align: center;
    color: #c0c0c0;
    font-size: 16px;
    margin-bottom: 30px;
    padding: 12px;
    background-color: transparent;
}

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

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
    border: 1px solid rgba(255, 215, 0, 0.3);
    transition: all 0.3s;
    background-color: #1a1a1a;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
    border-color: #FFD700;
}

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

.gallery-item img.loaded {
    opacity: 1;
}

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

.gallery-title {
    color: #FFD700;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 40px 0;
}

.page-button {
    background-color: #FFD700;
    color: #000;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Georgia', serif;
}

.page-button:hover:not(:disabled) {
    background-color: #FFF;
    transform: scale(1.05);
}

.page-button:disabled {
    background-color: #555;
    color: #888;
    cursor: not-allowed;
}

.page-info {
    color: #FFD700;
    font-size: 18px;
    font-weight: bold;
}

/* Photo Viewer */
.photo-viewer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.98);
    z-index: 3000;
}

.photo-viewer.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: #FFD700;
    color: #000;
    border: none;
    width: 50px;
    height: 50px;
    font-size: 32px;
    font-weight: bold;
    border-radius: 50%;
    cursor: pointer;
    z-index: 3001;
    transition: all 0.3s;
}

.viewer-close:hover {
    background-color: #FFF;
    transform: scale(1.1);
}

.viewer-main {
    display: flex;
    gap: 20px;
    width: 95%;
    height: 95%;
    max-width: 1800px;
}

.viewer-image-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.viewer-image-container {
    background-color: #000;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid #FFD700;
}

.viewer-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

.viewer-image.zoomed {
    cursor: move;
}

.viewer-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    background-color: #2a2a2a;
    padding: 15px;
    border-radius: 50px;
}

.control-btn {
    background-color: #FFD700;
    color: #000;
    border: none;
    width: 45px;
    height: 45px;
    font-size: 20px;
    font-weight: bold;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.control-btn:hover {
    background-color: #FFF;
    transform: scale(1.1);
}

.zoom-display {
    background-color: #333;
    color: #FFD700;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
    min-width: 80px;
    text-align: center;
}

.view-selector {
    margin-top: 20px;
    background-color: #2a2a2a;
    padding: 15px;
    border-radius: 8px;
}

.view-label {
    color: #FFD700;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
}

.view-thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.view-thumb {
    width: 80px;
    height: 80px;
    border: 3px solid #555;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    object-fit: cover;
}

.view-thumb:hover {
    border-color: #FFD700;
    transform: scale(1.05);
}

.view-thumb.active {
    border-color: #FFD700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.viewer-sidebar {
    width: 350px;
    background-color: #2a2a2a;
    padding: 30px;
    border: 2px solid #FFD700;
    border-radius: 8px;
    overflow-y: auto;
}

.viewer-title {
    color: #FFD700;
    font-size: 28px;
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.3;
}

.viewer-meta {
    margin-bottom: 25px;
}

.meta-row {
    color: #e0e0e0;
    font-size: 16px;
    margin-bottom: 10px;
}

.meta-row strong {
    color: #FFD700;
}

.viewer-description {
    color: #e0e0e0;
    font-size: 16px;
    line-height: 1.8;
    margin-top: 15px;
}

/* Tutorial Modal */
.tutorial-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 3001;
    justify-content: center;
    align-items: center;
}

.tutorial-content {
    background-color: #2a2a2a;
    border: 3px solid #FFD700;
    border-radius: 12px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.tutorial-title {
    color: #FFD700;
    font-size: 32px;
    margin-bottom: 30px;
    text-align: center;
    font-weight: bold;
}

.tutorial-section {
    margin-bottom: 30px;
}

.tutorial-section h3 {
    color: #FFD700;
    font-size: 22px;
    margin-bottom: 15px;
    font-weight: bold;
}

.tutorial-section p {
    color: #e0e0e0;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.tutorial-section p strong {
    color: #FFF;
    font-weight: bold;
}

.tutorial-section .symbol {
    font-size: 24px;
    font-weight: 900;
    color: #FFD700;
}

.tutorial-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 35px;
    padding-top: 25px;
    border-top: 2px solid #FFD700;
}

.tutorial-checkbox {
    color: #e0e0e0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.tutorial-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #FFD700;
}

.tutorial-btn {
    background-color: #FFD700;
    color: #000;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Georgia', serif;
}

.tutorial-btn:hover {
    background-color: #FFF;
    transform: scale(1.05);
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .filter-row {
        grid-template-columns: 1fr;
    }

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

    .viewer-main {
        flex-direction: column;
        width: 100%;
        height: 100%;
        gap: 0;
    }

    .viewer-image-wrapper {
        flex: 1;
        min-height: 0;
    }

    .viewer-controls {
        margin-bottom: 15px;
    }

    .viewer-sidebar {
        width: 100%;
        max-height: none;
        height: auto;
        padding: 20px;
        border-top: 3px solid #FFD700;
        border-left: none;
        border-right: none;
        border-bottom: none;
        border-radius: 0;
        overflow-y: visible;
    }

    .viewer-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        font-size: 24px;
        flex-shrink: 0;
    }

    .control-btn {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .viewer-title {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .viewer-meta {
        margin-bottom: 12px;
    }

    .meta-row {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .viewer-description {
        font-size: 14px;
        line-height: 1.6;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 38px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .viewer-controls {
        padding: 10px;
        gap: 8px;
    }

    .zoom-display {
        min-width: 60px;
        font-size: 14px;
        padding: 8px 15px;
    }

    .tutorial-content {
        padding: 25px;
        width: 95%;
    }

    .tutorial-title {
        font-size: 26px;
    }

    .tutorial-section h3 {
        font-size: 20px;
    }
}

/* Help Identify Banner */
.help-identify-banner {
    background: linear-gradient(135deg, #8B0000 0%, #DC143C 100%);
    border: 3px solid #FFD700;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    box-shadow: 0 5px 20px rgba(220, 20, 60, 0.4);
}

.banner-icon {
    font-size: 48px;
}

.help-identify-banner h3 {
    color: #FFD700;
    font-size: 22px;
    margin: 0;
    font-weight: bold;
}

.help-identify-banner p {
    color: #FFF;
    font-size: 15px;
    line-height: 1.6;
    margin: 5px 0 10px 0;
}

.help-button {
    background-color: #FFD700;
    color: #000;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Georgia', serif;
}

.help-button:hover {
    background-color: #FFF;
    transform: scale(1.05);
}

/* Viewer Details (collapsible on all screens) */
.viewer-details {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.viewer-details.expanded {
    max-height: 500px;
    opacity: 1;
    padding-top: 15px;
    margin-top: 15px;
    border-top: 2px solid #FFD700;
}

.description-toggle {
    display: block;
    background-color: #FFD700;
    color: #000;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 15px;
    width: 100%;
    transition: all 0.3s;
    font-family: 'Georgia', serif;
}

.description-toggle:hover {
    background-color: #FFF;
}

/* Identify Modal */
.identify-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 3002;
    justify-content: center;
    align-items: center;
}

.identify-modal-content {
    background-color: #2a2a2a;
    border: 3px solid #FFD700;
    border-radius: 12px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.identify-modal-content h2 {
    color: #FFD700;
    font-size: 32px;
    margin-bottom: 15px;
    text-align: center;
    font-weight: bold;
}

.modal-subtitle {
    color: #DC143C;
    font-size: 18px;
    text-align: center;
    margin-bottom: 30px;
    font-weight: bold;
}

.identify-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #FFD700;
    color: #000;
    border: none;
    width: 35px;
    height: 35px;
    font-size: 24px;
    font-weight: bold;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    line-height: 1;
    padding: 0;
}

.identify-close:hover {
    background-color: #FFF;
    transform: scale(1.1);
}

.form-group {
    margin-bottom: 20px;
}

.identify-modal-content label {
    color: #FFD700;
    font-size: 16px;
    font-weight: bold;
    display: block;
    margin-bottom: 8px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.detail-inputs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.detail-inputs input {
    padding: 10px;
}

.identify-modal-content textarea,
.identify-modal-content input[type="text"],
.identify-modal-content input[type="email"] {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    background-color: #1a1a1a;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 5px;
    color: #e0e0e0;
    font-family: 'Georgia', serif;
    box-sizing: border-box;
}

.identify-modal-content textarea {
    min-height: 120px;
    resize: vertical;
}

.identify-modal-content textarea:focus,
.identify-modal-content input:focus {
    outline: none;
    border-color: #FFD700;
    background-color: #2a2a2a;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.submit-btn,
.cancel-btn {
    flex: 1;
    padding: 15px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Georgia', serif;
}

.submit-btn {
    background-color: #FFD700;
    color: #000;
}

.submit-btn:hover {
    background-color: #FFF;
    transform: scale(1.05);
}

.cancel-btn {
    background-color: transparent;
    color: #e0e0e0;
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.cancel-btn:hover {
    background-color: #2a2a2a;
    border-color: rgba(255, 215, 0, 0.6);
}

@media (max-width: 768px) {
    .help-identify-banner {
        padding: 20px;
    }

    .banner-icon {
        font-size: 36px;
    }

    .help-identify-banner h3 {
        font-size: 18px;
    }

    .help-identify-banner p {
        font-size: 14px;
    }

    .identify-modal-content {
        padding: 25px;
        width: 95%;
    }

    .identify-modal-content h2 {
        font-size: 24px;
    }

    .modal-subtitle {
        font-size: 16px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .detail-inputs {
        grid-template-columns: 1fr;
    }
}
