/* Fixes on top of the restored Nicepage styles. The page is scaled to the window by site.js. */
html, body { overflow-x: hidden; }

/* Header image (Header10.jpg) stays fixed while the page scrolls, so the page
   feels like it is set in the vineyard; the white middle carries the welcome text */
#Kodele.u-parallax {
  background-attachment: fixed;
  background-size: 100% auto;
  background-position: center top;
  background-repeat: no-repeat;
  background-color: #fff;
}
/* On desktop the header fills the whole window until you scroll: the grapes (left) and the
   vineyard (right) of Header10 are separate images (background-image is set in lib.php)
   stretched to the full window height, with the white middle for the text */
@media (min-width: 992px) and (hover: hover) {
  #Kodele.u-parallax {
    background-size: 30% 100%, 30% 100% !important;
    background-position: left top, right top !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    min-height: var(--cms-vh, 100vh);
  }
}
/* Title, welcome text and bottles stay inside the white middle of the header image */
#Kodele .u-layout-col > .u-size-30 > .u-layout-row {
  width: 54%;
  margin-left: auto;
  margin-right: auto;
}
#Kodele .u-text-2 { width: auto; margin-left: 0; margin-right: 0; }
#Kodele .u-line-1 { left: 0 !important; right: 0 !important; width: auto !important; margin: 0 !important; transform: none !important; }

/* Compact header: logo, title, welcome text and bottles all fit on the header image */
@media (min-width: 992px) {
  #Kodele .u-sheet-1 { min-height: 0 !important; padding-bottom: 40px; }
  #Kodele .u-layout-cell-1, #Kodele .u-layout-cell-2, #Kodele .u-layout-cell-3 { min-height: 0 !important; }
  #Kodele .u-image-1 { width: 200px !important; height: 99px !important; margin-top: -45px !important; }
  #Kodele .u-layout-col > .u-size-30:nth-child(2) { margin-top: 22px; }
  #Kodele .u-line-1 { top: 65px !important; }
  #Kodele .u-text-1 { margin-top: 22px !important; }
  #Kodele .u-text-2 { font-size: 0.9rem !important; line-height: 1.4 !important; margin: 14px 0 0 !important; }
  #Kodele .u-container-layout-3 { padding: 0 !important; }
  #Kodele .u-image-2 { height: 220px !important; width: auto !important; margin-top: 8px !important; }
  /* text and bottles sit side by side in the middle, without a gap between them */
  #Kodele .u-layout-col > .u-size-30:nth-child(2) > .u-layout-row { justify-content: center; align-items: center; flex-wrap: nowrap !important; position: relative; left: 70px; }
  #Kodele .u-layout-cell-2 { flex: 1 1 0 !important; min-width: 0 !important; max-width: none !important; }
  #Kodele .u-layout-cell-3 { flex: 0 0 auto !important; max-width: none !important; width: auto !important; }
  #Kodele .u-text-2 { padding: 0 24px 0 100px; font-size: 0.85rem !important; }
}

@media (max-width: 991px) {
  #Kodele .u-layout-col > .u-size-30 > .u-layout-row { width: 100%; }
  #Kodele.u-parallax { background-size: cover; }
}
/* Touch devices don't support fixed backgrounds well */
@media (hover: none) {
  #Kodele.u-parallax { background-attachment: scroll; }
}

/* Language switcher: Nicepage 7 has no styles for the dropdown, so show all three flags in a row */
.u-language-1 .u-language-active { display: none !important; }
.u-language-1 .u-language-dropdown {
  display: flex !important; position: static !important; visibility: visible !important; opacity: 1 !important;
  gap: 10px; padding: 6px 0 !important; margin: 0 !important; background: transparent !important; border: 0 !important; box-shadow: none !important;
}
.u-language-1 .u-language-url { display: block !important; padding: 0 !important; line-height: 0; opacity: .55; transition: opacity .2s, transform .2s; }
.u-language-1 .u-language-url:hover { opacity: 1; transform: scale(1.1); }
.u-language-1 .u-language-url.cms-lang-current { opacity: 1; }
.u-language-1 .u-language-icon {
  display: block !important; width: 34px !important; height: 24px !important; padding: 0 !important; margin: 0 !important;
  border-radius: 3px; overflow: hidden; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); transform: none !important;
}
.u-language-1 .u-language-icon img, .u-language-1 .u-language-icon svg {
  display: block; width: 100% !important; height: 100% !important; object-fit: cover;
}
.u-language-1 .u-language-icon svg { transform: scale(1.4); }
.u-language-1 .u-language-active.u-language-url { display: none !important; }

/* Main menu: the Nicepage "Menu" dropdown has no styles in Nicepage 7, so show the links in a row */
header .menu-collapse, header .u-nav-container-collapse, header .u-nav-1 > li > .u-nav-link { display: none !important; }
header .u-nav-container { display: block !important; }
header .u-nav-1, header .u-nav-1 > li { display: block !important; }
header .u-nav-1 .u-nav-popup {
  display: block !important; position: static !important; visibility: visible !important; opacity: 1 !important;
  background: transparent !important; box-shadow: none !important; border: 0 !important; padding: 0 !important; transform: none !important;
}
header .u-nav-2 {
  display: flex !important; flex-direction: row-reverse; flex-wrap: wrap; gap: 6px;
  margin: 0 !important; padding: 0 !important; list-style: none;
}
header .u-nav-2 > li { display: block !important; margin: 0 !important; }
header .u-nav-2 .u-nav-link {
  display: block !important; padding: 7px 16px !important; border-radius: 20px;
  background: rgba(255, 255, 255, .82) !important; color: #3a2a2e !important;
  font-family: "Playfair Display", Georgia, serif !important; font-size: 15px !important; font-weight: 600; letter-spacing: .5px;
  text-decoration: none; white-space: nowrap; box-shadow: 0 1px 6px rgba(0, 0, 0, .15); transition: background .2s, color .2s;
}
header .u-nav-2 .u-nav-link:hover { background: #fff !important; color: #a8862f !important; }

/* Menu and flags are fixed to the window, above all other content */
header#sec-b43d, header#sec-b43d .u-sheet-1 { transform: none !important; filter: none !important; }
header .u-menu-1 {
  position: fixed !important; top: 16px !important; left: 20px !important; right: auto !important; bottom: auto !important;
  z-index: 2147482000 !important; margin: 0 !important; width: auto !important; height: auto !important;
}
header .u-language-1 {
  position: fixed !important; top: 16px !important; right: 20px !important; left: auto !important; bottom: auto !important;
  z-index: 2147482000 !important; margin: 0 !important; width: auto !important; height: auto !important;
}
.u-language-1 .u-language-dropdown, .u-language-1 .u-language-url, header .u-nav-2 .u-nav-link { pointer-events: auto !important; position: relative; z-index: 2; }

/* Content below the header stays in the white middle, so the side images of the
   backgrounds (e.g. vineyard rows of bg4.jpg in "Vina") show around it */
@media (min-width: 992px) {
  .u-body > section:not(#Kodele):not(#carousel-b84a):not(.u-dialog-section-3) > .u-sheet { width: 68% !important; max-width: 68% !important; }
  .u-body > section .u-sheet .u-group,
  .u-body > section .u-sheet .u-text,
  .u-body > section .u-sheet .u-layout-wrap,
  .u-body > section .u-sheet .u-list,
  .u-body > section .u-sheet .u-image { max-width: 100% !important; }
  .u-body > section:not(#Kodele) .u-sheet .u-text { margin-left: auto !important; margin-right: auto !important; }
  #Vina.u-section-3 {
    background-size: 100% 100% !important;
    background-position: center top !important;
    background-attachment: fixed !important;
  }
}


/* "Vina" contains a second, identical set of wine cards that the original page laid exactly
   on top of the first (margin-top: -2153px); with the narrower layout it no longer lines up */
#Vina .u-layout-wrap-2 { display: none !important; }

/* "Javni razpis" popup: the original box is 1250px tall with its content aligned to the
   bottom, so on a normal screen the top of the text was cut off and could not be scrolled to.
   Centre it in the window, fit it to the window height and let the content scroll from the top. */
section.u-dialog-section-3 { z-index: 2147483000 !important; }
section.u-dialog-section-3.u-dialog-open {
  display: flex !important; align-items: center; justify-content: center; padding: 30px 20px; box-sizing: border-box;
  background: rgba(0, 0, 0, .6) !important;
}
.u-dialog-section-3 .u-dialog-1 {
  width: 1000px !important; max-width: 100%; min-height: 0 !important; margin: auto !important;
  border-radius: 6px; box-shadow: 0 10px 40px rgba(0, 0, 0, .4);
}
.u-dialog-section-3 .u-dialog-1 > .u-container-layout-1 {
  justify-content: flex-start !important; max-height: calc(var(--cms-vh, 100vh) - 60px) !important;
  overflow-y: auto; padding: 60px 50px 30px !important; box-sizing: border-box;
}
.u-dialog-section-3 .u-image-1 { width: 100% !important; max-width: 600px; height: auto !important; margin: 0 auto !important; }
.u-dialog-section-3 .u-text-1 { margin: 20px 0 0 !important; font-size: 0.95rem; line-height: 1.6 !important; text-shadow: none !important; }
.u-dialog-section-3 .u-tabs-1 { min-height: 0 !important; margin-top: 25px !important; }
.u-dialog-section-3 .u-text-2 { margin: 0 !important; line-height: 1.7 !important; text-shadow: none !important; }
.u-dialog-section-3 .u-container-layout-2 { padding: 25px 0 0 !important; }
.u-dialog-section-3 .u-container-layout-3 { padding: 25px 0 !important; }
.u-dialog-section-3 .u-icon-3 { width: 28px !important; height: 28px !important; top: 18px !important; right: 18px !important; z-index: 2; }

/* Contact form ("Pišite nam"): labels above the fields, light outlined fields on the dark
   background, a full-width gold button that matches the menu hover colour */
.u-footer .u-form-1 {
  height: auto !important; width: 100% !important; max-width: 420px; margin: 18px auto 0 !important;
  box-shadow: none !important; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 10px; padding: 22px 24px 24px !important; box-sizing: border-box;
}
.u-footer .u-form-1 .u-inner-form { padding: 0 !important; margin: 0 !important; width: 100% !important; box-sizing: border-box; display: flex; flex-direction: column; gap: 14px; }
.u-footer .u-form-1 .u-form-group { margin: 0 !important; padding: 0 !important; width: 100% !important; text-align: left; }
.u-footer .u-form-1 .u-form-group.u-label-none > label.u-label {
  position: static !important; display: block !important; visibility: visible !important; opacity: 1 !important;
  width: auto !important; height: auto !important; clip: auto !important;
  margin: 0 0 6px !important; color: #e3cc8f; font-size: .78rem !important; letter-spacing: 1.5px; text-transform: uppercase;
}
.u-footer .u-form-1 .u-input {
  display: block; width: 100% !important; box-sizing: border-box; height: 42px !important; padding: 10px 14px !important;
  background: rgba(255, 255, 255, .92) !important; color: #333 !important; border: 1px solid transparent !important;
  border-radius: 6px; font-size: .95rem; transition: border-color .2s, box-shadow .2s;
}
.u-footer .u-form-1 textarea.u-input { height: 120px !important; resize: vertical; }
.u-footer .u-form-1 .u-input::placeholder { color: transparent; }
.u-footer .u-form-1 .u-input:focus {
  outline: none; border-color: #a8862f !important; box-shadow: 0 0 0 3px rgba(168, 134, 47, .35);
}
.u-footer .u-form-1 .u-form-submit { margin-top: 4px !important; }
.u-footer .u-form-1 .u-btn-submit {
  display: block !important; width: 100% !important; box-sizing: border-box; margin: 0 !important; padding: 12px 20px !important;
  background: #a8862f !important; color: #fff !important; border: 0 !important; border-radius: 6px;
  font-family: "Playfair Display", Georgia, serif; font-size: 1.05rem !important; font-weight: 600; letter-spacing: 1px;
  text-align: center; text-transform: uppercase; box-shadow: 0 4px 14px rgba(0, 0, 0, .35) !important; transition: background .2s, transform .2s;
}
.u-footer .u-form-1 .u-btn-submit:hover { background: #c19d3f !important; transform: translateY(-1px); }
.u-footer .u-form-1 .u-form-send-message { border-radius: 6px; margin: 0 !important; }

/* Mobile hamburger menu (built by site.js): menu links and flags in one panel */
.cms-burger, .cms-mobile-menu { display: none; }
@media (max-width: 991px) {
  header .u-menu-1, header .u-language-1 { display: none !important; }
  .cms-burger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    position: fixed; top: 12px; right: 12px; z-index: 2147482500; width: 46px; height: 46px; padding: 0 12px;
    border: 0; border-radius: 50%; background: rgba(255, 255, 255, .9); box-shadow: 0 2px 10px rgba(0, 0, 0, .25); cursor: pointer;
  }
  .cms-burger span { display: block; height: 2px; background: #3a2a2e; border-radius: 2px; transition: transform .25s, opacity .25s; }
  .cms-menu-open .cms-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .cms-menu-open .cms-burger span:nth-child(2) { opacity: 0; }
  .cms-menu-open .cms-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .cms-mobile-menu {
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 36px;
    position: fixed; inset: 0; z-index: 2147482400; background: rgba(255, 255, 255, .97);
    opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
  }
  .cms-menu-open .cms-mobile-menu { opacity: 1; visibility: visible; }
  .cms-menu-open, .cms-menu-open body { overflow: hidden; }
  .cms-mobile-menu nav { display: flex; flex-direction: column; align-items: center; gap: 6px; }
  .cms-mobile-menu nav a {
    padding: 10px 24px; color: #3a2a2e; text-decoration: none;
    font-family: "Playfair Display", Georgia, serif; font-size: 1.5rem; font-weight: 600; letter-spacing: .5px;
  }
  .cms-mobile-menu nav a:active, .cms-mobile-menu nav a:hover { color: #a8862f; }
  .cms-mobile-langs { display: flex; gap: 18px; padding-top: 28px; border-top: 1px solid #e4dccb; }
  .cms-mobile-langs a { display: block; line-height: 0; opacity: .55; }
  .cms-mobile-langs a.cms-lang-current { opacity: 1; }
  .cms-mobile-langs .u-language-icon {
    display: block !important; width: 44px !important; height: 31px !important; padding: 0 !important; margin: 0 !important;
    border-radius: 4px; overflow: hidden; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); font-size: 0;
  }
  .cms-mobile-langs .u-language-icon img, .cms-mobile-langs .u-language-icon svg { display: block; width: 100% !important; height: 100% !important; object-fit: cover; }
  .cms-mobile-langs .u-language-icon svg { transform: scale(1.4); }
}
/* On phones the script title was too big and broke inside a word ("koza|rca") */
@media (max-width: 767px) {
  #Kodele .u-text-1 { font-size: 2.1rem !important; line-height: 1.3 !important; word-break: normal !important; overflow-wrap: normal !important; }
}
