/* Modern Gallery Styles */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --accent-color: #ec4899;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-secondary: #f9fafb;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --gradient-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --card-radius: 16px;
}

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

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

/* Navigation */
.main-navigation {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid rgba(99, 102, 241, 0.3);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand .brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #ffffff;
    font-weight: 800;
    font-size: 1.75rem;
    transition: all 0.3s ease;
    letter-spacing: -0.025em;
}

.nav-brand .brand-link:hover {
    color: #a5b4fc;
    transform: translateY(-2px);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 1.05rem;
    position: relative;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #818cf8, #a5b4fc);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover {
    color: #ffffff;
}

.nav-link:hover::after {
    width: 100%;
}

@media (max-width: 768px) {
    .nav-container {
        padding: 1rem;
    }
    
    .nav-links {
        gap: 1.5rem;
    }
    
    .nav-brand .brand-link {
        font-size: 1.25rem;
    }
    
    .nav-link {
        font-size: 0.95rem;
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-bg);
    color: white;
    overflow: hidden;
    margin-bottom: 4rem;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 4rem 2rem;
    max-width: 800px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    margin: 0 0 1rem 0;
    line-height: 1.1;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin: 0 0 2rem 0;
    opacity: 0.95;
    font-weight: 300;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    background: white;
    color: var(--primary-color);
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    box-shadow: var(--shadow-xl);
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.hero-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.hero-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    background-image: 
        radial-gradient(circle at 20% 50%, white 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, white 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-section {
        min-height: 400px;
    }
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-color);
    margin: 0 0 1rem 0;
}

.section-divider {
    width: 100px;
    height: 4px;
    background: var(--gradient-bg);
    margin: 0 auto;
    border-radius: 2px;
}

/* Featured Section */
.featured-section {
    max-width: 1400px;
    margin: 0 auto 6rem;
    padding: 0 2rem;
}

.featured-item {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: center;
    background: var(--bg-color);
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.featured-image-wrapper {
    position: relative;
    overflow: hidden;
}

.featured-link {
    display: block;
    position: relative;
    line-height: 0;
}

.featured-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.featured-link:hover .featured-image {
    transform: scale(1.05);
}

.featured-info {
    padding: 3rem;
}

.featured-date {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--gradient-bg);
    color: white;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.featured-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.featured-title a {
    text-decoration: none;
    color: var(--text-color);
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    background-size: 0% 3px;
    background-repeat: no-repeat;
    background-position: left bottom;
    transition: background-size 0.4s ease;
    padding-bottom: 4px;
}

.featured-title a:hover {
    background-size: 100% 3px;
}

.featured-description {
    font-size: 1.125rem;
    color: var(--text-light);
    margin: 1.5rem 0;
    line-height: 1.8;
}

.featured-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.featured-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--gradient-bg);
    color: white;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    margin-top: 1rem;
}

.featured-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

@media (max-width: 1024px) {
    .featured-item {
        grid-template-columns: 1fr;
    }
    
    .featured-info {
        padding: 2rem;
    }
    
    .featured-title {
        font-size: 2rem;
    }
}

/* Recent Section */
.recent-section {
    max-width: 1400px;
    margin: 0 auto 4rem;
    padding: 0 2rem;
}

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

@media (max-width: 768px) {
    .image-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin: 2rem 0;
    }
}

/* Gallery Item */
.gallery-item {
    position: relative;
    background: var(--bg-color);
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    animation: staggerFadeIn 0.6s ease forwards;
    display: flex;
    flex-direction: column;
}

.staggered-item {
    animation-delay: calc(var(--item-index, 0) * 0.1s);
}

@keyframes staggerFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.gallery-link {
    display: block;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    line-height: 0;
    flex-shrink: 0;
}

.gallery-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.gallery-link:hover::before {
    opacity: 1;
}

.gallery-link picture {
    display: block;
    line-height: 0;
}

.gallery-link img {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: bottom;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-link:hover img {
    transform: scale(1.1);
}

/* Gallery Item Info */
.gallery-item-info {
    padding: 1.5rem;
    background: var(--bg-color);
    flex-grow: 1;
}

.gallery-item-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.4;
}

.gallery-item-info h3 a {
    text-decoration: none;
    color: inherit;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    background-size: 0% 2px;
    background-repeat: no-repeat;
    background-position: left bottom;
    transition: background-size 0.3s ease;
    padding-bottom: 2px;
}

.gallery-item-info h3 a:hover {
    background-size: 100% 2px;
}

.gallery-item-info time {
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
    letter-spacing: 0.025em;
}

.gallery-item-info time::before {
    content: '📅';
    margin-right: 0.5rem;
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.tag:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, var(--accent-color), #be185d);
}

/* Gallery List Header */
.gallery-list-header {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--gradient-bg);
    color: white;
    margin-bottom: 3rem;
    border-radius: var(--card-radius);
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.page-title {
    font-size: 3rem;
    font-weight: 900;
    margin: 0 0 1rem 0;
}

.page-description {
    font-size: 1.25rem;
    opacity: 0.95;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 4rem auto 3rem;
    padding: 2rem;
    max-width: 800px;
    background: var(--bg-secondary);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-sm);
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.pagination-link:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.pagination-info {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 600;
}

.pagination-spacer {
    width: 100px;
}

/* Gallery Single Page */
.gallery-single {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.gallery-single header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--gradient-bg);
    color: white;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-lg);
}

.gallery-single header h1 {
    margin: 0 0 1rem 0;
    font-size: 2.5rem;
    font-weight: 800;
}

.gallery-single .meta {
    margin-top: 1rem;
    opacity: 0.95;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.gallery-image-container {
    margin: 3rem 0;
    text-align: center;
    position: relative;
}

.gallery-image-container img {
    max-width: 100%;
    height: auto;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-xl);
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

.gallery-image-container a:hover img {
    transform: scale(1.02);
}

.gallery-image-container figcaption {
    margin-top: 1.5rem;
    font-style: italic;
    color: var(--text-light);
    font-size: 1rem;
}

/* Image Metadata */
.image-metadata {
    margin: 2rem auto;
    max-width: 600px;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--card-radius);
    border: 2px solid var(--border-color);
}

.image-metadata summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--primary-color);
    user-select: none;
    font-size: 1.1rem;
    padding: 0.5rem;
    transition: color 0.2s ease;
}

.image-metadata summary:hover {
    color: var(--accent-color);
}

.image-metadata dl {
    margin: 1.5rem 0 0 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem 2rem;
}

.image-metadata dt {
    font-weight: 700;
    color: var(--text-color);
}

.image-metadata dd {
    margin: 0;
    color: var(--text-light);
}

/* Gallery Navigation */
.gallery-navigation {
    margin: 4rem 0 2rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--card-radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.gallery-navigation .back-to-gallery {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-color);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.gallery-navigation .back-to-gallery:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(-4px);
}

.gallery-navigation .prev-next {
    display: flex;
    gap: 1rem;
}

.gallery-navigation .prev,
.gallery-navigation .next {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.gallery-navigation .prev:hover,
.gallery-navigation .next:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Simple Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: var(--shadow-xl);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { 
        transform: scale(0.9);
        opacity: 0;
    }
    to { 
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 48px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Responsive Images */
img.img-responsive {
    max-width: 100%;
    height: auto;
    display: block;
    vertical-align: bottom;
}

picture {
    display: block;
    line-height: 0;
}

/* View All Container */
.view-all-container {
    text-align: center;
    margin-top: 3rem;
}

/* View All Link */
.view-all {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--gradient-bg);
    color: white;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.view-all:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Content Styling */
.content {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--card-radius);
    line-height: 1.8;
    color: var(--text-color);
}

.content p {
    margin-bottom: 1rem;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
    .gallery-single header h1 {
        font-size: 1.75rem;
    }
    
    .gallery-navigation {
        flex-direction: column;
        text-align: center;
    }
    
    .gallery-navigation .prev-next {
        width: 100%;
        justify-content: center;
    }
    
    .page-title {
        font-size: 2rem;
    }
}
