﻿/* ============================================================
   Pharma360 2026 – BASE
   Token màu/chữ/khoảng cách, reset, typography, grid, utility.
   Giá trị màu đo từ file thiết kế Web-moi-full/Trang chủ (2026-09-22).
   Không phụ thuộc Bootstrap/jQuery. Mọi class có tiền tố p360-.
   ============================================================ */

:root {
  /* Màu thương hiệu */
  --p360-primary: #2176eb;
  --p360-primary-bright: #0e6bff;
  --p360-primary-soft: #3080f9;
  --p360-primary-dark: #1b3f8f;
  --p360-primary-100: #e8f1ff;
  --p360-primary-200: #bfd6ff;
  --p360-primary-300: #bed3fe;
  --p360-heading: #1b78f1;

  --p360-navy-dash: #0133ae;
  --p360-navy-deep: #011456;
  --p360-navy-footer: #172f99;

  --p360-yellow: #f7c105;
  --p360-yellow-soft: #f0d309;
  --p360-orange: #ffa229;
  --p360-green: #3cc26a;
  --p360-red: #f26d6d;
  --p360-red-dark: #d93025;

  /* Nền, viền, chữ */
  --p360-bg: #f8fcff;
  --p360-bg-section: #eff6fe;
  --p360-bg-inner: #eaf0fb;
  --p360-card: #ffffff;
  --p360-chip: #e5ecf6;
  --p360-chip-active: #bfd6ff;
  --p360-border: #dce6f5;
  --p360-border-strong: #b9c9e4;
  --p360-text: #1f2937;
  --p360-text-muted: #6b7280;
  --p360-text-light: #9ca3af;
  --p360-on-dark: #ffffff;

  /* Gradient hero (đo 3 điểm trên băng xanh) */
  --p360-hero-gradient: linear-gradient(180deg, #1e67d6 0%, #005cff 55%, #008cff 100%);
  --p360-hero-gradient-h: linear-gradient(100deg, #1e67d6 0%, #005cff 50%, #008cff 100%);

  /* Bóng */
  --p360-shadow-sm: 0 1px 2px rgba(16, 42, 94, 0.06), 0 1px 6px rgba(16, 42, 94, 0.06);
  --p360-shadow-md: 0 4px 16px rgba(16, 42, 94, 0.10);
  --p360-shadow-lg: 0 12px 32px rgba(16, 42, 94, 0.16);

  /* Bo góc */
  --p360-radius-sm: 8px;
  --p360-radius-md: 12px;
  --p360-radius-lg: 16px;
  --p360-radius-xl: 20px;
  --p360-radius-pill: 999px;

  /* Chữ */
  --p360-font: "SVN-Gilroy", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --p360-font-num: "Franklin Gothic Medium", "Segoe UI", Arial, sans-serif;
  /* Cỡ chữ đo theo mockup 1920px (chữ thường 16–18px, tiêu đề khối 52px); màn dưới 1600px giảm ở cuối file */
  --p360-fs-xs: 12px;
  --p360-fs-sm: 14px;
  --p360-fs-base: 16px;
  --p360-fs-md: 18px;
  --p360-fs-lg: 20px;
  --p360-fs-xl: 24px;
  --p360-fs-2xl: 32px;
  --p360-fs-3xl: 40px;
  --p360-fs-4xl: 52px;
  --p360-lh: 1.55;
  --p360-lh-tight: 1.2;

  /* Khoảng cách */
  --p360-sp-1: 4px;
  --p360-sp-2: 8px;
  --p360-sp-3: 12px;
  --p360-sp-4: 16px;
  --p360-sp-5: 20px;
  --p360-sp-6: 24px;
  --p360-sp-8: 32px;
  --p360-sp-10: 40px;
  --p360-sp-12: 48px;
  --p360-sp-16: 64px;

  /* Bố cục */
  --p360-container: 1480px; /* khung nội dung mockup 1920px; header dùng .p360-container--wide 1700px */
  --p360-gutter: 16px;
  --p360-header-h: 100px;
  --p360-sidebar-w: 280px;

  /* Hiệu ứng */
  --p360-ease: 180ms ease;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html.p360 { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body.p360 {
  margin: 0;
  font-family: var(--p360-font);
  font-size: var(--p360-fs-base);
  line-height: var(--p360-lh);
  color: var(--p360-text);
  background: var(--p360-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: var(--p360-header-h);
}

/* Reset theo thẻ dùng :where() để độ ưu tiên = 1 class, nhờ đó class component (.p360-btn--primary,
   .p360-title, .p360-footer a ...) khai báo sau luôn thắng. */
.p360 :where(img, svg, video) { max-width: 100%; height: auto; display: block; }

.p360 :where(a) { color: var(--p360-primary); text-decoration: none; transition: color var(--p360-ease); }
.p360 :where(a):hover { color: var(--p360-primary-bright); }

.p360 :where(h1, h2, h3, h4, h5, h6) {
  margin: 0 0 var(--p360-sp-3);
  font-weight: 700;
  line-height: var(--p360-lh-tight);
  color: var(--p360-text);
}
.p360 :where(h1) { font-size: var(--p360-fs-3xl); }
.p360 :where(h2) { font-size: var(--p360-fs-2xl); }
.p360 :where(h3) { font-size: var(--p360-fs-xl); }
.p360 :where(h4) { font-size: var(--p360-fs-lg); }
.p360 :where(h5) { font-size: var(--p360-fs-md); }
.p360 :where(h6) { font-size: var(--p360-fs-base); }

.p360 :where(p) { margin: 0 0 var(--p360-sp-3); }
.p360 :where(ul, ol) { margin: 0 0 var(--p360-sp-3); padding-left: 20px; }
.p360 .p360-list-plain { list-style: none; padding: 0; margin: 0; }

.p360 :where(button, input, select, textarea) { font: inherit; color: inherit; }
.p360 :where(button) { cursor: pointer; background: none; border: 0; padding: 0; }
.p360 :where(button, a, input, select, textarea):focus-visible {
  outline: 2px solid var(--p360-primary-soft);
  outline-offset: 2px;
}

.p360 :where(table) { border-collapse: collapse; width: 100%; }
.p360 :where(hr) { border: 0; border-top: 1px solid var(--p360-border); margin: var(--p360-sp-6) 0; }

/* ---------- Typography helpers ---------- */
.p360-title { font-weight: 700; color: var(--p360-heading); text-transform: uppercase; letter-spacing: 0.01em; }
.p360-title--dark { color: var(--p360-primary-dark); }
.p360-title--white { color: var(--p360-on-dark); }
.p360-title--lg { font-size: var(--p360-fs-3xl); }
.p360-title--md { font-size: var(--p360-fs-2xl); }
.p360-title--sm { font-size: var(--p360-fs-xl); }
.p360-subtitle { color: var(--p360-text-muted); font-size: var(--p360-fs-md); }
.p360-eyebrow { font-size: var(--p360-fs-sm); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--p360-primary); }
.p360-num { font-family: var(--p360-font-num); font-weight: 700; font-size: var(--p360-fs-3xl); color: var(--p360-primary); line-height: 1; }

.p360-text-primary { color: var(--p360-primary) !important; }
.p360-text-heading { color: var(--p360-heading) !important; }
.p360-text-muted { color: var(--p360-text-muted) !important; }
.p360-text-white { color: var(--p360-on-dark) !important; }
.p360-text-yellow { color: var(--p360-yellow) !important; }
.p360-text-orange { color: var(--p360-orange) !important; }
.p360-text-red { color: var(--p360-red-dark) !important; }
.p360-text-green { color: var(--p360-green) !important; }
.p360-text-center { text-align: center !important; }
.p360-text-right { text-align: right !important; }
.p360-text-left { text-align: left !important; }
.p360-fw-400 { font-weight: 400 !important; }
.p360-fw-600 { font-weight: 600 !important; }
.p360-fw-700 { font-weight: 700 !important; }
.p360-fs-xs { font-size: var(--p360-fs-xs) !important; }
.p360-fs-sm { font-size: var(--p360-fs-sm) !important; }
.p360-fs-md { font-size: var(--p360-fs-md) !important; }
.p360-fs-lg { font-size: var(--p360-fs-lg) !important; }
.p360-upper { text-transform: uppercase !important; }
.p360-truncate { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.p360-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p360-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Container & section ---------- */
.p360-container {
  width: 100%;
  max-width: calc(var(--p360-container) + var(--p360-gutter) * 2);
  margin: 0 auto;
  padding-left: var(--p360-gutter);
  padding-right: var(--p360-gutter);
}
.p360-container--narrow { max-width: 960px; }
.p360-container--wide { max-width: calc(1700px + var(--p360-gutter) * 2); }

.p360-section { padding: var(--p360-sp-10) 0; }
.p360-section--sm { padding: var(--p360-sp-6) 0; }
.p360-section--lg { padding: var(--p360-sp-16) 0; }
.p360-section--soft { background: var(--p360-bg-section); }
.p360-section--white { background: var(--p360-card); }
.p360-section--navy { background: var(--p360-navy-dash); color: var(--p360-on-dark); }
.p360-section--navy h1, .p360-section--navy h2, .p360-section--navy h3 { color: var(--p360-on-dark); }
.p360-section--hero { background: var(--p360-hero-gradient); color: var(--p360-on-dark); position: relative; overflow: hidden; }
.p360-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--p360-sp-4); margin-bottom: var(--p360-sp-6); flex-wrap: wrap; }
.p360-section__head h2 { margin: 0; }

/* ---------- Grid ---------- */
.p360-grid {
  display: grid;
  gap: var(--p360-sp-5);
  grid-template-columns: repeat(12, minmax(0, 1fr));
}
.p360-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.p360-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.p360-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.p360-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.p360-grid--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.p360-grid--gap-sm { gap: var(--p360-sp-3); }
.p360-grid--gap-lg { gap: var(--p360-sp-8); }
.p360-col-1 { grid-column: span 1; }
.p360-col-2 { grid-column: span 2; }
.p360-col-3 { grid-column: span 3; }
.p360-col-4 { grid-column: span 4; }
.p360-col-5 { grid-column: span 5; }
.p360-col-6 { grid-column: span 6; }
.p360-col-7 { grid-column: span 7; }
.p360-col-8 { grid-column: span 8; }
.p360-col-9 { grid-column: span 9; }
.p360-col-10 { grid-column: span 10; }
.p360-col-12 { grid-column: span 12; }

/* Bố cục sidebar + nội dung (trang Việc làm, Cẩm nang, Công cụ) */
.p360-layout {
  display: grid;
  grid-template-columns: var(--p360-sidebar-w) minmax(0, 1fr);
  gap: var(--p360-sp-6);
  align-items: start;
}
.p360-layout--right { grid-template-columns: minmax(0, 1fr) var(--p360-sidebar-w); }
.p360-sidebar { position: sticky; top: calc(var(--p360-header-h) + var(--p360-sp-4)); display: flex; flex-direction: column; gap: var(--p360-sp-5); }

/* ---------- Flex utilities ---------- */
.p360-flex { display: flex; }
.p360-flex-col { display: flex; flex-direction: column; }
.p360-flex-wrap { flex-wrap: wrap; }
.p360-items-center { align-items: center; }
.p360-items-start { align-items: flex-start; }
.p360-items-end { align-items: flex-end; }
.p360-justify-center { justify-content: center; }
.p360-justify-between { justify-content: space-between; }
.p360-justify-end { justify-content: flex-end; }
.p360-gap-1 { gap: var(--p360-sp-1); }
.p360-gap-2 { gap: var(--p360-sp-2); }
.p360-gap-3 { gap: var(--p360-sp-3); }
.p360-gap-4 { gap: var(--p360-sp-4); }
.p360-gap-6 { gap: var(--p360-sp-6); }
.p360-grow { flex: 1 1 auto; min-width: 0; }
.p360-shrink-0 { flex-shrink: 0; }

/* ---------- Spacing utilities ---------- */
.p360-m-0 { margin: 0 !important; }
.p360-mt-2 { margin-top: var(--p360-sp-2) !important; }
.p360-mt-3 { margin-top: var(--p360-sp-3) !important; }
.p360-mt-4 { margin-top: var(--p360-sp-4) !important; }
.p360-mt-6 { margin-top: var(--p360-sp-6) !important; }
.p360-mt-8 { margin-top: var(--p360-sp-8) !important; }
.p360-mb-0 { margin-bottom: 0 !important; }
.p360-mb-2 { margin-bottom: var(--p360-sp-2) !important; }
.p360-mb-3 { margin-bottom: var(--p360-sp-3) !important; }
.p360-mb-4 { margin-bottom: var(--p360-sp-4) !important; }
.p360-mb-6 { margin-bottom: var(--p360-sp-6) !important; }
.p360-mb-8 { margin-bottom: var(--p360-sp-8) !important; }
.p360-my-6 { margin-top: var(--p360-sp-6) !important; margin-bottom: var(--p360-sp-6) !important; }
.p360-p-3 { padding: var(--p360-sp-3) !important; }
.p360-p-4 { padding: var(--p360-sp-4) !important; }
.p360-p-6 { padding: var(--p360-sp-6) !important; }
.p360-px-4 { padding-left: var(--p360-sp-4) !important; padding-right: var(--p360-sp-4) !important; }
.p360-py-4 { padding-top: var(--p360-sp-4) !important; padding-bottom: var(--p360-sp-4) !important; }

/* ---------- Display / misc utilities ---------- */
.p360-hidden { display: none !important; }
.p360-block { display: block !important; }
.p360-inline-block { display: inline-block !important; }
.p360-w-100 { width: 100% !important; }
.p360-relative { position: relative; }
.p360-overflow-hidden { overflow: hidden; }
.p360-rounded { border-radius: var(--p360-radius-md); }
.p360-rounded-lg { border-radius: var(--p360-radius-lg); }
.p360-rounded-pill { border-radius: var(--p360-radius-pill); }
.p360-shadow { box-shadow: var(--p360-shadow-md); }
.p360-bg-white { background: var(--p360-card); }
.p360-bg-soft { background: var(--p360-bg-section); }
.p360-sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.p360-desktop-only { display: initial; }
.p360-mobile-only { display: none; }

/* Khối SEO ẩn (h1/p/img trang chủ) – giữ trong DOM, không hiển thị */
.p360-seo-hidden { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 1599px) {
  :root {
    --p360-fs-sm: 13px;
    --p360-fs-base: 15px;
    --p360-fs-md: 16px;
    --p360-fs-lg: 18px;
    --p360-fs-xl: 22px;
    --p360-fs-2xl: 28px;
    --p360-fs-3xl: 36px;
    --p360-fs-4xl: 44px;
    --p360-header-h: 84px;
  }
}

@media (max-width: 1279px) {
  :root { --p360-container: 1100px; }
}

@media (max-width: 1023px) {
  :root {
    --p360-fs-3xl: 30px;
    --p360-fs-2xl: 24px;
    --p360-fs-4xl: 36px;
    --p360-header-h: 64px;
    --p360-sidebar-w: 240px;
  }
  .p360-grid--5, .p360-grid--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .p360-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p360-col-3, .p360-col-4 { grid-column: span 6; }
  .p360-col-5, .p360-col-7, .p360-col-8, .p360-col-9 { grid-column: span 12; }
  .p360-layout, .p360-layout--right { grid-template-columns: minmax(0, 1fr); }
  .p360-sidebar { position: static; }
}

@media (max-width: 767px) {
  :root {
    --p360-fs-3xl: 26px;
    --p360-fs-2xl: 22px;
    --p360-fs-xl: 19px;
    --p360-fs-4xl: 30px;
    --p360-header-h: 60px;
  }
  .p360-section { padding: var(--p360-sp-8) 0; }
  .p360-section--lg { padding: var(--p360-sp-10) 0; }
  .p360-grid, .p360-grid--2, .p360-grid--3, .p360-grid--4, .p360-grid--5, .p360-grid--6 { grid-template-columns: minmax(0, 1fr); }
  .p360-col-1, .p360-col-2, .p360-col-3, .p360-col-4, .p360-col-5, .p360-col-6,
  .p360-col-7, .p360-col-8, .p360-col-9, .p360-col-10 { grid-column: span 1; }
  .p360-desktop-only { display: none !important; }
  .p360-mobile-only { display: initial; }
}
