/*
Theme Name: Korskyrkan
Theme URI: https://korskyrkan.com/
Author: Korskyrkan
Description: Ett lätt, responsivt tema för Korskyrkan Karlstad.
Version: 1.0.14
Requires at least: 6.6
Requires PHP: 8.2
Text Domain: korskyrkan
*/

:root {
  --kk-blue: #087ca7;
  --kk-blue-dark: #075c7c;
  --kk-orange: #f7931d;
  --kk-ink: #17232b;
  --kk-muted: #63717a;
  --kk-paper: #ffffff;
  --kk-soft: #f3f6f7;
  --kk-line: #dbe3e7;
  --kk-radius: 18px;
  --kk-shadow: 0 18px 45px rgba(23, 35, 43, 0.10);
  --kk-content: 1160px;
  --tec-font-family-sans-serif: "Lato", "Segoe UI", Arial, sans-serif;
  --tec-font-family-base: var(--tec-font-family-sans-serif);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--kk-ink);
  background: var(--kk-paper);
  font-family: "Lato", "Segoe UI", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--kk-blue-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover, a:focus-visible { color: var(--kk-orange); }
h1, h2, h3, h4 {
  margin: 0 0 .55em;
  color: var(--kk-ink);
  font-family: "Oswald", "Arial Narrow", "Segoe UI", sans-serif;
  line-height: 1.12;
  letter-spacing: -.02em;
}
h1 { font-size: clamp(2.35rem, 6vw, 4.8rem); }
h2 { font-size: clamp(1.85rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); }
p { margin: 0 0 1.25em; }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.screen-reader-text:focus {
  z-index: 100000;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  padding: 12px 18px;
  clip: auto;
  color: var(--kk-ink);
  background: #fff;
}
.kk-wrap { width: min(calc(100% - 40px), var(--kk-content)); margin-inline: auto; }

.site-header { position: relative; z-index: 50; background: #fff; box-shadow: 0 1px 0 var(--kk-line); }
.site-branding { display: flex; align-items: center; justify-content: center; min-height: 126px; padding: 20px; }
.site-branding img { width: min(210px, 60vw); max-height: 90px; object-fit: contain; }
.brand-text { text-align: center; text-decoration: none; }
.brand-text strong { display: block; font-size: 1.65rem; letter-spacing: .08em; text-transform: uppercase; }
.brand-text span { display: block; color: var(--kk-muted); font-size: .95rem; }

.primary-bar { background: var(--kk-orange); }
.primary-bar .kk-wrap { position: relative; }
.menu-toggle {
  display: none;
  width: 100%;
  padding: 14px 0;
  border: 0;
  color: #fff;
  background: transparent;
  font: inherit;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}
.menu-toggle::after { float: right; content: "☰"; font-size: 1.35rem; }
.primary-navigation ul { display: flex; justify-content: center; gap: 0; margin: 0; padding: 0; list-style: none; }
.primary-navigation li { margin: 0; }
.primary-navigation a {
  display: block;
  padding: 17px 23px;
  color: #fff;
  font-family: "Oswald", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 1.08rem;
  font-weight: 750;
  text-decoration: none;
}
.primary-navigation a:hover,
.primary-navigation a:focus-visible,
.primary-navigation .current-menu-item > a,
.primary-navigation .current_page_item > a { color: #fff; background: rgba(117, 52, 0, .24); }

.site-main { min-height: 55vh; }
.kk-hero {
  position: relative;
  min-height: clamp(430px, 62vw, 670px);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, var(--kk-blue-dark), var(--kk-blue));
  background-position: center;
  background-size: cover;
}
.kk-hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(0, 44, 61, .88) 0%, rgba(0, 87, 119, .58) 48%, rgba(0, 0, 0, .12) 100%);
}
.kk-hero__content { position: relative; z-index: 1; padding-block: clamp(55px, 10vw, 105px); }
.kk-hero h1 { max-width: 780px; color: #fff; text-wrap: balance; }
.kk-hero p { max-width: 620px; font-size: clamp(1.1rem, 2.3vw, 1.35rem); }
.kk-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.kk-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px 20px;
  border: 2px solid var(--kk-orange);
  border-radius: 999px;
  color: #fff;
  background: var(--kk-orange);
  font-weight: 750;
  text-decoration: none;
}
.kk-button:hover, .kk-button:focus-visible { color: #fff; background: #d87508; border-color: #d87508; }
.kk-button--ghost { border-color: rgba(255,255,255,.75); background: rgba(0,0,0,.16); }
.kk-button--ghost:hover, .kk-button--ghost:focus-visible { background: rgba(0,0,0,.4); border-color: #fff; }

.kk-section { padding-block: clamp(64px, 9vw, 105px); }
.kk-section--soft { background: var(--kk-soft); }
.kk-section--blue { color: #fff; background: var(--kk-blue-dark); }
.kk-section--blue h2, .kk-section--blue h3 { color: #fff; }
.kk-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
.kk-section-heading h2 { margin-bottom: 0; }
.kk-section-heading > a { white-space: nowrap; font-weight: 700; }
.kk-grid { display: grid; gap: 24px; }
.kk-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kk-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kk-card {
  overflow: hidden;
  border: 1px solid var(--kk-line);
  border-radius: var(--kk-radius);
  background: #fff;
  box-shadow: var(--kk-shadow);
}
.kk-card__image { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; background: #dbe5e9; }
.kk-card__body { padding: 24px; }
.kk-card__body h3 a { color: inherit; text-decoration: none; }
.kk-card__meta { margin-bottom: 10px; color: var(--kk-orange); font-size: .9rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.kk-card p:last-child { margin-bottom: 0; }

.kk-events { display: grid; gap: 12px; }
.kk-event {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 18px;
  align-items: center;
  padding: 17px;
  border: 1px solid var(--kk-line);
  border-radius: 14px;
  color: inherit;
  background: #fff;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease;
}
.kk-event:hover, .kk-event:focus-visible { transform: translateY(-2px); color: inherit; box-shadow: var(--kk-shadow); }
.kk-event__date { padding: 9px 6px; border-radius: 10px; color: #fff; background: var(--kk-orange); text-align: center; line-height: 1.05; }
.kk-event__date strong { display: block; font-size: 1.6rem; }
.kk-event__date span { font-size: .8rem; font-weight: 800; text-transform: uppercase; }
.kk-event__title { display: block; font-size: 1.08rem; font-weight: 800; }
.kk-event__time { display: block; color: var(--kk-muted); font-size: .92rem; }

/* Match the original site's typography inside The Events Calendar as well. */
body .tribe-common,
body .tribe-common button,
body .tribe-common input,
body .tribe-events { font-family: "Lato", "Segoe UI", Arial, sans-serif; }

/* Integrate My Calendar with the Korskyrkan colour and type system. */
body .mc-main,
body .my-calendar-navigation,
body .my-calendar-modal,
body .mc-event-list {
  --main-background: var(--kk-paper);
  --main-color: var(--kk-ink);
  --navbar-background: var(--kk-soft);
  --nav-button-bg: var(--kk-paper);
  --nav-button-color: var(--kk-blue-dark);
  --nav-button-border: var(--kk-blue);
  --nav-input-border: var(--kk-blue);
  --nav-input-background: var(--kk-paper);
  --nav-input-color: var(--kk-ink);
  --grid-cell-border: var(--kk-line);
  --grid-header-border: var(--kk-blue-dark);
  --grid-header-color: #fff;
  --grid-weekend-color: #fff;
  --grid-header-bg: var(--kk-blue);
  --grid-weekend-bg: var(--kk-blue-dark);
  --grid-cell-background: var(--kk-paper);
  --current-day-border: var(--kk-orange);
  --current-day-color: var(--kk-ink);
  --current-day-bg: #fff4e6;
  --date-has-events-bg: var(--kk-orange);
  --date-has-events-color: #fff;
  --primary-dark: var(--kk-ink);
  --primary-light: var(--kk-paper);
  --secondary-light: var(--kk-soft);
  --secondary-dark: var(--kk-ink);
  --highlight-dark: var(--kk-blue-dark);
  --highlight-light: var(--kk-line);
  font-family: "Lato", "Segoe UI", Arial, sans-serif;
}

body .mc-main {
  overflow: hidden;
  border: 1px solid var(--kk-line);
  border-radius: var(--kk-radius);
  box-shadow: var(--kk-shadow);
}

/* Undo generic article table/list styling inside My Calendar. */
.entry-content .mc-main table {
  display: table;
  overflow: visible;
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.entry-content .mc-main th,
.entry-content .mc-main td {
  width: 14.2857%;
}

.entry-content .mc-main ul,
.entry-content .my-calendar-navigation ul {
  padding-left: 0;
}

.entry-content .mc-main ul > li::before,
.entry-content .my-calendar-navigation ul > li::before {
  display: none;
  content: none;
}

body .mc-main .my-calendar-header,
body .mc-main .my-calendar-footer {
  padding: 14px;
  background: var(--kk-soft);
}

body .mc-main .heading,
body .mc-main .my-calendar-month {
  color: var(--kk-ink);
  font-family: "Oswald", "Arial Narrow", "Segoe UI", sans-serif;
  font-weight: 500;
}

body .mc-main th,
body .mc-main th.weekend-heading {
  padding: 9px 4px;
  color: #fff !important;
}

body .mc-main td {
  transition: background-color .16s ease, box-shadow .16s ease;
}

body .mc-main td:hover {
  background: var(--kk-soft);
}

body .mc-main .event-title a,
body .mc-main .event-title button {
  color: var(--kk-blue-dark);
  text-decoration-color: rgba(7, 92, 124, .35);
}

body .mc-main .event-title a:hover,
body .mc-main .event-title a:focus-visible,
body .mc-main .event-title button:hover,
body .mc-main .event-title button:focus-visible {
  color: var(--kk-orange);
}

body .mc-main .current-day:not(.day .current-day, .list .current-day) {
  position: relative;
  z-index: 1;
  outline: 4px solid var(--kk-orange);
  outline-offset: -4px;
  background: #fff4e6;
  box-shadow: inset 0 0 0 1px #fff;
}

body .mc-main .current-day .mc-date,
body .mc-main .current-day.has-events .mc-date,
body .mc-main .current-day.has-events a.mc-date {
  color: #fff;
  background: var(--kk-orange);
}

body .mc-main li.current-day {
  border-left: 6px solid var(--kk-orange);
  background: #fff4e6;
}

body .mc-main .my-calendar-header a,
body .mc-main .my-calendar-footer a,
body .mc-main .my-calendar-header button,
body .mc-main .my-calendar-footer button {
  border-color: var(--kk-blue);
  border-radius: 999px;
  color: var(--kk-blue-dark);
  background: var(--kk-paper);
}

body .mc-main .my-calendar-header a:hover,
body .mc-main .my-calendar-header a:focus-visible,
body .mc-main .my-calendar-footer a:hover,
body .mc-main .my-calendar-footer a:focus-visible,
body .mc-main .my-calendar-header button:hover,
body .mc-main .my-calendar-header button:focus-visible,
body .mc-main .my-calendar-footer button:hover,
body .mc-main .my-calendar-footer button:focus-visible {
  border-color: var(--kk-orange);
  color: #fff;
  background: var(--kk-orange);
}

@media (max-width: 700px) {
  body .mc-main { border-radius: 12px; }
  body .mc-main .my-calendar-header,
  body .mc-main .my-calendar-footer { padding: 10px; }
}

.kk-home-intro {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(360px, 1.1fr);
  gap: clamp(38px, 7vw, 90px);
  align-items: center;
}
.kk-home-intro h2 { margin-bottom: 24px; }
.kk-home-intro__copy p { max-width: 650px; font-size: clamp(1.08rem, 1.7vw, 1.25rem); }
.kk-home-intro__link {
  display: inline-flex;
  margin-top: 8px;
  color: var(--kk-blue-dark);
  font-family: "Oswald", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 1.08rem;
  font-weight: 400;
  text-decoration-color: var(--kk-orange);
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
}
.kk-home-intro__link:hover, .kk-home-intro__link:focus-visible { color: var(--kk-orange); }
.kk-home-intro__video {
  overflow: hidden;
  border-radius: var(--kk-radius);
  background: #07151c;
  box-shadow: var(--kk-shadow);
}
.kk-home-intro__video iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
}
.kk-service { position: relative; min-height: 250px; display: flex; align-items: end; overflow: hidden; border-radius: var(--kk-radius); color: #fff; background: var(--kk-blue-dark); text-decoration: none; box-shadow: var(--kk-shadow); }
.kk-service::after { position: absolute; inset: 0; content: ""; background: linear-gradient(0deg, rgba(2, 32, 44, .86), rgba(2, 32, 44, .04)); }
.kk-service img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.kk-service span { position: relative; z-index: 1; padding: 22px; color: #fff; font-size: 1.35rem; font-weight: 800; }
.kk-service:hover, .kk-service:focus-visible { color: #fff; }

.entry-shell { padding-block: clamp(50px, 8vw, 90px); }
.entry-page-layout {
  display: grid;
  grid-template-columns: minmax(210px, 270px) minmax(0, 1fr);
  gap: clamp(34px, 5vw, 68px);
  align-items: start;
}
.entry-page-layout--single { display: block; max-width: 900px; }
.entry-page-main { min-width: 0; }
.entry-page-main .entry-featured,
.entry-page-main .entry-header,
.entry-page-main .entry-content { width: 100%; max-width: none; }
.entry-page-main .entry-featured { margin-bottom: clamp(30px, 4vw, 46px); }
.entry-page-main .entry-header { margin-bottom: 34px; }
.entry-page-main .entry-header h1 { font-size: clamp(2.25rem, 5vw, 4.1rem); }
.entry-page-main .entry-content { margin-inline: 0; }
.kk-side-menu {
  position: sticky;
  top: 28px;
  border: 1px solid var(--kk-line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 30px rgba(23, 35, 43, .08);
}
.kk-side-menu__title {
  padding: 15px 18px;
  color: #fff;
  background: var(--kk-blue);
  font-family: "Oswald", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 1.18rem;
  font-weight: 400;
}
.kk-side-menu ul { margin: 0; padding: 8px 0; list-style: none; }
.kk-side-menu ul ul { padding: 0 0 5px; }
.kk-side-menu li { margin: 0; }
.kk-side-menu a {
  display: block;
  padding: 9px 18px;
  color: var(--kk-ink);
  font-family: "Oswald", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.25;
  text-decoration: none;
}
.kk-side-menu ul ul a { padding-left: 34px; color: var(--kk-muted); font-size: .92rem; }
.kk-side-menu a:hover,
.kk-side-menu a:focus-visible { color: var(--kk-blue-dark); background: var(--kk-soft); }
.kk-side-menu .current-menu-item > a {
  color: #fff;
  background: var(--kk-orange);
}
.entry-featured {
  max-width: 1160px;
  margin: 0 auto clamp(34px, 5vw, 56px);
}
.entry-featured__image {
  width: 100%;
  max-height: 680px;
  object-fit: cover;
  border-radius: var(--kk-radius);
  box-shadow: var(--kk-shadow);
}
.entry-header { max-width: 900px; margin: 0 auto 34px; }
.entry-header h1 { font-size: clamp(2.25rem, 5vw, 4.1rem); }
.entry-meta { color: var(--kk-muted); font-size: .95rem; }
.entry-content { max-width: 900px; margin-inline: auto; }
.entry-content > * { max-width: 100%; }
.entry-content img { margin-block: 24px; border-radius: 14px; }
.entry-content iframe { width: 100%; max-width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; }
.entry-content pre { overflow-x: auto; white-space: pre-wrap; background: transparent; }
.entry-content hr { margin-block: 36px; border: 0; border-top: 1px solid var(--kk-line); }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content ul { list-style: none; }
.entry-content ul > li { position: relative; margin-bottom: 5px; }
.entry-content ul > li::before {
  position: absolute;
  top: .72em;
  left: -1.25em;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  content: "";
  background: #ff9109;
  transform: translateY(-50%);
}
.entry-content table { display: block; overflow-x: auto; width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: 10px; border: 1px solid var(--kk-line); }
.archive-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.pagination { margin-top: 42px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-numbers { padding: 8px 13px; border-radius: 8px; background: var(--kk-soft); text-decoration: none; }
.page-numbers.current { color: #fff; background: var(--kk-blue); }

.site-footer {
  margin-top: 40px;
  padding-block: 40px 52px;
  color: #fff;
  background: rgba(18, 132, 199, .86);
}
.footer-church {
  display: flex;
  justify-content: center;
  margin-bottom: 38px;
  color: #fff;
}
.footer-church svg { width: 46px; height: 52px; fill: currentColor; }
.footer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(34px, 5vw, 64px); }
.footer-column { min-width: 0; }
.footer-heading { display: flex; align-items: center; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,.65); }
.footer-heading h2 { margin: 0; color: #fff; font-size: clamp(1.25rem, 2.2vw, 1.58rem); font-weight: 500; }
.footer-icon {
  display: inline-flex;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: var(--kk-orange);
}
.footer-icon svg { width: 19px; height: 19px; fill: currentColor; }
.footer-information { padding: 20px 10px 0; }
.footer-information p { margin-bottom: 1em; }
.site-footer a { color: #fff; }
.site-footer a:hover, .site-footer a:focus-visible { color: #fff; text-decoration-thickness: 2px; }
.footer-social { display: flex; gap: 10px; margin: 0; padding: 0; list-style: none; }
.footer-social a {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255,255,255,.82);
  color: #fff;
  background: rgba(0,80,140,.55);
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}
.footer-social a:hover, .footer-social a:focus-visible { background: var(--kk-orange); }

@media (max-width: 860px) {
	.entry-page-layout { grid-template-columns: 1fr; }
	.kk-side-menu { position: static; }
	.kk-home-intro { grid-template-columns: 1fr; }
  body { font-size: 17px; }
  .site-branding { min-height: 105px; }
  .menu-toggle { display: block; }
  .primary-navigation { display: none; padding-bottom: 12px; }
  .primary-navigation.is-open { display: block; }
  .primary-navigation ul { display: block; }
  .primary-navigation a { padding: 12px 0; border-top: 1px solid rgba(255,255,255,.2); }
  .kk-grid--two, .kk-grid--three, .archive-grid, .footer-grid { grid-template-columns: 1fr; }
	.footer-grid { gap: 42px; }
  .kk-section-heading { align-items: start; flex-direction: column; }
  .kk-hero::after { background: rgba(0, 58, 80, .68); }
}

@media (max-width: 520px) {
  .kk-wrap { width: min(calc(100% - 28px), var(--kk-content)); }
  .kk-event { grid-template-columns: 64px 1fr; gap: 12px; }
  .kk-card__body { padding: 20px; }
}

