/* Reset básico */ 
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
  
body {
    font-family: Arial, sans-serif;
    color: #3E2723;
    background-color: #F9F5F0;
}
  
a {
    text-decoration: none;
    color: inherit;
}

/*Cardapios publicados recentemente*/
#posts-recentes {
    /* remova height: 49vh; ou substitua por: */
    min-height: 300px; /* ou outro valor adequado */
    width: 100%;
    display: flex;
    flex-direction: row;
    overflow-x: scroll;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
    padding: 20px 0; /* adicione algum padding */
}

#posts-recentes::-webkit-scrollbar {
    display: none;
}

.post-info {
    display: flex;
    flex-direction: row;
    height: 5%;
    margin-left: 20px;
    font-weight: bold;
    width: 96%;
    justify-content: space-between;
}

.post-container {
    display: flex;
    flex-direction: column;
    width: 35vw;
    max-width: 40vw;
    margin-right: 20px;
    scroll-snap-align: start;
    flex: 0 0 auto;
}

@media (max-width: 768px) {
    .post-container {
        width: 80vw;
        max-width: 90vw;
        margin-right: 10px;
    }
}

.carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 20px 0;
    scroll-snap-type: x mandatory;
}

.carousel-item {
    scroll-snap-align: start;
    min-width: 300px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.carousel-item:hover {
    transform: translateY(-5px);
}

.restaurant-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.restaurant-info {
    padding: 15px;
    background: white;
}

.restaurant-info h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.restaurant-stats {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 14px;
}

.post {
    border-bottom: 2px solid black;
    border-right: 1px solid black;
    background-size: cover;
    height: auto;
    min-height: 300px;
    aspect-ratio: 1/1.2;
    border-radius: 10px;
    transition: transform 0.3s ease;
    box-sizing: border-box;
    scroll-snap-align: start;
    flex: 0 0 auto;
}

@media (max-width: 768px) {
    .post {
        width: 100%;
        min-height: 200px;
    }
}


.post {
    border-bottom: 2px solid black;
    border-right: 1px solid black;
    width: 35vw;
    max-width: 40vw;
    background-size: cover;
    height: 100px;  /* ou um valor mínimo */
    min-height: 300px;
    aspect-ratio: 1/1.2; /* mantém proporção */
    margin-top: 10px;
    margin-left: 20px;
    border-radius: 10px;
    transition: transform 0.3s ease;
    box-sizing: border-box;
    scroll-snap-align: start;
    flex: 0 0 auto;
}

.post:hover {
    cursor: pointer;
    border: 2px solid rgb(129, 33, 33);
    transform: scale(1.05);
}

/* Header */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #7B3F00;
}

/* Navegação horizontal personalizada */
.horizontal-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 2rem;
    background-color: #fff;
    overflow-x: auto;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.nav-button {
    background: none;
    border: none;
    font-size: 0.95rem;
    cursor: pointer;
    color: #7B3F00;
    padding: 0.25rem 0.75rem;
    transition: background 0.2s ease;
    flex: 0 0 auto;
}

.nav-button:hover {
    background: rgba(123, 63, 0, 0.1);
    border-radius: 4px;
}

.nav-button p {
    margin: 0;
}

/* Hero / Busca */
.hero {
    background: url('images/background-cad.png') center/cover no-repeat;
    position: relative;
    padding: 4rem 2rem;
    text-align: center;
}
  
.hero h1 {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 1rem;
}
  
.search-bar {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
}
  
.search-bar input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 4px 0 0 4px;
}
  
.search-bar button {
    padding: 0 1rem;
    border: none;
    background: #7B3F00;
    color: #fff;
    border-radius: 0 4px 4px 0;
}

/* Categorias rápidas */
.categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    justify-items: center;
    margin: 2rem 1rem;
}
  
.category {
    background: #fff;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    font-weight: bold;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Cards principais */
.main-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}
  
.card {
    flex: 1 1 300px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
}
  
.card.red {
    background: #7B3F00;
    color: #fff;
}
  
.card.green {
    background: #B08968;
    color: #fff;
}
  
.card img {
    width: 30%;
    height: 150px;
    object-fit: scale-down;
    margin-left: 1rem;
}
  
.card .card-content {
    padding: 1rem;
    flex: 1;
}
  
.card .btn-card {
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.2);
}

/* Seções de destaque */
.section {
    margin: 2rem 0;
}
  
.section h2 {
    margin-left: 2rem;
    font-size: 1.5rem;
}
  
.carousel {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding: 1rem 2rem;
}
  
.carousel::-webkit-scrollbar {
    display: none;
}
  
.carousel-item {
    min-width: 150px;
    background: #fff;
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Efeito hover nas imagens dos restaurantes */
.carousel-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.3s ease;
    border-radius: 90px;
}

.carousel-item:hover img {
    transform: scale(1.1);
    opacity: 0.8;
}

/* Banners promo */
.promos {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0 2rem;
}
  
.promo {
    flex: 1;
    min-width: 200px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}
  
.promo img {
    width: 100%;
    display: block;
}

/* Footer chamadas */
.footer-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    background: #fff;
    padding: 2rem;
}
  
.cta {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    flex: 1 1 250px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}
  
.cta img {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
}
  
.cta .btn {
    margin-top: 1rem;
    background: #7B3F00;
    color: #fff;
}

/* Ajustando os botões de entrar e criar conta */
header > div {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-red {
    background: #7B3F00;
    color: #fff;
}

/* Estilos para os botões de autenticação */
.auth-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Estilo do botão "Cadastrar" */
.register-button {
    background-color: #4E2C1E;
    color: white;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: bold;
}

/* Estilo do botão "Entrar" */
.login-button {
    background-color: transparent;
    color: #4E2C1E;
    border: 2px solid #4E2C1E;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: bold;
}

/* Estilos para perfil e nome de usuário */
#perfil {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

#perfil-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#username {
    font-weight: bold;
    font-size: 1rem;
    color: #4E2C1E;
}

/* Mobile view */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .carousel-item {
        min-width: 120px;
    }

    header > div {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        margin-bottom: 1rem;
    }

    .auth-buttons {
        flex-direction: column;
        align-items: center;
    }

    .auth-buttons button {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .post {
        width: 80vw;
        max-width: 90vw;
    }

    .card {
        flex-direction: column;
        text-align: center;
    }

    .card img {
        width: 100%;
        height: auto;
        margin: 0;
    }

    .card .card-content {
        padding: 1rem;
    }

    .search-bar {
        flex-direction: column;
        gap: 0.5rem;
    }

    .search-bar input,
    .search-bar button {
        width: 100%;
        border-radius: 4px;
    }

    .section h2 {
        font-size: 1.25rem;
        margin-left: 1rem;
    }
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 220px;
  background-color: #4E2C1E;
  color: white;
  padding-top: 4rem;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 999;
}

.sidebar.expanded {
  transform: translateX(0);
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0 1rem;
}

.sidebar nav a {
  color: white;
  font-weight: bold;
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.sidebar nav a:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.toggle-btn {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1000;
  background-color: #7B3F00;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
}

/* Botões de login/cadastro na sidebar */
.sidebar .auth-sidebar-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 2rem 1rem 1rem 1rem;
}

.sidebar .auth-sidebar-buttons button {
  background-color: white;
  color: #4E2C1E;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.sidebar .auth-sidebar-buttons button:hover {
  background-color: #7B3F00;
  color: white;
}

.sidebar .auth-sidebar-buttons .register-button {
  background-color: transparent;
  border: 2px solid white;
  color: white;
}

.sidebar .auth-sidebar-buttons .register-button:hover {
  background-color: white;
  color: #4E2C1E;
}

/* Esconde header em telas pequenas, mostra sidebar */
@media (max-width: 768px) {
  header {
    display: none;
  }

  .toggle-btn {
    display: block;
  }

  .sidebar {
    display: block;
  }
}

/* Mostra header e esconde sidebar em telas grandes */
@media (min-width: 769px) {
  .toggle-btn,
  .sidebar {
    display: none;
  }

  header {
    display: flex;
  }
}

.menu-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}


.posts-container {
    position: relative;
    display: flex;
    align-items: center;
}

#posts-recentes {
    scroll-behavior: smooth;
    overflow-x: auto;
}

.arrow {
    background-color: #7B3F00;
    border: none;
    color: white;
    font-size: 1.8rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s, transform 0.3s;
}

.arrow:hover {
    background-color: #4E2C1E;
    transform: scale(1.1);
}


.arrow.left {
    margin-right: 0.5rem;
}

.arrow.right {
    margin-left: 0.5rem;
}

/* Setas mais discretas no mobile */
@media (max-width: 768px) {
    .arrow {
        display: none;
    }
}
