body {
    /* System fonts: nothing to fetch from Google Fonts, which may not load in Russia. */
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #fcefdb; /* PANTONE 365 */
    color: #333;
}

h1 {
    color: #4c0070; /* PANTONE 2602 */
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 20px;
}

header {
    display: flex;
    padding: 20px;
    flex-wrap: wrap;
    flex-direction: column;
    align-items: center;
}

#logo {
    width: 150px; /* Adjust as needed */
    height: auto;
    margin-right: 20px;
}

header .subtitle {
    margin: -10px 0 0;
    text-align: center;
    font-size: 1.1em;
    color: #4e4376;
}

#search-form {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

#search-form input {
    width: 50%;
    padding: 15px;
    font-size: 1.2em;
    border: 2px solid #c6a681; /* PANTONE 7506C */
    border-radius: 50px;
    outline: none;
    transition: border .3s ease;
}

#search-form input:focus {
    border-color: #702f8a; /* PANTONE 7655 */
}

#results {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

#results div {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 350px;
    height: 450px;
    max-height: 450px;
    padding: 10px;
    background-color: #c2e189; /* PANTONE 529 */
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,.1);
    transition: transform .3s ease;
    align-items: center;
}

#results div:hover {
    transform: translateY(-5px);
}

#results img {
    width: 32%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
    margin-right: 10px;
}

#results .wine-info {
    width: 60%;
    height: fit-content;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
    padding: 10px;
    background-color: #fcefdb; /* PANTONE 367 */
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

#results h2 {
    font-size: 1.4em;
    margin: 0 0 10px;
    color: #702f8a; /* PANTONE 7655 */
    border-bottom: 2px solid #4c0070; /* PANTONE 2602 */
    padding-bottom: 5px;
    width: 100%;
}

#results h3 {
    font-weight: normal;
    font-size: 1.2em;
    margin-bottom: 10px;
    color: #6e006b; /* PANTONE 519 */
}

#results h3 strong {
    font-size: 1.21em;
    font-weight: bold;
}

#results p {
    font-size: 1em;
    color: #4e4376; /* PANTONE 519 */
    margin: 5px 0;
}

/* Sits directly under the rating and reads as part of it, so it takes the rating's colour
   and drops the label prefix the other lines carry. */
#results p.better-than {
    margin: -6px 0 10px;
    font-size: .95em;
    color: #6e006b; /* PANTONE 519 */
}

#results p.better-than::before {
    content: none;
}

#results p::before {
    content: attr(data-label);
    font-weight: 700;
    margin-right: 5px;
    color: #837986; /* PANTONE 519 (Light) */
}

#imageModal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,.7);
    justify-content: center;
    align-items: center;
}

#imageModal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
}

#imageModal:target {
    display: flex;
}

#pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

#pagination button {
    margin: 0 5px;
    padding: 10px 15px;
    background-color: #4c0070; /* PANTONE 2602 */
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color .3s ease;
}

#pagination button:hover {
    background-color: #702f8a; /* PANTONE 7655 */
}

#results a.ask-stasia {
    margin-top: 10px;
    padding: 8px 16px;
    background-color: #4c0070; /* PANTONE 2602 */
    color: #fff;
    border-radius: 50px;
    text-decoration: none;
    font-size: .95em;
    transition: background-color .3s ease;
}

#results a.ask-stasia:hover {
    background-color: #702f8a; /* PANTONE 7655 */
}

#results p.status {
    font-size: 1.1em;
    text-align: center;
}

.policy {
    max-width: 760px;
    margin: 0 auto;
    padding: 20px 30px;
    background-color: #fff;
    border-radius: 15px;
    line-height: 1.5;
}

.policy h1 {
    font-size: 2em;
}

.policy h2 {
    color: #702f8a; /* PANTONE 7655 */
    font-size: 1.2em;
    margin-top: 25px;
}

.policy a {
    color: #702f8a; /* PANTONE 7655 */
}

footer {
    margin: 40px 0 80px;
    text-align: center;
    font-size: .9em;
}

footer a, #cookie-notice a {
    color: #702f8a; /* PANTONE 7655 */
}

#cookie-notice {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    padding: 12px 20px;
    background-color: #fff;
    box-shadow: 0 -2px 8px rgba(0,0,0,.15);
}

/* `display: flex` above would otherwise override the hidden attribute. */
#cookie-notice[hidden] {
    display: none;
}

#cookie-notice p {
    margin: 0;
    max-width: 640px;
}

#cookie-notice button {
    padding: 10px 20px;
    background-color: #4c0070; /* PANTONE 2602 */
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    white-space: nowrap;
}

@media(max-width: 768px) {
    #search-form input {
        width:80%;
    }

    #results div {
        width: 90%;
    }
}

@media(max-width: 480px) {
    h1 {
        color: #4c0070;
        text-align: center;
        font-size: 2em;
        margin-bottom: 20px;
    }

    header {
        display: flex;
        flex-wrap: wrap;
        flex-direction: column;
        align-items: center;
    }

    #logo {
        width: 130px;
        height: auto;
    }

    #search-form input {
        width:90%;
    }

    #results div {
        width: 100%;
        height: fit-content;
    }

    #results img {
        object-fit: scale-down;
        width: 28%;
        height: 250px;
    }

    #cookie-notice {
        flex-direction: column;
        text-align: center;
    }
}

