/*
Theme Name: STL_Theme
Theme URI: https://github.com/elementor/stl-theme/
Description: A custom main theme for STL.
Author: Frikk Jarl
Author URI: https://jarl.no/
Version: 2.0.0
Text Domain: stl-theme
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

main {
  margin-top: -1px;
}

h1 {
  font-size: var(--font-size-4xl);

}

h2 {
  font-size: var(--font-size-3xl);

}

h3 {
  font-size: var(--font-size-2xl);

}

h4 {
  font-size: var(--font-size-xl);

    }

h5 {
  font-size: var(--font-size-lg);

}

/* List Styling */
ol {
    padding-left: 2rem;
    margin: 1rem 0;
    counter-reset: item;
}

ol li {
    display: block;
    position: relative;
    margin-bottom: 0.5rem;
    line-height: 1.6;
    counter-increment: item;
}

ol li:before {
    content: counter(item) ".";
    position: absolute;
    left: -1.5rem;
    font-weight: 500;
    color: inherit;
}

ul {
    padding-left: 2rem;
    margin: 1rem 0;
    list-style-type: disc;
}

ul li {
    position: relative;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Preserve sub-menu styling */
.sub-menu li {
    padding: 0 3rem 0 0;
    margin-bottom: 0;
}

.sub-menu li:before {
    display: none;
}


html {
    margin-bottom: 0 !important;
}

/* BASIC ANIMATION KEYFRAMES */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility improvements */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* Featured Image Gallery with Thumbnails */
.featured-gallery {
    margin-bottom: 40px;
    width: 100%;
    animation: fadeIn 0.5s ease forwards;
}

.featured-gallery-main {
    position: relative;
    width: 100%;
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    background-color: #f8f8f8;
}

.featured-gallery-main img {
    width: 100%;
    height: auto;
    display: block;
    transition: all 0.4s ease;
    object-fit: cover;
}

.featured-gallery-main .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
    color: white;
    padding: 15px;
    font-size: 16px;
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

.featured-gallery-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.gallery-thumbnail {
    flex: 1 0 auto;
    max-width: calc(16.666% - 10px);
    min-width: 80px;
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.gallery-thumbnail img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
    transition: all 0.3s ease;
}

.gallery-thumbnail:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.gallery-thumbnail.active {
    box-shadow: 0 0 0 3px #3498db;
}

.gallery-thumbnail.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(52, 152, 219, 0.2);
}

/* Responsive adjustments for featured gallery */
@media (max-width: 768px) {
    .gallery-thumbnail {
        max-width: calc(25% - 10px);
    }
}

@media (max-width: 480px) {
    .gallery-thumbnail {
        max-width: calc(33.333% - 10px);
    }
    
    .featured-gallery-thumbnails {
        gap: 8px;
    }
}

/* Loading animation for image switching */
.featured-gallery-main.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    animation: spin 1s linear infinite;
    z-index: 10;
}

.featured-gallery-main.loading img {
    opacity: 0.7;
}

/* Minimal styling for WordPress galleries for backward compatibility */
.gallery br {
    display: none;
}

.gallery {
    animation: fadeIn 0.5s ease forwards;
    animation-delay: 0.1s;
}

/* Handle converted galleries */
.wp-gallery-to-featured {
    opacity: 0.1;
    max-height: 0;
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
}

.wp-gallery-to-featured .gallery-item:first-child {
    display: none;
}















/**
 * Styles for wordpress the_content();
 */
.document {
  
  font-weight: 400;
  font-size: 17px;
  line-height: 26px;
}

.document a {
 color: #1C3F94;
 text-decoration: underline;
 font-weight: 500;
 font-size: 17px;
 line-height: 25px;
}

.document a:hover {
 text-decoration: none;
}

.document p {
  /* padding: 12px 0; */
  margin: 24px 0;
  padding: 0;
  font-weight: 400;
  font-size: 17px;
  line-height: 26px;
}

.document h1 {
  padding-top: 36px;
  padding-bottom: 12px;
  margin: 0;

  
  font-weight: 700;
  font-size: 38px;
  line-height: 50px;
}
@media (max-width: 1023px) {
  .document h1 {
    padding-bottom: 8px;

    font-size: 28px;
    line-height: 42px;
  }
}

.document h2 {
  padding-top: 24px;
  padding-bottom: 12px;
  margin: 0;

  
  font-weight: 600;
  font-size: 30px;
  line-height: 42px;
}
@media (max-width: 1023px) {
  .document h2 {
    padding-bottom: 8px;

    font-weight: 700;
    font-size: 28px;
    line-height: 42px;
  }
}

.document h3 {
  padding: 12px 0;
  margin: 0;

  
  font-weight: 600;
  font-size: 20px;
  line-height: 28px;
}
@media (max-width: 1023px) {
  .document h3 {
    padding: 8px;

    font-weight: 600;
    font-size: 18px;
    line-height: 26px;
  }
}

.document h4 {
  padding: 12px 0;
  margin: 0;

  
  font-weight: 600;
  font-size: 18px;
  line-height: 28px;
}
@media (max-width: 1023px) {
  .document h4 {
    padding: 8px 0;
  }
}

.document blockquote {
  padding: 80px 60px;
  margin: 48px 0;
  clear: both;

  background-color: #F4F8FF;
}
@media (max-width: 1023px) {
  .document blockquote {
    padding: 36px 26px;
  }
}

.document blockquote::after {
  display: block;
  content: url('/wp-content/themes/stl-theme/assets/icons/quotes-blue.svg');
  text-align: center;
  padding-top: 25px;
}
@media (max-width: 1023px) {
  .document blockquote::after {
    display: none;
  }
}
@media (max-width: 1023px) {
  .document blockquote::before {
  content: url('/wp-content/themes/stl-theme/assets/icons/quotes-blue.svg');
  padding-bottom: 16px;
  }
}

.document blockquote p {
  padding: 12px 0;


  font-weight: 600;
  font-style: italic;
  font-size: 26px;
  line-height: 39px;
}
@media (max-width: 1023px) {
  .document blockquote p {
    font-size: 18px;
    line-height: 31px;
  }
}

.document blockquote a {
  font-size: 26px;
}

.document ul {
  padding: 12px 0;
  padding-left: 20px;
  margin: 0;
  list-style-type: disc;
  
  font-weight: 500;
  font-size: 17px;
  line-height: 25px;
}
@media (max-width: 1023px) {
  .document ul {
    padding: 8px 0;
    padding-left: 20px;
    list-style-position: inside;
  }
}

.document ol {
  padding: 12px 0;
  padding-left: 20px;
  margin: 0;

  
  font-weight: 500;
  font-size: 17px;
  line-height: 25px;
  list-style-position: inside;
}
@media (max-width: 1023px) {
  .document ol {
    padding: 8px 0;

  }
}

.document li {
  padding: 3px 0;

  font-weight: 400;
}

.document ol > li::marker {
  font-weight: 700;
}

.document table {
  width: 100%;

  
  font-weight: 400;
  font-size: 14px;
  line-height: 26px;
}

.document table td {
  padding: 16px;
}

.document iframe {
  width: 100%;
  min-height: 500px;
}

.document .alignleft {
  float: left;
  margin-right: 22px;
}

.document .alignright {
  float: right;
  margin-left: 22px;
}

.document .aligncenter {
  position: relative;
  left: calc(100% / 2);
  transform: translateX(-50%);
  margin-left: 0;
  margin-right: 0;
}

.document .wp-caption {
  max-width: 100%;
}

.document .wp-caption-text {
  margin: 0px 0px 12px 0px;
  font-size: 14px;
  font-weight: 600;
}

.document .wp-caption img {
  margin-top: 6px;
  margin-bottom: 6px;
}
