@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Luxurious+Roman&display=swap');

:root {
    --color-text-light: #f5f5f5;
    --color-text-lighter: #f5fafb;
    --color-text-contrast: #f2eceb;
    --color-text-muted: #b6b6b6;
    --color-primary-bg: #08370b;
    --color-secondary-bg: #102b13;
    --color-accent: #f97f2c;
    --color-action: #e26918;
    --color-action-hover: #d85600;
    --color-link-focus: #0e6814;
    --color-action-accessible: #FF6600;
}

* {
    margin: 0;
}

*:focus-visible {
    outline: 3px solid var(--color-action-accessible);
    outline-offset: 3px;
    border-radius: 4px;
}

body {
    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-self: center;
    max-width: 900px;
    background-image: url(../img/fundo-barbearia.jpg);
    background-color: black;
    background-attachment: fixed;
    background-size: cover;
    background-repeat: no-repeat;
}

header,
.div1,
div>section>h2 {
    flex-basis: 100%;
}

header {
    margin: 15px;
    flex-basis: 100%;
    width: 100%;
}

nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    position: relative;
}

nav > ul {
    list-style: none;
    display: flex;
    column-gap: 50px;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
}

/* Hamburger menu */
.hamburger {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--color-text-light);
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1000;
    background: none;
    border: none;
    padding: 0;
}

.left, .right {
    display: flex;
    gap: 50px;
    list-style: none;
    margin: 0;
    padding: 0;
}

#logo {
    display: block;
}

nav a {
    color: var(--color-text-light);
    font-weight: bold;
    text-decoration: none;
    position: relative;
    padding-bottom: 5px;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--color-link-focus);
    transition: all 0.4s ease-in-out;
    transform: translateX(-50%);
}

nav a:hover::after {
    width: 100%; /* A linha cresce ao passar o mouse */
}

.attribution{
    color: var(--color-text-muted);
    margin-top: 6px;
}

body,
main,
#main-content,
section,
article,
address,
p,
label,
input,
select,
button,
textarea,
li {
    color: var(--color-text-light);
}

label,
input,
select,
button,
textarea {
    font-size: 1rem;
}

.section-title,
main h1 {
    text-align: center;
    width: 100%;
    margin: 15px 0;
    font-size: 2rem;
    color: var(--color-text-light);
}

.section-subtitle {
    text-align: center;
    width: 100%;
    margin: 0 0 20px;
    font-size: 1.5rem;
    color: var(--color-text-light);
}

main h2,
main h3,
main p,
address,
strong {
    color: var(--color-text-contrast);
}

#logo {
    display: block;
    width: 60px;
    height: 60px;
    background-image: url(../img/logo-dh-branco.svg);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    text-indent: -9999px;
}

.nav-logo {
    display: block;
    width: 60px;
    height: 60px;
    background-image: url(../img/logo-dh-branco.svg);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    text-indent: -9999px;
    transition: all 0.4s ease-in-out;
    filter: drop-shadow(0 0 0 rgba(249, 127, 44, 0));
}

.nav-logo:hover {
    transform: scale(1.1) rotate(3deg);
    filter: drop-shadow(0 0 40px var(--color-text-muted));
}

.nav-logo::after {
    display: none !important;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: auto;
    background: var(--color-primary-bg);
    color: var(--color-text-light);
    padding: 0.5rem 0.75rem;
    z-index: 999;
    text-decoration: none;
}

.skip-link:focus {
    left: 0;
    top: 0;
}

main,
figure img,
div section,
blockquote,
#botao {
    border-radius: 14px;
}

main {
    font-family: "Luxurious Roman", serif;
    font-weight: 400;
    font-style: normal;
    background-color: var(--color-primary-bg);
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    max-height: 440px;
    margin: 0;
}

main h1,
div>section,
aside {
    color: var(--color-text-lighter);
    font-weight: normal;
}

.div2 {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    font-weight: normal;
}

.div2 img {
    margin: 10px 50px;
}

.galeria {
    display: grid;
    grid-template-columns: 180px 180px;
    grid-template-rows: 180px 60px 180px;
    gap: 10px;
    width: fit-content;
}

.galeria figure {
    overflow: hidden; /* Garante que a imagem não saia da borda ao dar zoom */
    border-radius: 14px; /* Mantém o padrão do projeto */
}

.galeria img {
    transition: transform 0.5s ease; /* Transição suave de zoom */
}

.galeria img:hover {
    transform: scale(1.1); /* Aumenta 10% da imagem */
    filter: brightness(1.1); /* Dá um leve brilho */
    cursor: pointer;
}

figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid var(--color-text-light);
}

#img1 {
    grid-column: 1;
    grid-row: 1 / 2;
}

#img2 {
    grid-column: 2;
    grid-row: 1 / 3;
}

#img3 {
    grid-column: 1;
    grid-row: 2 / 4;
}

#img4 {
    grid-column: 2;
    grid-row: 3 / 4;
}

div section {
    background-color: var(--color-primary-bg);
    display: flex;
    flex-wrap: wrap;
    padding: 30px;
    gap: 20px;
}

blockquote {
    background-color: var(--color-secondary-bg);
    flex: 1;
    padding: 10px;
    align-content: center;
}

#botao {
    display: block;
    justify-self: center;
    margin: 20px;
    background-color: var(--color-action-accessible);
    color: #000000;
    padding: 20px 30px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 14px;
    transition: all 1.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#botao:hover {
    background-color: var(--color-action-hover);
    transform: translateY(-1px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2);
}

.select {
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.8)) !important;
    color: var(--color-text-light) !important;
    text-decoration: none !important;
}

/* Responsividade */
@media (max-width: 768px) {
    body {
        max-width: 100%;
        padding: 10px;
        gap: 10px;
    }

    header {
        margin: 10px;
        position: relative;
    }

    .hamburger {
        display: block;
    }

    nav .left,
    nav .right {
        display: none;
        flex-direction: column;
        gap: 20px;
        position: absolute;
        top: 50px;
        right: 15px;
        background-color: var(--color-primary-bg);
        padding: 20px;
        z-index: 1001;
        width: 200px;
    }

    nav .left {
        border-radius: 15px 15px 0px 0px;
    }

    nav .right {
        border-radius: 0px 0px 15px 15px;
        box-shadow: 0px 15px 15px rgba(0, 0, 0, 0.5);
    }

    nav.menu-open .left,
    nav.menu-open a ~ .right {
        display: flex;
    }

    nav.menu-open a ~ .right {
        top: 140px;
    }

    .nav-logo {
        display: block;
    }

    .galeria {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 15px;
        width: 90%;
        margin: 20px auto;
    }

    #img1, #img2, #img3, #img4 {
        grid-column: auto;
        grid-row: auto;
        height: 250px;
    }

    .galeria figure img {
        height: 150px;
    }

    main h1 {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-subtitle {
        font-size: 1.3rem;
    }

    div section {
        padding: 20px;
    }

    .div2 img {
        margin: 10px 20px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    body {
        max-width: 100%;
        padding: 15px;
    }

    .galeria {
        grid-template-columns: 150px 150px;
        grid-template-rows: 150px 50px 150px;
    }
}

/* Desktop - Navbar em linha horizontal */
@media (min-width: 1025px) {
    nav {
        flex-direction: row;
        gap: 50px;
        justify-content: center;
        align-items: center;
    }

    nav .left,
    nav .right {
        display: flex;
    }

    .nav-logo {
        display: block;
        width: 60px;
        height: 60px;
    }
}