/*
Theme Name: MDSSNM Dostopna
Theme URI: https://mdssnm.si/
Author: Medobčinsko društvo slepih in slabovidnih Novo mesto
Description: Lahka in dostopna tema za MDSS Novo mesto. Omogoča jasno navigacijo, velik in berljiv tisk, vidno tipkovnično ostrenje ter dobro delovanje z bralniki zaslona.
Version: 1.0.7
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mdssnm-dostopna
Tags: accessibility-ready, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, blog
*/

:root {
  --color-ink: #17212b;
  --color-muted: #52606d;
  --color-surface: #ffffff;
  --color-soft: #f3f7fa;
  --color-border: #c8d2dc;
  --color-brand: #123b59;
  --color-brand-dark: #0b2a40;
  --color-link: #005ea8;
  --color-link-hover: #003f73;
  --color-focus: #ffbf47;
  --shadow: 0 0.25rem 1.25rem rgba(16, 42, 67, 0.1);
  --content-width: 76rem;
  --reading-width: 48rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--color-ink);
  background: var(--color-soft);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.125rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

body.admin-bar .site-header {
  top: 2rem;
}

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

figure {
  margin-inline: 0;
}

a {
  color: var(--color-link);
  text-decoration: underline;
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--color-link-hover);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 0.25rem solid var(--color-focus);
  outline-offset: 0.2rem;
}

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

button,
input[type="submit"] {
  min-height: 2.75rem;
  border: 0.125rem solid var(--color-brand);
  border-radius: 0.35rem;
  padding: 0.55rem 1rem;
  color: #ffffff;
  background: var(--color-brand);
  cursor: pointer;
  font-weight: 700;
}

button:hover,
input[type="submit"]:hover {
  background: var(--color-brand-dark);
}

input[type="search"],
input[type="text"],
input[type="email"],
input[type="url"],
textarea,
select {
  width: 100%;
  min-height: 2.75rem;
  border: 0.125rem solid var(--color-muted);
  border-radius: 0.35rem;
  padding: 0.55rem 0.7rem;
  background: #ffffff;
}

h1,
h2,
h3,
h4 {
  color: var(--color-brand-dark);
  line-height: 1.22;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.2rem);
}

h3 {
  font-size: clamp(1.3rem, 2vw, 1.65rem);
}

.site-container {
  width: min(calc(100% - 2rem), var(--content-width));
  margin-inline: auto;
}

.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,
.skip-link:focus {
  position: fixed;
  z-index: 100000;
  top: 0.75rem;
  left: 0.75rem;
  width: auto;
  height: auto;
  clip: auto;
  padding: 0.75rem 1rem;
  color: #000000;
  background: var(--color-focus);
  font-weight: 800;
  white-space: normal;
}

.site-header {
  position: relative;
  z-index: 10;
  color: #ffffff;
  background: var(--color-brand);
  border-bottom: 0.35rem solid var(--color-focus);
}

.site-header a {
  color: inherit;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.25rem;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.site-identity {
  min-width: 0;
}

.site-logo-link {
  display: inline-flex;
  flex: 0 0 auto;
}

.custom-logo,
.site-header-image {
  display: block;
  width: auto;
  max-width: min(19rem, 50vw);
  max-height: 6rem;
  object-fit: contain;
  background: #ffffff;
}

.site-title {
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 1.8rem);
  line-height: 1.25;
}

.site-title a {
  text-decoration: none;
}

.site-description {
  margin: 0.3rem 0 0;
  max-width: 45rem;
  color: #eaf2f7;
  font-size: 1rem;
}

.contact-strip {
  color: var(--color-ink);
  background: var(--color-focus);
  font-size: 1rem;
  font-weight: 700;
}

.contact-strip .site-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  padding-block: 0.5rem;
}

.contact-strip a {
  color: #102a43;
}

.navigation-wrap {
  color: #ffffff;
  background: var(--color-brand-dark);
}

.menu-toggle {
  display: none;
  margin-block: 0.65rem;
  border-color: #ffffff;
  background: transparent;
}

.primary-navigation ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-navigation li {
  margin: 0;
}

.primary-navigation a {
  display: block;
  padding: 0.85rem 1rem;
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
}

.primary-navigation a:hover,
.primary-navigation .current-menu-item > a,
.primary-navigation .current_page_item > a {
  color: #102a43;
  background: var(--color-focus);
}

.site-main {
  min-height: 45vh;
  padding-block: clamp(2rem, 5vw, 4rem);
}

.content-card,
.post-card,
.notice-card {
  border: 0.0625rem solid var(--color-border);
  border-radius: 0.65rem;
  background: var(--color-surface);
  box-shadow: var(--shadow);
}

.content-card {
  max-width: var(--reading-width);
  margin-inline: auto;
  padding: clamp(1.25rem, 4vw, 3rem);
}

.content-card > :first-child,
.entry-content > :first-child {
  margin-top: 0;
}

.content-card > :last-child,
.entry-content > :last-child {
  margin-bottom: 0;
}

.entry-header {
  margin-bottom: 1.5rem;
}

.entry-title {
  margin: 0;
}

.entry-title a {
  color: inherit;
}

.entry-meta {
  margin: 0.5rem 0 0;
  color: var(--color-muted);
  font-size: 1rem;
}

.entry-content > * {
  max-width: 100%;
}

.entry-content li + li {
  margin-top: 0.35rem;
}

.entry-content blockquote {
  margin-inline: 0;
  border-left: 0.35rem solid var(--color-focus);
  padding: 0.6rem 1.25rem;
  background: var(--color-soft);
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
}

.entry-content th,
.entry-content td {
  border: 0.0625rem solid var(--color-border);
  padding: 0.6rem;
  text-align: left;
}

.page-intro {
  max-width: var(--reading-width);
  margin: 0 auto 2rem;
}

.page-intro h1 {
  margin-bottom: 0.4rem;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.post-card-image {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #dce6ee;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.25rem;
}

.post-card-title {
  margin: 0;
  font-size: 1.45rem;
}

.post-card-excerpt {
  flex: 1;
}

.read-more {
  align-self: flex-start;
  font-weight: 800;
}

.latest-news {
  margin-top: 3rem;
}

.latest-news-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.latest-news-header h2 {
  margin: 0;
}

.navigation.pagination,
.post-navigation {
  max-width: var(--reading-width);
  margin: 2rem auto 0;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.page-numbers,
.post-navigation a {
  display: inline-block;
  border: 0.125rem solid var(--color-brand);
  border-radius: 0.35rem;
  padding: 0.45rem 0.75rem;
  background: #ffffff;
  font-weight: 700;
}

.page-numbers.current {
  color: #ffffff;
  background: var(--color-brand);
}

.site-footer {
  margin-top: 2rem;
  padding-block: 2rem;
  color: #ffffff;
  background: var(--color-brand-dark);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 2rem;
}

.site-footer h2 {
  color: #ffffff;
  font-size: 1.3rem;
}

.site-footer a {
  color: #ffffff;
}

.footer-useful ul {
  margin: 0;
  padding-left: 1.25rem;
}

.footer-useful li + li {
  margin-top: 0.45rem;
}

.footer-bottom {
  margin: 1.5rem 0 0;
  border-top: 0.0625rem solid rgba(255, 255, 255, 0.35);
  padding-top: 1rem;
  font-size: 0.95rem;
}

.alignwide {
  width: min(100%, 68rem);
  max-width: 68rem;
  margin-right: auto;
  margin-left: auto;
}

.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
}

@media (max-width: 54rem) {
  .header-inner,
  .latest-news-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-branding {
    align-items: flex-start;
    flex-direction: column;
  }

  .posts-grid {
    grid-template-columns: 1fr 1fr;
  }

  .menu-toggle {
    display: inline-block;
  }

  .js .primary-navigation:not(.is-open) .menu,
  .js .primary-navigation:not(.is-open) .primary-menu-wrap > ul {
    display: none;
  }

  .primary-navigation ul {
    display: block;
    padding-bottom: 0.75rem;
  }

  .primary-navigation a {
    border-top: 0.0625rem solid rgba(255, 255, 255, 0.25);
  }
}

@media (max-width: 38rem) {
  body {
    font-size: 1.0625rem;
  }

  .posts-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .site-container {
    width: min(calc(100% - 1.25rem), var(--content-width));
  }

  .content-card {
    padding: 1.15rem;
  }
}

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

@media print {
  .skip-link,
  .contact-strip,
  .navigation-wrap,
  .site-footer,
  .post-navigation,
  .pagination {
    display: none !important;
  }

  body {
    color: #000000;
    background: #ffffff;
    font-size: 12pt;
  }

  .content-card,
  .post-card {
    border: 0;
    box-shadow: none;
  }
}
