/* ================================================================
   USPS.COM INSPIRED — Official Government-Service Aesthetic
   White canvas · Navy blue · Red accent · Clean sans-serif
   ================================================================ */

/* ── DESIGN TOKENS ─────────────────────────────────────────── */
:root {
    /* backgrounds */
    --u-white:       #ffffff;
    --u-offwhite:    #f7f7f7;
    --u-light-blue:  #e8eef5;
    --u-pale:        #f0f4f8;

    /* primary navy — USPS brand */
    --u-navy:        #333366;
    --u-navy-dark:   #1e1e45;
    --u-navy-mid:    #3d4d8a;
    --u-navy-light:  #4a5fa8;
    --u-navy-tint:   rgba(51,51,102,0.08);

    /* red accent — USPS red */
    --u-red:         #cc0000;
    --u-red-dark:    #a30000;
    --u-red-tint:    rgba(204,0,0,0.08);

    /* text */
    --u-text:        #1a1a1a;
    --u-text-mid:    #333333;
    --u-text-soft:   #555555;
    --u-text-muted:  #777777;
    --u-text-dim:    #aaaaaa;

    /* borders */
    --u-border:      #d8dde6;
    --u-border-soft: #e8ecf1;
    --u-border-navy: rgba(51,51,102,0.25);

    /* type */
    --ff: Arial, 'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', sans-serif;

    /* misc */
    --dur: 0.15s;
    --mw: 1240px;
    --gap: 16px;
    --r: 3px;
}

/* ── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background: var(--u-offwhite);
    color: var(--u-text);
    font-family: var(--ff);
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
}
a { color: var(--u-navy); text-decoration: none; transition: color var(--dur); }
a:hover { color: var(--u-red); text-decoration: underline; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
.uf::after { content: ''; display: table; clear: both; }

/* ── LAYOUT ─────────────────────────────────────────────────── */
.up-center {
    width: 100%;
    max-width: var(--mw);
    margin: 0 auto;
    padding: 0 var(--gap);
}

/* ================================================================
   SITE HEADER — USPS white header with navy nav accent
   ================================================================ */
.up-header {
    background: var(--u-white);
    border-bottom: 3px solid var(--u-navy);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.up-header-row {
    display: flex;
    align-items: center;
    height: 58px;
    gap: 0;
    flex-wrap: nowrap;
}

.up-brand {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: nowrap;
    min-width: 0;
}

.up-sitename {
    font-family: var(--ff);
    font-size: 22px;
    font-weight: 700;
    font-style: normal;
    color: var(--u-navy);
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: -0.3px;
    line-height: 1;
}
.up-sitename:hover { color: var(--u-red); text-decoration: none; }

/* red slash accent (like USPS eagle logo area) */
.up-brand-slash {
    width: 3px;
    height: 28px;
    background: var(--u-red);
    margin: 0 14px;
    flex-shrink: 0;
    border-radius: 1px;
}

.up-domain-cluster {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    white-space: nowrap;
}

.up-domain-lbl {
    font-size: 11px;
    font-weight: 600;
    color: var(--u-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    background: var(--u-navy-tint);
    padding: 2px 6px;
    border-radius: var(--r);
}

.up-domain-url {
    font-size: 15px;
    font-weight: 700;
    color: var(--u-navy);
    letter-spacing: 0.2px;
}

/* ================================================================
   PROMO STRIP
   ================================================================ */
.up-promo {
    margin: 5px 0 3px;
    overflow: hidden;
}

/* ================================================================
   CATEGORY NAV — USPS horizontal nav style
   ================================================================ */
.up-catnav {
    background: var(--u-white);
    border: 1px solid var(--u-border);
    border-top: 2px solid var(--u-navy);
    border-radius: 0 0 var(--r) var(--r);
    padding: 4px 0 3px;
    margin-bottom: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.up-navrow {
    display: flex;
    align-items: flex-start;
    padding: 3px 10px;
    border-bottom: 1px solid var(--u-border-soft);
}
.up-navrow:last-child { border-bottom: none; padding-bottom: 0; }

.up-zone-tag {
    flex-shrink: 0;
    width: 60px;
    font-size: 10px;
    font-weight: 700;
    color: var(--u-white);
    background: var(--u-navy);
    border-radius: var(--r);
    padding: 3px 2px;
    text-align: center;
    line-height: 1.4;
    margin-right: 10px;
    margin-top: 2px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.up-zone-links {
    display: flex;
    flex-wrap: wrap;
    flex: 1;
    align-items: center;
    gap: 1px 3px;
}

.up-zone-links a {
    font-size: 13px;
    color: var(--u-navy-mid);
    padding: 2px 8px;
    border-radius: var(--r);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color var(--dur), background var(--dur), border-color var(--dur);
    text-decoration: none;
}
.up-zone-links a:hover {
    color: var(--u-navy-dark);
    background: var(--u-navy-tint);
    border-bottom-color: var(--u-navy);
    text-decoration: none;
}
.up-zone-links a.active {
    color: var(--u-navy-dark);
    font-weight: 600;
    background: var(--u-navy-tint);
    border-bottom-color: var(--u-red);
}

/* ================================================================
   SEARCH BAR — USPS "Search or Track" style
   ================================================================ */
.up-searchbar {
    background: var(--u-white);
    border: 1px solid var(--u-border);
    border-left: 4px solid var(--u-navy);
    border-radius: var(--r);
    padding: 8px 12px;
    margin-bottom: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.up-sform {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: nowrap;
    width: 100%;
}

.up-sform input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 36px;
    background: var(--u-white);
    border: 1px solid var(--u-border);
    border-radius: var(--r);
    color: var(--u-text);
    font-family: var(--ff);
    font-size: 13px;
    padding: 0 12px;
    outline: none;
    transition: border-color var(--dur), box-shadow var(--dur);
}
.up-sform input[type="text"]:focus {
    border-color: var(--u-navy);
    box-shadow: 0 0 0 2px var(--u-navy-tint);
}
.up-sform input[type="text"]::placeholder { color: var(--u-text-dim); }

.up-sform button {
    flex-shrink: 0;
    height: 36px;
    background: var(--u-navy);
    color: var(--u-white);
    border: none;
    border-radius: var(--r);
    font-family: var(--ff);
    font-size: 12px;
    font-weight: 700;
    padding: 0 13px;
    cursor: pointer;
    white-space: nowrap;
    letter-spacing: 0.3px;
    transition: background var(--dur);
}
.up-sform button:hover { background: var(--u-red); }

/* ================================================================
   HOT TAGS — USPS "Quick Tools" style
   ================================================================ */
.up-tagszone {
    background: var(--u-white);
    border: 1px solid var(--u-border);
    border-radius: var(--r);
    padding: 6px 12px;
    margin-bottom: 4px;
}

.up-tags-cap {
    font-size: 11px;
    font-weight: 700;
    color: var(--u-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 5px;
}
.up-tags-cap b { color: var(--u-red); }

.up-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
}

.up-tags-row .up-tag {
    display: inline-block;
    background: var(--u-light-blue);
    border: 1px solid var(--u-border-navy);
    color: var(--u-navy-mid);
    font-size: 12px;
    padding: 2px 9px;
    border-radius: 12px;
    white-space: nowrap;
    transition: background var(--dur), color var(--dur), border-color var(--dur);
    text-decoration: none;
}
.up-tags-row .up-tag:hover {
    background: var(--u-navy);
    color: #fff;
    border-color: var(--u-navy);
    text-decoration: none;
}

/* ================================================================
   CONTENT SECTION — USPS card panel
   ================================================================ */
.up-section {
    background: var(--u-white);
    border: 1px solid var(--u-border);
    border-top: 3px solid var(--u-navy);
    border-radius: var(--r);
    padding: 10px 12px 8px;
    margin-bottom: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.up-sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 7px;
    margin-bottom: 9px;
    border-bottom: 1px solid var(--u-border-soft);
}

.up-sec-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--u-navy);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.up-sec-title a { color: var(--u-navy); text-decoration: none; }
.up-sec-title a:hover { color: var(--u-red); text-decoration: none; }

.up-sec-meta { font-size: 11px; color: var(--u-text-muted); }

/* ================================================================
   FILM GRID
   ================================================================ */
.up-filmgrid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    list-style: none;
    padding: 0;
}

.up-filmgrid li { display: flex; flex-direction: column; }

.up-film-img {
    display: block;
    position: relative;
    overflow: hidden;
    background: var(--u-pale);
    aspect-ratio: 600 / 350;
    border: 1px solid var(--u-border);
    border-radius: var(--r);
    transition: border-color var(--dur), box-shadow var(--dur), transform var(--dur);
}
.up-film-img:hover {
    border-color: var(--u-navy);
    box-shadow: 0 3px 12px rgba(51,51,102,0.18);
    transform: translateY(-1px);
}
.up-film-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}
.up-film-img:hover img { transform: scale(1.04); }

.up-film-txt { padding: 4px 1px 2px; }
.up-film-txt h5 {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--u-text-soft);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.up-film-txt h5 a { color: var(--u-text-soft); text-decoration: none; }
.up-film-txt h5 a:hover { color: var(--u-navy); text-decoration: none; }

/* ================================================================
   DETAIL PAGE
   ================================================================ */
.up-dt-head {
    background: var(--u-white);
    border: 1px solid var(--u-border);
    border-top: 3px solid var(--u-red);
    border-radius: var(--r);
    text-align: center;
    padding: 14px 16px;
    font-size: 16px;
    line-height: 1.8;
    word-break: break-all;
    margin-bottom: 4px;
    color: var(--u-text);
}
.up-dt-head a {
    color: var(--u-navy);
    font-weight: 700;
    margin-right: 6px;
    text-decoration: none;
}
.up-dt-head a:hover { color: var(--u-red); }

.up-dt-panel {
    background: var(--u-white);
    border: 1px solid var(--u-border);
    border-left: 4px solid var(--u-navy);
    border-radius: var(--r);
    font-size: 14px;
    line-height: 1.9;
    padding: 14px 18px;
    margin-bottom: 4px;
    color: var(--u-text-mid);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.up-dt-capture { margin-top: 10px; width: 100%; }
.up-dt-capture picture { display: block; width: 100%; }
.up-dt-capture picture img,
.up-dt-capture img {
    width: 100%; height: auto; display: block;
    border-radius: var(--r);
    border: 1px solid var(--u-border);
}

/* ================================================================
   ACTION BUTTONS
   ================================================================ */
.up-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 14px 0;
}

.up-action-btn {
    display: inline-flex;
    align-items: center;
    background: var(--u-navy);
    color: #fff;
    font-family: var(--ff);
    font-size: 13px;
    font-weight: 700;
    padding: 9px 22px;
    border-radius: var(--r);
    cursor: pointer;
    border: none;
    white-space: nowrap;
    letter-spacing: 0.4px;
    text-decoration: none;
    transition: background var(--dur), transform var(--dur), box-shadow var(--dur);
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.up-action-btn:hover {
    background: var(--u-red);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(204,0,0,0.2);
    text-decoration: none;
}

.up-dl-note {
    text-align: center;
    padding: 6px 0;
    font-size: 13px;
    color: var(--u-text-muted);
}
.up-dl-note a { color: var(--u-navy); font-weight: 600; }
.up-dl-note a:hover { color: var(--u-red); }

/* ================================================================
   SHARE ROW
   ================================================================ */
.up-share {
    background: var(--u-light-blue);
    border: 1px solid var(--u-border-navy);
    border-radius: var(--r);
    padding: 8px 12px;
    margin: 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.up-share-lbl {
    font-size: 12px;
    font-weight: 700;
    color: var(--u-navy);
    white-space: nowrap;
}
.up-share-url {
    flex: 1;
    font-family: monospace;
    font-size: 12px;
    color: var(--u-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.up-share-copy {
    flex-shrink: 0;
    background: var(--u-navy);
    border: none;
    color: #fff;
    border-radius: var(--r);
    padding: 5px 13px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--dur);
}
.up-share-copy:hover { background: var(--u-red); }

/* ================================================================
   VIDEO PLAYER
   ================================================================ */
.up-vplayer {
    margin: 6px 0;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--u-border);
    border-radius: var(--r);
}

/* ================================================================
   PAGINATION
   ================================================================ */
.up-pages { margin-top: 12px; padding-bottom: 6px; }
.up-pages-row {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 6px 0;
}
.up-pgbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px; height: 32px; padding: 0 9px;
    background: var(--u-white);
    border: 1px solid var(--u-border);
    border-radius: var(--r);
    color: var(--u-navy-mid);
    font-size: 13px;
    font-family: var(--ff);
    transition: background var(--dur), color var(--dur), border-color var(--dur);
    text-decoration: none;
}
.up-pgbtn:hover {
    background: var(--u-navy-tint);
    color: var(--u-navy);
    border-color: var(--u-border-navy);
    text-decoration: none;
}
.up-pgcur {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px; height: 32px; padding: 0 9px;
    background: var(--u-navy);
    border: 1px solid var(--u-navy);
    border-radius: var(--r);
    color: #fff;
    font-size: 13px;
    font-family: var(--ff);
    font-weight: 700;
}

/* ================================================================
   FOOTER
   ================================================================ */
.up-flinks-area {
    background: var(--u-white);
    border: 1px solid var(--u-border);
    border-radius: var(--r);
    padding: 8px 12px;
    margin-top: 5px;
}
.up-flinks-cap {
    font-size: 11px;
    font-weight: 700;
    color: var(--u-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}
.up-flinks-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 14px;
}
.up-flinks-list dd { margin: 0; }
.up-flinks-list a {
    font-size: 12px;
    color: var(--u-navy-mid);
    border-bottom: 1px solid var(--u-border);
    transition: color var(--dur), border-color var(--dur);
    text-decoration: none;
}
.up-flinks-list a:hover { color: var(--u-red); border-bottom-color: var(--u-red); text-decoration: none; }

.up-footer {
    background: var(--u-navy-dark);
    border-top: 3px solid var(--u-red);
    padding: 10px 0;
    margin-top: 5px;
}
.up-footer-txt {
    text-align: center;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    line-height: 1.8;
}

/* ================================================================
   HELPERS
   ================================================================ */
@media (max-width: 768px) { .only-pc { display: none !important; } }
@media (min-width: 769px) { .only-mob { display: none !important; } }

/* ================================================================
   RESPONSIVE
   ================================================================ */

/* ≤480px */
@media (max-width: 480px) {
    /* Zone tag: 15% */
    .up-zone-tag { width: 15%; font-size: 10px; padding: 2px 1px; margin-right: 4px; }
    .up-zone-links { width: 85%; }
    /* 4 per row, 2 rows for 8 items */
    .up-zone-links a {
        width: calc(25% - 4px);
        font-size: 12px;
        padding: 2px 2px;
        text-align: center;
    }
    /* Film: 2 columns */
    .up-filmgrid { grid-template-columns: repeat(2, 1fr); gap: 7px; }
    /* Search: single row, no wrap */
    .up-sform { flex-wrap: nowrap; }
    .up-sform input[type="text"] { font-size: 12px; padding: 0 8px; }
    .up-sform button { font-size: 11px; padding: 0 7px; }
    /* Brand */
    .up-sitename { font-size: 17px; }
    .up-domain-url { font-size: 13px; }
}

/* 481–768px */
@media (min-width: 481px) and (max-width: 768px) {
    .up-zone-tag { width: 15%; font-size: 10px; padding: 2px 2px; margin-right: 5px; }
    .up-zone-links { width: 85%; }
    .up-zone-links a {
        width: calc(25% - 5px);
        font-size: 13px;
        padding: 2px 3px;
        text-align: center;
    }
    .up-filmgrid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .up-sform { flex-wrap: nowrap; }
}

/* ≥769px PC */
@media (min-width: 769px) {
    .up-zone-links a { flex: 1; text-align: center; }
    .up-filmgrid { grid-template-columns: repeat(4, 1fr); }
}
