/* Import font */
@import url('https://fonts.googleapis.com/css2?family=IM+Fell+English+SC&display=swap');

/* Reset and base */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    line-height: 1.6;
    font-family: 'IM Fell English SC', serif;
    font-size: 1rem;
    background: #faf0d7;
    /* parchment */
    color: #4b382a;
    /* dark brown */
}

a {
    color: #dbc59a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.section-content a {
    color: #3c2f1f;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #a8743f;
    text-decoration: underline solid;
}

/* Header and Nav */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #5a432b;
    /* dark walnut brown */
    color: #dbc59a;
    /* light warm beige */
    box-shadow: inset 0 -4px 0 #3c2f1f;
    font-family: 'IM Fell English SC', serif;
}

footer {
    width: 100%;
    text-align: center;
    padding: 1rem;
}

.logo {
    font-weight: bold;
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    color: #dbc59a;
}

nav {
    position: relative;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-links a {
    font-weight: 600;
    font-family: 'IM Fell English SC', serif;
    text-shadow: 1px 1px 0 #3c2f1f;
    font-variant: small-caps;
    font-size: 1.25rem;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.5rem;
    display: block;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a:focus {
    color: #a8743f;
    /* golden highlight */
    text-decoration: underline solid;
    text-shadow: 1px 1px 3px #a8743f;
}

/* Hamburger menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: #dbc59a;
    border-radius: 1px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

/* Responsive navigation for mobile */
@media (max-width: 2048px) {
    .nav-links {
        position: absolute;
        top: 48px;
        right: 0;
        flex-direction: column;
        width: 180px;
        display: none;
        background-color: #5a432b;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }
}

/* Main Content */
main {
    padding: 80px 20px 40px;
    max-width: 900px;
    margin: auto;
}

section {
    max-width: 900px;
    margin: auto;
    position: relative;
}

h2 {
    font-family: 'IM Fell English SC', serif;
    font-size: 2.25rem;
    color: #5a432b;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 0 #dbc59a;
    border-bottom: none;
    line-height: 1.25;
    padding-bottom: 0.25rem;
}

h3 {
    font-family: 'IM Fell English SC', serif;
    font-size: 1.5rem;
    color: #6b503a;
    letter-spacing: 0.1em;
    margin-top: 0.25rem;
    margin-bottom: 0.75rem;
    text-shadow: 1px 1px 0 rgba(219, 197, 154, 0.7);
    padding-bottom: 0.25rem;
}

section p,
.section-content p {
    font-family: Georgia, serif;
    font-size: 1.15rem;
    color: #5a432b;
    text-align: justify;
    hyphens: auto;
    margin-top: 0;
    margin-bottom: 1rem;
}

.section-title-wrapper h2 {
    position: relative;
    margin-top: -70px;
    padding: 0 20px 0;
    z-index: 3;
    color: white !important;
    text-shadow: 1px 1px 3px rgba(90, 67, 43, 0.85);
}

/* Section images */
section img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    margin-bottom: 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    display: block;
    border-radius: 0;
}

/* Gallery styles */
.gallery h2 {
    border-bottom: none;
}

.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.gallery-grid img {
    width: calc(50% - 10px);
    aspect-ratio: 1 / 1;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
    box-shadow: 2px 2px 5px rgba(90, 67, 43, 0.6);
    border-radius: 0;
}

.gallery-grid img:hover,
.gallery-grid img:focus {
    transform: scale(1.05);
    outline: none;
}

@media (min-width: 600px) {
    .gallery-grid img {
        width: calc(25% - 10px);
    }
}

/* Divider image wrapper (not used in HTML but kept if planned) */
.section-title-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    user-select: none;
    pointer-events: none;
}

.section-title-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: none;
    border-radius: 0 !important;
}

.section-title-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(to top, rgba(90, 67, 43, 0.8), transparent);
    z-index: 1;
    border-radius: 0;
}

/* Section content padding */
.section-content {
    padding: 20px 20px 0px 20px;
}

/* Lightbox styles */
#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    cursor: default;
    padding: 40px 10px 60px;
    user-select: none;
}

#lightbox[hidden] {
    display: none;
}

#lightbox-img {
    max-width: 80%;
    max-height: 80%;
    border-radius: 0;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
    user-select: none;
}

/* Lightbox controls */
#lightbox-close,
#lightbox-arrow-left,
#lightbox-arrow-right {
    position: fixed;
    background: transparent;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    user-select: none;
    padding: 5px 12px;
    transition: color 0.3s ease;
    z-index: 1600;
    color: #a8743f;
    /* colored */
    text-shadow: 0 0 3px #442f12;
}

#lightbox-close {
    top: 20px;
    right: 20px;
    font-weight: bold;
}

#lightbox-arrow-left {
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
}

#lightbox-arrow-right {
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

#lightbox-close:hover,
#lightbox-close:focus,
#lightbox-arrow-left:hover,
#lightbox-arrow-left:focus,
#lightbox-arrow-right:hover,
#lightbox-arrow-right:focus {
    color: #dbc59a;
    text-shadow: 0 0 6px #dbc59a;
    outline: none;
}

/* Pagination dots */
#lightbox-pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

#lightbox-pagination button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: #888;
    cursor: pointer;
    transition: background-color 0.3s ease;
    padding: 0;
}

#lightbox-pagination button.active {
    background: white;
}

#lightbox-pagination button:hover,
#lightbox-pagination button:focus {
    background: #ccc;
    outline: none;
}

/* Responsive adjustments */

/* Mobile menu background/shadow */
@media (max-width: 2048px) {
    .nav-links {
        background-color: #5a432b;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    }
}

/* Gallery image width adjustment */
@media (min-width: 600px) {
    .gallery-grid img {
        width: calc(25% - 10px);
    }
}

/* Lightbox responsiveness */
@media(max-width: 600px) {
    #lightbox {
        padding: 10px 0 40px;
    }

    #lightbox-img {
        max-width: 100vw;
        max-height: 70vh;
        box-shadow: none;
        border-radius: 0;
    }

    #lightbox-arrow-left {
        top: auto;
        bottom: 40px;
        left: 25%;
        transform: translateX(-50%);
        font-size: 2rem;
    }

    #lightbox-arrow-right {
        top: auto;
        bottom: 40px;
        right: 25%;
        transform: translateX(50%);
        font-size: 2rem;
    }

    #lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 2rem;
    }

    #lightbox-pagination {
        margin-top: 10px;
        margin-bottom: 10px;
    }
}

@media (max-width: 600px) and (orientation: landscape) {
    #lightbox-img {
        max-height: 100vh;
        max-width: none;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    #lightbox-pagination {
        position: absolute;
        bottom: 15px;
        left: 50%;
        transform: translateX(-50%);
        margin: 0;
        gap: 8px;
        background: rgba(0, 0, 0, 0.3);
        padding: 4px 10px;
        border-radius: 20px;
    }

    #lightbox-pagination button {
        width: 14px;
        height: 14px;
    }

    #lightbox-arrow-left {
        bottom: auto;
        top: 50%;
        left: 10px;
        transform: translateY(-50%);
        font-size: 2.5rem;
    }

    #lightbox-arrow-right {
        bottom: auto;
        top: 50%;
        right: 10px;
        transform: translateY(-50%);
        font-size: 2.5rem;
    }
}

/* Scrollbar styles */
body::-webkit-scrollbar {
    width: 10px;
}

body::-webkit-scrollbar-track {
    background: #f2e6c9;
}

body::-webkit-scrollbar-thumb {
    background-color: #a8743f;
    border-radius: 10px;
    border: 2px solid #f2e6c9;
}

.icon {
    display: inline;
    width: 24px;
    margin-bottom: -6px
}