/*!
Theme Name: LokalNyt
Theme URI: https://lokal-nyt.dk
Author: Daniel Gæbe Svendsen
Author URI: https://lokal-nyt.dk
Description: LokalNyt Wordpress Theme
Version: 3.6.8
Requires at least: 6.0
Tested up to: 6.3.5
Requires PHP: 7.4
License: GPL version 2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0
Tags: custom-background, custom-colors, featured-images, flexible-header, microformats, post-formats, rtl-language-support, theme-options, translation-ready, accessibility-ready
Text Domain: lokalnyt
*/

.alignnone {
  margin: 5px 20px 20px 0;
}

.aligncenter,
div.aligncenter {
  display: block;
  margin: 5px auto 5px auto;
}

.alignright {
  float: right;
  margin: 5px 0 20px 20px;
}

.alignleft {
  float: left;
  margin: 5px 20px 20px 0;
}

a img.alignright {
  float: right;
  margin: 5px 0 20px 20px;
}

a img.alignnone {
  margin: 5px 20px 20px 0;
}

a img.alignleft {
  float: left;
  margin: 5px 20px 20px 0;
}

a img.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.wp-caption {
  max-width: 96%;
  /* Image does not overflow the content area */
  padding: 5px 3px 10px;
  text-align: center;
}

.wp-caption.alignnone {
  margin: 5px 20px 20px 0;
}

.wp-caption.alignleft {
  margin: 5px 20px 20px 0;
}

.wp-caption.alignright {
  margin: 5px 0 20px 20px;
}

.wp-caption img {
  border: 0 none;
  height: auto;
  margin: 0;
  max-width: 98.5%;
  padding: 0;
  width: auto;
}

.wp-caption p.wp-caption-text {
  font-size: 11px;
  line-height: 17px;
  margin: 0;
  padding: 0 4px 5px;
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 6px; /* Adjust the gap value as needed */
}

.gallery-item {
  flex: 1 1 calc(50% - 5px); /* Calculate the width with gap considered */
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  margin-bottom: 0;
}

.gallery-item a,
.gallery-item a:hover,
.gallery-item a:focus {
  box-shadow: none;
  background: none;
  display: block;
  max-width: 100%;
  min-height: 100%;
}

.gallery-item a img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: filter 0.25s ease;
  backface-visibility: hidden;
}

.gallery-item a:hover img,
.gallery-item a:focus img {
  filter: opacity(70%);
}

.gallery-caption {
  display: block;
  text-align: left;
  padding: 0 10px 0 0;
  margin-bottom: 0;
}

.gallery-columns-1 .gallery-item {
  max-width: 100%;
}

.gallery-columns-2 .gallery-item {
  max-width: 50%;
}

.gallery-columns-3 .gallery-item {
  max-width: 33%;
}

.gallery-columns-4 .gallery-item {
  max-width: 25%;
}

.gallery-columns-5 .gallery-item {
  max-width: 20%;
}

.gallery-columns-6 .gallery-item {
  max-width: 16.66%;
}

.gallery-columns-7 .gallery-item {
  max-width: 14.28%;
}

.gallery-columns-8 .gallery-item {
  max-width: 12.5%;
}

.gallery-columns-9 .gallery-item {
  max-width: 11.11%;
}

.gallery-columns-6 .gallery-caption,
.gallery-columns-7 .gallery-caption,
.gallery-columns-8 .gallery-caption,
.gallery-columns-9 .gallery-caption {
  display: none;
}

/* Post thumbnail and non-gallery images inside posts
/* .post-thumbnail img,
#main-article-content img {
  -webkit-transition: -webkit-filter 0.2s ease-in;
  transition: filter 0.2s ease-in;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Image hover effect for post thumbnail and images
.post-thumbnail img:hover,
.post-thumbnail img:focus,
#main-article-content img:hover,
#main-article-content img:focus {
  cursor: pointer;
  -webkit-filter: brightness(120%);
  filter: brightness(120%);
  -webkit-box-shadow: none;
  box-shadow: none;
  background: none;
  max-width: 100%;
} */

.post-thumbnail {
  display: inline-block; /* Keeps the wrapper tight to the image */
  position: relative; /* To position the pseudo-element */
  cursor: pointer;
}

.post-thumbnail img {
  display: block; /* To allow pseudo-element positioning */
  position: absolute; /* Positioned within the post-thumbnail div */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.post-thumbnail::before {
  content: ""; /* Required for the pseudo-element */
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0);
  transition: background-color 0.2s ease;
  pointer-events: none;
}

.post-thumbnail:hover::before {
  background-color: rgba(255, 255, 255, 0.15);
}

#main-article-content h5{
  line-height: 1.4;
  margin-bottom:16px!important;
}

#main-article-content p:has(img) {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  cursor: pointer;
  height: auto;
  gap: 6px;
}

#main-article-content p:has(img):not(:last-of-type) {
  margin-bottom: 6px;
}

#main-article-content p img {
  margin: 0;
  flex: 1 1 calc(50% - 5px);
  object-fit: cover;
  transition: filter 0.2s ease;
}

#main-article-content p img:hover {
  filter: opacity(85%);
}

.bypostauthor {
  font-weight: bold;
}

/* Text meant only for screen readers. */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

.screen-reader-text:focus {
  background-color: #f1f1f1;
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  color: #21759b;
  display: block;
  font-size: 14px;
  font-size: 0.875rem;
  font-weight: bold;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* SIDEBAR */
.right-sidebar .widget p,
.left-sidebar .widget p,
.blog-sidebar .widget p {
  display: none;
}

.blog-sidebar .widget_custom_user_facebook_widget p {
  display: block;
}
