/*
Theme Name: Arvika Masjid
Author: Bagh Zamir
Description: Minimal classic WordPress theme with classic editor workflow.
Version: 2026.04.27
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: arvikamoske
*/

@font-face {
  font-family: "Inter";
  src: url("wp-content/themes/arvikamoske/assets/fonts/Inter_28pt-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("wp-content/themes/arvikamoske/assets/fonts/Inter_28pt-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  /* Light mode (default) */
  --bg: #e9e9ff;
  --text: #111c2d;
  --surface: #ffffff;
  --muted: #707974;
  --primary: #064e3b;
  --primary-soft: #ecfdf5;
  --inactive-bg: #e4e4f0;
  --highlight: #ecfdf5;
  --highlight-text: #064e3b;
  --on-primary: #ffdcc3;
  --border: #d9e1e8;
  --border-highlight: #e9e9ff33;
  --overlay: rgba(2, 8, 23, 0.5);
  --box-gap: 0.5rem;
  --section-gap: 2.5rem;
  --radius-sm: 0.5rem;
  --radius-lg: 1rem;
  --radius-pill: 999px;
  --radius: var(--radius-sm);
  /* Dark mode: next-prayer strip keeps emerald (--next-prayer-*), not orange --primary. */
  --next-prayer-bg: #064e3b;
  --next-prayer-soft: #d6f3e7;
  --next-prayer-accent: #34d399;
  --next-prayer-fg: #fe932c;
  --next-prayer-on-bg: #ffffff;
  --header-height: 2.5rem;
  --footer-height: 4rem;
  --clock-color: #ffdcc3;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0a0a;
    --text: #e5e5e5;
    --surface: #171717;
    --muted: #737373;
    --primary: #fe932c;
    --primary-soft: rgba(254, 147, 44, 0.14);
    --inactive-bg: #121212;
    --highlight: #091814;
    --highlight-text: #fe932c;
    --on-primary: #111c2d;
    --border: #333;
    --border-highlight: #1c180f;
    --overlay: rgba(0, 0, 0, 0.65);
    --next-prayer-bg: #103a2f;
    --next-prayer-soft: #103a2f;
    --next-prayer-accent: #34d399;
    --next-prayer-fg: #fe932c;
  }
}

:root[data-theme="dark"] {
  --bg: #0a0a0a;
  --text: #e5e5e5;
  --surface: #171717;
  --muted: #737373;
  --primary: #fe932c;
  --primary-soft: rgba(254, 147, 44, 0.14);
  --inactive-bg: #121212;
  --highlight: #091814;
  --highlight-text: #fe932c;
  --on-primary: #111c2d;
  --border: #333;
  --border-highlight: #1c180f;
  --overlay: rgba(0, 0, 0, 0.65);
  --next-prayer-bg: #103a2f;
  --next-prayer-soft: #103a2f;
  --next-prayer-accent: #34d399;
  --next-prayer-fg: #fe932c;
}

:root[data-theme="light"] {
  --bg: #e9e9ff;
  --text: #111c2d;
  --surface: #ffffff;
  --muted: #707974;
  --primary: #064e3b;
  --primary-soft: #ecfdf5;
  --inactive-bg: #e4e4f0;
  --highlight: #ecfdf5;
  --highlight-text: #064e3b;
  --on-primary: #ffdcc3;
  --border: #d9e1e8;
  --border-highlight: #e9e9ff33;
  --overlay: rgba(2, 8, 23, 0.5);
  --next-prayer-bg: #064e3b;
  --next-prayer-soft: #d6f3e7;
  --next-prayer-accent: #34d399;
  --next-prayer-fg: #fe932c;
}

body {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: var(--box-gap) 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.site-header-content {
  max-width: 800px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.theme-toggle,
.pt-prayer-times-root .pt-nav-arrow,
.aktuellt-posts__all-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--box-gap) 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--primary);
  cursor: pointer;
  text-decoration: none;
}

.theme-toggle:hover,
.pt-prayer-times-root .pt-nav-arrow:hover:not(:disabled),
.aktuellt-posts__all-btn:hover {
  background: var(--primary-soft);
  text-decoration: none;
}

.theme-toggle {
  width: 2rem;
  height: 2rem;
  padding: 0;
}

.site-branding {
  min-width: 0;
  text-align: left;
}

.site-logo-image {
  max-height: 1.5rem;
  width: auto;
}

.site-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
}

.theme-toggle-icon {
  font-size: 1.5rem;
}

.primary-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--box-gap);
}

.primary-menu a {
  display: block;
  padding: var(--box-gap) 1rem;
  border-radius: var(--radius-sm);
  color: var(--text);
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a {
  background: var(--primary-soft);
  text-decoration: none;
}

.site-main {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem 1rem calc(var(--footer-height) + 1rem);
}

.entry-card {
  margin: 0 0 var(--box-gap);
  padding: 1rem 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

.entry-title {
  margin: 0 0 var(--box-gap);
  line-height: 1.25;
}

.entry-content p:first-child {
  margin-top: 0;
}

.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 35;
  height: var(--footer-height);
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.footer-nav {
  max-width: 800px;
  margin-inline: auto;
}

.footer-nav-list {
  margin: 0;
  padding: var(--box-gap) var(--box-gap) 1rem;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--box-gap);
}

.footer-nav-link {
  min-height: 3.6rem;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--text);
  gap: var(--box-gap);
}

.footer-nav-link:hover {
  text-decoration: none;
  background: var(--primary-soft);
}

.footer-nav-item--current .footer-nav-link {
  color: var(--primary);
}

.footer-nav-item--current .footer-nav-link:hover {
  background: var(--primary-soft);
}

.footer-nav-icon svg {
  width: 1.2rem;
  height: 1.2rem;
  display: block;
  fill: currentColor;
}

.footer-nav-label {
  font-size: 0.75rem;
  line-height: 1;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

@media (min-width: 800px) {
  .site-header {
    padding-inline: 1rem;
  }

  .site-main {
    padding-inline: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
/***********
Bönetider
**********/

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--box-gap);
  width: 100%;
  @media (width < 620px) {
    grid-template-columns: repeat(3, 1fr);
  }
  @media (width < 470px) {
    grid-template-columns: repeat(2, 1fr);
  }
}

.calendar-item {
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--section-gap) 1rem;
  width: 100%;
  background: var(--surface);
  color: var(--primary);
  font-weight: 600;
}

/**
 * Prayer Times plugin (`prayer_times_today` / `prayer_times_month` shortcodes).
 * Mirrors structure in class-prayer-times-shortcodes.php + prayer-times-widget.js (passed / active).
 */
.pt-prayer-times-root {
  box-sizing: border-box;
  max-width: 100%;
}

.pt-prayer-times-root *,
.pt-prayer-times-root *::before,
.pt-prayer-times-root *::after {
  box-sizing: inherit;
}

/* Next-prayer strip: uses --next-prayer-* / --clock-color tokens so contrast stays independent of generic --primary. */
.pt-prayer-times-root .pt-next-prayer-box {
  border: 1px solid var(--border);
  padding: 1rem;
  margin-bottom: var(--box-gap);
  background-color: var(--next-prayer-bg);
  background-image: url('/wp-content/uploads/2026/04/BG2.png');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: top;
  background-blend-mode: overlay;
  color: var(--next-prayer-fg);
  border-color: var(--border);
  border-radius: var(--radius-lg);
}

.pt-prayer-times-root .pt-next-prayer-box .pt-countdown {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--next-prayer-on-bg);
  font-size: 3rem;
}

.pt-prayer-times-root .pt-next-prayer-box .pt-countdown-label {
  margin: var(--box-gap) 0 0;
  color: var(--next-prayer-on-bg);
  font-size: 1rem;
}

.pt-prayer-times-root .pt-next-prayer-box .pt-countdown-mid::before,
.pt-prayer-times-root .pt-next-prayer-box .pt-next-prayer-name::before,
.pt-prayer-times-root .pt-next-prayer-box .pt-infall-time::before,
.pt-prayer-times-root .pt-next-prayer-box .pt-iqamah-time::before {
  content: " ";
}

.pt-prayer-times-root .pt-next-prayer.pt-next-event--non-prayer .pt-iqamah-row {
  display: none !important;
}

.pt-prayer-times-root .pt-next-prayer-box .pt-next-prayer-name,
.pt-prayer-times-root .pt-next-prayer-box .pt-countdown-mid {
  color: var(--next-prayer-fg);
  font-size: 1rem;
  font-weight: 600;
}

.pt-prayer-times-root .pt-next-prayer-box .pt-infall-row,
.pt-prayer-times-root .pt-next-prayer-box .pt-iqamah-row {
  margin: var(--box-gap) 0 0;
  display: flex;
  align-items: center;
  gap: var(--box-gap);
  flex-wrap: wrap;
  color: var(--clock-color);
}

.pt-prayer-times-root .pt-next-prayer-box .pt-infall-time,
.pt-prayer-times-root .pt-next-prayer-box .pt-iqamah-time {
  color: var(--next-prayer-on-bg);
}

.pt-prayer-times-root .pt-next-prayer-box .pt-icon-clock {
  display: inline-flex;
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
  color: var(--clock-color);
}

.pt-prayer-times-root .pt-next-prayer-box .pt-icon-clock svg {
  width: 100%;
  height: 100%;
  display: block;
}

.pt-prayer-times-root .pt-next-prayer-box a {
  color: var(--next-prayer-accent);
}

.pt-prayer-times-root .pt-next-prayer-box a:hover {
  color: var(--next-prayer-fg);
}

.pt-prayer-times-root .pt-next-prayer.iqamah .pt-next-prayer-box {
  background-color: #FBBF24;
}

.pt-prayer-times-root .pt-next-prayer.iqamah .pt-next-prayer-box .pt-countdown,
.pt-prayer-times-root .pt-next-prayer.iqamah .pt-countdown-label {
  color: #111c2d;
}

.pt-prayer-times-root .pt-next-prayer.iqamah .pt-next-prayer-box .pt-next-prayer-name,
.pt-prayer-times-root .pt-next-prayer.iqamah .pt-next-prayer-box .pt-countdown-mid {
  color: var(--next-prayer-bg);
}

.pt-prayer-times-root .pt-next-prayer.iqamah .pt-next-prayer-box .pt-infall-row,
.pt-prayer-times-root .pt-next-prayer.iqamah .pt-next-prayer-box .pt-iqamah-row,
.pt-prayer-times-root .pt-next-prayer.iqamah .pt-next-prayer-box .pt-icon-clock {
  color: var(--next-prayer-bg);
}

.pt-prayer-times-root .pt-next-prayer.iqamah .pt-next-prayer-box .pt-infall-time,
.pt-prayer-times-root .pt-next-prayer.iqamah .pt-next-prayer-box .pt-iqamah-time {
  color: #111c2d;
}

.pt-prayer-times-root .pt-day-list-wrapper {
  margin-top: var(--section-gap);
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

.pt-prayer-times-root .pt-day-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--box-gap);
  flex-wrap: wrap;
  margin-bottom: var(--box-gap);
}

.pt-prayer-times-root .pt-day-list-title {
  font-weight: 600;
  color: var(--text);
}

.pt-prayer-times-root .pt-day-list-date {
  flex: 1;
  text-align: center;
  min-width: 0;
  color: var(--muted);
  font-size: 1rem;
}

.pt-prayer-times-root .pt-day-list-nav {
  display: inline-flex;
  gap: var(--box-gap);
}

.pt-prayer-times-root .pt-nav-arrow {
  color: var(--primary);
}

.pt-prayer-times-root .pt-nav-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pt-prayer-times-root .pt-nav-arrow svg {
  width: 1.1em;
  height: 1.1em;
  display: block;
}

.pt-prayer-times-root .pt-day-swipe-viewport {
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}

.pt-prayer-times-root .pt-day-track {
  display: flex;
  width: 200%;
  transition: transform 0.25s ease-out;
  will-change: transform;
}

.pt-prayer-times-root .pt-day-pane {
  width: 50%;
  flex: 0 0 50%;
}

.pt-prayer-times-root .pt-prayer-times-day-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--box-gap);
}

.pt-prayer-times-root .pt-prayer-times-day-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--box-gap);
  padding: var(--box-gap) 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
}

.pt-prayer-times-root .pt-prayer-times-day-list li.passed {
  background: var(--inactive-bg);
  color: var(--muted);
}

.pt-prayer-times-root .pt-prayer-times-day-list li.passed .pt-prayer-name,
.pt-prayer-times-root .pt-prayer-times-day-list li.passed .pt-prayer-time {
  color: var(--muted);
}

.pt-prayer-times-root .pt-prayer-times-day-list li.active {
  background: var(--highlight);
  border-color: var(--border-highlight);
  color: var(--highlight-text);
}

.pt-prayer-times-root .pt-prayer-times-day-list li.active .pt-prayer-name,
.pt-prayer-times-root .pt-prayer-times-day-list li.active .pt-prayer-time {
  color: var(--highlight-text);
  font-weight: 600;
}

.pt-prayer-times-root .pt-prayer-name {
  font-weight: 500;
}

.pt-prayer-times-root .pt-prayer-time {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.pt-prayer-times-root .pt-no-times {
  margin: 0;
  opacity: 0.85;
  color: var(--muted);
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  word-wrap: normal !important;
}

/* Month shortcode: table-like CSS grid (day + six prayers per row) */
.pt-prayer-times-month .pt-prayer-times-month-table {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.pt-prayer-times-month .pt-prayer-times-month-row {
  display: grid;
  grid-template-columns: minmax(2.25rem, 2.75rem) repeat(6, minmax(3.1rem, 1fr));
  column-gap: 0;
  align-items: stretch;
  min-width: min(100%, 36rem);
  height: var(--section-gap);
  min-height: var(--section-gap);
  max-height: var(--section-gap);
  box-sizing: border-box;
}

.pt-prayer-times-month .pt-prayer-times-month-head {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: var(--primary);
  color: var(--surface);
  border-bottom: 1px solid var(--border);
}

.pt-prayer-times-month .pt-month-head-cell,
.pt-prayer-times-month .pt-month-day-cell,
.pt-prayer-times-month .pt-month-time-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  text-align: center;
  border-right: 1px solid var(--border);
  box-sizing: border-box;
}

.pt-prayer-times-month .pt-prayer-times-month-row > *:last-child {
  border-right: none;
}

.pt-prayer-times-month .pt-month-day-cell {
  font-weight: 600;
  color: var(--text);
}

.pt-prayer-times-month .pt-month-time-cell {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text);
}

.pt-prayer-times-month .pt-prayer-times-month-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pt-prayer-times-month .pt-prayer-times-month-day {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--border);
  box-sizing: border-box;
}

.pt-prayer-times-month .pt-prayer-times-month-day:last-child {
  border-bottom: none;
}

.pt-prayer-times-month .pt-prayer-times-month-day:nth-child(even) {
  background: var(--highlight);
}
.pt-prayer-times-month .pt-prayer-times-month-day:nth-child(even) :is(.pt-month-time-cell, .pt-month-day-cell) {
  color: var(--highlight-text);
}

/* Optional wrappers (editor / legacy markup) — same tokens as .pt-next-prayer-box */
.next-prayer,
.prayer-next {
  background: var(--next-prayer-bg);
  color: var(--next-prayer-fg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.next-prayer a,
.prayer-next a {
  color: var(--next-prayer-accent);
}

.next-prayer a:hover,
.prayer-next a:hover {
  color: var(--next-prayer-fg);
}

/* Aktuellt posts shortcode */
.aktuellt-posts {
  margin-top: var(--section-gap);
}
.blog .aktuellt-posts {
  margin-top: 1rem;
}

.aktuellt-posts__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--box-gap);
  margin-bottom: var(--box-gap);
}

.aktuellt-posts__heading {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.aktuellt-posts__all-btn {
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.aktuellt-posts__list {
  display: grid;
  gap: var(--box-gap);
}

.aktuellt-posts__item {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: 20px auto auto auto auto;
  grid-template-areas:
    "thumb badge"
    "thumb title"
    "thumb title"
    "excerpt excerpt"
    "date date";
  gap: var(--box-gap);
  align-items: start;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.aktuellt-posts__item:hover {
  text-decoration: none;
}

.aktuellt-posts__thumb {
  grid-area: thumb;
  margin: 0;
  width: 100%;
  max-height: 95px;
  min-height: 95px;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.aktuellt-posts__thumb img {
  width: 100%;
  height: 95px;
  object-fit: cover;
  display: block;
}

.aktuellt-posts__thumb-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--inactive-bg);
}

.aktuellt-posts__item--sticky {
  background: var(--highlight);
}

.aktuellt-posts__item--sticky .aktuellt-posts__title,
.aktuellt-posts__item--sticky .aktuellt-posts__excerpt {
  color: var(--highlight-text);
}

.aktuellt-posts__badge {
  grid-area: badge;
  justify-self: start;
  display: inline-block;
  padding: .25rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  margin: 0;
}

.aktuellt-posts__title {
  grid-area: title;
  font-size: 1rem;
  line-height: 1.25;
  margin: 0;
}

.aktuellt-posts__excerpt {
  grid-area: excerpt;
  margin: 0;
}

.aktuellt-posts__date {
  grid-area: date;
  justify-self: end;
  display: inline-block;
  font-size: 0.75rem;
  color: var(--muted);
}

/***********
Single post
**********/

.entry-thumbnail {
  margin: 0 0 1rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.entry-thumbnail img {
  width: 100%;
  display: block;
}

.single-post .entry-content-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1rem;
}

/***********
Om Mosken
**********/
.sub-heading {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}
.info-box {
  padding: 1rem;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-block: var(--box-gap) var(--section-gap);
}
.info-box ul{
  list-style: none;
  margin: 0;
  padding: 0;
}
.info-box :is(iframe,img){
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 100%;
}
/***********
Large screen styles
**********/
@media (min-width: 700px) {
  body.home .entry-content{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  body.home .entry-content .pt-prayer-times-root{
    margin-top: 45px;
  }
  body.home .entry-content .aktuellt-posts{
    margin-top: 0;
  }
  body.blog .aktuellt-posts__list{
    grid-template-columns: repeat(2, 1fr);
    column-gap: 1rem;
  }
  #post-83 .entry-content{
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, 1fr);
  }
  #post-83 :is(section.info-box){
    grid-column: span 2;
  }
}