/******************************************************/
/* FONTS */
/******************************************************/

/* FontAwesome Icons
  More info: https: //fontawesome.com
  If there is an error, change your href with the main url:
  https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css
*/
@import './font-awesome.min.css';
@import './font-styles.css';

/******************************************************/
/* THEME VARIABLES */
/******************************************************/

:root {
  /* COLOR SCHEME: Light & Dark */
  color-scheme: light dark;

  /* COLORS */
  --color-white: 255, 255, 255;
  --color-black: 0, 0, 0;
  --color-grey: 35, 35, 35;
  --color-grey-dark: 44, 47, 51;
  --color-creme: 227, 220, 209;
  --color-beige: 247, 243, 238;
  --color-gold: 255, 187, 17;
  --color-red: 255, 0, 0;
  --color-orange: 236, 106, 30;
  --color-orange-light: 245, 190, 73;
  --color-blue: 50, 100, 200;
  --color-blue-light: 76, 150, 179;
  --color-green-light: 110, 168, 150;
  --color-green-olive: 161, 182, 123;
  --color-green-dark: 101, 121, 60;

  --color-info: rgb(50, 100, 200);
  --color-error: rgb(200, 100, 100);
  --color-success: rgb(100, 200, 100);
  --color-alert: rgb(250, 250, 100);

  --color-primary: var(--color-black);
  --color-secondary: var(--color-white);
  --color-accent: var(--color-green-olive);
  --color-hover: var(--color-green-dark);

  --color-primary-rgb: rgb(var(--color-primary));
  --color-secondary-rgb: rgb(var(--color-secondary));
  --color-accent-rgb: rgb(var(--color-accent));
  --color-hover-rgb: rgb(var(--color-hover));

  --color-light: var(--color-white);
  --color-light-rgb: rgb(var(--color-light));
  --color-dark: var(--color-grey-dark);
  --color-dark-rgb: rgb(var(--color-dark));

  /* OTHER PROPERTIES */
  --font-family: 'Kreon', 'Norse', 'Segoe UI', 'Calibri', 'Verdana', 'Arial', sans-serif;
  /* --font-family: 'Norse', 'Kreon', 'Segoe UI', 'Calibri', 'Verdana', 'Arial', sans-serif; */
  /* --font-family: 'Segoe UI', 'Kreon', 'Norse', 'Calibri', 'Verdana', 'Arial', sans-serif; */
  --scrollbar-size: 10px;
  --viewport-width: 1200px;

  --header-student-logged-size: 2rem;
  --header-max-height: 60px;
  --header-max-real-height: calc(var(--header-max-height) * 2 + var(--header-student-logged-size));
  --header-max-font-size: 1.5rem;
  --header-footer-border: 1px solid var(--color-dark-rgb);

  --footer-max-height: calc(var(--header-max-height) * 3);

  --font-size: 16px;
  --logo-size: 250px;
  --logo-size-reduced: calc(var(--header-max-height) - 1rem);
  --card-size: 250px;
  --max-icon-size: 1.5rem;
}

.accent {
  color: var(--color-accent-rgb);
  border: 2px solid var(--color-accent-rgb);
}

/******************************************************/
/* GLOBAL: LIGHT THEME */
/******************************************************/

* {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: var(--font-size);
  outline: none;
  text-align: left;
  letter-spacing: 0.25rem;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  font-optical-sizing: auto;
  font-size: var(--font-size);
  letter-spacing: 0.5rem;
  user-select: none;
  color: var(--color-dark);
  background: rgb(var(--color-beige));
  scroll-behavior: smooth;
  overflow-x: hidden;
}

ul {
  list-style: none;
}

.spacer {
  flex: 1;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  padding: 1rem;
  font-weight: bold;
  text-transform: uppercase;
  color: var(--color-accent-rgb);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2.2rem;
}

h3 {
  font-size: 1.9rem;
}

h4 {
  font-size: 1.6rem;
}

h5 {
  font-size: 1.3rem;
}

h6 {
  font-size: 1rem;
}

/* DISPLAY */

.flex {
  display: flex;
  align-items: center;
  justify-content: center;
}

.h-start {
  align-items: flex-start;
}

.h-end {
  align-items: flex-end;
}

.row-mobile,
.row {
  flex-direction: row;
}

.col-mobile,
.col {
  flex-direction: column;
}

/* WIDTH */

.w-full {
  width: 100%;

  &.m,
  &.m-half {
    width: calc(100% - 2rem);
  }
}

.w-half {
  width: 50%;
}

.w-75 {
  width: 75%;
}

/* MARGIN */

.m,
.margin {
  margin: 1rem;
}

.m-half,
.margin-half {
  margin: .5rem 1rem;
}

/* PADDING */

.p,
.padding {
  padding: 1rem;
}

.p-half,
.padding-half {
  padding: .5rem 1rem;
}

/* TEXT */

.t-center {
  text-align: center;
}

.t-left {
  text-align: left;
}

.t-right {
  text-align: right;
}

/* BORDER */

.b,
.border {

  &.w-light {
    --border-width: 1px;
  }

  &.w-normal {
    --border-width: 2px;
  }

  &.w-strong {
    --border-width: 4px;
  }

  &.w-bold {
    --border-width: 5px;
  }

  &.top {
    border-top: var(--border-width) solid var(--color-accent-rgb);
  }

  &.bottom {
    border-bottom: var(--border-width) solid var(--color-accent-rgb);
  }

  &.left {
    border-left: var(--border-width) solid var(--color-accent-rgb);
  }

  &.right {
    border-right: var(--border-width) solid var(--color-accent-rgb);
  }

  &.all {
    border: var(--border-width) solid var(--color-accent-rgb);
  }
}

/* VISIBILITY */

.hidden {
  display: none !important;
}

.no-mobile {
  @media (max-width: 768px) {
    display: none !important;
  }
}

/******************************************************/
/* GLOBAL: DARK THEME */
/******************************************************/

@media (prefers-color-scheme: dark) {
  body {
    color: var(--color-light-rgb);
    background: var(--color-dark-rgb);
  }
}

/******************************************************/
/* INPUTS */
/******************************************************/

input:not([type='checkbox']) {
  min-height: 40px;
  padding: .5rem 1rem;
  font-size: 1rem;
  border-radius: 5px;

  &::placeholder {
    font-style: italic;
  }
}

textarea {
  /* 'field-sizing: content' allows a textarea to adapt the size to the content. Is not yet fully supported */
  /* field-sizing: content; */
  resize: vertical;
  padding: .5rem 1rem;
  font-size: 1rem;
  min-height: 100px;
  max-height: 400px;
  border-radius: 5px;

  &::placeholder {
    font-style: italic;
  }
}

.validate {

  &:active:required:invalid,
  &:focus:required:invalid {
    box-shadow: 0px 0px 10px var(--color-error);
  }

  &:required:valid,
  &:focus:required:valid {
    box-shadow: 0px 0px 10px var(--color-success);
  }
}

/******************************************************/
/* LINKS */
/******************************************************/

.link {
  cursor: pointer;

  &:hover {
    color: var(--color-hover-rgb);

    &.underline {
      text-decoration: underline;
      text-decoration-color: var(--color-hover-rgb);
      text-underline-offset: 0.4em;
    }

    &.shadow {
      text-shadow: 0 0 10px var(--color-hover-rgb);
    }
  }
}

a {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  color: rgba(var(--color-primary), .1);
  text-decoration: none;

  &[target=_blank] {
    font-style: italic;

    &:hover {
      font-style: normal;
      text-decoration: underline;
      color: var(--color-accent-rgb);
    }
  }

  &.icon {
    margin: .5rem;
    padding: 0;
    opacity: 0.75;

    &:hover {
      opacity: 1;
      text-decoration: none;

      i,
      span {
        color: rgba(var(--color-primary), 1);
      }
    }

    i {
      display: flex;
      justify-content: center;
      align-items: center;
      width: 100%;
      min-width: 20px;
      height: 100%;
      min-height: 20px;
      color: var(--color-primary-rgb);
      font-size: var(--max-icon-size);
      text-decoration: none;
    }

    img {
      width: var(--max-icon-size);
      height: var(--max-icon-size);
    }

    span {
      display: flex;
      justify-content: center;
      align-items: center;
      width: 100%;
      max-width: 50px;
      margin: 0 .5rem;
      padding: 0;
      margin: 0;
      color: var(--color-primary-rgb);
      font-size: var(--header-max-font-size);
      font-weight: bold;
    }
  }
}

/******************************************************/
/* IMAGE */
/******************************************************/

.img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 5px;

  &.right {
    float: right;
  }

  &.left {
    float: left;
  }

  &.wide {
    aspect-ratio: 16/9;
  }

  &.max-size {
    max-width: 500px;
    max-height: 800px;
  }
}

.back-shadow::after {
  background: inherit;
  position: absolute;
  content: '';
  filter: blur(25px) saturate(1.5);
  width: 100%;
  height: 100%;
  scale: 1.05;
  z-index: -1;
}

/******************************************************/
/* BUTTON */
/******************************************************/

.btn {
  --color-text: var(--color-dark);
  --color-background: var(--color-light);

  display: flex;
  flex-direction: row;
  text-align: center;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  width: calc(100% - 4rem);
  min-height: 40px;
  margin: 1rem;
  padding: 1rem;
  letter-spacing: .25rem;
  font-weight: bold;
  color: rgb(var(--color-text));
  background: rgba(var(--color-background), .85);
  box-shadow: 0 0 10px rgba(var(--color-text), .5);
  border: none;
  border-radius: 1rem;
  text-decoration: none !important;
  transform: scale(.95);
  transition: all 0.5s ease-in-out;
  cursor: pointer;

  &:hover {
    transform: scale(1);
    color: rgb(var(--color-background)) !important;
    background: rgba(var(--color-accent), .85) !important;
  }

  &.submit,
  &.seeMore {
    display: flex;
    justify-content: center;
    text-transform: uppercase;
    text-align: center;

    span {
      text-align: center;
      width: 100%;
    }

    .icon {
      position: absolute;
      left: 25px;
      display: flex;
      width: 1.5rem;
      height: 1.5rem;
      margin: .5rem;
      font-size: 1.5rem;
      align-items: center;
      justify-content: center;
    }
  }

  &.seeMore {
    font-size: 1.5rem;
  }

  &.logout {
    max-width: fit-content;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    margin-left: .5rem;
  }

  &.download {
    width: fit-content;
    padding: 0.5rem 1rem;
    margin-left: .5rem;
    font-size: 1.2rem;
    text-transform: uppercase;

    .icon {
      font-size: 1.2rem;
      margin-right: .5rem;
    }
  }

  span {
    text-align: left;
    word-wrap: break-word;
  }
}

#scrollToTopBtn {
  position: fixed;
  bottom: calc(var(--footer-max-height) - 5rem);
  right: 0;
  width: 50px;
  height: 50px;
  font-size: 1rem;
  padding: 1rem;
  font-weight: bold;
  background-color: var(--color-accent-rgb);
  color: var(--color-primary-rgb);
  border-radius: 50% 0 0 50%;
  border: none;
  outline: none;
  opacity: 0;
  cursor: pointer;
  z-index: 99;

  animation: hide-seek linear both;
  animation-timeline: scroll();
  animation-range: 0 100vh;
}

/******************************************************/
/* MESSAGE */
/******************************************************/

.msg {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  color: var(--color-dark-rgb);

  &.absolute {
    position: absolute;
    text-align: right;
  }

  &.fixed {
    position: fixed;
    justify-content: center;
    align-items: center;
    text-align: center;
    line-height: 1rem;
    width: calc(100% - 2rem);
    height: 5rem;
    min-height: 50px;
    padding: 1rem;
    color: var(--color-dark-rgb);
    font-size: 1rem;
    letter-spacing: .15rem;
    font-weight: 700;
    z-index: 999999;
  }

  &.back-info {
    background: var(--color-info);
  }

  &.back-success {
    background: var(--color-success);
  }

  &.back-error {
    background: var(--color-error);
  }

  &.back-alert {
    background: var(--color-alert);
  }

  &.left {
    left: 0;
  }

  &.top {
    top: 0;
  }

  &.right {
    right: 0;
  }

  &.bottom {
    bottom: 0;
  }

  &.border-radius {
    border-radius: 2rem;
  }

  a {
    display: contents;
    color: var(--color-dark-rgb);
    text-decoration: underline !important;
  }

  .icon {
    --icon-size: 3rem;

    display: flex;
    justify-content: center;
    align-items: center;
    width: var(--icon-size);
    height: var(--icon-size);
    margin: .5rem;
    margin-left: 1.5rem;
    font-size: var(--icon-size);
    color: var(--color-dark-rgb);
  }
}

/******************************************************/
/* MAIN SECTIONS */
/******************************************************/

main {
  --main-padding: 2rem;

  display: grid;
  min-height: 100dvh;
  grid-template-rows: 1fr;
  width: calc(100% - (var(--main-padding) * 2));
  max-width: var(--viewport-width);
  padding: 100vh var(--main-padding) var(--main-padding);
  margin: 0 auto;

  &.full-width {
    width: 100% !important;
    max-width: 100% !important;
    padding: 100vh 0 0;
  }
}

.title p {
  margin: 0;
  font-size: 20px;
  font-weight: normal;
}

section {
  position: relative;
  width: 100%;
  max-width: var(--viewport-width);
  margin: 5rem auto;

  h1 {
    font-size: 2.5rem;
  }

  p {
    line-height: 1.5rem;
  }
}

.grouped {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  width: 100%;

  &.col {
    flex-direction: column;
  }

  &.row {
    flex-direction: row;
  }
}

.description {
  --description-font-size: 1.1rem;

  display: block;
  width: 75%;
  margin: .5rem auto;
  padding: 1rem;
  font-size: var(--description-font-size);
  line-height: 1.5rem;
  letter-spacing: .1rem;

  &.full {
    width: calc(100% - 2rem);
  }

  a,
  b,
  i,
  u {
    display: inline;
    font-size: var(--description-font-size);
  }

  b {
    font-weight: bold;
  }

  a {
    color: var(--color-accent-rgb);
    font-weight: bold;
    text-decoration: none !important;
    border-bottom: 1px solid var(--color-accent-rgb);
  }

  ul {
    list-style: disc;
    padding: 0 1rem;

    li {
      margin: 1rem auto;
    }

    &.checklist {
      list-style: none;

      li::before {
        content: "✔";
        color: #2ecc71;
        font-weight: bold;
        margin-right: 8px;
      }
    }
  }
}

.policy-and-terms {
  text-align: left !important;
  font-size: 1rem;
  letter-spacing: .1rem;

  a,
  i,
  b,
  strong {
    font-size: 1rem;
    letter-spacing: .1rem;
  }

  b,
  strong {
    font-weight: bold;
    text-transform: uppercase;
  }

  h1 {
    text-align: center;
    line-height: 3rem;
  }

  a {
    font-style: italic;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
    border-bottom: 1px solid transparent;

    &:hover {
      border-bottom-color: var(--color-accent-rgb);
    }
  }
}

/******************************************************/
/* LOADING */
/******************************************************/

#loadingOverlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;

  .spinner {
    width: 5rem;
    height: 5rem;
    border: 2.5rem solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--color-accent-rgb);
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }
}

/******************************************************/
/* CLASS COLORS */
/******************************************************/

.red {
  color: rgb(var(--color-red));
}

small {
  width: calc(100% - 2rem);
  margin: .5rem auto;
  padding: .5rem;
  text-align: center;
  font-size: 1rem;
  cursor: default;
  user-select: none;
  border-top: 1px dashed transparent;
  border-bottom: 1px dashed transparent;

  &:not(.error, .success, .alert) {
    font-weight: bold;

    &:hover {
      border-color: var(--color-accent-rgb);
    }
  }

  &.error,
  &.success,
  &.alert {
    text-transform: uppercase;
    font-weight: 700;
  }

  &.large,
  &.large span,
  &.large a,
  &.large i,
  &.large u,
  &.large b {
    font-size: 1.1rem;
    line-height: 2rem;
  }

  a {
    display: inline-block;
    color: var(--color-accent-rgb);
    text-decoration: none !important;
    border-bottom: 1px solid var(--color-accent-rgb);
  }

  i,
  u,
  b {
    padding: .15rem .5rem;
    color: var(--color-accent-rgb);
  }
}

.error {
  color: var(--color-error);
}

.success {
  color: var(--color-success);
}

.alert {
  color: var(--color-alert);
}

.shadow {
  box-shadow: 0px 0px 10px var(--color-secondary-rgb);
}

/******************************************************/
/* SCROLLBAR */
/******************************************************/

::-webkit-scrollbar {
  -webkit-appearance: none;
}

::-webkit-scrollbar:vertical {
  width: var(--scrollbar-size);
}

::-webkit-scrollbar:horizontal {
  height: var(--scrollbar-size);
}

::-webkit-scrollbar-thumb {
  background-color: var(--color-accent-rgb);
  border-radius: 0;
}

::-webkit-scrollbar-track {
  border-radius: 0px;
  background-color: var(--color-secondary-rgb);
}

/******************************************************/
/* SELECTION */
/******************************************************/

::selection {
  color: var(--color-secondary-rgb);
  background: var(--color-accent-rgb);
}

pre ::selection {
  color: var(--color-primary-rgb);
}

/******************************************************/
/* ANIMATIONS */
/******************************************************/

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(48px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes move {
  to {
    transform: translateX(var(--max-scroll-distance));
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

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

/* Antoher option: @media (width <= 1200px) */
@media screen and (max-width: 1200px) {

  :root {
    --max-icon-size: 1.5rem;
  }

  .grouped {
    flex-direction: column !important;

    div {
      width: calc(100% - 1rem);
    }
  }

  .description {
    width: 100%;
    padding: 0;
    text-align: center;
  }
}

@media (hover: none) {

  :root {
    --max-icon-size: 1.2rem;
    --font-size: 14px;
  }

  main {
    --main-padding: 1rem;
  }

  .btn.seeMore {
    font-size: 1.2rem;

    .icon {
      font-size: 1.2rem;
    }
  }

  .language,
  a,
  i,
  .icon,
  span {
    opacity: 1 !important;
  }
}