/* ======== Global ======== */
:root {
    --background-color: 157, 202, 235;
    --secondary-background-color: 214, 204, 204;
    --toast-background-color: 39, 35, 35;
    --green-background-color: 0, 105, 0;
    --red-background-color: 105, 0, 0;
    --hover-color: 141, 209, 209;
    --sub-menu-color: 255, 99, 71;
    --default-text-color: 0, 0, 0;
    --secondary-text-color: 238, 236, 236;
    --background-image: url('./img/fatecDay.jpg');
}

* {
    box-sizing: border-box;
    margin: 0;
}

body {
    font-family: Arial, sans-serif;
    background-image: var(--background-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding-top: 80px;
}

/* Dark-Mode */
body.dark-mode {
    --background-color: 38, 5, 129;
    --secondary-background-color: 39, 35, 35;
    --toast-background-color: 214, 204, 204;
    --hover-color: 38, 60, 129;
    --sub-menu-color: 255, 99, 71;
    --default-text-color: 224, 224, 224;
    --secondary-text-color: 17, 17, 17;
    --background-image: url('./img/fatecNight.jpg');
}

/* Toggle vertical estilo "linha" */
#darkModeToggle {
    --size: 58px;
    --width: 40px;
    --knob-size: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    height: var(--size);
    width: var(--width);
    border-radius: 999px;
    position: relative;
}

/* track */
.dark-toggle-track {
    display: block;
    width: var(--width);
    height: var(--size);
    background: rgba(0, 0, 0, 0.08);
    border-radius: calc(var(--width)/2);
    position: relative;
    overflow: visible;
}

/* knob */
.dark-toggle-knob {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 6px;
    width: var(--knob-size);
    height: var(--knob-size);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
    transition: top .28s cubic-bezier(.2, .9, .2, 1), background .25s ease, box-shadow .25s ease;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='5' fill='%23FFDD57'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 60%;
}

/* estado dark-mode */
body.dark-mode .dark-toggle-knob {
    top: calc(100% - var(--knob-size) - 6px);
    background: #222;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%239BD1FF' d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'/></svg>");
}

/* ======== toast ======== */
.toast {
    position: fixed;
    transform: translateX(-50%);
    bottom: 30px;
    left: 50%;
    background-color: rgb(var(--toast-background-color));
    color: rgb(var(--secondary-text-color));
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 9999;
}

/* ======== header ======== */
header {
    position: fixed;
    background: rgb(var(--background-color));
    padding: 10px 40px;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.header {
    display: flex;
    justify-content: space-between;
}

.nav-container {
    display: flex;
    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    width: 50px;
    margin-right: 10px;
}

.logo span {
    font-family: 'Indie Flower', cursive;
    font-size: 2.2rem;
}

.logo img:hover {
    transform: scale(1.1) rotate(360deg);
    transition: transform 0.7s ease;
}

.menu {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: rgb(var(--secondary-text-color));
    font-size: 2rem;
    font-family: Arial, sans-serif;
}

/* ======== Submenu (mobile) ======== */
.submenu {
    display: none;
    float: left;
    overflow: hidden;
}

.submenu .submenubtn {
    font-size: 2rem;
    color: rgb(var(--secondary-text-color));
    background-color: transparent;
    border: none;
    cursor: pointer;
}

.submenu-content {
    display: none;
    position: absolute;
    top: 90%;
    left: 0;
    background-color: rgba(var(--sub-menu-color), 0.95);
    width: 100%;
    z-index: 1;
}

.submenu-content a {
    float: left;
    color: rgb(var(--default-text-color));
    text-decoration: none;
    padding: 12px 16px;
}

.submenu-content.active {
    display: flex;
    flex-direction: column;
}

.submenubtn.active {
    background-color: rgba(var(--sub-menu-color), 0.95);
}

/* ======== Home / Carousel ======== */
.carousel,
.carousel-item,
.carousel-item img {
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.carousel {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    padding: 20px 0;
}

.carousel-item {
    flex: 0 0 auto;
    border-radius: 30px;
    border: 6px solid rgb(var(--background-color));
    padding: 0;
}

.carousel-item img {
    display: block;
    width: 400px;
    height: 250px;
    object-fit: cover;
    border-radius: 24px;
    pointer-events: none;
}

.carousel::-webkit-scrollbar {
    display: none;
}

/* ======== Banner ======== */
.banner {
    background-color: rgb(var(--secondary-background-color), 0.9);
    display: flex;
    justify-content: space-around;
    padding: 40px;
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.banner-left {
    color: rgb(var(--default-text-color));
    border-right: 10px solid rgb(var(--background-color));
    padding-right: 20px;
}

.banner-left h1 {
    font-family: 'Indie Flower', cursive;
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.banner-left p {
    font-size: 2rem;
    line-height: 1.2;
    max-width: 600px;
}

.banner-right {
    display: flex;
    flex-direction: column;
    gap: 50px;
    margin: 20px;
}

.banner-btn {
    background-color: rgb(var(--background-color));
    color: rgb(var(--secondary-text-color));
    font-size: 3rem;
    width: 350px;
    border: none;
    border-radius: 10px;
    padding: 25px 60px;
    cursor: pointer;
    font-family: Arial, sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.banner-btn a {
    text-decoration: none;
    color: inherit;
    font-size: 3rem;
}

.banner-btn:hover {
    background-color: rgba(var(--hover-color), 0.9);
}

/* ======== Menu ======== */
.cardapio-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: auto;
    background-color: rgba(var(--secondary-background-color), 0.9);
    border-radius: 10px;
}

.item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background-color: rgba(var(--background-color));
}

.item img {
    width: 100%;
    height: auto;
    display: block;
}

.item .info {
    padding: 10px;
    text-align: center;
}

.item .info h3 {
    margin: 10px 0;
    font-size: 18px;
}

.item .info p {
    font-size: 14px;
}

.item .price {
    background-color: rgba(var(--green-background-color), 0.9);
    color: rgb(var(--default-text-color));
    font-size: 18px;
    padding: 10px;
    text-align: center;
}

.item .buy-button {
    user-select: none;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(var(--green-background-color), 0.9);
    color: rgb(var(--default-text-color));
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    height: 60px;
    width: 100%;

}

.item:hover {
    background-color: rgba(var(--hover-color));
}


.item:hover *:not(.buy-button) {
    filter: brightness(0.7);
}

.item:hover .buy-button {
    opacity: 1;
}

/* ======== About ======== */
.sobre-container {
    display: flex;
    background-color: rgb(var(--secondary-background-color), 0.9);
    border-radius: 10px;
    width: 70%;
    margin: auto;
    color: rgb(var(--default-text-color));
}

.sobre-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 30px;
    align-items: center;
}

.sobre-container img {
    border-radius: 10px;
}

.sobre-text {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.sobre-text h2 {
    font-size: 24px;
    border-bottom: 2px solid rgba(var(--green-background-color));
    margin-bottom: 20px;
}

.text-content img {
    height: 600px;
}

.sobre-text p {
    font-size: 16px;
    line-height: 1.6;
}

.sobre-image {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sobre-image img {
    width: 100%;
    height: 400px;
    margin-bottom: 20px;
}

.text-content {
    display: flex;
}

/* ======== Contact ======== */
.contato {
    width: 65%;
    display: flex;
    flex-direction: column;
    margin: 20px auto;
    padding: 20px;
    background-color: rgb(var(--secondary-background-color), 0.9);
    border-radius: 10px;
    color: rgb(var(--default-text-color));
}


textarea,
input,
select {
    padding: 10px;
    margin-bottom: 10px;
    border: 5px solid rgb(var(--background-color));
    border-radius: 4px;
}

textarea {
    height: 100px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.buttons {
    display: flex;
    justify-content: space-between;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.cancelar {
    background-color: rgba(var(--red-background-color), 0.9);
    color: rgb(var(--secondary-text-color));
}

.enviar {
    background-color: rgba(var(--green-background-color), 0.9);
    color: rgb(var(--secondary-text-color));
}

.mapa iframe {
    width: 100%;
    height: 300px;
    border: none;
    border-radius: 8px;
    margin-bottom: 20px;
}

.contato-container {
    max-width: 75%;
    margin: auto;
}

.fale-conosco {
    display: flex;
    flex-direction: column;
}

.contato-info {
    margin-bottom: 20px;
}

.contato-container h2 {
    font-size: 24px;
    border-bottom: 2px solid rgba(var(--green-background-color));
    margin-bottom: 20px;
}

.fale-conosco form {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

/* Para tablets e telas médias */
@media (max-width: 900px) {

    /* ======== Responsividade geral ======== */

    .submenu {
        display: flex;
    }

    .menu {
        display: none;
    }

    .submenu .submenubtn {
        font-size: 2rem;
    }

    .logo img {
        width: 30px;
        margin-right: 10px;
    }

    .logo span {
        font-size: 1rem;
    }

    /* Banner */
    .banner {
        flex-direction: column;
        padding: 20px;
    }

    .banner-left {
        border-right: none;
        text-align: center;
    }

    .banner-left h1 {
        font-size: 2.5rem;
    }

    .banner-left p {
        font-size: 1.6rem;
        max-width: 100%;
    }

    .banner-right {
        margin: 0;
        gap: 20px;
        width: 100%;
        align-items: center;
    }

    .banner-btn {
        width: 100%;
        font-size: 2rem;
        padding: 20px;
    }

    .banner-btn a {
        font-size: 2rem;
    }

    /* Cardápio */
    .cardapio-container {
        gap: 15px;
        padding: 15px;
    }

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

    .item .info p {
        font-size: 12px;
    }

    .item .price {
        font-size: 16px;
    }

    .item .buy-button {
        font-size: 18px;
    }

    /* Sobre */
    .sobre-container {
        flex-direction: column;
        width: 90%;
    }

    .text-content {
        flex-direction: column;
    }

    .text-content img {
        height: 250px;
    }

    .sobre-text h2 {
        font-size: 20px;
    }

    .sobre-text p {
        font-size: 14px;
    }

    /* Contato */
    .contato {
        width: 90%;
        padding: 15px;
    }

    .contato-container {
        max-width: 90%;
    }

    textarea,
    input,
    select {
        font-size: 14px;
    }

    button {
        font-size: 14px;
        padding: 8px 16px;
    }

    .buttons {
        flex-direction: column;
        gap: 10px;
    }
}

/* Para celulares pequenos */
@media (max-width: 600px) {

    /* Banner */
    .banner-left h1 {
        font-size: 2rem;
    }

    .banner-left p {
        font-size: 1.2rem;
    }

    .banner-btn {
        font-size: 1.6rem;
        padding: 15px;
    }

    .banner-btn a {
        font-size: 1.6rem;
    }

    /* Cardápio */
    .cardapio-container {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 10px;
    }

    .item .info h3 {
        font-size: 14px;
    }

    .item .info p {
        font-size: 12px;
    }

    .item .price {
        font-size: 14px;
    }

    .item .buy-button {
        font-size: 16px;
        height: 50px;
    }

    /* Sobre */

    .sobre-image img {
        height: 250px;
    }

    /* Contato */
    .contato {
        width: 95%;
        padding: 10px;
    }

    textarea,
    input,
    select {
        font-size: 12px;
    }

    button {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* Para celulares muito pequenos */
@media (max-width: 400px) {
    .dark-toggle {
        --size: 48px;
        --width: 34px;
        --knob-size: 28px;
    }

    .logo span {
        font-size: 0.8rem;
    }

    nav a {
        font-size: 1.5rem;
        margin-left: 20px;
    }

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

    .banner-left p {
        font-size: 1rem;
    }

    .banner-btn {
        font-size: 1.2rem;
        padding: 10px;
    }

    .banner-btn a {
        font-size: 1.2rem;
    }
}