:root {
    --color-bg: #F9F9F6;
    --color-bg-secondary: #EDEBE6;
    --color-text-primary: #2B2B2B;
    --color-text-secondary: #5E5E5E;
    --color-accent: #C45A5A;
    --color-accent-light: #F7D4D4;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--color-text-primary);
    background-color: var(--color-bg);
}

a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease, border-bottom 0.3s ease;
}

a:hover {
    color: var(--color-accent);
    border-bottom: 2px solid var(--color-accent-light);
}

.container-layout {
    display: grid;
    grid-template-areas:
      "header"
      "sidebar"
      "main"
      "footer";
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr auto;
    min-height: 100vh;
    height: 100%;
}

header {
    grid-area: header;
    background-color: var(--color-bg-secondary);
    padding: 0.5rem;
    border-bottom: 6px solid var(--color-accent);
    display: flex;
    align-items: center;
    width: 100%;
}

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

.logo {
    width: 90px;
    height: auto;
}

.header-title {
    color: var(--color-text-primary);
    text-align: center;
}

.header-title h1, h2 {
    font-family: 'Libre Baskerville', serif;
    font-weight: 400;
    color: var(--color-accent);
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-primary);
    width: 90px;
}

.sidebar {
    grid-area: sidebar;
    display: none;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    background-color: var(--color-bg-secondary);
    padding: 1rem;
    border-top: 1px solid var(--color-accent-light);
    border-bottom: 1px solid var(--color-accent-light);
}

.sidebar.open {
    display: flex;
    margin-top: 1rem;
}

.sidebar ul {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
}

main {
    grid-area: main;
    background-color: var(--color-bg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery {
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.gallery-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1rem;
    width: 100%;
}

.gallery-item {
    background-color: var(--color-bg-secondary);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.gallery-item::before {
    content: "";
    display: block;
    height: 6px;
    background-color: var(--color-accent);
}

.gallery-item img {
    height: 100%;
    width: 100%;
    object-fit: fill;
    display: block;
}

.gallery-item-info {
    position: absolute;
    inset: 0;
    background: #ffffff;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.8) 65%, rgba(0, 0, 0, 0.34) 100%);
    opacity: 0;
    transform: translateY(20px);
    transition: transform 0.4s ease, opacity 0.4s ease;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.gallery-item:hover .gallery-item-info {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item-info h1 {
    font-size: 1.2rem;
    font-family: 'Libre Baskerville', serif;
    color: var(--color-accent);
    text-align: center;
    margin: 0.5rem 0;
}

.gallery-item-info p {
    padding: 0.5rem;
    color: var(--color-text-secondary);
    text-align: center;
}

.gallery-item-info p:first-of-type {
    color: var(--color-accent);
    font-weight: 500;
}

footer {
    grid-area: footer;
    background-color: var(--color-bg-secondary);
    padding: 1rem;
    border-top: 1px solid var(--color-accent-light);
    text-align: center;
    font-size: medium;
}

@media (min-width: 800px) {
    .container-layout {
        grid-template-areas:
            "header header"
            "sidebar main"
            "footer footer";
        grid-template-columns: 130px 1fr;
        grid-template-rows: auto 1fr auto;
    }

    .header-content {
        align-items: center;
        position: relative;
    }

    .logo {
        width: 120px;
    }

    .header-title {
        justify-content: center;
        align-items: center;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        text-align: center;
    }

    .menu-toggle {
        display: none;
    }

    .sidebar {
        display: flex;
        flex-direction: row;
        justify-content: center;
        border-bottom: none;
        border-top: none;
        border-right: 1px solid var(--color-accent-light);
    }

    .sidebar ul {
        flex-direction: column;
        gap: 2rem;
    }
}
