@media (max-width: 575px) {
  p,
  div,
  ol li span,
  ol li a span {
    font-size: 0.9rem;
  }

  #mod-custom115 div {
    font-size: 0.85rem !important;
  }
}

/* Logo position */

.header .grid-child {
  max-width: 1270px;
}

/* Menu item image */

.image-menuitem {
  margin-right: 10px;
}

.image-smallmenuitem {
  margin: 0 1rem;
}

/* Headings */

h1, .h1 {
  font-size: 1.7rem;
  padding: 6px 0;
}

h2, .h2 {
  font-size: 1.45rem;
  padding: 4px 0;
}

h3, .h3 {
  font-size: 1.35rem;
  padding: 0.4rem 0 2px;
}

h4, .h4 {
  font-size: 1.25rem;
  padding: 0.3rem 0;
}

h5, .h5 {
  font-size: 1.05rem;
  padding: 0.2rem 0;
}

h6, .h6 {
  font-size: 1rem;
}

@media (max-width: 575px) {
  h1, .h1 {
    font-size: calc(1.25rem + .3vw);
  }
  
  h2, .h2 {
    font-size: calc(1.15rem + .3vw);
  }
  
  h3, .h3 {
    font-size: calc(1.05rem + .3vw);
    padding-top: 0.5rem;
  }
  
  h4, .h4 {
    font-size: calc(1rem + .3vw);
  }
  
  h5, .h5 {
    font-size: calc(0.95rem + .3vw);
  }
  
  h6, .h6 {
    font-size: calc(0.9rem + .3vw);
  }
}

/* Main content and side bars */

.site-grid {
  grid-template-columns: [full-start] minmax(0, 1.2fr) [main-start] repeat(3, minmax(0, 19.875rem)) minmax(0, 17.75rem) [main-end] minmax(0, 0.8fr) [full-end];
}

/* "Hivatkozások" page */

li {
  padding: 2px 0;
}

li:target {
  background: lightcyan;
}

/* Footer */

.footer .grid-child {
  padding: 5px;
}

.footer {
  font-size: 1rem;
}

@media (width < 500px) {
  .footer {
    font-size: 0.8rem;
  }
}

/* References link */

sup a {
  font-size: 0.8em;
  text-decoration: none !important;
  color: #333;
  background-color: #ddd;
  padding: 2px 6px;
  border-radius: 10px;
  transition: background-color 0.2s ease;
}

sup a:hover {
  background-color: #ccc;
}

/* "Featured Articles" menu item type */

.blog-featured > h1 {
  font-size: 1.1rem;
  font-weight: 500;
  color: #555;
  margin: 0.5rem 0;
  border-bottom: 1px solid #dee2e6;
}

.blog-featured .blog-items {
  grid-gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  margin-bottom: 0;
}

.blog-featured .blog-item {
  padding: 0.8rem;
  border-radius: 0.3rem;
  transition: box-shadow 0.2s ease-in-out, background 0.2s ease-in-out;
}

.blog-featured .blog-item:hover {
  background: #f8f9fc;
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
}

.blog-featured .item-title a {
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--cassiopeia-color-primary, #222);
}

.blog-featured .item-title a:hover {
  text-decoration: underline;
}

.blog-featured h4 {
  font-size: 1.05rem;
  color: #667;
}

/* "List All Categories in an Article Category Tree" Menu item type */

.com-content-categories.categories-list > h1 {
  margin-bottom: 1rem;
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 0.3rem;
  color: #222;
}

.categories-list .category-desc {
  font-style: italic;
  margin: 1.5rem 0;
}

.com-content-categories.categories-list > .com-content-categories__items {
  max-width: 500px;
  border: 1px solid #dee2e6;
  border-radius: 0.3rem;
  margin: 1.5rem;
}

.com-content-categories__item {
  background: #f9fafb;
  padding: 0 0.8rem;
  transition: background 0.2s ease-in-out;
}

.com-content-categories__item:hover {
  background: #f1f3f5;
}

.com-content-categories__item-title {
  margin-top: 0.15rem;
}

.com-content-categories__item-title a {
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--cassiopeia-color-primary, #222);
}

.com-content-categories__children .com-content-categories__item-title a {
  font-size: 1rem;
  font-weight: 400;
}

.com-content-categories__item-title a:hover {
  text-decoration: underline;
}

/* "Category Blog" Menu item type */

.com-content-category-blog > h2 {
  font-size: 1.1rem;
  font-weight: 500;
  color: #555;
  margin: 1rem 0;
  border-bottom: 1px solid #dee2e6;
}

.com-content-category-blog__children {
  width: 100%;
  max-width: 320px;
  border: 1px solid #dee2e6;
  border-radius: 0.3rem;
  margin: 1.5rem;
}

.com-content-category-blog__child {
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  padding: 0 0.8rem;
  transition: background 0.2s ease-in-out;
}

.com-content-category-blog__child:hover {
  background: #f1f3f5;
}

.com-content-category-blog__child .item-title a {
  font-size: 1.05rem;
  text-decoration: none;
  font-weight: 600;
  color: var(--cassiopeia-color-primary, #222);
}

.com-content-category-blog .blog-items {
  grid-gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  margin-bottom: 0;
}

.com-content-category-blog__item.blog-item {
  padding: 0.8rem;
  border-radius: 0.3rem;
  transition: box-shadow 0.2s ease-in-out, background 0.2s ease-in-out;
}

.com-content-category-blog__item.blog-item:hover {
  background: #f8f9fc;
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
}

.com-content-category-blog__item .page-header h3 a {
  font-size: 1.25rem;
  text-decoration: none;
  font-weight: 600;
  color: var(--cassiopeia-color-primary, #222);
}

.com-content-category-blog__child .item-title a:hover,
.com-content-category-blog__item .page-header h3 a:hover {
  text-decoration: underline;
}

.com-content-category-blog__item h4 {
  font-size: 1.1rem;
  color: #667;
}

.com-content-category-blog__item h5,
.com-content-category-blog__item h6 {
  color: #808090;
  font-weight: 500;
}

/* "Category List" Menu item type */

.com-content__filter {
  font-size: 0.95rem;
  margin: 0.8rem 1.5rem 0;
}

.com-content__filter .inputbox {
  padding: 0.2rem 0.4rem;
}

.com-content__filter .btn {
  font-size: 0.95rem;
  padding: 0.25rem 0.6rem;
}

.com-content-category__table {
  width: 100%;
  max-width: 700px;
  border-collapse: separate;
  border-spacing: 0 0.2rem;
  border: none !important;
  margin: 1.5rem;
}

.com-content-category__table tbody tr th {
  background-color: #f8f9fa !important;
  border: none !important;
  padding: 0.4rem 1rem;
  border-radius: 0.3rem;
}

.com-content-category__table tbody tr:hover th {
  background-color: #f1f3f5 !important;
}

.com-content-category__table th.list-title a {
  font-size: 1rem;
  font-weight: 400;
  color: var(--cassiopeia-color-primary, #222);
  text-decoration: none;
}

.com-content-category__table th.list-title a:hover {
  text-decoration: underline;
}

/* Authorization forms */

.com-users-registration,
.com-users-login,
.com-users-reset,
.com-users-reset-confirm,
.com-users-reset-complete {
  max-width: 700px;
  margin: 0 auto;
  padding: 20px 40px;
  border: 1px solid #dfe3e7;

  fieldset {
    margin-bottom: 0;
  }
}

.com-users-registration fieldset legend,
.com-users-registration fieldset .field-spacer,
.com-users-login .com-users-login__remind,
.com-users-profile #users-profile-custom,
.com-users-profile #users-profile-custom-actionlogs,
.com-users-profile__edit #jform_email1,
.com-users-profile__edit label[for="jform_email1"],
.com-users-profile__edit fieldset:nth-of-type(2),
.com-users-profile__edit fieldset:nth-of-type(3) {
  display: none;
}

.com-users-reset fieldset legend,
.com-users-reset-confirm fieldset legend,
.com-users-reset-complete fieldset legend {
  font-size: var(--body-font-size);
  font-style: italic;
  margin-bottom: 1rem;
}