html,
#page {
  padding: 0;
  margin: 0;
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: #5f5f5f;
  font:
    normal 16px/1.7 "Segoe UI",
    Arial,
    sans-serif;
  background: linear-gradient(180deg, #fff7f7 0%, #fff 32%, #fff 100%);
}

.aic{
	text-decoration: underline !important;
}

.webRingLink::before {
    content: none;
}
.webRingLink{
    display: block;
    /*background-color: red;*/
    color: #000;
    width: auto;
    position: absolute;
    padding: 2px;
    border: 1px solid white;
    font-weight: 700;
	color: white;
}
#ringRight{
    right: 0;
    top: 0;
    margin: 0;
}
#ringLeft{
    left: 0;
    top: 0;
    margin: 0;
}

a {
  font-size: 1.04rem;
  color: #3460a5;
  text-decoration: underline;
  text-underline-offset: 0.14em;
  text-decoration-thickness: 0.08em;
  text-decoration-skip-ink: auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: #193c75;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 0;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.8rem;
}

h3 {
  font-size: 1.35rem;
}

h4 {
  font-size: 1.2rem;
}

h5 {
  font-size: 1.05rem;
}

h6 {
  font-size: 0.95rem;
}

#page {
  background: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#header,
#footer,
#top-nav,
#content,
#content #contentbar,
#content #sidebar {
  margin: 0;
  padding: 0;
}

#logo {
  padding: 0;
  width: 100px;
  float: left;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 88px;
}

#logo h1 {
  margin: 0;
  display: flex;
  align-items: center;
}

.logoIMG {
  width: auto;
  height: 64px;
}

#header {
  background: linear-gradient(180deg, #3460a5 0%, #193c75 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(154, 0, 0, 0.18);
}

#header-inner {
  margin: 0 auto;
  padding: 0 16px;
  max-width: 970px;
  width: 100%;
  min-height: 88px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-sizing: border-box;
}

#top-nav {
  margin-left: auto;
  padding-top: 0;
  min-height: 88px;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

#top-nav ul {
  list-style: none;
  margin: 0;
  padding: 0 20px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 18px;
  color: white;
}

#top-nav ul li {
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
}

#top-nav ul li.tagline {
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#top-nav ul li a {
  display: block;
  margin: 0;
  color: white;
  text-decoration: none;
  font-weight: 600;
}

#top-nav ul li.active a,
#top-nav ul li a:hover {
  color: #ffe7e7;
}

#content {
  padding: 48px 0 64px;
  flex: 1 0 auto;
}

#content-inner {
  margin: 0 auto;
  padding: 0 16px;
  max-width: 970px;
  width: 100%;
  box-sizing: border-box;
}

.hero-copy {
  max-width: 720px;
  margin-bottom: 28px;
}

.hero-copy p {
  margin: 12px 0 0;
  font-size: 1.02rem;
  color: #6b6b6b;
}

.back-link {
  display: inline;
  margin-top: 14px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #3460a5;
  font-size: 1rem;
  font-weight: 700;
  transition: color 180ms ease;
}

.back-link:hover {
  color: #193c75;
}

.preview-root {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  background: rgba(12, 18, 31, 0.72);
}

.preview-root[hidden] {
  display: none !important;
}

body.modal-open {
  overflow: hidden;
}

.preview-dialog {
  position: relative;
  width: min(1060px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid #d8e3f5;
  box-shadow: 0 24px 60px rgba(4, 10, 24, 0.32);
  outline: none;
}
.preview-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: #193c75;
  color: #fff;
  font-family: inherit;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  text-align: center;
  display: flex;
  place-content: center;
}

.preview-close:hover {
  background: #264f95;
}

.preview-frame {
  background: #f7f9fc;
  border: 1px solid #dce5f2;
  min-height: 0;
  max-height: calc(100vh - 180px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.preview-frame img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 220px);
  height: auto;
  object-fit: contain;
}

.preview-caption {
  margin: 0;
  color: #666;
  font-size: 0.95rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.card-grid[data-active-view="orarendek"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid[data-active-view="credits"] {
  grid-template-columns: minmax(0, 520px);
  justify-content: center;
}

.card-grid[data-active-view="hasznosLinkek"],
.card-grid[data-active-view="tantervek"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.link-card {
  background: #fff;
  border: 1px solid #f1d0d0;
  border-radius: 0;
  padding: 20px;
  box-shadow: 0 12px 30px rgba(120, 18, 18, 0.08);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.link-card--timetable {
  cursor: pointer;
}

.link-card--timetable:focus-visible {
  outline: 3px solid rgba(52, 96, 165, 0.32);
  outline-offset: 3px;
}

.card-media {
  margin: 0 0 14px;
}

.card-image--timetable {
  border-color: #d7e2f1;
}

.card-hint {
  margin: 12px 0 0;
  color: #3460a5;
  font-size: 0.96rem;
  font-weight: 700;
}

.link-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 34px rgba(120, 18, 18, 0.15);
  border-color: #3460a5;
}

.link-card p {
  margin: 12px 0 20px;
  color: #666;
  flex: 1;
}

.card-image-link {
  display: block;
  margin: 0 0 14px;
  text-decoration: none;
}

.card-image {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #f0d8d8;
  box-shadow: 0 8px 20px rgba(120, 18, 18, 0.12);
  object-fit: cover;
}

.card-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 2px 0 16px;
}

.card-link-chip {
  display: inline;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #3460a5;
  font-weight: 700;
  font-size: 1rem;
  transition: color 180ms ease;
  border-radius: 0;
}

.card-link-chip:hover {
  color: #193c75;
  text-decoration: underline;
}

.link-card a {
  align-self: flex-start;
  display: inline;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #3460a5;
  text-decoration: underline;
  font-size: 1rem;
  font-weight: 700;
  transition: color 180ms ease;
}

.link-card a:hover {
  color: #8f0000;
}

.card-action {
  align-self: flex-start;
  display: inline;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #3460a5;
  text-decoration: underline;
  font-weight: 700;
  font-size: 1rem;
  border: 0;
  cursor: pointer;
  transition: color 180ms ease;
}

.card-action:hover {
  color: #193c75;
}

/* Footer */
#footer {
  background: #89a0c6;
  margin-top: auto;
  flex-shrink: 0;
}

#footer-inner {
  margin: auto;
  text-align: center;
  padding: 12px;
  width: min(922px, 100%);
  box-sizing: border-box;
}

#footer p {
  margin: 0;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

#footer a {
  color: #000;
  text-decoration: none;
}

.footerlink {
  display: inline-block;
  margin: 4px 8px 0 0;
  transition:
    transform 180ms ease,
    opacity 180ms ease,
    text-decoration-color 180ms ease;
}

.footerlink:hover {
  transform: translateY(-1px);
  opacity: 0.92;
  text-decoration: underline;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 0.16em;
  text-decoration-thickness: 0.1em;
}

.link-card a,
.card-action,
.card-link-chip,
.back-link {
  transition:
    color 180ms ease,
    transform 180ms ease,
    opacity 180ms ease;
}

.link-card a:hover,
.card-action:hover,
.card-link-chip:hover,
.back-link:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

/* Clear both sides to assist with div alignment  */
.clr {
  clear: both;
  padding: 0;
  margin: 0;
  width: 100%;
  font-size: 0px;
  line-height: 0px;
}

.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;
}

@media (max-width: 1024px) {
  #header-inner,
  #content-inner {
    max-width: calc(100% - 32px);
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-grid[data-active-view="hasznosLinkek"],
  .card-grid[data-active-view="tantervek"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  #header-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 18px 16px;
  }

  #footer-inner {
    padding: 16px;
  }

  #footer p {
    font-size: 0.95rem;
  }

  .footerlink {
    margin: 6px 8px 0 0;
  }

  #logo {
    width: auto;
    float: none;
    text-align: center;
  }

  #top-nav {
    margin-left: 0;
    min-height: 0;
  }

  #top-nav ul {
    grid-template-columns: 1fr;
    justify-items: center;
    row-gap: 8px;
  }

  #top-nav ul li.tagline {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    max-width: 100%;
  }

  .preview-root {
    padding: 14px;
  }

  .preview-dialog {
    padding: 14px;
  }

  .preview-close {
    top: 8px;
    right: 8px;
  }

  .preview-frame {
    min-height: 180px;
    max-height: calc(100vh - 170px);
  }

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

  .card-grid[data-active-view="orarendek"] {
    grid-template-columns: 1fr;
  }

  .card-grid[data-active-view="hasznosLinkek"],
  .card-grid[data-active-view="tantervek"] {
    grid-template-columns: 1fr;
  }
}
