/* ========================
   ABAS
======================== */
.abas-receitas {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.aba-receita {
  background-color: #fff;
  color: #EA1D2C;
  border: 2px solid #EA1D2C;
  padding: 12px 28px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "Poppins", sans-serif;
}

.aba-receita:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(234, 29, 44, 0.2);
}

.aba-receita.ativa {
  background-color: #EA1D2C;
  color: #E5E5E5;
  box-shadow: 0 6px 16px rgba(234, 29, 44, 0.3);
}

/* ========================
   GRID DE RECEITAS
======================== */
.receitas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.receita-card {
  background-color: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: slideInUp 0.5s ease forwards;
  opacity: 0;
  transform: translateY(20px);
}

.receita-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(234, 29, 44, 0.2);
}

.receita-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center;
  background-color: #f0f0f0;
}

.receita-info {
  padding: 20px;
}

.receita-info h3 {
  color: #EA1D2C;
  font-size: 18px;
  margin-bottom: 10px;
  font-weight: 600;
}

.receita-info .descricao {
  color: #666;
  font-size: 14px;
  margin-bottom: 15px;
  line-height: 1.5;
}

.meta-info {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  font-size: 13px;
  flex-wrap: wrap;
}

.meta-info span {
  background-color: #f5f5f5;
  padding: 6px 12px;
  border-radius: 20px;
  color: #666;
}

.dif-fácil {
  background-color: #d4edda !important;
  color: #155724 !important;
}

.dif-médio {
  background-color: #fff3cd !important;
  color: #856404 !important;
}

.dif-difícil {
  background-color: #f8d7da !important;
  color: #721c24 !important;
}

.btn-receita {
  width: 100%;
  background-color: #EA1D2C;
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: "Poppins", sans-serif;
}

.btn-receita:hover {
  background-color: #c41826;
  transform: scale(1.02);
}

/* ========================
   MODAL RECEITA
======================== */
.modal-receita {
  display: flex;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-receita-content {
  background-color: #fff;
  border-radius: 12px;
  max-width: 700px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.close-receita {
  position: absolute;
  top: 15px;
  right: 20px;
  color: #999;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  transition: color 0.2s;
}

.close-receita:hover {
  color: #EA1D2C;
}

.modal-receita-body {
  padding: 30px;
}

#modalReceitaImg {
  width: 100%;
  max-width: 400px;
  height: 300px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 20px;
  display: block;
}

#modalReceitaNome {
  color: #EA1D2C;
  font-size: 28px;
  margin-bottom: 12px;
}

.modal-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  font-size: 14px;
}

.modal-meta span {
  background-color: #f5f5f5;
  padding: 8px 14px;
  border-radius: 20px;
  color: #666;
}

#modalReceitaDescricao {
  color: #666;
  font-size: 15px;
  margin-bottom: 25px;
  line-height: 1.6;
}

.modal-secao {
  margin-bottom: 25px;
}

.modal-secao h3 {
  color: #EA1D2C;
  font-size: 18px;
  margin-bottom: 12px;
}

#modalReceitaIngredientes,
#modalReceitaPreparo {
  padding-left: 20px;
}

#modalReceitaIngredientes li,
#modalReceitaPreparo li {
  color: #666;
  font-size: 14px;
  margin-bottom: 8px;
  line-height: 1.6;
}

.btn-favoritar-receita {
  width: 100%;
  background-color: #EA1D2C;
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: "Poppins", sans-serif;
  margin-top: 15px;
}

.btn-favoritar-receita:hover {
  background-color: #c41826;
  transform: scale(1.02);
}

/* ========================
   RESPONSIVIDADE
======================== */
@media (max-width: 1024px) {
  .receitas-grid {
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  }
}

@media (max-width: 768px) {
  .receitas-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .aba-receita {
    padding: 10px 20px;
    font-size: 14px;
  }

  .modal-receita-body {
    padding: 20px;
  }

  #modalReceitaImg {
    max-width: 100%;
    margin-bottom: 15px;
  }

  #modalReceitaNome {
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  .receitas-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .abas-receitas {
    gap: 10px;
  }

  .aba-receita {
    padding: 10px 16px;
    font-size: 13px;
  }

  .receita-card img {
    height: 180px;
  }

  .receita-info {
    padding: 15px;
  }

  .receita-info h3 {
    font-size: 16px;
  }

  .meta-info {
    font-size: 12px;
  }

  .btn-receita {
    font-size: 13px;
    padding: 10px;
  }

  .modal-receita-body {
    padding: 15px;
  }

  .close-receita {
    font-size: 24px;
    top: 10px;
    right: 15px;
  }

  #modalReceitaNome {
    font-size: 20px;
  }

  .modal-meta {
    gap: 8px;
  }

  #modalReceitaIngredientes li,
  #modalReceitaPreparo li {
    font-size: 13px;
  }
}
/* ========================
   ESTILOS DO CONTAINER DE RECEITAS
======================== */
.receitas-grid .container {
    width: 100%;
    margin: 0;
    padding: 35px;
    border-radius: 10px;
    background-color: #EA1D2C;
    color: #E5E5E5;
}

.receitas-grid .container > p {
    font-size: 22px;
}

.receitas-grid .container > h2 {
    font-size: 36px;
    text-align: center;
    color: #E5E5E5;
    margin-bottom: 25px;
}

/* SEÇÕES INGREDIENTES / PREPARO */
.receitas-grid .secao-ingredientes,
.receitas-grid .secao-preparo {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid rgba(229, 229, 229, 0.3);
}

.receitas-grid .secao-titulo {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

/* INGREDIENTES GRID */
.receitas-grid .ingredientes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.receitas-grid .ingrediente {
    background-color: #E5E5E5;
    color: #333;
    border-radius: 10px;
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.receitas-grid .ingrediente:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.receitas-grid .ingrediente img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.receitas-grid .ingrediente span {
    font-size: 16px;
    line-height: 1.4;
}

/* MODO DE PREPARO */
.receitas-grid .secao-preparo ol {
    padding-left: 25px;
}

.receitas-grid .secao-preparo ol li {
    font-size: 18px;
    margin-bottom: 12px;
    line-height: 1.6;
}

.receitas-grid .info-receita {
    margin-top: 25px;
    font-size: 17px;
    opacity: 0.9;
    border-top: 1px solid rgba(229, 229, 229, 0.3);
    padding-top: 15px;
}

/* Loading e erro */
.receitas-grid .loading,
.receitas-grid .erro {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
    grid-column: 1 / -1;
}

/* RESPONSIVIDADE */
@media (max-width: 767px) {
    .receitas-grid .container {
        padding: 25px;
    }

    .receitas-grid .container > h2 {
        font-size: 28px;
    }

    .receitas-grid .ingredientes-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .receitas-grid .ingrediente img {
        width: 65px;
        height: 65px;
    }

    .receitas-grid .ingrediente span {
        font-size: 14px;
    }

    .receitas-grid .secao-titulo {
        font-size: 22px;
    }

    .receitas-grid .secao-preparo ol li {
        font-size: 16px;
    }

    .receitas-grid .info-receita {
        font-size: 15px;
    }
}

@media (max-width: 479px) {
    .receitas-grid .container {
        padding: 20px;
    }

    .receitas-grid .container > h2 {
        font-size: 24px;
    }

    .receitas-grid .ingredientes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .receitas-grid .ingrediente {
        padding: 15px 10px;
    }

    .receitas-grid .ingrediente img {
        width: 55px;
        height: 55px;
    }

    .receitas-grid .ingrediente span {
        font-size: 13px;
    }
}