/* Sunny Hunny Breaks – site styles */
:root {
  --page-bg: #4a8cdd;
  --nav-bg: #585858;
  --box-bg: #f6f6f6;
  --link: #345c00;
  --button: #0693e3;
  --booked: #d9534f;
  --unavailable: #9a9a9a;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page-bg);
  color: #000;
  font-family: var(--font);
  font-size: 1.1rem;
  line-height: 1.6;
}

.site { padding: 0 50px 40px; }

a { color: var(--link); }
img { max-width: 100%; height: auto; display: block; }

/* Header */
.site-header { padding-top: 10px; }
.site-title, .site-tagline { padding: 0 32px; }
.site-title { margin: 0; font-size: 1.85rem; line-height: 1.3; }
.site-title a { color: #000; text-decoration: none; }
.site-tagline { margin: 0 0 12px; font-size: 0.95rem; }

.site-nav { background: var(--nav-bg); padding: 0 20px; }
.menu-toggle { display: none; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav > ul { display: flex; flex-wrap: wrap; gap: 0 4px; }
.site-nav a {
  display: block; padding: 8px 12px; color: #fff; text-decoration: none;
}
.site-nav a:hover, .site-nav a:focus, .site-nav a[aria-current] { text-decoration: underline; }
.site-nav .has-sub { position: relative; }
.site-nav .has-sub > a::after { content: " \25BE"; font-size: 0.7em; }
.site-nav .sub {
  display: none; position: absolute; left: 0; top: 100%; z-index: 10;
  min-width: 200px; background: #fff; border: 1px solid #ddd;
}
.site-nav .sub a { color: #000; }
@media (min-width: 782px) {
  .site-nav .has-sub:hover .sub, .site-nav .has-sub:focus-within .sub { display: block; }
}

/* Main content */
/* Text is up to 1140px wide, centred, with at least 50px either side (as on the old site) */
.content { background: #fff; padding: 30px max(50px, calc((100% - 1140px) / 2)) 40px; }
.content h1 { font-size: 3.3rem; font-weight: 400; line-height: 1.2; margin: 0.3em 0 0.5em; }
.content h2 { font-size: 2.4rem; font-weight: 400; line-height: 1.2; margin: 1.2em 0 0.5em; }
.content h3 { font-size: 1.9rem; font-weight: 400; line-height: 1.25; margin: 1.2em 0 0.5em; }
.content h4 { font-size: 1.5rem; font-weight: 400; margin: 0.5em 0; }

.columns { display: flex; gap: 2em; align-items: flex-start; margin: 1.5em 0; }
.column { flex: 1 1 0; min-width: 0; }
.column > :first-child { margin-top: 0; }
.column.box { background: var(--box-bg); padding: 1.2em 1.5em; align-self: stretch; }
.column.box h3 { margin-top: 0; }

.buttons { margin: 1em 0; }
.button {
  display: inline-block; background: var(--button); color: #fff;
  padding: 0.6em 1.4em; border-radius: 9999px; text-decoration: none;
  font: inherit; border: 0; cursor: pointer;
}
.button:hover { filter: brightness(1.1); }

/* Icons used on the home page boxes */
.icon { display: inline-block; width: 0.8em; height: 0.8em; background: currentColor; vertical-align: -0.05em;
  -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.icon-home { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2 1 11h3v11h6v-7h4v7h6V11h3z'/%3E%3C/svg%3E"); }
.icon-calendar { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 1h2v3h6V1h2v3h4a1 1 0 0 1 1 1v17a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h4zM4 9v12h16V9zm2 3h3v3H6zm5 0h3v3h-3zm5 0h2v3h-2zM6 17h3v2H6zm5 0h3v2h-3z'/%3E%3C/svg%3E"); }
.icon-envelope { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 4h20a1 1 0 0 1 1 1v1l-11 7L1 6V5a1 1 0 0 1 1-1zm-1 4.4 11 7 11-7V19a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1z'/%3E%3C/svg%3E"); }

/* Photo gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 1em 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* Slideshow */
.slider { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: #eee; }
.slider img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 0.8s; }
.slider img.active { opacity: 1; }
.slider button {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  background: rgba(0,0,0,0.3); color: #fff; border: 0; width: 40px; height: 56px;
  font-size: 28px; cursor: pointer;
}
.slider button:hover { background: rgba(0,0,0,0.55); }
.slider .prev { left: 0; }
.slider .next { right: 0; }

/* Tables */
table { border-collapse: collapse; width: 100%; margin: 1em 0; }
th, td { text-align: left; padding: 0.5em 0.8em; border: 1px solid #ddd; }
thead th { border-bottom: 2px solid #999; }
tbody tr:nth-child(odd) { background: #f3f4f5; }

/* Availability calendars */
.calendars { display: flex; flex-wrap: wrap; gap: 14px; margin: 1em 0 2em; }
.cal-month { width: 220px; }
.cal-month table { width: 100%; margin: 0; font-size: 0.8rem; text-align: center; table-layout: fixed; }
.cal-month caption { background: #333; color: #fff; font-weight: 600; padding: 3px 0; }
.cal-month th, .cal-month td { padding: 2px 0; border: 1px solid #fff; text-align: center; }
.cal-month th { font-weight: 600; }
.cal-month td { background: #eee; }
.cal-month td.empty { background: #fafafa; }
.cal-month td.past { color: #aaa; }
.cal-month td.booked { background: var(--booked); color: #fff; }
.cal-month td.unavailable { background: var(--unavailable); color: #fff; }
.cal-month tbody tr:nth-child(odd) { background: none; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 1.2em; font-size: 0.9rem; margin: 0.5em 0; }
.cal-legend span::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; background: #eee; border: 1px solid #ccc; }
.cal-legend .l-booked::before { background: var(--booked); border-color: var(--booked); }
.cal-legend .l-unavailable::before { background: var(--unavailable); border-color: var(--unavailable); }
.cal-error { color: #900; }

/* Footer */
.site-footer { padding: 16px 32px 0; color: #000; }
.site-footer a { color: #000; }

/* Small screens */
@media (max-width: 781px) {
  .site { padding: 0 12px 30px; }
  .content { padding: 20px; }
  .content h1 { font-size: 2.4rem; }
  .content h2 { font-size: 1.9rem; }
  .content h3 { font-size: 1.5rem; }
  .columns { flex-direction: column; gap: 1em; }
  .column { width: 100%; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .site-title, .site-tagline { padding: 0 8px; }
  .site-nav { padding: 0 8px; }
  .site-nav > ul { flex-direction: column; padding: 4px 0 8px; }
  .site-nav a { padding: 6px 12px; }
  /* Menu button: the links stay hidden until it is tapped (only when JavaScript is on) */
  .js .menu-toggle {
    display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px;
    background: none; border: 0; color: #fff; font: inherit; cursor: pointer; text-align: left;
  }
  .menu-toggle .bars, .menu-toggle .bars::before, .menu-toggle .bars::after {
    display: block; width: 20px; height: 2px; background: #fff; position: relative; transition: transform 0.2s;
  }
  .menu-toggle .bars::before, .menu-toggle .bars::after { content: ""; position: absolute; left: 0; }
  .menu-toggle .bars::before { top: -6px; }
  .menu-toggle .bars::after { top: 6px; }
  .menu-toggle[aria-expanded=true] .bars { background: transparent; }
  .menu-toggle[aria-expanded=true] .bars::before { transform: translateY(6px) rotate(45deg); }
  .menu-toggle[aria-expanded=true] .bars::after { transform: translateY(-6px) rotate(-45deg); }
  .js .site-nav > ul { display: none; }
  .js .site-nav.open > ul { display: flex; }
  .site-nav .sub { position: static; display: block; border: 0; background: none; padding-left: 16px; }
  .site-nav .sub a { color: #fff; padding: 4px 12px; }
  .site-nav .has-sub > a::after { content: ""; }
  .cal-month { width: calc(50% - 7px); min-width: 130px; }
}
