/* Definim variabilele de css */
:root {
  --text-primary: #101d42;
  --text-secondary: #fbb44c;
  --text-dark: #2b2922;
  --text-light: #eaeaea;
  --text-white: #ffffff;

  --bg-primary: #01013f;
  --bg-secondary: #dfedf5;
  --bg-dark: #141042;
  --bg-light: #ffffff;

  --button-color: #2bb686;

  --fs-large: 18px;
  --fs-medium: 14px;
  --fs-small: 12px;

  --spacing-xl: 42px;
  --spacing-large: 28px;
  --spacing-medium: 16px;
  --spacing-small: 8px;
  --spacing-tiny: 4px;

  --mobile-logo-height: 45px;
}

/* Resetam proprietatile default ale browser-ului */
* {
  box-sizing: border-box;
}

body,
h1,
h2,
h3,
p {
  margin: 0;
  padding: 0;
}

ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

a {
  display: block;
  text-decoration: none;
}

/* Resetam stilurile adaugate by default pe mobile */
input [type="submit"] {
  appearance: none;
  opacity: 1;
}

/* Adaugam proprietatile de fonturi si proprietati de culoare */
body {
  font-family: "Poppins", sans-serif;
}
h1 {
  font-size: 56px;
  color: var(--text-light);
}
h2 {
  font-size: 28px;
  color: var(--text-primary);
}

h3 {
  font-size: 24px;
  color: var(--text-secondary);
}
p {
  font-size: var(--fs-medium);
  color: var(--text-dark);
}

/* Definim clasele reutilizabile */
.container {
  max-width: 1200px;
  min-width: 320px;
  margin: auto;
  padding: var(--spacing-medium);
}

/* Definim layout-ul */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex-grow: 1;
}

/* Stilizam navigatia */
header {
  position: sticky;
  top: 0;
  width: 100%;
  background-color: var(--bg-primary);
  z-index: 2;
}

nav img {
  height: 60px;
  width: auto;
}
nav .logo-link {
  padding: 0;
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav .arrow-down-icon {
  position: absolute;
  font-size: var(--fs-large);
}

nav a {
  color: var(--text-light);
  font-size: var(--fs-small);
  text-transform: uppercase;
  padding: var(--spacing-medium);
}

nav a:hover {
  color: var(--text-secondary);
}

/* Ascundem checkbox-ul pe desktop */
nav input[type="checkbox"] {
  display: none;
}

nav .menu-icon {
  color: var(--text-light);
  display: none;
}

nav ul {
  display: flex;
}

nav ul li {
  position: relative;
}

/* Ascundem by default submeniul */
nav .submenu {
  display: none;
  position: absolute;
  top: calc(100%-var(--spacing-small));
  left: var(--spacing-medium);
  width: 160px;
  background-color: var(--bg-dark);
  padding: var(--spacing-tiny) 0;
  z-index: 3;
}

/* si il aratam la hover pe clasa about-us */
nav .about-us:hover .submenu {
  display: block;
}

nav .submenu a {
  padding: var(--spacing-tiny) var(--spacing-small);
}

/* Stilizarea mobile pentru navigatie */
@media (max-width: 768px) {
  nav img {
    height: var(--mobile-logo-height);
  }

  /* Ascundem link-urile si afisam iconita de meniu + checkbox-ul */
  nav ul {
    display: none;
  }
  nav .menu-icon {
    display: block;
  }

  nav .menu-icon-container {
    position: relative;
  }

  nav input[type="checkbox"] {
    display: block;
    /* Practic afisam checkbox-ul peste iconita de meniu */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* facem checkbox-ul invizibil, insa el este inca prezent pe ecran - pt asta ne folosim de proprietatea opacity:0 */
    opacity: 0;
    /* schimbam modul de afisare a cursorului  */
    cursor: pointer;
  }

  nav input[type="checkbox"]:checked ~ ul {
    display: block;
    width: 100%;
    /* pe mobile facem si meniul sa ramana in pozitie fixa */
    position: fixed;
    top: calc(var(--mobile-logo-height) + 2 * var(--spacing-medium));
    left: 0;
    background-color: var(--bg-dark);
  }

  nav .arrow-down-icon,
  nav .about-us:hover .submenu {
    display: none;
  }
}

/* Stilizam footer-ul */
footer {
  background-color: var(--bg-dark);
}

footer p,
footer a {
  color: var(--text-light);
  text-align: center;
  font-size: var(--fs-medium);
  padding: var(--spacing-small) 0;
}
