@font-face {
    font-family: 'MyFont';
    src: url('../font/DuctusMonoCalligraphic.ttf') format('truetype');
}

body {
    font-size: 1.1em;
    font-family: 'MyFont';
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #FF66C4;
    margin: 0;
}

h1 {
    text-align: center;
}

input {
    width: 42em;
    max-width: 100%;
    font-family: 'MyFont';
    align-items: center;
}

input, label {
    margin: 0.4rem 0;
}

.search-container {
    width: 42em;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.result-card img {
    width: 75%;
}

.gallery {
    width: 75%;
    column-count: 4;
    column-gap: 2vw;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.gallery img {
    width: 100%;
    margin-bottom: 2vw;
}

.result-item {
    position: relative;
    break-inside: avoid;
}

.result-item img {
    width: 100%;
    display: block;
    border-radius: 0.5em;
    transition: transform 0.3s ease;
}

.result-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 89.5%;
    height: 92%;
    background: rgba(0,0,0,0.45);
    color: white;
    display: flex;
    justify-content: left;
    align-items: left;
    text-align: left;
    opacity: 0;
    border-radius: 0.5em;
    transition: opacity 0.3s ease;
    padding: 1em;
    pointer-events: none;
}

.result-item:hover .overlay {
    opacity: 1;
}

.petitspace {
    height: 3em;
}

.title-link{
    text-decoration: none;
    color: white;
}

.title {
    color: white;
}

@media (max-width: 768px) {
    body {
        margin: 0;
        padding: 0.75em;
    }
    h1 {
        font-size: 1.25em;
    }
    input {
        width: 90%;
    }
    .search-container {
        width: 100%;
    }
    .gallery {
        column-count: 1;
        column-gap: 1em;
        margin: 0 0.5em;
        width: 90%;
    }
    .result-item {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 0.8em;
        border-bottom: 1px solid black;
        padding-bottom: 1em;
        margin-bottom: 1.5em;
    }
    .result-item a {
        display: block;
        width: 33%;
        flex-shrink: 0;
    }
    .result-item img {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 0.5em;
    }
    .result-item .overlay {
        width: 67%;
        position: static;
        opacity: 1;
        background: none;
        color: black;
        padding: 0;
        pointer-events: auto;
        font-size: 0.9em;
    }
    .result-item:hover .overlay {
        opacity: 1;
    }
    p {
        font-size: 0.75em;
        margin: 0;
    }
    .title-link {
        font-size: 0.75em;
        text-decoration: none;
        color: black;
    }
    .container a {
        width: 100%;
    }
    .title-link .title {
        font-size: 0.8em;
        text-decoration: underline;
        margin-bottom: 0.2em;
        color: black;
    }
    .petitspace {
        height: 1em;
    }
}

footer {
    background-color: #FF66C4;
    color: black;
    text-align: center;
    padding: 1rem;
    position: fixed;
    bottom: 0;
    width: 100%;
}
