/**
 * About Page Styles
 * CSS for the About journal page with Elsevier-style design
 */

/* Simple Breadcrumb Styles */
.cmp_breadcrumbs {
  background: #f8f9fa;
  padding: 1rem 0;
  border-bottom: 1px solid #e9ecef;
}

.cmp_breadcrumbs ol {
  list-style: none;
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.cmp_breadcrumbs li {
  display: flex;
  align-items: center;
}

.cmp_breadcrumbs li a {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
}

.cmp_breadcrumbs li a:hover {
  color: #0056b3;
  text-decoration: underline;
}

.cmp_breadcrumbs .separator {
  color: #6c757d;
  margin: 0 0.5rem;
}

.cmp_breadcrumbs .current span {
  color: #495057;
  font-weight: 600;
}

/* Hide screen reader text in edit link to prevent duplication */
.cmp_edit_link .pkp_screen_reader {
  display: none;
}

/* Style edit link */
.cmp_edit_link {
  display: inline-block;
  color: #6c757d;
  text-decoration: none;
  font-size: 0.8rem;
  margin-left: 1rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.cmp_edit_link:hover {
  color: #007bff;
  border-color: #007bff;
  text-decoration: none;
}

/* About Page Main Styles */
.page_about {
  background-color: #ffffff;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;

  .about-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;

    .about-page-content {
      background: #fff;

      .about-header {
        border-bottom: 1px solid #e0e0e0;
        padding-bottom: 20px;
        margin-bottom: 40px;
        display: flex;
        justify-content: space-between;
        align-items: center;

        .about-page-title {
          font-size: 2.2em;
          font-weight: 400;
          color: #333333;
          margin: 0;
          font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
        }
      }

      .about-main-content {
        .aims-scope-section {
          &.two-column-layout {
            display: flex;
            gap: 40px;
            align-items: flex-start;
          }

          .section-title-column {
            flex: 0 0 200px;

            .section-title {
              font-size: 1.5em;
              font-weight: 600;
              color: #333333;
              margin-bottom: 0;
              margin-top: 0;
              font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
              position: sticky;
              top: 20px;
            }
          }

          .section-content-column {
            flex: 1;

            .section-content {
              line-height: 1.7;
              color: #444444;
              font-size: 15px;

              p {
                margin-bottom: 16px;
                text-align: justify;

                &:last-child {
                  margin-bottom: 0;
                }
              }

              em {
                font-style: italic;
                color: #333333;
              }

              strong {
                font-weight: 600;
                color: #333333;
              }

              h3 {
                font-size: 1.2em;
                font-weight: 600;
                color: #333333;
                margin-top: 24px;
                margin-bottom: 12px;
                font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
              }

              .link,
              a.link {
                color: #1e88e5;
                text-decoration: none;

                &:hover {
                  color: #0d47a1;
                  text-decoration: underline;
                }
              }
            }
          }
        }

        .about-section {
          margin-top: 30px;
          padding-top: 20px;
          border-top: 1px solid #f0f0f0;

          .section-title {
            font-size: 1.3em;
            font-weight: 600;
            color: #333333;
            margin-bottom: 15px;
            margin-top: 0;
            font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
          }

          .section-content {
            line-height: 1.6;
            color: #555555;
            font-size: 14px;

            p {
              margin-bottom: 12px;

              &:last-child {
                margin-bottom: 0;
              }
            }

            strong {
              font-weight: 600;
              color: #333333;
            }

            a {
              color: #1e88e5;
              text-decoration: none;

              &:hover {
                color: #0d47a1;
                text-decoration: underline;
              }
            }
          }
        }

        .publishing-info {
          .publishing-mode-info {
            background: #f8f9fa;
            padding: 20px;
            border-radius: 6px;
            border-left: 4px solid #007bff;

            .mode-title {
              font-size: 1.1em;
              font-weight: 600;
              color: #333333;
              margin-bottom: 10px;
              margin-top: 0;
            }

            .mode-description {
              color: #555555;
              margin-bottom: 0;
            }

            .delayed-access-info {
              margin-top: 15px;
              padding-top: 15px;
              border-top: 1px solid #e9ecef;

              .delayed-title {
                font-size: 1em;
                font-weight: 600;
                color: #333333;
                margin-bottom: 8px;
                margin-top: 0;
              }

              .delayed-description {
                color: #555555;
                margin-bottom: 0;
              }
            }
          }

          .publishing-mode-info.open-access {
            border-left-color: #28a745;
          }

          .publishing-mode-info.subscription {
            border-left-color: #ffc107;
          }
        }

        .contact-info {
          .contact-name,
          .contact-email {
            margin-bottom: 8px;
            font-size: 14px;

            strong {
              font-weight: 600;
              color: #333333;
            }
          }
        }
      }
    }
  }
}

/* Responsive Design */
@media (max-width: 992px) {
  .page_about .about-page-container {
    padding: 15px;

    .about-page-content {
      .about-header {
        margin-bottom: 30px;

        .about-page-title {
          font-size: 1.9em;
        }
      }

      .about-main-content {
        .aims-scope-section {
          &.two-column-layout {
            flex-direction: column;
            gap: 20px;
          }

          .section-title-column .section-title {
            font-size: 1.4em;
            position: static;
          }
        }

        .about-section .section-title {
          font-size: 1.2em;
        }
      }
    }
  }
}

@media (max-width: 768px) {
  .page_about .about-page-container {
    padding: 10px;

    .about-page-content {
      .about-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 25px;

        .about-page-title {
          font-size: 1.7em;
          word-wrap: break-word;
          overflow-wrap: break-word;
          hyphens: auto;
          max-width: 100%;
        }
      }

      .about-main-content {
        .aims-scope-section {
          &.two-column-layout {
            flex-direction: column;
            gap: 15px;
          }

          .section-title-column .section-title {
            font-size: 1.3em;
            word-wrap: break-word;
            overflow-wrap: break-word;
            hyphens: auto;
            position: static;
          }

          .section-content {
            font-size: 14px;

            p {
              word-wrap: break-word;
              overflow-wrap: break-word;
              hyphens: auto;
            }
          }
        }

        .about-section {
          margin-top: 25px;

          .section-title {
            font-size: 1.1em;
            word-wrap: break-word;
            overflow-wrap: break-word;
            hyphens: auto;
          }

          .section-content {
            font-size: 13px;
          }
        }

        .publishing-info .publishing-mode-info {
          padding: 15px;

          .mode-title {
            font-size: 1em;
            word-wrap: break-word;
            overflow-wrap: break-word;
            hyphens: auto;
          }
        }
      }
    }
  }
}

@media (max-width: 576px) {
  .page_about .about-page-container {
    padding: 8px;
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    overflow-x: hidden;

    .about-page-content {
      width: 100%;
      max-width: 100%;
      overflow-x: hidden;

      .about-header {
        padding-bottom: 15px;
        margin-bottom: 20px;

        .about-page-title {
          font-size: 1.5em;
          line-height: 1.3;
          word-wrap: break-word;
          overflow-wrap: break-word;
          hyphens: auto;
          width: 100%;
          max-width: 100%;
        }
      }

      .about-main-content {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;

        .aims-scope-section {
          &.two-column-layout {
            flex-direction: column;
            gap: 10px;
          }

          .section-title-column .section-title {
            font-size: 1.2em;
            line-height: 1.3;
            margin-bottom: 15px;
            word-wrap: break-word;
            overflow-wrap: break-word;
            hyphens: auto;
            width: 100%;
            max-width: 100%;
            position: static;
          }

          .section-content {
            font-size: 13px;
            line-height: 1.6;
            width: 100%;
            max-width: 100%;
            overflow-x: hidden;

            p {
              margin-bottom: 14px;
              word-wrap: break-word;
              overflow-wrap: break-word;
              hyphens: auto;
              width: 100%;
              max-width: 100%;
            }

            h3 {
              font-size: 1.1em;
              line-height: 1.3;
              margin-top: 20px;
              margin-bottom: 10px;
              word-wrap: break-word;
              overflow-wrap: break-word;
              hyphens: auto;
              width: 100%;
              max-width: 100%;
            }
          }
        }

        .about-section {
          margin-top: 20px;
          width: 100%;
          max-width: 100%;
          overflow-x: hidden;

          .section-title {
            font-size: 1.1em;
            line-height: 1.3;
            margin-bottom: 12px;
            word-wrap: break-word;
            overflow-wrap: break-word;
            hyphens: auto;
            width: 100%;
            max-width: 100%;
          }

          .section-content {
            font-size: 12px;
            line-height: 1.5;
            width: 100%;
            max-width: 100%;
            overflow-x: hidden;

            p {
              word-wrap: break-word;
              overflow-wrap: break-word;
              hyphens: auto;
              width: 100%;
              max-width: 100%;
            }
          }
        }

        .publishing-info {
          width: 100%;
          max-width: 100%;
          overflow-x: hidden;

          .publishing-mode-info {
            padding: 12px;
            width: 100%;
            max-width: 100%;
            overflow-x: hidden;

            .mode-title {
              font-size: 0.95em;
              line-height: 1.3;
              word-wrap: break-word;
              overflow-wrap: break-word;
              hyphens: auto;
              width: 100%;
              max-width: 100%;
            }

            .mode-description {
              font-size: 12px;
              word-wrap: break-word;
              overflow-wrap: break-word;
              hyphens: auto;
              width: 100%;
              max-width: 100%;
            }

            .delayed-access-info {
              width: 100%;
              max-width: 100%;
              overflow-x: hidden;

              .delayed-title {
                font-size: 0.9em;
                word-wrap: break-word;
                overflow-wrap: break-word;
                hyphens: auto;
                width: 100%;
                max-width: 100%;
              }

              .delayed-description {
                font-size: 12px;
                word-wrap: break-word;
                overflow-wrap: break-word;
                hyphens: auto;
                width: 100%;
                max-width: 100%;
              }
            }
          }
        }

        .contact-info {
          width: 100%;
          max-width: 100%;
          overflow-x: hidden;

          .contact-name,
          .contact-email {
            font-size: 12px;
            word-wrap: break-word;
            overflow-wrap: break-word;
            hyphens: auto;
            width: 100%;
            max-width: 100%;
          }
        }
      }
    }
  }
}

/* Responsive breadcrumb */
@media (max-width: 992px) {
  .cmp_breadcrumbs ol {
    padding: 0 15px;
  }
}

@media (max-width: 768px) {
  .cmp_breadcrumbs {
    padding: 0.75rem 0;
  }

  .cmp_breadcrumbs ol {
    padding: 0 10px;
    font-size: 0.8rem;
    flex-wrap: wrap;
  }

  .cmp_breadcrumbs li {
    font-size: 0.8rem;
  }

  .cmp_breadcrumbs .separator {
    margin: 0 0.3rem;
  }

  .cmp_edit_link {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    margin-left: 0.5rem;
  }
}

@media (max-width: 576px) {
  .cmp_breadcrumbs ol {
    padding: 0 0.5rem;
    font-size: 0.75rem;
  }

  .cmp_breadcrumbs .separator {
    margin: 0 0.25rem;
  }

  .cmp_edit_link {
    font-size: 0.65rem;
    padding: 0.15rem 0.3rem;
    margin-left: 0.3rem;
  }
}

/* Additional styles for Article page */
.page_article {
  /* Control image sizes in articles */
  img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  /* Specific styling for article content images */
  .main_entry {
    img {
      max-width: 100%;
      max-height: 400px;
      object-fit: contain;
      margin: 1.5rem auto;
      border: 1px solid #e9ecef;
    }

    /* For very large images, limit them further */
    .value img {
      max-height: 300px;
      width: auto;
    }

    /* Style figures and captions */
    figure {
      margin: 1.5rem 0;
      text-align: center;

      img {
        max-height: 350px;
        margin: 0 auto 0.5rem auto;
      }

      figcaption {
        font-size: 0.9em;
        color: #666;
        font-style: italic;
        margin-top: 0.5rem;
        line-height: 1.4;
      }
    }

    /* Style tables with images */
    table img {
      max-height: 200px;
      max-width: 200px;
      margin: 0.5rem;
    }
  }

  /* Cover images and article thumbnails */
  .cover img,
  .article-cover img {
    max-height: 300px;
    max-width: 200px;
    object-fit: cover;
    border-radius: 6px;
  }

  /* Style the original article details */
  .obj_article_details {
    .page_title {
      font-size: 1.8em;
      font-weight: 600;
      color: #333333;
      line-height: 1.3;
      margin-bottom: 1.5rem;
      font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    }

    .subtitle {
      font-size: 1.3em;
      font-weight: 400;
      color: #666666;
      line-height: 1.4;
      margin-bottom: 1rem;
      font-style: italic;
    }

    .row {
      display: flex;
      gap: 2rem;
      margin-top: 2rem;

      .main_entry {
        flex: 2;

        .item {
          margin-bottom: 2rem;
          padding-bottom: 1.5rem;
          border-bottom: 1px solid #f0f0f0;

          &:last-child {
            border-bottom: none;
          }

          h2,
          h3 {
            font-size: 1.2em;
            font-weight: 600;
            color: #333333;
            margin-bottom: 1rem;
            font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
          }

          .label {
            font-weight: 600;
            color: #333333;
            margin-bottom: 0.5rem;
          }

          .value {
            line-height: 1.6;
            color: #555555;

            p {
              margin-bottom: 1rem;
              text-align: justify;

              &:last-child {
                margin-bottom: 0;
              }
            }
          }
        }

        /* Authors section */
        .authors {
          list-style: none;
          padding: 0;
          margin: 0;

          li {
            margin-bottom: 1rem;
            padding: 1rem;
            background: #f8f9fa;
            border-radius: 6px;
            border-left: 4px solid #007bff;

            .name {
              font-weight: 600;
              color: #1e88e5;
              display: block;
              margin-bottom: 0.3rem;
            }

            .affiliation {
              color: #666666;
              font-size: 0.9em;
              font-style: italic;
              display: block;

              span {
                display: block;
                margin-bottom: 0.2rem;
              }
            }

            .orcid {
              margin-top: 0.5rem;

              a {
                color: #1e88e5;
                text-decoration: none;
                font-size: 0.85em;

                &:hover {
                  text-decoration: underline;
                }
              }
            }
          }
        }

        /* Galleys/Downloads */
        .galleys {
          display: flex;
          gap: 1rem;
          flex-wrap: wrap;

          .obj_galley_link {
            display: inline-block;
            background: #007bff;
            color: white;
            padding: 0.75rem 1.5rem;
            text-decoration: none;
            border-radius: 4px;
            font-size: 0.9em;
            font-weight: 500;
            transition: all 0.3s ease;

            &:hover {
              background: #0056b3;
              color: white;
              text-decoration: none;
              transform: translateY(-1px);
            }
          }
        }
      }

      .entry_details {
        flex: 1;
        background: #f8f9fa;
        padding: 1.5rem;
        border-radius: 6px;
        height: fit-content;

        .item {
          margin-bottom: 1.5rem;

          &:last-child {
            margin-bottom: 0;
          }

          .label {
            font-size: 0.9em;
            font-weight: 600;
            color: #333333;
            margin-bottom: 0.5rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
          }

          .value {
            font-size: 0.9em;
            color: #555555;
            line-height: 1.5;

            a {
              color: #1e88e5;
              text-decoration: none;

              &:hover {
                text-decoration: underline;
              }
            }
          }

          .sub_item {
            margin-bottom: 1rem;

            &:last-child {
              margin-bottom: 0;
            }
          }
        }
      }
    }
  }
}

/* Responsive styles for article page */
@media (max-width: 992px) {
  .page_article {
    .obj_article_details {
      .row {
        flex-direction: column;
        gap: 1.5rem;

        .main_entry {
          flex: none;
        }

        .entry_details {
          flex: none;
          order: -1;
        }
      }
    }
  }
}

@media (max-width: 768px) {
  .page_article {
    /* Mobile image styling */
    img {
      margin: 1rem 0;
      border-radius: 2px;
    }

    .main_entry {
      img {
        max-height: 250px;
        margin: 1rem 0;
      }

      .value img {
        max-height: 200px;
      }
    }

    .obj_article_details {
      .page_title {
        font-size: 1.5em;
        line-height: 1.2;
      }

      .row {
        gap: 1rem;

        .main_entry {
          .item {
            margin-bottom: 1.5rem;
            padding-bottom: 1rem;
          }

          .authors li {
            padding: 0.75rem;
          }

          .galleys {
            gap: 0.5rem;

            .obj_galley_link {
              padding: 0.6rem 1rem;
              font-size: 0.85em;
            }
          }
        }

        .entry_details {
          padding: 1rem;
        }
      }
    }
  }
}

@media (max-width: 576px) {
  .page_article {
    /* Extra small mobile image styling */
    img {
      margin: 0.75rem 0;
    }

    .main_entry {
      img {
        max-height: 200px;
        margin: 0.75rem 0;
      }

      .value img {
        max-height: 150px;
      }
    }

    .obj_article_details {
      .page_title {
        font-size: 1.3em;
      }

      .row {
        .main_entry {
          .galleys {
            flex-direction: column;

            .obj_galley_link {
              text-align: center;
              padding: 0.75rem;
            }
          }
        }
      }
    }
  }
}
