/* ==========================================================================
   VOLTTIKAUPPA BASE — ported from the volttikauppa.fi production theme
   (assets/css/abstract, base, layout, utilities, components/_button).
   Loaded on every page before the other theme stylesheets.
   ========================================================================== */

/* --- Tokens ---------------------------------------------------------------- */
:root {
  --vk-primary: #06283d;
  --vk-secondary: #1363df;
  --vk-lightblue: #47b5ff;
  --vk-lightyellow: #f9f871;
  --vk-darkyellow: #fde047;
  --vk-gray: #b8b8b8;
  --vk-lightgray: #dddddd;
  --vk-container-max: 85rem;
  --vk-container-pad: 1rem;
}

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

body, h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }

ul[role="list"], ol[role="list"] { list-style: none; }

html, html:focus-within { scroll-behavior: smooth; }

body { text-rendering: optimizeSpeed; }

a:not([class]) { text-decoration-skip-ink: auto; }

img, picture { max-width: 100%; display: block; }

input, button, textarea, select { font: inherit; }

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

/* --- Typography ------------------------------------------------------------ */
body {
  font-family: "Titillium Web", sans-serif;
  color: #000;
  background-color: #fff;
}

h1 { font-size: 30px; line-height: 44px; }
h2 { font-size: 24px; }
h3 { font-size: 21px; }
h4 { font-size: 18px; }
h5 { font-size: 14px; }
h6 { font-size: 12px; }

@media (min-width: 80rem) {
  h1 { font-size: 36px; line-height: 50px; }
  h2 { font-size: 30px; }
  h3 { font-size: 24px; }
  h4 { font-size: 20px; }
  h5 { font-size: 16px; }
  h6 { font-size: 14px; }
}

h1, h2, h3, h4, h5, h6 { margin: 1rem 0; }

p {
  font-size: 16px;
  line-height: 30px;
  margin: 0 0 1.25rem 0;
}

a { text-decoration: none; }

p a {
  text-decoration: none;
  font-weight: 600;
  color: var(--vk-primary);
  transition: opacity 0.3s ease;
}
p a:hover {
  text-decoration: underline;
  opacity: 0.6;
}

/* --- Layout ---------------------------------------------------------------- */
body.no-scroll { overflow: hidden; }

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

/* The header is in normal flow on every screen size (not fixed), so no offset is needed. */
.site-main { padding-top: 0; }

/* --- Forms ----------------------------------------------------------------- */
input {
  border: 1px solid #cccccc;
  padding: 0.5rem 1rem;
  border-radius: 4px;
}
input[type="checkbox"],
input[type="radio"] { padding: 0; border: 0; }
select {
  border: 1px solid #cccccc;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 4px;
}

/* --- Buttons --------------------------------------------------------------- */
button {
  background-color: transparent;
  border: none;
}

.btn,
.wp-block-button.is-style-outline .wp-block-button__link {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: 3px solid;
  border-radius: 40px;
  transition: opacity 0.4s;
  text-align: center;
  font-weight: 700;
  cursor: pointer;
  background: transparent;
  line-height: 1.2;
}
.btn:hover,
.wp-block-button.is-style-outline .wp-block-button__link:hover { opacity: 0.4; }

.btn--sm { padding: 0.75rem 1.5rem; }
.btn--md { padding: 1rem 2rem; }
.btn--lg { padding: 1.25rem 2.25rem; }

.btn--primary     { color: var(--vk-primary);     border-color: var(--vk-primary); }
.btn--secondary   { color: var(--vk-secondary);   border-color: var(--vk-secondary); }
.btn--lightblue   { color: var(--vk-lightblue);   border-color: var(--vk-lightblue); }
.btn--lightyellow { color: var(--vk-lightyellow); border-color: var(--vk-lightyellow); }

/* Default outline button colour outside of banners (dark on light bg). */
.wp-block-button.is-style-outline .wp-block-button__link {
  color: var(--vk-secondary);
  border-color: var(--vk-secondary);
}

/* --- Utilities ------------------------------------------------------------- */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-regular { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-link { color: var(--vk-secondary); }
.hidden { display: none !important; }
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.items-center { align-items: center; }

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.skip-link {
  position: absolute;
  transform: translateY(-300%);
  background-color: var(--vk-primary);
  padding: 0.5rem 1.5rem;
  border-bottom-right-radius: 0.5rem;
  transition: transform 300ms ease-in;
  color: #fff;
  text-decoration: none;
  z-index: 9999;
}
.skip-link:focus {
  transform: translateY(0);
  outline-color: transparent;
}

/* --- Animations ------------------------------------------------------------ */
@keyframes MoveUpDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@keyframes SivulabraAnimation {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* --- WooCommerce price (common) ------------------------------------------- */
.woocommerce-Price-amount {
  color: var(--vk-secondary);
  font-weight: 700;
  font-size: 18px;
}
ins { text-decoration: none; }
del .woocommerce-Price-amount {
  color: #000;
  font-weight: 400;
  font-size: 14px;
}

/* --- Overlay (mobile menu backdrop) --------------------------------------- */
.overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: 0.3s ease-out;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: 5;
}

/* --- Page banner (components/_banner.scss) -------------------------------- */
.banner {
  min-height: 28rem;
  position: relative;
}
@media (min-width: 50rem) { .banner { min-height: 30rem; } }
@media (min-width: 80rem) { .banner { min-height: 36rem; } }
.banner--page {
  min-height: 16rem;
  margin-bottom: 4rem;
}
@media (min-width: 50rem) { .banner--page { min-height: 24rem; } }
@media (min-width: 60rem) { .banner--page { margin-bottom: 6rem; } }
.banner__image {
  position: absolute;
  right: 0;
  height: 100%;
  width: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}
@media (min-width: 60rem) { .banner__image { width: 80%; } }
.banner__background {
  position: absolute;
  height: 100%;
  width: 100%;
  left: 0;
  display: flex;
  align-items: center;
  background: linear-gradient(0deg, #06283d 0%, rgba(6,40,61,.8) 34.96%, rgba(6,40,61,.75) 42.08%, rgba(6,40,61,.7) 49.85%, rgba(6,40,61,.55) 57.62%, rgba(6,40,61,.4) 62.15%);
}
@media (min-width: 60rem) {
  .banner__background {
    background: linear-gradient(90deg, #06283d 31.77%, rgba(6,40,61,.9) 50.4%, rgba(6,40,61,.8) 55.21%, rgba(6,40,61,.735135) 59.9%, rgba(6,40,61,.4) 70.83%, rgba(6,40,61,.25) 81.25%, rgba(0,153,255,.25) 100%);
  }
}
.banner__content {
  height: 100%;
  width: 100%;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
.banner__content > * { margin: 8px 0; }
@media (min-width: 60rem) {
  .banner__content > * { width: 60%; margin: 1rem 0; }
}
.banner__content h1 { font-size: 20px; line-height: 32px; }
@media (min-width: 60rem) {
  .banner__content h1 { font-size: 34px; line-height: 44px; }
  .banner__content p { font-size: 18px; }
}
.banner__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
@media (min-width: 60rem) { .banner__buttons { gap: 2rem; } }
.banner__buttons .btn {
  padding: 12px 10px;
  font-size: 12px;
  border-width: 2px;
}
@media (min-width: 40rem) {
  .banner__buttons .btn { padding: 1rem 1.75rem; font-size: 16px; border-width: 3px; }
}
.banner__buttons .btn:nth-child(odd) { color: var(--vk-lightblue); border-color: var(--vk-lightblue); }
.banner__buttons .btn:nth-child(even) { color: var(--vk-lightyellow); border-color: var(--vk-lightyellow); }

/* --- Entry content (layout/_entry-content.scss) ---------------------------- */
.entry-content > .block-gap { margin-top: 4rem; margin-bottom: 4rem; }
@media (min-width: 60rem) { .entry-content > .block-gap { margin-top: 6rem; margin-bottom: 6rem; } }
.entry-content > h1, .entry-content > h2, .entry-content > h3,
.entry-content > h4, .entry-content > h5, .entry-content > h6,
.entry-content > p, .entry-content > ul, .entry-content > ol {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--vk-container-pad);
  padding-right: var(--vk-container-pad);
  margin-bottom: 3rem;
  max-width: 45rem;
}
.entry-content > h1, .entry-content > h2, .entry-content > h3,
.entry-content > h4, .entry-content > h5, .entry-content > h6,
.entry-content > .wp-block-columns { margin-top: 4rem; }
.entry-content > [class*="wp-block"] {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--vk-container-pad);
  padding-right: var(--vk-container-pad);
  margin-bottom: 3rem;
  max-width: 62rem;
}
.entry-content > .wp-block-media-text { margin-top: 6rem; margin-bottom: 6rem; }
.entry-content > .wp-block-media-text__content > * { margin-bottom: 2rem; }
@media (min-width: 60rem) { .entry-content > .wp-block-media-text { margin-top: 10rem; margin-bottom: 10rem; } }
.entry-content > .alignfull { max-width: var(--vk-container-max); }
.entry-content > iframe {
  width: 100%;
  display: block;
  max-width: var(--vk-container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--vk-container-pad);
  padding-right: var(--vk-container-pad);
}
/* Shortcode-driven WooCommerce pages (my account etc.) inside entry-content. */
.entry-content > .woocommerce {
  width: 100%;
  max-width: var(--vk-container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--vk-container-pad);
  padding-right: var(--vk-container-pad);
}

/* --- FAQ accordion (components/faq/_faq.scss) ----------------------------- */
.faq-wrapper { display: flex; justify-content: center; }
.faq {
  background-color: var(--vk-primary);
  max-width: 1000px;
  width: 100%;
}
.faq > * + * { border-top: 1px solid #fff; }
.faq-question {
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  width: 100%;
  text-align: left;
  padding: 1.5rem 2rem;
  cursor: pointer;
  background: none;
  border: 0;
  transition: background-color 0.3s ease;
}
.faq-question:hover { background-color: #1d4a66; }
.faq-item.active .faq-question { background-color: var(--vk-secondary); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  position: relative;
  color: #fff;
  transition: max-height 0.6s ease;
}
.faq-item.active .faq-answer { max-height: 60rem; }
.faq-answer p { padding: 3rem 2rem; margin: 0; }
@media (max-width: 40rem) {
  .faq-question { font-size: 17px; padding: 1.1rem 1.25rem; }
  .faq-answer p { padding: 1.5rem 1.25rem; }
}
