/* ===== Alphanam Green Foundation – section "Trách nhiệm xã hội" + trang /green-foundation ===== */
:root {
  --agf-red: #d7262c;
  --agf-yellow: #ffd21f;
  --agf-bg: #f2f2f2;
  --agf-ink: #212529;   /* màu chữ chung của site */
  --agf-text: #212529;
  --agf-line: #cfcfcf;
}

.agf-section { background: var(--agf-bg); padding-top: 48px; padding-bottom: 72px; overflow: hidden; }
.agf-grid { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 48px; align-items: start; }

.agf-eyebrow { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--agf-ink); }
.agf-eyebrow::before { content: ""; width: 28px; height: 3px; background: linear-gradient(90deg, var(--agf-red) 0 50%, var(--agf-yellow) 50%); flex: none; }
.agf-heading { margin: 10px 0 18px; color: var(--agf-red); font-size: 45px; line-height: 1.3; font-weight: 700; }
.agf-intro { margin: 0; color: var(--agf-text); font-size: 18px; line-height: 1.5; }
.agf-more { margin-top: 28px; display: inline-flex; align-items: center; gap: 12px; padding: 12px 24px; border: 1.5px solid var(--agf-red); border-radius: 99px; color: var(--agf-red); text-decoration: none; font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; transition: background .2s, color .2s; }
.agf-more:hover { background: var(--agf-red); color: #fff; }

/* timeline năm */
.agf-timeline { position: relative; display: flex; justify-content: space-between; overflow-x: auto; scrollbar-width: none; padding: 4px 4px 0; }
.agf-timeline::-webkit-scrollbar { display: none; }
.agf-timeline::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 7px; height: 1px; background: var(--agf-line); }
.agf-timeline button { position: relative; z-index: 1; flex: none; background: none; border: 0; padding: 0 4px; cursor: pointer; font-size: 16px; font-weight: 500; color: #8a8a8a; display: grid; justify-items: center; gap: 12px; min-width: 44px; transition: color .2s; }
.agf-timeline button::after { content: ""; width: 9px; height: 9px; border-radius: 50%; border: 1px solid #9a9a9a; background: var(--agf-bg); transition: all .25s; margin-bottom: 3px; }
.agf-timeline button:hover { color: var(--agf-ink); }
.agf-timeline button[aria-selected="true"] { color: var(--agf-red); font-size: 20px; font-weight: 700; }
.agf-timeline button[aria-selected="true"]::after { width: 14px; height: 14px; margin-bottom: 1px; background: var(--agf-red); border-color: var(--agf-red); box-shadow: 0 0 0 4px rgba(215, 38, 44, .2); }

/* slider */
.agf-slide { position: relative; margin-top: 22px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #333; box-shadow: 0 20px 40px -18px rgba(0,0,0,.35); cursor: zoom-in; }
.agf-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .5s ease, transform 6s ease; }
.agf-img.agf-out { opacity: 0; }
.agf-slide:hover .agf-img:not(.agf-out) { transform: scale(1.04); }
.agf-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(20,8,8,.85) 0%, rgba(20,8,8,.35) 38%, transparent 62%); pointer-events: none; }
.agf-watermark { position: absolute; top: 8px; right: 22px; z-index: 1; font-size: 92px; font-weight: 900; line-height: 1; color: transparent; -webkit-text-stroke: 2px rgba(255,255,255,.75); pointer-events: none; }
.agf-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 0 26px 26px; display: flex; align-items: flex-end; gap: 20px; }
.agf-cap-text { flex: 1; min-width: 0; }
.agf-tag { display: flex; align-items: center; gap: 10px; color: var(--agf-yellow); font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.agf-tag::before { content: ""; width: 20px; height: 2px; background: var(--agf-yellow); }
.agf-title { margin: 8px 0 0; color: #fff; font-size: 24px; line-height: 1.35; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.agf-count { margin-top: 6px; color: rgba(255,255,255,.8); font-size: 14px; }
.agf-nav { display: flex; gap: 10px; flex: none; }
.agf-nav button { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.85); background: rgba(0,0,0,.15); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; transition: background .2s, color .2s; }
.agf-nav button:hover { background: #fff; color: var(--agf-red); }
.agf-nav svg { width: 16px; height: 16px; }

.agf-section button:focus-visible, .agf-section a:focus-visible, .agf-slide:focus-visible,
.agf-page button:focus-visible, .agf-card:focus-visible, .agf-lb button:focus-visible { outline: 3px solid #1c6dd0; outline-offset: 2px; }

/* ===== lightbox ===== */
.agf-lb { position: fixed; inset: 0; z-index: 2000; background: rgba(10, 8, 8, .95); color: #fff; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; padding: 12px 16px; }
.agf-lb[hidden] { display: none; }
.agf-lb-top { display: flex; align-items: flex-start; gap: 16px; }
.agf-lb-top h3 { margin: 0; font-size: 18px; font-weight: 500; flex: 1; min-width: 0; line-height: 1.4; }
.agf-lb-top small { display: block; color: #bbb; font-size: 13px; margin-top: 2px; }
.agf-lb button { background: rgba(255,255,255,.1); border: 0; color: #fff; border-radius: 50%; width: 44px; height: 44px; cursor: pointer; display: grid; place-items: center; flex: none; padding: 0; }
.agf-lb button:hover { background: rgba(255,255,255,.22); }
.agf-lb button[hidden] { display: none; }
.agf-lb button svg { width: 20px; height: 20px; }
.agf-lb-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 12px 0; }
.agf-lb-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.agf-lb-prev, .agf-lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.agf-lb-prev { left: 0; } .agf-lb-next { right: 0; }
.agf-lb-counter { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); font-size: 13px; background: rgba(0,0,0,.5); padding: 2px 10px; border-radius: 99px; }
.agf-lb-thumbs { display: flex; gap: 8px; overflow-x: auto; padding-top: 4px; scrollbar-width: thin; }
.agf-lb-thumbs img { width: 72px; height: 50px; object-fit: cover; border-radius: 4px; opacity: .45; cursor: pointer; flex: none; border: 2px solid transparent; }
.agf-lb-thumbs img:first-child { margin-left: auto; }
.agf-lb-thumbs img:last-child { margin-right: auto; }
.agf-lb-thumbs img.on { opacity: 1; border-color: var(--agf-yellow); }
body.agf-lock { overflow: hidden; }

/* ===== trang /green-foundation ===== */
.agf-page-hero { background: var(--agf-bg); padding: 48px 0 36px; }
.agf-page-hero .agf-intro { max-width: 820px; }
.agf-year-nav { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid #e5e5e5; }
.agf-year-nav .container { display: flex; gap: 8px; overflow-x: auto; padding-top: 12px; padding-bottom: 12px; scrollbar-width: none; }
.agf-year-nav a { flex: none; padding: 6px 18px; border-radius: 99px; border: 1px solid var(--agf-line); color: var(--agf-text); text-decoration: none; font-size: 16px; font-weight: 500; }
.agf-year-nav a:hover, .agf-year-nav a.on { background: var(--agf-red); border-color: var(--agf-red); color: #fff; }
.agf-year-block { padding: 44px 0 8px; scroll-margin-top: 70px; }
.agf-year-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 22px; }
.agf-year-head .y { font-size: 56px; font-weight: 900; line-height: 1; color: transparent; -webkit-text-stroke: 2px var(--agf-red); }
.agf-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.agf-card { display: block; position: relative; border: 0; padding: 0; background: none; text-align: left; cursor: zoom-in; color: inherit; font: inherit; }
.agf-card .ph { position: relative; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: #ddd; }
.agf-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.agf-card:hover img { transform: scale(1.05); }
.agf-card .chip { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 3px 10px; border-radius: 99px; }
.agf-card h3 { margin: 14px 0 0; font-size: 18px; line-height: 1.6; font-weight: 700; color: var(--agf-ink); }
.agf-card:hover h3 { color: #d8343b; } /* giống a:hover của site */

/* ===== responsive ===== */
@media (max-width: 991px) {
  .agf-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .agf-right { order: -1; }
  .agf-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .agf-section { padding-top: 32px; padding-bottom: 48px; }
  .agf-heading { margin-bottom: 14px; }
  .agf-intro { font-size: 16px; }
  .agf-timeline { justify-content: flex-start; gap: 6px; margin-right: -12px; padding-right: 12px; }
  .agf-timeline::after { right: 0; }
  .agf-slide { aspect-ratio: 4 / 5; }
  .agf-watermark { font-size: 60px; right: 14px; }
  .agf-cap { padding: 0 16px 18px; flex-direction: column; align-items: stretch; gap: 14px; }
  .agf-title { font-size: 20px; }
  .agf-nav { justify-content: flex-end; }
  .agf-lb-thumbs img { width: 56px; height: 40px; }
  .agf-cards { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .agf-year-head .y { font-size: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .agf-section *, .agf-page * { transition: none !important; }
}

/* style.css của site đặt `img { height: auto !important }` cho mọi ảnh — ghi đè cho các ảnh cần phủ kín khung */
.agf-slide .agf-img,
.agf-card .ph img { height: 100% !important; }
.agf-lb-thumbs img { height: 50px !important; }
@media (max-width: 600px) { .agf-lb-thumbs img { height: 40px !important; } }
