/**
 * Theme Name: Aglaia Szyszkowitz - Blocksy Child
 * Description: Custom theme for Aglaia Szyszkowitz official website based on Blocksy
 * Author: YK
 * Template: blocksy
 * Text Domain: aglaia
 */

:root {
  ----menu-item-height:20%;
}

body, html {
	background-color:var(--theme-palette-color-4);
}

/* Disable scroll completely on mobile */
@media screen and (max-width:480px) {
	body.home,
	body.page-id-655,
	body.page-id-2 {
		position: fixed;
		overflow: hidden;
		width: 100%;
		height: 100%;
	}
	
}

[class*=ct-container] > article {
	box-shadow:none!important;
}



/* Hack: Get the slider in order so that it shows the image as full screen cover */
.swiper-slide-inner.prvi-slide,
.hcslider .swiper-slide-inner {
	height:100vh!important;
	min-height:100vh!important;
	transition:none;
}
.swiper-slide-inner.prvi-slide .slider-content-zone,
.hcslider .swiper-slide-inner .slider-content-zone  {
	width:100vw!important;
	height:100vh!important;
	transition:none;
}
.swiper-slide-inner.prvi-slide .wp-block-greenshift-blocks-image,
.swiper-slide-inner.prvi-slide .wp-block-greenshift-blocks-image img,
.hcslider .swiper-slide-inner .wp-block-greenshift-blocks-image,
.hcslider .swiper-slide-inner .wp-block-greenshift-blocks-image img {
	width:100vw!important;
	height:100%!important;
	transition:none;
}


/* ============================
Scrollable
============================ */

.scrollable-wrap {
	width:auto;
	height:auto;
	
}
.scrollable {
	overflow-y:visible;
}

@media screen and (min-width:481px) {
	.scrollable-wrap {
		display:block;
		height:100vh;
		display:flex;
		flex-direction:column;
		
	}
	.scrollable {
		position: relative;
		min-height: 0;                 /* ključno pri grid/flex, da omogoči scroll */
		box-sizing: border-box;
	  	overflow-y: scroll;      /* omogoči vertikalni scroll */
		scrollbar-width: thin;
		scrollbar-color: #d79a6f transparent; /* Firefox */
		background-color:#191919;
		mask-image: linear-gradient(to bottom, black 65%, transparent);
		padding-bottom:100px;
	}
	
	/* Chrome / Safari / Edge */
	.scrollable::-webkit-scrollbar {
	  width: 6px;
	  background: transparent; /* brez tracka */
	}
	
	.scrollable::-webkit-scrollbar-thumb {
	  background-color: #d79a6f; /* accent barva */
	  border-radius: 3px;
	}
	
	.scrollable::-webkit-scrollbar-thumb:hover {
	  background-color: #e1ad83; /* malo svetlejši ob hoverju */
	}
	
	.scrollable::-webkit-scrollbar-track {
	  background: transparent; /* odstrani siv trak */
	}
}


/* ============================
Header menu 1
============================ */
#header [class*=header-menu] .menu {
	height:40px;
}
#header .ct-container-fluid {
	padding:0 3vw;
	width:100vw!important;
}

/* ============================
Footer
============================ */
#footer {
	position:fixed;
	bottom:0;
	left:0;
	width:100%;
	background:none;
	z-index:8888;
}
#footer,
#footer a,
.ct-footer-copyright {
	color:white!important;
}
#footer a:hover {
	color:var(--theme-palette-color-2)!important;
}

[data-footer*="type-1"] .ct-footer [data-row*="bottom"] > div {
	padding-left:1.4vw;
	padding-right:1.4vw;
}

/* ============================
GALLERY GRID - CUSTOM LAYOUT
============================ */

body .wp-block-gallery-custom {
  display: grid !important;
  grid-template-columns: repeat(12, 1fr) !important;
  grid-auto-rows: 150px !important;
  grid-auto-flow: dense !important; /* ← DODAJ TO */
  gap: 12px !important;
  /*max-width: 800px !important;*/
  margin: 0 auto !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

body.page-id-25 .wp-block-gallery-custom {
	grid-auto-rows: 350px !important;
}


/* posamezna slika (figure) */
body .wp-block-gallery-custom figure.wp-block-image {
  margin: 0 !important;
  overflow: hidden !important;
  border-radius: 12px !important;
  position: relative !important;
  height: auto !important; /* JS določa višino */
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

/* slike same */
body .wp-block-gallery-custom img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  transition: transform 0.4s ease !important;
}

/* hover efekt */
body .wp-block-gallery-custom img:hover {
  /*transform: scale(1.05) !important;*/
}

/* ============================
GALLERY GRID - RESPONSIVE BREAKPOINTS
============================ */

/* --- tablet (<= 900px) --- */
@media (max-width: 900px) {
  body .wp-block-gallery-custom {
    grid-template-columns: repeat(6, 1fr) !important;
    grid-auto-rows: 220px !important;
  }
}

/* --- mobile (<= 600px) --- */
@media (max-width: 600px) {
  body .wp-block-gallery-custom {
    grid-template-columns: repeat(2, 1fr) !important;
    grid-auto-rows: 180px !important;
    gap: 8px !important;
    max-width: 100% !important;
    padding: 0 8px !important;
  }

  body .wp-block-gallery-custom figure.wp-block-image {
    border-radius: 8px !important;
  }
}
@media (max-width: 600px) {
  body .wp-block-gallery-custom {
    grid-template-columns: repeat(3, 1fr);
  }
}


h1.aglaia-page-title,
h2.aglaia-page-title {
    text-transform: uppercase;
    font-size: clamp(32px, 2.12vw, 52px);
	line-height: 100%;
    font-weight: 400 !important;
    color: var(--wp--preset--color--palette-color-2, var(--theme-palette-color-2, #DBA182));
    margin-top: 0;
    margin-right: 0;
    margin-bottom: 25px;
    margin-left: 3vw;
    padding: 0;
}

/* ============================
LATEST TERMIN @ Homepage
============================ */
.latest-termin * {
	font-size:18px;
	font-weight:300;
	text-transform:uppercase;
}
.latest-termin h2.latest-termin-title {
	font-size:18px;
	font-weight:300;
	color:white;
	margin:0;
	padding:0;
}
.latest-termin a {
	text-decoration:underline;
}

/* ============================
TERMIN OVERLAY
============================ */

#termin-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  overflow-y: auto;

  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0s linear 0.5s;
}

#termin-overlay.visible {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.15s ease;
}
@media screen and (min-width:769px) {
	#termin-overlay .overlay-content {
	  width: calc(100vw - 100px);
	  height:calc(100vh - 110px);
	  overflow:hidden;
	  overflow-y:hidden;
	  margin: 50px auto 60px auto;
	  background: #fff;
	  color: #111;
	  padding: 0px;
	  border-radius: 0px;
	}
}
#termin-overlay .overlay-close {
  position: fixed;
  top: 72px;
  right: 72px;
  width: 60px;
  height: 60px;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  border-radius:0px;
  transition:all 0.3s ease;
}
#termin-overlay .overlay-close::before,
#termin-overlay .overlay-close::after{
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;     /* dolžina črtice */
  height: 4px;     /* debelina črtice */
  background: #000;
  transform-origin: center;
}
#termin-overlay .overlay-close::before{ transform: translate(-50%,-50%) rotate(45deg); }
#termin-overlay .overlay-close::after { transform: translate(-50%,-50%) rotate(-45deg); }

#termin-overlay .overlay-close:hover::before,
#termin-overlay .overlay-close:hover::after {
	background:var(--theme-palette-color-2); /* bronze */
}

#termin-overlay .overlay-close:hover {
	/*background:var(--theme-palette-color-2); /* bronze */
}


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


.termin-overlay-inner {
	position:relative;
	height: 100%;
	min-height: 100%;
	/*background:blue;*/
}
@media screen and (min-width:769px) {
	.termin-overlay-left,
	.termin-overlay-right {
	  /*flex: 0 0 50%;*/
	  width: 50%;
	  max-width: 50%;
	  height:100%;
	  min-height: 100%;     /* <- prisili raztezanje po višini parenta */
	  box-sizing: border-box;
	  position:absolute;
	  top:0;
	}
	
	.termin-overlay-left {
		left:0;
		background-color: #777; /* da je viden tudi brez slike */
	}
	
	.termin-overlay-right {
		left:50%;
		padding:40px 40px 60px;
		/*background:#efefef;*/
		overflow-y:scroll;
		scrollbar-width: thin;
		scrollbar-color: #333 transparent; /* Firefox */
		/*mask-image: linear-gradient(to bottom, #fff 85%, transparent);*/
		
		/* višine fade efektov */
	  	--fade-top: 0px;
	  	--fade-bottom: 60px;
	  	
	  	/* en sam gradient s kombinacijo obeh fadeov */
	  	-webkit-mask-image: linear-gradient(
	  	  to bottom,
	  	  transparent 0,
	  	  #FFF var(--fade-top),
	  	  #FFF calc(100% - var(--fade-bottom)),
	  	  transparent 100%
	  	);
	  	mask-image: linear-gradient(
	  	  to bottom,
	  	  transparent 0,
	  	  #FFF var(--fade-top),
	  	  #FFF calc(100% - var(--fade-bottom)),
	  	  transparent 100%
	  	);
	
	  	-webkit-mask-repeat: no-repeat;
	  	mask-repeat: no-repeat;
	  	-webkit-mask-size: 100% 100%;
	  	mask-size: 100% 100%;
	}
	/* Chrome / Safari / Edge */
	.termin-overlay-right::-webkit-scrollbar {
	  width: 6px;
	  background: transparent; /* brez tracka */
	}
	
	.termin-overlay-right::-webkit-scrollbar-thumb {
	  background-color: #333; /* accent barva */
	  border-radius: 3px;
	}
	
	.termin-overlay-right::-webkit-scrollbar-thumb:hover {
	  background-color: #333; /* malo svetlejši ob hoverju */
	}
	
	.termine-list::-webkit-scrollbar-track {
	  background: transparent; /* odstrani siv trak */
	}
}

.termin-overlay-left img {
	position:absolute;
	top:0;
	left:0;
	width:100%;
	height:100%;
	min-height:100%;
	object-fit: cover;
	object-position: top;
}

#termin-overlay h2.termin-overlay-title {
	margin:0 0 7px;
	padding:0;
	text-transform:uppercase;
	font-weight:bold!important;
}
#termin-overlay .termin-overlay-meta {
	margin-bottom:5px;
	text-transform:uppercase;
}

#termin-overlay .termin-description {
	color:#333;
	margin-bottom:30px;
}

#termin-overlay .termin-overlay-content,
#termin-overlay .termin-overlay-content * {
	font-size:18px;
	font-weight:300!important;
	color:#333;
}
#termin-overlay .termin-overlay-content strong,
#termin-overlay .termin-overlay-content b {
	font-weight:700!important;
}
#termin-overlay .termin-overlay-content p
{
	padding:0;
	margin:0 0 15px 0;
}

#termin-overlay .wp-block-gallery-custom {
	margin-bottom:30px!important;
}


/**
* PROGRAMME
*/
@media screen and (min-width:769px) {
	
	body.post-type-archive-programm {
		overflow:hidden;
		position:relative;
	}
	
	body.post-type-archive-programm #header {
		position: fixed;
		z-index: 9999;
		/*transform: translateZ(0);*/
		isolation: isolate;
	}
	
	.programme-section {
		opacity:0;
		position: fixed;     /* že vnaprej! */
		top: 0;
		left: 0;
		width: 100%;
		height: 100vh;
		overflow: hidden;
		touch-action: pan-y;
	}
	
	body.post-type-archive-programm article.type-programm {
		/*padding:0!important;*/
	}

	.programme-list {
	  display: flex;
	  height: 100%;
	  width: max-content;
	  gap: 0.5vw;
	  /*overflow-x: auto;*/
	  overflow: visible !important;
	  -webkit-overflow-scrolling: auto !important;
	  overscroll-behavior: contain;
	  scroll-snap-type: x mandatory;
	  padding: 0 2vw;
	  scrollbar-width: thin;
	  scrollbar-color: #b68d6a #1a1a1a;
	  will-change: transform;
	}
	
	.programme-list::-webkit-scrollbar {
	  height: 6px;
	}
	.programme-list::-webkit-scrollbar-track {
	  background: #1a1a1a;
	}
	.programme-list::-webkit-scrollbar-thumb {
	  background: #b68d6a;
	  border-radius: 3px;
	}

	.programm-item {
	  flex: 0 0 25vw;
	  scroll-snap-align: start;
	  overflow: hidden;
	  transition: transform 0.3s ease, border-color 0.2s linear;
	  cursor: pointer;
	  padding:1vw;
	  border:solid 1px rgba(255,255,255,0);
	  border-radius:10px;
	}
	
	.programm-item:hover {
	  border-color: #7A5D4D;
	}

} /* end @media screen and (min-width:769px) */

@media screen and (max-width:768px) {
	body article.type-programm {
		padding:0 0 80px 0;
	}
	.programm-item {
		margin-bottom:30px;
	}
}

.programm-item-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.programm-item img {
  width: 100%;
  /*height:auto;
  aspect-ratio: 2 / 1.7;*/
  height:35vh;
  object-fit: cover;
  display: block;
  margin-bottom:15px;
  border-radius:10px;
}


@media screen and (min-width:1800px) {
	.programm-item img {
	  width: 100%;
	  height:20vw;
	  aspect-ratio: auto;
	}
}
@media screen and (min-width:2000px) {
	.programm-item img {
	  width: 100%;
	  height:24vw;
	  aspect-ratio: auto;
	}
}
@media screen and (max-height:950px) {
	.programm-item img {
		height:30vh;
	}
}
@media screen and (max-height:900px) {
	.programm-item img {
		height:27vh;
	}
}
@media screen and (max-height:850px) {
	.programm-item img {
		height:25vh;
	}
}

.programm-title {
  color: #d4a574;
  font-size:24px;
  text-transform: uppercase;
  margin:0 0 15px 0;
  font-weight: 300;
}
@media screen and (max-height:950px) {
	.programm-title {
		font-size:22px;
	}
}
@media screen and (max-height:900px) {
	.programm-title {
		font-size:20px;
	}
}
@media screen and (max-height:850px) {
	.programm-title {
		font-size:18px;
	}
}

.programm-description {
  color: rgba(255,255,255,0.8);
  font-weight:300!important;
}

.programm-link a {
	display:none;
  color: #b68d6a;
  font-weight: 300;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.programm-link a:hover {
  border-color: #b68d6a;
}

/* Optional: smooth horizontal scroll on wheel */
.programme-list {
  scroll-behavior: smooth;
}

/* Scroll progress bar */
.programme-progress {
  position: fixed;
  top:100%;
  /*bottom: 15%;*/
  left: 3vw;
  width: 94vw;
  height: 8px;
  background: rgba(255,255,255,0.02);
  overflow: hidden;
  padding:1px 0;
}

.programme-progress-bar {
  width: 0%;
  height: 100%;
  background: #7A5D4D; /* tvoj “copper gold” */
  transition: width 0.1s linear;
}
@media screen and (max-width:768px) {
	.programme-progress,
	.programme-progress-bar {
		visibility:hidden;
		opacity:0;
	}
}