/* ==========================================================================
   Bella Vista Farm – site styles
   --------------------------------------------------------------------------
   The colours and sizes at the top come from the WordPress site (Blocksy
   theme settings and the WPForms form). Change a value here and it changes
   everywhere on the site.
   ========================================================================== */

:root {
    /* Colours */
    --blue: #2872fa;            /* buttons and links in the theme            */
    --blue-dark: #1559ed;
    --text: #3a4f66;            /* normal text                               */
    --heading: #192a3d;         /* titles                                    */
    --border: #e1e8ed;
    --page-bg: #fafbfc;         /* page background                           */
    --footer-bg: #f2f5f7;
    --white: #ffffff;
    --icon: #000000;            /* the envelope, phone, map and info icons   */
    --menu-hover: #0085ce;
    --menu-current: #8c8c8c;
    --form-blue: #066aab;       /* Submit button                             */
    --form-error: #d63637;

    /* Layout */
    --container: 1290px;        /* widest the content gets                   */
    --edge: 90vw;               /* ...or this much of a smaller screen       */
    --page-space: 60px;         /* gap under the menu and above the footer   */
    --section-space: 50px;      /* space above and below each section        */
    --title-align: center;      /* page and section titles: center or left   */

    /* The big photo at the top of the Home page */
    --hero-space-top: 100px;    /* space above "Welcome to Bella Vista Farm" */
    --hero-space-bottom: 300px; /* space below it                            */
    --hero-shade: 0.3;          /* used only when 'hero_text' is 'light' in
                                   config.php: how much the photo is darkened */
}

/* --------------------------------------------------------------------------
   Basics
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background-color: var(--page-bg);
    overflow-wrap: break-word;

    /* Keep the footer at the bottom of the screen on short pages. */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
    padding: var(--page-space) 0;
}

h1,
h2,
h3,
h4 {
    margin: 0 0 20px;
    color: var(--heading);
    font-weight: 700;
    line-height: 1.5;
}

/* Page titles and section titles share one size, as on the WordPress site. */
h1,
h2,
h3 {
    font-size: 35px;
}

.subhead {
    font-size: 25px;
}

/* Two headings on the Home page sit closer together when they wrap. */
.heading-tight {
    line-height: 1;
}

p {
    margin: 0 0 1.5em;
}

p:last-child {
    margin-bottom: 0;
}

img {
    max-width: 100%;
    height: auto;
    border: 0;
}

/* Links inside the page text look like the text around them (as on the
   WordPress site) and underline when pointed at. */
a {
    color: inherit;
    text-decoration: none;
}

main a:hover {
    text-decoration: underline;
}

:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

main:focus {
    outline: none;
}

.container {
    width: var(--edge);
    max-width: var(--container);
    margin-left: auto;
    margin-right: auto;
}

.container--narrow {
    max-width: 900px;
}

.icon {
    display: block;
    width: 1em;
    height: 1em;
    fill: currentColor;
}

.skip-link {
    position: absolute;
    left: 8px;
    top: -60px;
    z-index: 200;
    padding: 10px 16px;
    background: var(--white);
    color: var(--heading);
    font-weight: 600;
    border-radius: 3px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.skip-link:focus {
    top: 8px;
}

/* --------------------------------------------------------------------------
   Header: logo and menu
   -------------------------------------------------------------------------- */

.site-header {
    background-color: var(--white);
    background-position: 1% 100%;
    background-size: cover;
    background-repeat: no-repeat;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 120px;
}

.site-logo {
    display: block;
    flex: none;
}

.site-logo img {
    display: block;
    width: auto;
    max-height: 163px;
}

.site-logo__text {
    font-size: 25px;
    font-weight: 700;
    color: var(--heading);
}

.main-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin: 0 -9px 0 0;         /* the last word lines up with the page edge */
    padding: 0;
    list-style: none;
}

.main-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 9px;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.3;
    text-transform: uppercase;
    color: var(--text);
    transition: color 0.12s ease;
}

.main-nav a:hover {
    color: var(--menu-hover);
}

.main-nav .is-current a {
    color: var(--menu-current);
}

/* The three-line menu button on tablets and phones */
.nav-toggle {
    display: none;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-right: -13px;        /* the three lines end at the page edge */
    padding: 0;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.nav-toggle svg {
    display: block;
    fill: currentColor;
}

.nav-toggle:hover {
    color: var(--menu-hover);
}

/* The menu panel that slides in from the right */
.offcanvas {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    visibility: hidden;
    transition: visibility 0s linear 0.25s;
}

.offcanvas.is-open {
    visibility: visible;
    transition-delay: 0s;
}

.offcanvas__backdrop {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.offcanvas__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 500px;
    max-width: 100%;
    padding: 30px 35px 35px;
    overflow-y: auto;
    background-color: rgba(18, 21, 25, 0.98);
    box-shadow: 0 0 70px rgba(0, 0, 0, 0.35);
    transform: translateX(100%);
    transition: transform 0.25s ease;
}

.offcanvas.is-open .offcanvas__panel {
    transform: none;
}

.offcanvas__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: -10px -15px 25px auto;
    padding: 0;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
}

.offcanvas__close:hover {
    color: var(--white);
}

.offcanvas__close svg {
    display: block;
    fill: currentColor;
}

.offcanvas ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.offcanvas li a {
    display: block;
    padding: 5px 0;
    color: var(--white);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.65;
}

.offcanvas li a:hover,
.offcanvas .is-current a {
    color: var(--blue-dark);
}

.offcanvas :focus-visible {
    outline-color: var(--white);
}

html.is-locked,
html.is-locked body {
    overflow: hidden;
}

@media (max-width: 999.98px) {
    .site-header__inner {
        min-height: 70px;
    }

    .js .main-nav {
        display: none;
    }

    .js .nav-toggle {
        display: flex;
    }

    /* Without JavaScript the full menu simply stays on show. */
    .no-js .site-header__inner {
        flex-wrap: wrap;
        padding-bottom: 10px;
    }

    .offcanvas__panel {
        width: 65vw;
    }
}

@media (max-width: 689.98px) {
    :root {
        --edge: 88vw;
        --page-space: 50px;
        --section-space: 36px;
    }

    .offcanvas__panel {
        width: 90vw;
        padding: 20px 25px 25px;
    }
}

/* --------------------------------------------------------------------------
   Page sections
   -------------------------------------------------------------------------- */

.page-head {
    padding: 10px 0 0;
    text-align: var(--title-align);
}

.page-head h1 {
    margin-bottom: 0;
}

.page-head .lead {
    margin: 12px 0 0;
}

.section {
    padding: var(--section-space) 0;
}

.section--tight {
    padding: calc(var(--section-space) * 0.6) 0;
}

.section-title,
.subhead {
    text-align: var(--title-align);
}

.section-title {
    margin-bottom: 30px;
}

main > section:last-of-type {
    padding-bottom: 10px;
}

/* The big photo at the top of the Home page. The title is dark, as on the
   WordPress page. For a dark photo set 'hero_text' => 'light' in config.php:
   the title turns white and the photo is dimmed a little behind it. */
.hero {
    position: relative;
    overflow: hidden;
    background-color: #e4eaef;
    text-align: var(--title-align);
}

.hero__img {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
}

.hero .container {
    position: relative;
    z-index: 1;
    padding-top: var(--hero-space-top);
    padding-bottom: var(--hero-space-bottom);
}

.hero__title {
    margin: 0;
}

.hero--light {
    background-color: #33414f;
}

.hero--light::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, var(--hero-shade));
}

.hero--light .hero__title {
    color: var(--white);
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
}


/* A photo beside some text. Whichever comes first in the page file is on
   the left. On phones the two stack, in the same order. */
.split {
    display: flex;
    align-items: center;
}

.split > * + * {
    margin-left: 40px;
}

.split + .split,
.story > * + .split,
.story > .split + * {
    margin-top: 40px;
}

.split > * {
    flex: 1 1 0;
    min-width: 0;
}

.split__media .photo,
.split__media img {
    display: block;
    width: 100%;
}

.split__text h2,
.split__text h3 {
    margin-bottom: 14px;
}

.story > p + p {
    margin-top: 1.5em;
}

.story > .subhead {
    margin-bottom: 24px;
}

@media (max-width: 767.98px) {
    .split {
        flex-direction: column;
        align-items: stretch;
    }

    .split > * {
        flex: none;
    }

    .split > * + * {
        margin-top: 20px;
        margin-left: 0;
    }
}

/* Home page: "Get In Touch!" */
.touch {
    text-align: center;
}

.touch .section-title {
    margin-bottom: 16px;
}

.touch__icon {
    display: inline-flex;
    color: var(--icon);
    font-size: 50px;
    border-radius: 3px;
}

.touch__address {
    margin-top: 10px;
}

/* Accommodation page: the three points with an "i" icon */
.features {
    display: grid;
    gap: 22px;
    max-width: 820px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

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

.feature__icon {
    display: flex;
    flex: none;
    justify-content: center;
    width: 50px;
    margin-right: 24px;
    color: var(--icon);
    font-size: 50px;
}

.feature p {
    margin: 0;
}

.pricing-note {
    margin: 32px 0 0;
    text-align: center;
}

/* --------------------------------------------------------------------------
   Photos and photo grids
   -------------------------------------------------------------------------- */

.photo {
    display: block;
}

a.photo {
    cursor: zoom-in;
}

.photo img {
    display: block;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
}

.gallery--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery__item {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

/* Thumbnails keep the size WordPress showed them at: up to 300px wide,
   or 200px wide for upright photos. */
.gallery__item .photo {
    width: 100%;
    max-width: 300px;
}

.gallery__item--portrait .photo {
    max-width: 200px;
}

.gallery__item img {
    width: 100%;
}

.gallery__item a.photo {
    transition: opacity 0.12s ease;
}

.gallery__item a.photo:hover {
    opacity: 0.85;
}

/* Smaller screens, in the same steps as the WordPress galleries: two photos
   per row on large phones and small tablets, one per row on phones. For two
   per row on phones as well, delete the second block below. */
@media (max-width: 767.98px) {
    .gallery,
    .gallery--3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 479.98px) {
    .gallery,
    .gallery--3 {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Shown in place of a photo that has not been uploaded yet */
.photo-missing {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    overflow: hidden;
    border: 1px dashed #b9c5d0;
    background: #eef2f5;
    color: #5b6b7b;
    text-align: center;
}

.photo-missing__icon {
    flex: none;
    width: 26px;
    height: 26px;
    fill: currentColor;
    opacity: 0.55;
}

.photo-missing__name {
    max-width: 100%;
    font-size: 12px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.site-logo .photo-missing {
    width: 120px;
}

/* --------------------------------------------------------------------------
   The large photo viewer that opens when a photo is clicked
   -------------------------------------------------------------------------- */

.lightbox {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 300;
    display: none;
    background: rgba(0, 0, 0, 0.9);
    color: var(--white);
    touch-action: pan-y pinch-zoom;
}

.lightbox.is-open {
    display: block;
}

.lightbox__stage {
    position: absolute;
    top: 56px;
    right: 64px;
    bottom: 48px;
    left: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox__img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.lightbox__img.is-loaded {
    opacity: 1;
}

.lightbox__spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    margin: -18px 0 0 -18px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: lightbox-spin 0.8s linear infinite;
}

.lightbox.is-ready .lightbox__spinner {
    display: none;
}

@keyframes lightbox-spin {
    to {
        transform: rotate(360deg);
    }
}

.lightbox__button {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: color 0.12s ease, background-color 0.12s ease;
}

.lightbox__button:hover {
    color: var(--white);
    background-color: rgba(255, 255, 255, 0.14);
}

.lightbox__button:focus-visible {
    outline-color: var(--white);
}

.lightbox__button svg {
    display: block;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.lightbox__close {
    top: 4px;
    right: 8px;
}

.lightbox__prev {
    top: 50%;
    left: 8px;
    margin-top: -24px;
}

.lightbox__next {
    top: 50%;
    right: 8px;
    margin-top: -24px;
}

.lightbox__count {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12px;
    margin: 0;
    font-size: 14px;
    line-height: 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
}

.lightbox.is-single .lightbox__prev,
.lightbox.is-single .lightbox__next,
.lightbox.is-single .lightbox__count {
    display: none;
}

@media (max-width: 689.98px) {
    .lightbox__stage {
        right: 8px;
        left: 8px;
    }

    .lightbox__prev,
    .lightbox__next {
        top: auto;
        bottom: 0;
        margin-top: 0;
    }
}

/* --------------------------------------------------------------------------
   Contact page
   -------------------------------------------------------------------------- */

.contact-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
    margin: 30px 0 0;
    padding: 0;
    list-style: none;
    text-align: center;
}

.contact-card__icon {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
    color: var(--icon);
    font-size: 50px;
}

.contact-card p {
    margin: 0;
}

@media (max-width: 767.98px) {
    .contact-cards {
        grid-template-columns: 1fr;
    }
}

/* The form – colours, sizes and spacing are those of the WPForms form:
   the name and email boxes take 60% of the width, the message box all of it. */
.form {
    margin: 24px 0;
    color: rgba(0, 0, 0, 0.85);
}

.form__group {
    padding: 15px 0;
}

.form fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.form label,
.form legend {
    display: block;
    margin: 0 0 15px;
    padding: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 19px;
}

.form .required {
    color: var(--form-error);
    font-weight: 400;
}

.form__row {
    display: flex;
    max-width: 60%;
}

.form__field {
    flex: 0 0 50%;
    min-width: 0;
    padding-right: 10px;
}

.form__field + .form__field {
    padding-right: 0;
    padding-left: 10px;
}

.form input[type="email"] {
    max-width: 60%;
}

.form .form__sublabel {
    margin: 5px 0 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 17px;
    color: rgba(0, 0, 0, 0.55);
}

.form input[type="text"],
.form input[type="email"],
.form textarea {
    display: block;
    width: 100%;
    height: 43px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: 3px;
    background-color: var(--white);
    color: rgba(0, 0, 0, 0.7);
    font-family: inherit;
    font-size: 16px;
    line-height: 19px;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.form textarea {
    height: 120px;
    min-height: 43px;
    padding: 14px;
    line-height: 1.3;
    resize: vertical;
}

.form input:focus,
.form textarea:focus {
    outline: none;
    border-color: var(--form-blue);
    box-shadow: 0 0 0 1px var(--form-blue);
}

.form [aria-invalid="true"] {
    border-color: var(--form-error);
}

.form [aria-invalid="true"]:focus {
    border-color: var(--form-error);
    box-shadow: 0 0 0 1px var(--form-error);
}

.form .form__error {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 17px;
    color: var(--form-error);
}

/* The trap for spam robots: kept out of sight and out of reach. */
.form__trap {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 41px;
    margin-top: 10px;
    padding: 0 15px;
    border: 0;
    border-radius: 3px;
    background-color: var(--form-blue);
    color: var(--white);
    font-family: inherit;
    font-size: 17px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.button:hover {
    background-color: #055589;
}

.button:focus-visible {
    outline: 2px solid var(--form-blue);
    outline-offset: 2px;
}

.button[disabled] {
    opacity: 0.6;
    cursor: default;
}

.notice {
    margin: 24px 0 0;
    padding: 15px;
    border: 1px solid;
}

.notice p {
    margin: 0;
}

/* The green "Thanks for contacting us!" box, as WPForms shows it. */
.notice--success {
    border-color: #b4d39b;
    background: #e0ffc7;
    color: #333333;
}

.notice--error {
    border-color: #ebb4b4;
    background: #fdf1f1;
    color: #9c2323;
}

@media (max-width: 600px) {
    .form__row,
    .form input[type="email"] {
        max-width: 100%;
    }
}

.map {
    padding: 10px;
    line-height: 0;
}

.map iframe {
    display: block;
    width: 100%;
    height: 300px;
    border: 0;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
    padding: 17px 0;
    background-color: var(--footer-bg);
    font-size: 15px;
    line-height: 1.3;
    text-align: center;
}

/* On a computer screen the footer text sits in the middle third of the
   page, so it wraps onto three lines, as on the WordPress site. */
.site-footer p {
    max-width: calc((100% - 100px) / 3);
    margin: 0 auto;
}

@media (max-width: 999.98px) {
    .site-footer p {
        max-width: none;
    }
}

/* --------------------------------------------------------------------------
   "Page not found" and the upload checklist
   -------------------------------------------------------------------------- */

.plain-page {
    padding: 10px 0 30px;
    text-align: center;
}

.plain-page .button {
    text-decoration: none;
}

.checklist {
    max-width: 820px;
    margin: 0 auto;
    padding: 10px 0;
}

.checklist h1 {
    font-size: 30px;
}

.checklist h2 {
    margin-top: 36px;
    font-size: 22px;
}

.checklist ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.checklist li {
    position: relative;
    margin: 0 0 8px;
    padding: 10px 14px 10px 46px;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--white);
}

.checklist li::before {
    position: absolute;
    left: 14px;
    top: 9px;
    font-weight: 700;
}

.checklist .is-ok::before {
    content: "\2713";
    color: #1d7a3a;
}

.checklist .is-todo::before {
    content: "!";
    left: 19px;
    color: #b25c00;
}

.checklist .is-todo {
    border-color: #f0d2a8;
    background: #fff9f0;
}

.checklist code {
    padding: 1px 5px;
    border-radius: 3px;
    background: #eef2f5;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.checklist .file-list {
    max-height: 320px;
    margin: 10px 0 0;
    padding: 10px 14px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--white);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
