/* Gallery Design with Roboto Slab, Inconsolata, tiny dotted borders, and soft color palette */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@300;400;500;600&family=Inconsolata:wght@300;400;500&display=swap');

/* CSS Variables for theming */
:root {
    /* Color palette from coolors.co */
    --color-dusty-rose: #D88C9A;
    --color-peach: #F2D0A9;
    --color-cream: #F1E3D3;
    --color-sage: #99C1B9;
    --color-lavender: #8E7DBE;
    
    /* Applied colors */
    --primary-color: #E85D75; /* More saturated rose */
    --secondary-color: var(--color-lavender);
    --accent-color: var(--color-sage);
    --highlight-color: var(--color-peach);
    --background-color: #FEFEFE;
    --card-background: #FFFFFF;
    --text-color: #444444;
    --text-muted: #777777;
    --border-style: dotted;
    --border-width: 1px;
    --border-color: #CCCCCC;
    --gutter-size: 16px;
    --gutter-size-photos: 8px; /* Half size for photo grids */
    --transition-speed: 0.3s;
    --font-heading: 'Roboto Slab', serif;
    --font-body: 'Inconsolata', monospace;
}

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

body {
    margin: 0;
    font-family: var(--font-body);
    font-weight: 400;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.3;
}

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

a {
    text-decoration: none;
    color: inherit;
}

/* Gallery Container */
.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 15px;
}

/* Headers */
.gallery-header,
.album-header {
    text-align: center;
    margin-bottom: 60px;
}

.gallery-title {
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0 0 20px;
    color: var(--primary-color);
    text-transform: none;
    letter-spacing: -0.01em;
}

.album-title {
    font-size: 2rem;
    font-weight: 500;
    margin: 0 0 20px;
    color: var(--text-color);
}

.gallery-description,
.album-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 20px;
    font-family: var(--font-body);
    font-weight: 300;
}

.album-date {
    display: inline-block;
    color: var(--accent-color);
    font-size: 0.95rem;
    font-weight: 400;
    margin-top: 10px;
}

/* Breadcrumb Navigation */
.breadcrumb {
    margin-bottom: 40px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--secondary-color);
    font-weight: 500;
    font-size: 1rem;
    transition: color var(--transition-speed);
    border-bottom: 1px dotted transparent;
}

.back-link:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Masonry Grid */
.masonry-grid {
    margin: 0 calc(var(--gutter-size) / -2);
}

/* Photo Grid - Tighter spacing */
#photos-grid {
    margin: 0 calc(var(--gutter-size-photos) / -2);
}

#photos-grid .grid-sizer,
#photos-grid .grid-item {
    margin: calc(var(--gutter-size-photos) / 2);
}

/* Grid Sizer - Used by Masonry for column width */
.grid-sizer,
.grid-item {
    width: calc(25% - var(--gutter-size));
    margin: calc(var(--gutter-size) / 2);
}

/* Responsive Grid Sizes */
@media (max-width: 1200px) {
    .grid-sizer,
    .grid-item {
        width: calc(33.333% - var(--gutter-size));
    }
}

@media (max-width: 900px) {
    .grid-sizer,
    .grid-item {
        width: calc(50% - var(--gutter-size));
    }
}

@media (max-width: 600px) {
    .grid-sizer,
    .grid-item {
        width: calc(100% - var(--gutter-size));
    }
    
    #photos-grid .grid-sizer,
    #photos-grid .grid-item {
        width: calc(100% - var(--gutter-size-photos));
    }
    
    .gallery-title {
        font-size: 2rem;
    }
    
    .gallery-container {
        padding: 30px 10px;
    }
}

/* Album Cards */
.album-card {
    background: var(--card-background);
    border: var(--border-width) var(--border-style) var(--border-color);
    position: relative;
    transition: all var(--transition-speed);
    overflow: hidden;
}

.album-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.album-link {
    display: block;
    height: 100%;
}

.album-cover {
    position: relative;
    padding-bottom: 75%; /* 4:3 aspect ratio */
    background: var(--color-cream);
    overflow: hidden;
}

.album-cover.no-image {
    background: linear-gradient(135deg, var(--color-cream), var(--color-peach));
}

.album-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-speed);
}

/* Removed zoom effect on hover */

.album-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 15px 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0.3), transparent);
    color: white;
    transition: all var(--transition-speed);
}

.album-card:hover .album-info-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.4), transparent);
}

.album-info-overlay .album-title {
    font-size: 1.25rem;
    font-weight: 500;
    margin: 0 0 5px;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.album-count {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.9);
    font-weight: 400;
}

/* Photo Cards */
.photo-card {
    position: relative;
    background: var(--card-background);
    border: var(--border-width) var(--border-style) var(--border-color);
    overflow: hidden;
    transition: all var(--transition-speed);
}

.photo-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.photo-link {
    display: block;
    position: relative;
}

.photo-card img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform var(--transition-speed);
}

/* Removed zoom effect on hover */

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    padding: 20px 12px 12px;
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.photo-card:hover .photo-overlay {
    opacity: 1;
}

.photo-title {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Loading State */
.grid-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s, transform 0.4s;
}

.grid-item.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Removed horizontal line accent */

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

.mt-4 {
    margin-top: 2rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

/* Simple fallback for missing images */
.album-cover img[src=""] {
    display: none;
}

.album-cover:has(img[src=""]) {
    background: linear-gradient(135deg, var(--color-cream), var(--color-peach));
}

/* Footer Styles */
.gallery-footer {
    margin-top: 4rem;
    padding: 2rem 0 1rem;
    text-align: center;
    font-family: 'Inconsolata', monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
    border: none;
    background: transparent;
}

.gallery-footer p {
    margin: 0;
}

.gallery-footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.gallery-footer a:hover {
    color: var(--text-primary);
}