/*
Theme Name: VTPN Theme
Description: Lean presentation theme for the Vietnam Tech Partner Network MVP. Consumes data from the vtpn-* plugins via hooks. Production: move to a Tailwind build + self-hosted fonts.
Version: 0.1.0
Requires PHP: 8.1
Text Domain: vtpn
*/

:root{
  --primary:#00A651; --secondary:#FFC20E; --ink:#111827; --bg:#FFFFFF;
  --muted:#6B7280; --line:#E5E7EB; --soft:#F9FAFB;
  --radius:14px; --maxw:1140px;
  --font:"Be Vietnam Pro",system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
}
*{box-sizing:border-box}
body{margin:0;font-family:var(--font);color:var(--ink);background:var(--bg);line-height:1.55;font-size:16px}
a{color:inherit;text-decoration:none}
img{max-width:100%;height:auto}
.vtpn-wrap{max-width:var(--maxw);margin:0 auto;padding:0 20px}
.vtpn-btn{display:inline-block;background:var(--primary);color:#fff;border:0;border-radius:10px;
  padding:12px 22px;font-weight:600;font-size:15px;cursor:pointer;font-family:var(--font)}
.vtpn-btn:hover{filter:brightness(.95)}
.vtpn-btn-ghost{background:transparent;color:var(--primary);border:1px solid var(--primary)}

/* Header */
.site-header{border-bottom:1px solid var(--line);position:sticky;top:0;background:rgba(255,255,255,.92);
  backdrop-filter:saturate(150%) blur(6px);z-index:50}
.site-header .vtpn-wrap{display:flex;align-items:center;gap:24px;height:64px}
.brand{font-weight:800;font-size:19px;color:var(--primary)}
.brand span{color:var(--ink)}
.main-nav{display:flex;gap:20px;margin-left:auto;font-weight:500;font-size:15px}
.main-nav a:hover{color:var(--primary)}

/* Hero */
.hero{padding:64px 0 40px;text-align:center}
.hero h1{font-size:clamp(28px,5vw,46px);line-height:1.1;margin:0 0 14px;letter-spacing:-.02em}
.hero p{font-size:18px;color:var(--muted);max-width:620px;margin:0 auto 26px}
.hero-search{display:flex;gap:8px;max-width:560px;margin:0 auto}
.hero-search input{flex:1;padding:14px 16px;border:1px solid var(--line);border-radius:10px;font-size:16px}

/* Cards / grid */
.vtpn-grid-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:18px;margin:24px 0}
.vtpn-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:18px;
  display:block;transition:box-shadow .15s,transform .15s}
.vtpn-company-card:hover{box-shadow:0 8px 24px rgba(17,24,39,.08);transform:translateY(-2px)}
.vtpn-card-head{display:flex;gap:12px;align-items:center;margin-bottom:8px}
.vtpn-logo{width:44px;height:44px;border-radius:10px;object-fit:cover;background:var(--soft)}
.vtpn-card h3{margin:0;font-size:17px}
.vtpn-tagline{color:var(--muted);font-size:14px;margin:6px 0 12px}
.vtpn-chips{display:flex;flex-wrap:wrap;gap:6px}
.vtpn-chip{background:var(--soft);border:1px solid var(--line);border-radius:999px;padding:3px 10px;font-size:12px;color:#374151}
.vtpn-badge{display:inline-block;background:rgba(0,166,81,.1);color:var(--primary);font-weight:700;
  font-size:12px;padding:2px 9px;border-radius:999px}

/* Directory layout */
.vtpn-directory{display:grid;grid-template-columns:260px 1fr;gap:28px;padding:28px 0}
.vtpn-facets{position:sticky;top:84px;align-self:start;font-size:14px}
.vtpn-facets input[type=search]{width:100%;padding:10px;border:1px solid var(--line);border-radius:8px;margin-bottom:12px}
.vtpn-facets details{border-top:1px solid var(--line);padding:10px 0}
.vtpn-facets summary{font-weight:600;cursor:pointer}
.vtpn-facets ul{list-style:none;padding:8px 0 0;margin:0;display:flex;flex-direction:column;gap:6px}
.vtpn-facets label{display:flex;gap:8px;align-items:center;color:#374151}
.vtpn-verified-toggle{display:flex;gap:8px;margin-bottom:12px;font-weight:600}
.vtpn-clear{display:inline-block;margin-top:12px;color:var(--muted);font-size:13px;text-decoration:underline}
.vtpn-results-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:4px}
.vtpn-count{color:var(--muted);font-size:14px}

/* Profile */
.vtpn-profile{padding-top:28px;padding-bottom:28px}
.vtpn-profile-layout,.vtpn-cta-box{overflow-wrap:anywhere}
.vtpn-profile-head{display:flex;gap:18px;align-items:center;margin-bottom:8px}
.vtpn-profile-head img{width:72px;height:72px;border-radius:14px;object-fit:cover}
.vtpn-profile h1{margin:0;font-size:30px}
.vtpn-meta-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:14px;margin:22px 0;
  padding:18px;background:var(--soft);border-radius:var(--radius)}
.vtpn-meta-grid .k{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.vtpn-meta-grid .v{font-weight:600}
.vtpn-section{margin:26px 0}
.vtpn-section h2{font-size:20px;margin:0 0 10px}
.vtpn-cta-box{border:1px solid var(--line);border-radius:var(--radius);padding:20px;position:sticky;top:84px}

/* Find form */
.vtpn-find .vtpn-grid2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.vtpn-find label{display:flex;flex-direction:column;gap:5px;font-weight:600;font-size:14px}
.vtpn-find input,.vtpn-find select,.vtpn-find textarea{padding:11px;border:1px solid var(--line);
  border-radius:9px;font-size:15px;font-family:var(--font);font-weight:400}
.vtpn-find .vtpn-full{display:block;margin:14px 0}
.vtpn-find .vtpn-full textarea{width:100%}
.vtpn-fineprint{color:var(--muted);font-size:13px}
.vtpn-success{background:rgba(0,166,81,.06);border-color:var(--primary)}

/* Sections */
.section-title{display:flex;justify-content:space-between;align-items:baseline;margin-top:40px}
.section-title a{color:var(--primary);font-weight:600;font-size:14px}
.tax-intro{padding:28px 0 0}
.tax-intro h1{margin:0 0 6px;font-size:30px}

/* Footer */
.site-footer{border-top:1px solid var(--line);margin-top:60px;padding:30px 0;color:var(--muted);font-size:14px}

/* Mobile */
.vtpn-filter-toggle{display:none}
@media(max-width:880px){
  .vtpn-directory{grid-template-columns:1fr}
  .vtpn-find .vtpn-grid2{grid-template-columns:1fr}
  .vtpn-facets{position:static}
  .vtpn-filter-toggle{display:inline-block;margin:8px 0}
  .vtpn-facets[hidden]{display:none}

  /* Company profile: stack the two columns */
  .vtpn-profile-layout{grid-template-columns:1fr !important;gap:22px}
  .vtpn-cta-box{position:static !important;background:var(--soft);border-color:var(--line)}
  .vtpn-scores-v3-grid{grid-template-columns:1fr}

  /* Header reflows to two rows so nav stays reachable (no JS menu needed) */
  .site-header .vtpn-wrap{height:auto;flex-wrap:wrap;gap:8px 16px;padding-top:12px;padding-bottom:12px}
  .main-nav{margin-left:0;width:100%;gap:18px;font-size:14px;flex-wrap:wrap}

  /* Section headers wrap their "Browse all" link */
  .section-title{flex-wrap:wrap;gap:6px 12px}
}
@media(max-width:480px){
  .vtpn-profile-head{flex-wrap:wrap}
  .vtpn-meta-grid{grid-template-columns:repeat(auto-fit,minmax(130px,1fr))}
  .vtpn-stats{gap:18px}
}

/* Monogram logo (fallback when no featured image) */
.vtpn-monogram{display:inline-flex;align-items:center;justify-content:center;color:#fff;font-weight:800;border-radius:12px;flex:none;letter-spacing:-.02em}

/* Landing: stats / steps / tiles / trust band / CTA */
.vtpn-stats{display:flex;gap:34px;justify-content:center;flex-wrap:wrap;margin-top:24px;color:var(--muted);font-size:14px}
.vtpn-stats > div{text-align:center}
.vtpn-stats b{color:var(--ink);font-size:22px;display:block;line-height:1.1}
.vtpn-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin:18px 0 8px}
.vtpn-step{background:var(--soft);border:1px solid var(--line);border-radius:var(--radius);padding:22px}
.vtpn-step .n{width:30px;height:30px;border-radius:50%;background:var(--primary);color:#fff;display:inline-flex;align-items:center;justify-content:center;font-weight:700;margin-bottom:10px}
.vtpn-step h3{margin:0 0 6px;font-size:17px}
.vtpn-step p{margin:0;color:var(--muted);font-size:14px}
.vtpn-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:14px;margin:18px 0}
.vtpn-tile{display:flex;justify-content:space-between;align-items:center;gap:12px;border:1px solid var(--line);border-radius:12px;padding:16px 18px;font-weight:600;transition:box-shadow .15s,transform .15s,border-color .15s}
.vtpn-tile:hover{box-shadow:0 8px 24px rgba(17,24,39,.08);transform:translateY(-2px);border-color:var(--primary)}
.vtpn-tile .c{color:var(--muted);font-weight:500;font-size:13px;white-space:nowrap}
.vtpn-band{background:var(--soft);border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin-top:48px;padding:44px 0}
.vtpn-band-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:24px}
.vtpn-band-grid .ic{font-size:22px}
.vtpn-band-grid h3{font-size:16px;margin:8px 0 6px}
.vtpn-band-grid p{margin:0;color:var(--muted);font-size:14px}
.vtpn-cta-band{text-align:center;padding:56px 0}
.vtpn-cta-band h2{font-size:28px;margin:0 0 8px}
.vtpn-cta-band p{color:var(--muted);margin:0 0 20px}
@media(max-width:880px){
  .vtpn-steps{grid-template-columns:1fr}
  .vtpn-band-grid{grid-template-columns:1fr 1fr}
}

/* v3 composite scores + radar (radar sits below the score cards) */
.vtpn-scores-v3-grid{display:block}
.vtpn-scores-v3-grid .vtpn-radar{margin-top:20px}
.vtpn-radar{display:flex;justify-content:center}
@media(max-width:880px){ .vtpn-scores-v3-grid{grid-template-columns:1fr} }

/* Company profile two-column layout (desktop); stacks on mobile via the media query above */
.vtpn-profile-layout{display:grid;grid-template-columns:1fr 320px;gap:32px;align-items:start}

/* Media & brand gallery */
.vtpn-gallery{display:flex;flex-wrap:wrap;gap:10px;margin:4px 0 16px}
.vtpn-gallery img{height:92px;width:auto;border-radius:10px;object-fit:cover;border:1px solid var(--line);display:block}
.vtpn-gallery-video{display:inline-flex;align-items:center;height:92px;padding:0 18px;border-radius:10px;border:1px solid var(--line);background:var(--soft);font-weight:600;color:var(--ink)}
.vtpn-gallery-video:hover{border-color:var(--primary);color:var(--primary)}
@media(max-width:480px){ .vtpn-gallery img,.vtpn-gallery-video{height:72px} }

/* Mobile sticky "Request an intro" bar (hidden on desktop where the sidebar is always visible) */
.vtpn-mobile-cta{display:none}
@media(max-width:880px){
  .vtpn-mobile-cta{display:block;position:fixed;left:12px;right:12px;bottom:12px;z-index:60;text-align:center;padding:14px;box-shadow:0 8px 24px rgba(17,24,39,.22)}
  .site-main{padding-bottom:86px}
}

/* Knowledge archive (cards with thumbnail) */
.vtpn-kb-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:22px;max-width:1040px}
.vtpn-kb-item{border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;display:flex;flex-direction:column;transition:box-shadow .15s,border-color .15s,transform .15s}
.vtpn-kb-item:hover{box-shadow:0 10px 28px rgba(17,24,39,.10);border-color:var(--primary);transform:translateY(-2px)}
.vtpn-kb-thumb{display:block;aspect-ratio:16/9;background:var(--soft);overflow:hidden}
.vtpn-kb-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.vtpn-kb-ph{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-weight:800;font-size:40px;color:#fff;background:linear-gradient(135deg,var(--primary),#0b8f47)}
.vtpn-kb-body{padding:16px 18px}
.vtpn-kb-body a{color:var(--ink)}
.vtpn-kb-body a:hover{color:var(--primary)}
/* Single Knowledge article */
.vtpn-article{max-width:820px}
.vtpn-article-hero{margin:0 0 22px}
.vtpn-article-hero img{width:100%;height:auto;border-radius:14px;display:block}
.vtpn-article-body{font-size:16px;line-height:1.75}
.vtpn-article-cta{margin-top:34px;padding:22px;border:1px solid var(--line);border-radius:var(--radius);background:var(--soft)}
/* Footer navigation */
.site-footer .footer-nav{margin:0 0 10px}
.footer-menu{list-style:none;display:flex;flex-wrap:wrap;gap:8px 22px;margin:0 0 12px;padding:0}
.footer-menu li{margin:0}
.footer-menu a{color:#374151;text-decoration:none;font-size:14px;font-weight:600}
.footer-menu a:hover{color:var(--primary);text-decoration:underline}
.footer-brand{color:var(--muted);font-size:13px;line-height:1.6}
