/*
Theme Name: Mill Hill Escapes
Description: A classic WordPress theme for Mill Hill Escapes cottages.
Author: Benjamin Hall
Author URI: https://conobe.co.uk
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: mill-hill
*/

.mill-hill-menu a {
    display: block;
}

.mill-hill-menu a:hover {
    opacity: 0.7;
}

.mill-hill-header-action>li>a {
    padding: 1rem 1.5rem;
    border-radius: 3px;
    background: #30352E;
    color: #fff;
}

.mill-hill-header-action>li>a:hover {
    background: rgba(48, 53, 46, 0.9);
    opacity: 1;
}

.mill-hill-header-action>li>a:focus-visible {
    outline: 2px solid #30352E;
    outline-offset: 3px;
}

.mill-hill-menu .current-menu-item>a {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.mill-hill-menu li {
    position: relative;
}

.mill-hill-menu .sub-menu {
    padding-left: 1rem;
}

.mill-hill-desktop-menu .sub-menu {
    display: none;
    position: absolute;
    z-index: 50;
    min-width: 200px;
    background: #fff;
    padding: 1rem;
}

.mill-hill-desktop-menu li:hover>.sub-menu,
.mill-hill-desktop-menu li:focus-within>.sub-menu {
    display: block;
}

.mill-hill-desktop-menu .sub-menu .sub-menu {
    left: 100%;
    top: 0;
}

#mobile-menu-panel {
    overflow-y: auto;
}

.font-display {
    font-family: 'Libre Caslon Display', serif;
    font-weight: 400;
}

.font-body {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
}

.label {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.btn-text {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.75rem;
}

h1,
h2,
h3 {
    font-family: 'Libre Caslon Display', serif;
    font-weight: 400;
}

.with-lines {
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 20px;
}

.with-lines.justify-center {
    justify-content: center;
}

.with-lines span:first-child {
    content: '';
    height: 2px;
    width: 20%;
    background-color: #A9B293;
    display: block;
}

.with-lines span:last-child {
    display: block;
    content: '';
    height: 2px;
    width: 20%;
    background-color: #A9B293;
}

.with-lines.white span:first-child {
    background-color: #fff;
}

.with-lines.white span:last-child {
    background-color: #fff;
}

.with-lines .hidden {
    display: none !important;
    width: 0px !important;
}



/* Contact form */
.cf-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px 40px;
}

@media (min-width: 640px) {
    .cf-grid {
        grid-template-columns: 1fr 1fr;
    }

    .cf-full {
        grid-column: 1 / -1;
    }
}

.cf-field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cf-field label {
    color: rgba(48, 53, 46, 0.6);
}

.cf-field input,
.cf-field select,
.cf-field textarea {
    width: 100%;
    border: 0;
    border-bottom: 1px solid rgba(169, 178, 147, 0.9);
    border-radius: 0;
    background: transparent;
    padding: 10px 0;
    font-family: 'DM Sans', sans-serif;
    font-size: 1.0625rem;
    color: #30352E;
    outline: none;
    transition: border-color 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.cf-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2330352E' stroke-width='1.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    background-size: 18px;
    padding-right: 28px;
}

.cf-field textarea {
    resize: vertical;
    border: 1px solid rgba(169, 178, 147, 0.9);
    padding: 14px;
    min-height: 150px;
}

.cf-field input:focus,
.cf-field select:focus,
.cf-field textarea:focus {
    border-color: #30352E;
}

.cf-field input:focus-visible,
.cf-field select:focus-visible,
.cf-field textarea:focus-visible {
    box-shadow: 0 1px 0 0 #30352E;
}

.cf-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

#image-carousel-track {
    scrollbar-width: none;
}

#image-carousel-track::-webkit-scrollbar {
    display: none;
}

@media (min-width: 768px) {
    #image-carousel-track .image-carousel-slide {
        flex-basis: var(--carousel-slide-width);
    }
}

.image-carousel-open {
    display: block;
    width: 100%;
    cursor: zoom-in;
}

.image-carousel-lightbox[open] {
    position: fixed;
    inset: 0;
    display: flex;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: none;
    align-items: center;
    justify-content: center;
    margin: 0;
    border: 0;
    padding: 0;
    background: transparent;
    color: #fff;
}

.image-carousel-lightbox::backdrop {
    background: rgba(20, 22, 19, 0.94);
}

.image-carousel-lightbox-content {
    position: relative;
    display: flex;
    width: min(100vw, 1400px);
    height: min(100vh, 1000px);
    height: min(100dvh, 1000px);
    align-items: center;
    justify-content: center;
    padding: 64px 72px;
}

.image-carousel-lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.image-carousel-lightbox-control {
    position: absolute;
    z-index: 1;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 0;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    cursor: pointer;
}

.image-carousel-lightbox-control:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.28);
}

.image-carousel-lightbox-control:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.image-carousel-lightbox-control:disabled {
    cursor: default;
    opacity: 0.35;
}

.image-carousel-lightbox-close {
    top: 16px;
    right: 16px;
}

.image-carousel-lightbox-previous,
.image-carousel-lightbox-next {
    top: 50%;
    transform: translateY(-50%);
}

.image-carousel-lightbox-previous {
    left: 16px;
}

.image-carousel-lightbox-next {
    right: 16px;
}

.image-carousel-lightbox-count {
    position: absolute;
    bottom: 16px;
    left: 50%;
    margin: 0;
    transform: translateX(-50%);
    font-size: 0.875rem;
}

.testimonial-carousel-track {
    display: grid;
    align-items: center;
}

.testimonial-carousel-slide {
    grid-area: 1 / 1;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.testimonial-carousel-slide.is-active {
    visibility: visible;
    opacity: 1;
}

#testimonial-carousel-navigation {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    max-width: 100%;
    margin: 50px auto 0;
}

.testimonial-carousel-indicator {
    display: flex;
    flex: 0 0 12px;
    width: 12px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.testimonial-carousel-indicator::before {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    content: '';
    transition: background-color 0.2s ease;
}

.testimonial-carousel-indicator.is-active {
    flex-basis: 28px;
    width: 28px;
}

.testimonial-carousel-indicator.is-active::before {
    background: #fff;
}

.testimonial-carousel-indicator:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -4px;
}

@media (prefers-reduced-motion: reduce) {
    .testimonial-carousel-slide {
        transition: none;
    }
}

@media (max-width: 640px) {
    .image-carousel-lightbox-content {
        padding: 56px 52px;
    }

    .image-carousel-lightbox-previous {
        left: 4px;
    }

    .image-carousel-lightbox-next {
        right: 4px;
    }
}

.image-carousel-lightbox[open] {
    position: fixed;
    inset: 0;
    display: flex;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: none;
    align-items: center;
    justify-content: center;
    margin: 0;
    border: 0;
    padding: 0;
    background: transparent;
    color: #fff;
}

.image-carousel-lightbox::backdrop {
    background: rgba(20, 22, 19, 0.94);
}

.image-carousel-lightbox-content {
    position: relative;
    display: flex;
    width: min(100vw, 1400px);
    height: min(100vh, 1000px);
    height: min(100dvh, 1000px);
    align-items: center;
    justify-content: center;
    padding: 64px 72px;
}

.image-carousel-lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.image-carousel-lightbox-control {
    position: absolute;
    z-index: 1;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 0;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    cursor: pointer;
}

.image-carousel-lightbox-control:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.28);
}

.image-carousel-lightbox-control:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.image-carousel-lightbox-control:disabled {
    cursor: default;
    opacity: 0.35;
}

.image-carousel-lightbox-close {
    top: 16px;
    right: 16px;
}

.image-carousel-lightbox-previous,
.image-carousel-lightbox-next {
    top: 50%;
    transform: translateY(-50%);
}

.image-carousel-lightbox-previous {
    left: 16px;
}

.image-carousel-lightbox-next {
    right: 16px;
}

.image-carousel-lightbox-count {
    position: absolute;
    bottom: 16px;
    left: 50%;
    margin: 0;
    transform: translateX(-50%);
    font-size: 0.875rem;
}

@media (max-width: 640px) {
    .image-carousel-lightbox-content {
        padding: 56px 52px;
    }

    .image-carousel-lightbox-previous {
        left: 4px;
    }

    .image-carousel-lightbox-next {
        right: 4px;
    }
}

/* Gallery grid */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 640px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 32px;
    }

    .gallery-grid .gallery-wide {
        grid-column: span 2;
        aspect-ratio: 8 / 3;
    }
}

.gallery-open {
    display: block;
    overflow: hidden;
    padding: 0;
    border: 0;
    background: #E4E5D3;
    cursor: zoom-in;
    aspect-ratio: 4 / 3;
}

.gallery-open img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.gallery-open:hover img {
    transform: scale(1.04);
}

.gallery-open:focus-visible {
    outline: 2px solid #30352E;
    outline-offset: 3px;
}

/* Password-protected form */
.post-password-form {
    max-width: 560px;
    margin: 48px auto;
    padding: 36px 32px;
    background: #FAF9F5;
    border: 1px solid rgba(169, 178, 147, 0.5);
    border-radius: 4px;
    box-sizing: border-box;
}

@media (min-width: 640px) {
    .post-password-form {
        padding: 44px 40px;
    }
}

.post-password-form::before {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background-color: #A9B293;
    margin-bottom: 24px;
}

.post-password-form p:empty {
    display: none;
    margin: 0;
}

.post-password-form p {
    margin: 0 0 24px;
    font-family: 'DM Sans', sans-serif;
    font-size: 1.0625rem;
    line-height: 1.6;
    color: #30352E;
}

.post-password-form p:last-child,
.post-password-form p:last-of-type {
    margin-bottom: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

.post-password-form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 240px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 500;
    color: rgba(48, 53, 46, 0.7);
}

.post-password-form input[type="password"] {
    display: block;
    width: 100%;
    height: 50px;
    padding: 10px 16px;
    border: 1px solid rgba(169, 178, 147, 0.9);
    border-radius: 3px;
    background: #fff !important;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    color: #30352E;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.post-password-form input[type="password"]:focus {
    border-color: #30352E;
    box-shadow: 0 0 0 1px #30352E;
}

.post-password-form input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    padding: 0 28px;
    border: 0;
    border-radius: 3px;
    background: #30352E;
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
    flex-shrink: 0;
}

.post-password-form input[type="submit"]:hover {
    background: rgba(48, 53, 46, 0.9);
}

.post-password-form input[type="submit"]:focus-visible {
    outline: 2px solid #30352E;
    outline-offset: 3px;
}

@media (max-width: 480px) {
    .post-password-form input[type="submit"] {
        width: 100%;
    }
}