/* Jazykár.sk stylesheet. Made by Martin Kolenič */
/* Variables */
:root {
 /*Colour palette based on the Nord theme*/

  --slate-darkest: rgb(46, 52, 64);
  --slate-darker: rgb(59, 66, 82);
  --slate-dark: rgb(67, 76, 94);
  --slate: rgb(76, 86, 106);
  
  --grey-dark: rgb(116, 126, 146);
  --grey: rgb(146, 156, 176);
  --grey-light: rgb(166, 176, 196);
  --grey-lighter: rgb(186, 196, 216);

  --snow: rgb(216, 222, 233);
  --snow-lighter: rgb(229, 233, 240);
  --snow-lightest: rgb(236, 239, 244);
  
  --teal: rgb(113, 158, 157);
  --teal-dark: rgb(83, 128, 127);
  --teal-light: rgb(143, 188, 187);
  
  --sky: rgb(106, 162, 178);
  --sky-dark: rgb(76, 132, 148);
  --sky-light: rgb(136, 192, 208);
  
  --blue: rgb(99, 131, 163);
  --blue-dark: rgb(69, 101, 133);
  --blue-light: rgb(129, 161, 193);
  
  --navy: rgb(64, 99, 142);
  --navy-dark: rgb(34, 69, 112);
  --navy-light: rgb(94, 129, 172);
  
  --red: rgb(161, 67, 76);
  --red-dark: rgb(131, 37, 46);
  --red-light: rgb(191, 97, 106);
  
  --orange: rgb(178, 105, 82);
  --orange-dark: rgb(148, 75, 52);
  --orange-light: rgb(208, 135, 112);
  --orange-lighter: rgb(218, 145, 122);
  
  --yellow: rgb(205, 173, 109);
  --yellow-dark: rgb(175, 143, 79);
  --yellow-light: rgb(235, 203, 139);
  
  --green: rgb(133, 160, 110);
  --green-dark: rgb(103, 130, 80);
  --green-light: rgb(163, 190, 140);
  
  --purple: rgb(150, 112, 143);
  --purple-dark: rgb(120, 82, 113);
  --purple-light: rgb(180, 142, 173);

  /* General variables */
  --bg-light: var(--snow-lightest);
  --fg-light: var(--slate-darkest);
  --bg-light-alt: var(--snow);

  --bg-dark: var(--slate-darker);
  --fg-dark: var(--snow-lighter);

  --anchor: var(--blue-dark);
  --anchor-hover: var(--sky-dark);
}

/* Basic styles and a CSS reset based on Eric Meyer's work */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}

/* Style defaults */
html {
  font-size: 20px;
}

body {
  font-family: "Metropolis", "Proxima Nova", "Montserrat", "Gill Sans", sans-serif;
  background-color: var(--bg-light);
  color: var(fg-light);
}

a {
  color: var(--anchor);
  text-decoration: none;
}

a:hover {
  color: var(--anchor-hover);
}


body {
  line-height: 1;
  letter-spacing: .02rem;
}
ul {
	list-style: "\2192" outside;

}
html[lang=sk] q {
	quotes: "„" "“" "‚" "‘";
}

table {
	border-collapse: collapse;
	border-spacing: 0;
}

strong {
	font-weight: bold;
}

small {
	font-size: 80%
}
p, q {
  text-align: justify;
  hyphens: auto;
  font-size: 1.25rem;
  line-height: 1.3;
}

p:not(p + p) {
	margin-bottom: 1em;
}

small {
  font-size: 80%;
}

img {
  max-width: 100%;
}

h1, h2, h3, h4 {
	font-weight: bold;
	margin-bottom: 1rem;
}

h1 {
	font-size: 2.5rem;
}

h2 {
	font-size: 2rem;
}

h3 {
	font-size: 1.5rem;
}

h4 {
	font-size: 1.25rem;
}

@font-face {
  font-family: "Metropolis";
  src: url(../fonts/metropolis-400.woff);
}

@font-face {
  font-family: "Metropolis";
  src: url(../fonts/metropolis-700.woff);
  font-weight: bold;
}

#logotype {
  display: inline-flex;
  margin: 0 .5em;
  align-items: center;
  gap: 1em;
}

h1 {
  font-size: 2em;
  margin: 0;
}

#logo {
  display: inline-block;
  max-height: 3em;
  aspect-ratio: 1;
}

h3 {
  margin: .5rem 0;
}

.container {
  margin: 0 auto 0 auto;
}

section {
    padding: 2rem 0;
}

section:nth-child(2n-1) {
  background-color: var(--bg-light-alt);
}

header, footer {
  background-color: var(--bg-dark);
  color: var(--fg-dark);
  padding: 1rem;
}

header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

nav {
  text-align: right;
  display: flex;
  align-items: center;
  margin: 0 .25em;
}

header a {
  color: var(--snow);
  text-decoration: none;
  padding: 0.7rem;
  display: inline-block;
  margin: 0;
}

header a:is(h1 > a) {
  padding: 0;
}

nav a {
  text-transform: uppercase;
  letter-spacing: .075em;
  border-radius: .5em;
}

nav a:last-child {
  border: 1px solid grey;
}

header a:hover {
  color: var(--snow-lightest);
}

nav a:hover {
  background-color: var(--slate-dark);
}

.grid-max2col {
  display: grid;
  grid-template-columns: 2fr 2fr;
  margin: 1em 0;
  gap: 1em;
  color: var(--slate-darker);
}

.grid-max3col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1em;
  color: var(--slate-darker);
  width: auto;
  height: auto;
  margin-bottom: 1rem;
}


.card {
  padding: 1rem;
  border: 2px solid var(--slate);
  border-radius: .5em;
  color: var(--slate-darkest);
  display: inline-grid;
  align-items: start;
  justify-content: space-between;
}

.card h3 {
  display: inline-block;
  margin-bottom: .5rem;
  grid-row: 1;
}

.card p {
  margin-bottom: 0;
}

a.card:hover {
  border-color: var(--slate);
  color: var(--slate-dark);
}

.card-blue {
  background-color: var(--blue-light);
  border-color: var(--blue-dark)
}

.card-sky {
  background-color: var(--sky-light);
  border-color: var(--sky-dark)
}

.card-teal {
  background-color: var(--teal-light);
  border-color: var(--teal-dark)
}

.card-green {
  background-color: var(--green-light);
  border-color: var(--green-dark)
}

.card-red {
  background-color: var(--red-light);
  border-color: var(--red-dark)
}

.card-yellow {
  background-color: var(--yellow-light);
  border-color: var(--yellow-dark)
}

.card-orange {
  background-color: var(--orange-lighter);
  border-color: var(--orange)
}

.card-purple {
  background-color: var(--purple-light);
  border-color: var(--purple-dark)
}

.card-grey {
  position: relative;
  background-color: rgba(from var(--grey-light) r g b /50%);
  border-color: var(--grey-dark);
  color: var(--slate-darker);

}

.unavailable::after {
  content: "";
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background: linear-gradient(to top left, transparent 45%, rgba(from var(--grey) r g b / 40%) 45%, rgba(from var(--grey) r g b / 40%) 55%, transparent 55%);
  border-radius: .5em;
}

.badge {
  display: inline-flex;
  flex-direction: column;
  place-content: center;
  text-align: center;
  padding: .25rem;
  border-radius: 100%; 
  background-color: rgba(from var(--slate) r g b / 75%);
  border: 2px solid rgba(from var(--slate) r g b /75%);
  color: var(--snow-lightest);
  font-size: 75%;
  font-weight:bold;
  line-height: 1.25;
  width: 3rem;
  aspect-ratio: 1;
  grid-row: 3;
  grid-column: 2;
  place-self: end;
}

.badge div {
  font-size: 90%;
  color: #fff;
  font-weight: normal;
}

.service-description {
  text-align: left;
  hyphens: none;
  margin-top: .5rem;
  margin-bottom: .5em;
  justify-self: stretch;
  align-self: stretch;
  grid-column-start: 1;
  grid-column-end: 3;
}

.note {
  font-size: 60%;
  text-align: left;
  hyphens: none;
  grid-row: 3;
  align-self: end;
}

.languages {
  grid-row: 1;
  text-wrap: nowrap;
  justify-self: end;
}

.language-box {
  border: 2px solid var(--slate-dark);
  display: inline-block;
  border-radius: .5em;
  font-size: 1em;
  width: 2em;
  aspect-ratio:1;
  line-height: 2em;
  text-align:center;
  font-weight: bold;
  color: var(--slate-darkest);
  background-color: var(--grey-lighter);
  margin: 0;
  padding: 0;
}

.language-box:first-child:not(:only-child) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.language-box:not(:first-child):not(:last-child)  {
  border-radius: 0;
  border-left-style: none;
}

.language-box:last-child:not(:only-child) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left-style: none;
}

.box-join-wide {
  width: 4em;
  aspect-ratio: 2/1;
}

.language-box:nth-child(2n) {
  background-color: var(--grey-light);
  color: var(--slate-darkest);
}

.language-box, .badge {
  cursor: help;
}

#colleagues {
  background-color: rgba(from var(--slate) r g b / 10%);
  padding: 1rem;
  border-radius: .5em;
  margin-top: 1rem;
}

#colleagues {
  filter: opacity(.8);
}

#intro {
  background-image: url("../img/hero-bg.svg");
  background-size: cover;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  place-content: center;
}

#intro .container {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    place-content: center;
}

.hero-text {
  font-size: 2rem;
}

.hero-text strong {
  hyphens: none;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  place-content: center;
  gap: .5em;
  margin: 2em 0 0 0;
  font-size: 1.5rem;
  text-transform: uppercase;
}

.cta a {
  display: inline-block;
  background-color: var(--grey-lighter);
  color: var(--fg-light);
  border: 2px solid var(--grey-dark);
  padding: .5em;
  border-radius: .5em;
  min-width: 5em;
  text-align: center;
}

.cta a:first-child {
  background-color: var(--green);
  color: var(--snow-lightest);
  border-color: var(--green-dark);
  font-weight: bold;
}

.avatar {
  width: 10rem;
  aspect-ratio: 1;
  border-radius: 100%;
  box-shadow: 0 0 .5em var(--grey);
  align-self: center;
  float: right;
  margin-left: 1.5em;
}

footer .container {
  display: flex;
  gap: 2em;
  justify-content: space-between;
}

#logo-footer {
  opacity: .8;
}


@media screen and (min-width: 1550px) {
  #intro .container {
    max-width: 50vw;
  }
  .container {
    max-width: 70vw;
  }
}

@media screen and (min-width: 750px) and (max-width: 1549px) {
  .grid-max3col {
      grid-template-columns: 1fr 1fr;
  }

  .container, #intro .container {
    max-width: 70vw;
  }

  .hero-text {
    font-size: 1.7em;
  }

  .cta a {
    font-size: 90%;
  }
}


@media screen and (max-width: 749px) {
  header {
    display: block;
    text-align: center;
    margin: 0 auto;
    padding: 1em 0;
  }

  #logotype {
    display: block;
    margin: 0;
    margin-bottom: 1em;
  }

  #logo {
    display: block;
    max-height: 5em;
    margin: 0 auto 1em auto;
  }
  
  .languages {
    grid-row: 2;
    place-self: start;
  }
  
  .service-description {
    grid-row: 3;
  }
  
  .badge {
    grid-row: 4;
    margin-top: .5em;
  }
  
  .card:has(.note) .badge {
    grid-row: 5;
  }
  
  .note {
    grid-row: 5;
  }

  header h1 {
    display: block;
  }

  nav {
    display: block;
    text-align: center;
  }

  .hero-text {
    font-size: 1.35em;
    margin-top: 0;
  }
  .cta a {
    font-size: 80%;
  }

  .cta {
    margin: 0;
  }

  #logo-footer {
    width: 50%;
    margin-bottom: 1em;
  }
  
  footer .container {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
    #intro, #intro .container {
    min-height: 40vh;
  }
  .avatar {
    display: block;
    float: none;
    margin: 0 auto 1em auto;
  }
  
  
}


  @media screen and (min-width: 0) and (max-width: 1049px) {
  .grid-max3col {
    grid-template-columns: 1fr;
  }
  .grid-max2col {
    grid-template-columns: 1fr;
  }

  #intro .container, .container {
    max-width: 80vw;
  }
}
