/***
    The new CSS reset - version 1.11.3 (last updated 25.08.2024)
    GitHub page: https://github.com/elad2412/the-new-css-reset
***/

/*
    Remove all the styles of the "User-Agent-Stylesheet", except for the 'display' property
    - The "symbol *" part is to solve Firefox SVG sprite bug
    - The "html" element is excluded, otherwise a bug in Chrome breaks the CSS hyphens property (https://github.com/elad2412/the-new-css-reset/issues/36)
 */
*:where(:not(html, iframe, canvas, img, svg, video, audio, input[type=checkbox]):not(svg *, symbol *)) {
  all: unset;
  display: revert;
}

/* Preferred box-sizing value */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Fix mobile Safari increase font-size on landscape mode */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

/* Reapply the pointer cursor for anchor tags */
a,
button {
  cursor: revert;
}

/* Remove list styles (bullets/numbers) */
ol,
ul,
menu,
summary {
  list-style: none;
}

/* Firefox: solve issue where nested ordered lists continue numbering from parent (https://bugzilla.mozilla.org/show_bug.cgi?id=1881517) */
ol {
  counter-reset: revert;
}

/* For images to not be able to exceed their container */
img {
  max-inline-size: 100%;
  max-block-size: 100%;
}

/* removes spacing between cells in tables */
table {
  border-collapse: collapse;
}

/* Safari - solving issue when using user-select:none on the <body> text input doesn't working */
input,
textarea {
  -webkit-user-select: auto;
}

/* revert the 'white-space' property for textarea elements on Safari */
textarea {
  white-space: revert;
}

/* minimum style to allow to style meter element */
meter {
  -webkit-appearance: revert;
  appearance: revert;
}

/* reset default text opacity of input placeholder */
::placeholder {
  color: unset;
}

/* fix the feature of 'hidden' attribute.
   display:revert; revert to element instead of attribute */
:where([hidden]) {
  display: none;
}

/* Remove details summary webkit styles */
::-webkit-details-marker {
  display: none;
}

/* END OF RESET */


:root {
  --color-black: #1D1D1D;
  --color-light-green: #DFEBE2;
  --color-dark-green: #7E9387;
  --color-blue: #133C55;
  --color-red: #dd6262;
  --color-red-v2: #dd4f40;
  --animation-timing: 250ms;
}

@font-face {
  font-family: "Roboto";
  src: url("../fonts/roboto-regular.woff2");
  font-display: swap;
}

@font-face {
  font-family: "Roboto-bold";
  src: url("../fonts/roboto-bold.woff2");
  font-display: swap;
}

body {
  display: flex;
  flex-direction: column;
  font-size: 1.125rem;
  color: var(--color-black);
  font-family: "Roboto";
  min-height: 100vh;
}

h2 {
  font-family: "Roboto-bold";
  font-size: 2rem;
  font-weight: bold;
  padding-bottom: 1.875rem;
}

h3 {
  font-family: "Roboto-bold";
  font-size: 1.375rem;
  font-weight: bold;
  margin: 1.875rem 0 1.25rem 0;
}

.mt-30 {
  margin-top: 1.875rem;
}

a {
  color: var(--color-blue);
  text-decoration: underline;

  &.mt {
    display: block;
    margin-top: 1.875rem;
  }

  &:focus-visible {

    outline: 2px solid #133c55;
  }
}

b {
  font-family: "Roboto-bold";
}

/* Screenreader only */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: clip;
  clip-path: inset(0);
  border: 0;
}

/* Skip link */
.skip-link {
  color: var(--body-txt);
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 1rem;

  &::after {
    content: " \2193";
  }
}

.element-invisible {
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px;
  overflow: hidden;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 200;
  border-bottom: 5px solid transparent;

  &.element-focusable:active,
  &.element-focusable:focus {
    clip: auto;
    height: auto;
    overflow: visible;
    border-bottom-color: var(--highlight);
  }
}

.section-container {
  max-width: 59.375rem;
  margin: 0 auto;
}

#header-container {
  display: flex;
  flex-direction: column;
  padding: 0.9375rem 0;
  max-width: 59.375rem;
  width: 100%;
  margin: 0 auto;

  >header {
    display: flex;
    justify-content: space-between;
    height: 3.75rem;
    padding: 0 0.9375rem;
  }
}

#primary-navigation {
  >nav {
    font-size: 1.125rem;

    &.menu-hidden,
    &.menu-visible {
      display: grid;
      grid-template-rows: 0fr;
      transition: grid-template-rows var(--animation-timing) ease-in;

      >ul {
        overflow: hidden;
        grid-row: 1 / span 2;
        gap: 0.625rem;
      }

      >ul a {
        text-decoration: none;
        color: inherit;
        padding: 0 0.9375rem;
        position: relative;

        &.active {
          font-family: "Roboto-bold";
          background-color: #dfebe2;
          border-top-left-radius: 0.625rem;
          border-bottom-left-radius: 0.625rem;
        }
      }
    }

    &.menu-visible {
      grid-template-rows: 1fr;
      overflow: visible;
    }

    >ul {
      display: flex;
      flex-direction: column;

      &>li {
        text-align: right;
        padding: 0.3125rem 0;

        &:first-child {
          padding-top: 0.9375rem;
        }
      }
    }
  }
}

#icons {
  width: 50px;
  height: 24px;
  position: relative;
}

#icons span {
  display: block;
  position: absolute;
  height: 4px;
  width: 100%;
  background: black;
  border-radius: 9px;
  opacity: 1;
  right: 0;
  -webkit-transform: rotate(0deg);
  -moz-transform: rotate(0deg);
  -o-transform: rotate(0deg);
  transform: rotate(0deg);
  -webkit-transition: .25s ease-in-out;
  -moz-transition: .25s ease-in-out;
  -o-transition: .25s ease-in-out;
  transition: .25s ease-in-out;
  -webkit-transform-origin: center;
  -moz-transform-origin: center;
  -o-transform-origin: center;
  transform-origin: center;
}

/* Icon 4 */
#icons span:nth-child(1) {
  top: 0px;
}

#icons span:nth-child(2) {
  top: 10px;
}

#icons span:nth-child(3) {
  /*width: 80%;*/
  top: 20px;
}

#hamburger-button[aria-expanded="true"]{
  #icons span:nth-child(1) {
    -webkit-transform: rotate(45deg);
    -moz-transform: rotate(45deg);
    -o-transform: rotate(45deg);
    transform: rotate(45deg);
    top: 10px;
  }

  #icons span:nth-child(2) {
    -webkit-transform: rotate(-45deg);
    -moz-transform: rotate(-45deg);
    -o-transform: rotate(-45deg);
    transform: rotate(-45deg);
  }

  #icons span:nth-child(3) {
    width: 0%;
    opacity: 0;
  }
}

@media (min-width: 51.875em) {
  #header-container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0.9375rem 0;
  }

  header button#hamburger-button {
    display: none;
  }

  nav.menu-hidden {
    grid-template-rows: 1fr !important;
  }

  #primary-navigation nav>ul {
    flex-direction: row !important;
    gap: 0.3125rem;
    overflow: visible;
    >li {
      padding: 7px;
    }
    >li:first-child {
      /*padding-top: 0.3125rem;*/
      padding: 7px;
    }

    a {
      color: inherit;
      text-decoration: none;
      /*padding: 0.625rem 0.625rem !important;*/
      padding: 5px 10px !important;

      &:hover {
        background-color: var(--color-light-green);
      }

      &.active {
        background-color: var(--color-light-green);
        border-radius: 0.625rem;
        font-weight: bold;
        /*padding-top: 0.625rem;
        padding-bottom: 0.625rem;*/
      }
    }
  }
}

#index {
  padding: 3.125rem 1.5625rem 0 1.5625rem;

  ul {
    margin-top: 0.9375rem;

    >li+li {
      margin-top: 0.3125rem;
    }
  }
}

#about-me-image {
  display: flex;
  margin-bottom: 3.4375rem;
  margin-top: 1.5625rem;

  >div:first-child,
  >div:last-child {
    width: 1.5625rem;
  }

  .image-container {
    position: relative;
    flex: 1;
    line-height: 0;
    max-width: 18.75rem;
  }

  img {
    position: relative;
    z-index: 100;
    width: 100%;
    border-radius: 1.5625rem;
  }

  .image-container .image::before {
    content: "";
    display: block;
    height: 100%;
    background-color: #fff;
    position: absolute;
    width: 100%;
    border-radius: 1.5625rem;
    rotate: 10deg;
  }
}

#bannerText,
#psihoterapija {
  background-color: var(--color-light-green);
}

#bannerText {
  padding-bottom: 0;
}

#psihoterapija a:last-of-type {
  margin-top: 7.25rem;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;

  >section {
    flex: 1;
    padding: 2.5rem 1.5625rem 2.5rem 1.5625rem;
  }
}

section {
  p+p {
    margin-top: 1rem;
  }

  p.more-margin {
    margin-top: 1.875rem;
  }

  p+ul {
    margin-top: 0.75rem;
  }

  ul {
    padding-left: 1rem;

    >li {
      list-style-type: disc;
      /*list-style-position: inside;*/
    }

    &>li+li {
      margin-top: 0.625rem;
    }
  }
}

.bg-green {
  background-color: var(--color-light-green);
}

.bg-white {
  background-color: #fff;
}

.three-dots {
  display: flex;
  margin-top: 1.875rem;
  column-gap: 0.625rem;

  &.white div {
    background-color: #fff;
  }

  &.green div {
    background-color: var(--color-light-green);
  }

  div {
    width: 2rem;
    height: 2rem;
    border-radius: 2rem;

    &:nth-child(1) {
      opacity: 0.4;
    }

    &:nth-child(2) {
      opacity: 0.6;
    }

    &:nth-child(3) {
      opacity: 0.8;
    }
  }
}

@media (min-width: 50em) {
  #about-me {
    position: relative;
  }

  #about-me>.section-container>div:first-of-type {
    display: flex;
    justify-content: space-between;
  }

  #about-me>.section-container {
    position: relative;
  }

  #about-me-image {
    order: 2;
    margin-top: -10%;
  }

  .image-container::before {
    rotate: 20deg !important;
  }

  #about-me-text {
    max-width: 31.25rem;
  }

  #about-me-image {

    >div:first-child,
    >div:last-child {
      width: 2.8125rem;
    }
  }

  h2 {
    font-size: 2.5rem;
  }
}

footer {
  background-color: var(--color-dark-green);
  color: var(--color-light-green);
  padding: 1.875rem;
  font-size: 1rem;

  >div>div:first-child {
    display: flex;
    flex-direction: column;
    align-items: baseline;
    gap: 1.25rem;
  }

  img {
    height: 5rem;
  }

  a {
    color: var(--color-light-green)
  }

  p {
    font-size: 0.875rem;
    margin-top: 1.875rem;
  }

  .footer-navigation li+li {
    margin-top: 0.625rem;
    display: block;
  }

}

@media screen and (min-width: 43.75em) {
  footer {
    font-size: 1.125rem;

    >div>div:first-child {
      flex-direction: row;
      align-items: initial;
      justify-content: space-between;
    }
  }
}

@media screen and (width > 41.25em) {
  #psihoterapija a:last-of-type {
    margin-top: 1.875rem;
  }
}

#square-echo {
  max-width: 25rem;
  position: relative;
  margin-bottom: calc(5.4375rem + 1.875rem);

  >ul {
    position: relative;
    background: white;
    padding: 2.1875rem calc(1rem + 2.1875rem);
    border-radius: 1.25rem;
    z-index: 100;
  }

  >div.echo {
    width: 100%;
    height: 100%;
    background: white;
    position: absolute;
    left: 0;
    border-radius: 1.5625rem;
  }

  >div:nth-child(1) {
    top: 2.8125rem;
    opacity: 0.6;
    z-index: 10;
  }

  >div:nth-child(2) {
    top: 5.625rem;
    opacity: 0.3;
    z-index: 5;
  }

  @media screen and (width > 41.25em) {
    margin-bottom: 1.875rem;

    #psihoterapija>a:last-of-type {
      margin-top: 2.5rem;
    }

    >div.echo {
      top: 0;
    }

    >div:nth-child(1) {
      left: 2.8125rem;
      opacity: 0.6;
      z-index: 10;
    }

    >div:nth-child(2) {
      left: 5.625rem;
      opacity: 0.3;
      z-index: 5;
    }
  }
}

.image-container {
  display: flex;
  align-self: center;
  margin-bottom: 2.5rem;
  margin-top: 1.875rem;

  img {
    position: relative;
    z-index: 100;
    border-radius: 1.5625rem;
  }

  >div:first-of-type,
  >div:last-of-type {
    width: 1.25rem;
  }

  >div.image {
    position: relative;
    flex: 1;
    max-width: 18.75rem;
  }
}

.image-container>.image::before {
  content: "";
  display: block;
  height: 100%;
  background-color: #fff;
  position: absolute;
  width: 100%;
  border-radius: 1.5625rem;
  rotate: 10deg;
}

@media screen and (min-width: 50em) {
  section#o-meni {
    padding-bottom: 4.6875rem;
  }

  section.with-image>div {
    display: grid;
    grid-template-areas:
      "title title img"
      "text text img"
      "text text img"
      "dots . ."
    ;

    h2 {
      grid-area: title;
    }

    p {
      max-width: 31.25rem;
    }

    .image-container {
      grid-area: img;
      margin-bottom: 0;
      margin-top: 0;
    }

    .three-dots {
      grid-area: dots;
    }
  }
}

form {
  display: flex;
  flex-direction: column;
  max-width: 25rem;

  label:not(:first-of-type) {
    margin-top: 1.25rem;
  }

  input,
  textarea {
    background-color: #fff;
    border: 1px solid var(--color-black);
    padding-left: 0.625rem;
    margin-top: 0.625rem;
  }

  textarea {
    padding: 0.625rem;
  }

  input {

    &[type=text],
    &[type=email] {
      height: 2.625rem;
    }

    &[type=checkbox] {
      width: 2.625rem;
      height: 2.625rem;
      margin: 0;
      border: 1px solid var(--color-black);
    }
  }

  #conditions-container {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    cursor: pointer;

    >span {
      flex: 1;
    }
  }

  button {
    background-color: var(--color-blue);
    border: 2px solid var(--color-blue);
    color: #fff;
    padding: 0.5rem 1.25rem;
    cursor: pointer;
    width: min-content;
    margin-top: 1.25rem;

    &:hover {
      background-color: #fff;
      color: var(--color-blue);
    }
  }
}

@media screen and (width >=53.125em) {
  main#contact {
    display: flex;
    flex-direction: row;
    justify-content: center;
    background-color: var(--color-light-green);

    section {
      max-width: 29.6875rem;
      flex: 1;
    }
  }
}

#map {
  height: 25rem;
  margin-top: 1.875rem;
}

#errorsContainer,
#success {
  background: white;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

#success {
  border: 5px solid var(--color-dark-green);
}

#errorsContainer {
  border: 5px solid var(--color-red);
  display: flex;

  >span:first-child {
    font-size: 5rem;
    color: var(--color-red);
  }

  #errors {
    padding-left: 1.25rem;
  }
}

#line {
  display: none;
}

@media screen and (width >=50em) {
  #line {
    display: initial;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    pointer-events: none;

    >div {
      position: absolute;
      height: 100%;
      width: 100%;
      overflow: hidden;

      svg {
        width: 100%;
        position: absolute;
        bottom: 3.125rem;
        max-width: 120rem;
        left: 50%;
        transform: translateX(-50%);

        path {
          position: absolute;
          bottom: 0;
          stroke: #fff;
          stroke-width: 5;
          fill: none;
        }
      }
    }
  }
}

@media screen and (width >=62.5em) {
 #line>div svg {
  bottom: -2px;
 }
}

@media screen and (width >=93.75em) {
 #line>div svg path {
  stroke-width: 3;
 }
}

input:focus-visible,
textarea:focus-visible,
form button:focus-visible {
  outline: 2px solid #7e9387;
}