﻿:root {
  --primary: #22274f;
  --primary-soft: #394183;
  --accent: #c8a95b;
  --bg: #f3f5fb;
  --surface: #ffffff;
  --surface-alt: #f7f8fc;
  --text: #161a40;
  --muted: #59607e;
  --border: rgba(34, 39, 79, 0.12);
  --shadow: 0 18px 40px rgba(26, 31, 74, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #eef3f7 0%, var(--bg) 100%);
}

.topbar {
  background: #161a40;
  color: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar__content {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}

.topbar__brand,
.topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

h1, h2 {
  font-family: 'Roboto', sans-serif;
  margin: 0;
}

p {
  margin: 0;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: auto;
  display: grid;
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 0 1.25rem;
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 0.35rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0.45rem 0.9rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.hero__link:hover {
  transform: translateY(-1px);
}

.hero__link--primary {
  background: #ffffff;
  color: var(--primary);
}

.hero__link--secondary {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero__grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.hero__panel {
  border-radius: 0;
}

.hero__panel--brand {
  background: transparent;
  border: none;
}

.brand-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  padding: 0.4rem 0;
  color: var(--text);
  width: 100%;
}

.brand-card__logo-wrap {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: auto;
  min-height: auto;
  padding: 0;
  background: none;
}

.brand-card__body {
  max-width: 520px;
  width: 100%;
}

.brand-card__logo {
  width: min(100%, 320px);
  height: auto;
  object-fit: contain;
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  filter: none;
}

.eyebrow,
.section-tag {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
}

.eyebrow {
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.hero h1 {
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  margin-bottom: 0.45rem;
  font-weight: 900;
  color: var(--primary);
}

.hero__text {
  max-width: 640px;
  line-height: 1.45;
  color: var(--muted);
}

.hero__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 1rem;
  color: var(--primary);
  font-size: 0.92rem;
}

.hero__meta-item {
  display: inline-flex;
  align-items: center;
}

.hero__meta-separator {
  width: 28px;
  height: 1px;
  background: rgba(34, 39, 79, 0.32);
}

.main-content {
  margin-top: 0;
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

.site-footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.92);
  margin-top: 2rem;
}

.site-footer__content {
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 0;
}

.site-footer__content strong {
  display: block;
  margin-bottom: 0.35rem;
}

.site-footer__content p {
  color: rgba(255, 255, 255, 0.78);
}

.site-footer__links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-footer__links a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
}

.bottom-ribbon {
  height: 16px;
  background: linear-gradient(90deg, #b99542 0%, #d6b969 50%, #b99542 100%);
}

.layout {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

.layout--primary {
  grid-template-columns: 1.2fr 0.8fr;
}

.layout--secondary {
  grid-template-columns: 1fr 1fr;
  margin-top: 1.5rem;
}

.card--wide {
  min-height: 100%;
}

.card--equal {
  height: 100%;
}

.card--summary {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.summary-list {
  display: grid;
  gap: 1rem;
}

.summary-item {
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-alt);
}

.summary-item span {
  display: block;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.summary-item strong {
  color: var(--primary);
  font-size: 1.05rem;
}

.institutional-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
  align-content: start;
}

.institutional-card__content h2 {
  font-size: 2rem;
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.institutional-card__media img {
  width: 100%;
  display: block;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 12px 24px rgba(17, 23, 58, 0.14);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.card--form,
.card--info {
  border-top: 5px solid var(--primary);
}

.section-tag {
  color: var(--accent);
  margin-bottom: 0.85rem;
}

.card h2 {
  font-size: 1.7rem;
  margin-bottom: 1rem;
  color: var(--primary);
  font-weight: 800;
}

.section-copy {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.calculator-form {
  display: grid;
  gap: 0.85rem;
}

.label {
  font-weight: 700;
  color: var(--primary);
}

.input-group {
  display: flex;
  gap: 0.8rem;
}

.input-group input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1rem;
  font-size: 1rem;
  outline: none;
}

.input-group input:focus {
  border-color: var(--primary-soft);
  box-shadow: 0 0 0 4px rgba(33, 77, 112, 0.12);
}

.input-group button {
  border: none;
  border-radius: 14px;
  padding: 0 1.4rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-soft));
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.input-group button:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.message {
  min-height: 1.25rem;
  color: #b42318;
  font-size: 0.95rem;
}

.results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.75rem;
}

.result-box {
  padding: 1.2rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
}

.result-box--accent {
  background: rgba(158, 123, 61, 0.08);
}

.result-box span {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--muted);
}

.result-box strong {
  font-size: 1.7rem;
  color: var(--primary);
}

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.95rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid rgba(18, 49, 74, 0.08);
}

thead th {
  color: var(--primary);
  background: #eef1fb;
  font-size: 0.94rem;
}

tbody tr:nth-child(even) {
  background: #fafbff;
}

@media (max-width: 860px) {
  .topbar__content,
  .topbar__brand,
  .topbar__actions {
    flex-wrap: wrap;
  }

  .topbar__actions {
    justify-content: flex-start;
  }

  .hero__grid,
  .layout,
  .institutional-card {
    grid-template-columns: 1fr;
  }

  .results {
    grid-template-columns: 1fr;
  }

  .site-footer__content {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .topbar__content {
    flex-direction: column;
    justify-content: center;
    padding: 0.6rem 0;
    text-align: center;
  }

  .topbar__brand,
  .topbar__actions {
    justify-content: center;
  }

  .brand-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .brand-card__logo-wrap {
    width: 100%;
    justify-content: center;
  }

  .brand-card__logo {
    width: min(100%, 320px);
    height: auto;
  }

  .brand-card__body {
    max-width: 100%;
  }

  .hero__meta {
    justify-content: center;
    flex-wrap: wrap;
  }

  .input-group {
    flex-direction: column;
  }

  .input-group button {
    min-height: 52px;
  }

  .card {
    padding: 1.4rem;
  }
}
