/*========== GOOGLE FONTS ==========*/
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap");

/*========== VARIABLES CSS ==========*/
:root {
  --header-height: 3.5rem;
  --nav-width: 219px;

  /*========== Colors ==========*/
  --first-color: #6923D0;
  --first-color-light: #F4F0FA;
  --title-color: #19181B;
  --text-color: #58555E;
  --text-color-light: #A5A1AA;
  --body-color: #F9F6FD;
  --container-color: #FFFFFF;

  /*========== Font and typography ==========*/
  --body-font: 'Poppins', sans-serif;
  --normal-font-size: .938rem;
  --small-font-size: .75rem;
  --smaller-font-size: .75rem;

  /*========== Font weight ==========*/
  --font-medium: 500;
  --font-semi-bold: 600;

  /*========== z index ==========*/
  --z-fixed: 100;
}

@media screen and (min-width: 1024px) {
  :root {
    --normal-font-size: 1rem;
    --small-font-size: .875rem;
    --smaller-font-size: .813rem;
  }
}

/*========== BASE ==========*/
*, ::before, ::after { box-sizing: border-box; }

body {
  margin: var(--header-height) 0 0 0;
  padding: 1rem 1rem 0;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--text-color);
}

h3 { margin: 0; }
a { text-decoration: none; }
img { max-width: 100%; height: auto; }

/*========== HEADER ==========*/
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--container-color);
  box-shadow: 0 1px 0 rgba(22, 8, 43, 0.1);
  padding: 0 1rem;
  z-index: var(--z-fixed);
}

.header__container {
  display: flex;
  align-items: center;
  height: var(--header-height);
  justify-content: space-between;
}

.header__img { width: 35px; height: 35px; border-radius: 50%; }

.header__logo { color: var(--title-color); font-weight: var(--font-medium); display: none; }

.header__toggle { font-size: 1.2rem; }

.header__toggle { color: var(--title-color); cursor: pointer; }

/*========== NAV ==========*/
.nav {
  position: fixed;
  top: 0;
  left: -100%;
  height: 100vh;
  padding: 1rem 1rem 0;
  background-color: var(--container-color);
  box-shadow: 1px 0 0 rgba(22, 8, 43, 0.1);
  z-index: var(--z-fixed);
  transition: left .35s ease, width .25s ease;
  border-top-right-radius: .9rem;
  border-bottom-right-radius: .9rem;
}

.nav__container {
  height: 100%;
  display: grid;
  grid-template-rows: 4rem 1fr 4rem;
  padding-bottom: 4rem;
  overflow: auto;
  scrollbar-width: none; /* For mozilla */
}

.nav__container::-webkit-scrollbar { display: none; }

.nav__logo { font-weight: var(--font-semi-bold); margin-bottom: 2.5rem; }

.nav__list, .nav__items { display: grid; }

.nav__subtitle {
  font-size: var(--normal-font-size);
  text-transform: uppercase;
  letter-spacing: .1rem;
  color: var(--text-color-light);
}

.nav__link {
  display: flex;
  align-items: center;
  color: var(--text-color);
  padding: .85rem .75rem .85rem 0;
  transition: color .2s ease;
}

.nav__link:hover { color: var(--first-color); }

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

.nav__name {
  font-size: var(--small-font-size);
  font-weight: var(--font-medium);
  white-space: nowrap;
}

.nav__logout { margin-top: 5rem; }

/*========== DROPDOWN (base) ==========*/
.nav__dropdown { /* wrapper for trigger + collapse */ }

.nav__dropdown-collapse {
  background-color: var(--first-color-light);
  border-radius: .25rem;
  overflow: hidden;
  max-height: 0;
  margin-top: 0;
  transition: max-height .3s ease, margin-top .3s ease;
}

.nav__dropdown-content { display: grid; }

.nav__dropdown-item {
  font-size: var(--smaller-font-size);
  font-weight: var(--font-medium);
  color: var(--text-color);
  padding: .75rem 2.5rem .75rem 1.8rem;
}

.nav__dropdown-item:hover { color: var(--first-color); }

.nav__dropdown-icon { margin-left: auto; transition: transform .3s ease, opacity .3s ease; }

/*===== Show menu (mobile) =====*/
.show-menu { left: 0; }

/*===== Active link =====*/
.active { color: var(--first-color); }

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

/* ==================== MOBILE & TABLET: CLICK-BASED DROPDOWNS ==================== */
@media screen and (max-width: 767px) {
  /* show on class added by JS */
  .nav__dropdown.show-dropdown .nav__dropdown-collapse {
    max-height: 50vh;
    margin-top: 1rem;
  }
  .nav__dropdown.show-dropdown .nav__dropdown-icon { transform: rotate(180deg); }
}

/* ==================== DESKTOP: HOVER BEHAVIOR (jak wcześniej) ==================== */
@media screen and (min-width: 768px) {
  body { padding: 1rem 3rem 0 6rem; }
  .header { padding: 0 3rem 0 6rem; }
  .header__container { height: calc(var(--header-height) + .5rem); }
  .header__toggle { display: none; }
  .header__logo { display: block; }
  .header__img { width: 40px; height: 40px; order: 1; }

  .nav {
    left: 0;
    padding: 1.2rem 1.5rem 0;
    width: 70px; /* Reduced navbar */
  }

  .nav__icon { font-size: 1.3rem; }

  /* Element opacity like before */
  .nav__logo-name, .nav__name, .nav__subtitle, .nav__dropdown-icon {
    opacity: 0;
    transition: opacity .3s ease;
  }
  
  /* Navbar expanded on hover */
  .nav:hover { width: var(--nav-width); }
  
  /* Visible elements on hover */
  .nav:hover .nav__logo-name,
  .nav:hover .nav__subtitle,
  .nav:hover .nav__name,
  .nav:hover .nav__dropdown-icon { opacity: 1; }

  /* DESKTOP DROPDOWN: open on hover (jak wcześniej) */
  .nav__dropdown:hover .nav__dropdown-collapse {
    max-height: 60vh;
    margin-top: 1rem;
  }
  .nav__dropdown:hover .nav__dropdown-icon { transform: rotate(180deg); }
}

.hero{
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 1.5rem;
}

.hero-text{
  background-color: white;
  padding: 1rem;
  border-radius: .9rem;
  box-shadow: 50%;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  display: grid;
  grid-template-rows: 1fr 1fr 1fr;
  row-gap:  1rem;
}

.content-text{
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  background-color: white;
  padding: 1rem;
  border-radius: .9rem;
}

.hero-select{
  border: 1px solid black;
  border-radius: .9rem;
  height: 40px;

}
.hero-label{
  font-size: 12px;
}

.hero-text1{
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  background-color: white;
  padding: 1rem;
  border-radius: .9rem;
  display: grid;
  grid-template-columns: 1fr 30%;
  grid-template-rows: 1fr 1fr 1fr 1fr;
}

.parent {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(4, 1fr);
  grid-column-gap: 0px;
  grid-row-gap: 0px;
  background-color: white;
}

.div1 { 
  grid-area: 1 / 1 / 2 / 2;
  background-color: green;
}
.div2 {
   grid-area: 2 / 1 / 3 / 2; 
   background-color: rgb(128, 128, 0);
  }
.div3 {
   grid-area: 3 / 1 / 4 / 2; 
   background-color: rgb(184, 28, 28);
  }
.div4 { 
  grid-area: 4 / 1 / 5 / 2; 
  background-color: rgb(165, 32, 125);
}
.div5 {
   grid-area: 1 / 2 / 5 / 3; 
   background-color: rgb(37, 27, 133);
  }
