/* ==========================================================
   LGB Civil Hospital, Tinsukia: institutional website styles
   Design goals: clear hierarchy, high contrast, accessible
   (WCAG 2.1 AA targets), mobile-first, sober and trustworthy.
   ========================================================== */

:root {
  --navy: #0f2b46;
  --navy-2: #1a3f63;
  --blue: #1d5c96;
  --saffron: #e88a1a;
  --green: #138808;
  --ink: #1f2933;
  --muted: #55626f;
  --line: #d9e0e7;
  --soft: #f3f6f9;
  --white: #ffffff;
  --focus: #ffbf47;
  --maxw: 1200px;
  --radius: 6px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--navy); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 4px;
}
.skip-link:focus { left: 12px; }

.container { width: min(100% - 40px, var(--maxw)); margin-inline: auto; }
.section { padding: 56px 0; }
.section--soft { background: var(--soft); }
.section--border { border-top: 1px solid var(--line); }

/* Tricolour accent strip, a common device on Indian public-sector sites */
.tricolour { height: 6px; background: linear-gradient(to right, var(--saffron) 33.33%, #fff 33.33% 66.66%, var(--green) 66.66%); }

h1, h2, h3, h4 { color: var(--navy); line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p + p { margin-top: 12px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; padding-bottom: 12px; border-bottom: 2px solid var(--navy); }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 600; }
.muted { color: var(--muted); }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 70ch; }

/* ---------- Utility bar ---------- */
.utility {
  background: var(--navy); color: #dbe6f0; font-size: 0.86rem;
}
.utility .container { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; flex-wrap: wrap; }
.utility a { color: #fff; text-decoration: none; }
.utility a:hover { text-decoration: underline; }
.utility ul { list-style: none; display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- Masthead ---------- */
.masthead { background: var(--white); border-bottom: 1px solid var(--line); }
.masthead .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 16px; color: var(--navy); text-decoration: none; }
.brand img { width: 72px; height: 72px; object-fit: contain; }
.brand__name { font-size: 1.35rem; font-weight: 800; color: var(--navy); line-height: 1.15; }
.brand__sub { display: block; font-size: 0.9rem; color: var(--muted); font-weight: 500; margin-top: 2px; }
.masthead__cta { display: flex; gap: 10px; align-items: center; }
.search-box { display: flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.search-box input { border: 0; padding: 10px 14px; font: inherit; width: 220px; outline: none; }
.search-box button { border: 0; background: var(--navy); color: #fff; padding: 0 16px; cursor: pointer; font: inherit; }

/* ---------- Primary navigation ---------- */
.primary-nav { background: var(--navy-2); position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.primary-nav .container { display: flex; align-items: center; justify-content: space-between; }
.menu { display: flex; list-style: none; flex-wrap: wrap; }
.menu a {
  display: block; padding: 14px 16px; color: #fff; text-decoration: none;
  font-weight: 600; font-size: 0.95rem; border-bottom: 3px solid transparent;
}
.menu a:hover { background: rgba(255,255,255,.08); }
.menu a.active { border-bottom-color: var(--saffron); background: rgba(255,255,255,.06); }
.nav-toggle {
  display: none; background: none; border: 1px solid rgba(255,255,255,.4); color: #fff;
  padding: 10px 14px; border-radius: 4px; cursor: pointer; font: inherit; font-weight: 600;
}

/* ---------- Breadcrumb ---------- */
.crumbs { background: var(--soft); border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.crumbs .container { padding: 10px 0; }
.crumbs ol { list-style: none; display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--muted); }

/* ---------- Page title band (inner pages) ---------- */
.page-title { padding: 40px 0 28px; border-bottom: 1px solid var(--line); }
.page-title h1 { margin-bottom: 8px; }

/* ---------- Home banner ---------- */
.banner {
  background:
    linear-gradient(90deg, rgba(15,43,70,.92) 0%, rgba(15,43,70,.78) 55%, rgba(15,43,70,.55) 100%),
    url("../img/LGB-top1.jpg") center/cover no-repeat;
  color: #fff; padding: 64px 0 56px;
}
.banner h1 { color: #fff; max-width: 22ch; }
.banner p { color: #d6e2ec; margin-top: 14px; max-width: 62ch; font-size: 1.05rem; }
.banner .btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

.btn {
  display: inline-block; padding: 11px 20px; border-radius: var(--radius);
  font-weight: 600; text-decoration: none; border: 2px solid transparent; font-size: 0.95rem;
}
.btn--primary { background: var(--saffron); color: #1a1a1a; }
.btn--primary:hover { background: #d97a0b; color: #1a1a1a; }
.btn--outline { border-color: #fff; color: #fff; }
.btn--outline:hover { background: #fff; color: var(--navy); }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-2); color: #fff; }

/* ---------- Quick links ---------- */
.quick { margin-top: -32px; position: relative; z-index: 2; }
.quick__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(15,43,70,.10); overflow: hidden;
}
.quick a {
  display: flex; flex-direction: column; gap: 4px; padding: 20px 22px;
  color: var(--navy); text-decoration: none; border-right: 1px solid var(--line);
  border-bottom: 3px solid transparent; font-weight: 700;
}
.quick a:last-child { border-right: 0; }
.quick a span { font-weight: 400; font-size: 0.88rem; color: var(--muted); }
.quick a:hover { background: var(--soft); border-bottom-color: var(--saffron); }

/* ---------- Two-column layout ---------- */
.two-col { display: grid; gap: 40px; grid-template-columns: 2fr 1fr; align-items: start; }
.prose h2 { margin: 28px 0 10px; }
.prose h2:first-child { margin-top: 0; }
.prose ul { margin: 10px 0 10px 20px; }
.prose li { margin: 6px 0; }
.prose img { border-radius: var(--radius); border: 1px solid var(--line); margin: 16px 0; }

.aside { display: grid; gap: 20px; }
.box { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.box__head { background: var(--navy); color: #fff; padding: 12px 18px; font-weight: 700; border-radius: var(--radius) var(--radius) 0 0; }
.box__body { padding: 16px 18px; }
.box ul { list-style: none; }
.box li { border-bottom: 1px solid var(--line); }
.box li:last-child { border-bottom: 0; }
.box li a { display: block; padding: 10px 2px; color: var(--ink); text-decoration: none; font-weight: 500; }
.box li a:hover { color: var(--blue); text-decoration: underline; }

/* ---------- Notices table ---------- */
.notices { width: 100%; border-collapse: collapse; background: #fff; font-size: 0.95rem; }
.notices caption { text-align: left; font-weight: 700; color: var(--navy); padding-bottom: 8px; }
.notices th, .notices td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.notices th { background: var(--soft); color: var(--navy); font-size: 0.85rem; text-transform: uppercase; letter-spacing: .04em; }
.notices tr:hover td { background: #fbfcfd; }
.tag { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 2px 8px; border-radius: 3px; background: #fdf0dc; color: #8a4b00; }
.tag--new { background: #e3f3e6; color: #1d6a2c; }

/* ---------- Cards (service grid) ---------- */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--navy); border-radius: var(--radius); padding: 22px; }
.card:hover { border-top-color: var(--saffron); }
h2.h3, h2.h4 { font-size: 1.15rem; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.card p { color: var(--muted); font-size: 0.95rem; }
.card a { font-weight: 600; }

/* ---------- Image + text ---------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.feature img { width: 100%; height: 100%; min-height: 260px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
.steps { counter-reset: step; list-style: none; display: grid; gap: 14px; margin-top: 16px; }
.steps li { counter-increment: step; position: relative; padding-left: 52px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 36px; height: 36px;
  border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700;
}

/* ---------- Table (doctors) ---------- */
.search-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.search-row input {
  font: inherit; padding: 10px 14px; border: 1px solid #b8c4cf; border-radius: var(--radius); min-width: 300px;
}
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; min-width: 620px; background: #fff; }
table.data th { background: var(--navy); color: #fff; text-align: left; padding: 12px 16px; font-size: 0.9rem; }
table.data td { padding: 12px 16px; border-top: 1px solid var(--line); }
table.data tbody tr:nth-child(even) { background: #fafbfc; }
table.data tr.group td { background: var(--soft); color: var(--navy); font-weight: 700; text-transform: uppercase; font-size: 0.85rem; letter-spacing: .04em; }
td.sl { color: var(--muted); width: 64px; }

/* ---------- Gallery ---------- */
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.gallery a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; align-items: start; }
.dl { display: grid; grid-template-columns: 140px 1fr; gap: 12px 16px; }
.dl dt { font-weight: 700; color: var(--navy); }
.dl dd { color: var(--ink); }
.form { display: grid; gap: 14px; }
.form label { font-weight: 600; display: grid; gap: 6px; font-size: 0.95rem; }
.form input, .form select, .form textarea { font: inherit; padding: 11px 12px; border: 1px solid #b8c4cf; border-radius: var(--radius); background: #fff; }
.form textarea { min-height: 120px; resize: vertical; }
.form .hint { font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.map { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 24px; }
.map iframe { width: 100%; height: 320px; border: 0; display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #c9d6e2; margin-top: 0; }
.site-footer a { color: #e6eef5; }
.footer-top { padding: 40px 0 28px; display: grid; gap: 32px; grid-template-columns: 1.4fr 1fr 1fr 1fr; }
.footer-top h2.h4 { color: #fff; font-size: 0.98rem; margin-bottom: 12px; }
.footer-top ul { list-style: none; display: grid; gap: 8px; font-size: 0.93rem; }
.footer-top a { text-decoration: none; }
.footer-top a:hover { text-decoration: underline; }
.site-footer .brand__name { color: #fff; font-size: 1.1rem; }
.site-footer .brand__sub { color: #b4c4d3; }
.footer-bottom { background: #0a2238; padding: 16px 0; font-size: 0.85rem; }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-bottom ul { list-style: none; display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .two-col, .feature, .contact { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .masthead__cta { display: none; }
}
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .primary-nav .container { flex-wrap: wrap; }
  .menu { display: none; width: 100%; flex-direction: column; border-top: 1px solid rgba(255,255,255,.15); }
  .menu.open { display: flex; }
  .menu a { border-bottom: 1px solid rgba(255,255,255,.1); border-left: 3px solid transparent; }
  .menu a.active { border-left-color: var(--saffron); border-bottom-color: rgba(255,255,255,.1); }
  .nav-toggle { margin: 8px 0; }
  .brand img { width: 60px; height: 60px; }
  .brand__name { font-size: 1.1rem; }
}
@media (max-width: 560px) {
  .section { padding: 40px 0; }
  .banner { padding: 44px 0 40px; }
  .quick { margin-top: -20px; }
  .quick a { border-right: 0; border-bottom: 1px solid var(--line); }
  .footer-top { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 1fr; }
  .search-row input { min-width: 0; width: 100%; }
  .utility .container { justify-content: center; text-align: center; }
}

@media print {
  .utility, .primary-nav, .site-footer, .nav-toggle, .search-box, .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { display: none !important; }
  body { color: #000; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
