// ------------------------------------
// Joomla! specific styles
// ------------------------------------

// Extend style in base
// --------------------
@import "../../../plugins/system/t4/themes/base/scss/_joomla";

//
// Generic Styles
// -------------------------

// Article Titles
// -------------------------
h2.item-title,
.item-title h2 {
  font-size: var(--h2-font-size);

  a {
    color: var(--h2-font-size);

    &:hover, &:active, &:focus {
      border-bottom: 1px solid var(--body-text-color);
      color: var(--h2-font-size);
    }
  }
}

.item-head {
  display: flex;

  .edit-link a {
    white-space: nowrap;
  }
}

.article-title h1 {
  // Mobile view
  @include media-breakpoint-down(sm) {
    font-size: var(--h3-font-size);
  }
}

// Page Header
.page-header,
.categories-list {
  h1 {
    font-size: $font-size-base;
    font-weight: $font-weight-bold;
  }

  h2 {
    font-size: var(--h3-font-size);
    margin: 0;

    a {
      color: var(--heading-color);

      &:hover, &:focus, &:active {
        border-bottom: 1px solid var(--heading-color);
        color: var(--heading-color);
      }
    }
  }
}


// Article Aside
// -------------------------
.article-info {
  color: var(--meta-color)!important;
  font-size: 10px;
  text-transform: uppercase;

  a {
    color: var(--meta-link-color);

    // Link states
    &:hover, &:focus, &:active {
    }
  }

  // Hidden Icon
  .fa {
    display: none;
  }
  
  .article-info-term {
  }
  
  dd {
    &:after {
      content: ".";
      margin: 0 4px;
      line-height: 1;
      font-weight: 700;
      position: relative;
      top: -2px;
    }

    > div {
    }
  }
}

// Author
.createdby {
  [itemprop="name"] {
    font-weight: 400;
  }
}

// Category Name
.category-name {
  [itemprop="genre"] {
    font-weight: 400;
  }
}

// URL
.article-url {
}

// Publish Date
.published {
  time {
  }
}

// Modified Date
.modifydate {
}

// Hits
.hits {
}

// Article Desciption
.contentdescription {
}

.contentdescription p {
}

// Content rating
.content_rating {
}

.content_vote {
}


// Article Tools
// -------------------------
.icons {
  .btn {
    .caret {
    }
  }

  .icon-cog {
  }

  .dropdown-menu {
    a {
      border-bottom: 1px solid $border-color;
      color: $gray-700;

      &:hover, &:focus, &:active {
        background-color: $gray-100;
        color: var(--link-hover-color);
      }
    }
  }
}


// Tags
// -------------------------
ul.tags {
  margin-top: calc(var(--global-spacing) * 2);

  > li {
    float: none;
    margin-right: 0;

    > a {
      background: transparent;
      border: 1px solid var(--border-color);
      color: var(--gray-900);
      font-size: 10px;
      margin-bottom: $spacer / 4;
      margin-right: $spacer / 4;
      padding: 8px 12px;
      text-transform: uppercase;

      &:hover,&:focus,&:active {
        background: var(--border-color);
        color: var(--gray-900);
      }
    }
  }

  .list-inline-item:not(:last-child) {
    margin-right: 0;
  }

  &:after {
    display: none;
  }
}

.com-tags-tag.tag-category {
  .filters {
  }
  
  .category {
    .item-tag-title {
      font-size: var(--h5-font-size);
    }
  }

  .com-tags-tag__filters {
    flex-wrap: wrap;
  }

  .list-group {
    .list-group-item {
      background: transparent;
      border-bottom: 1px solid var(--border-color);

      &:last-of-type {
        border: none;
      }
    }
  }
}

.com-tags-tag-list.tag-category {
  #adminForm {
    .btn-group:first-of-type {
      @include media-breakpoint-down(sm) {
        margin-bottom: $spacer;
      }
    }
  }

  .float-end {
    @include media-breakpoint-up(sm) {
      float: right;
    }
  }

  table.category {
    margin-top: $spacer-lg;
  }

  tbody {
    th {
      border: 0;
      display: block;
      padding: $spacer;
      width: 100%;
    }
  }
}

.com-tags {
  .com-tags__items {
    .com-tags__filters {
      // Portrait phones
      @include media-breakpoint-down(xs){
        flex-wrap: wrap;
      }  
    }
  }
}

.com-tags-tag__pagination,
.com-content-category-blog__navigation,
.com-tags-tag-list__pagination {
  align-items: center;
  display: flex;
  flex-direction: column-reverse;
  flex-wrap: wrap;
  justify-content: center;
  padding-top: $grid-gutter-width;
  gap: .5rem;
  
  @include media-breakpoint-up(sm) {
    flex-direction: row-reverse;
    justify-content: space-between;
  }
}

// Privacy
// ------------------------
.request-confirm {
  max-width: 650px;
  margin: 0 auto;

  legend {
    font-size: var(--h5-font-size);
    margin-bottom: $spacer-lg;
  }

  input.form-control {
    max-width: 100%;
  }
}


// Article Images
// -------------------------
.item-image {
  img {
  }
}

// Float Left Image
.pull-left.item-image,
.item-image.pull-left {
}

// Float right Image
.pull-right.item-image,
.item-image.pull-right {
}

// Image caption
.img_caption img {
}

div.img_caption {

  p.img_caption {
  }
}

figure {
  &.pull-left {
  }

  &.pull-right {
  }

  figcaption {
    background: transparent;
    color: var(--gray-500);
    font-size: 13px;
    text-shadow: none;
    text-transform: none;
    text-align: left;
    letter-spacing: 0;
    margin-top: $grid-gutter-width / 4;
    padding: 0;
  }
}

// Article Index
// -----------
.article-index {
  h3 {
  }

  ul {
  }
}

.com-content-article__body {
  .pagenavcounter {
  }

  .pager {
    ul {

      li {
      }
    }
  }

  // Slider style
  .pane-sliders {
    .panel {
      border: 1px solid $border-color;

      h3.title {
        background-color: $gray-100;
        font-size: $font-size-base;

        &.pane-toggler-down {
          border-bottom: 1px solid $border-color;
        }

        a {
          &:hover, &:focus, &:active {
          }
        }
      }

      .content {
      }
    }
  }

  // Tabs style
  dl.tabs {
    border-bottom: 1px solid $border-color;

    dt {
      border: 1px solid $border-color;
      border-radius: 3px 3px 0 0;

      &.open {
        border-bottom: 1px solid $white;
      }

      h3 {

        a {
          color: var(--body-text-color);

          &:hover, &:focus, &:active {
            color: var(--link-hover-color);
          }
        }
      }
    }
  }
}

// Read more
// -----------
.readmore {
  margin-top: $grid-gutter-width/2;

  .btn {
    background: transparent;
    padding: 0;
    text-align: left;
    color: var(--heading-color);
    
    // Link States
    &:hover, 
    &:active, 
    &:focus {
      color: var(--body-link-hover-color);
    }

    // The Arrow
    .icon-chevron-right {
    }
  }
}

// Items More
// -----------
.items-more {

  h3 {
    margin: 0 0 $grid-gutter-width/2;
  }

  .nav-tabs {
    border: 0;

    > li {
      + li {
        margin-top: $grid-gutter-width / 4;
      }
    }

    > li > a {
      background: transparent;
      color: var(--body-text-color);
      padding: 0;

      // Link States
      &:hover, &:active, &:focus {
        color: var(--body-link-hover-color);
      }
    }
  }
}

// Cat Child
// ------------
.cat-children {
  margin-top: $grid-gutter-width;

  .item-title {
    font-size: var(--h5-font-size);
    margin-top: 0;
  }
}


//
// List Layouts
// -------------------------

// Leading Items
// -------------
.items-leading {
  @include clearfix();

  // Single Item
  .col {
    .item-image {
    }

    p {}
  }

  .blog-item {
    .blog-item-content {
      align-items: center;
      display: flex;
      flex-wrap: wrap;

      .card-media {
        width: 50%;

        // Tablets
        @include media-breakpoint-up(lg) {
          padding-right: $grid-gutter-width/2;
        } 

        // Tablets
        @include media-breakpoint-down(md) {
          width: 100%;
        }  

        .intro-image {
          margin-bottom: 0;

          img {
            width: 100%;
          }
        }
        
      }

      .item-content {
        flex: 1;
        padding-left: $grid-gutter-width/2;

        // Tablets
        @include media-breakpoint-down(md) {
          padding-left: 0;
          margin-top: $grid-gutter-width/2;
        }

        .category {
          margin-bottom: $grid-gutter-width/4;
          margin-top: 0;

          a {
            border: none;
            color: var(--color-primary);
            font-size: 10px;
            padding: 0;

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


// Intro Items
// -------------
.items-row {

  .col {
    // Portrait phones
    @include media-breakpoint-down(xs){
      flex-basis: auto;
    }  
  }

  // Single Item
  .item {
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: $grid-gutter-width;
    
    // Styles on Desktop
    @include media-breakpoint-up(md) {
    }

    .item-image {
    }
  }

  // Image
  .card-media {
    margin-bottom: 0;

    img {
      width: 100%;
    }
  }

  .item-content {
    position: relative;
    z-index: 100;

    // Category
    .category {
      margin-top: -$grid-gutter-width;
      margin-bottom: $grid-gutter-width/2;

      a {
        background: var(--light-reverse);
        border: 2px solid var(--border-dark-color);
        color: var(--heading-color);
        font-size: 10px;
        font-weight: 400;
        line-height: $grid-gutter-width/2;
        padding: $grid-gutter-width/4 $grid-gutter-width/2;
        text-transform: uppercase;

        &:hover {
          background: var(--gray-200);
        }
      }
    }

    p {
      margin-bottom: 0;
      color: var(--gray-700);
      line-height: 24px;
    }

    .item-head {
      display: flex;
      justify-content: space-between;

      .icons {
        width: 80px;

        button.dropdown-toggle {
          padding: 0;

          &:hover, &:active, &:focus {
            color: var(--gray-700);
          }
        }
      }
    }

    // Title
    .item-title, h2 {
      flex: 1;
      font-size: var(--h4-font-size);
      line-height: 28px;

      // Tablets
      @include media-breakpoint-down(md) {
        font-size: var(--h5-font-size);
      }
    }

    // Intro text
    .intro-txt {
      margin: $grid-gutter-width/2 0 0;
    }

    // info
    .article-info {
      margin: ($grid-gutter-width/2) 0 0;

      .createdby {
        >span {
          color: var(--heading-color);
        }
      }
    }
  }

  // More Cols
  &.cols-3,
  &.cols-4,
  &.cols-5 {
    .intro-image {
      padding-bottom: 75%;
      position: relative;
      height: 0;
      width: 100%;

      img {
        object-fit: cover;
        object-position: center;
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: 100%;
      }
    }
  }
}

// Blog Layout
// -----------
.blog,
.blog-featured {
  .items-leading {
    .blog-item {
    }
  }

  .blog-items {
    .blog-item {
      margin-bottom: $grid-gutter-width;
    }
  }

  // The Article
  .blog-item {}
  .blog-item-content {}

  .isotope-item {
    .item {
      margin-bottom: $spacer-xl;
      overflow: hidden;
    }
  }
}

// Reset the duplicate container inside t4-body-main
.blog-featured {
  table.category {
    overflow-x: auto;
  }

  .intro-image {
    padding-bottom: 100%;
    position: relative;
    height: 0;
    width: 100%;

    img {
      object-fit: cover;
      object-position: center;
      position: absolute;
      top: 0;
      left: 0;
      height: 100%;
      width: 100%;
    }
  }
}


// Magz Layout
.category-blog-info {
  .page-subheader {
    margin-bottom: $grid-gutter-width;

    h2 {
      margin: 0;
    }
  }

  .row > div {
    padding-bottom: calc(var(--global-spacing) * 4);
  }

  .item {
    height: 100%;

    .jacl-item {
      height: 100%;

      .jacl-item__inner {
        height: 100%;
      }
    }

    .jacl-item__introtext p {
      margin-bottom: 0;
    }
  }
}

.magz-layout {
  .content-items > .row {
    > div {
      margin-bottom: $grid-gutter-width;

      .item {
        height: 100%;

        .jacl-item {
          height: 100%;
        }
      }
    }
  }

  // List Articles
  .jacl-item__body {
    height: auto;
  }
}

//
// Article Page
// -------------------------
.intro-text {
  margin-bottom: $grid-gutter-width;

  > p {
    font-family: var(--heading-font-family);
  }

  // View on Tablet/Desktop
  @include media-breakpoint-up(sm) {
    font-size: var(--h5-font-size);
    line-height: 1.778;
  }

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

.item-page {
  p {
    // Mobile view
    @include media-breakpoint-down(xs) {
      margin-bottom: $grid-gutter-width / 2;
    }
  }
  // Full Image
  .item-image {
    margin: 0 0 $grid-gutter-width 0;
    float: none;
    width: 100%;

    img {
      width: 100%;
    }
  }

  // Content
  .com-content-article__body {
    margin-top: 0;

    // View on Tablet/Desktop
    @include media-breakpoint-up(sm) {
      font-size: var(--h5-font-size);
      line-height: 1.778;
    }

    &.has-sharing {
      padding-left: $grid-gutter-width * 3;

      // Landscape phones
      @include media-breakpoint-down(sm) {
        padding-left: $grid-gutter-width*2;
      }
    }

    > p:first-child::first-letter,
    p.has-letter::first-letter {
      color: var(--color-primary);
      float: left;
      font-family: var(--heading-font-family);
      font-size: 96px;
      font-weight: 400;
      line-height: 0.7;
      margin-right: $grid-gutter-width / 2;
      padding-top: $grid-gutter-width/2;

      // Mobile view
      @include media-breakpoint-down(xs) {
        font-size: 40px;
        padding-top: 7px;
        margin-right: 7px;
      }
    }
  }

  .author-block {
    &.pos-after-title {
      margin-top: calc(var(--global-spacing) * 2);
      margin-bottom: calc(var(--global-spacing) * 2);
    }

    &.pos-before-content {
      margin-top: calc(var(--global-spacing) * 2);
      margin-bottom: calc(var(--global-spacing) * 2);
    }

    &.pos-after-content {
      margin-top: calc(var(--global-spacing) * 4);
    }
  }

  // Author block
  .post-author-block {
    border: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: calc(var(--global-spacing) * 1.5);
    text-align: center;

    @include media-breakpoint-up(sm) {
      border: 0;
      align-items: flex-start;
      flex-wrap: nowrap;
      justify-content: flex-start;
      padding: 0;
      text-align: left;
    }

    @include media-breakpoint-up(xl) {
      align-items: center;
    }

    .author-avatar {
      border-radius: 50%;
      margin-right: calc(var(--global-spacing) * 3);
      overflow: hidden;
      max-width: 64px;

      @include media-breakpoint-up(xl) {
        max-width: 120px;
      }
    }

    .author-name {
      font-size: var(--h4-font-size);
      margin-bottom: var(--global-spacing);
    }

    .author-title {
      text-transform: uppercase;
    }
  }

  .author-block-post-detail {
    background-color: var(--light-reverse);
    border: 1px solid var(--border-color);
    border-radius: 5px;
  }

  &.has-sharing .pos-after-content {
    margin-left: calc(var(--global-spacing) * 12);

    // Landscape phones
    @include media-breakpoint-down(sm) {
      margin-left: calc(var(--global-spacing) * 9);
    }
  }

  .content-article-lead {
    .author-block {
      margin-top: 0;
    }

    ul.tags {
      margin-top: 0;
    }

    &.has-sharing {
      padding-left: $grid-gutter-width * 3;

      // Landscape phones
      @include media-breakpoint-down(sm) {
        padding-left: $grid-gutter-width*2;
      }
    }
  }

  .pagenavigation {
    padding-left: $grid-gutter-width * 3;

    .pagination {
      justify-content: space-between;
    }

    ul {
      .next {
        margin-left: auto;
      }
    }
  }

  &.edit {
    #adminForm > fieldset {
      margin-bottom: $spacer*2;

      & + div {
        margin-bottom: $spacer*2 !important;
      }
    }
  }
}

.com-content-article {

  // Large Gutter on Desktop
  @include media-breakpoint-up(xl) {
    .row {
      &.has-sidebar {
        .content-article {
          padding-right: 42px;
        }

        .sidebar-right {
          max-width: 358px;
          flex: 0 0 358px;
          padding-left: 42px;
          position: sticky;
          top: 32px;
          height: 100%;
        }
      }
    }
  }

  .category {
    a {
      font-size: 11px;
    }
  }

  h2 {
    // Landscape phones
    @include media-breakpoint-down(sm) {
      font-size: var(--h3-font-size);
    }  
  }

  .full-width {
    margin-bottom: $grid-gutter-width*2;
    margin-left: calc(50% - 50vw);
    max-width: calc(100vw - 9px);
    width: 100vw;

    // Tablets
    @include media-breakpoint-down(md) {
      max-width: 100vw;
      margin-bottom: $grid-gutter-width;
    }

    #pop-print {
      position: fixed;
      top: 30px;
      right: 10px;
    }

    .dropdown-toggle {
      color: $white;
    }

    .item-image {
      figcaption {
        display: none;
      }
    } 

    .wrap-inner {
      background-position: center;
      background-repeat: no-repeat;
      background-size: cover;
      //padding: $grid-gutter-width*8 $grid-gutter-width $grid-gutter-width;
      position: relative;

      &:before {
        background: rgba($black, 0.5);
        bottom: 0;
        content: '';
        left: 0;
        position: absolute;
        right: 0;
        top: 0;
        z-index: 9;
      }

      .article-lead {
        //color: $white;
        margin: 0 auto;
        //max-width: 120px;
        position: relative;
        z-index: 10;

        .category {
          a {
            color: $white;
            font-weight: 500;
          }
        }

        .article-title {
          h1 {
            color: $white;
          }
        }

        .article-info {
          color: rgba($white, 0.6) !important;
          margin-bottom: 0;

          .createdby {
            >span {
              color: $white;
            }
          }

          dd {
            &:after {
              color: rgba($white, 0.6);
            }
          }
        }

        .intro-text {
          margin-bottom: 0;
        }
      }
    }
  }

  .read-more {
    .module-title {
      font-weight: 600;
      margin-bottom: 12px;
    }

    ul {
      li {
        +li {
          margin-top: $grid-gutter-width/4;
        }

        a {
          line-height: $grid-gutter-width;
          padding: 0;
          text-decoration-color: var(--border-color);
          text-decoration-line: underline;
          text-underline-offset: 4px;

          &:before {
            display: none;
          }
        }
      }
    }
  }

  &.default-2 {
    .article-title {
      max-width: 930px;
    }

    .intro-text {
      max-width: 900px;
    }
  }

  &.default-3 {
    .full-width {
      .wrap-inner {
        max-width: 1248px;
        margin: 0 auto;
        padding: $grid-gutter-width*11 $grid-gutter-width*2 $grid-gutter-width*2;

        // Tablets
        @include media-breakpoint-down(md) {
          padding: $grid-gutter-width*5 $grid-gutter-width $grid-gutter-width/2;
        }

        // Portrait phones
        @include media-breakpoint-down(xs){
          padding: $grid-gutter-width*3 $grid-gutter-width/2 $grid-gutter-width/2;
        }
      }

      .article-lead {
        max-width: 740px;
        margin-left: 0;
      }
    }
  }

  &.default-4 {
    .full-width {
      .wrap-inner {
        max-width: 1248px;
        margin: 0 auto;
        padding: $grid-gutter-width*6.5 $grid-gutter-width*2;

        // Tablets
        @include media-breakpoint-down(md) {
          padding: $grid-gutter-width*4 $grid-gutter-width;
        }

        // Portrait phones
        @include media-breakpoint-down(xs){
          padding: $grid-gutter-width*2 $grid-gutter-width/2;
        }
      }

      .article-lead {
        max-width: 740px;
        text-align: center;
      }
    }
  }

  &.default-5,
  &.default-6 {
    .article-lead {
      max-width: 740px;
      text-align: center;
      margin: 0 auto;
    }

    .full-width {
      .item-image {
        img {
          // Large desktops
          @include media-breakpoint-up(xl) {
            height: 700px;
            object-fit: cover;
          }
        }
      }
    }
  }

  &.default-6 {
    .content-article {
      max-width: 740px;
      margin: 0 auto;
    }
  }

  &.default-7 {
    .article-lead {
      max-width: 740px;
      text-align: center;
      margin: 0 auto;
    }

    .article-info {
      justify-content: center;
    }
  }

  &.default-8 {
    .article-lead {
      max-width: 740px;
      text-align: center;
      margin: 0 auto;
    }

    .content-article {
      max-width: 740px;
      margin: 0 auto;
    }

    .article-info {
      justify-content: center;
    }
  }

  &.default-9,
  &.default-10 {
    margin-top: -$grid-gutter-width;

    .full-width {
      .wrap-content {
        //max-width: 1920px;
        //margin: 0 auto;
        background: var(--color-yellow-light);

        .intro-text {
          margin-bottom: 0;
        }
      }

      .icons {
        margin-top: -$grid-gutter-width;

        .dropdown-toggle {
          color: var(--body-text-color);
        }
      }
    }
    
    .item-image {
      margin-bottom: 0;
      height: 100%;

      img {
        height: 100%;
        object-fit: cover;
      }
    }

    .article-lead {
      max-width: 480px;
      text-align: center;
      margin: 0 auto;
      height: 100%;
      display: flex;
      flex-direction: column;
      justify-content: center;
      padding: $grid-gutter-width*3 $grid-gutter-width/2;

      // Tablets
      @include media-breakpoint-down(md) {
        //padding: $grid-gutter-width*3 $grid-gutter-width/2;
      }

      // Portrait phones
      @include media-breakpoint-down(xs){
        padding: $grid-gutter-width*1.5 $grid-gutter-width/2;
      }  
    }
  }

  &.default-10 {
    .content-article {
      max-width: 800px;
      margin: 0 auto;
    }

    .article-info {
      justify-content: center;
    }
  }

  &.default-11,
  &.default-12 {
    //margin-top: -$grid-gutter-width;

    .full-width {
      .box-content {
        background: var(--color-yellow-light);
        margin: 0 auto;
        max-width: 1248px;
      }

      .article-info {
        margin-bottom: 0;
        justify-content: center;
      }

      .icons {
        margin-top: -$grid-gutter-width;
        
        .dropdown-toggle {
          color: var(--body-text-color);
        }
      }
    }
    
    .item-image {
      margin-bottom: 0;
      height: 100%;

      img {
        height: 100%;
        object-fit: cover;
      }
    }

    .article-lead {
      max-width: 400px;
      text-align: center;
      margin: 0 auto;
      display: flex;
      flex-direction: column;
      justify-content: center;
      padding: $grid-gutter-width*5 $grid-gutter-width/2;

      // Tablets
      @include media-breakpoint-down(md) {
        padding: $grid-gutter-width*3 $grid-gutter-width/2;
        max-width: 600px;
      }

      // Portrait phones
      @include media-breakpoint-down(xs){
        padding: $grid-gutter-width*1.5 $grid-gutter-width/2;
      }  
    }
  }

  &.default-12 {
    .content-article {
      max-width: 740px;
      margin: 0 auto;
    }
  }

  &.default-13 {
    .full-width {
      margin-top: -$grid-gutter-width;

      .wrap-inner {
        padding: $grid-gutter-width*16 $grid-gutter-width*2 $grid-gutter-width*2;

        // Tablets
        @include media-breakpoint-down(md) {
          padding: $grid-gutter-width*6 $grid-gutter-width $grid-gutter-width;
        }

        // Portrait phones
        @include media-breakpoint-down(xs){
          padding: $grid-gutter-width*4.5 $grid-gutter-width/2 $grid-gutter-width/2;
        }
      }

      .article-lead {
        max-width: 1120px;

        .wrap-content {
          max-width: 740px;
        }
      }
    }
  }

  &.default-14 {
    .full-width {
      margin-top: -$grid-gutter-width;

      .wrap-inner {
        padding: $grid-gutter-width*16 $grid-gutter-width*2 $grid-gutter-width*2;

        // Tablets
        @include media-breakpoint-down(md) {
          padding: $grid-gutter-width*6 $grid-gutter-width $grid-gutter-width;
        }

        // Portrait phones
        @include media-breakpoint-down(xs){
          padding: $grid-gutter-width*4.5 $grid-gutter-width/2 $grid-gutter-width/2;
        }
      }

      .article-lead {
        max-width: 740px;
        text-align: center;
      }
    }

    .content-article {
      max-width: 740px;
      margin: 0 auto;
    }

    .article-info {
      justify-content: center;
    }
  }

  &.default-15 {
    .full-width {
      margin-top: -$grid-gutter-width;

      .wrap-inner {
        padding: $grid-gutter-width*9.5 $grid-gutter-width*2;

        // Tablets
        @include media-breakpoint-down(md) {
          padding: $grid-gutter-width*6 $grid-gutter-width;
        }

        // Portrait phones
        @include media-breakpoint-down(xs){
          padding: $grid-gutter-width*3 $grid-gutter-width/2;
        }
      }

      .article-lead {
        max-width: 1120px;

        .wrap-content {
          max-width: 740px;
        }
      }
    }
  }

  &.default-16 {
    .full-width {
      margin-top: -$grid-gutter-width;

      .wrap-inner {
        padding: $grid-gutter-width*9 $grid-gutter-width*2;

        // Tablets
        @include media-breakpoint-down(md) {
          padding: $grid-gutter-width*5 $grid-gutter-width;
        }

        // Portrait phones
        @include media-breakpoint-down(xs){
          padding: $grid-gutter-width*2 $grid-gutter-width/2;
        }
      }

      .article-lead {
        max-width: 740px;
        text-align: center;
      }
    }

    .content-article {
      max-width: 740px;
      margin: 0 auto;
    }

    .article-info {
      justify-content: center;
    }
  }
}


// ---------------------------------------------------------
// VIDEOS LISTS
// ---------------------------------------------------------
.ja-videos-list-wrap {
  margin-bottom: $spacer;
  padding-bottom: $spacer;
  border-bottom: 1px solid var(--border-color);
}

.ja-video-list.video-playing .video-mask {
  border: 3px solid var(--color-primary);
}

#ja-main-player {
  background-color: $black;
  margin-bottom: $grid-gutter-width;

  .video-mask {
    background: $black;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    opacity: 0.5;
  }

  #ja-btn-play {
    position: absolute;
    background: none;
    border: 2px solid $white;
    color: $white;
    left: 50%;
    top: 50%;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
    width: $grid-gutter-width * 3;
    height: $grid-gutter-width * 3;
    font-size: 20px;
    line-height: $grid-gutter-width * 3 - 4px;
    margin-top: -$grid-gutter-width * 1.5;
    margin-left: -$grid-gutter-width * 1.5;
    text-align: center;
    padding: 0;
  }
}


// ---------------------------------------------------------
// AUTHOR PAGE
// ---------------------------------------------------------
.author-page {
  margin: 0 auto;

  @include media-breakpoint-up(lg) {
    width: 75%;
  }

  .author-list {
    @include make-row();
    list-style: none;
    padding: 0;

    li {
      @include make-col(12);
      @extend .text-center;
      padding: 0 ($grid-gutter-width / 2);
      margin-bottom: calc(var(--global-spacing) * 8);

      @include media-breakpoint-up(md) {
        @include make-col(6);
      }

      @include media-breakpoint-up(lg) {
        @include make-col(4);
      }

      &:hover {
        .user-name a {
          color: var(--body-link-hover-color);
          border-bottom: 1px solid var(--body-link-hover-color);
        }
      }
    }
  }
}

.author-page,
.author-detail {
  text-align: center;

  // User avatar
  .author-avatar {
    margin-bottom: calc(var(--global-spacing) * 2);

    a,span {
      @extend .d-block;
      border-radius: 50%;
      height: 100px;
      margin: 0 auto;
      overflow: hidden;
      transition: $transition-base;
      width: 100px;
    }
  }
}

.author-posts {
  .item {
    margin-bottom: calc(var(--global-spacing) * 4);

    .article-info dd.category::after {
      display: inline-block;
    }
  }
}

.author-block {
  // User name
   .author-name {
    font-size: var(--h3-font-size);
    font-family: var(--heading-font-family);
    font-weight: 400;
    margin-bottom: var(--global-spacing);

    a {
      color: var(--body-text-color);

      &:hover, &:focus, &:active {
        color: var(--body-link-hover-color);
      }
    }
  }

  // Job title
  .author-title {
    color: var(--gray-500);
    font-size: 10px;
    margin-bottom: var(--global-spacing);
    text-transform: uppercase;
  }
}

// Author social list
.author-socials {
  //margin-top: calc(var(--global-spacing) * 2);
  //margin-bottom: calc(var(--global-spacing) * 4);

  a {
    @extend .d-inline-block;
    padding: calc(var(--global-spacing) / 2);

    span {
      color: var(--body-text-color);

      @each $brand-name, $value in $social-brands {
        &.fa-#{$brand-name} {
          color: $value;
        }
      }
    }

    &:hover, &:focus, &:active {
      span {
        color: var(--body-link-hover-color);
      }
    }

  }
}

// Author detail block
.author-detail {
  margin-bottom: 64px;

  @include media-breakpoint-up(sm) {
    margin: 0 auto calc(var(--global-spacing) * 4);
  }

  .author-name {
    font-size: var(--h2-font-size);
  }
}

// ---------------------------------------------------------
// GALLERY LISTS
// ---------------------------------------------------------
.ja-gallery-list-wrap {
  margin-bottom: $grid-gutter-width;

  .article-header h2 {
    font-size: var(--h2-font-size);
  }

  .item-image {
    margin-bottom: 0;

    img {
      margin: auto;
    }
  }

  .article-content {
    @include media-breakpoint-up(sm) {
      padding-left: 25%;
      padding-right: 25%;
      text-align: center;
    }
  }

  .carousel-thumbnail {
    .carousel-indicators {
      > li {
        opacity: 0.8;
      }

      > li.active {
        opacity: 1;
      }

      > li, > li.active {
        background: rgba(255,255,255,0.8);
        border: 0;
        border-radius: 20px;
        height: 10px;
        margin: 0 2px;
        position: relative;
        text-indent: 0;
        width: 10px;

        .thumb {
          border: 5px solid var(--light-reverse);
          position: absolute;
          width: 100px;
          height: 60px;
          top: -70px;
          left: -40px;
          opacity: 0;
          transition: 500ms all;

          &:before {
            content: "";
            display: block;
            border-top: 8px solid var(--light-reverse);
            border-left: 8px solid transparent;
            border-right: 8px solid transparent;
            position: absolute;
            left: 34px;
            bottom: -12px;
          }

          strong {
            display: block;
            height: 50px;
            overflow: hidden;
          }

          img {
            max-width: 100px !important;
            max-height: none !important;
          }
        }

        &:hover {
          .thumb {
            top: -75px;
            opacity: 1;
          }
        }
      }

      > li.active  {
        background-color: var(--color-primary);
      }
    }

    .carousel-caption {
      background: rgba(0, 0, 0, 0.2);
      bottom: auto;
      left: $grid-gutter-width/2;
      padding: $spacer/2 $spacer;
      top: $grid-gutter-width/2;
      right: $grid-gutter-width/2;
    }
  }

  .carousel-control {
    .fa {
      font-size: 60px;
      height: 60px;
      position: absolute;
      margin-top: -30px;
      margin-left: -10px;
      top: 50%;
      left: 50%;
    }
  }
}

// Gallery Item
.gallery-item {
  margin-bottom: $grid-gutter-width * 2;

  // Image
  .item-image {
    margin-bottom: $grid-gutter-width / 2;
  }
}

.number-item {
  display: flex;
  font-size: var(--h3-font-size);

  .total {
    color: var(--gray-500);
  }
}

// Image Description
.image-desc {
  color: var(--gray-700);
  font-size: var(--body-font-size);
}

//
// Generic Category
// -------------------------
.category-blog-info {
  .category-desc {
    padding: 0;
    margin-top: 0;
  }
}
.category-desc {
  > img {
  }
}

.category {

  li {}

  .list {}

  .list-title {
    a {
      color: $gray-700;

      &:hover, &:focus, &:active {
        color: var(--link-hover-color);
      }
    }
  }

  // Striped Style
  &.row-striped,
  &.list-striped {
  }
}

// Filters
// T4: Joomla! use <fieldset> that break "display: flex".
// So we need to re-style the layout without using BS "btn-toolbar" styles 
// More info here: https://bugs.chromium.org/p/chromium/issues/detail?id=262679
.filters {
  legend {
  }

  legend,
  .btn-group,
  .input-group {
  }

  .input-group + .btn-group {
  }
}

//
// Categories List
// -------------------------
.categories-list {

  .base-desc {
    background-color: darken($gray-100, 2%);
    border-radius: $border-radius;
    padding: $spacer*2;

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

  .page-header {
    border: 0;
    border-bottom: 1px solid $border-color;
    margin: 0 0 $spacer;
    padding: 0 0 $spacer;

    a {
      font-weight: $font-weight-bold;
    }

    // Badges
    .badge {
      float: right;
    }

    // Collapse Toggle
    .btn {
    }
  }

  // Indent Sub Categories
  .page-header + .fade,
  .fade > div {
  }

  // Category Desc
  .category-desc {
  }

  .com-content-categories__items {
    .com-content-categories__item {
      >.item-inner {
        padding: $grid-gutter-width/2;

        .page-header {
          display: flex;
          align-items: center;
          padding: 0;
          margin: 0;
          border: none;

          a.btn {
            padding: 0;
            margin-left: $grid-gutter-width/2;
          }
        }

        .com-content-categories__children {
          border-top: 1px solid var(--border-color);
          margin-top: $grid-gutter-width/2;
          padding-top: $grid-gutter-width/2;

          .com-content-categories__items {
            padding-left: 0;

            .com-content-categories__item {
              +.com-content-categories__item {
                border-top: 1px solid var(--border-color);
                margin-top: $grid-gutter-width/2;
                padding-top: $grid-gutter-width/2;
              }
            }

            .item-inner {
              padding: 0;
              border: none;
            }
          }
          
        }
      }
    }
  }
}


//
// Category List
// -------------------------
.category-list {

  table.category {
    display: table;
  }

  .pagination-wrap {
    align-items: center;
    gap: $grid-gutter-width/2;
    justify-content: space-between;
    width: 100%;

    @include media-breakpoint-down(md) {
      flex-direction: column;
    }

    ul.pagination {
      @include media-breakpoint-down(md) {
        justify-content: center;
      }
    }

    .counter {
      padding: 0 !important;
      // Mobile view
      @include media-breakpoint-down(sm) {
        display: inline-block;
        float: none!important;
        width: auto;
      }
    }
  }
}

.content-category {
  .control-group {
  }

  .filters {
  }

  // Sub Cat
  .cat-children {
    border-top: 1px solid $border-color;

    > h3 {
      font-size: var(--h4-font-size);
    }

    .category-desc {
    }

    > div {
      border-bottom: 1px solid $border-color;
    }
  }
}


//
// Contact Category
// -------------------------
.contact-category {
  h2 {}

  .category-desc {}

  // T4: Joomla! add ".row" to the <li>. So we need to make <ul> ".container"
  .category {
    @include make-container();
    padding: 0;
  }

  li {
    padding: $grid-gutter-width/2 0;

    br {
      margin-bottom: $grid-gutter-width/2;
    }
  }

  .list-title {
    a {
      font-weight: $font-weight-bold;
    }
  }



  // Pagination
  div.pagination {
    align-items: center;
    margin-top: $grid-gutter-width;
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;

    @include media-breakpoint-down(md) {
      flex-direction: column-reverse;
    }

    ul.pagination {
      @include media-breakpoint-down(md) {
        justify-content: center;
      }
    }

    .counter {
      padding: 0 !important;
      // Mobile view
      @include media-breakpoint-down(sm) {
        display: inline-block;
        float: none!important;
        width: auto;
      }
    }
  }

}


//
// Contacts
// -------------------------
.contact {
  .page-header {
  }

  .contact-address {
    .fa {
      font-size: var(--h5-font-size);
      margin: 0;
      text-align: left;
      width: 25px;
    }
          
    dt {
      font-weight: 600;
      color: var(--light-reverse);

      &.show-0,
      &.show-2 {
        display: none;
      }
    }

    dd {
      margin-bottom: 10px;

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

      &.show-1,
      &.show-2 {
        .fa {
          display: none !important;
        }
      }

      &.show-1 {
        padding-left: $spacer-xxl*2;
      }

      > span {
        align-items: center;
        display: flex;
      }
    }
  }

  .thumbnail {
    max-width: 450px;

    // Mobile view
    @include media-breakpoint-down(md) {
      float: none;
      margin-bottom: $spacer;
      width: 100%;
    }

    img {
      border-radius: $border-radius;
    }
  }

  .contact-links {
    ul.nav {
      li {
        padding-right: $grid-gutter-width/4;

        a {
          background: var(--gray-300);
          border-radius: 50%;
          border: 1px solid var(--border-color);
          display: inline-block;
          font-size: var(--h6-font-size);
          height: 40px;
          line-height: 38px;
          padding: 0;
          text-align: center;
          width: 40px;
        }
      }
    }
  } 

  // Contact Article
  .contact-articles {
    ul {
      border: none;

      li {
        display: block;
        padding: 4px 0;
        width: 100%;

        a {
          color: var(--body-text-color);
          font-weight: 500;

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

  // Tags
  ul.tags {
    >li {
      margin-bottom: 5px;

      a.badge, a.label {
        background: var(--gray-200);
        color: var(--gray-900);
        font-size: 11px;
        padding: 6px 12px;

        &:hover {
          background: var(--$gray-300);
        }
      }
    }
  }

  // Contact Form
  #contact-form {
    //margin: 0 (-$grid-gutter-width/2);

    legend {
      display: none;
    }

    .controls {
      margin-left: 0;
    }

    .form-group {
      margin-bottom: $spacer-lg;

      &:last-of-type {
        margin-bottom: 0;
      }

      .contact-name {
        // Portrait phones
        @include media-breakpoint-down(xs){
          margin-bottom: $spacer-lg;
        }  
      }

      .checkbox {
        padding-left: 0;
      }

      #jform_contact_name-lbl,
      #jform_contact_email-lbl,
      #jform_contact_emailmsg-lbl,
      #jform_contact_message-lbl {
        display: none;
      }

      .control-btn {
        margin-top: $grid-gutter-width/2;
      }
    }

    .captcha {
      margin-bottom: $grid-gutter-width/2;
    }

    #jform_consentbox {
      margin-bottom: $grid-gutter-width/2;
    }
  }

  // Plain
  .plain-style {
    .top-info {
      position: relative;

      &:before {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.64) 100%);
        bottom: 0;
        content: '';
        left: 0;
        position: absolute;
        right: 0;
        top: 0;
        z-index: 10;
      }

      .contact-info {
        background-position: center;
        background-repeat: no-repeat;
        background-size: cover;
        padding: $grid-gutter-width*7 $grid-gutter-width/2 $grid-gutter-width;

        .contact-address {
          position: relative;
          z-index: 100;

          dd {
            > span {
              color: $white;
              justify-content: center;
            }
          }
        }

        .contact-position {
          display: flex;
          justify-content: center;
          margin-bottom: $grid-gutter-width/4;
          color: $white;
          position: relative;
          z-index: 10;
        }

        .contact-links {
          position: relative;
          z-index: 100;

          ul {
            justify-content: center;

            li {
              a {
                background: transparent;
                border-color: $white;
                color: $white;
                font-size: 12px;
                height: $grid-gutter-width;
                line-height: 30px;
                width: $grid-gutter-width;

                &:hover {
                  background: rgba($white, 0.18);
                }
              }
            }
          }
        }
      }
    }

    .contact-form-wrap {
      margin: 0 auto;
      max-width: 850px;
      text-align: center;

      .title-form {
        max-width: 550px;
        margin: $spacer*5 auto $spacer-xxl;

        // Landscape phones
        @include media-breakpoint-down(sm) {
          margin: $spacer*3 auto $spacer-xl;
        }  

        h2 {
          margin-top: 0;
          margin-bottom: $grid-gutter-width/2;

          // Landscape phones
          @include media-breakpoint-down(sm) {
            font-size: var(--h3-font-size);
          }
        }
      }

      ul.tags {
        margin-top: $grid-gutter-width/2;
      }
    }

    .contact-box {
      margin-bottom: $grid-gutter-width/4;
    }

    .captcha {
      display: flex;
      justify-content: center;
    }

    #jform_consentbox {
      max-width: 600px;
      margin-left: auto;
      margin-right: auto;
    }

    #select_contact {
      margin: 0 auto;
    }

    .fields-container {
      transform: translateX(40%);

      dd {
        text-align: left;
      }
    }
  }

  // Tab Contact
  .wrapper-tabs {
    background: var(--gray-100);
    border-radius: $border-radius;
    border: 1px solid var(--border-color);
    float: left;
    max-width: 100%;
    width: 100%;
    margin-bottom: $grid-gutter-width/4;

    .thumbnail {
      // Mobile view
      @include media-breakpoint-down(md) {
        float: none;
        margin-bottom: $spacer;
        width: 100%;
      }
    }

    #myTabTabs {
      border: none;
      margin-bottom: 0;

      a {
        border: none;
        color: var(--heading-color);
        font-size: var(--h6-font-size);
        font-weight: 600;
        line-height: 1;
        padding: $grid-gutter-width/2;

        &.active,
        &:hover {
          background: var(--gray-200);
        }
      }
    }

    #myTabContent {
      border-top: 1px solid var(--border-color);
      float: left;
      max-width: 100%;
      padding: $grid-gutter-width/2;
      width: 100%;

      #display-form {
        .default .control-label {
          flex-basis: 100%;
        }
      }

      .contact-miscinfo {
        dt {
          float: none;
        }
      }

      #contact-form {
        //margin: 0 (-$grid-gutter-width/2);

        .form-group {
          margin-left: -$grid-gutter-width/2;
          margin-right: -$grid-gutter-width/2;
        }

        .control-group {
          margin: 0;
        }

        .form-control, .inputbox {
          /* background: $white;
          border-color: var(--gray-300);

          &:focus {
            background: $white;
            border-color: var(--gray-400);
          } */
        }
      }
    }
  }

  // Slide Contact
  #slide-contact {
    .card {
      margin-bottom: $spacer;
      border: 1px solid var(--border-color);

      .card-collapse {
        border-top: 1px solid var(--border-color);
      }
    }

    .card-header {
      border: none;
      padding: 0;

      &:hover {
      }

      .card-title {
        margin: 0;
      }

      .btn {
        background: var(--gray-200);
        color: var(--gray-900);
        display: block;
        font-size: var(--h5-font-size);
        font-weight: 600;
        padding: $grid-gutter-width/2;
        text-align: left;
        text-transform: capitalize;
        width: 100%;

        &:hover, &:focus, &:active {
          background: var(--gray-300);
          text-decoration: none;
        }
      }
    }

    .card-body {
      //border-top: 1px solid var(--border-color);

      // Mobile view
      @include media-breakpoint-down(xs) {
        padding: $spacer;
      }

      .contact-miscinfo {
        dt {
          float: none;
        }
      }
    }

    .contact-form {
      //margin: 0 (-$grid-gutter-width/2);

      .form-group {
        margin-left: -$grid-gutter-width/2;
        margin-right: -$grid-gutter-width/2;
      }

      .control-group {
        margin: 0;
      }

      .form-control, .inputbox {
        background: $white;
        border-color: var(--gray-300);

        &:focus {
          background: $white;
          border-color: var(--gray-400);
        }
      }
    }

    .contact-links {
      ul.nav li a {
        //background: 
      }
    }
  }
}


//
// Newsfeed
// -------------------------
.newsfeed {
  .feed-description {
  }

  > ol {
  }

  > ol > li {
  }

  .feed-link {
  }

  .feed-item-description {
    figure {
    }

    .lead {
    }
    
    .feedflare {
    }
  }
}


//
// Newsfeed
// -------------------------
.newsfeed-category {
  #filter-search {
  }
  
  .category {
    li {
    }
  }

  .filters {
    .btn-group.float-end {
      float: right;

      .form-select {
        padding: 21px 15px;
      }
    }
  }

  .com-newsfeeds-category__pagination {
    align-items: center;
    margin-top: $grid-gutter-width;
    display: flex;
    flex-direction: row-reverse;
    gap: $grid-gutter-width/2;
    justify-content: space-between;

    @include media-breakpoint-down(md) {
      flex-direction: column-reverse;
    }

    ul.pagination {
      @include media-breakpoint-down(md) {
        justify-content: center;
      }
    }

    .counter {
      padding: 0 !important;
      // Mobile view
      @include media-breakpoint-down(sm) {
        display: inline-block;
        float: none!important;
        width: auto;
      }
    }
  }
}


// Pagination 
.pagination-wrap {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .25rem;
  padding-top: $grid-gutter-width;

  @include media-breakpoint-down(sm) {
    flex-direction: column;
    justify-content: center;
  }

  ul {
    margin: 0;
  }

  .counter {
  }
}


//
// Search
// -------------------------
.search {

  // Title
  h1 {
    margin-bottom: $grid-gutter-width;

    // Mobile view
    @include media-breakpoint-down(xs) {
      font-size: $h2-font-size;
      margin-bottom: 0;
    }
  }

  select {
  }

  #ordering {
    background: transparent;
    padding: ($spacer / 2) $spacer;
    height: auto;
  }

  .btn-toolbar {
    justify-content: center;

    @include media-breakpoint-down(sm) {
      align-items: center;
      flex-direction: column;
    }

    .btn {
      display: inline-block!important; // Fix for hidden when hover
      margin-left: -2px;
    }

    .btn-group {
      margin-left: 0;

      // Mobile view
      @include media-breakpoint-down(sm) {
        margin-top: $spacer;
      }

      &:first-child {
        width: 70%;

        // Landscape phonesw
        @include media-breakpoint-down(sm) {
          width: 100%;
        }
      }

      #search-searchword {
        background: $gray-400;
      }

      button {
        border: none;
      }
    }
  }

  .searchintro {
    font-size: $h5-font-size;
    color: $headings-color;
    font-weight: 400;

    .badge-info {
      font-weight: 400;
    }
  }

  // Input Group
  .inputbox {
    max-width: 100%;
  }

  .input-group {
    justify-content: center;

    input {
      max-width: 100%;
    }
  }


  .form-inline {
    justify-content: center;
  }

  .ordering-box {
    justify-content: center;
  }

  .form-limit {
    display: flex;
    justify-content: center;
    margin-bottom: $spacer / 2;

    label {
      align-items: center;
      display: flex;
      margin-bottom: 0;
    }

    select {
      width: auto;
      margin-left: $spacer / 2;
    }
  }


  fieldset legend {
    text-align: center;
    text-transform: none;
    font-size: $font-size-lg;
    font-weight: 400;
    color: $headings-color;
  }

  //
  // The Results
  .search-results,
  #search-results {
    border-top: 1px solid $border-color;

    .result-title {
      color: $headings-color;
      font-weight: 500;
      
      a {
        color: $headings-color;

        // Landscape phones
        @include media-breakpoint-down(sm) {
          font-size: $h5-font-size;
        }
      }
    }

    .result-category {}
    .result-text {
    }

    .result-created {
      color: $gray-600;
    }
  }

  // Pagination
  >.pagination {
    justify-content: center;

    ul {
      margin-top: $spacer-xxl !important;
      justify-content: center;
    }
  }

  .counter {
    border: none;
    display: inline-block;
  }
}

.highlight {
  background: $yellow; 
  padding: 1px;
}

//
// The Empty Result
#search-result-empty {
}


// Smart Search
// -------------------------
.com-finder {
  max-width: 900px;
  margin: auto;
  padding: $grid-gutter-width * 2;
  border-radius: $border-radius;

  // Mobile view
  @include media-breakpoint-down(sm) {
    padding: $grid-gutter-width;
  }

  select, input {
    background: $gray-400;
  }
  
  .form-inline {
    display: flex;
    flex-direction: column;

    // Label
    label {
      color: $headings-color;
      font-size: $h2-font-size;
      font-weight: 400;
      margin-bottom: $spacer;

      // Mobile view
      @include media-breakpoint-down(xs) {
        font-size: $h3-font-size;
      }
    }

    // Input Group
    .input-group {
      display: flex;
      flex-direction: column;
      max-width: 100%;
      width: 800px;

      .form-control {
        border-radius: $input-border-radius;
        max-width: 100%;
        width: 100%;
      }

      .input-group-append {
        justify-content: center;
        margin-top: $grid-gutter-width / 2;

        .btn {
          border-radius: $btn-border-radius !important;
          margin: 0 $spacer / 4;

          // Mobile view
          @include media-breakpoint-down(xs) {
            font-size: 12px;
            padding: $spacer-xs*3 $spacer-sm*2;
          }
        }
      }
    }

    .awesomplete > ul {
      background-color: #fff;
      z-index: 100;
    }
  }

  #finder-filter-window {
    select.inputbox {
      background: transparent;
      height: auto;
      padding: $spacer / 1.5 $spacer;
    }

    .field-calendar {
      input {
        background: transparent;
        height: auto;
        padding: $spacer / 1.5 $spacer;
      }

      .btn {
        padding: $spacer / 1.5 $spacer;

        span {
          margin-right: 0;
        }
      }
    }

    #finder-filter-select-dates {
      @include clearfix();

      select {
        width: auto;
      }
    }

  }

  #finder-filter-window {

    // Filter By Date
    #finder-filter-select-dates {
      display: grid;
      grid-template-columns: 1fr;
      gap: $spacer;
      margin-bottom: $spacer*2;

      @include media-breakpoint-up(md) {
        grid-template-columns: repeat(2, 1fr);
      }

      .filter-date {
        flex-wrap: wrap;
        padding: 0;
        gap: $spacer;
        width: unset;

        label {
          flex-basis: 100%;
        }

        select.inputbox {
          margin: 0;
          width: 100% !important;
          max-width: unset;
        }

        .field-calendar {
          width: 100%;
          .form-control {
            flex: 1;
            max-width: unset;
          }
        }

        .chzn-container {
          margin-bottom: 6px;
        }
      }

    }

    // Filter By Type 
    .filter-branch {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: $spacer;
      width: 100%;  

      @include media-breakpoint-down(md) {
        flex-direction: column;
      }

      .control-label {
        padding: 0;
        margin-bottom: $spacer/2;
      }

      .controls {
        margin-left: 0;

        select {
          width: 100%;
        }
      }
    }
  }

  .com-finder__advanced {
    .filter-date {
      .filter-date-operator {
        margin-bottom: $spacer-xs;
      }

      label {
        font-weight: 600;
      }
    }
  }

  .finder-selects {
    margin-top: $spacer-sm*2 !important;

    br {
      display: none;
    }

    label {
      font-weight: 600;
    }

    .control-label.control-label {
      display: block;
      float: none;
    }
  }

  #search-results {
    text-align: center;

    .result-title {
      margin-top: $spacer;

      // Landscape phones
      @include media-breakpoint-down(sm) {
        font-size: $h5-font-size;
      }

      span.highlight {
        margin-top: 5px;
        display: inline-block;
      }

      a {
        font-weight: 400;
        color: $headings-color;
        font-size: $h5-font-size;
      }
    }

    .badge {
      border-radius: $border-radius;
      background: rgba($black, 0.06);
      color: $gray-900;
      font-weight: 400;
      padding: $spacer-sm;
    }

    .search-pagination {
      margin-top: $spacer;
    }

    .search-pages-counter {
      margin-top: $spacer / 2;
    }
  }

  // Pagination
  .com-finder__pagination {
    ul.pagination {
      justify-content: center;
      margin-top: $spacer-xxl !important;
    }
  }
}

// Calendar
.js-calendar {
  .buttons-wrapper {
    button {
      +button {
        margin-left: $spacer-xs !important;
      }
    }

    .btn {
      background-color: var(--$gray-200);
      color: var(--$gray-900);
      font-size: 12px;
      padding: 8px 20px;

      &:hover {
        background-color: var(--$gray-300);
      }
    }
  }

  td.time {
    select.time {
      padding: 0 !important;
    }
  }
}

//
// Tag Category
// -------------------------
.tag-category {
  .category h3 {
    //font-size: var(--h4-font-size);
  }

  #limit_chzn {
    min-width: auto;
  }

  table.category {
    tbody {
      display: block;

      tr {
        display: block;

        td {
          display: block;
          padding: $grid-gutter-width/2;

          a {
            color: var(--heading-color);

            &:hover {
              color: var(--heading-color) !important;
            }
          }
        }
      }
    }
  }

  .pagination {
    .counter {
      margin: $grid-gutter-width/4 $grid-gutter-width/2 0 0;
    }
  }
}

.demo-layout.demo-home {
  .tag-category {
    padding: $spacer * 2;
  }
}

.input-group-btn {
  .btn + .btn {
  }
}

// 
// Edit Article 
// --------------------------
#jform_title {
}


// Edit module button
// --------------------------

.t4-main-body .jacl-layout.layout-4 .jmodedit{
  right: 42px;
}

.jmoddiv .jmodedit {
  right: 0;
}

.jmodedit {
  background-color: $gray-200;
  border-radius: 3px;
  padding: 0;
  height: 30px;
  width: 30px;
  line-height: 1;
  right: 16px;
  span {
    color: $gray-600;
    margin: 0 !important;
    line-height: 27px;
  }

  &:hover {
    background-color: $gray-600;

    span {
      color: $white;
    }
  }
}


// Fix modal overlay
// -----------------
.modal-backdrop.fade {
  visibility: visible;
}

body.modal-open {
  .t4-wrapper-inner {
    z-index: auto;
    perspective: none;
  }
}

// Ekko Lightbox use Bootstrap
.ekko-lightbox {
  .modal-dialog {
    border: 0;
    border-radius: 0;
    padding: 0;
    margin: 0;
    max-width: 100%!important;
  }

  // Modal Content
  .modal-content {
    background: var(--light-reverse);
    border: 0;
    border-radius: 0;
    display: flex;
    flex-direction: row;
    padding: 0;
    padding-right: $grid-gutter-width * 2;
    margin: 0;
    height: 100vh;

    // Tablet view
    @include media-breakpoint-down(md) {
      flex-direction: column;
      height: auto;
    }

    // Header
    .modal-header {
      border-right: 1px solid var(--border-color);
      border-left: 1px solid var(--border-color);
      order: 2;
      flex: 0 0 30%;
      padding: $grid-gutter-width * 2;

      // Tablet view
      @include media-breakpoint-down(md) {
        border-left: 0;
        border-top: 1px solid var(--border-color);
        padding: $grid-gutter-width;
      }

      // Button Close
      .close {
        border-bottom: 1px solid var(--border-color);
        color: var(--gray-900);
        position: absolute;
        right: 0;
        top: 0;
        font-size: 20px;
        height: $grid-gutter-width * 2;
        margin: 0;
        opacity: 1;
        width: $grid-gutter-width * 2;
      }
    }

    // Body
    .modal-body {
      order: 1;
      flex: 0 0 70%;
      position: static;
      padding: 0;
      height: 100vh;

      // Tablet view
      @include media-breakpoint-down(md) {
        height: auto;
      }

      // Ekko Item
      .ekko-lightbox-container {
        display: flex;
        justify-content: center;
        align-items: center;
        position: static;
        padding: $grid-gutter-width * 2;
        height: 100vh!important;

        // Tablet view
        @include media-breakpoint-down(md) {
          border-right: 1px solid var(--border-color);
          padding: $grid-gutter-width;
          height: auto!important;
        }
      }

      .ekko-lightbox-item {
        position: static;
        width: auto;

        &.show {
          img {
            display: block;
          }
        }
      }

      .ekko-lightbox-nav-overlay {
        display: flex;
        flex-direction: column;
        top: $grid-gutter-width * 2;
        left: auto;
        right: 0;
        height: auto;
        width: auto;

        a {
          opacity: 1;

          span {
            align-items: center;
            border-bottom: 1px solid var(--border-color);
            color: var(--gray-900);
            display: flex;
            font-size: 20px;
            justify-content: center;
            height: $grid-gutter-width * 2;
            opacity: 1;
            padding: 0;
            width: $grid-gutter-width * 2;
          }
        }
      }

      // Image
      img {
        display: none;
        max-height: 90vh;
        width: auto!important;
      }
    }
  }
}

body.contentpane {
  background-color: #fff;

  .row-fluid { @include make-row(); }

  .span2  { @include make-col(2); }
  .span3  { @include make-col(3); }
  .span4  { @include make-col(4); }
  .span5  { @include make-col(5); }
  .span6  { @include make-col(6); }
  .span7  { @include make-col(7); }
  .span8  { @include make-col(8); }
  .span9  { @include make-col(9); }
  .span10 { @include make-col(10); }
  .span11 { @include make-col(11); }
  .span12 { @include make-col(12); }

  .well {
    background-color: $gray-100;
    margin-bottom: $spacer;
    padding: $spacer $spacer*2;
    @extend .card;

    .row-fluid {
      margin-bottom: $spacer/2;
    }

    .control-group {
      .controls {
        margin-left: 0;
      }
    }

    label {
      min-width: 130px;
      padding-right: $spacer/2;
      text-align: right;
    }
  }


  input[type="text"] {
    border: 1px solid $border-color;
    padding: $spacer/4 $spacer/2;
  }  

  #pop-print {
    top: $grid-gutter-width/4;
    padding: 0;
  }
}


// Improve style for MCE Editor
// ----------------------------
.mce-panel.mce-window {
  border-radius: 5px;
  border: 0 !important;
  padding: 0 !important;

  .mce-window-head {
    border-bottom: 1px solid $border-color;
    padding: $spacer;

    .mce-close {
      height: 50px;
      width: 50px;
    }
  }

  .mce-foot {
    border-radius: 0 0 5px 5px;
    border-top: 1px solid $border-color;

    .mce-btn {
      border-radius: 5px;
    }
  }
}

.container-popup {
  padding: $spacer/2 $spacer !important;

  #uploadform.well {
    margin-bottom: 0;
  }

  > .btn-group {
    button {
      border-radius: 5px;
      margin: 0 $spacer / 4;
    }
  }
}

.js-stools-container-bar {
  margin-bottom: $spacer;

  .btn-wrapper {
    input {
      display: inline-block;
      width: auto;
      height: $spacer*3 !important;
      //padding: $grid-gutter-width/4 $grid-gutter-width;
    }

    button {
      background: var(--color-primary);
      border: none;
      display: inline-block;
      height: $spacer*3;
      padding: 0 $grid-gutter-width/2;
    }
  }

  .btn {
    @extend .btn-secondary;
  }
}

.js-stools-container-list {
  margin-bottom: $spacer;
}

.thumbnails.thumbnails-media {
  list-style: none;
  margin: $spacer -8px 0;
  padding: 0;
  overflow: hidden;

  li a {
    color: $gray-600;
    display: block;
    padding-top: $spacer*2;

    &:hover, &:focus, &:active {
      color: var(--link-hover-color);
    }

    span {
      font-size: 32px;
      height: auto;
      width: auto;
    }
  }
}

//
// Template Configure page
// -------------------------
.com_config {
  .hr-condensed {
    display: none;
  }

  #templates-form {
    .btn-toolbar {
      display: none;
    }
  }

  #page-site {
    h1 {
      font-size: $font-size-lg;
      @extend .alert;
      @extend .alert-success;
    }
  }
}


//
// Login
// -------------------------
.login-wrap {
  margin: $grid-gutter-width auto;
  max-width: 100%;
  width: 544px;

  .page-header {
    text-align: center;

    h1 {
      font-size: $font-size-base * 2.8;
      font-weight: 400;
      letter-spacing: -0.02em;
      line-height: 56px;
      margin-top: 0;
      margin-bottom: $grid-gutter-width/2;
      text-transform: none;
    }
  }

  // Description
  .login-description {
    color: var(--gray-700);
    font-size: $font-size-base*1.2;
    line-height: $grid-gutter-width;
    margin-bottom: $grid-gutter-width*2;
    text-align: center;
  }

  label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--heading-color);
  }

  div.control-group {
    margin-bottom: $spacer-lg;
  }

  .login-remember {
    label {
      font-weight: 400;
      margin-bottom: 0;
    }

    // Checkbox remember
    #remember {
      height: auto;
    }
  }

  // Button
  .login-submit {
    button[type=submit] {
      margin-top: $spacer-lg;
    }
  }

  // Other Link
  .other-links {
    margin: 0 auto;
    max-width: 100%;
    text-align: center;
    width: 100%;
    
    ul {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      margin: 0;
      padding: 0;
      width: 100%;

      li {
        width: auto;
        margin-bottom: $grid-gutter-width/4;

        a {
          border-bottom: 1px solid var(--border-color);
          color: var(--body-text-color);
          display: inline-block;

          // Hover
          &:hover {
            color: var(--body-link-color);
            border-color: var(--body-link-color);
          }
        }

        &:last-child {
          width: 100%;
          margin-bottom: 0;

          a {
            margin-left: 6px;
            //color: var(--body-link-color);
          }
        }
      }
    }
  }
}

//
// Log out
// -------------------------
.logout {
  text-align: center;

  .page-header {
    display: none;
  }

  .control-group {
    margin: 0;

    .controls {
      margin: 0;
    }
  }
}

// Registation
// ------------------------
.registration {
  margin: $grid-gutter-width auto;
  max-width: 100%;
  width: 544px;

  #member-registration {
    position: relative;

    .txt-desc {
      padding-top: 72px;

      p {
        color: var(--gray-700);
        font-size: $font-size-base*1.2;
        line-height: 32px;
        margin-bottom: $grid-gutter-width*2;
        text-align: center;
      }
    }

    .field-spacer {
      display: none;
    }

    fieldset {
      margin-bottom: 0;

      +fieldset {
        margin-top: $grid-gutter-width/2;
      }

      &:before {
        height: 1px;
        background: var(--border-color);
      }

      legend {
        background: var(--light-reverse);
        color: var(--heading-color);
        letter-spacing: -0.02em;
      }

      &:first-of-type {
        position: static;
        padding-top: 0;

        &:before {
          display: none;
        }

        legend {
          //background: var(--light-reverse);
          //color: var(--heading-color);
          font-size: $font-size-base*2.8;
          font-weight: 400;
          left: 50%;
          //letter-spacing: -0.02em;
          line-height: 56px;
          position: absolute;
          text-align: center;
          text-transform: none;
          top: 0;
          transform: translateX(-50%);
          width: 100%;
        }
      }
    }
  }

  // Control Form
  div.control-group {
    display: flex;
    flex-direction: column;
    margin-bottom: $spacer-lg;

    &.hidden {
      display: none;
    }

    div.controls {
      margin-left: 0;

      #jform_terms_terms,
      #jform_profile_tos {
        padding-left: 0;

        .radio {
          padding: 0;

          .form-check {
            padding: 0;
            margin-right: 1rem;
          }
        }

        label {
          margin-right: 8px;
        }
      }
    }

    div.control-label {
      padding: 0;

      label {
        color: var(--heading-color);
        font-weight: 600;
        margin-bottom: 8px;
      }
    }
  }

  .input-append {
    .btn,
    input[type="text"],
    &.input-append .media-preview.add-on {
      height: 64px;
      
      // Mobile view
      @include media-breakpoint-down(sm) {
        padding-left: $grid-gutter-width / 2;
        padding-right: $grid-gutter-width / 2;
      }
    }

    input[type="text"],
    &.input-append .media-preview.add-on {
      line-height: 64px;
      padding-top: 0;
      padding-bottom: 0;
    }

    input[type="text"].field-media-input {
      max-width: 100px;
      @include media-breakpoint-up(sm) {
        max-width: 100%;
      }
    }
  }

  .control-group .form-control {
    max-width: 100%;
  }

  .com-users-registration__submit {
    .com-users-registration__cancel {
      background: var(--gray-200);
      margin-left: $grid-gutter-width/2;

      &:hover {
        background: var(--gray-300);
      }
    }
  }

  .link-login {
    span.txt {
      color: var(--gray-700);
    }

    a {
      border-bottom: 1px solid var(--border-color);
      color: var(--body-link-color);
      display: inline-block;
      margin-left: 6px;

      &:hover {
        border-color: var(--body-link-color);
      }
    }
  }

  // User Info
  .userinfo {
    .btn-group {
      display: flex;
      flex-direction: column;
    }

    .btn-mini {
      color: rgba(255,255,255,0.8);
      font-weight: 400;
      padding: 0 4px;
      margin: 0;
      height: auto;
      width: auto;

      span {
        margin:0;
      }
    }
  }

  // Table on mobile
  .subform-repeatable-wrapper {
    @include media-breakpoint-down(sm) {
      overflow: auto;

      .subform-repeatable {
        min-width: 500px;
      }
    }
  }
  
}

// Profile
// ------------------------
.profile.profile {
  max-width: 100%;
  margin: auto;
  width: 750px;

  legend {
    font-size: var(--h3-font-size);
    text-transform: none;
    font-weight: 500;
    position: static;
    margin-bottom: $grid-gutter-width/2;
  }

  .btn-toolbar {
    float: right;
    margin: 0 0 0 16px;

    .icon-user {
      margin-right: 4px;
    }

    a.btn {
      height: $spacer*3;
      padding: 12px 16px;
    }
  }

  fieldset {
    margin-bottom: $spacer-lg;

    &:last-of-type {
      margin-bottom: 0;
    }

    dt {
      // Mobile view
      @include media-breakpoint-down(xs) {
        text-align: left;
        margin-top: $grid-gutter-width/2;
      }
    }

    dd, dt {
      @include media-breakpoint-down(xs) {
        padding-top: 0;
        padding-bottom: 0;
      }
    }
  }
}

// Reset
// ------------------------
div.com-users-reset,
div.com-users-remind {
  background: transparent;
  max-width: 500px;
  margin: 0 auto;
  padding: 0;

  fieldset {
    >p {
      color: var(--gray-700);
      font-size: $font-size-base*1.2;
    }
  }

  form:not(.form-no-margin) .control-group {
    .control-label {
      float: none;

      label {
        font-weight: 600;
      }
    }

    .controls {
      margin-left: 0;

      input {
        max-width: 100%;
      }
    }
  }
}

.hidden-social {
  .sharing-tool {
    display: none;
  }

  .article-title {
    text-align: center;
  }

  .com-content-article__body {
    padding-left: 0 !important;
  }
}

#acym_wrapper {
  margin: 0 auto;
  max-width: 100%;
  width: 480px;

  // Portrait phones
  @include media-breakpoint-down(xs){
    padding: $grid-gutter-width/2;
  }

  legend {
    font-size: var(--h5-font-size);
    color: var(--heading-color);
    font-weight: 600;
  }

  #acyuserinfo {
    .onefield {
      >.cell {
        width: 100%;
        margin-bottom: $grid-gutter-width/2;

        .acym__users__creation__fields__title {
          margin-bottom: 6px;
        }

        input {
          width: 100%;
          height: $input-height;
          border-radius: $border-radius;
          border: 1px solid var(--border-color);
          padding: 10px;
          //background: $white;
        }
      }
    }
  }

  #acyusersubscription {
    .acym_list {
      .acym_radio_group  {
        label {
          margin-right: $grid-gutter-width/4;
        }
      }
    }
  }

  .acymodifybutton {
    margin: $grid-gutter-width/2 0 0;
  }
}

.com-content-archive {
  .page-header {
    h2 {
      font-size: var(--h5-font-size);
      margin: $grid-gutter-width/2 0 $grid-gutter-width/4;
    }
  }

  .filter-search {
    .form-select {
      height: 64px;
      padding: 8px 12px;
    }
  }

  .com-content-archive__navigation {
    .com-content-archive__pagination {
      ul.pagination {
        justify-content: flex-start;
      }
    }
  }

  .filter-search {
    button.btn {
      // Portrait phones
      @include media-breakpoint-down(xs){
        margin-top: 8px;
        padding: $grid-gutter-width/2 $grid-gutter-width;
      }  
    }
  }
}

.footer-layouts {
  background: #f5f5f5;
  padding: 0 $grid-gutter-width $grid-gutter-width;

  // Landscape phones
  @include media-breakpoint-down(sm) {
    padding: 0 $grid-gutter-width/2 $grid-gutter-width/2;
  } 

  #t4-header {
    margin: 0 (-$grid-gutter-width);

    // Landscape phones
    @include media-breakpoint-down(sm) {
      margin: 0 (-$grid-gutter-width/2);
    } 
  }

  .t4-content {
    background: transparent;
  }

  [class^="t4-footer-"], [class*="t4-footer-"] {
    background: var(--body-bg-color);
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
    margin-top: $grid-gutter-width;
  }
}

.article-index {
  background: transparent;
  border: 1px solid var(--border-color);

  @include media-breakpoint-down(sm) {
    width: 100%;
  }

  ul {
    li {
      border-color: var(--border-color);

      &.active {
        a {
          color: var(--body-link-hover-color);
        }
      }

      &:last-of-type {
        border: none;
      }
    }
  }
}

// Footer
.footer-logo {
  display: flex;
  justify-content: flex-end; 
  p {
    margin: 0;
  }
}