@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+Tibetan&display=swap');
/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* SMOOTH SCROLL */
html {
    scroll-behavior: smooth;
}

/* BODY */
body {
    font-family: Georgia, 'Times New Roman', serif;
    background: linear-gradient(
        180deg,
        #f5f1e6 0%,
        #f5f1e6 60%,
        rgba(212, 175, 55, 0.06) 100%
    );
    color: #2c2c2c;
    line-height: 1.6;
    font-size: 16.5px;
    letter-spacing: 0.3px;
    overflow-x: hidden;
}

/* SUBTLE PAPER / GRAIN TEXTURE OVERLAY */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: radial-gradient(rgba(0,0,0,0.02) 1px, transparent 1px);
    background-size: 3px 3px;
    opacity: 0.08;
    z-index: -1;
}

/* PARAGRAPHS */
p {
    font-size: 15.5px;
    line-height: 1.7;
    margin-bottom: 16px;
    color: #3a3a3a;
}

/* HEADER (STRONG MONASTIC STYLE) */
header {
    background: linear-gradient(to right, #5a0f0f, #7a1c1c);
    color: #d4af37;
    padding: 10px 20px;
    border-bottom: 0.5px solid rgba(212, 175, 55, 0.4);
    position: sticky;
    top: 0;
    z-index: 99999;
    overflow: hidden;
    isolation: isolate;
}

header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, #5a0f0f, #7a1c1c);
    z-index: -1;
}

header h2 {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
    line-height: 1;
}

header .nav-container h2 a,
header .nav-container h2 a:link,
header .nav-container h2 a:visited {
    color: #d4af37;
    text-decoration: none;
}


/* NAVIGATION */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 44px;
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px 14px;
    overflow-x: visible;
    white-space: normal;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 0;
    align-items: center;
}

nav ul::-webkit-scrollbar {
    display: none;
}

nav a {
    text-decoration: none;
    color: #f5e6c8;
    font-size: 14px;
    letter-spacing: 0.6px;
    line-height: 1;
    transition: opacity 0.3s ease;
}

nav a:hover {
    color: #d4af37;
}

nav a.active {
    color: #d4af37;
}

/* HERO */
#hero {
    position: relative;
    height: 90vh;
    background-image: url("assets/images/monastery.jpg");
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #f5e6c8;
}

/* DARK OVERLAY */
#hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45));
}

/* HERO TEXT */
#hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(2px);
}

#hero h1 {
    font-size: 52px;
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: 1px;
    line-height: 1.2;
    text-shadow: 0px 3px 8px rgba(0, 0, 0, 0.8);
}

#hero p {
    font-size: 22px;
    opacity: 1;
    color: #ffffff; /* slightly brighter than current */
    text-shadow: 0px 2px 8px rgba(0, 0, 0, 0.85); /* improves contrast */
}

/* SECTIONS */
section {
    padding: 80px 20px;
    width: 100%;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    scroll-margin-top: 70px;
}

/* ALTERNATING SECTION BACKGROUNDS */
section:nth-of-type(even) {
    background: linear-gradient(
        180deg,
        #f0e9d8 0%,
        rgba(212, 175, 55, 0.05) 100%
    );
}

section:nth-of-type(odd) {
    background: linear-gradient(
        180deg,
        #f5f1e6 0%,
        rgba(212, 175, 55, 0.04) 100%
    );
}

/* SECTION DIVIDER */

section, footer {
    position: relative;
    z-index: 1;
}

.section-container {
    max-width: 900px;
    margin: auto;
}

section h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #5a0f0f;
    letter-spacing: 0.5px;
}

h3 {
    font-size: 20px;
    margin-top: 30px;
    margin-bottom: 10px;
    opacity: 0.9;
}

/* DONATION */
#donate {
    background: linear-gradient(
        180deg,
        #eee6d8 0%,
        rgba(212, 175, 55, 0.05) 100%
    );
}

/* FOOTER */
footer {
    text-align: center;
    padding: 32px 20px;
    background: linear-gradient(to right, #3b0b0b, #7a1c1c);
    color: #d4af37;
    font-size: 11px;
    letter-spacing: 0.3px;
    border-top: 1px solid rgba(212, 175, 55, 0.4);
    text-shadow: 0px 1px 3px rgba(0,0,0,0.4);
    position: relative;
    z-index: 2;
}

footer p {
    margin: 0;
    font-weight: 600;
    color: #d4af37 !important;
}

/* READ MORE BUTTON */
.read-more-btn {
    margin-top: 10px;
    background: none;
    border: 1px solid rgba(0,0,0,0.2);
    padding: 6px 12px;
    font-size: 13px;
    color: #5a0f0f;
    letter-spacing: 0.5px;
    cursor: pointer;
}

.read-more-btn:hover {
    border-color: rgba(0,0,0,0.5);
}
/* MAP LINK (SUBTLE FOOTNOTE STYLE) */
.map-link {
    font-size: 13px;
    color: #5a0f0f;
    opacity: 0.65;
    margin-top: 8px;
}
.map-link a {
    color: inherit;
    text-decoration: none;
}

.map-link a:hover {
    opacity: 1;
    text-decoration: underline;
}
/* READ MORE CONTENT (HIDDEN BY DEFAULT) */
.read-more-content {
    display: none;
}
/* PICTURE ELEMENT COMPATIBILITY */
picture {
    display: block;
}

.gallery-item picture {
    width: 100%;
}

/* SECTION IMAGES */
.section-image {
    width: 100%;
    max-width: 820px;
    height: auto;
    object-fit: cover;
    margin: 20px 0 10px 0;
    border-radius: 6px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: block;
    transform-origin: center;
    cursor: pointer;
}

/* FOLKLORE IMAGE ADJUSTMENT (PORTRAIT FIX) */
#folklore .section-image {
    max-width: 520px;
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    margin: 20px auto 10px auto;
}

/* ABOUT SECTION IMAGE REFINEMENT */
#about .section-image {
    max-width: 620px;
    max-height: 820px;
    object-fit: contain;
}
/* ASSOCIATED SECTION PORTRAIT IMAGE FIX */
#associated .section-image {
    max-width: 420px;
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: contain;
    margin: 20px auto 10px auto;
}

.section-image:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
}


/* LIGHTBOX */
#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

#lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 6px;
}
/* GALLERY GRID */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

/* ARCHIVAL HEADING (GALLERY) */
.gallery-archival-heading {
    grid-column: 1 / -1;
    margin-top: 10px;
    margin-bottom: 10px;
}


.gallery-image {
    width: 100%;
    display: block;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.gallery-image:hover {
    transform: scale(1.015);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}


/* GALLERY CAPTIONS */
.gallery-item {
    display: flex;
    flex-direction: column;
}

.gallery-caption {
    font-size: 14px;
    color: #5a0f0f;
    margin-top: 8px;
    margin-bottom: 6px;
    line-height: 1.4;
    opacity: 0.85;
}

/* TIMELINE NOTE */
.timeline-note {
    font-size: 13px;
    color: #5a0f0f;
    opacity: 0.7;
    margin-bottom: 12px;
}
/* TIMELINE */
.timeline {
    position: relative;
    margin-top: 30px;
    padding-left: 30px;
    padding-top: 8px;
}

/* Vertical line */
.timeline::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 0;
    width: 2px;
    height: 100%;
    background: rgba(90, 15, 15, 0.2);
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

/* Dot on timeline */
.timeline-item::before {
    content: "";
    position: absolute;
    left: -22px;
    top: 5px;
    width: 10px;
    height: 10px;
    background: #d4af37;
    border-radius: 50%;
}

.timeline-year {
    display: inline-block;
    font-weight: 600;
    color: #7a1c1c;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.timeline-item p {
    margin: 0;
    color: #3a3a3a;
}

.timeline-item:last-child {
    margin-bottom: 10px;
}

/* REFERENCES SECTION */
.reference-list {
    margin-top: 20px;
    padding-left: 18px;
}

/* Tighter spacing between reference groups */
#references .reference-list {
    margin-bottom: 12px;
}

#references h3 + .reference-list {
    margin-top: 10px;
}

.reference-list li {
    margin-bottom: 8px;
    line-height: 1.45;
    color: #3a3a3a;
}

.reference-list em {
    font-style: italic;
}

.reference-note {
    margin-top: 20px;
    font-size: 14px;
    color: #5a0f0f;
    opacity: 0.8;
}

/* FOLKLORE SECTION */
#folklore {
    background-color: #f3ede0; /* slightly distinct from other sections */
    border-top: none;
    padding-top: 50px;
}

.folklore-note {
    font-size: 14px;
    color: #7a1c1c;
    opacity: 0.8;
    margin-bottom: 20px;
}

.folklore-item {
    margin-bottom: 18px;
    padding-left: 12px;
    border-left: 2px solid rgba(122, 28, 28, 0.3);
}

.folklore-item p {
    margin: 0;
    line-height: 1.6;
    color: #3a3a3a;
}

/* DONATION SECTION */
.donation-block {
    margin-top: 25px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.5);
    border-left: 3px solid #7a1c1c;
    border-radius: 4px;
}

.donation-block h3 {
    margin-bottom: 12px;
    color: #5a0f0f;
    font-size: 18px;
}

.donation-block ul {
    padding-left: 18px;
}

.donation-block li {
    margin-bottom: 8px;
}

.donation-block p {
    margin-bottom: 6px;
}

.donation-note {
    margin-top: 20px;
    font-size: 14px;
    color: #5a0f0f;
    opacity: 0.8;
}

/* DONATION ACCOUNT NOTE */
.donation-account-note {
    margin-top: 14px;
    padding-top: 10px;
    font-size: 13px;
    color: #5a0f0f;
    opacity: 0.78;
    line-height: 1.5;
    border-top: 1px solid rgba(212, 175, 55, 0.28);
}

/* ASSOCIATED HISTORICAL NARRATIVES */
#associated {
    background-color: #efe8d8; /* slightly distinct but subtle */
}

.associated-note {
    font-size: 14px;
    color: #7a1c1c;
    opacity: 0.8;
    margin-bottom: 20px;
}

.associated-item {
    margin-bottom: 20px;
    padding-left: 14px;
    border-left: 2px solid rgba(90, 15, 15, 0.25);
}

.associated-item p {
    margin-bottom: 12px;
    line-height: 1.6;
    color: #3a3a3a;
}

/* ASSOCIATED ARCHIVAL NOTE */
.associated-archive-note {
    margin-top: 18px;
    padding-top: 10px;
    font-size: 13px;
    color: #5a0f0f;
    opacity: 0.75;
    font-style: italic;
    text-align: left;
    max-width: 92%;
    border-top: 1px solid rgba(212, 175, 55, 0.4);
}

/* LINEAGE SECTION HEADINGS */
#lineage h3 {
    margin-top: 28px;
    margin-bottom: 14px;
    font-size: 20px;
    font-weight: 600;
    color: #7a1c1c;
    letter-spacing: 0.5px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.35);
}

#lineage h3:first-of-type {
    margin-top: 10px;
}
/* REFERENCES SECTION HEADINGS */
#references h3 {
    margin-top: 28px;
    margin-bottom: 12px;
    font-size: 20px;
    font-weight: 600;
    color: #5a0f0f;
    letter-spacing: 0.5px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.35);
}

#references h3:first-of-type {
    margin-top: 10px;
}
.image-caption {
    font-size: 13px;
    color: #5a0f0f;
    margin-top: 8px;
    margin-bottom: 8px;
    line-height: 1.5;
    opacity: 0.7;
    font-style: italic;
    max-width: 680px;
    text-align: center;
}

.image-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 30px auto;
    width: 100%;
}

#monks .image-wrapper:nth-of-type(odd) {
    margin-right: auto;
}

#monks .image-wrapper:nth-of-type(even) {
    margin-left: auto;
}

#monks .image-wrapper {
    max-width: 60%;
}

/* TIBETAN TEXT STYLING */
.tibetan-title,
.tibetan-inline,
.tibetan-footer {
    font-family: 'Noto Serif Tibetan', serif;
}

/* Hero Tibetan title */
.tibetan-title {
    font-size: 28px;
    color: #d4af37;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

/* Inline Tibetan (About section) */
.tibetan-inline {
    font-size: 18px;
    color: #7a1c1c;
    margin-bottom: 10px;
    opacity: 0.9;
}

/* Footer Tibetan */
.tibetan-footer {
    font-size: 14px;
    color: #d4af37;
    opacity: 0.7;
    margin-bottom: 6px;
}
/* VISIT SECTION IMAGE REFINEMENT */
#visit .section-image {
    max-width: 720px;
    max-height: 720px;
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* LHATSUN SECTION IMAGE REFINEMENT */
#lhatsun .section-image {
    max-width: 700px;
}

#lhatsun .image-wrapper {
    margin-top: 25px;
    margin-bottom: 50px;
}

.gallery-archival-heading h3 {
    font-size: 18px;
    font-weight: 600;
    color: #5a0f0f;
    letter-spacing: 0.5px;
    padding-top: 6px;
    padding-bottom: 6px;
    border-top: 1px solid rgba(212, 175, 55, 0.25);
    border-bottom: 1px solid rgba(212, 175, 55, 0.35);
    max-width: 240px;
}

/* EVENT ENTRY SPACING */
.event-entry {
    margin-bottom: 64px;
}

/* VIDEO STYLING */
.video-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 30px auto;
    max-width: 900px;
}

.video-wrapper video {
    width: 82%;
    max-width: 720px;
    border-radius: 6px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.video-caption {
    font-size: 13px;
    color: #5a0f0f;
    margin-top: 8px;
    line-height: 1.5;
    opacity: 0.7;
    font-style: italic;
    text-align: center;
    max-width: 680px;
}

@media (max-width: 768px) {
    .video-wrapper video {
        width: 95%;
    }

    #hero {
        height: 70vh;
    }

    #hero-content {
        max-width: 92%;
        padding: 16px;
    }

    header h2 {
        font-size: 16px;
        white-space: normal;
        text-align: center;
        line-height: 1.3;
    }

    header {
        padding: 10px 14px;
    }

    .nav-container {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        width: 100%;
    }

    nav ul {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 8px 12px;
        overflow: visible;
        white-space: normal;
        padding: 6px 0 10px 0;
    }

    nav {
        width: 100%;
        overflow: hidden;
    }

    nav a {
        display: inline-block;
        padding: 6px 4px;
        font-size: 13px;
        line-height: 1.3;
        text-align: center;
        letter-spacing: 0.3px;
    }

    #hero h1 {
        font-size: 34px;
        line-height: 1.2;
    }

    #hero p {
        font-size: 16px;
        line-height: 1.5;
    }

    section {
        padding: 64px 18px;
    }

    .section-container {
        width: 100%;
    }

    .section-image {
        max-width: 100%;
        width: 100%;
        height: auto;
        margin: 18px auto 10px auto;
    }

    #about .section-image,
    #visit .section-image,
    #folklore .section-image,
    #associated .section-image,
    #lhatsun .section-image {
        max-width: 100%;
        max-height: none;
    }

    .image-caption,
    .video-caption,
    .gallery-caption {
        font-size: 12.5px;
        line-height: 1.55;
        padding: 0 6px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .timeline {
        padding-left: 24px;
    }

    .timeline-item::before {
        left: -19px;
    }

    .event-entry {
        margin-bottom: 46px;
    }

    #monks .image-wrapper {
        max-width: 100%;
    }

    .events-closing-note,
    .research-note,
    .reference-note {
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* IDENTITY STRIP */
.identity-strip {
    text-align: center;
    padding: 18px 20px;
    background: rgba(212, 175, 55, 0.08);
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.identity-strip p {
    font-size: 14.5px;
    color: #5a0f0f;
    margin: 0;
    letter-spacing: 0.5px;
}

/* HOMEPAGE UPCOMING EVENT: remove this block after the event closes */
.upcoming-event {
    background: linear-gradient(180deg, #f5f1e6 0%, #efe4cc 100%);
}

.upcoming-event-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    gap: 42px;
    align-items: center;
}

.event-kicker {
    color: #8a1f1f;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.6px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.event-date {
    color: #8a1f1f;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
}

.event-rsvp {
    color: #5a0f0f;
    font-weight: 700;
    margin-top: 24px;
}

.upcoming-event-poster img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid rgba(90, 15, 15, 0.18);
    box-shadow: 0 18px 42px rgba(60, 30, 10, 0.18);
    cursor: pointer;
}

@media (max-width: 768px) {
    .upcoming-event-layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .event-date {
        font-size: 19px;
    }
}
/* END HOMEPAGE UPCOMING EVENT */

/* CONTACT SPACING */
.contact-spacing {
    height: 18px;
}

/* CONTACT LINKS */
.contact-list a {
    color: #5a0f0f;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.contact-list a:hover {
    opacity: 1;
    text-decoration: underline;
}
/* GALLERY NOTE */
.gallery-note {
    font-size: 14px;
    color: #5a0f0f;
    opacity: 0.8;
    margin-bottom: 18px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

/* EVENTS ARCHIVAL CLOSING NOTE */
.events-closing-note {
    margin-top: 3rem;
    font-size: 0.95rem;
    line-height: 1.8;
    color: #5a0f0f;
    opacity: 0.72;
    text-align: center;
    font-style: italic;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}
