/* CSS Reset */
html {
  scroll-behavior: smooth;
}

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
    box-sizing: border-box;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
    display: block;
}

strong {
  font-weight: bold;
}

/* Color palette variables */
:root {
  --color-text: #2E271B;
  --color-link: #A53A28;
  --color-primary: #C3472F;
  --color-primary-hover: #A53A28;
  --color-secondary: #5A7560;
  --color-secondary-hover: #354938;
  --color-primary-text: #ffffff;
  --color-secondary-text: #ffffff;
  --color-bg-light: #F6F6F4;
  --color-secondary: var(--color-secondary-hover);
  --color-bg: #F4F1EC;
  --layout-padding: 84px;
  --border-radius: 4px;
  --grid-gap: 6px;
  --nav-height: 48px;
  --max-container-width: 1440px;
  --font-family-sans-serif: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-family-sans-serif-narrow: "Franklin Gothic Medium Condensed", "Franklin Gothic Demi Cond", "Tahoma", "Arial Narrow", "Helvetica Neue Condensed", "Roboto Condensed", sans-serif;
  --font-family-serif: Georgia, "Times New Roman", Times, serif;
}

body {
  font-family: var(--font-family-sans-serif);
  font-weight: 300;
  line-height: 1.5;
  background: var(--color-bg);
  color: var(--color-text);
}

nav {
  height: var(--nav-height);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-serif);
  font-weight: 400;
}

h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 0.35em;
}

h2 {
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 0.35em;
}

h3 {
  font-size: 1.5rem;
  line-height: 1.2;
  margin-bottom: 0.25em;
}

hr {
  border: none;
  border-top: 2px solid rgba(112, 138, 116, 0.35); /* var(--color-secondary) at 35% opacity */
  width: 100%;
}

p:not(:last-of-type) {
  margin-bottom: 1em;
}

a, a:visited {
  color: var(--color-link);
  text-decoration: underline;
  transition: color 0.2s;
}

a:hover, a:focus {
    color: var(--color-primary-hover);
}

ul {
  list-style: none;
  margin-bottom: 1.5em;
  margin-top: 1em;
  padding-left: 0;
}

ul li {
  position: relative;
  padding: 12px 0;
}

ul li:not(:last-child) {
  border-bottom: 2px solid rgba(112, 138, 116, 0.35); /* var(--color-secondary) at 35% opacity */
}

/* Primary button */
.button-primary, .button-secondary, button.primary, button.secondary, button {
    font-family: var(--font-family-sans-serif-narrow);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1;
    min-height: 48px;
    height: 48px;
    padding: 0 2em;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    outline: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    box-sizing: border-box;
    vertical-align: middle;
    letter-spacing: 0.035em;
}

.tight-button-padding {
  padding: 0 0.5em;
}

.button-primary, button.primary {
    background: var(--color-primary);
    color: var(--color-primary-text) !important;
    border: none;
}

.button-primary:hover, button.primary:hover {
    background: var(--color-primary-hover);
    color: var(--color-primary-text) !important;
}

/* Secondary button */
.button-secondary, button.secondary {
    background: transparent;
    color: var(--color-secondary) !important;
    border: 2px solid var(--color-secondary);
}

.button-secondary:hover, button.secondary:hover, .button-secondary-filled {
    background: var(--color-secondary);
    color: var(--color-secondary-text) !important;
    border-color: var(--color-secondary);
}

.button-secondary-filled:hover {
  background: var(--color-secondary-hover);
  border-color: var(--color-secondary-hover);
}

.container {
  max-width: var(--max-container-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  grid-auto-rows: 240px;
  grid-auto-flow: dense;
  gap: var(--grid-gap);
  padding: var(--grid-gap);
}

.item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: var(--border-radius);
}

.item:not(:has(img)) {
  /*background: var(--color-bg-light);*/
}

.content {
  padding: 2em;
  justify-content: flex-start;
  align-items: flex-start;
  min-height: 240px;
  background-color: var(--color-bg);
  z-index: 100;
  height: fit-content;
}
.item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  padding: 0;
  border-radius: var(--border-radius);
}
.span-2-col {
  grid-column: span 2;
}
.span-2-row {
  grid-row: span 2;
}

.span-3-col {
  grid-column: span 3;
}

.span-3-row {
  grid-row: span 3;
}

.booking-form {
  grid-row: span 2;
}

form {
  /*background: var(--color-bg-light);*/
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  height: 100%;
  padding: 2em;
}

label {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 4px;
  margin-top: 12px;
}

input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  margin-bottom: 8px;
  width: calc(100% - 24px);
  background: #fff;
  min-height: 32px;
  height: 32px;
}

small {
  font-size: 0.875rem;
  color: #555;
}

blockquote {
  /*background: var(--color-bg-light);*/
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  font-style: italic;
  overflow: visible;
  height: 100%;
  width: 100%;
}

blockquote p {
  margin: 0;
  font-size: 1.13rem;
  line-height: 1.6;
  position: relative;
  z-index: 2;
  background: transparent;
  text-align: center;
}

blockquote::before {
  content: "\201C";
  font-size: 24rem;
  color: var(--color-primary);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-75%, -25%);
  font-family: var(--font-family-serif);
  opacity: 0.1;
  z-index: 1;
  pointer-events: none;
  user-select: none;
  line-height: 1;
  white-space: pre;
}

.location-info {
  padding: 2em;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  /*background: var(--color-bg-light);*/
}

.location-heading {
  margin-bottom: 0.5em;
}

.location-details {
  margin: 0;
}

.map {
  width: 100%;
  position: relative;
  display: flex;
}

.map iframe {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  border: none;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 12px -2px rgba(41,23,6,0.08);
}

/* Navigation styles */
.nav-container {
  max-width: var(--max-container-width);
  margin: 0 auto;
  padding: 0 var(--grid-gap);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--grid-gap);
  overflow: hidden;
}

.nav-home {
  display: flex;
  align-items: center;
  color: var(--color-text) !important;
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav-home:hover {
  color: var(--color-primary-hover);
}

.nav-home svg {
  width: 24px;
  height: 24px;
}

.nav-home-title {
  font-family: var(--font-family-serif);
  font-size: 1.35rem;
  font-weight: 300;
  margin-left: 0.5em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link:not(.button-primary) {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--color-primary-hover);
}

.nav-link.button-primary {
  font-weight: 500;
}

.social-media-icons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  width: 100%;
}

.social-media-icon {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  background-color: transparent;
  border: 2px solid var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.social-media-icon:hover {
  background-color: var(--color-secondary-hover);
}

.social-media-icon a {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-media-icon svg {
  width: 28px;
  height: 28px;
}

.social-media-icon path {
  fill: var(--color-secondary);
  transition: fill 0.2s ease;
}

.social-media-icon:hover path {
  fill: #fff;
}

.mobile-only {
  display: none;
}

.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 24px;
  height: 24px;
  min-height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 999;
}

.hamburger-menu span {
  width: 100%;
  height: 3px;
  background: var(--color-text);
  border-radius: 10px;
  transition: all 0.3s linear;
}

.hamburger-menu.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 768px) {
  .social-media-icons {
    justify-content: flex-start;
  }

  .hide-on-mobile {
    display: none;
  }

  .mobile-only {
    display: flex;
  }

  .nav-container {
    padding: 2em 1.5em;
    margin-top: 0;
  }

  .hamburger-menu {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 995;
    padding: 2em;
  }
  
  .nav-links.active {
    transform: translateX(0);
  }
  
  .nav-link {
    font-size: 1.2rem;
  }
  
  .mobile-button {
    display: block !important;
    margin-top: 1.5rem;
  }
  
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  button {
    width: 100%;
  }

  .location-info {
    padding: 1em;
    grid-row: span 2;
  }
}



/* Small mobile devices */
@media (max-width: 480px) {
  .social-media-icons {
    justify-content: center;
    gap: 1.5em;
  }

  .hide-on-mobile {
    display: none;
  }
  
  .container {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    gap: 6px;
    padding: 6px;
    margin: 0;
    box-sizing: border-box;
  }

  .item {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    grid-row: span 2;
  }

  .item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: 100%;
  }

  .span-3-col {
    grid-column: span 2;
  }

  .span-2-row {
    grid-row: span 4;
  }

  .content {
    padding: 1em;
    justify-content: center;
    grid-row: auto / auto;
    height: auto;
    min-height: 0;
  }

  /*
  .content.span-2-row {
    grid-row: span 6;
  }

  .content.span-3-row {
    grid-row: span 9;
  }
  */

  #intro-text {
    grid-column: span 2;
    /*grid-row: span 3;*/
    grid-row: auto / auto;
    height: auto;
    min-height: 0;
  }

  .booking-form {
    padding: 1em;
    justify-content: center;
    grid-column: span 2;
    grid-row: span 5;
  }

  form {
    padding: 0;
  }

  blockquote {
    padding: 1em;
    font-size: 1rem;
  }

  .location-info {
    padding: 1em;
    grid-column: span 2;
    grid-row: span 5;
  }
  
  ul {
    padding: 0;
    width: 100%;
  }

  li {
    padding: 0.5em 0;
    justify-content: stretch;
  }

  .button-primary, .button-secondary {
    width: 100%;
  }
  
  #yhteystiedot {
    margin-bottom: 0.5em;
  }

}