/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: #155B73;
    --secondary-color: #B6E2F1;
    --text-color: #333;
    --light-text: #EAF7FB;
    --accent-color: #FF822F;
    --background-light: #f4f9fb;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    font-family: var(--font-main);
    background-color: var(--background-light);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

ul {
    list-style: none;
}

/* Layout */
.container {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
}

/* Header */
header {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header .logo {
    font-size: 1.8rem;
    font-weight: bold;
    text-align: center;
    padding-bottom: 1rem;
    cursor: pointer;
    font-family: Geneva, 'Segoe UI', Tahoma, Verdana, sans-serif;
}


/* Navigation */
nav {
    background-color: var(--secondary-color);
}

nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

nav li {
    margin: 0;
}

nav a {
    display: block;
    padding: 10px 15px;
    color: var(--primary-color);
    font-weight: 500;
}

nav a:hover,
nav a.active {
    background-color: var(--primary-color);
    color: var(--light-text);
}

/* Content */
main {
    background-color: #fff;
    padding: 30px;
    margin-top: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

h1,
h2,
h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
    text-align: justify;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.gallery-item {
    text-align: center;
    border: 1px solid #eee;
    padding: 10px;
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
    background: #fff;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.gallery-item .caption {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #666;
}

/* Search/Filter or Poem Nav */
.poem-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.poem-nav button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.poem-nav button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Lightbox styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
    margin: auto;
    display: block;
    width: auto;
    max-width: 90%;
    max-height: 80vh;
    margin-top: 50px;
    border-radius: 4px;
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
}

.close-lightbox {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.prev-lightbox,
.next-lightbox {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    -webkit-user-select: none;
    z-index: 1001;
}

.next-lightbox {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev-lightbox:hover,
.next-lightbox:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 20px 0;
    margin-top: auto;
    text-align: center;
}

footer ul {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

footer a:hover {
    text-decoration: underline;
    color: #fff;
}

/* Simple Responsive helper */
@media (max-width: 600px) {
    nav ul {
        flex-direction: column;
        width: 100%;
    }

    nav li,
    nav a {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
}