/* 
 * Photo & Video Album Grid Styles
 * Plugin: Verein Presse & Content Manager
 * Author: Mountainbike Freiburg e.V. / Florian Breitenberger
 */

/* --------------------- Grid Layout --------------------- */
.mtb-album-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin: 40px 0;
}
@media (max-width: 1024px) {
  .mtb-album-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .mtb-album-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .mtb-album-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------- Album Cards --------------------- */
.album-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s;
}

.page-id-6110 .album-card,
.page-id-467 .album-card {
	background-color: #fff;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.album-card .thumb-wrapper {
  aspect-ratio: 3 / 2;
  position: relative;
  overflow: hidden;
}

.album-card .thumb-wrapper .thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.album-card .info {
  padding: 36px 24px 36px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.cat-event .album-card .info {
	background-color: #fff; */
    background-color: white;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}
.album-card .info h3 {
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.2;
  color: #1a1a1a;
  font-weight: bold;
}
.album-card .info .date,
.album-card .info .credit {
  font-size: 16px;
  font-weight: 700;
  color: #000;
  margin: 0 0 8px;
  line-height: 1.4;
}
.album-card .info .credit {
  font-weight: 400;
  font-size: 18px;
}

.cat-event .info .credit {
    margin-bottom: 2rem;
}

.album-card .btn {
  display: inline-block;
  padding: .4rem 1.2rem;
  border: 1px solid #fff;
  background: transparent;
  color: #000;
  text-decoration: none;
  border-radius: 2px;
  white-space: nowrap;
  width: auto;
  max-width: fit-content;
  margin-top: 1rem;
  pointer-events: none; /* <- Wichtig, damit keine Konflikte im Link */
  font-weight: 700;
}

.cat-event .album-card .btn {
    margin: 0 auto;
    font-weight: 700;
    border: 1px solid #eeece2;
    border-radius: 2px;
    transition: all .2s ease;
}

.page-id-6110 .album-card .btn,
.page-id-467 .album-card .btn {
	border: 1px solid #e8e3d7;
	margin: 2rem auto 0 auto;
}

.mtb-video-open {
	cursor: pointer;
}

/* --------------------- Play Button --------------------- */
.album-card .thumb-wrapper {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  background: #000;
}

.album-card .thumb {
  position: relative;
  width: 100%;
  height: 100%;
}

.album-card .mtb-video-open .thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2); /* dunkler Filter */
  z-index: 1;
}

.album-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.3s ease;
}

.album-card .thumb:hover img {
  transform: scale(1.01);
}

.album-card .play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  transform: translate(-50%, -50%);
  border: 2px solid #fff;
  border-radius: 50%;
  z-index: 2;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.album-card .play-button::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-left: 16px solid #fff;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  margin-left: 2px;
}
/* --------------------- Modal (Kino-Modus) --------------------- */
/* ========================== */
/* 🚧 Final kombiniertes CSS */
/* ========================== */

#mtb-video-modal-grid {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0,0,0,0.85);
}

#mtb-video-modal-grid .modal-content {
  position: absolute;
  top: calc(50% + 41px);
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80vw;
  max-width: 1000px;
  height: auto;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#mtb-video-content-grid {
  width: 100%;
  height: 100%;
}

#mtb-video-content-grid .ratio-16-9 {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
}

#mtb-video-content-grid .ratio-16-9 iframe,
#mtb-video-content-grid .ratio-16-9 video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#mtb-video-close-grid {
  display: none;
  position: fixed;
  top: calc(82px + 60px);
  right: 20px;
  z-index: 9999;
  font-size: 2rem;
  line-height: 1;
  background: transparent;
  color: #fff;
  border: 0;
  cursor: pointer;
}

/* 🔒 Sicherstellen, dass Header drüber bleibt */
body.video-open #site-header {
  background: rgba(0,0,0,0.5) !important;
  z-index: 10000;
}
body.video-open #site-header .site-logo img,
body.video-open #site-header .tool-hamburger .tool svg {
  filter: invert(1) brightness(1.2);
  opacity: 0.5 !important;
}
body.video-open #site-header a,
body.video-open #site-header .menu a,
body.video-open #overlay-menu a {
  color: #fff !important;
  opacity: 1;
}

/* --------------------- Kino-Modus Header --------------------- */
body.video-open #site-header {
  background: rgba(0, 0, 0, 0.5) !important;
  z-index: 10001;
}
body.video-open #site-header .site-logo img,
body.video-open #site-header .tool-hamburger .tool svg {
  filter: invert(1) brightness(1.2);
  opacity: 0.5 !important;
}
body.video-open #site-header a,
body.video-open #site-header .menu a,
body.video-open #overlay-menu a {
  color: #fff !important;
  opacity: 1;
}

/* --------------------- Presse-Download Grid --------------------- */
.pd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin: 20px 0;
}
.pd-item {
  padding: 15px;
}
.pd-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.pd-icon {
  font-size: 64px;
  line-height: 1;
  color: #222;
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  /* NEW */
  display: inline-block;
  background-image: url("data:image/svg+xml,%3Csvg version='1.0' xmlns='http://www.w3.org/2000/svg' width='512.000000pt' height='512.000000pt' viewBox='0 0 512.000000 512.000000' preserveAspectRatio='xMidYMid meet'%3E%3Cg transform='translate(0.000000,512.000000) scale(0.100000,-0.100000)' fill='%23000000' stroke='none'%3E%3Cpath d='M980 5109 c-160 -31 -299 -173 -330 -339 -14 -73 -14 -4347 0 -4420 32 -170 170 -308 339 -340 74 -14 3069 -14 3141 0 170 32 308 170 340 339 6 35 10 683 10 1833 0 1563 -2 1784 -15 1812 -20 42 -1082 1102 -1118 1115 -35 14 -2300 13 -2367 0z m2220 -533 c0 -183 5 -358 10 -387 32 -169 170 -307 340 -339 29 -5 203 -10 386 -10 l334 0 0 -1705 c0 -1218 -3 -1719 -11 -1756 -16 -74 -84 -142 -158 -158 -74 -16 -3008 -16 -3082 0 -74 16 -142 84 -158 158 -16 74 -16 4288 0 4362 15 69 85 143 150 157 27 6 458 10 1117 11 l1072 1 0 -334z m673 -524 c-296 -3 -328 3 -393 67 -64 64 -70 96 -70 394 l0 242 350 -350 350 -350 -237 -3z'/%3E%3Cpath d='M2347 3396 c-126 -47 -190 -152 -207 -341 -18 -188 37 -347 204 -587 l50 -70 -63 -192 c-80 -243 -160 -458 -174 -472 -7 -6 -131 -69 -277 -139 -315 -151 -427 -215 -498 -285 -64 -63 -92 -115 -99 -186 -20 -188 240 -330 439 -241 190 85 390 306 561 618 l36 65 123 42 c143 48 301 90 480 128 l127 27 68 -50 c112 -82 183 -128 270 -173 76 -40 89 -44 152 -42 90 1 138 15 197 55 60 40 95 106 102 192 11 142 -59 228 -216 265 -75 17 -288 15 -402 -4 -52 -9 -100 -16 -107 -16 -32 0 -304 250 -429 396 l-51 59 43 140 c83 265 97 335 91 465 -7 178 -51 275 -147 329 -35 20 -61 25 -139 28 -66 2 -108 -1 -134 -11z m185 -226 c24 -33 35 -165 19 -240 -6 -30 -26 -104 -43 -163 -36 -123 -34 -123 -90 -12 -51 99 -68 161 -68 244 0 93 14 146 46 178 34 34 108 30 136 -7z m162 -1104 l136 -133 -61 -12 c-34 -7 -123 -30 -198 -51 -75 -21 -137 -37 -138 -36 -3 3 118 366 122 366 2 0 64 -60 139 -134z m888 -266 c38 -11 51 -29 41 -57 -9 -26 -23 -33 -67 -33 -38 0 -123 38 -176 80 l-25 20 95 0 c52 0 111 -5 132 -10z m-1618 -412 c-24 -42 -115 -146 -178 -205 -113 -106 -182 -132 -262 -98 l-35 15 17 30 c10 16 38 44 63 62 43 31 378 207 394 208 5 0 5 -6 1 -12z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.pd-content .pd-title {
  display: block;
  font-weight: 600;
  font-size: 1em;
  line-height: 1.2;
  color: #000;
  text-decoration: none;
}
.pd-content .pd-date {
  margin-top: 4px;
  font-size: 0.875em;
  color: #666;
}
.pd-load-more {
  width: 50px;
  height: 50px;
  margin: 20px auto;
  border: 2px solid #ccc;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pd-load-more span {
  font-size: 28px;
  line-height: 1;
  color: #000;
}

/* Modal Wrapper */
.pd-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
}

/* Modal Content */
.pd-modal-content {
  position: relative;
  width: 90%;
  max-width: 1000px;
  height: 90vh;
  background: #000;
  box-shadow: 0 0 20px rgba(0,0,0,0.7);
  border-radius: 8px;
  overflow: hidden;
}

/* --- GLightbox Thumbnail-Bar --------------------------------------------
.mtb-gthumbs{
  position:absolute;
  left:0; right:0; bottom:0;
  display:flex; gap:8px;
  padding:10px 12px;
  background:rgba(0,0,0,.6);
  overflow-x:auto; overflow-y:hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  z-index: 9999; /* über der Bildfläche, unter Controls
}
.mtb-gthumbs::-webkit-scrollbar{ height:8px; }
.mtb-gthumbs::-webkit-scrollbar-thumb{ background:rgba(255,255,255,.25); border-radius:4px; }

.mtb-gthumb{
  border:0 !important;
  padding:0 !important;
  margin:0 !important;
  background:transparent; cursor:pointer;
  border-radius:6px; line-height:0; flex:0 0 auto;
  outline:none;
}
.mtb-gthumb img{
  display:block;
  width:72px; height:48px; /* 3:2; Portrait wird per object-fit sauber gecropped
  object-fit:cover; object-position:center;
  border-radius:6px;
  opacity:.7; transition:transform .15s ease, opacity .15s ease, box-shadow .15s ease;
}
.mtb-gthumb:hover img{ opacity:.95; transform:translateY(-1px); }
.mtb-gthumb.is-active img{
  opacity:1; box-shadow:0 0 0 2px #fff inset, 0 0 0 2px #fff;
}

/* Auf ganz kleinen Screens etwas kleiner
@media (max-width: 480px){
  .mtb-gthumb img{ width:56px; height:38px; }
} */

/* Unsichtbare GLightbox-Anker für Video-Thumbs */
.mtbvm-hidden-glb { 
  display: none !important;
}

/* Sicherheit: keine Credit-Badge auf Video-Thumbnails */
.mtbvm-thumbnail .mtb-credit-badge {
  display: none !important;
}

.mtbvm-thumbnail {
  position: relative;
  display: inline-block;
  cursor: pointer;
  text-decoration: none !important;
}

.mtbvm-responsive-thumbnail {
  display: block;
  height: auto;
  max-width: 100%;
}

.mtbvm-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  pointer-events: none;
}

.mtbvm-play-button::before {
  content: '';
  position: absolute;
  left: 22px;
  top: 17px;
  width: 0;
  height: 0;
  border-left: 18px solid #fff;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
}

/* Sicherheit: keine Credit-Badge auf Video-Thumbs */
.mtbvm-thumbnail .mtb-credit-badge { display: none !important; }

.gslide-description {
  position: relative;
  background-color: rgba(0, 0, 0, 0) !important;
  z-index: 99999;
  pointer-events: none;
  user-select: none;
  max-width: 100%;
  width: 100%;
  text-align: right;
}

.gslide-description .gdesc-inner {
	padding: 0;
	margin: 0;
}

.gslide-description .gslide-title {
	color: rgba(255, 255, 255, 0.5) !important;
	margin: 0;
	padding: 0;
}

.single-photo_album .elementor-button {
	background-color: rgba(0,0,0,0) !important;
    fill: #000000 !important;
    color: #000000 !important;
    border-style: solid !important;
    border-width: 1px 1px 1px 1px !important;
    border-color: #FFFFFF !important;
    border-radius: 2px 2px 2px 2px !important;
}