/* Tinh Hoa Hàm Tân — rebuilt site */
:root{
  --ink:#22261f;
  --ink-soft:#5b6157;
  --paper:#faf8f3;
  --paper-2:#f3efe6;
  --teal:#1f5f5b;
  --teal-deep:#16423f;
  --gold:#c8a24a;
  --gold-soft:#e7d3a0;
  --line:#e3ddcf;
  --radius:16px;
  --shadow:0 2px 6px rgba(31,95,91,.06),0 14px 34px rgba(31,95,91,.10);
  --shadow-lg:0 8px 20px rgba(22,66,63,.14),0 30px 60px rgba(22,66,63,.20);
  --grad-top:linear-gradient(180deg,#fff,#fbf9f3);
}
*{box-sizing:border-box}
[hidden]{display:none!important}
img{max-width:100%;height:auto}
.app{overflow-x:hidden}
html{scroll-behavior:smooth}
body{
  margin:0;font-family:"Lato","Segoe UI",system-ui,-apple-system,Helvetica,Arial,sans-serif;
  color:var(--ink);background:
    radial-gradient(1200px 600px at 100% -10%,rgba(200,162,74,.08),transparent 60%),
    radial-gradient(900px 500px at -10% 20%,rgba(31,95,91,.06),transparent 55%),
    var(--paper);
  line-height:1.65;-webkit-font-smoothing:antialiased;
}
.skip{position:absolute;left:-9999px;top:0}
.skip:focus{left:8px;top:8px;z-index:99;background:#fff;padding:8px 14px;border-radius:8px}

/* top bar */
.topbar{
  position:sticky;top:0;z-index:50;display:flex;align-items:center;gap:18px;
  padding:12px 22px;background:linear-gradient(180deg,var(--teal-deep),var(--teal));
  color:#fff;box-shadow:0 2px 14px rgba(0,0,0,.18);
  border-bottom:3px solid var(--gold);
}
.brand{display:flex;align-items:center;gap:10px;background:none;border:none;color:#fff;cursor:pointer;padding:0}
.brand-mark{
  display:inline-grid;place-items:center;width:38px;height:38px;border-radius:50%;
  background:var(--gold);color:var(--teal-deep);font-weight:800;font-size:15px;letter-spacing:.5px;
}
.brand-text{font-size:17px;font-weight:700;letter-spacing:.3px;text-align:left}
.brand-text em{display:block;font-size:12px;font-weight:400;opacity:.85;font-style:normal;letter-spacing:2px}

/* nav */
.nav{display:flex;gap:4px;margin-left:auto;flex-wrap:wrap}
.nav a{
  color:#eaf3f0;text-decoration:none;padding:9px 13px;border-radius:999px;font-size:14.5px;font-weight:600;
  transition:.18s;
}
.nav a:hover{background:rgba(255,255,255,.12)}
.nav a.active{background:var(--gold);color:var(--teal-deep)}

/* layout */
.app{max-width:1060px;margin:0 auto;padding:26px 22px 90px}
.page-hero{border-radius:var(--radius);overflow:hidden;position:relative;box-shadow:var(--shadow-lg);margin-bottom:28px}
.page-hero img{display:block;width:100%;max-height:440px;object-fit:cover}
.page-hero .cap{position:absolute;left:0;right:0;bottom:0;padding:56px 30px 26px;color:#fff;
  background:linear-gradient(0deg,rgba(10,28,26,.78),rgba(10,28,26,.28) 55%,transparent)}
.page-hero .cap h1{margin:0 0 6px;font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(28px,5vw,42px);font-weight:700;line-height:1.15;text-shadow:0 2px 18px rgba(0,0,0,.5)}
.page-hero .cap p{margin:0;opacity:.92;font-size:15px}

.section-head{display:flex;align-items:center;gap:12px;margin:34px 0 18px}
.section-head::before{content:"";width:5px;height:26px;border-radius:3px;background:var(--gold);flex:0 0 auto}
.section-head::after{content:"";flex:1;height:1px;background:linear-gradient(90deg,var(--line),transparent)}
.section-head h2{margin:0;font-family:Georgia,serif;font-size:24px;color:var(--teal-deep);font-weight:700;letter-spacing:.2px}

/* cards grid */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:18px}
/* two-card grids (e.g. contact cards) collapse to fill the row — no empty column */
.grid.two{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
/* home grid: 5 cards; the last one spans 2 columns on wider screens so the
   final row fills (3 + (1+2)) instead of leaving an empty cell */
@media(min-width:720px){.grid .card.wide{grid-column:span 2}}
.card{
  background:var(--grad-top);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;
  box-shadow:var(--shadow);display:flex;flex-direction:column;transition:.2s;cursor:pointer;
  text-decoration:none;color:inherit;position:relative;
}
.card::after{content:"";position:absolute;left:0;right:0;top:0;height:4px;
  background:linear-gradient(90deg,var(--gold),var(--gold-soft));transform:scaleX(0);transform-origin:left;transition:transform .25s}
.card:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg);border-color:rgba(200,162,74,.5)}
.card:hover::after{transform:scaleX(1)}
.card img{width:100%;height:auto;display:block;background:var(--paper-2)}
.card .cover-none{aspect-ratio:4/3;display:grid;place-items:center;background:linear-gradient(135deg,var(--paper-2),#e7ddc8);color:var(--gold);font-size:46px}
.card .body{padding:18px;display:flex;flex-direction:column;gap:8px;flex:1}
.card h3{margin:0;font-family:Georgia,serif;font-size:20px;color:var(--teal-deep)}
.card .meta{font-size:13px;color:var(--ink-soft);font-weight:600;letter-spacing:.4px}
.card p{margin:0;color:var(--ink-soft);font-size:14.5px}
.card .more{margin-top:auto;display:inline-flex;align-items:center;gap:6px;color:var(--teal);font-weight:700;font-size:14px}
.card .more .arr{font-style:normal;transition:transform .2s}
.card:hover .more .arr{transform:translateX(4px)}
/* full-width intro card (contacts) — non-clickable, no hover lift */
.intro-card{background:var(--grad-top);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:20px 22px;margin:0 0 18px}

/* about roster tables */
.about-sect{margin:22px 0}
.about-h{font-family:Georgia,"Times New Roman",serif;font-size:30px;font-weight:700;color:#111;
  margin:34px 0 14px;padding-bottom:10px;border-bottom:3px solid var(--gold);text-transform:none;line-height:1.2;
  text-align:center}
.about-tbl{font-family:Georgia,serif;color:var(--teal-deep);font-size:21px;margin:0 0 10px}
table.about{width:100%;border-collapse:collapse;font-size:14px;background:#fff;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}
table.about th,table.about td{border:1px solid var(--line);padding:7px 9px;text-align:left;vertical-align:top}
table.about thead th{background:var(--teal);color:#fff;font-size:12.5px}
table.about tbody tr:nth-child(even){background:var(--paper)}
table.about td:first-child{white-space:nowrap;font-weight:600;color:var(--ink-soft)}

/* contact tables (copy-pasteable) — the column header is a separate non-scrolling
   table; the data rows scroll in their own container below it, so the header is
   never covered on any browser */
.addr-table{width:100%}
.addr-table .contacts{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;font-size:14px;border:1px solid var(--line)}
.addr-table .contacts th,.addr-table .contacts td{border:0;border-right:1px solid var(--line);border-bottom:1px solid var(--line);padding:7px 9px;text-align:left;vertical-align:top}
.addr-table .contacts th:last-child,.addr-table .contacts td:last-child{border-right:0}
/* header cells stay pinned on vertical scroll; the whole table scrolls
   horizontally together, so header + rows can never drift apart */
.addr-table .contacts thead th{position:sticky;top:0;z-index:2;background:var(--teal);color:#fff;font-size:12.5px;border-bottom:2px solid var(--teal-deep)}
.addr-table .addr-scroll{max-height:56vh;overflow:auto}
.addr-table .addr-scroll tbody tr:last-child td{border-bottom:0}
.addr-table .contacts tbody tr:nth-child(even){background:var(--paper)}
.addr-table .contacts td:first-child{white-space:nowrap;font-weight:600;color:var(--ink-soft)}
/* email column: allow wrapping so long addresses are never cut off */
.addr-table .contacts th:nth-child(6),.addr-table .contacts td:nth-child(6){white-space:normal;overflow-wrap:anywhere;word-break:break-word}
.copy-hint{font-size:13px;color:var(--ink-soft)}

/* news fund summary */
.fund-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:18px 20px;margin:0 0 22px;max-width:600px}
.fund-title{margin:0 0 12px;font-family:Georgia,serif;font-size:20px;color:var(--teal-deep)}
table.fund{width:100%;border-collapse:collapse;font-size:15px}
table.fund td{padding:7px 10px;border-bottom:1px solid var(--line)}
table.fund td:last-child{text-align:right;font-weight:700;color:var(--teal-deep);white-space:nowrap}

/* news feed — plain document style (bold date, body text, 2-col thumbnail grid) */
.news-item{padding:0 0 26px;border-bottom:1px solid var(--line);margin:0 0 22px}
.news-item:last-child{border-bottom:none}
.news-date{font-size:18px;font-weight:700;color:#111;margin:0 0 10px}
.news-body{color:#262626;font-size:16.5px;line-height:1.7}
.news-body p{margin:0 0 10px}
.news-imgs{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;margin-top:14px}
.news-imgs .news-thumb{width:100%;height:185px;object-fit:contain;border:1px solid var(--line);border-radius:6px;padding:5px;background:#fff;cursor:pointer}

/* prose (article / about content) */
.prose{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);
  padding:26px 30px;max-width:820px;margin:0 auto}
.prose p{font-size:17px;color:var(--ink)}
.prose a{color:var(--teal)}
.prose img{max-width:100%;height:auto;border-radius:8px;display:block;margin:14px auto}
.prose hr{border:none;border-top:1px solid var(--line);margin:22px 0}
.prose h1,.prose h2,.prose h3{font-family:Georgia,serif;color:var(--teal-deep)}
.prose blockquote{border-left:3px solid var(--gold);margin:16px 0;padding:6px 16px;color:var(--ink-soft);background:var(--paper)}

/* news list */
.list{display:flex;flex-direction:column;gap:14px}
.item{
  background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);
  padding:18px 20px;cursor:pointer;transition:.18s;
}
.item:hover{border-color:var(--gold);box-shadow:var(--shadow-lg)}
.item .date{font-size:12.5px;font-weight:700;letter-spacing:1px;color:var(--gold);text-transform:uppercase}
.item .txt{margin-top:8px;color:var(--ink);font-size:16px}
.item .txt p{margin:0 0 6px}
.item .badge{display:inline-block;margin-left:8px;font-size:11px;background:var(--paper-2);color:var(--ink-soft);
  padding:2px 8px;border-radius:999px;vertical-align:middle}

/* buttons */
.btn{
  display:inline-flex;align-items:center;gap:8px;justify-content:center;
  background:var(--teal);color:#fff;border:none;border-radius:999px;padding:11px 20px;
  font-weight:700;font-size:14.5px;cursor:pointer;transition:.18s;text-decoration:none;
}
.btn:hover{background:var(--teal-deep)}
.btn.gold{background:var(--gold);color:var(--teal-deep)}
.btn.gold:hover{background:var(--gold-soft)}
.center{text-align:center}

/* gallery */
.yearblock{margin-bottom:26px}
.yearblock>h3{display:flex;align-items:center;gap:10px;font-family:Georgia,serif;font-size:21px;color:var(--teal-deep);margin:0 0 12px}
.yearblock>h3::after{content:"";flex:1;height:1px;background:var(--line)}
.thumbs{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:8px}
.thumbs img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:8px;cursor:pointer;transition:.15s;background:var(--paper-2)}
.thumbs img:hover{transform:scale(1.03);box-shadow:var(--shadow)}
.video{position:relative;width:100%;aspect-ratio:16/9;border-radius:12px;overflow:hidden;background:#000;box-shadow:var(--shadow)}
.video iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.note{background:var(--paper-2);border-left:3px solid var(--gold);padding:14px 18px;border-radius:0 10px 10px 0;color:var(--ink-soft);font-size:14px}

/* overlay / sheet */
.overlay{position:fixed;inset:0;background:rgba(20,30,28,.55);z-index:200;display:flex;align-items:flex-end;justify-content:center}
@media(min-width:640px){.overlay{align-items:center}}
.sheet{background:var(--paper);width:100%;max-width:860px;max-height:92vh;display:flex;flex-direction:column;
  border-radius:18px 18px 0 0;overflow:hidden;box-shadow:var(--shadow-lg)}
@media(min-width:640px){.sheet{border-radius:18px;max-height:84vh}}
/* mobile: readers fill the whole screen (no wasted header) */
@media(max-width:639px){
  .overlay{align-items:stretch}
  .sheet{width:100%;height:100vh;height:100dvh;max-height:none;border-radius:0}
}
.sheet-head{display:flex;align-items:center;gap:12px;padding:15px 52px;background:linear-gradient(135deg,var(--teal-deep),var(--teal));color:#fff;position:sticky;top:0;z-index:10;flex:0 0 auto;border-bottom:3px solid var(--gold)}
.sheet-head h2{margin:0;flex:1;font-family:Georgia,serif;font-size:18px;text-align:center}
.icon{background:none;border:none;color:#fff;font-size:20px;cursor:pointer;line-height:1;position:absolute;right:18px;top:50%;transform:translateY(-50%)}
.sheet-body{flex:1;min-height:0;overflow-y:auto;padding:22px 24px;font-size:16px}
.sheet-body img{max-width:100%;height:auto;display:block;margin:0 auto 12px;border-radius:8px}

/* lightbox */
.lightbox{position:fixed;inset:0;background:rgba(0,0,0,.92);z-index:300;display:flex;align-items:center;justify-content:center;padding:24px}
.lightbox img{max-width:100%;max-height:92vh;border-radius:6px;box-shadow:var(--shadow-lg)}
.lightbox-close{position:absolute;top:16px;right:20px;background:none;border:none;color:#fff;font-size:30px;cursor:pointer}

/* bottom nav (mobile) */
.bottomnav{
  position:fixed;left:0;right:0;bottom:0;z-index:60;display:none;
  background:var(--teal-deep);box-shadow:0 -2px 12px rgba(0,0,0,.2);
  transition:transform .25s ease;
}
.bottomnav.hide{transform:translateY(105%)}
.bottomnav a{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;padding:9px 2px 11px;
  color:#e6efec;text-decoration:none;font-size:11px;font-weight:600;white-space:nowrap}
.bottomnav a .i{width:22px;height:22px;display:grid;place-items:center}
.bottomnav a .i svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.bottomnav a.active{color:var(--gold)}

footer{padding:26px 22px 40px;text-align:center;color:var(--ink-soft);font-size:13px}
footer a{color:var(--teal)}

@media(max-width:720px){
  .topbar{padding:10px 14px}
  .nav{display:none}
  .bottomnav{display:flex}
  .app{padding-bottom:120px}
  .page-hero .cap h1{font-size:24px}
}

/* tablet and up: use the horizontal space better */
@media(min-width:721px){
  .app{padding-bottom:40px}
  /* news: fund summary as a sticky sidebar next to the feed */
  .news-wrap{display:grid;grid-template-columns:280px 1fr;gap:26px;align-items:start}
  .news-side{position:sticky;top:82px}
  .news-side .fund-card{max-width:none}
  /* contacts: address link cards in the left rail */
  .news-side .side-card{margin-bottom:18px}
  .news-side .side-card .body{min-height:0;padding:16px 18px}
  .news-side .side-card .btn{margin-top:10px}
  /* books / collections cards use a bit more room */
  .grid{grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}
  .prose{max-width:900px}
}
@media(min-width:1024px){
  .news-wrap{grid-template-columns:300px 1fr}
}
