/* ============================================================
   LAYOUT — Header, logo, nav, content, footer, media queries
   ============================================================ */

/* header ____________________ */
header {
  background: #222222 url(../images/bg-header.jpg) no-repeat scroll center top;
  width: 100%;
  height: 276px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

/* nav ____________________ */
nav {
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

nav ul {
  text-align: center;
}

#menubar ul li {
  display: inline;
  line-height: 50px;
  padding: 0 10px;
  margin: 0;
}

/* langbar — flags top-right */
#langbar {
  position: absolute;
  top: 8px;
  right: 12px;
  z-index: 20;
}

#langbar ul li {
  display: inline;
  padding: 0 2px;
}

#langbar a {
  font-size: 0;
  line-height: 1;
  display: inline-block;
  opacity: 0.6;
  transition: opacity 0.2s;
}

#langbar a.is-active {
  opacity: 1;
}

#langbar a:hover {
  opacity: 1;
}

#langbar a::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 16px;
  background-size: cover;
  background-position: center;
  vertical-align: middle;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 2px;
}

#langbar a[hreflang="es"]::before {
  background-image: url('https://flagcdn.com/es.svg');
}

#langbar a[hreflang="en"]::before {
  background-image: url('https://flagcdn.com/gb.svg');
}

#langbar a[hreflang="de"]::before {
  background-image: url('https://flagcdn.com/de.svg');
}

#menubar a {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 900;
}

nav a {
  color: #FFFFFF;
}

nav a:hover,
nav a.active {
  color: #1be2c4;
}


/* logo ____________________ */
a#logo {
  display: block;
  width: 100%;
  height: 196px;
  text-indent: -9000px;
  margin: 0 auto;
  background: transparent url(../images/bg-logo.png) no-repeat scroll center center;
}


/* content ____________________ */
#content-wrapper {
  max-width: 100%;
  margin: 0 auto 48px auto;
}

#content {
  text-align: center;
}

.node-content {
  max-width: 640px;
  margin: 0 auto;
}


/* footer ____________________ */
#footer {
  background: #222222;
  width: 100%;
  height: auto;
  margin: 0 auto;
  padding: 25px 0 46px 0;
  text-align: center;
  color: #FFF;
  font-size: 75%;
  text-transform: uppercase;
  letter-spacing: 2px;
}

#footer a {
  color: #FFF;
  font-weight: 700;
}

#footer div.social-links {
  background: url("../images/bg-estrella-blanca.png") no-repeat top center transparent;
  padding: 30px 0 0;
}

#footer .social-links a {
  font-weight: 900;
  font-size: 110%;
  margin: 0 5px;
}

#footer a:hover {
  color: #1be2c4;
}


/* frontpage ____________________ */
.path-frontpage h1,
.path-frontpage .tabs,
.path-frontpage #messages {
  display: none;
}

/* spot — ocultar page title block (H1 lo renderiza el template) */
.node-type-spot #block-totalkitesurf-page-title {
  display: none;
}

.path-frontpage #content-wrapper {
  margin: 0;
}


/* ============================================================
   MEDIA QUERIES
   ============================================================ */

/* <= 1024px — tablet ____________________ */
@media screen and (max-device-width: 1024px), screen and (max-width: 1024px) {

  header {
    background: #222222 url(../images/bg-header-medium.jpg) no-repeat scroll center top;
    height: 226px;
  }

  #menubar ul li {
    line-height: 45px;
  }

  #langbar ul.language-switcher-locale-url li {
    line-height: 25px;
  }

  a#logo {
    background: transparent url(../images/bg-logo-medium.png) no-repeat scroll center center;
    height: 156px;
  }

  .view-spots {
    max-width: 640px;
  }

  .node--type-curso .node-content {
    max-width: 640px;
  }

  .node--type-curso .dias-curso {
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

  .node--type-curso .dias-curso p {
    min-height: 0;
  }
}


/* <= 768px — mobile ____________________ */
@media screen and (max-device-width: 768px), screen and (max-width: 768px) {

  header {
    background: #222222 url(../images/bg-header-small.jpg) no-repeat scroll center top;
    height: 176px;
  }

  #menubar a {
    letter-spacing: 1px;
  }

  #menubar ul li {
    padding: 0 8px;
    line-height: 40px;
  }

  #langbar ul.language-switcher-locale-url li {
    line-height: 20px;
  }

  a#logo {
    height: 116px;
    background: transparent url(../images/bg-logo-small.png) no-repeat scroll center center;
  }
}


/* <= 490px — mobile small ____________________ */
@media screen and (max-device-width: 490px), screen and (max-width: 490px) {

  header {
    background: #222222 url(../images/bg-header-xsmall.jpg) no-repeat scroll center top;
    height: 126px;
  }

  a#logo {
    height: 90px;
    float: left;
    width: 60%;
    margin-left: 15px;
  }

  .node-content {
    max-width: 320px;
  }

  .view-spots,
  .view-venta {
    max-width: 320px;
  }

  .view-venta .views-row:nth-child(odd),
  .view-venta .views-row:nth-child(even) {
    float: none;
    margin: 20px 10px;
  }

  .node--type-spot .field--name-field-spot-descripcion,
  .field--name-field-pagina-texto {
    width: 300px;
    margin-left: 10px;
    margin-right: 10px;
  }

  .spot-info {
    min-height: 0;
    margin-top: 20px;
  }

  .node--type-material .field--name-field-material-descripcion {
    float: none;
    margin: 10px auto;
  }

  .node--type-material .material-info {
    float: none;
    text-align: center;
  }

  .view-cursos {
    max-width: 320px;
  }

  .node--type-curso .texto-curso {
    max-width: 300px;
  }
}


/* retina displays ____________________ */
@media only screen and (-webkit-min-device-pixel-ratio: 2),
       only screen and (-webkit-min-device-pixel-ratio: 1.5),
       only screen and (min-device-pixel-ratio: 2),
       only screen and (min-device-pixel-ratio: 1.5) {

  h1.title,
  h1.star,
  h2.star,
  .slick__slide .views-field-field-slider-antetitulo,
  .view-cursos .views-field-title a,
  .node--type-curso .price,
  .view-spots {
    background-image: url(../images/bg-estrella-retina.png);
    -webkit-background-size: 16px 14px;
    background-size: 16px 14px;
  }

  .slick__slide .views-field-field-slider-enlace,
  .node--type-curso .dias-curso {
    background-image: url(../images/bg-estrella-retina.png);
    -webkit-background-size: 16px 14px;
    background-size: 16px 14px;
  }

  #footer div.social-links {
    background-image: url("../images/bg-estrella-blanca-retina.png");
    -webkit-background-size: 16px 14px;
    background-size: 16px 14px;
  }

  .view-spots .views-field-field-spot-tipo {
    background-image: url(../images/bg-tipo-spot-mini-retina.png);
    -webkit-background-size: 21px 21px;
    background-size: 21px 21px;
  }

  .spot-info .field--name-field-spot-tipo {
    background-image: url(../images/bg-tipo-spot-retina.png);
    -webkit-background-size: 30px 30px;
    background-size: 30px 30px;
  }

  .spot-info .field--name-field-spot-vientos-navegables {
    background-image: url(../images/bg-wind-retina.png);
    -webkit-background-size: 30px 30px;
    background-size: 30px 30px;
  }

  .spot-info .field--name-field-spot-parking {
    background-image: url(../images/bg-parking-retina.png);
    -webkit-background-size: 30px 30px;
    background-size: 30px 30px;
  }

  .spot-info .field--name-field-spot-chiringuito {
    background-image: url(../images/bg-chiringuito-retina.png);
    -webkit-background-size: 30px 30px;
    background-size: 30px 30px;
  }
}


@media only screen and (-webkit-min-device-pixel-ratio: 2) and (max-width: 768px),
       only screen and (min-device-pixel-ratio: 2) and (max-width: 768px) {

  header {
    background-image: url(../images/bg-header.jpg);
    -webkit-background-size: 510px 176px;
    background-size: 510px 176px;
  }

  a#logo {
    background-image: url(../images/bg-logo.png);
    -webkit-background-size: 180px 90px;
    background-size: 180px 90px;
  }
}


@media only screen and (-webkit-min-device-pixel-ratio: 2) and (max-width: 490px),
       only screen and (min-device-pixel-ratio: 2) and (max-width: 490px) {

  header {
    -webkit-background-size: 365px 126px;
    background-size: 365px 126px;
  }

  .responsive-menus.responsified span.toggler {
    background-image: url(../images/bg-responsive-menu-button-retina.png);
    -webkit-background-size: 40px 40px;
    background-size: 40px 40px;
  }
}
