:root {
  --primary-color: #191919;
  --primary: #408CF9;
  --white: #FFFFFF;
  --sidebar-primary-hover: #2B2B2F;
  --sidebar-background: #141318;
  --background: #F3F5F6;
  --text-link: #FFFFFF;
  --expand-button: #408CF9;
  --logout: #FA7575;
  --search-background: #2B2B2F;
}

.layout {
  display: grid;
  grid-template-rows: 60px 60px  auto 60px;
  grid-template-columns: 1fr;
  grid-template-areas: 'header' 'nav' 'main';
  height: 100vh;
}

.header {
  display: flex;
  background-color: #A01212;
  border-radius: 1.5rem;
  color: #f3e6d4;
  font-size: 20px;
  font-weight: bold;
}

body.dark .header,
body.dark .section__gallery .eslogan__text {
  background-color: #571d0f;
}

.titulo {
  display: flex;
  width: 95%;
  justify-content: center;
  align-items: center;
}

.content__button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5%;
  height: 100%;
}

.mode__icon svg{
  max-width: 2.5rem;
  color: #FFFFFF !important;
}

body.dark .mode__icon svg {
  color: #000000 !important;
}

.button__mode {
  display: none;
  width: 95%;
  height: 90%;
  border-radius: 23px;
  cursor: pointer;
  background-color: #571d0f;
  color: #f3e6d4;
  border: none;
}

#botton__mode.clicked {
  background-color: #A01212;
}

.img__logo {
  position: relative;
  max-width: 75%;
  max-height: 75%;
  border-radius: 1.5rem;
  animation: deslizarDesdeAbajo 0.4s ease-in-out;
}

@keyframes deslizarDesdeAbajo {
  0% {
      transform: translateY(50%);
  }
  100% {
      transform: translateY(0);
  }
}

body {
  font-family: 'Work Sans', sans-serif;
  font-size: 16px;
  padding: 1rem;
  height: 100%;
  background: var(--background);
  transition: .3s ease all;
}

.dark {
  background-color: #1f2124;
}

html {
  height: 100%;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

main {
  display: grid;
  margin-top: -50px;
  margin-left: 305px;
  transition: margin-left 0.2s ease-in-out;
}

.main__section {
  padding: 0.5rem;
}

body.collapsed main {
  margin-left: 100px;
}

.sidebar {
  position: sticky;
  top: 0;
  left: 0;
  min-height: 50rem;
  height: 100%;
  padding: 1.5rem 1rem;
  border-radius: 1.5rem;
  user-select: none;
  max-width: 18rem;
  min-width: 4rem;
  display: flex;
  color: var(--white);
  flex-direction: column;
  background-color: var(--sidebar-background);
  transition: max-width 0.2s ease-in-out;
  margin-top: 1rem;
}

body.dark .sidebar {
  box-shadow: 0 5px 12px rgba(255, 255, 255, 0.5);
}

body.collapsed .sidebar {
  max-width: 5rem;
  display: flex;
}

body.collapsed .hide {
  position: absolute;
  visibility: hidden;
}

/*? search wrapper */
.search_wrapper {
  position: relative;
}

.search_wrapper input {
  background-color: var(--search-background);
  min-height: 3rem;
  width: 100%;
  color: var(--text-link);
  border-radius: 0.75rem;
  padding-left: 2.75rem;
  font-size: 1.4rem;
  border: none;
}

.search_wrapper svg {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 0.75rem;
  width: 1.5rem;
  height: 1.5rem;
  stroke: var(--text-link);
  transform: translateY(-50%);
  pointer-events: none;
}

/*? sidebar top */
.sidebar-top-wrapper {
  display: flex;
  background-color: var(--primary-color-light);
}

.sidebar-top {
  position: relative;
  display: flex;
  align-items: start;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
  height: 4rem;
  padding-bottom: 1rem;
}

.logo_wrapper {
  display: flex;
  align-items: center;
  color: var(--text-link);
  font-weight: 700;
  text-decoration: none;
  font-size: 1.35rem;
  padding: 0 0.6rem;
  gap: 0.75rem;
}

.logo-small {
  height: 2rem;
  width: 2rem;
  overflow: hidden;
  object-fit: cover;
}

.company-name {
  white-space: nowrap;
}

/*? menu links */
.sidebar-links {
  margin-top: 1rem;
}

.sidebar-links ul {
  list-style-type: none;
  position: relative;
  display: flex;
  row-gap: 0.5rem;
  flex-direction: column;
}

.sidebar-links li {
  color: var(--text-link);
  min-width: 3rem;
}

.sidebar-links li svg {
  stroke: var(--text-link);
  width: 1.75rem;
  height: 1.75rem;
  min-width: 1.75rem;
}

.sidebar-links li a:hover {
  background-color: var(--sidebar-primary-hover);
}

.sidebar-links li a {
  color: var(--text-link);
  width: 100%;
  padding-left: 0.6rem;
  font-size: 1.25rem;
  display: flex;
  gap: 0.75rem;
  border-radius: 0.75rem;
  justify-content: start;
  align-items: center;
  min-height: 3.25rem;
  text-decoration: none;
  transition: background-color 0.2s ease-in-out;
}

.sidebar-links li a .link {
  overflow: hidden;
  white-space: nowrap;
  animation: fadeIn 0.2s ease-in-out;
}

.sidebar-links .active:hover {
  background-color: var(--sidebar-primary-hover);
}

.sidebar-links .active {
  text-decoration: none;
  background-color: var(--sidebar-primary-hover);
  color: var(--text-link);
}

.sidebar-links .active svg {
  stroke: var(--text-link);
}

/* ?tooltip */
.tooltip {
  position: relative;
}

.tooltip .tooltip_content::after {
  content: " ";
  position: absolute;
  top: 50%;
  left: 0%;
  margin-left: -9px;
  margin-top: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent var(--primary-color) transparent transparent;
}

.tooltip .tooltip_content {
  visibility: hidden;
  background-color: var(--primary-color);
  color: var(--white);
  text-align: center;
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  position: absolute;
  z-index: 1;
  left: 4.5rem;
}

.collapsed .tooltip:hover .tooltip_content {
  visibility: visible;
}

.collapsed .tooltip:focus .tooltip_content {
  visibility: visible;
}

/*? profile part */
.sidebar_profile {
  display: none;
  align-items: center;
  gap: 0.75rem;
  flex-direction: row;
  color: var(--text-link);
  overflow-x: hidden;
  min-height: 2.5rem;
  margin-top: auto;
}

.avatar_wrapper {
  position: relative;
  display: flex;
}

.avatar {
  display: block;
  width: 3rem;
  height: 3rem;
  object-fit: cover;
  cursor: pointer;
  border-radius: 50%;
  border: 3px solid transparent;
  transition: all 0.2s ease-in-out;
}

.avatar:hover {
  border: 3px solid var(--primary);
}
/*
:root {
  --primary-color: #191919;
  --primary: #408CF9;
  --white: #FFFFFF;
  --sidebar-primary-hover: #2B2B2F;
  --sidebar-background: #141318;
  --background: #F3F5F6;
  --text-link: #FFFFFF;
  --expand-button: #408CF9;
  --logout: #FA7575;
  --search-background: #2B2B2F;
} */
.avatar_name {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  white-space: nowrap;
}

.user-name {
  font-weight: 600;
  text-align: left;
  color: var(--text-link);
}

.email {
  color: var(--text-link);
  font-size: 0.8rem;
}

.logout {
  margin-left: auto;
}

.logout svg {
  color: var(--logout);
}

/*? Expand button */
.expand-btn {
  position: absolute;
  display: grid;
  place-items: center;
  cursor: pointer;
  background-color: var(--expand-button);
  z-index: 2;
  right: -1rem;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 50%;
}

.expand-btn svg {
  transform: rotate(-180deg);
  stroke: var(--white);
  width: 1.25rem;
  height: 1.25rem;
}

body.collapsed .expand-btn svg {
  transform: rotate(-360deg);
}

@keyframes fadeIn {
  from {
    width: 4rem;
    opacity: 0;
  }

  to {
    opacity: 1;
    width: 100%;
  }
}

.section__one {
  display: flex;
  height: 820px;
}

.text__eslogan {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #4E1397;
  color: #FEA904;
  height: 650px;
  border-radius: 1.5rem;
  font-size: 1.5rem;
  padding: 2rem;
}

body.dark .text__eslogan {
  background-color: #321850;
  color: #7f581c;
}

.image {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f3e6d4;
  border-radius: 1.5rem;
  width: 100%;
}

body.dark .section__one .image,
body.dark .section__gallery {
  background-color: #79736b;
}

.img__logo {
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.5);
}

.section__one .content {
  display: flex;
  padding: 1rem;
  width: 50%;
  background-color: #FEA904;
  color: #A01212;
  border-radius: 1.5rem;
  align-items: center;
  justify-content: center;
}

body.dark .section__one .content {
  background-color: #7f581c;
  color: #571d0f;
}

.eslogan__text {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30%;
  background-color: #A01212;
  margin: 1rem;
  border-radius: 1.5rem;
  padding: 1.5rem;
  color: #f3e6d4;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.5);
}
/*Media queries

@media (max-width: 480px) {
  .layout {
    display: grid;
    grid-template-rows: 60px auto 60px;
    grid-template-columns: 160px auto;
    grid-template-areas:
      'header header header'
      'nav main main'
  }
}
*/
/*---------------------------------------------CSS DE TARJETAS----------------------------------------------*/

.section__gallery {
  display: flex;
  background-color: #f3e6d4;
  border-radius: 1.5rem;
}

.gallery__cards {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 650px;
  width: 70%;
}

.gallery {
  display: flex;
  gap: 1rem;
  max-width: 80rem;
}

.card {
  position: relative;
  left: 0;
  width: 12rem;
  border-radius: 1.2rem;
  height: 30rem;
  overflow: hidden;
  background-color: var(--background);
  transition: 0.4s ease-in-out;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.3);
  flex: 0.25;
}

.card img {
  position: relative;
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.card:hover {
  flex: 1; /*Tamano de la imagen al poner el mouse encima; el valor era 2*/
  font-weight: bold;
  cursor: pointer;
  border-radius: 1rem;
}

/* polish images center 
.card:nth-child(1) img {
  left: -8rem;
}

.card:nth-child(2) img {
  left: -6rem;
}

.card:nth-child(3) img {
  left: -14rem;
}

.card:nth-child(4) img {
  left: -8rem;
}
*/
/*--------------------------------MEDIA QUERIES-----------------------------------*/

@media (max-width: 768px) {
  .layout {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .header {
    min-height: 3rem;
    font-size: 15px;
  }

  .titulo {
    width: 85%;
  }

  .content__button {
    width: 15%;
  }

  .mode__icon svg {
    max-width: 1.5rem;
  }

  .sidebar {
    position: static;
    margin-top: 0;
  }

  .expand-btn {
    display: none;
  }

  .layout header {
    font-size: 24px;
    height: 20rem;
  }

  .sidebar {
    display: flex;
    max-width: 100%;
    min-width: 0;
    min-height: 50vh;
  }
  .main__section {
    margin: 0px;
  }

  .content__text {
    text-align: center;
  }
  .section__one {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .section__one .content {
    width: 100%;
  }

  .text__eslogan {
    font-size: 25px;
    text-align: center;
    height: 500px;
  }

  .text__eslogan h1 {
    margin-left: 0.7rem;
    margin-right: 0.7rem;
  }
  .section__gallery {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .gallery {
    display: flex;
    flex-direction: column;
    width: 75%;
  }

  .gallery__cards {
    width: 100%;
    height: 80rem;
  }

  .card {
    width: 100%;
    height: 18rem;
    flex: none;
  }

  .card img {
    width: 100%;
    height: 100%;
  }

  .eslogan__text {
    width: 100%;
    font-size: 1rem;
    margin: 0;
  }
}