/* --- Global Reset & Base Styles --- */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: #f2efe4;
    overflow-x: hidden;
    font-family: Verdana, Helvetica, sans-serif;
    font-size: 13px;
    line-height: 1.5;
}

a {
    color: #6A803C;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    border: none;
    max-width: 100%;
    height: auto;
}

/* --- Layout Containers --- */
#container {
    max-width: 930px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    min-height: 100%;
    box-sizing: border-box;
}

#contentContainer {
    width: 100%;
    background-color: #FFF;
    min-height: 100vh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* --- Header & Navigation Grid --- */
#menu {
    display: block; 
    min-height: 175px;
    padding: 0 20px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

#menuSticker {
    position: absolute;
    left: -50px; 
    top: 10px;
    width: 285px;
    height: 148px;
    background-image: url(../images/menu_sticker.png);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    z-index: 10;
	filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.2));
}

#menuItemContainer {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 15px 10px;
    margin-left: 240px; 
    padding-top: 30px;
}

/* --- Navigation Item Styles --- */
.menuItem a {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    color: #4c4c4c;
    text-decoration: none;
}

.menuImg {
    display: block;
    width: 100%;
    height: 30px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0px;
    background-color: #eee;
}

.menuImg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.menuText {
    font-size: 12px;
    font-weight: normal;
    padding-left: 2px;
}

.menuItem .menuImg {
    position: relative;
}

.menuItem a:hover .menuImg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(106, 128, 60, 0.35);
    border-radius: 10px;
    pointer-events: none;
}

/* --- Mobile Toggle (Hidden by Default) --- */
.menu-toggle {
    display: none;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.menu-toggle-bar {
    display: block;
    width: 25px;
    height: 3px;
    background: #4c4c4c;
    margin: 4px 0;
    border-radius: 2px;
}

.close-icon {
    display: none;
    font-size: 32px;
    color: #4c4c4c;
    line-height: 1;
}

/* --- Content Areas --- */
#content {
    flex: 1;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

h1 { font-size: 24px; color: #4c4c4c; font-weight: normal; margin-top: 0; }
h2 { font-size: 16px; font-weight: normal; background-color: #6A803C; padding: 10px; color: #FFF; margin: 20px 0 10px 0; }
hr { border: 0; border-top: 1px solid #eee; margin-bottom: 20px; }

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 15px 0;
}

.video-wrapper iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}

#footer {
    background-color: #b8b8b8;
    height: 30px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#copyright {
    font-size: 11px;
    color: #FFF;
}

/* --- Laurels Grid --- */
.laurel-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: center;
    justify-items: center;
    margin: 30px auto;
    padding: 0 10px;
	max-width: 560px;
}

.laurel-row img {
    width: 100%;
    max-width: 220px;
    height: auto;
    display: block;
}

.laurel-row img:hover {
    opacity: 1;
}

/* --- Writing Page Grid --- */
.writing-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr; 
    gap: 0;
    width: 100%;
    margin-bottom: 30px;
}

.grid-item {
    padding: 8px 5px;
    display: flex;
    align-items: center;
}

.grid-item:nth-child(3n+1) {
	font-weight: 600;
}

.footnotes {
    font-size: 11px;
    color: #666;
    margin-top: 20px;
    line-height: 1.4;
}

/* --- Gallery Grid Styles --- */
#galleryContainer {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px 20px;
    margin-top: 20px;
}

.gallery {
    text-align: center;
}

.gallery img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 8px;
}

.gallery a {
    font-size: 13px;
    color: #4c4c4c;
    display: block;
}

.gallery i {
    font-style: italic;
    display: block;
}

.credit-link {
  line-height: 1.4;
}

.festival-name {
  display: block;
}

/* --- Video Gallery Grid (Desktop & Tablet) --- */
#videoGalleryContainer {
    display: flex;
    flex-direction: column;
    gap: 60px;
    margin-bottom: 40px;
}

.videoLink {
    display: grid;
    grid-template-columns: 300px 1fr;
    grid-template-rows: auto auto 1fr;
    column-gap: 20px;
    align-items: start;
}

.videoLink h2 {
    grid-column: 2;
    grid-row: 1;
    margin: 15px 0 10px -20px; 
    font-size: 18px;
    font-weight: bold; 
    background-color: #6A803C;
    padding: 8px 15px;
    color: #FFF;
    z-index: 5;
}

/* --- Music Page Grid (Desktop & Tablet) --- */
.song {
    display: grid;
    grid-template-columns: 300px 1fr;
    grid-template-rows: auto 1fr;
    column-gap: 20px;
    margin-bottom: 50px;
    align-items: start;
}

.song h2 {
    grid-column: 1 / -1;
    grid-row: 1;
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: bold;
    background-color: #6A803C;
    padding: 8px 15px;
    color: #FFF;
}

.song .audioPlayer {
    grid-column: 1;
    grid-row: 2;
}

.song .audioPlayer audio {
    width: 100%;
}

.song .songMeta {
    grid-column: 2;
    grid-row: 2;
    font-size: 13px;
    color: #4c4c4c;
    line-height: 1.5;
}

.song h4 {
    font-size: 15px;
    font-weight: normal;
    color: #4c4c4c;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.videoLink a, 
.videoLink > img {
    grid-column: 1;
    grid-row: 1 / span 3;
}

.videoLink img {
    width: 100%;
    border-radius: 15px;
    display: block;
}

.videoLink h3 {
    grid-column: 2;
    grid-row: 2;
    font-size: 15px;
    font-weight: normal;
    color: #4c4c4c;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.videoLink .videoDescription {
    grid-column: 2;
    grid-row: 3;
    font-size: 13px;
    color: #4c4c4c;
    line-height: 1.5;
}

/* --- MEDIA QUERIES --- */

/* Tablet Adjustment (Between 601px and 1024px) */
@media (max-width: 1024px) {
	.laurel-row {
        gap: 10px;
    }
    
    .laurel-row img {
        max-width: 160px;
    }

	#menu {
        display: grid;
        grid-template-columns: 2fr 3fr; 
        align-items: center;
        padding: 0 20px;
        min-height: 150px;
		gap: 20px;
    }

    #menuSticker {
        position: static; 
        width: 100%; 
		max-width: 285px;
        height: 148px;
		background-position: left center;
        margin-right: 20px;
    }
    #menuItemContainer {
        margin-left: 0; 
        padding-top: 0;
        grid-template-columns: repeat(3, 1fr);
        width: 100%;
    }
}

/* Mobile Transition (At 560px) */
@media (max-width: 560px) {
    #menu {
        display: flex;
        justify-content: space-between;
        align-items: center;
        min-height: 100px;
        padding: 10px 20px;
    }

    #menuSticker {
        position: relative;
        left: 0;
        top: 0;
        width: 210px;
        height: 128px;
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
    }

    body.menu-open .hamburger-icon { display: none; }
    body.menu-open .close-icon { display: block; }

    #menuItemContainer {
        display: none;
        grid-template-columns: 1fr;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #FFF;
        padding: 20px;
        margin-left: 0;
        box-shadow: 0 10px 20px rgba(0,0,0,0.15);
        z-index: 1000;
        gap: 20px;
    }

    body.menu-open #menuItemContainer {
        display: grid;
    }

    .menuImg {
        width: 180px; 
        height: 30px;
    }

    .menuText {
        font-size: 14px;
    }

	.writing-grid {
        grid-template-columns: 1fr;
    }

    .grid-item {
        border-bottom: none;
        padding: 2px 5px;
    }

    .grid-item:nth-child(3n) {
        padding-bottom: 15px;
        margin-bottom: 10px;
    }

    .grid-item:nth-child(3n+1) {
        font-weight: bold;
        padding-top: 10px;
    }

	.laurel-row {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .laurel-row img {
        max-width: 180px;
    }

	#galleryContainer {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px 15px;
    }

    .videoLink {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
        column-gap: 0;
        row-gap: 10px;
    }

    .videoLink h2 {
        grid-column: 1;
        grid-row: 1;
        margin: 0 0 10px 0;
    }

    .videoLink a, 
    .videoLink > img {
        grid-column: 1;
        grid-row: 2;
        margin-bottom: 10px;
    }

    .videoLink h3 {
        grid-column: 1;
        grid-row: 3;
        padding-left: 5px;
    }

    .videoLink .videoDescription {
        grid-column: 1;
        grid-row: 4;
        padding-left: 5px;
    }
    .song {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        row-gap: 15px;
    }

    .song h2 {
        grid-column: 1;
        grid-row: 1;
        margin-bottom: 10px;
    }

    .song .audioPlayer {
        grid-column: 1;
        grid-row: 2;
    }

    .song .songMeta {
        grid-column: 1;
        grid-row: 3;
        padding-left: 5px;
    }
}