/* ----------------------------------------------
   Mar-a-Lago Ballroom Ultra Edition
   - maximum gold energy
   - animated foil
   - signature PNG
   - corrected spacing & hierarchy
---------------------------------------------- */

/* ----------------------------------------------
   GLOBAL
---------------------------------------------- */
body {
    margin: 0;
    padding: 0;
    background-color: #4c3b1a;
    font-family: "Garamond", "Georgia", serif;
    color: #4c3b1a;
    line-height: 1.5;
    position: relative;
    z-index: 0;
    overflow-x: hidden;
}

/* LAYER 1: background tile + grain + vignette */
body::before {
    content: "";
    position: fixed;   /* stays locked when scrolling */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;

    /* BACKGROUND STACK (tile → grain → vignette) */
    background:
        /* tile pattern */
        url('/assets/images/background-tile.png') repeat,

        /* noise grain (CSS-filtered, subtle) */
        repeating-linear-gradient(
            45deg,
            rgba(255,255,255,0.05) 0px,
            rgba(255,255,255,0.05) 1px,
            rgba(0,0,0,0.05) 1px,
            rgba(0,0,0,0.05) 2px
        ),

        /* vignette */
        radial-gradient(
            circle at center,
            rgba(0,0,0,0) 50%,
            rgba(0,0,0,0.35) 100%
        );

    background-size:
        250px 250px,  /* tile size */
        auto,         /* grain covers full screen */
        100% 100%;    /* vignette stretches */

    opacity: 0.33;  /* master fade control for all layers */

    pointer-events: none;
    z-index: -1;
}


/* ----------------------------------------------
   GOLD SHIMMER
---------------------------------------------- */
@keyframes goldShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ----------------------------------------------
   GLOBAL LINKS
---------------------------------------------- */
a {
    color: #4c3b1a;
    text-decoration: underline;
    text-decoration-color: #c8a75f;
    text-underline-offset: 3px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover {
    color: #2a1f0e;
    text-decoration-color: #a98c4f;
}

a:visited {
    color: #4c3b1a;
}

/* ----------------------------------------------
   PAGE WRAPPER (foil animated border)
---------------------------------------------- */
@keyframes foilBorder {
    0%   { border-color: #d4af37; box-shadow: 0 0 25px rgba(212,175,55,0.5); }
    25%  { border-color: #f7e7b0; box-shadow: 0 0 25px rgba(247,231,176,0.5); }
    50%  { border-color: #c9a03f; box-shadow: 0 0 25px rgba(201,160,63,0.6); }
    75%  { border-color: #f7e7b0; box-shadow: 0 0 25px rgba(247,231,176,0.5); }
    100% { border-color: #d4af37; box-shadow: 0 0 25px rgba(212,175,55,0.5); }
}

.page-wrap {
    max-width: 860px;
    margin: 60px auto;
    padding: 50px 60px;
    background: #fffdf7;
    border: 5px solid #d4af37;
    position: relative;
    animation: foilBorder 6s ease-in-out infinite;
}

.page-wrap:before {
    content: "";
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 12px;
    right: 12px;
    border: 2px solid #e0c88b;
    pointer-events: none;
}

/* ----------------------------------------------
   HEADER
---------------------------------------------- */
.inset-header {
    text-align: center;
    margin-bottom: 35px;
    padding-top: 10px !important;
    padding-bottom: 5px !important;
    position: relative;
}

/* Ensure header top row works */
.header-top-row {
    position: relative;
    height: 24px;
    width: 100%;
}

/* ----------------------------------------------
   NAVIGATION — LEFT (Home / Random Letter)
---------------------------------------------- */
.top-left-nav {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    gap: 14px; /* spacing between items */
}

/* Keep the divider centered */
.top-left-nav .divider span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 10px;   /* fixed width so it's perfectly centered */
    text-align: center;
    opacity: 0.45;
}

.top-left-nav a {
    color: #4c3b1a;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: #c8a75f;
    margin-right: 14px;
    font-size: 16px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.top-left-nav a:hover {
    color: #3a2f14;
    text-decoration-color: #a98c4f;
}

/* ----------------------------------------------
   NAVIGATION — RIGHT (Newer / Older)
---------------------------------------------- */
.top-right-nav {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 16px;
}

.top-right-nav a {
    color: #4c3b1a;
    text-decoration: underline;
    text-decoration-color: #c8a75f;
    text-underline-offset: 3px;
    margin-left: 0px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.top-right-nav a:hover {
    color: #3a2f14;
    text-decoration-color: #a98c4f;
}

.top-right-nav .divider {
    margin: 0 10px;
    opacity: 0.45;
}

/* ----------------------------------------------
   MINI SEAL ABOVE LOGO
---------------------------------------------- */
@keyframes sealShimmer {
    0%   { filter: brightness(0.92) sepia(0.45) saturate(1.05); }
    40%  { filter: brightness(1.18) sepia(0.45) saturate(1.15); }
    60%  { filter: brightness(1.22) sepia(0.45) saturate(1.20); }
    100% { filter: brightness(0.92) sepia(0.45) saturate(1.05); }
}

.inset-eagle img {
    width: 144px;
    opacity: 0.95;
    display: block;
    margin: 0 auto 12px auto;
     /* NO shimmer */
    animation: none !important;
    filter: drop-shadow(0px 2px 2px rgba(0,0,0,0)) brightness(1) contrast(1.15) sepia(0.45);
}

@media (max-width: 600px) {
    .inset-eagle img { width: 90px; }
}

/* ----------------------------------------------
   LOGO
---------------------------------------------- */
.inset-logo {
    display: block;
    font-family: "Merriweather", Georgia, serif;
    font-weight: 900;
    font-size: 56px;
    letter-spacing: 2px;
    text-transform: uppercase;

    color: #4c3b1a;
    text-decoration: none !important;

    text-shadow:
        1px 1px 1px rgba(255,255,255,0.35),
        -1px -1px 1px rgba(150,120,40,0.45);

    margin-bottom: 6px;
}

.inset-logo:hover {
    color: #4c3b1a;
    text-decoration: none !important;
}

/* Header divider */
.header-divider {
    width: 100%;
    height: 2px;
    margin-top: 30px !important;
    margin-bottom: 8px !important;
    background: linear-gradient(
        to right,
        rgba(208,194,172,0),
        rgba(208,194,172,0.55),
        rgba(208,194,172,0.8),
        rgba(208,194,172,0.55),
        rgba(208,194,172,0)
    );
}

.header-tagline {
    margin-top: 0 !important;
    margin-bottom: 24px !important;
    padding: 0 !important;
}

/* ----------------------------------------------
   LETTER TITLE + META
---------------------------------------------- */
.letter-title {
    font-family: "Merriweather", Georgia, serif;
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
    line-height: 1.2;
    background: linear-gradient(90deg,#4c3b1a,#7b6337,#4c3b1a);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: goldShimmer 14s ease-in-out infinite;
}

.homepage .letter-title { font-size: 28px; }

.letter-meta {
    text-align: center;
    color: #6b5c3a;
    font-style: italic;
    font-size: 16px;
    margin-bottom: 35px;
}

/* ----------------------------------------------
   LETTER BODY
---------------------------------------------- */
.letter-body {
    font-size: 18px;
    white-space: pre-wrap;
    margin-bottom: 5px;
    text-align: justify;
    position: relative;
    z-index: 1;
}

.letter-body::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 420px;
    height: 420px;
    transform: translate(-50%, -50%);
    background: url('/assets/images/presidential-seal.png') no-repeat center center;
    background-size: contain;
    opacity: 0.08;
    z-index: -1;
    pointer-events: none;
    filter: brightness(0.3) contrast(1.1);
}

.letter-body p {
    margin-top: 0.25em;
    margin-bottom: 0.6em;
}

/* ----------------------------------------------
   SIGNATURE
---------------------------------------------- */
.signature {
    text-align: left;
    margin-top: 30px;
}

.signature img {
    width: 500px;
    max-width: 100%;
}

/* ----------------------------------------------
   TAGS
---------------------------------------------- */
.tag-list {
    margin-top: 35px;
    text-align: center;
}

.letter-list-item .tag-list {
    margin-top: 35px;
    text-align: left;
}

.tag-list a {
    display: inline-block;
    background: #f7f0da;
    padding: 7px 14px;
    border-radius: 20px;
    border: 1px solid #c8a75f;
    color: #6b5423;
    font-size: 14px;
    text-decoration: none;
    margin-right: 10px;
}

.tag-list a:hover {
    background: #ecd9af;
    border-color: #b7914d;
}

/* ----------------------------------------------
   FOOTER
---------------------------------------------- */
.footer {
    text-align: center;
    font-size: 14px;
    color: #6f6b64;
    margin-top: 40px;
    padding-top: 25px;
    border-top: none;
}

.footer::before {
    content: "";
    display: block;
    width: 100%;
    height: 2px;
    margin-bottom: 20px;
    background: linear-gradient(
        to right,
        rgba(208,194,172,0),
        rgba(208,194,172,0.55),
        rgba(208,194,172,0.8),
        rgba(208,194,172,0.55),
        rgba(208,194,172,0)
    );
}

/* ----------------------------------------------
   LETTER LIST
---------------------------------------------- */
.letter-list-title a {
    text-decoration: none;
    color: inherit;
}

.letter-list-title a:hover {
    text-decoration: underline;
    text-decoration-color: #c8a75f;
    text-underline-offset: 3px;
}

.letter-list-item {
    padding: 28px 0;
    border-bottom: 1px solid rgba(212,175,55,0.18);
}

.letter-list-item:last-child {
    border-bottom: none;
}

.letter-share {
    padding: 12px 0;
    margin: 25px 0;
    border-top:1px solid rgba(212,175,55,0.18);
    border-bottom:1px solid rgba(212,175,55,0.18);
}

/* ----------------------------------------------
   MOBILE HEADER FIX — STACK NAV ROWS
---------------------------------------------- */
@media (max-width: 640px) {
    
    
    .inset-logo {
    font-size: 40px;
    margin-bottom: 6px;
}
    
    

    .header-top-row {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px; /* space between stacked rows */
        text-align: center;
    }

    .top-left-nav,
    .letter-nav-links {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    /* Makes sure the divider stays centered */
    .letter-nav-links .divider {
        display: none; /* optional: remove | on small screens */
    }

}
