
/* global elements */
body {

    padding: 0;
    margin: 0;
    background-color: rgb(250, 235, 215);
    font-family: Georgia, 'Times New Roman', Times, serif;
    
}

.container {

    padding: 0 1rem 0 1rem;
    margin:4rem 4rem;
    border-radius: 12px;
    border-bottom: 0.5rem solid rgb(64, 41, 11);
   
    
}

.my_button{
    text-decoration: none;
    color: rgb(28, 122, 48);
    font-size: 1.3rem;
    
}


.my_button:hover{
    background-color: rgba(28, 122, 48, 0.2);
    transition: 0.2s ease;
}


/* heading */

#head {
    display: grid;
    grid-template-columns: auto auto;
    align-items: end;   
    background-color: rgb(203, 237, 237);
    border-bottom: 1rem ridge rgb(41, 176, 70, 0.8);
    border-radius: 12px;
    margin: 0.5rem 0.5rem 2rem 0.5rem;
    padding-top: 2rem;

}

.brand {
    display: flex;
    margin: 0;
    padding: 0 0 0 0;
    font-size: 4rem;
    color: rgb(28, 122, 48);
    text-decoration: none;
    justify-content: left;


}


/* Navi elements */

.navi ul {
    display: flex;
    list-style-type: none;   
    gap: 3rem;
    justify-content: right;
    margin-right: 2rem;
}

.navi li{
    margin-bottom: 0;
    padding-bottom: 0;
}

.navi a {
    text-decoration: none;
    color: rgb(64, 41, 11);
    font-size: 1.5rem;
}






/* Text elements */


.description_text{

    color: rgb(64, 41, 11);
    font-size: 1.3rem;
    font-weight: 400;

}

.description_text_bold{

    color: rgb(64, 41, 11);
    font-size: 1.3rem;
    font-weight: 600;

}

.cta_text{

    font-size: 2.5rem;
    padding-top: 0;
    color: rgb(28, 122, 48);
    white-space: nowrap;

}


.titles{

    color: rgb(64, 41, 11);
    font-weight: 1300;
    margin: 3rem 0;
    font-size: 2rem;
}

.subtitle{

    color: rgb(64, 41, 11);
    font-weight: 1000;
    margin: 1.5rem 0;
    font-size: 1.5rem;

}






/*landing search elements*/ 

#landing_search {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background-color: rgb(203, 237, 237);
    margin: 6rem 20rem;
    padding: 2rem 3rem;
    border-radius: 12px;
}



.search_form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

input {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    color: rgb(64, 41, 11);
    border: 0.15rem inset rgb(41, 176, 70, 0.8);
    border-radius: 6px;
    width: 150px;
}

button {
    padding: 0.5rem 1.5rem;
    font-size: 1rem;
    color: rgb(64, 41, 11);
    border: 0.15rem outset rgb(41, 176, 70, 0.8);
    border-radius: 6px;
    background-color: rgb(235, 224, 211);
    cursor: pointer;
    transition: 0.3s;
    white-space: nowrap;
}

button:hover {
    background-color: aliceblue;
    box-shadow: 0 0.1rem 0 rgb(64, 41, 11);
    border-top: none;
    border-left: none;
}










/* index elements */

#cta_area{
    display: block;
    
    
}

.cta_s{
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    max-width: 1800px;
    margin: 2rem 0;
    gap: 50px;
    justify-content: center;
    text-align: center;
}

.cta_card{
    display: block;
    border-radius: 12px;
    position: relative;
    text-decoration: none;
    overflow: hidden;    


}

.cta_img{
    display: flex;
    align-items: end;
    border-radius: 12px;
    width: 80%;
    aspect-ratio:18/19;
    background-size: cover;
    background-position: center;
    text-decoration: none;
    position: relative;
    transition: transform 0.3s;
    overflow: hidden;
    
}

.cta_img::before{
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 12px;
    transition: opacity 0.3s ease;

}

.cta_img:hover::before{
    opacity: 0;
}

.cta_img:hover{

    transform: scale(1.05);
}

.cta_name{

  
    position: absolute;
    font-weight:1000;
    background: rgba(250, 235, 215, 0.2);
    color: white;
    margin: 0 0 1rem 1rem;

      
}



#random_area{
    border-bottom: 0.5rem solid rgb(64, 41, 11);
}




/* search page elements */

#result_of_search_cock{

    display: block;
    margin: 5rem 0;
    border-bottom: 0.5rem solid rgb(64, 41, 11);
   
}

.drink_pres{

    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 30px;
    margin: 0 0 1rem 0;
}

.ingr_foto{

    width: 100%;
    border-radius: 10px;
}







/* Categories elements*/

#categories_area{
    display: block;
    text-align: center;
}



.category_card{
    display: block;
    border-radius: 12px;
    position: relative;
    text-decoration: none;
    overflow: hidden;    


}


.category_img{
    display: flex;
    align-items: end;
    border-radius: 12px;
    width: 80%;
    aspect-ratio:18/19;
    background-size: cover;
    background-position: center;
    text-decoration: none;
    position: relative;
    transition: transform 0.3s;
    overflow: hidden;
    
}

.category_img::before{
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    transition: opacity 0.3s ease;

}

.category_img:hover::before{
    opacity: 0;
}

.category_img:hover{

    transform: scale(1.05);
}



.category_name{

  
    position: absolute;
    font-weight:800;
    background: rgba(250, 235, 215, 0.2);
    color: white;
    margin: 0 0 1rem 1rem;

      
}

.category_names{
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    max-width: 1800px;
    gap: 50px;
    justify-content: center;
    text-align: center;
}




/* category elements */

#cate_zone{
    display: block;
    text-align: center;
    
}

.result_of_cate{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 0 auto;
    padding-bottom:2rem ;
    gap: 20px;
    max-width: 1800px;
    justify-content: center;
    text-align: center;
    
    
}


.drink_card{
    display: block;
    border-radius: 12px;
    border:0.1rem solid rgb(64, 41, 11);
    position: relative;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
    
   
    overflow: hidden;
}

.drink_card:hover{
    
    transform: scale(1.05);
    box-shadow: rgba(0, 0, 0, 0.5);
   
    
}



.drink_foto{
    max-width: 1200px ;
    width: 100%;
    height: auto;
    object-fit: cover;
    margin: 0 0;
}

.drink_name{

    color: rgb(64, 41, 11);
    font-weight: 700;
    
}


/* ingridient elements*/

#ingr_are{
    display: block;
}

.ingr_pres{
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 20px;
    align-items: center;
}

#related_drinks{
    display: block;

}

.ingr_mens{
    font-size: 1.1rem;
}





/* Ingridients element */

#search_area{
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    border-bottom: 0.5rem solid rgb(64, 41, 11);
    padding: 1rem 0 ;
    margin: 3rem 1rem;
    
    
   
}

.ingr_pres{
    display: flex;
    text-align: center;
    justify-content: center;
    width: 100%;
    align-items: center;
}

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

.result_card_ingr{
    display: block;
    border-radius: 12px;
    max-width: 400px;
    position: relative;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    overflow: hidden;
    margin: 0 auto;
}

.result_card_ingr:hover{
    box-shadow: 5px 5px 10px 1px rgb(64, 41, 11 );
    transform: scale(1.05);

}

.search_ingr_foto{
    padding: 0.5rem 0 0 0;
    width: 100%;
    height: auto;
    object-fit: cover;
}


.ingridients_names{
    columns: 3;
    column-gap: 2rem;
    
    margin: 0 auto;
    width: fit-content;
}

.ingr_name_in_list{
    display: block;
    text-decoration: none;
    color: rgb(64, 41, 11);
    border-radius: 2px;
    padding: 0.2rem 0.5rem;

}

.ingr_name_in_list:hover{
    background-color: rgba(28, 122, 48, 0.2);
    transition: 0.2s ease;

}




/* footer */

#footer{
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    margin: 4rem 4rem 2rem 4rem;

    
}







/* Media elements*/ 

@media (max-width: 1024px) {
    #landing_search {
        margin: 4rem 3rem;      /* 20rem-dən 3rem-ə düşür */
    }
}

@media (max-width: 768px) {
    #landing_search {
        margin: 3rem 1rem;
        flex-direction: column; 
        gap: 0.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    #landing_search {
        margin: 2rem 0.3rem;
        padding: 1.5rem 1rem;
        flex-direction: column;
    }
}


@media (max-width: 768px) {
    .result_of_cate {
        grid-template-columns: repeat(2, 1fr); 
    }
}

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

@media (max-width: 768px) {
    .container {
        margin: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        margin: 1rem 0.3rem;
        padding: 0 0.5rem;
    }
}

@media (max-width: 768px) {
    #head {
        grid-template-columns: 1fr;  
        text-align: center;
    }

    .brand {
        font-size: 2.5rem;
        justify-content: center;    
    }

    .navi ul {
        justify-content: center;     
        gap: 1.5rem;
        margin-right: 0;
    }

    .navi a {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .brand {
        font-size: 1.8rem;
    }

    .navi ul {
        flex-wrap: wrap;            
        gap: 0.8rem;
        padding: 0;
        margin: 0.5rem 0;
    }

    .navi a {
        font-size: 1rem;
    }
}


@media (max-width: 768px) {
    .cta_text {
        font-size: 1.8rem;
        white-space: normal;     
        text-align: center;
    }
}

@media (max-width: 480px) {
    .cta_text {
        font-size: 1.4rem;
        white-space: normal;
    }
}

@media (max-width: 480px) {
    input {
        width: 100%;
        box-sizing: border-box;
    }
}


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

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


@media (max-width: 480px) {
    .cta_img {
        width: 100%;
    }

    .category_img {
        width: 100%;
    }
}

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

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

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

@media (max-width: 480px) {
    .ingr_pres {
        flex-direction: column;   
        align-items: center;
    }
}


@media (max-width: 768px) {
    #search_area {
        grid-template-columns: 1fr; 
        margin: 2rem 0.5rem;
    }
}

@media (max-width: 480px) {
    #search_area {
        margin: 1rem 0.3rem;
    }
}

@media (max-width: 768px) {
    .ingridients_names {
        columns: 2;
    }
}

@media (max-width: 480px) {
    .ingridients_names {
        columns: 1;
    }
}

@media (max-width: 768px) {
    .titles {
        font-size: 1.7rem;
        margin: 2rem 0;
    }
}

@media (max-width: 480px) {
    .titles {
        font-size: 1.4rem;
        margin: 1.5rem 0;
    }

    .subtitle {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    #footer {
        margin: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    #footer {
        flex-direction: column;       
        align-items: flex-start;
        gap: 1rem;
        margin: 1.5rem 0.5rem;
    }
}