/*
 * Responsive additions for Apartmani Lazeta
 * Keeps the original desktop design, while adapting it for tablets and phones.
 */

html { -webkit-text-size-adjust: 100%; }
body { min-width: 0; }

/* Fluid shell on screens narrower than the original 960px layout */
.centerPage,
.mainContent {
  width: 960px;
  max-width: calc(100% - 32px);
}

#header .centerPage { position: relative; }

/* Do not let content images overflow their columns */
.mainContent img {
  max-width: 100%;
  height: auto;
  box-sizing: border-box;
}

/* Accessible mobile menu button; hidden on desktop */
.mobileMenuBtn {
  display: none;
  border: 0;
  background: transparent;
  color: #fff;
  font: 600 14px/1.2 Tahoma, Arial, sans-serif;
  cursor: pointer;
}
.mobileMenuBtn .bars,
.mobileMenuBtn .bars:before,
.mobileMenuBtn .bars:after {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  content: "";
  position: relative;
}
.mobileMenuBtn .bars:before { position: absolute; top: -7px; left: 0; }
.mobileMenuBtn .bars:after  { position: absolute; top: 7px; left: 0; }
.mobileMenuBtn .menuLabel { margin-left: 34px; white-space: nowrap; }

@media screen and (max-width: 980px) {
  .centerPage,
  .mainContent {
    width: auto;
    max-width: none;
    margin-left: 18px;
    margin-right: 18px;
  }

  /* Header can grow when navigation needs more room */
  #header { height: auto; min-height: 103px; }
  #header .centerPage { min-height: 103px; }
  ul.mainMenu { width: auto; }
  .mainMenu>li>a { padding-left: 11px; padding-right: 11px; }

  /* The 15-year-old slider script is fixed-width. On tablet/phone we retain
     the photography but show the first slide as a clean responsive hero. */
  #slider { margin-top: 0; padding-top: 10px; }
  #slider .centerPage {
    width: auto;
    height: auto;
    margin: 0 18px;
    background: none;
  }
  .cornersLeft,
  .cornersRight,
  .anythingSlider,
  .anythingSlider .wrapper {
    width: 100% !important;
    height: auto !important;
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .anythingSlider .wrapper { overflow: hidden; }
  .anythingSlider .wrapper ul {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
    background: none !important;
  }
  .anythingSlider .wrapper ul > li {
    display: none !important;
    float: none !important;
    width: 100% !important;
    height: auto !important;
  }
  .anythingSlider .wrapper ul > li:first-child { display: block !important; }
  #slider .anythingSlider img {
    display: block;
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
  }
  .anythingSlider .arrow,
  #thumbNav,
  #start-stop { display: none !important; }

  #actionInfo {
    overflow: hidden;
    padding: 8px 10px 12px;
  }
  #actionInfo h2 {
    width: calc(100% - 220px);
    margin-left: 0;
  }

  /* Make old fixed column widths fluid */
  .full-width { width: calc(100% - 30px); }
  .half { width: calc(50% - 30px) !important; }
  .one-third { width: calc(33.333% - 30px); }
  .one-fourth { width: calc(25% - 30px); }
  .two-thirds { width: calc(66.666% - 30px); }
  .three-fourths { width: calc(75% - 30px); }

  #footer .centerPage { margin-left: 18px; margin-right: 18px; }
  #footer .one-third { width: calc(33.333% - 30px); }
  .leftmov { margin-left: 15px; }
}

@media screen and (max-width: 760px) {
  body { font-size: 15px; line-height: 1.5; }
  p { line-height: 1.5; }

  .centerPage,
  .mainContent,
  #footer .centerPage {
    margin-left: 14px;
    margin-right: 14px;
  }

  #header {
    min-height: 86px;
    background-color: #333;
    background-position: top center;
  }
  #header .centerPage { min-height: 86px; }

  a.logo {
    width: 210px;
    height: 82px;
    background-size: contain;
    background-position: left center;
  }

  .languageMenu {
    top: 7px;
    right: 0;
    font-size: 12px;
  }
  .languageMenu a,
  .languageMenu .activeLang { padding: 4px 5px; }

  .mobileMenuBtn {
    display: block;
    position: absolute;
    right: 0;
    bottom: 15px;
    height: 36px;
    padding: 8px 8px 8px 0;
    z-index: 120;
  }
  .mobileMenuBtn .bars { position: absolute; left: 3px; top: 17px; }

  ul.mainMenu {
    display: none;
    float: none;
    clear: both;
    width: 100%;
    padding: 0 0 10px;
    margin: 0;
  }
  ul.mainMenu.mobileOpen { display: block; }
  .mainMenu>li {
    float: none;
    width: 100%;
    border-top: 1px solid rgba(255,255,255,.10);
  }
  .mainMenu>li>a {
    box-sizing: border-box;
    float: none;
    width: 100%;
    height: auto;
    min-height: 50px;
    padding: 10px 12px;
    background: none;
    font-size: 14px;
  }
  .mainMenu li a span {
    display: inline;
    max-width: none;
    margin: 0 0 0 8px;
    font-size: 12px;
    opacity: .75;
  }
  .mainMenu li a span:before { content: "– "; }

  /* On touch screens keep the Vodice subnavigation visible and easy to tap */
  .subMenu {
    position: static !important;
    display: block !important;
    padding: 0 !important;
    background: none !important;
  }
  .mainMenu li ul {
    display: block !important;
    width: 100%;
    border: 0;
    background: #2f86c3;
  }
  .mainMenu li ul li { padding: 0; }
  .mainMenu li ul li a {
    padding: 10px 22px;
    font-size: 14px;
  }

  #slider .centerPage { margin: 0 14px; }
  #actionInfo { padding: 12px 8px 16px; }
  #actionInfo h2 {
    float: none;
    width: auto;
    margin: 5px 0 12px;
    font-size: 15px;
    line-height: 1.35;
  }
  #actionInfo h2 span { font-size: 21px; line-height: 1.2; }
  a.actionBtn {
    float: none;
    width: 188px;
    margin: 0 auto;
    text-align: center;
  }

  .full-width,
  .half,
  .one-third,
  .one-fourth,
  .two-thirds,
  .three-fourths,
  #footer .one-third {
    float: none;
    width: auto !important;
    margin: 12px 0;
    text-align: left;
  }
  .half.last { float: none; }

  .mainContent { overflow: visible; padding-top: 12px; }
  .mainContent > .one-third {
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e2e2e2;
  }
  .mainContent > .one-third:last-child { border-bottom: 0; }
  .mainContent > .one-third img {
    float: none;
    width: 100%;
    max-width: 520px;
    margin: 0 auto 12px;
    padding: 5px;
  }

  h1 { font-size: 28px; }
  h2 { font-size: 24px; }
  h3 { font-size: 21px; }
  h4 { font-size: 19px; }

  .breadcrumbs { margin-left: 0; padding-left: 0; }

  #footer { padding-top: 20px; }
  #footer ul { float: none; margin: 0 0 22px; width: 100% !important; }
  #footer .leftmov { float: none; margin: 0 0 20px; width: auto; }
  #footer p.copyright { height: auto; min-height: 18px; padding: 10px 8px; }
}

@media screen and (max-width: 420px) {
  a.logo { width: 180px; height: 78px; }
  .mobileMenuBtn .menuLabel { display: none; }
  .mobileMenuBtn { width: 38px; }
  #actionInfo h2 span { font-size: 19px; }
}

/* Responsive embeds */
iframe { max-width: 100%; }

@media screen and (max-width: 760px) {
  /* Two-column thumbnail gallery on phones, without fixed 180px overflow */
  .mainContent .half a.photo {
    width: calc(50% - 7px);
    margin: 5px 14px 10px 0 !important;
    box-sizing: border-box;
  }
  .mainContent .half a.photo:nth-of-type(even) { margin-right: 0 !important; }
  .mainContent .half a.photo img {
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box;
  }
}

@media screen and (max-width: 360px) {
  .mainContent .half a.photo {
    width: 100%;
    margin-right: 0 !important;
  }
}

/* 2026 mobile refinements */
@media screen and (max-width: 760px) {
  /* Give the first (house) slide more presence on phones. */
  #slider .anythingSlider .wrapper ul > li:first-child,
  #slider .anythingSlider .wrapper ul > li:first-child a {
    display: block !important;
    width: 100% !important;
    height: clamp(230px, 62vw, 420px) !important;
    overflow: hidden;
  }
  #slider .anythingSlider .wrapper ul > li:first-child img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center center;
  }

  /* Full-screen mobile gallery (handled by responsive.js). */
  .mobileLightbox {
    position: fixed;
    inset: 0;
    z-index: 50000;
    display: none;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 46px 8px 42px;
    background: rgba(0,0,0,.96);
  }
  .mobileLightbox.open { display: flex; }
  .mobileLightbox img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100vh - 92px);
    object-fit: contain;
    margin: 0;
    padding: 0;
    box-shadow: none;
  }
  .mobileLightboxClose,
  .mobileLightboxPrev,
  .mobileLightboxNext {
    position: fixed;
    z-index: 50001;
    border: 0;
    background: rgba(0,0,0,.55);
    color: #fff;
    cursor: pointer;
    font-family: Arial, sans-serif;
    line-height: 1;
  }
  .mobileLightboxClose {
    top: 6px;
    right: 8px;
    width: 42px;
    height: 42px;
    border-radius: 21px;
    font-size: 30px;
  }
  .mobileLightboxPrev,
  .mobileLightboxNext {
    top: 50%;
    width: 44px;
    height: 64px;
    margin-top: -32px;
    font-size: 36px;
  }
  .mobileLightboxPrev { left: 4px; }
  .mobileLightboxNext { right: 4px; }
  .mobileLightboxCounter {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 10px;
    z-index: 50001;
    color: #fff;
    text-align: center;
    font: 13px/1.2 Arial, sans-serif;
  }
}
