/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --color-primary:    #2c7a4b;
    --color-primary-d:  #1e5c37;
    --color-accent:     #e8f5ee;
    --color-text:       #222;
    --color-muted:      #666;
    --color-border:     #ddd;
    --color-bg:         #f8f9fa;
    --radius:           6px;
    --shadow:           0 2px 8px rgba(0,0,0,.1);
    --font:             'Segoe UI', Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: .5rem 1.2rem;
    border-radius: var(--radius);
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, color .2s;
    background: transparent;
    text-decoration: none;
}
.btn:hover { background: var(--color-primary); color: #fff; text-decoration: none; }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-d); border-color: var(--color-primary-d); }

/* ===== Header ===== */
.site-header {
    background: var(--color-primary);
    color: #fff;
    padding: .75rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo a {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
}
.logo img { height: 40px; width: auto; }

/* ===== Navigation ===== */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: .25rem;
}
.main-nav a {
    display: block;
    color: #fff;
    padding: .4rem .8rem;
    border-radius: var(--radius);
    font-weight: 500;
    text-decoration: none;
    transition: background .2s;
}
.main-nav a:hover,
.main-nav a.active { background: rgba(255,255,255,.2); }

.has-dropdown { position: relative; }
.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    min-width: 180px;
    box-shadow: var(--shadow);
    list-style: none;
    z-index: 200;
}
.dropdown li a {
    color: var(--color-text);
    padding: .5rem 1rem;
    display: block;
}
.dropdown li a:hover { background: var(--color-accent); color: var(--color-primary); }
.has-dropdown:hover .dropdown { display: block; }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
    background: var(--color-accent);
    border-bottom: 1px solid var(--color-border);
    padding: .4rem 0;
    font-size: .85rem;
    color: var(--color-muted);
}
.breadcrumb a { color: var(--color-primary); }
.breadcrumb span { color: var(--color-muted); }

/* ===== Main ===== */
main.container { padding-top: 1.5rem; padding-bottom: 2rem; }

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-d));
    color: #fff;
    padding: 2.5rem 2rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    text-align: center;
}
.hero h1 { font-size: 2rem; margin-bottom: .5rem; }
.hero p { font-size: 1.1rem; opacity: .9; }

/* ===== Album grid ===== */
.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0;
}

.album-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}
.album-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.15); text-decoration: none; }

.album-thumb {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--color-accent);
}
.album-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.album-card:hover .album-thumb img { transform: scale(1.05); }

.no-photo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--color-border);
}

.album-info {
    padding: .75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .3rem;
}
.album-info h3 { font-size: 1rem; color: var(--color-text); }
.album-info .location,
.album-info .date { font-size: .82rem; color: var(--color-muted); }
.album-info .description { font-size: .85rem; color: var(--color-muted); margin-top: .25rem; }

/* ===== Latest albums section ===== */
.latest-albums h2,
section h2 { font-size: 1.4rem; margin-bottom: 1rem; color: var(--color-primary); }

/* ===== Album detail ===== */
.album-header { margin-bottom: 1.5rem; }
.album-header h1 { font-size: 1.8rem; }
.album-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: .5rem 0;
    font-size: .9rem;
    color: var(--color-muted);
}
.album-description { margin-top: .5rem; color: var(--color-muted); }

/* ===== Photo grid ===== */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: .75rem;
}

.photo-thumb {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--color-accent);
    aspect-ratio: 4/3;
    cursor: pointer;
}
.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.photo-thumb:hover img { transform: scale(1.07); }

.photo-thumb .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,.6);
    color: #fff;
    font-size: .75rem;
    padding: .3rem .5rem;
    opacity: 0;
    transition: opacity .2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.photo-thumb:hover .caption { opacity: 1; }


/* ===== Info page ===== */
.info-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}
.info-sidebar {
    width: 200px;
    flex-shrink: 0;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.info-sidebar ul { list-style: none; }
.info-sidebar a {
    display: block;
    padding: .6rem 1rem;
    color: var(--color-text);
    border-left: 3px solid transparent;
    transition: all .15s;
}
.info-sidebar a:hover,
.info-sidebar a.active {
    background: var(--color-accent);
    border-left-color: var(--color-primary);
    color: var(--color-primary);
    text-decoration: none;
}

.info-content { flex: 1; }
.info-content h1 { margin-bottom: 1rem; }
.content-body { line-height: 1.8; }
.content-body p { margin-bottom: 1em; }
.content-body h2 { margin: 1.5em 0 .5em; }

/* ===== Empty state ===== */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--color-muted); }

/* ===== Text align ===== */
.text-center { text-align: center; }

/* ===== Back to top ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
    z-index: 500;
    line-height: 1;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }

/* ===== Lightbox controls (pause + download) ===== */
.slideshow-pause-btn,
.lightbox-download-btn {
    position: fixed;
    bottom: 1.5rem;
    z-index: 1000000;
    background: rgba(0,0,0,.55);
    color: #fff;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 50%;
    width: 2.8rem;
    height: 2.8rem;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background .2s;
}
.slideshow-pause-btn { right: 1.5rem; }
.lightbox-download-btn { right: 5rem; }
.slideshow-pause-btn:hover,
.lightbox-download-btn:hover { background: rgba(0,0,0,.85); }

/* ===== Footer ===== */
.site-footer {
    background: var(--color-primary-d);
    color: rgba(255,255,255,.7);
    text-align: center;
    padding: 1rem;
    font-size: .85rem;
    margin-top: 3rem;
}

/* ===== Responsive ===== */
@media (max-width: 700px) {
    .nav-toggle { display: block; }

    .main-nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-primary-d);
        padding: .5rem;
    }
    .main-nav ul.open { display: flex; }

    .site-header .container { flex-wrap: wrap; position: relative; }

    .dropdown {
        position: static;
        box-shadow: none;
        border: none;
        background: rgba(255,255,255,.1);
    }
    .dropdown li a { color: #fff; }

    .info-layout { flex-direction: column; }
    .info-sidebar { width: 100%; }

    .album-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .photo-grid  { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }

    .hero h1 { font-size: 1.4rem; }
    .hero p   { font-size: 1rem; }
}

@media (max-width: 480px) {
    .album-grid { grid-template-columns: repeat(2, 1fr); }
    .photo-grid  { grid-template-columns: repeat(2, 1fr); }

    .hero { padding: 1.5rem 1rem; }

    .album-meta { flex-direction: column; gap: .25rem; }
}
