/*
Theme Name: VTRUST Group
Theme URI: https://vtrustcorp.com
Author: VTRUST Group
Description: Corporate website theme for VTRUST Group of Companies: institutes, finishing school, eye hospitals, opticals and the EYECON conference.
Version: 1.0.0
Requires at least: 5.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: vtrust-group
*/

/* ---------- Tokens ---------- */
:root {
  --brand: #1747A2;        /* logo blue */
  --brand-dark: #0F3277;
  --brand-deep: #0A2358;
  --brand-light: #E8EEF8;
  --ink: #14203A;
  --muted: #55607A;
  --line: #D8E0EF;
  --white: #FFFFFF;
  --accent: #F2A900;       /* used very sparingly */

  --font-head: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 6px;
  --wrap: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(3.5rem, 8vw, 6.5rem);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  color: var(--ink);
}
h1 { font-size: clamp(2.25rem, 4.6vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1.1em; }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.hero :focus-visible,
.page-header :focus-visible,
.site-footer :focus-visible,
.cta-band :focus-visible { outline-color: var(--white); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--white); color: var(--brand); padding: 0.75rem 1rem;
}
.skip-link:focus { left: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--tint { background: var(--brand-light); }
.section-head { max-width: 40rem; margin-bottom: 2.5rem; }
.section-head p { color: var(--muted); font-size: 1.125rem; margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.975rem;
  line-height: 1;
  padding: 0.95rem 1.6rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--brand); color: var(--white); }
.btn-primary:hover { background: var(--brand-dark); color: var(--white); }
.btn-light { background: var(--white); color: var(--brand); }
.btn-light:hover { background: var(--brand-light); color: var(--brand-dark); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.6); color: var(--white); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); color: var(--white); }
.btn-sm { padding: 0.7rem 1.15rem; font-size: 0.9rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 76px; }
.brand img, .custom-logo { height: 46px; width: auto; }
.primary-nav { display: flex; align-items: center; gap: 1.75rem; }
.primary-nav .menu { display: flex; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.primary-nav .menu a {
  font-family: var(--font-head); font-weight: 500; font-size: 0.95rem;
  color: var(--ink); text-decoration: none; padding-block: 0.4rem;
  border-bottom: 2px solid transparent;
}
.primary-nav .menu a:hover,
.primary-nav .menu .current-menu-item > a,
.primary-nav .menu .current_page_item > a { color: var(--brand); border-bottom-color: var(--brand); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius);
  width: 44px; height: 44px; cursor: pointer; position: relative;
}
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after {
  content: ""; position: absolute; left: 11px; right: 11px; height: 2px; background: var(--ink);
}
.nav-toggle .bars { top: 21px; }
.nav-toggle .bars::before { left: 0; right: 0; top: -7px; }
.nav-toggle .bars::after { left: 0; right: 0; top: 7px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--brand); color: var(--white);
  padding-top: clamp(4rem, 10vw, 8rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
}
.hero-mark {
  position: absolute; right: -4%; bottom: -22%;
  height: 135%; width: auto; max-width: none;
  opacity: 0.1; pointer-events: none;
}
.hero .wrap { position: relative; }
.hero h1 { color: var(--white); max-width: 15ch; margin-bottom: 0.45em; }
.hero-text { max-width: 36rem; font-size: 1.2rem; color: rgba(255, 255, 255, 0.86); margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }

.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.5rem 2rem;
  margin: clamp(3rem, 6vw, 5rem) 0 0; padding: 1.5rem 0 0; list-style: none;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
}
.stats strong { display: block; font-family: var(--font-head); font-weight: 600; font-size: 1.75rem; line-height: 1.2; }
.stats span { font-size: 0.95rem; color: rgba(255, 255, 255, 0.8); }

/* ---------- Business list ---------- */
.biz-list { border-top: 1px solid var(--line); }
.biz-row {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) 24px;
  gap: 2rem; align-items: center;
  padding: 1.75rem 1rem; margin-inline: -1rem;
  border-bottom: 1px solid var(--line);
  color: inherit; text-decoration: none;
  transition: background-color 0.15s;
}
.biz-row h3 { margin: 0; font-size: clamp(1.25rem, 2vw, 1.6rem); transition: color 0.15s; }
.biz-row p { margin: 0; color: var(--muted); }
.biz-row:hover { background: var(--brand-light); color: inherit; }
.biz-row:hover h3 { color: var(--brand); }
.chev {
  width: 12px; height: 12px; justify-self: end;
  border-top: 2px solid var(--brand); border-right: 2px solid var(--brand);
  transform: rotate(45deg); transition: transform 0.15s;
}
.biz-row:hover .chev { transform: translateX(4px) rotate(45deg); }

/* ---------- Intro ---------- */
.intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.lead { font-size: 1.2rem; color: var(--muted); }
.pillars { margin: 0; border-top: 1px solid var(--line); }
.pillars > div { padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.pillars dt { font-family: var(--font-head); font-weight: 600; font-size: 1.2rem; color: var(--brand); margin-bottom: 0.3rem; }
.pillars dd { margin: 0; color: var(--muted); }

/* ---------- Stories ---------- */
.story-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); }
.story-main img, .story-side img, .post-card img { width: 100%; object-fit: cover; border-radius: var(--radius); background: var(--brand-light); }
.story-main img { aspect-ratio: 3 / 2; margin-bottom: 1.25rem; }
.story-main h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.story-side { display: grid; gap: 1.75rem; align-content: start; }
.story-side article { display: grid; grid-template-columns: 38% 1fr; gap: 1.25rem; align-items: start; }
.story-side img { aspect-ratio: 4 / 3; }
.story-side h3 { font-size: 1.15rem; margin-bottom: 0.4em; }
.story-layout a { color: inherit; text-decoration: none; }
.story-layout a:hover h3 { color: var(--brand); }
.story-layout p { color: var(--muted); margin: 0; }
.meta { font-size: 0.9rem; color: var(--muted); margin: 0 0 0.5rem; }
.more-link { margin-top: 2.5rem; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--brand-deep); color: var(--white); padding-block: clamp(3rem, 6vw, 4.5rem); }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; }
.cta-band h2 { color: var(--white); margin: 0; max-width: 22ch; }

/* ---------- Inner page header ---------- */
.page-header { background: var(--brand); color: var(--white); padding-block: clamp(2.75rem, 6vw, 4.5rem); }
.page-header h1 { color: var(--white); font-size: clamp(2rem, 4vw, 3rem); margin: 0; max-width: 24ch; }
.page-header p { margin: 0.9rem 0 0; max-width: 40rem; font-size: 1.15rem; color: rgba(255, 255, 255, 0.86); }

/* ---------- Content ---------- */
.entry-content { max-width: 46rem; }
.entry-content > * + * { margin-top: 1.25em; }
.entry-content h2 { margin-top: 1.8em; }
.entry-content h3 { margin-top: 1.5em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content blockquote { margin-inline: 0; padding-left: 1.25rem; border-left: 4px solid var(--brand); color: var(--muted); }
.entry-content img { border-radius: var(--radius); }
.entry-content .alignwide { max-width: var(--wrap); }
.entry-content .alignfull { max-width: none; }
.featured-image { margin: 0 0 2.5rem; }
.featured-image img { width: 100%; max-height: 520px; object-fit: cover; border-radius: var(--radius); }

.two-col { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.side-box { background: var(--brand-light); padding: 1.75rem; border-radius: var(--radius); }
.side-box h2 { font-size: 1.2rem; }
.side-box ul { list-style: none; margin: 0; padding: 0; }
.side-box li + li { border-top: 1px solid var(--line); }
.side-box li a { display: block; padding: 0.7rem 0; text-decoration: none; font-family: var(--font-head); font-weight: 500; font-size: 0.95rem; }
.side-box dl { margin: 0; }
.side-box dt { font-family: var(--font-head); font-weight: 600; margin-top: 1rem; }
.side-box dd { margin: 0.15rem 0 0; color: var(--muted); }

/* ---------- Timeline (About page list with class "timeline") ---------- */
.entry-content .timeline { list-style: none; padding-left: 0; margin-left: 0.4rem; border-left: 2px solid var(--line); }
.entry-content .timeline li { position: relative; padding: 0 0 1.6rem 1.75rem; }
.entry-content .timeline li::before {
  content: ""; position: absolute; left: -7px; top: 0.55rem; width: 12px; height: 12px;
  border-radius: 50%; background: var(--brand);
}
.entry-content .timeline strong { display: block; font-family: var(--font-head); font-size: 1.25rem; color: var(--brand); }

/* ---------- Archive grids ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2.5rem 2rem; }
.post-card a { color: inherit; text-decoration: none; display: block; }
.post-card img { aspect-ratio: 3 / 2; margin-bottom: 1rem; }
.post-card .ph { aspect-ratio: 3 / 2; margin-bottom: 1rem; background: var(--brand-light); border-radius: var(--radius); }
.post-card h2 { font-size: 1.3rem; margin-bottom: 0.4em; }
.post-card:hover h2 { color: var(--brand); }
.post-card p { color: var(--muted); margin: 0; }
.leader-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.leader-grid img { aspect-ratio: 1 / 1; object-position: center top; }
.leader-grid .ph { aspect-ratio: 1 / 1; }
.leader-grid h2 { font-size: 1.15rem; margin-bottom: 0.15em; }
.leader-role { color: var(--muted); margin: 0; }

.navigation.pagination { margin-top: 3rem; }
.nav-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.nav-links a, .nav-links span {
  padding: 0.55rem 0.95rem; border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; font-family: var(--font-head); font-size: 0.95rem;
}
.nav-links .current { background: var(--brand); border-color: var(--brand); color: var(--white); }

/* ---------- Contact ---------- */
.branch-list { display: grid; gap: 1.5rem; margin-top: 1.5rem; }
.branch-list h3 { margin-bottom: 0.2em; font-size: 1.1rem; }
.branch-list p { margin: 0 0 0.25em; color: var(--muted); }
.entry-content input[type="text"], .entry-content input[type="email"], .entry-content input[type="tel"],
.entry-content textarea, .entry-content select {
  width: 100%; padding: 0.8rem 0.9rem; font: inherit;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--white);
}
.entry-content input[type="submit"] {
  font-family: var(--font-head); font-weight: 500; padding: 0.95rem 1.6rem;
  background: var(--brand); color: var(--white); border: 0; border-radius: var(--radius); cursor: pointer;
}
.entry-content input[type="submit"]:hover { background: var(--brand-dark); }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-dark); color: rgba(255, 255, 255, 0.82); padding-top: clamp(3rem, 6vw, 4.5rem); }
.site-footer a { color: rgba(255, 255, 255, 0.82); text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.5rem; padding-bottom: 3rem; }
.footer-grid h2 { color: var(--white); font-size: 1rem; margin-bottom: 1rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li + li { margin-top: 0.55rem; }
.footer-brand img { height: 46px; width: auto; margin-bottom: 1.25rem; }
.footer-brand p { max-width: 26rem; font-size: 0.975rem; }
.footer-contact p { margin: 0 0 0.6rem; font-size: 0.975rem; }
.social { display: flex; flex-wrap: wrap; gap: 0.5rem 1.1rem; margin-top: 1rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.18); padding-block: 1.25rem; font-size: 0.9rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .primary-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 1rem;
    background: var(--white); border-bottom: 1px solid var(--line);
    padding: 1.25rem var(--gutter) 1.5rem;
  }
  .nav-open .primary-nav { display: flex; }
  .primary-nav .menu { flex-direction: column; gap: 0; }
  .primary-nav .menu a { display: block; padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
  .brand img, .custom-logo { height: 40px; }

  .biz-row { grid-template-columns: minmax(0, 1fr); gap: 0.4rem; }
  .biz-row .chev { display: none; }
  .intro, .story-layout, .two-col { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-mark { height: 90%; right: -18%; bottom: -10%; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .story-side article { grid-template-columns: 32% 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* ---------- About page: mission, vision and group journey ---------- */
.eyebrow { margin: 0 0 .55rem; color: var(--brand); font-family: var(--font-head); font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.about-intro { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.about-copy h2 { max-width: 15ch; font-size: clamp(2rem, 4vw, 3.1rem); }
.about-copy .lead { max-width: 42rem; }
.about-principles { display: grid; gap: 0; border-top: 1px solid var(--line); }
.about-principles article { display: grid; grid-template-columns: 2.5rem 1fr; column-gap: 1rem; padding: 1.15rem 0; border-bottom: 1px solid var(--line); }
.about-principles article span { grid-row: span 2; color: var(--brand); font-family: var(--font-head); font-weight: 700; }
.about-principles h3 { margin: 0 0 .25rem; font-size: 1.1rem; }
.about-principles p { margin: 0; color: var(--muted); }
.mv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.mv-card { min-height: 100%; padding: clamp(1.4rem, 3vw, 2rem); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.mv-card--vision { background: var(--brand-dark); color: var(--white); }
.mv-card--vision p { color: rgba(255,255,255,.78); }
.mv-label { display: block; margin-bottom: 1.4rem; color: var(--brand); font-family: var(--font-head); font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.mv-card--vision .mv-label { color: rgba(255,255,255,.7); }
.mv-card h3 { margin-bottom: .7rem; font-size: 1.35rem; }
.mv-card p { margin: 0; color: var(--muted); }
.journey-block { padding: clamp(1.4rem, 3vw, 2.2rem); border: 1px solid var(--line); border-radius: var(--radius); }
.journey-block + .journey-block { margin-top: 1.5rem; }
.journey-heading { display: grid; grid-template-columns: 3.5rem 1fr; gap: 1rem; align-items: start; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.journey-index { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--brand-light); color: var(--brand); font-family: var(--font-head); font-weight: 700; }
.journey-heading h3 { margin: 0 0 .3rem; font-size: 1.7rem; }
.journey-heading p:last-child { margin: 0; color: var(--muted); }
.journey-timeline { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
.journey-timeline li { display: grid; grid-template-columns: 4.3rem 1fr; gap: .8rem; align-items: start; }
.journey-year { display: inline-block; padding: .35rem .55rem; background: var(--brand-light); color: var(--brand); border-radius: 4px; font-family: var(--font-head); font-weight: 700; text-align: center; }
.journey-timeline h4 { margin: 0 0 .35rem; font-size: 1.05rem; }
.journey-timeline p { margin: 0; color: var(--muted); font-size: .96rem; }
.journey-closing { max-width: 52rem; margin: 1.5rem auto 0; color: var(--muted); text-align: center; }
.sector-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.sector-grid article { padding: 1.5rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.sector-grid h3 { font-size: 1.2rem; }
.sector-grid p { margin: 0; color: var(--muted); }
@media (max-width: 760px) { .about-intro, .mv-grid, .sector-grid { grid-template-columns: 1fr; } .journey-timeline { grid-template-columns: 1fr; } }
