:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #e74c3c;
    --text-color: #333;
    --light-gray: #ecf0f1;
    --border-color: #bdc3c7;
    --max-width: 1200px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f5f5f5;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
nav {
    background-color: var(--primary-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 2px;
}

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

.nav-links a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.8;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 1rem 0;
    text-align: center;
    display: flex;
    align-items: center;
    min-height: calc(1rem + 1rem + 1.5rem);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    font-weight: 300;
    letter-spacing: 1px;
}

.hero .subtitle {
    font-size: 1.8rem;
    margin: 0;
    opacity: 0.9;
    font-weight: bold;
    letter-spacing: 2px;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* Sections */
section {
    padding: 3rem 0;
}

section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
}

/* Image Grid */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 2rem 0;
}

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

.image-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.image-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

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

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

.image-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filename {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-family: monospace;
}

.date {
    font-size: 0.85rem;
    color: #666;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
}

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

.lightbox img {
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
}

.lightbox .close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.lightbox .close:hover {
    color: var(--accent-color);
}

.lightbox-info {
    position: absolute;
    left: 20px;
    top: 20px;
    color: white;
    text-align: left;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 4px;
    z-index: 1001;
}

.image-counter {
    opacity: 0.7;
    font-size: 0.9em;
}

/* Navigation buttons */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    font-size: 3rem;
    cursor: pointer;
    padding: 20px;
    z-index: 1001;
    transition: background-color 0.3s;
}

.nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-btn.prev {
    left: 20px;
}

.nav-btn.next {
    right: 20px;
}

@media (max-width: 768px) {
    .nav-btn {
        font-size: 2rem;
        padding: 10px;
    }

    .nav-btn.prev {
        left: 10px;
    }

    .nav-btn.next {
        right: 10px;
    }
}

/* Map */
#map {
    height: 600px;
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--secondary-color);
}

.btn-small {
    padding: 0.5rem 1rem;
}

.cta {
    text-align: center;
    margin-top: 4rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.page-link {
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.page-link:hover {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.page-current {
    padding: 0.5rem 0.75rem;
    font-weight: bold;
    background-color: var(--primary-color);
    color: white;
    border-radius: 4px;
}

.page-ellipsis {
    padding: 0.5rem;
    color: var(--text-color);
}

.page-info {
    font-weight: bold;
    color: var(--primary-color);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}

footer a {
    color: white;
    text-decoration: underline;
}

footer p {
    margin: 0.5rem 0;
}

.social-links {
    margin-top: 1rem;
}

.bluesky-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.bluesky-link:hover {
    opacity: 0.8;
}

.bluesky-link svg {
    vertical-align: middle;
}

/* Featured image transitions */
.featured-image {
    text-align: center;
    margin: 2rem 0;
}

.featured-image .image-card {
    position: relative;
    box-shadow: none;
    border: none;
    border-radius: 0;
    overflow: visible;
    background: none;
    display: inline-block;
}

.featured-image .image-wrapper {
    position: relative;
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.featured-image img {
    transition: opacity 2.5s ease-in-out;
    display: block;
}

.featured-image img.fading {
    opacity: 0;
}

/* Image detail page styles */
.image-display {
    text-align: center;
    margin: 2rem 0;
}

.image-display img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.image-metadata {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.image-metadata h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.image-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

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

    .nav-links {
        gap: 1rem;
    }

    #map {
        height: 400px;
    }
}