/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.background-triangles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.triangle {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0.8;
    transition: transform 0.5s ease;
}

/* Triangle 1 */
.triangle1 {
    border-left: 50vw solid transparent;
    border-right: 50vw solid transparent;
    border-bottom: 100vh solid #ff0000;
    top: 0;
    left: 0;
    transform: rotate(5deg);
}

/* Triangle 2 */
.triangle2 {
    border-left: 50vw solid transparent;
    border-right: 50vw solid transparent;
    border-top: 100vh solid #00ff00;
    bottom: 0;
    left: 0;
    transform: rotate(-3deg);
}

/* Triangle 3 */
.triangle3 {
    border-top: 50vh solid transparent;
    border-bottom: 50vh solid transparent;
    border-left: 100vw solid #0000ff;
    top: 0;
    left: 0;
    transform: rotate(2deg);
}

.triangle4 {
    border-top: 50vh solid transparent;
    border-bottom: 50vh solid transparent;
    border-right: 100vw solid #ffff00;
    top: 0;
    left: 0;
    transform: rotate(15deg);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: orange;
    background: orange;
}

header, footer {
    position: relative; /* Required for absolute positioning of the triangle */
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.artistic-title {
    font-weight: 900;
    font-size: 2rem;
    text-transform: uppercase;
    color: #ff4081;
    text-shadow: 10px 10px 20px rgba(0, 0, 0, 0.5);
    background: linear-gradient(90deg, #ff4081, #ff8c00, #ffcc00, #ff0000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 3px;
    font-family: 'Arial Black', sans-serif;
    -webkit-text-stroke: 2px #000;
    text-stroke: 2px #000;
    display: inline-block;
    z-index: 2;
}


.gallery-description {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-top: -20px;
    -webkit-text-stroke: 1px #000;
    text-stroke: 1px #000;    
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 30px 40px; /* Increased padding for more space */
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
    align-items: center;
    z-index: 1;
}

.thumbnail {
    cursor: pointer;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.8), 0 1px 3px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: auto;
    padding: 0px;
    margin: 0 10px; /* Added horizontal margin for spacing */
}

.thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.thumbnail img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.2s ease;
}
.thumbnail:hover img {
    transform: scale(1.02);
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

.lightbox.hidden {
    display: none;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

#lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    border-radius: 8px;
    object-fit: contain;
    margin-left: auto;
    margin-right: auto;
}

.caption {
    color: black;
    text-align: center;
    padding: 15px 0;
    font-size: 1.2rem;
    margin-top: 10px;
}

.poem-content {
    color: black;
    text-align: left;
    padding-top: 30px;
    padding-bottom: 30px;
    padding-left: 60px;
    padding-right: 60px;
    background: #f8f4e9; /* Paper color */
    border-radius: 12px;
    max-height: 60vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 1px solid #e0d6c0;
}

.poem-content pre {
    white-space: pre-wrap;
    font-family: 'Georgia', serif;
    font-size: 1.2rem;
    line-height: 1.8;
    margin: 0;
    padding: 0;
    color: black;
    text-align: left;
}

.poem-content h3 {
    text-align: left;
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: orange;
    border-bottom: 2px solid #d7ccc8;
    padding-bottom: 10px;
    margin-top: 0; /* Ensure no extra top margin */
}

.poem-content p {
    margin-bottom: 20px;
    text-align: left;
    font-size: 1.1rem;
    margin-top: 0; /* Ensure no extra top margin */
}

.poem-content p:last-child {
    margin-bottom: 0;
}

.poem-caption {
    text-align: right;
    font-style: italic;
    margin-top: 15px;
    font-size: 0.9rem;
}

/* Ensure the content area respects the padding */
.lightbox-content {
    padding: 20px;
    box-sizing: border-box;
}

.poem-excerpt {
    text-align: center;
    padding: 15px;
    font-family: 'Georgia', serif;
    font-style: italic;
    color: black;
    background-color: #f8f4e9; /* Paper color */
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.poem-excerpt h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.poem-excerpt p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.4;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: black;
    border: 2px solid black;
    padding: 12px 18px;
    font-size: 1.3rem;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 1002;
}
.nav-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

.nav-btn:hover {
    background-color: rgba(255,255,255,1);
}

.prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: black;
    font-size: 36px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.close:hover {
    transform: scale(1.2);
    color: #fff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        padding: 10px 40px;
    }
    
    .gallery-description {
	font-size: 0.7rem;
	margin-top: 0px;
    }

    h1 {
        font-size: 3.5rem;
    }

    .nav-btn {
        padding: 10px 15px;
        font-size: 1.2rem;
    }

    .close {
        font-size: 30px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .gallery {
        grid-template-columns: 1fr;
    }

    .nav-btn {
        padding: 8px 12px;
        font-size: 1rem;
    }
}
