/* ============================================
   JOURNAL PAGE CSS
   ============================================ */

/* CSS Variables */
:root {
    --text: #000;
    --border: #2D403E;
    --bg: #C9F0C5;
    --gradientTop: #60875C;
    --gradientBottom: #80B07B;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Times New Roman', Times, serif;
    color: #000;
    text-align: center;
    min-height: 100vh;
    position: relative;
    margin: 0;
    padding: 0;
}

/* BACKGROUND IMAGE STYLING */
#bg-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -9999;
    pointer-events: none;
}

/* ============================================
   SIDEBAR NAVIGATION
   ============================================ */

.sidenav {
    height: 100vh;
    width: 160px;
    position: fixed;
    z-index: 100;
    top: 0;
    left: 0;
    overflow-y: auto;
    overflow-x: hidden;
    border: 2px ridge var(--border);
    border-radius: 5px;
    padding: 5px;
    background: linear-gradient(var(--gradientTop), var(--gradientBottom));
}

.sidenav a {
    display: block;
    margin: 5px;
    background: linear-gradient(to right, var(--bg), var(--gradientBottom));
    border-radius: 5px;
    padding: 2px 7px;
    text-decoration: none;
    color: var(--text);
    transition: background 0.3s ease;
}

.sidenav a:hover {
    background: linear-gradient(to right, var(--bg), var(--gradientBottom), var(--gradientTop));
}

.sidenavmid {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 75%;
    overflow: hidden;
}

.sidenavmid h1 {
    font-size: 20px;
    margin: 10px 0;
    color: #fff;
}

.sidenavmid a {
    display: block;
    margin: 5px;
    background: linear-gradient(to right, var(--bg), var(--gradientBottom));
    border-radius: 5px;
    padding: 2px 7px;
    text-decoration: none;
    color: var(--text);
}

.sidenavmid a:hover {
    background: linear-gradient(to right, var(--bg), var(--gradientBottom), var(--gradientTop));
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */

.main {
    margin-left: 170px;
    padding: 0px 10px;
    position: relative;
    z-index: 10;
}

#container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
    position: relative;
    z-index: 10;
}

#header {
    width: 100%;
    height: 100px;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    margin-bottom: 0;
}

#headerArea {
    margin: 0;
    padding: 0;
}

#flex {
    display: flex;
    flex-wrap: wrap;
}

main {
    background: rgba(255, 245, 238, 0.7);
    flex: 1;
    padding: 20px;
    order: 2;
    min-width: 300px;
    text-align: center;
    position: relative;
    z-index: 10;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3 {
    color: #000;
    font-family: 'Times New Roman', Times, serif;
    text-align: center;
}

h1 {
    font-size: 40px;
    margin-bottom: 20px;
}

h2 {
    font-size: 30px;
    margin-bottom: 15px;
}

h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

/* ============================================
   JOURNAL IMAGES & GRID
   ============================================ */

.shelf-divider {
    width: 100%;
    display: block;
    margin: 0 auto;
    padding: 0;
}

.image-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: nowrap;
    text-align: center;
    margin: 0 auto 10px auto;
    min-height: 200px;
    width: 100%;
}

.modal-img {
    width: 175px;
    height: auto;
    object-fit: contain;
    cursor: pointer;
    transition: all 0.3s ease;
    filter: drop-shadow(8px 8px 10px rgba(0, 0, 0, 0.3));
}

.modal-img.horizontal {
    width: 250px;
    margin-top: 125px;
}

.modal-img:hover {
    opacity: 0.7;
    transform: scale(1.05);
}

/* ============================================
   MODAL (Popup for enlarged images)
   ============================================ */

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 600px;
    object-fit: contain;
    animation: zoom 0.6s;
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    font-size: 18px;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
}

/* Modal Animation */
@keyframes zoom {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

/* ============================================
   MARQUEE
   ============================================ */

#movingBanner {
    margin-top: 20px;
    padding: 10px 0;
}

#movingBanner img {
    max-width: 65%;
    height: auto;
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */

#myBtn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 60px;
    z-index: 999;
    border: none;
    outline: none;
    background-color: black;
    color: white;
    cursor: pointer;
    padding: 15px;
    font-size: 40px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

#myBtn:hover {
    background-color: #555;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media only screen and (max-width: 800px) {
    #flex {
        flex-wrap: wrap;
    }

    #header {
        height: 60px;
        background-size: contain;
        margin-bottom: 0;
    }

    .main {
        margin-left: 0;
        padding: 10px;
    }

    .sidenav {
        width: 100%;
        height: auto;
        position: relative;
    }

    main {
        order: 1;
    }
}

@media only screen and (max-width: 700px) {
    .modal-content {
        width: 100%;
        max-height: 400px;
    }

    .modal-img {
        max-width: 120px;
        max-height: 120px;
    }

    .modal-img.horizontal {
        max-width: 180px;
        margin-top: 60px;
    }

    .image-grid {
        gap: 10px;
        min-height: 150px;
    }

    #myBtn {
        right: 20px;
        bottom: 20px;
        padding: 10px;
        font-size: 30px;
    }
}

@media only screen and (max-width: 500px) {
    .modal-img {
        max-width: 90px;
        max-height: 90px;
    }

    .modal-img.horizontal {
        max-width: 140px;
        margin-top: 40px;
    }

    .image-grid {
        gap: 5px;
        min-height: 120px;
    }

    main {
        padding: 10px;
    }

    #movingBanner img {
        max-width: 80%;
    }
}

@media screen and (max-height: 450px) {
    .sidenav {
        padding-top: 15px;
    }
    .sidenav a {
        font-size: 18px;
    }
}