/**
 * Theme bridge styles for Research Art + CMS integrations.
 */

/* Drop Research Art body side gutters so header/main go edge-to-edge.
   Horizontal rhythm stays via .container-xl inside sections. */
body {
  padding-left: 0;
  padding-right: 0;
}

#header,
#main {
  width: 100%;
}

/* Breadcrumb: dark bar at content width; no full-bleed grey wings. */
#center.center_o {
  background: #fff;
}

/* Back to top — shown after scrolling a long page. */
.theme-back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1040;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 0.35rem;
  background: #5e9cea;
  color: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(0.5rem);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease, background 0.15s ease;
}

.theme-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.theme-back-to-top:hover,
.theme-back-to-top:focus-visible {
  background: #4a8bd9;
  color: #fff;
  outline: none;
}

.theme-back-to-top i {
  font-size: 1.1rem;
  line-height: 1;
}

/* Content column separator (left col-md-9 beside sidebar). */
@media (min-width: 768px) {
  .blog_h1 > .col-md-9 {
    border-right: 1px solid #e4e4e4;
    padding-right: 1.5rem;
  }

  /* Archive lays out sidebar first — border on the content’s left edge. */
  .blog_h1 > .col-md-3 + .col-md-9 {
    border-right: 0;
    border-left: 1px solid #e4e4e4;
    padding-right: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
    padding-left: 1.5rem;
  }
}

.theme-skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: #333;
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 1000;
}

.theme-skip:focus {
  left: 1rem;
  top: 1rem;
}

/* Logo fills the navbar .container-xl row height. */
#header .navbar > .container-xl {
  align-items: stretch;
}

#header .navbar-brand {
  align-self: stretch;
  min-height: 0;
  display: flex;
  align-items: stretch;
  margin-top: 0;
  margin-bottom: 0;
  line-height: 0;
}

.theme-brand-logo {
  display: block;
  height: 100%;
  width: auto;
  max-height: 100%;
  object-fit: contain;
}

.theme-userbar a:hover {
  opacity: 0.85;
}

.theme-prose {
  line-height: 1.75;
  color: #444;
}

.theme-prose img {
  max-width: 100%;
  height: auto;
}

.theme-prose p {
  margin-bottom: 1rem;
}

.theme-prose h2,
.theme-prose h3,
.theme-prose h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.theme-widget-body p:last-child {
  margin-bottom: 0;
}

.home-widgets .home-widget__title {
  font-weight: 600;
}

.home-widgets .home-widget__body {
  line-height: 1.6;
}

.home-widgets .home-widget + .home-widget {
  margin-top: 1.5rem;
}

button.button.border-0 {
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.home-categories__title {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 700;
  color: #1a2332;
}

.home-cat-card {
  height: 100%;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.home-cat-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.home-cat-card__media {
  position: relative;
  aspect-ratio: 16 / 11;
  background: #e8eef5;
  overflow: hidden;
}

.home-cat-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-cat-card__media--empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-cat-card__placeholder {
  font-size: 2.5rem;
  color: #8aa0b8;
}

.home-cat-card__footer {
  background: #fff;
  padding: 0.9rem 1rem 1rem;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.home-cat-card__name {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: #111827;
}

.home-cat-card__link:hover .home-cat-card__name {
  color: #1d4f91;
}

.theme-tag-cloud a:hover {
  color: #5e9cea;
}

.theme-comment-avatar {
  width: 64px;
  height: 64px;
  font-size: 24px;
}

.theme-comment-flash {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-size: 14px;
}

.theme-comment-flash.is-success {
  background: #e8f5e9;
  color: #2e7d32;
}

.theme-comment-flash.is-error {
  background: #ffebee;
  color: #c62828;
}

.theme-comment-reply {
  width: 35px;
  height: 35px;
  line-height: 35px;
  background: transparent;
  color: #333;
  cursor: pointer;
}

.theme-comment-reply:hover {
  background: #5e9cea !important;
  color: #fff !important;
  border-color: #5e9cea !important;
}

.center_h1l2 {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog_h1r1 .input-group {
  margin-top: 0 !important;
}

.blog_pgl .blog_h1r1 .input-group {
  margin-top: 0 !important;
}

body.has-userbar #navbar_sticky.sticky {
  top: 0;
}

/* Homepage hero slider — full-width under menu */
.home-hero {
  margin: 0 0 0;
  background: #1a1a1a;
}

.home-hero-inner {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.home-hero--w-viewport {
  width: calc(100% + 80px);
  max-width: none;
  margin-left: -40px;
  margin-right: -40px;
}

.home-hero--w-boxed .home-hero-inner {
  max-width: 1320px;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.home-hero--w-custom .home-hero-inner {
  width: var(--home-hero-width, 100%);
  max-width: 100%;
}

.home-hero-carousel,
.home-hero-carousel .carousel-inner,
.home-hero-carousel .carousel-item {
  height: 100%;
}

.home-hero-slide {
  position: relative;
  aspect-ratio: 2 / 1;
  min-height: 320px;
  max-height: min(800px, 78vh);
  overflow: hidden;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-hero--h-fixed .home-hero-slide {
  aspect-ratio: auto;
  height: var(--home-hero-height, 450px);
  min-height: 0;
  max-height: none;
}

.home-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.home-hero-slide.is-video .home-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center center;
  z-index: 1;
}

.home-hero-video {
  pointer-events: none;
  background: transparent;
}

.home-hero-shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    115deg,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.05) 45%,
    rgba(0, 0, 0, 0.55) 100%
  );
  pointer-events: none;
}

.home-hero-caption {
  position: absolute;
  right: clamp(1.25rem, 5vw, 4rem);
  bottom: clamp(1.25rem, 4vw, 3.25rem);
  left: auto;
  z-index: 3;
  max-width: min(34rem, 52%);
  text-align: left;
}

.home-hero-title {
  margin: 0 0 0.65rem;
  color: #d35400;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.5rem, 2.6vw, 2.35rem);
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.15);
}

.home-hero-text {
  margin: 0 0 1.1rem;
  color: #fff;
  font-size: clamp(0.92rem, 1.15vw, 1.05rem);
  line-height: 1.55;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.home-hero-cta {
  display: inline-block;
  background: #111;
  color: #fff !important;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.7rem 1.35rem;
  border: 0;
  border-radius: 0;
  transition: background 0.25s ease, color 0.25s ease;
}

.home-hero-cta:hover,
.home-hero-cta:focus {
  background: #5e9cea;
  color: #fff !important;
}

.home-hero-control {
  width: auto;
  opacity: 1;
}

.home-hero-control-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 1.35rem;
  transition: background 0.25s ease;
}

.home-hero-control:hover .home-hero-control-icon,
.home-hero-control:focus .home-hero-control-icon {
  background: rgba(0, 0, 0, 0.6);
}

.home-hero-carousel .carousel-control-prev {
  left: 0.75rem;
  justify-content: flex-start;
}

.home-hero-carousel .carousel-control-next {
  right: 0.75rem;
  justify-content: flex-end;
}

.home-hero-carousel .carousel-control-prev-icon,
.home-hero-carousel .carousel-control-next-icon {
  display: none;
}

@media screen and (max-width: 767px) {
  .home-hero--w-viewport {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .home-hero-slide {
    aspect-ratio: 4 / 3;
    min-height: 280px;
    max-height: none;
  }

  .home-hero--h-fixed .home-hero-slide {
    aspect-ratio: auto;
    height: var(--home-hero-height, 450px);
    min-height: 220px;
  }

  .home-hero-caption {
    left: 1rem;
    right: 1rem;
    bottom: 1.25rem;
    max-width: none;
  }

  .home-hero-title {
    font-size: 1.35rem;
  }

  .home-hero-control-icon {
    width: 36px;
    height: 36px;
    font-size: 1.15rem;
  }
}

/* ——— Editorial Board template ——— */
.editorial-board-title {
  color: #1e3a5f;
  font-weight: 700;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0;
}

.editorial-board-intro {
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
}

.editorial-card {
  width: 270px;
  max-width: 100%;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(30, 58, 95, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin-left: auto;
  margin-right: auto;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.editorial-card:hover {
  box-shadow: 0 8px 24px rgba(30, 58, 95, 0.12);
  transform: translateY(-2px);
}

.editorial-card-photo {
  width: 270px;
  height: 200px;
  max-width: 100%;
  background: #e8eef5;
  overflow: hidden;
  flex: 0 0 200px;
}

.editorial-card-photo img {
  width: 270px;
  height: 200px;
  max-width: 100%;
  object-fit: cover;
  display: block;
}

.editorial-card-body {
  width: 270px;
  max-width: 100%;
  padding: 1rem 1.15rem 1.25rem;
  text-align: left;
}

.editorial-card-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 0.35rem;
  line-height: 1.3;
}

.editorial-card-role {
  font-size: 0.9rem;
  color: #6b7280;
  line-height: 1.4;
}

.editorial-board-featured .editorial-card-name {
  font-size: 1.15rem;
}

@media (max-width: 767.98px) {
  .editorial-board-title {
    font-size: 1.2rem;
  }
}

/* ——— Articles list template (blog.html) ——— */
.articles-list .articles-list-filter .form-select {
  width: 100%;
  max-width: none;
}

.articles-list .blog_h1l4i img {
  object-fit: cover;
}

/* ——— Article detail (detail.html) ——— */
.article-detail .article-detail-actions {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.article-detail .article-header {
  margin: 0 0 1.5rem;
  padding-bottom: 1.15rem;
  border-bottom: 2px solid #5e9cea;
}

.article-detail .article-header-title {
  margin: 0 0 1.15rem;
  color: #5e9cea;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.3;
}

.article-detail .article-header-authors {
  margin: 0 0 0.4rem;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.5;
}

.article-detail .article-header-affiliations {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.45;
}

.article-detail .article-header-affiliations p {
  margin: 0;
}

.article-detail .article-header-corresponding {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
}

.article-detail .article-header-corresponding-label {
  font-style: italic;
}

.article-detail .article-header-corresponding a {
  color: #5e9cea;
  text-decoration: underline;
}

.article-detail .article-header-meta {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.article-detail .article-header + .grid {
  margin-bottom: 1.25rem;
}

.article-tools .article-tools-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.article-tools .article-tools-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.article-tools .article-tools-row:last-child:has(> :only-child) {
  grid-template-columns: 1fr;
}

.article-tools .article-tools-actions .button_1 {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 3.25rem;
  padding: 0.65rem 0.5rem !important;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  box-sizing: border-box;
}

.article-tools .article-tools-actions .button_1 i {
  font-size: 1rem;
  line-height: 1;
}

.article-tools .article-tools-actions .button_1.disabled,
.article-tools .article-tools-actions span.button_1 {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

#article-full-text {
  scroll-margin-top: 6rem;
}

.article-detail .article-settings {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.article-detail .article-settings p {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.55;
  color: #555;
}

.article-detail .article-settings p:last-child {
  margin-bottom: 0;
}

.article-detail .article-keywords-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.article-detail .article-keywords-list li {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  background: #f6f7f9;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #444;
}

.article-pdf-modal {
  height: min(90vh, 920px);
  display: flex;
  flex-direction: column;
}

.article-pdf-modal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  background: #525659;
}

.article-pdf-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 70vh;
  border: 0;
  background: #525659;
}

@media print {
  .article-detail .article-detail-actions,
  .article-detail .col-md-3,
  #articlePdfModal,
  #top,
  #header,
  #footer,
  .theme-back-to-top {
    display: none !important;
  }

  .article-detail .col-md-9 {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Registration: show/hide password */
.login_1ril .auth-password {
  position: relative;
}
.login_1ril .auth-password .form-control {
  padding-right: 3.25rem;
}
.login_1ril .auth-pw-toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: #777;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.login_1ril .auth-pw-toggle:hover,
.login_1ril .auth-pw-toggle.is-visible {
  color: #5e9cea;
}

/* Parent menu items with submenus: the title stays a real link; caret opens the list. */
#header .navbar-nav > .nav-item.has-clickable-parent {
  display: flex;
  align-items: stretch;
  position: relative;
}

#header .has-clickable-parent > .nav-link:not(.dropdown-toggle-split) {
  padding-right: 0.35rem;
}

#header .has-clickable-parent > .dropdown-toggle-split {
  padding-left: 0.35rem;
  padding-right: 0.9rem;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  align-self: stretch;
}

#header .has-clickable-parent > .dropdown-toggle-split:active,
#header .has-clickable-parent > .dropdown-toggle-split:focus {
  pointer-events: auto;
  background: none;
  color: #5e9cea;
}

#header .has-clickable-parent > .dropdown-toggle-split::after {
  margin-left: 0;
  vertical-align: 0.15em;
}

@media (min-width: 768px) {
  #header .navbar-nav > .nav-item.dropdown {
    position: relative;
  }

  #header .navbar-nav > .nav-item.dropdown > .dropdown-menu {
    top: 100%;
    left: 0;
    right: auto;
    transform: none;
  }
}
