:root {
  --blue: #0099cc;
  --blue-dark: #005b7c;
  --ink: #212121;
  --muted: #f5f7f8;
  --line: rgba(0, 0, 0, .09);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--muted); }
body { margin: 0; color: #333; font-family: Georgia, "Times New Roman", serif; line-height: 1.45; }
a { color: inherit; }
button, input { font: inherit; }
.container { width: min(940px, calc(100% - 40px)); margin-inline: auto; }

.language-switcher {
  position: absolute;
  z-index: 10;
  top: 18px;
  right: max(20px, calc((100vw - 940px) / 2));
  display: flex;
  gap: 7px;
  align-items: center;
  color: #555;
  font-family: Arial, sans-serif;
  font-size: 13px;
}
.language-switcher button {
  padding: 3px 2px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.language-switcher button:hover,
.language-switcher button:focus-visible,
.language-switcher button.active { border-color: var(--blue); color: #111; }
.language-switcher button.active { font-weight: 700; }

h1, h2, h3 { font-family: Arial, sans-serif; font-weight: 400; text-transform: uppercase; }
.divider { width: 80px; height: 2px; margin: 24px auto 38px; background: var(--line); }
.brand-header { padding: 10px 20px 0; text-align: center; background: #fff; }
.brand-header img { display: block; width: auto; height: 150px; max-width: 100%; margin: 0 auto; object-fit: contain; }

.portal-section { padding: 80px 0 60px; text-align: center; background: #fff; }
.portal-section h1 { margin: 0; font-size: 23px; line-height: 1.5; }
.portal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.portal-card { min-width: 0; }
.portal-link { display: block; color: #333; text-decoration: none; }
.portal-icon {
  display: grid;
  min-height: 207px;
  place-items: center;
  padding: 40px;
  background: #f5f5f5;
  transition: transform .25s ease, box-shadow .25s ease;
}
.portal-icon img { width: 127px; height: 127px; max-width: 100%; object-fit: contain; }
.portal-link:hover .portal-icon,
.portal-link:focus-visible .portal-icon { transform: translateY(-8px); box-shadow: 0 12px 25px rgba(0, 0, 0, .09); }
.portal-link:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.portal-card h2 { margin: 20px 0 8px; font-size: 16px; }
.portal-card p { margin: 0; font-size: 15px; }
.contact-section {
  padding: 30px 0 35px;
  text-align: center;
  background: linear-gradient(180deg, #0099cc, rgba(0, 153, 204, .71)), url('../images/footer-bg.jpg') center/cover;
}
.contact-section h2 { margin: 0; font-size: 23px; }
.contact-section .divider { margin-bottom: 20px; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.contact-grid h3 { margin: 0 0 18px; font-size: 16px; }
.contact-grid p, .contact-grid address { margin: 0; color: var(--ink); font-size: 17px; font-style: normal; }
.contact-grid a { color: var(--ink); }
.contact-icon { display: grid; height: 95px; place-items: center; }
.contact-icon img { object-fit: contain; }
.social-links { display: grid; width: max-content; gap: 9px; margin: 0 auto; text-align: left; }
.social-links a { display: flex; gap: 9px; align-items: center; text-decoration: none; }
.social-links a:hover, .social-links a:focus-visible { opacity: .55; }
.social-links img { flex: 0 0 18px; object-fit: contain; }
.site-footer { padding: 20px; text-align: center; background: #fff; }
.site-footer p { max-width: 940px; margin: 0 auto; }

.auth-page { min-height: 100vh; background: var(--muted); }
.auth-wrapper { display: grid; min-height: 100vh; place-items: center; padding: 70px 20px 30px; }
.auth-card {
  overflow: hidden;
  width: min(100%, 450px);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 25px 55px rgba(0, 0, 0, .24);
  text-align: center;
  animation: card-enter .65s both;
}
@keyframes card-enter {
  from { opacity: 0; transform: translateY(-35px); }
  to { opacity: 1; transform: translateY(0); }
}
.auth-card header { padding: 35px 30px 0; }
.auth-card h1 { margin: 0; color: #777; font-size: 16px; font-weight: 600; }
.auth-subtitle { margin: 10px 0 0; color: #555; font-family: Arial, sans-serif; }
.auth-card .divider { margin-bottom: 30px; }
.auth-card form { padding: 0 30px; }
.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card input[type="password"] {
  display: block;
  width: 100%;
  margin: 0 0 12px;
  padding: 14px 18px;
  border: 2px solid #f1f1f1;
  border-radius: 5px;
  background: var(--muted);
  color: #111;
  text-align: center;
  transition: border-color .2s, background-color .2s;
}
.auth-card input:focus { border-color: var(--blue); background: #fff; outline: none; }
.auth-card input[type="submit"] {
  min-width: 190px;
  margin: 8px 0 30px;
  padding: 14px 26px;
  border: 0;
  border-radius: 5px;
  background: var(--blue);
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 13px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .2s, transform .1s;
}
.auth-card input[type="submit"]:hover,
.auth-card input[type="submit"]:focus-visible { background: var(--blue-dark); }
.auth-card input[type="submit"]:active { transform: scale(.96); }
.auth-info { margin: 0; padding: 0 30px 25px; font-size: 16px; }
.auth-info a, .auth-footer a { color: var(--blue-dark); }
.auth-alert { margin: 0 30px 25px; padding: 12px; border-radius: 5px; }
.auth-alert.error { background: #fff0f0; color: #a50000; }
.auth-alert.success { background: #ecf8ef; color: #176b2c; }
.auth-footer { padding: 24px; border-top: 1px solid #e5e5e5; background: #f6f6f6; }
.auth-footer a { text-underline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

@media (max-width: 700px) {
  .brand-header { padding-top: 40px; }
  .brand-header img { height: 110px; }
  .portal-grid, .contact-grid { grid-template-columns: 1fr; }
  .portal-grid { gap: 35px; }
  .portal-card { width: min(100%, 360px); margin-inline: auto; }
  .portal-icon { min-height: 180px; padding: 26px; }
  .contact-grid { gap: 30px; }
  .contact-icon { height: 75px; }
}

@media (max-width: 420px) {
  .container { width: min(100% - 24px, 940px); }
  .language-switcher { top: 12px; right: 12px; }
  .auth-wrapper { padding-inline: 12px; }
  .auth-card header, .auth-card form { padding-inline: 20px; }
  .auth-info { padding-inline: 20px; }
  .auth-alert { margin-inline: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
