/*
 Theme Name:   Medizinpopulaer
 Theme URI:    https://generatepress.com
 Description:  Medizinpopulär child theme
 Author:       Alexander Stingl
 Author URI:   https://www.lifeit.at
 Template:     generatepress
 Version:      1.0
*/

/* ==================== Index ====================
   - Navigation
   - Ads and Banners
   - Front Page
   - Custom Category Archive
   - Small Posts
   - List Posts
   - Pagination
   - Single Posts
   - Search Modal
   - Search Results Page
   - Content
   - Simple TOC
   - Custom Related Posts Styling
   - Sidebar
   - Forms
   - Ripple Effect
   - Media Queries
   =========================================== */

/* =================  Navigation ================= */

.inside-navigation.grid-container {
  padding: 0 !important;
}

.shiftnav-submenu-activation {
  content: url("data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%20512%20512%22%20class%3D%22chev%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M328%20112%20184%20256l144%20144%22%20stroke-width%3D%2236%22%20stroke-linejoin%3D%22square%22%20stroke-linecap%3D%22square%22%20stroke%3D%22%23fff%22%20fill%3D%22none%22%2F%3E%3C%2Fsvg%3E");
  rotate: 180deg;
}

button.shiftnav-target:before {
  content: url("data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%20512%20512%22%20class%3D%22chev%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M328%20112%20184%20256l144%20144%22%20stroke-width%3D%2236%22%20stroke-linejoin%3D%22square%22%20stroke-linecap%3D%22square%22%20stroke%3D%22%23fff%22%20fill%3D%22none%22%2F%3E%3C%2Fsvg%3E");
  display: inline-block;
  width: 22px;
  height: 22px;
  vertical-align: middle;
  margin-bottom: 2px;
}

/* ================= Ads and Banners ================= */

.medpop-superbanner,
.medpop-frontpage-kachel,
[class^="medpop-sidebar-"] {
  position: relative;
  text-align: center;
}

.medpop-frontpage-kachel {
  display: block;
}

.medpop-adlabel {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--navy);
  padding: 3px 10px;
  background-color: #fff;
  font-family: var(--gp-font--montserrat);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.adv-link {
  margin-bottom: -10px;
}

/* ================= Front Page ================= */

/* Frontpage Featured */

.front-featured {
  position: relative;
  display: block;
  width: 100%;
  height: 445px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  border-bottom: 4px solid var(--magenta);
}

.front-featured .image-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.front-featured .image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/*
.front-featured {
  display: block;
  position: relative;
  width: 100%;
  height: 445px;
  background-size: cover;
  background-position: center;
  text-decoration: none;
  color: inherit;
  border-bottom: 4px solid var(--magenta);
}
*/

.front-featured .overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    rgba(49, 65, 89, 1) 0%,
    rgba(77, 88, 105, 0) 90%
  );
}

.front-featured .post-meta {
  position: absolute;
  bottom: 0;
  left: 0;
  color: #fff;
  padding: 20px;
}

.front-featured .post-title {
  font-size: 52px;
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 0;
}

.front-featured .post-date {
  font-size: 14px;
  margin-left: 3px;
  color: var(--base-3);
  padding: 0;
}

.front-featured .post-category {
  font-size: 16px;
  margin-bottom: 10px;
}

.front-featured:hover {
  cursor: pointer;
}

/* Cover Image for Frontpage + Sidebar */

img.cover-image,
.cover-image > img {
  transform: rotate(357deg);
  box-shadow: 0px 4px 15px 9px rgba(0, 0, 0, 0.25);
  margin-bottom: -10px;
  z-index: 10;
  position: relative;
}

/* Front large Posts */

.fp-large-posts-wrapper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding-bottom: 0;
  justify-items: center;
}

.fp-large-posts-wrapper .large-post .post-title {
  padding-bottom: 0;
}

.fp-large-posts-wrapper .large-post.large-post.inside-article {
  gap: 5px;
}

.fp-large-posts-wrapper .post-date {
  color: var(--base-3);
  margin: 0px auto 20px 20px;
}

#fp-advertorial {
	margin-bottom: 15px;
}

/* Werbebanner Frontpage Abstand unten FIX */
a.a2t-link {
	display: block;
	font-size: 0;
}

/* ================ Custom Category Archive ================ */

.large-post {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  max-width: 420px;
  width: 100%;
}

.post-thumbnail {
    width: 100%;
  height: 280px;
  overflow: hidden;
  position: relative;
}

.large-post .post-thumbnail::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.5);
  z-index: 5;
  transition: background-color 0.3s ease;
}

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

.post-thumbnail img,
.post-thumbnail picture {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  position: relative;
  z-index: 2;
}

/* Styling for large posts in two-column layout */

.large-posts-wrapper {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding-bottom: 10px;
}

.large-post.inside-article {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  background-color: var(--navy);
  text-decoration: none;
  color: inherit;
  padding: 0 !important;
}

.large-post .post-thumbnail {
  margin: 0;
}

.large-post .post-thumbnail img {
  width: 100%;
  flex-shrink: 0;
  display: block;
  margin: 0;
  padding: 0;
}

.large-post .post-title {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
  padding: 10px 20px 20px;
  color: var(--base-3);
}

/* ================== Small Posts ================== */

.post-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.post-title {
  font-size: 1.5em;
  margin: 0;
  flex-grow: 1;
  padding-right: 20px;
}

.post-date {
  font-size: 14px;
  color: var(--navy);
  white-space: nowrap;
  margin-left: auto;
  padding-right: 20px;
}

/* ================== List Posts ================== */

.list-posts-wrapper {
  padding-top: 20px;
  border-top: 3px solid var(--magenta);
  margin-bottom: 30px;
}

.list-post.inside-article {
  display: flex;
  gap: 15px;
  padding: 5px 0 !important;
  align-items: center;
  border-bottom: 1px solid var(--contrast-3);
  justify-content: flex-start;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.3s ease;
}

.list-post:hover .post-title {
  text-decoration: none;
}

.list-post:hover {
  background-color: #f9f9f9;
}

.list-post-content {
  flex-grow: 1;
}

.list-post .post-thumbnail {
  flex-shrink: 0;
  width: 210px;
  height: 100px;
}

.list-post .post-thumbnail img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.list-post .post-title {
  font-size: 24px;
  font-weight: 600;
  margin: 0;
  text-align: left;
  padding-right: 20px;
}

.post-thumbnail.placeholder {
  background-color: #f0f0f0;
}

/* ================= Pagination ================= */

.pagination {
  display: flex;
  justify-content: center;
  margin: 40px 0;
  gap: 10px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 10px 15px;
  font-size: 16px;
  color: var(--base-3);
  background-color: var(--navy);
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.pagination .current {
  background-color: var(--magenta);
  color: #fff;
  font-weight: bold;
}

.pagination a:hover {
  background-color: var(--magenta);
  color: #fff;
}

.pagination .disabled {
  color: #ccc;
  background-color: var(--navy);
  cursor: not-allowed;
  pointer-events: none;
}

/* ================= Single Posts ================= */

.featured-image.page-header-image-single {
  margin-right: -20px !important;
  margin-bottom: 1.5em !important;
}

.related-list-posts-container {
  max-width: 1220px;
  margin: 0 auto;
}

.related-list-posts-container .list-posts-wrapper {
  border-top: none;
}

.list-post.related-article {
  display: flex;
  gap: 15px;
  padding: 5px 0 !important;
  align-items: center;
  border-bottom: 1px solid var(--contrast-3);
  justify-content: flex-start;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.3s ease;
}

.related-list-heading {
  text-transform: uppercase;
  padding: 20px 20px 0;
  font-size: 26px;
}

/* =================== Search Modal =================== */

.search-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.5s ease-in-out;
}

.search-modal-content {
  margin: 10% auto;
  padding: 20px;
  width: 90%;
  max-width: 600px;
  background-color: transparent;
  border-radius: 0;
  position: relative;
  opacity: 0;
  animation: fadeInContent 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInContent {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-search-wrap {
  margin: 20px !important;
}
/* ================= Search Results Page ================= */

.search-title {
  padding: 0 20px;
}

/* =================== Content =================== */

ol,
ul {
  margin: 0 0 1.5em 1.5em;
}

/* =================== Simple TOC =================== */

.simpletoc {
  background-color: var(--base);
  padding: 20px;
  margin: 0 -20px 30px -20px;
}

.simpletoc-title {
  text-decoration: underline;
  margin-bottom: 10px;
}

ul.simpletoc-list {
  margin: 0;
}

ul.simpletoc-list li {
  line-height: 1.6;
  margin-bottom: 5px;
}

.simpletoc a {
  font-family: var(--gp-font--montserrat);
  font-weight: 700;
  font-size: 22px;
}

/* Single Posts */

.post-cat-label {
  display: inline-block;
  font-family: var(--gp-font--montserrat);
  font-weight: 500;
  font-size: 22px;
  padding: 5px 10px;
  background-color: var(--navy);
  color: var(--base-3);
  text-decoration: none;
  text-transform: uppercase;
  margin-bottom: 30px;
}

.post-cat-label:hover {
  color: var(--base-3);
}

.post .featured-image {
  margin-left: -20px;
}

/* ======== Custom Related Posts Styling ======== */

h3.crp-list-title {
  padding: 20px 20px 0;
  border-top: 3px solid var(--magenta);
  margin-top: 20px;
  text-transform: uppercase;
  font-size: 26px;
}

ul.crp-list {
  list-style: none;
  padding: 10px 0 40px;
  margin: 20px 0 0;
  border-bottom: 3px solid var(--magenta);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

li.crp-list-item {
  max-width: 417px;
  background-color: var(--navy);
  margin: 0 !important;
  width: 100%;
}

.crp-list-item-title {
  font-family: var(--gp-font--montserrat);
  font-weight: 500;
  padding: 20px;
}

.crp-list-item-title a {
  color: var(--base-3);
}

.crp-list-item-title a:hover {
  text-decoration: none;
}

.crp-list-item {
  position: relative;
}

.crp-list-item-image {
  position: relative;
}

.crp-list-item-image img {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  z-index: 2;
}

.crp-list-item-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.5);
  z-index: 5;
  transition: background-color 0.3s ease;
  pointer-events: none;
}

.crp-list-item:hover .crp-list-item-image::before {
  background-color: rgba(255, 255, 255, 0);
}

.crp-list-item:has(.crp-list-item-image) .crp-list-item-title {
  position: static;
  padding-top: 20px;
}

.crp-list-item:not(:has(.crp-list-item-image)) .crp-list-item-title {
  padding-top: 287px;
}

/* =============== Sidebar =============== */

.sidebar-wrap {
  display: grid;
  row-gap: 5px;
  column-gap: 10px;
  /* justify-content: center; */
}

/* =============== Forms =============== */

label,
input,
textarea,
select {
  font-family: var(--gp-font--montserrat) !important;
}

.wpforms-container input[type="text"],
.wpforms-container input[type="email"] {
  padding: 5px 10px;
}

.wpforms-container input[type="radio"] {
  width: 18px;
  height: 18px;
}

.wpforms-container input[type="checkbox"] {
  width: 20px;
  height: 20px;
}

.wpforms-field-limit-text {
  display: none;
}

.wpforms-container .radio-text-bold .wpforms-field-label {
  margin-bottom: 10px !important;
}

.wpforms-container .radio-text-bold .wpforms-field-label-inline {
  font-weight: 600;
}

.wpforms-field.wpforms-field-gdpr-checkbox
  .wpforms-field-required
  .wpforms-field-label-inline {
  font-size: 18px;
}

.wpforms-submit {
  font-family: var(--gp-font--montserrat) !important;
  font-weight: 500 !important;
}

/* =============== Ripple Effect =============== */

button,
.button,
.gb-button,
.front-featured,
.large-post,
.list-post {
  position: relative;
  overflow: hidden;
}

.ripple {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  width: 5px;
  height: 5px;
  animation: rippleEffect 0.3s 1;
  opacity: 0;
  z-index: 999;
}

@keyframes rippleEffect {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(100);
    opacity: 0;
  }
}

/* =============== Media Queries =============== */
@media (min-width: 460px) and (max-width: 768px) {
  .sidebar-wrap {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 767px) {
  .fp-large-posts-wrapper,
  .large-posts-wrapper,
  ul.crp-list {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .list-post .post-content {
    flex-direction: column;
    align-items: flex-start;
  }
  .list-post .post-date {
    margin: 0 auto 0 0;
    font-size: 12px;
  }
  .list-post .post-title {
    margin-bottom: 5px;
  }
}

@media (max-width: 768px) {
  .home .front-featured .post-title {
    font-size: 28px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 0;
  }

  .featured-image.page-header-image-single {
    margin-left: -10px !important;
    margin-right: -10px !important;
  }

  .simpletoc {
    margin: 0 -10px 30px -10px;
  }

  ul.simpletoc-list li {
    line-height: 1.2;
    margin-bottom: 12px;
  }

  .simpletoc a {
    font-family: var(--gp-font--montserrat);
    font-weight: 700;
    font-size: 18px;
  }

  .list-post .post-title {
    font-size: 16px;
  }

  .list-post .post-thumbnail img {
    width: 160px;
    height: auto;
  }
  .list-post .post-thumbnail {
    flex-shrink: 0;
    width: 160px;
    height: 76px;
  }

  .pagination {
    gap: 10px;
    flex-wrap: wrap;
  }

  .pagination a,
  .pagination span {
    padding: 16px 20px;
  }

  h3.crp-list-title,
  .related-list-heading {
    padding-left: 10px;
    padding-right: 10px;
  }
  /* Reordering first sidebar two elements */
  .sidebar-wrap > :nth-child(1) {
    order: 2;
  }

  .sidebar-wrap > :nth-child(2) {
    order: 1;
  }
  /* Ensure all other elements follow in natural order */
  .sidebar-wrap > :nth-child(n + 3) {
    order: 3;
  }
}

@media screen and (min-width: 768px) and (max-width: 1024px) {
  .home .front-featured .post-title {
    font-size: 40px;
  }
  .fp-large-posts-wrapper,
  .large-posts-wrapper,
  ul.crp-list {
    grid-template-columns: 1fr 1fr;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
  }
}
@media (max-width: 1023px) {
  .main-nav > ul,
  .menu-bar-items {
    display: none !important;
  }
}



@media (min-width: 1024px) {
  .shiftnav-toggle {
    display: none !important;
  }

  nav .main-nav .mega-menu {
    position: static;
  }

  nav .main-nav .mega-menu > ul {
    position: absolute;
    width: 100%;
    left: 0 !important;
    display: flex;
    flex-wrap: wrap;
    padding: 20px 0;
  }

  nav .main-nav .mega-menu > ul > li > a {
    font-weight: bold;
  }

  nav .main-nav .mega-menu > ul > li {
    display: inline-block;
    width: 25%;
    vertical-align: top;
  }

  nav .main-nav .mega-menu > ul > li:hover > a,
  nav .main-nav .mega-menu > ul > li:focus > a,
  nav .main-nav .mega-menu > ul > li[class*="current-"] > a,
  nav .main-nav .mega-menu ul ul {
    background-color: transparent !important;
    color: var(--magenta);
  }

  nav .main-nav .mega-menu ul .sub-menu {
    position: static;
    display: block;
    opacity: 1;
    visibility: visible;
    width: 100%;
    box-shadow: 0 0 0;
    left: 0;
    height: auto;
    pointer-events: auto;
    transform: scale(1);
  }

  nav .main-nav .mega-menu ul.toggled-on .sub-menu {
    pointer-events: auto;
  }

  nav
    .main-nav
    .mega-menu
    .sub-menu
    .menu-item-has-children
    .dropdown-menu-toggle {
    display: none;
  }
}

@media (max-width: 1024px) {
  #fp-advertorial,
  #fp-quiz {
    padding-bottom: 46px;
  }
}
