/*
Theme Name: VSE
Theme URI: https://thevse.org
Author: Vietnam Society of Excellence
Description: Theme riêng của VSE. Block theme, cấu trúc theo Zoom Design System (spacing 8px, radius 12px, shadow mềm), màu và logo VSE.
Version: 2.0.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: vse
*/

/* ==========================================================
   Tokens (Zoom Design System, thay navy/electric blue bằng VSE)
   ========================================================== */
:root {
  --vse-primary: #2F63AC;      /* Electric Blue của Zoom -> xanh VSE */
  --vse-primary-hover: #25528F;
  --vse-primary-active: #1F4680;
  --vse-mid: #3A8FC9;
  --vse-cyan: #4EC5DA;         /* Sky Blue vai trò input border */
  --vse-ink: #0B1F3F;          /* Navy Base */
  --vse-text-2: #232333;
  --vse-muted: #686F79;
  --vse-line: #DFE3E8;
  --vse-pale: #F2F8FF;
  --vse-light: #E6F0FF;
  --vse-error: #DA1639;
  --r-sm: 8px; --r-md: 12px; --r-lg: 20px;
  --sh-sm: rgba(0,0,0,0.10) 0px 5px 15px 0px;
  --sh-md: rgba(0,0,0,0.30) 0px 50px 100px 10px;
  --sh-nav: rgba(0,0,0,0.05) 0px 2px 8px 0px;
  --focus: 0 0 0 3px rgba(47,99,172,0.12);
}

body { word-break: keep-all; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased; color: var(--vse-ink); }
p { color: var(--vse-text-2); }
.has-text-align-center { }
h1, h2, h3, h4 { letter-spacing: normal; }
h1 { font-size: 48px; line-height: 1.2; }
h2 { font-size: 32px; line-height: 1.2; }
h3 { font-size: 24px; line-height: 1.2; }
h4 { font-size: 20px; line-height: 1.2; }

/* ==========================================================
   Thanh ba màu logo + Header (Top Navigation Bar: 56px, border, shadow nhẹ)
   ========================================================== */
.vse-bar { display: flex; height: 4px; width: 100%; }
.vse-bar span { flex: 1; }
.vse-bar span:nth-child(1) { background: var(--vse-primary); }
.vse-bar span:nth-child(2) { background: var(--vse-mid); }
.vse-bar span:nth-child(3) { background: var(--vse-cyan); }

.vse-header { background: #fff; border-bottom: 1px solid var(--vse-line); box-shadow: var(--sh-nav); position: sticky; top: 0; z-index: 10; }
.vse-header > .wp-block-group { padding-top: 12px; padding-bottom: 12px; min-height: 56px; }
.vse-header .wp-block-site-logo img { height: 40px; width: auto; display: block; }
.wp-block-navigation a { font-size: 14px; font-weight: 400; color: var(--vse-ink); padding: 8px 12px; border-radius: var(--r-sm); line-height: 20px; text-decoration: none; }
.wp-block-navigation a:hover { color: var(--vse-primary); background: rgba(47,99,172,0.05); text-decoration: none; }
.wp-block-navigation .current-menu-item > a { color: var(--vse-primary); box-shadow: inset 0 -2px 0 var(--vse-primary); border-radius: 0; }
.vse-nav-cta a.wp-block-button__link { height: 40px; padding: 8px 16px; font-size: 14px; display: inline-flex; align-items: center; }

/* ==========================================================
   Buttons (Primary / Secondary-outline / Ghost)
   ========================================================== */
.wp-block-button__link { border-radius: var(--r-md); font-size: 14px; font-weight: 500; line-height: 1.2; min-height: 40px; padding: 12px 20px; transition: background .15s, box-shadow .15s, border-color .15s; }
.wp-block-button__link:hover { text-decoration: none; }
.wp-block-button__link:active { background: var(--vse-primary-active); box-shadow: rgba(0,0,0,0.2) 0px 5px 15px 0px; }
.wp-block-button.is-style-outline .wp-block-button__link { background: #fff; color: var(--vse-ink); border: 1px solid var(--vse-line); }
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--vse-pale); border-color: var(--vse-primary); color: var(--vse-ink); }
.wp-block-button.is-style-outline .wp-block-button__link:active { background: var(--vse-light); border-color: var(--vse-primary); }
.wp-block-button__link:focus-visible, .wpcf7 input[type=submit]:focus-visible { outline: none; box-shadow: var(--focus); }

/* ==========================================================
   Hero (Full width, content 1200px, 60px top/bottom)
   ========================================================== */
.vse-hero { background: linear-gradient(180deg, var(--vse-pale) 0%, #fff 100%); }
.vse-hero .wp-block-columns { padding-top: 60px !important; padding-bottom: 60px !important; }
.vse-eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; font-weight: 600; color: var(--vse-primary); margin-bottom: 8px; }
.vse-hero h1 { font-size: 48px; line-height: 1.2; margin-top: 0; margin-bottom: 16px; }
.vse-lead { font-size: 20px; line-height: 1.2; color: var(--vse-text-2); }
.vse-hero .vse-lead { margin-bottom: 24px; }
.vse-hero-img img { border-radius: var(--r-lg); box-shadow: var(--sh-sm); display: block; }

/* Tiêu đề section giữa trang */
h2.has-text-align-center { margin-bottom: 8px; }
h2.has-text-align-center::after { content: ""; display: block; width: 48px; height: 3px; background: var(--vse-primary); border-radius: 2px; margin: 12px auto 0; }
h2.has-text-align-center + p.has-text-align-center { max-width: 760px; margin-left: auto; margin-right: auto; }

/* ==========================================================
   Cards (Standard Card: 24px, r12, border, shadow-sm)
   ========================================================== */
.vse-cards { gap: 24px !important; }
.vse-cards .wp-block-column { background: #fff; border: 1px solid var(--vse-line); border-radius: var(--r-md); padding: 24px; box-shadow: var(--sh-sm); transition: transform .15s, box-shadow .15s; }
.vse-cards .wp-block-column:hover { transform: translateY(-2px); box-shadow: rgba(0,0,0,0.14) 0px 10px 24px 0px; }
.vse-cards h3 { margin: 0 0 8px; font-size: 20px; }
.vse-cards h3::before { content: ""; display: block; width: 32px; height: 4px; border-radius: 2px; background: var(--vse-primary); margin-bottom: 16px; }
.vse-cards .wp-block-column:nth-child(2) h3::before { background: var(--vse-mid); }
.vse-cards .wp-block-column:nth-child(3) h3::before { background: var(--vse-cyan); }
.vse-cards p { font-size: 14px; line-height: 20px; margin: 0; }

/* Tầm nhìn, sứ mệnh: Info Card (pale, r8, border light) */
.vse-vm { gap: 24px !important; }
.vse-vm .wp-block-column { background: var(--vse-pale); border: 1px solid var(--vse-light); border-radius: var(--r-sm); padding: 16px 20px; }
.vse-vm h3 { margin: 0 0 8px; font-size: 20px; }
.vse-vm p { margin: 0; font-size: 14px; line-height: 20px; }

/* Giá trị: badge-style cards */
.vse-values { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.vse-values li { background: #fff; border: 1px solid var(--vse-line); border-radius: var(--r-md); padding: 16px; font-size: 14px; line-height: 20px; color: var(--vse-text-2); }
.vse-values li strong { display: inline-block; background: var(--vse-light); color: var(--vse-primary); border: 1px solid var(--vse-primary); border-radius: 12px; padding: 4px 12px; font-size: 12px; font-weight: 500; line-height: 14px; margin-bottom: 8px; }

/* Số liệu */
.vse-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; list-style: none; padding: 0; margin: 0 0 40px; }
.vse-stats li { background: #fff; border: 1px solid var(--vse-line); border-radius: var(--r-md); padding: 24px 16px; text-align: center; box-shadow: var(--sh-sm); }
.vse-stats li strong { display: block; font-family: var(--wp--preset--font-family--heading); font-size: 32px; font-weight: 600; color: var(--vse-primary); line-height: 1.2; }
.vse-stats li span { font-size: 12px; line-height: 14.4px; color: var(--vse-muted); display: block; margin-top: 4px; }

/* Lưới ban lãnh đạo */
.vse-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; list-style: none; padding: 0; margin: 16px 0 0; }
.vse-people li { border: 1px solid var(--vse-line); border-radius: var(--r-md); padding: 16px; background: #fff; }
.vse-people li strong { display: block; color: var(--vse-ink); font-size: 14px; font-weight: 700; line-height: 1.1; }
.vse-people li span { display: block; font-size: 12px; line-height: 14.4px; color: var(--vse-muted); margin-top: 6px; }
.vse-people li.is-lead { background: var(--vse-ink); border-color: var(--vse-ink); }
.vse-people li.is-lead strong { color: #fff; }
.vse-people li.is-lead span { color: rgba(255,255,255,0.75); }

/* Gallery */
.wp-block-gallery { gap: 16px !important; }
.wp-block-gallery img { border-radius: var(--r-md) !important; }

/* Khối kêu gọi tối (Dark Card) */
.vse-dark { background: var(--vse-ink); color: #fff; border-radius: 0; }
.vse-dark h2, .vse-dark p { color: #fff; }
.vse-dark h2.has-text-align-center::after { background: var(--vse-cyan); }

/* ==========================================================
   Forms (Text Input: r12, border sky, focus ring)
   ========================================================== */
.wpcf7 label { display: block; font-weight: 600; margin-bottom: 16px; font-size: 14px; color: var(--vse-ink); }
.wpcf7 input[type=text], .wpcf7 input[type=email], .wpcf7 input[type=tel], .wpcf7 select, .wpcf7 textarea { width: 100%; height: 44px; padding: 8px 16px; border: 1px solid var(--vse-line); border-radius: var(--r-md); font: inherit; font-size: 15px; margin-top: 6px; background: #fff; color: var(--vse-ink); transition: border-color .15s, box-shadow .15s; }
.wpcf7 textarea { height: auto; min-height: 120px; padding-top: 12px; }
.wpcf7 input::placeholder, .wpcf7 textarea::placeholder { color: var(--vse-muted); }
.wpcf7 input:focus, .wpcf7 select:focus, .wpcf7 textarea:focus { outline: none; border-color: var(--vse-primary); box-shadow: var(--focus); }
.wpcf7 .wpcf7-not-valid { border-color: var(--vse-error); background: rgba(218,22,57,0.05); }
.wpcf7 .wpcf7-acceptance label { font-weight: 400; font-size: 14px; }
.wpcf7 input[type=submit] { background: var(--vse-primary); color: #fff; border: 0; height: 44px; padding: 8px 24px; border-radius: var(--r-md); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; transition: background .15s; }
.wpcf7 input[type=submit]:hover { background: var(--vse-primary-hover); }
.wpcf7 input[type=submit]:active { background: var(--vse-primary-active); box-shadow: rgba(0,0,0,0.2) 0px 5px 15px 0px; }
.wpcf7 form.sent .wpcf7-response-output { border: 1px solid var(--vse-light); background: var(--vse-pale); color: var(--vse-ink); border-radius: var(--r-sm); padding: 16px; margin: 16px 0 0; }
.wpcf7 form.invalid .wpcf7-response-output, .wpcf7 form.failed .wpcf7-response-output { border: 1px solid var(--vse-error); background: rgba(218,22,57,0.05); color: var(--vse-error); border-radius: var(--r-sm); padding: 16px; margin: 16px 0 0; }
.wpcf7-not-valid-tip { color: var(--vse-error); font-size: 12px; margin-top: 4px; }

/* Bảng */
.wp-block-table table { border-collapse: separate; border-spacing: 0; border: 1px solid var(--vse-line); border-radius: var(--r-sm); overflow: hidden; font-size: 14px; }
.wp-block-table th { background: var(--vse-pale); color: var(--vse-ink); font-weight: 600; border-bottom: 1px solid var(--vse-line); padding: 12px 16px; }
.wp-block-table td { padding: 12px 16px; border-bottom: 1px solid var(--vse-line); border-left: 0; border-right: 0; }
.wp-block-table tr:last-child td { border-bottom: 0; }

/* ==========================================================
   Bài viết
   ========================================================== */
.vse-post-card { border: 1px solid var(--vse-line); border-radius: var(--r-md); overflow: hidden; background: #fff; height: 100%; box-shadow: var(--sh-sm); transition: transform .15s, box-shadow .15s; }
.vse-post-card:hover { transform: translateY(-2px); box-shadow: rgba(0,0,0,0.14) 0px 10px 24px 0px; }
.vse-post-card .wp-block-post-featured-image img { aspect-ratio: 16/9; object-fit: cover; display: block; }
.vse-post-card .wp-block-post-title { font-size: 20px; line-height: 1.2; margin: 8px 0; }
.vse-post-card .wp-block-post-title a { color: var(--vse-ink); text-decoration: none; }
.vse-post-card .wp-block-post-title a:hover { color: var(--vse-primary); }
.vse-post-body { padding: 24px; }
.vse-post-body .wp-block-post-excerpt__excerpt { font-size: 14px; line-height: 20px; color: var(--vse-text-2); }
.wp-block-post-terms a { display: inline-block; background: var(--vse-light); color: var(--vse-primary); border: 1px solid var(--vse-primary); border-radius: 12px; padding: 4px 12px; font-size: 12px; font-weight: 500; line-height: 14px; text-decoration: none; text-transform: none; letter-spacing: 0; }
.wp-block-post-terms a:hover { background: var(--vse-primary); color: #fff; text-decoration: none; }
.wp-block-post-date { font-size: 12px; color: var(--vse-muted); }
.single .wp-block-post-title { font-size: 48px; }
.single .wp-block-post-featured-image img { border-radius: var(--r-lg); }
.single .wp-block-post-content { font-size: 16px; line-height: 1.6; }
.single .wp-block-post-content p { font-size: 16px; }
.single .wp-block-post-content h2 { margin-top: 40px; font-size: 32px; }
.single .wp-block-post-content h3 { margin-top: 24px; font-size: 24px; }
.single .wp-block-post-content strong { color: var(--vse-ink); }
.single .wp-block-post-content .has-small-font-size { color: var(--vse-muted); }
.vse-cta-box { background: var(--vse-ink) !important; color: #fff; border-radius: var(--r-md); padding: 24px; box-shadow: none; }
.vse-cta-box h3, .vse-cta-box p { color: #fff; }
.vse-cta-box .wp-block-button__link { background: var(--vse-cyan); color: var(--vse-ink); }
.vse-cta-box .wp-block-button__link:hover { background: #fff; }
.wp-block-query-pagination a, .wp-block-query-pagination-numbers .page-numbers { padding: 8px 12px; border-radius: var(--r-sm); font-size: 14px; }
.wp-block-query-pagination-numbers .current { background: var(--vse-primary); color: #fff; }

/* ==========================================================
   Footer (Dark, không shadow)
   ========================================================== */
.vse-pattern { height: 64px; background: url("/wp-content/uploads/2026/09/vse-hoa-van.webp") center/auto 100% repeat-x; opacity: 0.85; }
.vse-footer { background: var(--vse-ink); color: rgba(255,255,255,0.75); }
.vse-footer p { color: rgba(255,255,255,0.75); font-size: 14px; line-height: 20px; }
.vse-footer a { color: #fff; }
.vse-footer a:hover { color: var(--vse-cyan); }
.vse-footer h4 { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #fff; margin-bottom: 12px; }
.vse-footer .wp-block-navigation a { color: rgba(255,255,255,0.75); font-weight: 400; padding: 4px 0; font-size: 14px; }
.vse-footer .wp-block-navigation a:hover { color: var(--vse-cyan); background: transparent; }
.vse-footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); }
.vse-footer-bottom p { font-size: 12px; color: rgba(255,255,255,0.6); }

/* ==========================================================
   Responsive (Zoom: mobile giảm 2 tới 4px font, padding 12 tới 16px)
   ========================================================== */
@media (max-width: 1199px) {
  h1, .vse-hero h1 { font-size: 36px; }
  h2 { font-size: 24px; }
  .single .wp-block-post-title { font-size: 40px; }
}
@media (max-width: 781px) {
  body { font-size: 14px; }
  h1, .vse-hero h1 { font-size: 28px; }
  h2 { font-size: 20px; }
  h3 { font-size: 20px; }
  .single .wp-block-post-title { font-size: 32px; }
  .vse-lead { font-size: 16px; }
  .vse-header .wp-block-site-logo img { height: 32px; }
  .vse-hero .wp-block-columns { padding-top: 24px !important; padding-bottom: 24px !important; }
  .vse-cards .wp-block-column, .vse-post-body { padding: 16px; }
  .wp-block-buttons { gap: 12px; }
  .wp-block-button, .wp-block-button__link { width: 100%; text-align: center; }
  .vse-nav-cta .wp-block-button { width: auto; }
  .vse-nav-cta a.wp-block-button__link { width: auto; }
}
