/*
 * GIỮ ĐẠO GIỮA ĐỜI | Bản hoàn thiện giao diện 03.11.2026
 * Một stylesheet tổng hợp. Không thay đổi bản gốc, hình, tài khoản hay nội dung.
 * Dùng sau styles.css, brand.css, portal.css để tránh các bản vá rời rạc.
 */
:root {
  --paper:#f7f5ef;
  --white:#fffefa;
  --ink:#233a32;
  --sub:#64716a;
  --green:#164d45;
  --green2:#27675a;
  --gold:#a8834b;
  --line:#e1ddd1;
  --pro-shadow:0 14px 40px rgba(24,57,45,.075);
}
html {scroll-behavior:smooth; scroll-padding-top:145px;}
body {background:var(--paper);color:var(--ink);overflow-x:clip;}
img {height:auto;}
button,a,input,textarea,select { -webkit-tap-highlight-color:transparent; }
:focus-visible {outline:3px solid #ad8650;outline-offset:3px;}
.section-anchor {scroll-margin-top:145px;}

/* Thương hiệu: không lạm dụng hiệu ứng, nhấn mạnh tên và nhận diện lịch sử. */
.site-header {background:rgba(248,246,240,.985);box-shadow:0 6px 22px rgba(29,50,41,.055);}
.portal-brand-row {min-height:84px;}
.portal-brand-row .brand-copy strong {font-weight:700;letter-spacing:.012em;}
.site-header .portal-nav {border-top-color:#e7e2d6;}
.portal-nav > a,.portal-nav > details > summary {border-radius:4px;}
.portal-nav .nav-contribute {background:#1a574d;}
.site-header .portal-nav .mega-menu {border-radius:0 0 7px 7px;}

/* Nhịp điệu & hệ chữ. */
.section {padding-block:clamp(58px,6.2vw,92px);}
.section-top {margin-bottom:29px;}
.section-top h2,.about h2 {font-size:clamp(29px,3.2vw,43px);line-height:1.38;letter-spacing:-.035em;}
.section-top p {max-width:690px;font-size:13px;line-height:1.9;}
.eyebrow {letter-spacing:.17em;}
.section-index {font-size:10px;letter-spacing:.13em;}
.hero-grid {min-height:520px;padding-block:57px 67px;}
.hero-copy>p {line-height:1.9;}
.btn {border-radius:5px;min-height:43px;}
.btn-primary {background:var(--green);}
.btn-primary:hover {background:var(--green2);}
.number-band {background:#ebe9df;}

/* Tra cứu Chức sắc: chân dung phải được thấy đủ, không cắt mặt, mão, đạo phục. */
.people-grid {gap:20px;}
.person-card {border-radius:7px;box-shadow:0 3px 14px rgba(17,47,38,.04);transition:transform .17s,box-shadow .17s;}
.person-card:hover {box-shadow:var(--pro-shadow);}
.person-media {background:#e4e7df;height:280px;}
.person-media img {object-fit:contain;object-position:center;background:#e4e7df;}
.person-body {padding:19px 20px 20px;}
.person-body h3 {font-size:clamp(18px,1.65vw,21px);letter-spacing:-.02em;}
.person-body p {line-height:1.78;}
.card-badge {background:#fbfaf0f0;border:1px solid #eee9dd;border-radius:3px;}
.filter-panel input,.filter-panel select {font-size:14px;}

/* BIÊN KHẢO: Ảnh bìa là phần tử riêng, KHÔNG dùng button 35x35 của giao diện cũ. */
.article-layout {
  display:grid;
  grid-template-columns:minmax(240px,.66fr) minmax(0,1.55fr);
  gap:clamp(20px,3vw,38px);
  align-items:start;
}
.article-feature {border-radius:7px;min-height:425px;padding:30px;background:linear-gradient(148deg,#1b554d,#113b35);}
.article-feature blockquote {font-size:clamp(18px,2vw,23px);line-height:1.85;}
.article-feature .feature-mark {opacity:.65;}
#article-list.article-list {
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:stretch;align-content:start;gap:18px;
  border:0;background:transparent;padding:0;
}
#article-list .article-row.editorial-article {
  min-width:0;margin:0;padding:0;display:flex;flex-direction:column;
  background:var(--white);border:1px solid var(--line);
  border-radius:7px;overflow:hidden;box-shadow:0 4px 16px rgba(20,45,37,.05);
  transition:box-shadow .16s ease,transform .16s ease;
}
#article-list .article-row.editorial-article:hover {transform:translateY(-2px);box-shadow:var(--pro-shadow);}
#article-list .editorial-image {
  /* Selector đủ mạnh để thắng .article-row button {width:35px;height:35px}. */
  display:flex;align-items:center;justify-content:center;position:relative;
  width:100%;height:auto;min-height:0;aspect-ratio:4/3;
  padding:12px;border:0;border-radius:0;
  background:linear-gradient(140deg,#e1e7df,#efeae0);
  overflow:hidden;cursor:pointer;flex:none;
}
#article-list .editorial-image.is-portrait {aspect-ratio:4/5;max-height:480px;}
#article-list .editorial-image.is-landscape {aspect-ratio:16/10;}
#article-list .editorial-image img {
  display:block;position:absolute;inset:12px;width:calc(100% - 24px);height:calc(100% - 24px);max-width:100%;max-height:100%;
  object-fit:contain;object-position:center;
  transition:transform .2s ease;
}
#article-list .editorial-image:hover img {transform:scale(1.015);}
#article-list .editorial-image img[hidden] {display:none!important;}
#article-list .editorial-placeholder {
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:9px;width:100%;min-height:180px;color:#59736a;text-align:center;
  font:600 13px/1.5 var(--serif);letter-spacing:.08em;
}
#article-list .editorial-placeholder span {font-size:36px;color:var(--gold);font-weight:400;}
#article-list .editorial-placeholder small {font:600 10px/1.4 var(--sans);color:#917e62;letter-spacing:.18em;}
#article-list .editorial-copy {
  min-width:0;display:flex;flex-direction:column;align-items:flex-start;
  gap:0;padding:19px 19px 18px;flex:1;
}
#article-list .editorial-copy .article-tag {display:block;color:#977243;font-size:10px;line-height:1.65;letter-spacing:.08em;}
#article-list .editorial-copy h3 {
  margin:10px 0 9px;color:#20493d;
  font:600 clamp(17px,1.5vw,21px)/1.56 var(--serif);letter-spacing:-.02em;
  overflow-wrap:anywhere;
}
#article-list .editorial-copy p {
  width:100%;flex:1;margin:0 0 18px;color:#637369;
  font:400 12px/1.8 var(--sans);
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden;
}
#article-list .editorial-read {
  align-self:stretch;display:flex;align-items:center;justify-content:space-between;gap:12px;
  width:100%;height:auto;min-height:38px;margin:0;padding:10px 0 0;
  border:0;border-top:1px solid var(--line);border-radius:0;
  color:#18594e;background:transparent;text-align:left;
  font:700 11px/1.5 var(--sans);cursor:pointer;
}
#article-list .editorial-read span {font-size:20px;line-height:1;}
#article-list .empty-state {grid-column:1/-1;}

/* Kho ảnh và các thư mục: các bản gốc không bị cắt khi thu nhỏ. */
.gallery-grid,.archive-grid {gap:19px;}
.gallery-card,.archive-card {border-radius:6px;box-shadow:0 4px 15px rgba(16,48,36,.045);}
.gallery-visual {height:240px;background:#e9ece6;}
.gallery-visual img {object-fit:contain;background:#e8ebe6;}
.gallery-visual::after {inset:14px;opacity:.55;}
.gallery-card>div:last-child {padding:16px 17px;}
.gallery-card h3 {font-size:15px;}
.gallery-card p {line-height:1.75;}
.archive-thumb {height:205px;background:#e8ece6;}
.archive-thumb>img {object-fit:contain;}
.archive-card-copy {padding:20px;}
.archive-card h3 {line-height:1.5;font-size:19px;}
.archive-card p {line-height:1.8;}
.video-archive-card .archive-thumb {background:#112f2b;}
.video-poster-button img {object-fit:contain;background:#142f2a;filter:brightness(.83);}
.video-play-badge {width:58px;height:58px;}
.video-poster-button:hover img {filter:brightness(.72);}

/* Trang chi tiết & quản trị: đọc lâu không mỏi mắt. */
.detail-panel,.admin-panel {background:#faf8f2;}
.detail-title {line-height:1.45;letter-spacing:-.035em;}
.detail-cover {height:auto;aspect-ratio:4/3;min-height:250px;max-height:540px;background:#e6e8e1;border:1px solid var(--line);border-radius:6px;}
.detail-cover img {object-fit:contain;width:100%;height:100%;}
.detail-body {font-size:15px;line-height:2.05;color:#2b4337;}
.detail-summary {line-height:1.85;}
.detail-source {border-radius:0 6px 6px 0;}
.admin-form input:not([type='checkbox']),.admin-form textarea,.admin-form select,
.contribute-form input:not([type='checkbox']),.contribute-form textarea,.contribute-form select {
  border-radius:5px;border-color:#d6d8cb;
}
.contribute-form {border-radius:7px;box-shadow:0 5px 18px rgba(22,55,42,.045);}
.editor-tabs {gap:7px;}
.editor-tabs button {border-radius:4px;}
.footer {background:#173f38;}

/* Tablet. */
@media(max-width:1060px) {
  .article-layout {grid-template-columns:1fr;gap:22px;}
  .article-feature {min-height:0;padding:27px 30px;}
  .article-feature .feature-mark {display:none;}
  .article-feature blockquote {margin:17px 0 19px;font-size:18px;}
  .article-feature>span {margin-top:0;}
  #article-list.article-list {grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:820px) {
  html {scroll-padding-top:95px;}
  .section-anchor {scroll-margin-top:95px;}
  .site-header .portal-nav {box-shadow:0 16px 25px rgba(20,46,35,.16);}
  .archive-thumb {height:190px;}
  .person-media {height:260px;}
}
/* Điện thoại iPhone/Android. */
@media(max-width:620px) {
  .wrap {width:calc(100% - 32px);}
  .section {padding-block:54px;}
  .section-top {margin-bottom:23px;}
  .section-top h2,.about h2 {font-size:clamp(28px,7.3vw,36px);}
  .hero-grid {padding-block:44px 50px;}
  .portal-brand-row {min-height:70px;gap:8px;}
  .portal-brand-row .brand-copy strong {font-size:clamp(12px,3.3vw,14px);}
  .portal-brand-row .brand-copy small {font-size:clamp(7px,1.95vw,8.5px);}
  .portal-brand-row .brand>img {width:46px;height:46px;flex-basis:46px;}
  .article-layout {gap:18px;}
  .article-feature {min-height:0;padding:24px 24px 25px;}
  .article-feature blockquote {font-size:16px;line-height:1.75;}
  #article-list.article-list {grid-template-columns:minmax(0,1fr);gap:18px;}
  #article-list .editorial-image {aspect-ratio:4/3;padding:12px;min-height:0;}
  #article-list .editorial-image.is-portrait {aspect-ratio:4/5;max-height:490px;}
  #article-list .editorial-image.is-landscape {aspect-ratio:16/10;}
  #article-list .editorial-copy {padding:18px 18px 16px;}
  #article-list .editorial-copy h3 {font-size:19px;line-height:1.58;}
  #article-list .editorial-copy p {font-size:12px;-webkit-line-clamp:3;}
  .people-grid {grid-template-columns:minmax(0,1fr);gap:15px;}
  .person-card {grid-template-columns:132px minmax(0,1fr);min-height:200px;}
  .person-media {height:100%;min-height:200px;}
  .person-media img {object-fit:contain;}
  .person-body {padding:15px 14px 15px;}
  .person-body h3 {font-size:17px;}
  .person-body p {font-size:11px;line-height:1.65;}
  .archive-grid {gap:16px;}
  .archive-card {grid-template-columns:118px minmax(0,1fr);}
  .archive-card .archive-thumb {height:100%;min-height:155px;}
  .archive-card-copy {padding:15px;}
  .archive-card h3 {font-size:16px;}
  .video-archive-card {grid-template-columns:1fr;}
  .video-archive-card .archive-thumb {height:auto;min-height:0;}
  .gallery-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
  .gallery-visual {height:165px;}
  .gallery-card>div:last-child {padding:11px;}
  .gallery-card h3 {font-size:13px;}
  .detail-panel,.admin-panel {padding:59px 21px 34px;}
  .detail-cover {min-height:210px;max-height:440px;}
  .detail-body {font-size:14px;}
  .contribute-form input:not([type='checkbox']), .contribute-form textarea,
  .contribute-form select,.admin-form input:not([type='checkbox']),
  .admin-form textarea,.admin-form select {font-size:16px;}
}
@media(max-width:370px) {
  .person-card {grid-template-columns:115px minmax(0,1fr);}
  .person-body h3 {font-size:15px;}
  .gallery-visual {height:145px;}
  .portal-brand-row .brand-copy strong {font-size:11px;}
  .portal-brand-row .brand>img {width:40px;height:40px;flex-basis:40px;}
  #article-list .editorial-copy h3 {font-size:18px;}
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {scroll-behavior:auto!important;transition-duration:0.01ms!important;animation-duration:0.01ms!important;}
}/* ==============================================================
   GIỮ ĐẠO GIỮA ĐỜI — TINH CHỈNH THẨM MỸ V1 | 04-11-2026
   Chỉ CSS: không thay đổi bài viết, dữ liệu, bộ lọc, menu, đăng bài.
   Dán một lần ở CUỐI professional-2026.css.
   =============================================================== */

/* 1. Nền giấy kem có chiều sâu, không cần ảnh nền và không tăng tải mạng. */
body .hero {
  background:
    radial-gradient(ellipse at 89% 18%, rgba(175,139,77,.085), transparent 44%),
    radial-gradient(ellipse at 7% 3%, rgba(36,87,74,.040), transparent 40%),
    linear-gradient(137deg, #faf9f5 0%, #f6f3eb 59%, #f0ede3 100%);
  border-bottom: 1px solid #e4dfd2;
}
body .hero-grid {
  min-height: 0;
  padding-top: clamp(52px, 5.3vw, 82px);
  padding-bottom: clamp(59px, 5.8vw, 88px);
}
body .hero-copy > p { color: #646e66; line-height: 1.88; }
body .hero-foot { margin-top: 36px; color: #898373; }
body .number-band {
  background: linear-gradient(105deg, #e9e8de 0%, #efede3 53%, #e7e6db 100%);
  border-top: 1px solid #e2dfd2;
  border-bottom: 1px solid #dedacb;
}

/* 2. Khu vực bài mới trên Trang Chủ: bố cục gọn và có phân cấp. */
body #gdd-directory {
  background: linear-gradient(180deg, #f8f6f0 0%, #f5f3eb 57%, #f8f6f1 100%);
  padding-top: clamp(38px, 4.5vw, 61px);
  padding-bottom: clamp(52px, 5vw, 78px);
}
body #gdd-directory .gdd-directory-desc { max-width: 680px; line-height: 1.85; }
body #gdd-directory .gdd-home-quick-nav { margin-bottom: 29px; }
body #gdd-directory .gdd-home-quick-nav a {
  border-color: #ddd9cd;
  background: #fffdf8;
  box-shadow: 0 2px 9px rgba(31,54,42,.025);
}
body #gdd-directory .gdd-preview-section {
  padding-top: clamp(26px, 3.3vw, 43px);
  padding-bottom: clamp(29px, 3.5vw, 46px);
  border-top: 1px solid #ded9cc;
}
body #gdd-directory .gdd-preview-header { margin-bottom: 18px; }
body #gdd-directory .gdd-preview-heading { letter-spacing: -.023em; }
body #gdd-directory .gdd-preview-card {
  border: 1px solid #dddacf;
  border-radius: 8px;
  background: #fffdf9;
  box-shadow: 0 6px 22px rgba(28,62,48,.06);
}
body #gdd-directory .gdd-preview-card:hover {
  border-color: #bba578;
  box-shadow: 0 12px 28px rgba(27,65,51,.10);
}
body #gdd-directory .gdd-preview-thumb {
  background: linear-gradient(135deg, #e7ebe4, #ece8de);
  border-right: 1px solid #e1dfd5;
}
body #gdd-directory .gdd-preview-thumb img { object-fit: contain; }
body #gdd-directory .gdd-preview-copy { gap: 8px; }
body #gdd-directory .gdd-preview-name { color: #21483d; }
body #gdd-directory .gdd-preview-summary { color: #6a756e; }
body #gdd-directory .gdd-preview-more {
  background: #fffdf8;
  border: 1px solid #c7d1c4;
  border-radius: 5px;
  min-height: 43px;
}
body #gdd-directory .gdd-preview-empty {
  background: rgba(255,253,248,.76);
  border: 1px dashed #d7d4c8;
  border-radius: 7px;
}

/* 3. Thẻ ở trang chuyên mục: cùng chất liệu, cùng đường viền. */
body .person-card,
body .gallery-card,
body .archive-card,
body #article-list .article-row.editorial-article {
  background-color: #fffdf9;
  border: 1px solid #e0dcd0;
  border-radius: 8px;
  box-shadow: 0 5px 18px rgba(29,60,45,.05);
  overflow: hidden;
}
body .person-card:hover,
body .gallery-card:hover,
body .archive-card:hover,
body #article-list .article-row.editorial-article:hover {
  box-shadow: 0 12px 27px rgba(29,60,45,.09);
}
body .person-media,
body .gallery-visual,
body .archive-thumb { background-color: #e8eae3; }
body .person-media img,
body .gallery-visual img,
body .archive-thumb > img { object-fit: contain; }
body .section-top { margin-bottom: clamp(23px, 2.7vw, 33px); }
body .section-tinted { background: linear-gradient(160deg, #f2f0e8, #efede4); }

/* 4. Lời ngỏ và chân trang: vẫn theo tông xanh cổ – vàng đồng. */
body #gioi-thieu {
  background:
    radial-gradient(ellipse at 92% 0%, rgba(174,139,78,.08), transparent 48%),
    linear-gradient(122deg, #e9e6da, #f3f0e6);
  border-top: 1px solid #dcd6c6;
}

/* 5. Điện thoại: bớt khoảng trống nhưng vẫn dễ đọc, dễ chạm. */
@media (max-width: 620px) {
  body .hero-grid { padding-top: 45px; padding-bottom: 53px; }
  body .hero-foot { margin-top: 31px; }
  body #gdd-directory { padding-top: 38px; padding-bottom: 53px; }
  body #gdd-directory .gdd-preview-section { padding-top: 24px; padding-bottom: 29px; }
  body #gdd-directory .gdd-preview-header { margin-bottom: 15px; }
  body #gdd-directory .gdd-preview-card { border-radius: 7px; }
  body #gdd-directory .gdd-preview-copy { gap: 6px; }
}

/* 6. Bảo toàn lựa chọn giảm chuyển động của người dùng. */
@media (prefers-reduced-motion: reduce) {
  body #gdd-directory .gdd-preview-card { transition: none; }
}
