/* ==========================================================================
   TGCE Design System  —  assets/css/styles.css
   Plain CSS, no build step. Blue #396999 + orange accent.
   ========================================================================== */

/* ---- Custom properties ---- */
:root {
  --blue: #396999;
  --blue-dark: #003399;
  --blue-deep: #274b70;
  --accent: #e87722;
  --accent-dark: #cf6512;
  --ink: #1f2933;
  --muted: #5b6b7b;
  --line: #e2e8f0;
  --grey-light: #f5f7fa;
  --white: #ffffff;
  --footer: #1c1c1c;
  --footer-2: #141414;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow: 0 2px 8px rgba(0, 0, 0, .12);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, .14);
  --container: 1200px;
  --header-font: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --body-font: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--header-font); line-height: 1.25; color: var(--ink); }
ul { margin: 0; padding-left: 1.2rem; }

/* ---- Layout helpers ---- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}
.section { padding: 56px 0; }
.section--grey { background: var(--grey-light); }
.section__head { text-align: center; margin-bottom: 36px; }
.section__eyebrow {
  display: inline-block;
  color: var(--accent);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.section__title { margin: 0; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.section__title::after {
  content: "";
  display: block;
  width: 64px; height: 3px;
  background: var(--accent);
  margin: 14px auto 0;
  border-radius: 3px;
}
.text-center { text-align: center; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, transform .12s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); color: #fff; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-deep); color: #fff; }
.btn-outline { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: .85rem; }

/* ==========================================================================
   HEADER  —  utility bar + logo bar + nav
   ========================================================================== */
.site-header { position: sticky; top: 0; z-index: 1000; background: #fff; box-shadow: 0 1px 0 var(--line); }

/* utility bar */
.utility-bar { background: var(--blue-deep); color: #dbe6f1; font-size: .82rem; }
.utility-bar .container {
  display: flex; flex-wrap: wrap; gap: 6px 22px;
  align-items: center; justify-content: flex-end; min-height: 38px;
}
.utility-bar a { color: #dbe6f1; }
.utility-bar a:hover { color: #fff; text-decoration: none; }
.utility-bar .util-item { display: inline-flex; align-items: center; gap: 6px; }
.utility-bar .util-badge {
  margin-right: auto; background: var(--accent); color: #fff;
  padding: 2px 12px; border-radius: 20px; font-weight: 700; font-size: .78rem;
}

/* logo bar */
.logo-bar { background: #fff; }
.logo-bar .container {
  display: flex; align-items: center; gap: 16px; padding-block: 12px;
}
.logo-bar__brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.logo-bar__brand:hover { text-decoration: none; }
.logo-bar__logo { height: 62px; width: auto; }
.logo-bar__title { display: block; font-size: 1.35rem; font-weight: 800; color: var(--blue); line-height: 1.15; }
.logo-bar__sub { display: block; font-size: .82rem; color: var(--muted); font-weight: 500; line-height: 1.35; }
.logo-bar__actions { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.logo-bar__phone { text-align: right; font-size: .8rem; color: var(--muted); }
.logo-bar__phone strong { display: block; font-size: 1.05rem; color: var(--ink); }

/* nav bar */
.main-nav { background: var(--blue); }
.main-nav .container { display: flex; align-items: center; }
.nav-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; align-items: stretch;
}
.nav-list > li { position: relative; }
.nav-list > li > a {
  display: flex; align-items: center;
  padding: 14px 16px;
  color: #eaf1f8; font-weight: 600; font-size: .92rem;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: background .15s ease, border-color .15s ease;
}
.nav-list > li > a:hover { background: var(--blue-deep); text-decoration: none; }
.nav-list > li.is-active > a { border-bottom-color: var(--accent); background: var(--blue-deep); }

/* dropdown */
.nav-list .has-sub > a::after { content: "\25be"; margin-left: 6px; font-size: .7rem; }
.nav-sub {
  list-style: none; margin: 0; padding: 6px 0;
  position: absolute; left: 0; top: 100%;
  min-width: 210px; background: #fff;
  box-shadow: var(--shadow-lg); border-radius: 0 0 var(--radius) var(--radius);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
  z-index: 20;
}
.nav-list .has-sub:hover > .nav-sub,
.nav-list .has-sub:focus-within > .nav-sub {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-sub a {
  display: block; padding: 9px 18px;
  color: var(--ink); font-size: .88rem; text-decoration: none;
}
.nav-sub a:hover { background: var(--grey-light); color: var(--blue); }

/* hamburger */
.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 0; cursor: pointer;
  padding: 12px; color: #fff;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 24px; height: 2px;
  background: #fff; border-radius: 2px; transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span::before { transform: translateY(-7px); }
.nav-toggle span::after { transform: translateY(5px); }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: rotate(-45deg) translateY(-1px); }

/* marquee / notice ticker */
.notice-ticker {
  background: var(--blue-dark); color: #fff;
  font-size: .88rem; overflow: hidden;
}
.notice-ticker .container { display: flex; align-items: center; gap: 14px; padding-block: 8px; }
.notice-ticker__label {
  background: var(--accent); color: #fff; font-weight: 700;
  padding: 3px 12px; border-radius: 4px; white-space: nowrap; font-size: .78rem;
}
.notice-ticker__track { overflow: hidden; white-space: nowrap; flex: 1; }
.notice-ticker__track span { display: inline-block; padding-left: 100%; animation: ticker 22s linear infinite; }
.notice-ticker:hover .notice-ticker__track span { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-100%); } }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  background: linear-gradient(120deg, var(--blue-deep) 0%, var(--blue) 60%, #4d82b5 100%);
  color: #fff;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: url("../../images/home/main.png") center/cover no-repeat;
  opacity: .32;
}
.hero .container {
  position: relative; z-index: 1;
  min-height: 380px;
  display: flex; flex-direction: column; justify-content: center;
  padding-block: 60px; max-width: 820px; margin-inline: auto; text-align: left;
}
.hero__eyebrow {
  color: var(--accent); font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; font-size: .82rem; margin-bottom: 12px;
}
.hero__title {
  color: #fff; margin: 0 0 14px;
  font-size: clamp(1.8rem, 4.4vw, 3rem); font-weight: 800;
}
.hero__title span {
  color: #fff;
  font-style: italic;
  background-image: linear-gradient(#EA8438, #EA8438);
  background-repeat: no-repeat;
  background-position: 0 88%;
  background-size: 100% .3em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding: 0 2px;
}
.hero__text { font-size: 1.05rem; color: #e5eefa; max-width: 620px; margin: 0 0 26px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ==========================================================================
   CARDS
   ========================================================================== */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 26px;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card:hover, .news-card:hover { text-decoration: none; }
.card__title { margin: 0 0 8px; font-size: 1.15rem; color: var(--blue); }
.card__text { margin: 0; color: var(--muted); font-size: .95rem; }

/* icon card (courses / facilities) */
.icon-card { text-align: center; }
.icon-card__icon {
  width: 64px; height: 64px; margin: 0 auto 16px;
  display: grid; place-items: center;
  background: #eef3f9; color: var(--blue);
  border-radius: 50%; font-size: 1.6rem;
}
.icon-card:hover .icon-card__icon { background: var(--accent); color: #fff; }
.icon-card__count { display: block; color: var(--muted); font-size: .85rem; margin-top: 4px; }

/* news / date-chip card */
.news-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px dashed var(--line);
  border-radius: var(--radius-lg); padding: 24px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.news-card__date {
  width: 62px; height: 62px; margin-bottom: 16px;
  background: var(--accent); color: #fff; border-radius: 12px;
  display: grid; place-items: center; text-align: center; line-height: 1.1;
}
.news-card__date .d { font-size: 1.5rem; font-weight: 800; }
.news-card__date .m { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.news-card__title { margin: 0 0 14px; font-size: 1rem; color: var(--ink); flex: 1; }

/* announcements carousel */
.announce-carousel { position: relative; display: flex; align-items: center; gap: 8px; }
.announce-viewport { overflow: hidden; flex: 1; }
.announce-track {
  display: flex; flex-wrap: nowrap; gap: 24px;
  transition: transform .45s ease;
  will-change: transform;
}
.announce-track .news-card {
  flex: 0 0 calc((100% - 48px) / 3);
  box-sizing: border-box;
}
.announce-arrow {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  background: #fff; color: var(--blue);
  border: 1px solid var(--line); border-radius: 50%;
  cursor: pointer; box-shadow: var(--shadow);
  transition: background .15s ease, color .15s ease, transform .12s ease;
}
.announce-arrow:hover { background: var(--blue); color: #fff; transform: translateY(-1px); }
.announce-arrow[hidden] { display: none; }
@media (max-width: 900px) {
  .announce-track .news-card { flex-basis: calc((100% - 24px) / 2); }
}
@media (max-width: 640px) {
  .announce-track .news-card { flex-basis: 100%; }
}

/* link/folder card (PDF lists) */
.link-card {
  display: flex; align-items: center; gap: 16px;
  background: #fff; border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: 16px 18px;
  transition: transform .16s ease, box-shadow .16s ease;
}
.link-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.link-card__icon {
  flex: 0 0 auto; width: 42px; height: 42px;
  display: grid; place-items: center;
  background: #fdeee2; color: var(--accent-dark);
  border-radius: 8px; font-size: 1.2rem;
}
.link-card__body { min-width: 0; }
.link-card__title { font-weight: 700; color: var(--ink); font-size: .96rem; }
.link-card__meta { font-size: .78rem; color: var(--muted); }

/* welcome / intro split */
.intro-split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.intro-split__media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.intro-split__body h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 8px; color: var(--blue); }
.intro-split__body .lead { color: var(--muted); }

/* ==========================================================================
   INNER PAGE  —  banner + breadcrumb + content
   ========================================================================== */
.page-banner {
  position: relative;
  background: linear-gradient(120deg, var(--blue-deep), var(--blue));
  color: #fff; padding: 40px 0;
}
.page-banner::after {
  content: ""; position: absolute; inset: 0;
  background: url("../../images/abs_ban11.png") center/cover no-repeat;
  opacity: .14;
}
.page-banner .container { position: relative; z-index: 1; }
.page-banner__title { color: #fff; margin: 0; font-size: clamp(1.5rem, 3.4vw, 2.3rem); }

.breadcrumb {
  background: var(--grey-light); border-bottom: 1px solid var(--line);
  font-size: .85rem;
}
.breadcrumb ol {
  list-style: none; margin: 0; padding: 12px 0;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.breadcrumb li { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.breadcrumb li:not(:last-child)::after { content: "\203a"; color: #9aa7b4; }
.breadcrumb a { color: var(--blue); }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 600; }

.page-body { padding: 48px 0; }
.page-layout { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; }
.article :first-child { margin-top: 0; }
.article h2 { font-size: 1.5rem; color: var(--blue); margin: 32px 0 12px; }
.article h3 { font-size: 1.15rem; color: var(--ink); margin: 24px 0 10px; }
.article p { margin: 0 0 16px; }
.article ul { margin: 0 0 16px; }
.article li { margin-bottom: 6px; }

.sidebar { position: sticky; top: 120px; }
.sidebar__box {
  background: var(--grey-light); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 22px; margin-bottom: 22px;
}
.sidebar__box h3 {
  margin: 0 0 14px; font-size: 1.05rem; color: var(--blue);
  padding-bottom: 10px; border-bottom: 2px solid var(--accent);
}
.sidebar__links { list-style: none; margin: 0; padding: 0; }
.sidebar__links li { border-bottom: 1px solid var(--line); }
.sidebar__links li:last-child { border-bottom: 0; }
.sidebar__links a { display: block; padding: 10px 0; color: var(--ink); font-size: .92rem; }
.sidebar__links a:hover { color: var(--accent); text-decoration: none; padding-left: 6px; transition: padding .15s; }

/* callout card */
.callout {
  background: linear-gradient(120deg, var(--blue), var(--blue-deep));
  color: #fff; border-radius: var(--radius-lg); padding: 24px; text-align: center;
}
.callout h3 { color: #fff; margin: 0 0 6px; }
.callout p { color: #dbe6f1; margin: 0 0 16px; font-size: .9rem; }

/* ==========================================================================
   DATA TABLE
   ========================================================================== */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.data-table { width: 100%; border-collapse: collapse; background: #fff; min-width: 520px; }
.data-table caption { text-align: left; font-weight: 700; color: var(--blue); padding: 12px 16px; }
.data-table th, .data-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: .92rem; }
.data-table thead th { background: var(--blue); color: #fff; font-weight: 700; border-bottom: 0; }
.data-table tbody tr:nth-child(even) { background: var(--grey-light); }
.data-table tbody tr:hover { background: #eef3f9; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { background: var(--footer); color: #b9c2cc; font-size: .9rem; }
.footer-cols {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 34px;
  padding: 52px 0 40px;
}
.footer-col h3 {
  color: #fff; font-size: 1.02rem; margin: 0 0 18px; padding-bottom: 10px;
  position: relative;
}
.footer-col h3::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 40px; height: 2px; background: var(--accent);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: #b9c2cc; }
.footer-col a:hover { color: #fff; text-decoration: none; padding-left: 4px; transition: padding .15s; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-brand img { height: 52px; width: auto; border-radius: 8px; }
.footer-brand strong { color: #fff; font-size: 1.05rem; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: #2c2c2c; color: #fff;
}
.footer-social a:hover { background: var(--accent); }
.footer-bar {
  background: var(--footer-2); border-top: 1px solid #2a2a2a;
  padding: 16px 0; font-size: .82rem; color: #8b95a0;
}
.footer-bar .container { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.footer-bar a { color: #8b95a0; }
.footer-bar a:hover { color: #fff; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 992px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
  .page-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .intro-split { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .main-nav .container { flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
  .nav-list {
    flex-basis: 100%; flex-direction: column;
    display: none; padding-bottom: 8px;
  }
  .nav-list.is-open { display: flex; }
  .nav-list > li > a { padding: 13px 4px; border-bottom: 1px solid rgba(255,255,255,.12); }
  .nav-list > li.is-active > a { border-bottom-color: var(--accent); }
  .nav-sub {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; background: var(--blue-deep); border-radius: 0;
    display: none; padding: 0;
  }
  .has-sub.is-open > .nav-sub { display: block; }
  .nav-sub a { color: #dbe6f1; padding-left: 24px; }
  .nav-sub a:hover { background: rgba(255,255,255,.08); color: #fff; }

  /* utility bar: drop the admissions chip, show phone | email inline */
  .utility-bar .util-badge { display: none; }
  .utility-bar .container { justify-content: center; gap: 0; }
  .utility-bar .util-item + .util-item::before {
    content: "|"; margin: 0 10px; color: #7f97b3;
  }

  /* logo bar: logo + name + Apply on a single line */
  .logo-bar .container { flex-wrap: nowrap; gap: 10px; }
  .logo-bar__brand { gap: 8px; min-width: 0; }
  .logo-bar__logo { height: 40px; }
  .logo-bar__sub { display: none; }
  .logo-bar__title { font-size: .98rem; }
  .logo-bar__phone { display: none; }
  .logo-bar__actions { margin-left: auto; }
  .logo-bar__actions .btn-accent { padding: 8px 14px; white-space: nowrap; font-size: 0; }
  .logo-bar__actions .btn-accent::after { content: "Apply"; font-size: .9rem; }
}

@media (max-width: 560px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; }
  .section { padding: 40px 0; }
  .hero .container { min-height: 320px; }
  .logo-bar__title { font-size: 1.1rem; }
}

/* utilities */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.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;
}

/* ==========================================================================
   UX4G accessibility widget — keep its panel inside the viewport
   The widget's own .uwaw panel is fixed at right:0 with max-width 450px and a
   fixed max-height; on narrow screens its content overflows and its right edge
   is clipped. Cap it to the viewport and let it scroll so nothing is cut off.
   ========================================================================== */
.uwaw {
  max-width: min(450px, 100vw) !important;
  max-height: min(530px, calc(100vh - 20px)) !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}
@media (max-width: 700px) {
  .uwaw {
    max-width: 100vw !important;
    max-height: calc(100vh - 10px) !important;
    border-radius: 0 !important;
  }
}
