@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

* {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

html{
    scroll-behavior: smooth;
}

.central{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.decor-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden; /* evita que as folhas saiam do container */
}

body {
    overflow-x: hidden;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
}

h2 {
    color: #c92535;
    font-size: 24px;
    margin-bottom: 20px;
    z-index: 2;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
    font-weight: bold;
    width: 100%;
    text-align: center;
}
.search-bar {
    display: flex;
    margin-bottom: 20px;
}

.search-bar input {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.bg-decor {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.bg-decor img {
    position: absolute;
    width: 10%;
    height: auto;
    opacity: 0.9;
}

.bg-decor .ramo{
    top: 141px;
}
  
.bg-decor .ramo2{
    top: 100%;
    right: 0%;
    transform: rotate(90deg);
    display: block;
}

.bg-decor .folha{
    top: 120%;
    transform: rotate(90deg);
    left: -40px;
}

.bg-decor .folhas {
    top: 30%;
    left: 3%;
    width: 100px;
    min-width: unset;
}
  
.bg-decor .folhas2 {
    top: 35%;
    right: 3%;
    transform: scaleX(-1);
    width: 100px;
    min-width: unset;
}
    
.bg-decor .pimenta {
    left: 2%;
    top: 60%;
    width: 120px;
    min-width: unset;
}
  
.bg-decor .tomates {
    position: absolute;
    top: 140px;    
    right: 0px;     /* empurra mais para a direita */
    transform: scale(1);
    display: block;
}

.comodidades{
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 20px;
}

.comodidades h3{
    width: 60%;
    font-weight: bold;
}

.comodidades button {
    font-size: 12px;
    border: 1px solid #c92535;
    padding: 5px 10px;
    border-radius: 4px;
    background-color: transparent;
    color: #c92535;
    cursor: pointer;
    transition: all 0.3s ease; 
    width: 150px;
    
}

.comodidades button:hover {
    background-color: rgb(201, 37, 53, 0.05); 
}

.container {
    padding: 20px;
    margin-top: 50px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.restaurants-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Reduza o minmax para 200px */
    gap: 20px;
    width: 100%; /* Garante que o grid ocupe toda a largura */
    max-width: 1200px; /* Opcional: limita a largura máxima */
    margin: 0 auto;
}

.restaurant {
    display: flex;
    flex-direction: column;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
    width: 100%;
    position: relative; /* Fundamental para o posicionamento absoluto do card */
    padding-bottom: 20px; /* Espaço para o card de comodidades */
}

.restaurant .image {
    width: 100%;
    height: 195px;
    background-size: cover;
    background-position: center;
}

.restaurant .image img {
    width: 100%;
    height: auto;
}

.info {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px;
    min-height: 340px;
}

/* Estilo base para os links */
.info a.atributos {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px; /* Espaço entre linhas */
    text-decoration: none;
    color: #555;
    font-size: 14px;
    width: 100%;
}

/* Estilo dos ícones */
.info a.atributos .icon {
    color: rgb(0, 128, 17);
    font-size: 16px;
    width: 24px; /* Largura fixa para alinhamento */
    text-align: center;
    flex-shrink: 0; /* Impede que o ícone encolha */
}

/* Estilo do texto sublinhado */
.info a.atributos .texto-link {
    text-decoration: underline;
    text-underline-offset: 1px;
    white-space: normal; /* Substitui o nowrap */
    word-wrap: break-word; /* Quebra palavras longas se necessário */
    width: 100%; /* Garante que o texto ocupe a largura disponível */
}

.texto-link {
    text-decoration: underline;
    text-underline-offset: 1px;
    white-space: nowrap;
}

.info .buttons{
    margin-top: auto; /* Empurra para o fundo do container */
    padding-top: 20px; /* Espaçamento mínimo */
    text-align: center; /* Centraliza o botão */
}

.restaurant .info {
    padding: 32px 48px;
}

.info .atributos{
    font-size: 14px;
    color: #555;
}

.restaurant h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: rgb(0, 128, 17);
}

.restaurant p {
    margin-bottom: 10px;
    font-size: 14px;
    color: #555;
}

.botao {
    display: inline-block;
    padding: 10px;
    margin-top: 50px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    border-radius: 10px;
    text-decoration: none;  
    background-color: #cc2a41;  
    color: white;  
    text-align: center;
    transform-origin: top center;
    width: 150px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: 
        opacity 0.5s ease 0.1s,
        transform 0.3s ease 0.2s,
        background-color 0.3s ease;
}

.botao:hover {
    background-color: #ddd; 
    color: rgb(0, 128, 17);
    
}

.card-comodidades {
    display: none;
    position: absolute;
    top: 40%;
    bottom: 0;
    left: 15px;
    right: 15px;
    padding: 20px 20px 52px;
    background-color: rgb(255, 255, 255);
    flex-direction: column;
    z-index: 10;
    opacity: 0;
}

.card-comodidades.active {
    display: flex;
    animation: slideDown 0.3s ease forwards;
}

.card-comodidades.closing {
    animation: slideUp 0.3s ease forwards;
}

/* Item "Voltar" deve ocupar as 2 colunas */
.card-comodidades span:last-child {
    grid-column: span 2;
    text-align: center;
    color: #0066cc;
    cursor: pointer;
    margin-top: 10px;
}   

.card-comodidades ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.card-comodidades li {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #333;
}

.card-comodidades li i {
    margin-right: 8px;
    color: #cc2a41;
}

.btn-voltar {
    grid-column: 1 / -1; /* Ocupa desde a primeira até a última coluna */
    justify-self: center; /* Centraliza horizontalmente no grid */
    margin: auto auto 0;
    padding: 0 10px;
    height: 41px;
    line-height: 40px;
    font-size: 14px;
    background: #cc2a41;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    opacity: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: 
        opacity 0.5s ease 0.1s, /* Delay reduzido para 0.2s */
        transform 0.3s ease 0.2s; /* Mesmo delay para a transformação */
    width: 170px;
    display: block; /* Garante que as margens automáticas funcionem */
    transform: translateY(10px); /* Adicionado para efeito de deslize */
}
.card-comodidades.closing {
    /* Garante que o elemento permaneça visível durante a animação */
    display: grid !important;
    /* Redefine outras propriedades se necessário */
    opacity: 1;
    transform: translateY(0);
}

/* CORREÇÃO: nome de classe correto */
.card-comodidades.animation-complete .btn-voltar {
    opacity: 1;
    transform: translateY(0);
}

.btn-voltar:hover {
    background: #ddd; 
    color: rgb(0, 128, 17);
    transform: translateY(-1px) scale(1.02);
    transition: all 0.3s;
}

@keyframes slideUp {
    0% {
        opacity: 1;
        transform: translateY(0);
        clip-path: inset(0 0 0 0);
    }

    80% {
        opacity: 0.8;
    }    
    100% {
        opacity: 0;
        transform: translateY(0px);
        clip-path: inset(0 0 100% 0);
    }
}


@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateY(-20px);
        clip-path: inset(0 0 100% 0);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        clip-path: inset(0 0 0 0);
    }
}


@media (max-width: 1260px) {
    .restaurants-wrapper {
        grid-template-columns: repeat(2, 1fr); 
        max-width: 800px; 
    }
}

/* Responsividade */
@media (max-width: 1024px) {

    .restaurants-wrapper {
        grid-template-columns: 1fr;
    }

    footer img {
        width: 10%;
    }

    footer .queijo {
    bottom: 100px;
    }

    .bg-decor .tomates {
        top: 90px;
    }

    .bg-decor .ramo{
        top: 85px;
    }
}


@media screen and (max-width:768px){

    .bg-decor .ramo{
        width: 18%;
    }

    .bg-decor .tomates{
        width: 30%;
    }

}