/*Refactored and approved */

/* =============================== */
/* 01. VARIABLES & RESETS          */
/* =============================== */

:root {
  --color-primary: #6a5d3d;
  --color-white: #ffffff;
  --color-black: #000000;
  --color-foreground: var(--color-black);
  --color-background: var(--color-white);
  --font-base: "Inter", sans-serif;
  --font-summary: "Figtree", "Inter", sans-serif;
  --ff-heading-main: "Cormorant Garamond", Georgia, sans-serif;
  --font-size-base: 1rem;
  --font-size-sm: 0.875rem;
  --radius-sm: 3px;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
}

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

html, body {
  scroll-behavior: smooth;
  font-family: var(--font-base);
  background-color: var(--color-background);
  color: var(--color-foreground);
  overflow-x: hidden;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =============================== */
/* 02. BASE TYPOGRAPHY             */
/* =============================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: 400;
  line-height: 1.2;
  hyphens: auto;
  overflow-wrap: break-word;
  word-wrap: break-word;
  letter-spacing: -0.01em;
  margin-bottom: var(--spacing-sm);
}

p, blockquote, figcaption {
  font-size: var(--font-size-base);
  line-height: 1.6;
  margin-bottom: var(--spacing-sm);
}

strong, b {
  font-weight: 500;
}

em, i {
  font-style: italic;
}

small {
  font-size: var(--font-size-sm);
}

hr {
  border: none;
  border-top: 1px solid var(--color-foreground);
  margin: var(--spacing-md) 0;
}

blockquote {
  padding-left: var(--spacing-sm);
  border-left: 3px solid var(--color-primary);
  font-style: italic;
  color: var(--color-primary);
}

/* Drop Cap */
.has-drop-cap:not(:focus):first-letter {
  font-size: 2.75em;
  font-weight: 500;
  margin: 0.1em 1rem 0.4rem 0;
  padding: 0.35em;
  border: 1px solid currentColor;
  text-align: center;
  min-width: 0.6875em;
  float: left;
  line-height: 1;
}


/*
==============================
03. LINKS & BUTTONS
==============================
*/

a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 0.2em;
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

/* Button Base */
button,
input[type="submit"],
.wp-element-button,
.wp-block-button__link,
{
  font-family: inherit;
  font-weight: 500;
  font-size: inherit;
  background-color: var(--color-primary);
  color: var(--color-white);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.75em 1.5em;
  text-align: center;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  transition: background-color 0.3s ease, color 0.3s ease,
    border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

button:hover,
input[type="submit"]:hover,
.wp-element-button:hover,
.wp-block-button__link:hover,
.wp-block-file__button:hover {
  background-color: var(--color-white);
  border-color: var(--color-primary);
}

.wp-element-button:active {
  transform: scale(0.98);
  transition: transform 0.15s ease-in-out;
}

/* =============================== */
/* 04. FORMS & INPUTS              */
/* =============================== */

label {
  font-size: var(--font-size-sm);
  display: block;
  margin-bottom: var(--spacing-xs);
}

input,
textarea,
select,
button {
  background-color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: 0;
  margin: 0;
}

input,
textarea,
select {
  width: 100%;
  max-width: 100%;
  background-color: var(--color-background);
  color: var(--color-foreground);
  border: 1px solid var(--color-foreground);
  padding: 0.5em;
  box-sizing: border-box;
}

input[type="checkbox"] {
  appearance: none;
  border: 1px solid var(--color-foreground);
  width: 24px;
  height: 24px;
  vertical-align: middle;
}

input[type="checkbox"]:checked {
  background-color: currentColor;
}

input[type="checkbox"]:disabled {
  opacity: 0.5;
}

input[type="submit"] {
  -webkit-appearance: none;
  appearance: none;
}

/* =============================== */
/* 05. LAYOUT CONTAINERS & GRID    */
/* =============================== */

.wp-block-group.has-background {
  padding: var(--spacing-md);
}

.wp-block-columns {
  gap: var(--spacing-md);
}

@media (max-width: 781px) {
  .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column:empty {
    display: none;
  }
}

@media (min-width: 782px) {
  .is-style-abisko-minus-90-deg-column-content-desktop {
    position: relative;
  }

  .is-style-abisko-minus-90-deg-column-content-desktop > * {
    position: absolute;
    top: 0;
    left: 50%;
    transform-origin: top left;
    transform: rotate(90deg) translate(0%, -50%);
    white-space: nowrap !important;
  }
}

/* Fix unwanted top margin between header and cover from post content block */
.wp-block-post-content {
  margin-block-start: 0 !important;
  padding-top: 0 !important;
}

/* Fix unwanted top margin between post content block and title on diary home */
.no-top-margin {
  margin-block-start: 0 !important;
}

/* Remove padding from bottom of page causing white space */
.wp-site-blocks {
  padding-bottom: 0 !important;
}


/*
==============================
06. BLOCKS (WORDPRESS CORE)
==============================
*/

.wp-block-avatar img {
  display: block;
}

.wp-block-cover,
.wp-block-cover-image {
  height: 22rem;
}

.wp-block-cover img,
.wp-block-cover__image-background {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.wp-block-cover.is-style-abisko-bg-blur > .wp-block-cover__background {
  backdrop-filter: blur(25px);
  background-color: rgba(255, 255, 255, 0.01) !important;
}

.wp-block-pullquote {
  padding: var(--spacing-md) 0 !important;
}

.wp-block-pullquote blockquote {
  margin: 0;
}

.wp-block-pullquote blockquote:before {
  content: "“";
  display: block;
  font-size: 60px;
  font-weight: 800;
  line-height: 1;
  margin: -5px 0 -12px -3px;
}

.wp-block-pullquote blockquote p {
  line-height: inherit;
}

.wp-block-image img,
.wp-block-post-featured-image img {
  height: auto !important;
  max-width: 100% !important;
}

.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
  background-color: var(--color-foreground);
  color: var(--color-background);
}

.wp-block-quote cite {
  display: block;
  font-size: var(--font-size-sm);
}

[class*="is-style-abisko-ar-"],
[class*="is-style-abisko-ar-"] img {
  height: auto !important;
  overflow: hidden;
}

[class*="ar-1x1"].wp-block-post-featured-image,
[class*="ar-1x1"].wp-block-post-featured-image img {
  aspect-ratio: 1/1;
}

[class*="ar-4x3"].wp-block-post-featured-image,
[class*="ar-4x3"].wp-block-post-featured-image img {
  aspect-ratio: 4/3;
}


/*
==============================
07. UTILITIES & HELPER CLASSES
==============================
*/

.hide-empty:not(:has(*)) {
  display: none !important;
}

.mobile-hide {
  display: none !important;
}

.desktop-hide {
  display: block !important;
}

@media (min-width: 768px) {
  .mobile-hide {
    display: block !important;
  }

  .desktop-hide {
    display: none !important;
  }
}

.text-center {
  text-align: center !important;
}

.text-left {
  text-align: left !important;
}

.text-right {
  text-align: right !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.overflow-hidden {
  overflow: hidden;
}

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/*
==============================
08. NAVIGATION & HEADER
==============================
*/

/* Nav Container (hidden by default) */
.wp-block-navigation__responsive-container {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 20px 0 10px 0;
  transition: none;
}

/* When hidden initially */
.wp-block-navigation__responsive-container:not(.menu-open) {
  transform: translateX(100%);
}

/* Menu Visible (no animation, final open position)  */
.wp-block-navigation__responsive-container.menu-open {
  transform: translatex(0%);
}

/* Nav UL */
.wp-block-navigation__container {
  list-style: none;
  margin: 0;
  gap: 0 !important;
}
/* Nav item */
.wp-block-navigation__container .wp-block-navigation-item {
  padding: 0.5rem;
}

/* Menu button*/
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
  position: absolute;
  right: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wp-block-navigation__responsive-container-open svg,
.wp-block-navigation__responsive-container-close svg {
  width: 40px;
  height: 40px;
}
.wp-block-navigation__responsive-container-close svg {
  transform: translate(-4px, 4px); 
}

.wp-block-navigation__responsive-container.is-menu-open
  .wp-block-navigation__container
  .wp-block-navigation-item
  a {
  color: var(--color-black);
  font-size: 1.2rem;
  font-weight: 400;
  padding: 0.75rem 0;
  display: inline-block;
  transition: color 0.3s ease;
}

/* =============================== */
/* 09. FOOTER & CREDITS            */
/* =============================== */

.site-footer.wp-block-template-part {
  margin-top: 0;
}

.theme-credit a {
  text-decoration: none;
}

.theme-credit a:hover {
  text-decoration: underline;
}

.footer-mobile {
  border-top: 1px solid var(--color-primary);
  padding-top: var(--spacing-md);
}

@media (min-width: 782px) {
  .wp-block-column.footer-mobile {
    border-right: 1px solid var(--color-primary);
    padding-right: 2rem;
    min-height: 11rem;
    border-top: none;
    padding-top: 0;
  }
}

@media (max-width: 479px) {
  .wp-block-column.footer-mobile {
    padding-bottom: var(--spacing-md);
  }
}

/* =============================== */
/* 10. RESPONSIVE BREAKPOINTS      */
/* =============================== */

/* Small mobile: up to 479px */
@media (max-width: 479px) {
  h1 { font-size: 32px !important; }
  h2.category-header { font-size: 28px !important; text-transform: uppercase; }
  p  { font-size: 16px !important; line-height: 1.6; }
  .wp-block-column { margin-bottom: 20px; }

  .back-to-top-wrapper {
    bottom: 1rem;
    right: 0;
    transform: scale(0.75);
  }
}

/* Large mobile: 480px to 767px */
@media (min-width: 480px) and (max-width: 767px) {
  .wp-block-group.has-background {
    padding: 25px;
  }
  h1 {
    font-size: min(45px, 9vw) !important;
  }
}

/* Large mobile: 480px to 767px */
@media (min-width: 480px) and (max-width: 767px) {
  .wp-block-group.has-background {
    padding: 25px;
  }
  h1 {
    font-size: min(45px, 9vw) !important;
  }
}

/* Tablet: 768px to 991px */
@media (min-width: 768px) and (max-width: 991px) {
  .wp-block-group.has-background {
    padding: 30px;
  }
  .wp-block-navigation__container
    .wp-block-navigation-link:not(.has-text-color) {
    padding: 8px 12px;
  }
}

/* Desktop: 992px and above */
@media (min-width: 992px) {
  h1 {
    font-size: var(--wp--preset--font-size--heading-1) !important;
  }
  h2 {
    font-size: var(--wp--preset--font-size--heading-2) !important;
  }
  h3 {
    font-size: var(--wp--preset--font-size--heading-3) !important;
  }

  .has-huge-font-size,
  .has-extra-large-font-size,
  .has-large-font-size,
  p,
  .has-medium-font-size {
    font-size: initial !important;
    line-height: initial;
  }

  .wp-block-group.has-background {
    padding: 2em;
  }

  .wp-element-button:hover {
    background-color: var(--color-white);
    color: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(140, 128, 101, 0.2);
    transform: scale(1.03);
    cursor: pointer;
  }
	
  .wp-block-cover,
  .wp-block-cover-image {
    height: 100vh;
  }
  
}

/*
==============================
11. ANIMATIONS & EFFECTS
==============================
*/

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}

.scroll-arrow {
  width: 56px;
  height: 56px;
  color: white;
  animation: bounce 2s infinite;
  opacity: 1;
  transition: opacity 0.3s ease-out;
}

/* Fade out on scroll */
body.scrolled .scroll-arrow {
  opacity: 0;
}

/* Animation Keyframes */


/* Fade-in animation on scroll (hidden in editor view) */
 .fade-in-on-scroll {
  opacity: 0;
  transform: translateY(100px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

 .fade-in-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-arrow-wrapper {
  position: absolute;
  top: clamp(2rem, 5vh, 6rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9;
  pointer-events: auto;
  cursor: pointer;
}

.back-to-top-wrapper {
  position: fixed;
  bottom: 2rem;
  right: 1rem;
  z-index: 9;
  opacity: 0;
  visibility: hidden;
  pointer-events: auto;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  cursor: pointer;
}

body.scrolled-past-section1 .back-to-top-wrapper {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Disable animations inside editor */
body.wp-admin .fade-in-on-scroll,
body.is-edit-site .fade-in-on-scroll,
body.editor-styles-wrapper .fade-in-on-scroll {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* =============================== */
/* 12. BRAND-SPECIFIC VISUAL FX    */
/* =============================== */


/* Booking links */
.booking-link a {
  color: var(--color-primary);
  text-decoration: none;
}

.guide-heading-text a { 
	font-family: var(--ff-heading-main);
}

/* Zoom effect for cards and featured images */
.guide-card,
.hotel-card,
.wp-block-post-template .wp-block-post-featured-image {
  overflow: hidden;
  position: relative;
}

.guide-image,
.hotel-image,
.wp-block-post-template .wp-block-post-featured-image img {
  display: block;
  transform-origin: center;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

/* Zoom on hover */
.guide-card:hover .guide-image,
.hotel-card:hover .hotel-image,
.wp-block-post-template .wp-block-post-featured-image:hover img {
  transform: scale(1.05);
  opacity: 0.95;
}

/* Isolation Testing Area */
.cursor {
  display: inline-block;
  margin-left: 4px;
  color: var(--color-white);
  opacity: 1;
  transition: opacity 0.2s ease-in-out;
}

.cursor.blink {
  animation: blink 1.2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Logo testing partners */
.logo-strip img,
.logo-strip svg {
  max-height: 80px;
  height: auto;
  width: auto;
  object-fit: contain;
}

/* Details marker */
.wp-block-details[open] {
    padding-bottom: 30px;
}   

.wp-block-details summary {
    margin: 0;
	-webkit-appearance: none;
    appearance: none; 
	font-family: var(--ff-heading-main);
}

.wp-block-details > * {
    margin: 10px 20px;
    margin-block-start: 1.5rem;
}

.wp-block-details summary::marker {
    content:"";
}

.wp-block-details summary::-webkit-details-marker {
    display: none;
}

.wp-block-details summary::before {
  content: "";
  display: inline-block;
  width: 1.4rem;
  height: 1.4rem;
  margin-right: 4px;
  vertical-align: middle;

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='currentColor' d='M8.29 18.71a1 1 0 0 1 0-1.41l5.59-5.59-5.59-5.59a1 1 0 0 1 1.41-1.41l6.3 6.3a1 1 0 0 1 0 1.41l-6.3 6.3a1 1 0 0 1-1.41 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;

  transition: transform 0.3s ease;
}

.wp-block-details[open] summary::before {
  transform: rotate(90deg);
}
