/* Global Color Variables - Edit these to change background or accents */
:root {
    --bg-dark: #101010;          /* Main dark background for all non-home pages */
    --card-bg: #efefef;          /* Background color for album cards */
    --accent-color: #999999;     /* Accent color for buttons and hover state */
    --text-main: #cccccc;        /* Primary text color */
    --text-muted: #bbbbbb;       /* Muted/secondary text color */
    --nav-bg: rgba(18, 18, 20, 0.2); /* Semi-transparent top navigation background */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI Light', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 300; /* Включает тонкое/легкое начертание (Light) */
	background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
}

/* Global Navigation Bar */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
}

.nav-bar {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 1rem 0;
}

.nav-bar li {
    margin: 0 1.5rem;
}

.nav-bar a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.nav-bar a:hover,
.nav-bar a.active {
    color: var(--text-main);
    border-bottom: 2px solid var(--accent-color);
}

/* Container */
.container {
    max-width: 1700px;
    margin: 0 auto;
    padding: 100px 20px 40px;
}

.page-title {
    font-size: 2.5rem;
    text-transform: capitalize;
    margin-bottom: 2rem;
    text-align: center;
}

/* Hero Section (Home Page) */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
                url('../gallery/Europe/Great Britain/GBR_London_1_top_n.avif') center/cover no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-content {
    animation: fadeIn 1.2s ease-in-out;
}

.hero h1 {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.7rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.btn-explore {
    padding: 12px 30px;
    background-color: var(--bg-dark);
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    display: inline-block;
}

.btn-explore:hover {
    transform: translateY(-3px);
    background-color: #333333;
}

/* Album Cards Container */
.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.album-card {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3; /* Фиксированное соотношение сторон для обложки */
    overflow: hidden;
    text-decoration: none;
    color: #ffffff;
    cursor: pointer;
}

.album-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Затемняющая маска для альбома */
.album-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    transition: background 0.4s ease;
}

/* Название альбома поверх обложки */
.album-info {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
}

.album-info h2 {
    font-size: 1.5rem;
    color: #ffffff;
    margin: 0;
    font-weight: 400;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s ease;
}

/* Эффекты наведения для альбома */
.album-card:hover .album-cover {
    transform: scale(1.05);
}

.album-card:hover::after {
    background: rgba(0, 0, 0, 0.6);
}

.album-card:hover .album-info h2 {
    transform: translateY(-2px);
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .album-card,
    .album-card:nth-child(even) {
        flex-direction: column; /* On small screens stack vertically */
    }

    .album-cover,
    .album-info {
        width: 100%;
    }

    .album-cover {
        height: 200px;
        min-height: auto;
    }
}

/* Photos Grid Page */
/* Dynamic Masonry Grid Layout */
/* ==========================================================================
   Photos Grid (CSS Grid: fills left-to-right by rows)
   ========================================================================== */
.photo-grid {
    display: grid;
    /* Automatically fits columns with a minimum width of 300px */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px; /* Replaces column-gap and margin-bottom */
    align-items: start;
}

.photo-item {
    position: relative;
    width: 100%;
    margin-bottom: 0; /* Gap is now handled by .photo-grid */
    break-inside: auto;
    overflow: hidden;
    cursor: pointer;
}

/* Maintain natural photo proportions */
.photo-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}
/* Responsive adjustments for mobile devices */
@media (max-width: 600px) {
    .photo-grid {
        grid-template-columns: 1fr; /* Single column on phones */
    }
}
/* Затемняющая маска с анимацией плавного появления (Fade & Scale) */
.photo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(1px); /* Элегантный легкий размытый фон */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* Название фотографии с подносом вверх */
.photo-title {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 400;
    text-align: center;
    letter-spacing: 0.5px;
    transform: translateY(12px);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Эффекты при наведении на фотографию */
.photo-item:hover img {
    transform: scale(1.04);
}

.photo-item:hover .photo-overlay {
    opacity: 1;
}

.photo-item:hover .photo-title {
    transform: translateY(0);
}

/* Адаптивность для мобильных */
@media (max-width: 1024px) {
    .photo-grid {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .photo-grid {
        column-count: 1;
    }
    .albums-grid {
        grid-template-columns: 1fr;
    }
}

/* Fullscreen Lightbox Modal */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 97%;
    max-height: 97vh;
}

.lightbox-img {
    max-width: 100%;
    max-height: 95vh; /* Уменьшили высоту фото, чтобы снизу поместился текст */
    border-radius: 4px;
    object-fit: contain;
}

.lightbox-caption {
    margin-top: 15px;
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 300;
    text-align: center;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.lightbox-btn {
    position: absolute;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    padding: 10px;
    user-select: none;
}

.lightbox-close { top: 20px; right: 30px; font-size: 3rem; }
.lightbox-prev { left: 30px; }
.lightbox-next { right: 30px; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .album-card { flex-direction: column; }
    .album-cover { width: 100%; height: 200px; }
    .hero h1 { font-size: 2.2rem; }
}
