@import url("variables.css");

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

body {
  font-family:var(--fonte-principal);
  font-size: var(--tamanho-texto-xl);
  background-color: var(--cor-fundo);
  color: var(--cor-texto);
}


a {
  text-decoration: none;
  color: var(--cor-texto);
}

#theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--cor-texto);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  padding: 0.5rem;
}

#theme-toggle i {
  display: none;
}

body.light #theme-toggle .fa-moon {
  display: inline-block;
}

body:not(.light) #theme-toggle .fa-sun {
  display: inline-block;
}


/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2.5rem;
  background-color: var(--cor-secundaria);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin: 0 auto;
}

.logo {
  font-size: 24px;
  font-weight: bold;
}

.search-bar {
  width: 100%; */
  padding: 10px;
  border-radius: 5px;
}

.search-bar-logo {
  display: flex;

  align-items: center;
  gap: 10px;
}

.search-container {
  background-color: var(--cor-terciaria);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 5px;
  flex-grow: 1;
  max-width: 50%;
  margin: 0 1rem;
}

.search-container i {
  color: var(--cor-cinza-escuro);
}

.admin-link {
  display: flex;
  gap: 1rem;
}

input.search-bar {
  background: transparent;
  border-style: none;
  outline: none;
  color:var(--cor-texto)
  font-size: 20px;
}

#theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--cor-texto);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  padding: 0.5rem;
}

#theme-toggle i {
  display: none;
}

body.dark #theme-toggle .fa-sun {
  display: inline-block;
}

body:not(.dark) #theme-toggle .fa-moon {
  display: inline-block;
}

/* Main */
main {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Banner */
.banner {
  margin-top: 7rem;;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: 260px;
  background-color: var(--cor-terciaria); 
}

.banner-image {
  max-width: 100%;
  height: auto;
  object-fit: cover;
  margin-bottom: 6rem;
}

.banner-content {
  position: absolute;
  right: 10%;
  bottom: 30%;
  max-width: 600px;
  text-align: left;
  color: var(--cor-texto)
}

.banner-content h1 {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.banner-content p {
  margin-top: 1rem;
  font-weight: 300;
}

/* Menu*/
.menu-section {
  padding: 2rem 0rem;
}

.menu-section h2 {
  margin-bottom: 2rem;
}

.card {
  background-color: var(--cor-terciaria);
  border-radius: 10px;
  text-align: center;
  justify-content: center; 
  align-items: center; 
  padding: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  flex: 0 0 calc(20% - 1.2rem); 20%  /*para 5 itens visíveis */
  max-width: calc(20% - 1.2rem);
}

.card img {
  max-width: 100%; 
  max-height: 100%; 
  object-fit: contain; 
  transition: transform 0.3s ease-in-out;
}

.card img:hover {
  transform: scale(1.4);
}

.card h3{
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.card p{
  font-size: 1rem;
}

.carousel-container {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.carousel {
  display: flex;
  transition: transform 0.3s ease-in-out;
  gap: 1rem;
}

.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background-color: rgba(0, 0, 0, 0.5);
  color: var(--cor-texto);
  border: none;
  padding: 10px;
  cursor: pointer;
  font-size: 1.5rem;
  height: 100%;
  width: 10%;
}

.arrow-left {
  left: 0px;
}

.arrow-right {
  right: 0px;
}

/* Detalhes da receita*/
.recipe {
  display: flex;
  flex-direction: column;
}

.recipe-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.recipe-image {
  width: 100%;
  height: auto;
}
.recipe {
  display: none;
}

.recipe:target {
  display: block;
}

.recipe-details {
  margin-left: 20px;
}

.recipe-description{
  margin-top: 3rem;
}

.recipe-description h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.recipe-ingredients h2 {
  font-size: 1.5rem;
  font-weight: 500;
  margin: 1rem 0rem;
}

.recipe-method h3{
  margin-bottom: 1rem;
}

.menu-grid-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(5px, 6.5rem));
}

.menu-grid-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
  gap: 10px;
}

.card-details {
  text-align: center;
  width: 80px;
  font-size: 18px;
}

.card-details img {
  max-width: 100%;
}

/* Footer */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 26px;
  background-color: var(--cor-terciaria);
}

.footer p {
  font-size: 0.875rem;
}

/* Responsividade */
@media print {
  /* Oculta elementos indesejados */
  .search-container,
  .admin-link,
  .banner-image,
  .arrow {
    display: none !important;
  }

  .banner-content {
    display: block !important;
    position: static !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  

  /* Remove cores e imagens de fundo */
  * {
    background: none !important;
    color: black !important;
  }

  /* Ajusta o layout para impressão */
  body {
    font-size: 12pt;
  }
}

@media screen and (max-width: 1200px) {
  .card {
    flex: 0 0 calc(33.33% - 1rem); /* Exibe 3 cards */
  }
  .banner-content {
    right: 5%;
    bottom: 1%;
    text-align: center;   
  }
}

@media (max-width: 768px) {
  .header-content {
    flex-wrap: wrap;
  }

  .search-container {
    order: 3;
    max-width: 100%;
    margin: 1rem 0 0;
    width: 100%;
  }

  .search-bar-logo {
    flex-grow: 1;
  }

  .admin-link {
    order: 2;
  }

  .banner {
    margin-top: 4rem;
    background-color:transparent; 
  }

  .banner-content h1 {
    font-size: 1.8rem; 
  }

  .banner-image {
    margin-bottom: 10rem;
  }

  .banner-content {
    right: 5%;
    bottom: 1%;
    text-align: center;   
  }

  .card {
    flex: 0 0 calc(50% - 1rem); /* Exibe 2 cards */
  }
}

@media screen and (max-width: 480px) {
  .menu-section h2 {
    font-size: 1.5rem;
  }

  .carousel {
    flex-direction: column; /* Empilha os cards */
    align-items: center;
  }
  
  .card {
    flex: none;
    width: 90%;
  }

  .arrow {
    display: none; /* Esconde as setas */
  }
}

@media screen and (min-width: 768px) {
  .recipe-header {
    flex-direction: row;
  }

  .recipe-image {
    max-width: 50%;
  }

  .recipe-description {
    padding-left: 20px;
  }
}

