/* Global Color Variables - Edit these to change background or accents */
:root {
    --bg-dark: #ffffff;          /* Main dark background for all non-home pages */
    --card-bg: #efefef;          /* Background color for album cards */
    --accent-color: #777777;     /* Accent color for buttons and hover state */
    --text-main: #333333;        /* Primary text color */
    --text-muted: #333333;       /* Muted/secondary text color */
    --nav-bg: rgba(255, 255, 255, 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(3px);
}

.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: radial-gradient(rgba(213, 220, 255, 0.7), rgba(0, 0, 0, 0.0)),
                url('../gallery/Travel/malaysia2019/DSC07371.avif') center/cover no-repeat;
	display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-content {
    animation: fadeIn 1s ease-in-out;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.9rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.btn-explore {
    padding: 12px 30px;
    background-color: var(--accent-color);
    color: #fff;
    text-decoration: none;
    border-radius: 7px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    display: inline-block;
}

.btn-explore:hover {
    transform: translateY(-2px);
    background-color: #333333;
}

/* Album Cards Container */
.albums-grid {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Base style for album card */
.album-card {
	display: flex;
    flex-direction: row; /* Default layout: Photo left, text right */
    background-color: var(--card-bg);
    border-radius: 0px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 220px; /* Comfort height for album card */
}

/* Alternate order for even album cards: Text left, photo right */
.album-card:nth-child(even) {
    flex-direction: row-reverse;
}

.album-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 11px rgba(0, 0, 0, 0.5);
}

/* Photo occupies exactly 50% of the block */
.album-cover {
    width: 50%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    display: block;
}

/* Info block occupies exactly 50% of the block and centers text */
.album-info {
    width: 50%;
    padding: 20px;
    display: flex;
    justify-content: center; /* Horizontally center content */
    align-items: center;     /* Vertically center content */
    text-align: center;
}

.album-info h2 {
    font-size: 1.5rem;
    margin: 0;
}

/* 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 */
.photo-grid {
    /* Разбиваем сетку на колонки. В браузере они будут заполняться автоматически */
   	column-count: 4;           /* 3 колонки на ПК */
    column-gap: 5;          /* Расстояние между колонками */
}

.photo-item {
	width: 100%;               /* Фотография берет 100% ширины своей колонки */
    height: auto;              /* Сохраняет оригинальные пропорции фото! */
    display: block;
    margin-bottom: 15px;       /* Расстояние между фото по вертикали */
    border-radius: 0px;
    cursor: pointer;
    break-inside: avoid;       /* Запрещает разрыв фотографии между колонками */
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.photo-item:hover {
    transform: scale(1.02);
    opacity: 0.92;
}

/* Адаптивность для планшетов и мобильных устройств */
@media (max-width: 1024px) {
    .photo-grid {
        column-count: 2;       /* 2 колонки на планшетах */
    }
}

@media (max-width: 600px) {
    .photo-grid {
        column-count: 1;       /* 1 колонка на телефонах */
    }
}

/* 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-img {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 4px;
}

.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; }
}
