/* RESPONSIVE - caricato dopo giardini.css */

img, iframe {max-width:100%;}
.menu-toggle {display:none;}

/* ---------- TABLET e schermi sotto i 980px ---------- */
@media (max-width: 980px) {
  *, *:before, *:after {box-sizing:border-box;}

  section div.wrapper,
  section#container div.wrapper,
  footer div.wrapper {width:auto; max-width:950px; padding-left:15px; padding-right:15px;}

  .bghome, .bggiardini, .bgmatrimoni, .bgvivaio {background-size:auto 330px;}

  /* header */
  header div.wrapper2 div {display:block; text-align:left; padding:0 15px;}
  header nav.desktop {width:auto; padding:30px 0 0 10px; float:left;}
  header nav.desktop a {font-size:16px; padding:5px 8px;}
  header div.wrapper2 .logo {width:250px; height:84px; padding-top:7px;}
  header div.wrapper2 .logo a {width:250px; height:70px; background-size:250px auto;}
  header div.wrapper2 .logo a:hover {background-position:0 -87px;}

  /* contenuti */
  #maincontent, #azienda, #inner {width:100%; margin:0; float:none;}
  #maincontent, #azienda {display:block; overflow:hidden;}
  #inner {min-height:0; overflow:hidden;}
  #inner-left {width:60%;}
  #inner-right {width:40%;}

  /* home: 3 box */
  #newsBlock {display:block; width:100%; background-color:transparent;}
  #newsBlock ul {display:flex; flex-wrap:wrap; justify-content:space-between;}
  #newsBlock li {width:32.5%; float:none;}
  #newsBlock article {width:100%; height:auto; min-height:0; margin:0; padding:10px;}
  #newsBlock article img, #newsBlock article a img {width:100%; height:auto;}

  #content img {height:auto;}

  /* gallerie */
  #gallery {margin-bottom:30px;}
  #gallery ul {display:flex; flex-wrap:wrap; width:100%;}
  #gallery li {float:none; width:25%; padding:0 5px 10px;}
  #gallery img {width:100%; height:auto;}

  /* form contatti */
  .contactForm, .contactDetails {width:100%;}
  .contactRow .fields, .contactRow .fieldsTxtArea {width:100%;}

  /* footer */
  footer, footer div.wrapper {height:auto !important;}
  footer div.wrapper {overflow:hidden; padding-bottom:15px;}
  footer article.left {width:55%;}
  footer article.middle {width:20%;}
  footer article.right {width:25%;}

  .fb-like-box, .fb-like-box span, .fb-like-box iframe {max-width:100% !important;}
}

/* ---------- SMARTPHONE sotto i 760px ---------- */
@media (max-width: 760px) {
  /* header con menu a scomparsa */
  header {height:auto !important; overflow:visible; position:relative; background-color:#4B5F1C;}
  header div.wrapper {display:none;}
  header div.wrapper2 {position:relative; height:auto; margin-top:0; padding:10px 0;}
  header div.wrapper2 div {padding:0 15px;}
  header div.wrapper2 .logo {float:none; display:block; width:220px; height:62px;}
  header div.wrapper2 .logo a {width:220px; height:62px; background-size:220px auto;}
  header div.wrapper2 .logo a:hover {background-position:0 -76px;}

  .menu-toggle {display:block; position:absolute; top:18px; right:15px; width:46px; height:42px; padding:9px 10px; border:1px solid rgba(255,255,255,.6); border-radius:4px; background:transparent; cursor:pointer;}
  .menu-toggle span {display:block; height:3px; margin:4px 0; background:#fff; border-radius:2px;}

  header nav.desktop {display:none; float:none; width:100%; height:auto; padding:10px 0 0;}
  header.open nav.desktop {display:block;}
  header nav.desktop a {float:none; display:block; font-size:18px; padding:12px 5px; border-top:1px solid rgba(255,255,255,.2);}

  .bghome, .bggiardini, .bgmatrimoni, .bgvivaio {background-size:auto 200px; background-position:center 82px;}

  /* banner */
  section#banner {height:150px;}
  aside, aside p, aside h2, aside h3 {font-size:20px; line-height:24px;}
  aside {top:15px; right:15px;}
  aside p {top:28px;}

  /* testi */
  h1 {font-size:20px; line-height:24px;}
  #maincontent, #azienda {padding:10px 12px 15px;}
  #maincontent img {float:none;}
  a.link {display:inline-block; line-height:20px; left:0;}

  /* home: box uno sotto l'altro */
  #newsBlock li {width:100%; margin-bottom:10px;}

  /* gallerie a 2 colonne */
  #gallery li {width:50%;}

  /* contatti: colonne una sotto l'altra */
  #inner-left, #inner-right {float:none; width:100%;}
  #inner-right iframe {width:100%;}
  .contactRow label {width:auto;}
  .contactForm label.error {position:static; width:auto; text-align:left;}
  input[type="checkbox"] {position:static;}

  /* footer su una colonna */
  footer article.left, footer article.middle, footer article.right {float:none; width:100%; padding:10px 0 0; text-align:left;}
}

/* ---------- SFONDI LEGGERI per telefoni (ritaglio centrale, ~60% piu' leggeri) ---------- */
@media (max-width: 640px) {
  .bghome {background-image:url(../images/home/bghome-m.jpg);}
  .bggiardini {background-image:url(../images/home/bggiardini-m.jpg);}
  .bgmatrimoni {background-image:url(../images/home/bgmatrimoni-m.jpg);}
  .bgvivaio {background-image:url(../images/home/bgvivaio-m.jpg);}
}

/* ---------- Testo del footer leggibile sui telefoni (min. 12px) ---------- */
@media (max-width: 760px) {
  footer, footer p, footer a, footer article, footer article.middle div {font-size:12px !important; line-height:18px;}
}
