/* chood.ru — minimal typography & layout refresh (graphics unchanged) */

body {
  margin: 0;
  padding: 0;
  min-width: 1280px;
  font-size: 15px;
  line-height: 1.65;
  font-family: Inter, "Segoe UI", "Helvetica Neue", system-ui, -apple-system, Arial, sans-serif;
  text-align: center;
  color: #2d3748;
  -webkit-font-smoothing: antialiased;
}

td {
  font-size: 15px;
  line-height: 1.65;
  font-family: inherit;
  background-repeat: repeat-x;
}

p {
  margin: 0 0 12px;
}

a:link,
a:visited {
  font-size: inherit;
  font-family: inherit;
  text-decoration: none;
  color: #1d4ed8;
}

a:active {
  color: #1e40af;
}

a:hover {
  text-decoration: underline;
  color: #1e40af;
}

div#header {
  --header-h: 280px;
  --header-left-w: 480px;
  --header-right-w: 359px;
  --header-center-w: 661px;
  --menu-green: #00ce04;
  height: var(--header-h);
  line-height: normal;
  margin: 0 0 40px;
  position: relative;
  overflow: visible;
  background-color: #5ec0ea;
}

/* Center layer — below left/right */
div#header::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: url(/images/header/top-center.png) center top no-repeat;
  background-size:
    clamp(
      calc(var(--header-center-w) * 0.65),
      calc(100% - 120px),
      100%
    )
    var(--header-h);
  pointer-events: none;
}

/* Left + right edge images — above center */
div#header::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-image:
    url(/images/header/top-right.png),
    url(/images/header/top-left.png);
  background-repeat: no-repeat, no-repeat;
  background-position: right top, left top;
  background-size: var(--header-right-w) var(--header-h), var(--header-left-w) var(--header-h);
  pointer-events: none;
}

a.header-logo {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -45%);
  line-height: 0;
  text-decoration: none;
}

a.header-logo img {
  display: block;
  height: 73px;
  width: auto;
  max-width: min(645px, calc(100% - 40px));
}

div#header > table {
  position: relative;
  z-index: 2;
  width: 100% !important;
  height: 100%;
  border-collapse: collapse;
}

/* Top menu — green bar below header image */
div#header tr.header-menu-row,
div#header tr[height="27"],
div#header tr[height="27px"] {
  height: 0;
  line-height: 0;
}

div#header tr.header-menu-row td,
div#header tr[height="27"] td,
div#header tr[height="27px"] td {
  height: 0;
  padding: 0;
  border: 0;
  overflow: visible;
  vertical-align: bottom;
}

div#header .top-nav {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  bottom: auto;
  z-index: 4;
  width: 100% !important;
  max-width: none !important;
  margin: 0;
  padding: 9px 28px 9px 236px;
  box-sizing: border-box;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 0;
  background-color: var(--menu-green);
  background-image: none;
}

div#header table[width="500"] {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  bottom: auto;
  z-index: 4;
  width: 100% !important;
  padding: 9px 28px 9px 236px;
  box-sizing: border-box;
  border-radius: 0;
  background-color: var(--menu-green);
}

div#header .top-nav td,
div#header table[width="500"] td {
  width: auto !important;
  padding: 0 22px 0 0 !important;
  white-space: nowrap;
  text-align: left;
  vertical-align: middle;
}

div#header .top-nav td:last-child,
div#header table[width="500"] td:last-child {
  padding-right: 0 !important;
}

div#header .top-nav td:first-child,
div#header table[width="500"] td:first-child {
  padding-left: 0;
}

div#header .top-nav td a,
div#header table[width="500"] td a {
  white-space: nowrap;
  font-size: 14px;
  line-height: 1.2;
  color: #0f298e;
}

div#header .top-nav a font[color="white"],
div#header table[width="500"] a font[color="white"] {
  color: #fff !important;
}

div#header .top-nav td:empty,
div#header table[width="500"] td:empty {
  display: none;
  padding: 0;
  width: 0 !important;
}

/* Site width */
div#container {
  text-align: left;
  width: 1280px;
  margin: 0 auto;
}

div#cup {
  width: 1230px;
  margin: 0 auto;
}

div#content p {
  line-height: 1.65;
}

div#navigation,
div#navigation1 {
  float: left;
  width: 220px;
  height: auto !important;
  min-height: 0;
  background: none !important;
  padding: 28px 14px 24px 18px;
  box-sizing: border-box;
}

div#navigation {
  margin-left: -1280px;
  position: relative;
  z-index: 2;
}

div#navigation1 {
  margin-left: -1280px;
  position: relative;
  z-index: 2;
}

div#extra1 {
  float: left;
  width: 240px;
  margin-left: -240px;
  padding: 28px 18px 24px 20px;
  box-sizing: border-box;
  border-left: 1px solid #e8ecf0;
}

div#footer {
  background: url(/images/line_bottom.png);
  color: #6b7280;
  clear: both;
  width: 100%;
  height: auto;
  min-height: 38px;
  font-size: 14px;
}

div#footer p {
  margin: 0;
  padding: 10px 16px;
}

div#content {
  float: none;
  width: auto;
  margin: 28px 24px 32px 236px;
  padding: 8px 20px 24px 8px;
  box-sizing: border-box;
}

div#extra {
  float: left;
  clear: left;
  width: 240px;
  background: transparent;
}

div#wrapper {
  float: left;
  width: 100%;
  position: relative;
}

div#wrapper1 {
  float: left;
  width: 100%;
  position: relative;
}

div#content1 {
  margin: 24px 260px 32px 236px;
  padding: 8px 20px 24px 8px;
}

/* Section titles — weight 500, sentence case via HTML */
.t, .s, .sh, .f, .n, .o, .p, .k, .v, .pr, .s2, .m, .i, .s3, .k2,
div.div_a_f, div.div_a_p, div.div_a_i, div.div_a_k2, div.div_a_m {
  font-size: 1.2rem;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.o { color: #0f298e; }
.s { color: #c53030; }
.sh { color: #2f855a; }
.f { color: #3333cc; }
.t { color: #3399ff; }
.n { color: #e53e3e; }
.p { color: #b50000; }
.k { color: #e7672b; }
.v { color: #00cdff; }
.pr { color: #ac64ff; }
.s2 { color: #005352; }
.m { color: #af4f92; }
.i { color: #ffb100; }
.s3 { color: #8a0200; }
.k2 { color: #336600; }

/* Homepage service blocks */
.home-section {
  padding: 20px 0 24px;
  border-bottom: 1px solid #e8ecf0;
}

.home-section:last-child {
  border-bottom: none;
}

.home-section__row td {
  vertical-align: top;
}

.home-section__emblem {
  width: 96px;
  padding: 12px 16px 12px 4px;
}

.home-section__emblem img {
  display: block;
  padding: 6px;
}

.home-section__body {
  padding: 4px 0 0;
}

.home-section__desc {
  color: #4a5568;
  margin: 8px 0 16px;
}

.home-section__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 4px;
}

.home-section__links a {
  text-decoration: none;
  white-space: nowrap;
}

.home-section__links a:hover {
  text-decoration: underline;
}

.home-section__links--o a { color: #0f298e; }
.home-section__links--s a { color: #c53030; }
.home-section__links--sh a { color: #2f855a; }

/* Closed section /mod/ hub */
.mod-hub-title {
  margin: 0 0 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e8ecf0;
}

.mod-hub-title .f {
  font-size: 1.2rem;
  font-weight: 500;
  margin: 0 0 8px;
}

.mod-hub-lead {
  color: #4a5568;
  margin: 0;
  max-width: 42em;
}

.mod-hub-empty {
  color: #6b7280;
  padding: 24px 0;
}

.mod-hub-emblem img {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  padding: 0;
  background: #000;
}

.mod-hub-emblem-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: #0f298e;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 600;
}

/* Side navigation */
.side-nav {
  width: 100%;
  border-collapse: collapse;
}

.side-nav tr {
  border-bottom: 1px solid #e8ecf0;
}

#navigation table.side-nav,
#navigation1 table.side-nav {
  margin-bottom: 10px;
}

#navigation table:not(.side-nav) tr[height="220"],
#navigation table:not(.side-nav) tr[height="25"],
#navigation1 table:not(.side-nav) tr[height="220"],
#navigation1 table:not(.side-nav) tr[height="25"] {
  display: none;
}

#navigation table:not(.side-nav),
#navigation1 table:not(.side-nav) {
  margin-top: 0;
  width: 100%;
}

.side-nav tr:first-child td,
.side-nav tr.nav-spacer td {
  padding: 0 !important;
  height: 0 !important;
  line-height: 0;
  font-size: 0;
}

.side-nav td {
  padding: 11px 4px;
  background: transparent !important;
}

.side-nav a.side-nav-link,
#navigation a.side-nav-link,
#navigation1 a.side-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  color: #2d3748;
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  padding: 2px 0;
}

.side-nav a.side-nav-link::after,
#navigation td a.side-nav-link::after,
#navigation1 td a.side-nav-link::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 8px;
  flex-shrink: 0;
  border-right: 1.5px solid #9ca3af;
  border-bottom: 1.5px solid #9ca3af;
  transform: rotate(-45deg);
  opacity: 0.7;
}

.side-nav a.side-nav-link:hover,
#navigation td a.side-nav-link:hover,
#navigation1 td a.side-nav-link:hover {
  color: #1d4ed8;
  text-decoration: none;
}

/* Current page in side nav (legacy <font color=white>) */
.side-nav a.side-nav-link font[color="white"],
.side-nav a font[color="white"],
#navigation a.side-nav-link font[color="white"],
#navigation1 a.side-nav-link font[color="white"] {
  color: #0284c7 !important;
  font-weight: 600;
}

.side-nav td:has(font[color="white"]),
#navigation td:has(font[color="white"]),
#navigation1 td:has(font[color="white"]) {
  background: #e0f2fe !important;
  border-radius: 4px;
}

#navigation img[src*="bottom_menu.gif"],
#navigation1 img[src*="bottom_menu.gif"] {
  display: none !important;
}

#navigation td[width="16"],
#navigation1 td[width="16"] {
  display: none;
}

#navigation table[width="188"],
#navigation1 table[width="188"] {
  width: 100% !important;
  height: auto !important;
}

#navigation td[width="177"],
#navigation1 td[width="177"] {
  width: auto !important;
}

/* News sidebar */
.news-panel {
  margin-top: 8px;
  overflow: hidden;
}

#extra1 {
  overflow: hidden;
}

.news-panel__title {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e8ecf0;
}

.news-item {
  padding: 0 0 16px;
  margin: 0 0 16px;
  border-bottom: 1px solid #e8ecf0;
}

.news-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.news-item__text {
  display: block;
  color: #1e3a8a;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  text-decoration: none;
}

.news-item__text:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

#extra1 img[src*="bottom.gif"],
#extra1 img[src*="green_line.png"] {
  display: none !important;
}

#extra1 > br {
  display: none;
}

/* Inner pages content */
div#content font[color="#666666"],
font[color="#666666"] {
  color: #4a5568 !important;
}

div.div1 {
  width: 210px;
  height: 160px;
  float: left;
  padding-top: 24px;
}

/* Lightbox — unchanged */
#lightbox {
  position: absolute;
  top: 40px;
  left: 0;
  width: 100%;
  z-index: 100;
  text-align: center;
  line-height: 0;
}

#lightbox a img {
  border: none;
}

#outerImageContainer {
  position: relative;
  background-color: #fff;
  width: 250px;
  height: 250px;
  margin: 0 auto;
}

#imageContainer {
  padding: 10px;
}

#loading {
  position: absolute;
  top: 40%;
  left: 0%;
  height: 25%;
  width: 100%;
  text-align: center;
  line-height: 0;
}

#hoverNav {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: 10;
}

#imageContainer > #hoverNav {
  left: 0;
}

#hoverNav a {
  outline: none;
}

#prevLink,
#nextLink {
  width: 49%;
  height: 100%;
  background: transparent url(../phg/images/blank.gif) no-repeat;
  display: block;
}

#prevLink {
  left: 0;
  float: left;
}

#nextLink {
  right: 0;
  float: right;
}

#prevLink:hover,
#prevLink:visited:hover {
  background: url(../phg/images/prevlabel.gif) left 15% no-repeat;
}

#nextLink:hover,
#nextLink:visited:hover {
  background: url(../phg/images/nextlabel.gif) right 15% no-repeat;
}

#imageDataContainer {
  font: 10px Verdana, Helvetica, sans-serif;
  background-color: #fff;
  margin: 0 auto;
  line-height: 1.4em;
}

#imageData {
  padding: 0 10px;
}

#imageData #imageDetails {
  width: 70%;
  float: left;
  text-align: left;
}

#imageData #caption {
  font-weight: bold;
}

#imageData #numberDisplay {
  display: block;
  clear: left;
  padding-bottom: 1em;
}

#imageData #bottomNavClose {
  width: 66px;
  float: right;
  padding-bottom: 0.7em;
}

#overlay {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 90;
  width: 100%;
  height: 500px;
  background-color: #000;
  filter: alpha(opacity=60);
  -moz-opacity: 0.6;
  opacity: 0.6;
}

.clearfix:after {
  content: ".";
  display: block;
  height: 0;
  clear: both;
  visibility: hidden;
}

* html > body .clearfix {
  display: inline-block;
  width: 100%;
}

* html .clearfix {
  height: 1%;
}
