/*
Theme Name: Jakość kształcenia — Akademia Łomżyńska
Theme URI: https://al.edu.pl/jakosc/
Author: Akademia Łomżyńska
Description: Minimalistyczny motyw dla modułu „Jakość kształcenia” — granatowa identyka ze złotym akcentem, nagłówek z logo uczelni, hero ze zdjęciem kampusu, karty wpisów i stopka projektowa.
Version: 1.2.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: jakosc-al
*/

:root {
  --j-bg: #fafcff;
  --j-fg: #111b28;
  --j-card: #ffffff;
  --j-primary: #183d6b;
  --j-primary-fg: #f6f9fc;
  --j-secondary: #e7f0f8;
  --j-secondary-fg: #1c2f46;
  --j-muted: #eef2f7;
  --j-muted-fg: #5a6472;
  --j-accent: #8f5d04;
  --j-border: #d9dfe6;
  --j-hero1: #112d55;
  --j-hero2: #025884;
  --j-hero3: #008192;
  --j-gradient: linear-gradient(135deg, var(--j-hero1), var(--j-hero2) 60%, var(--j-hero3));
  --j-shadow: 0 1px 2px rgba(24, 61, 107, 0.08), 0 10px 30px -18px rgba(24, 61, 107, 0.45);
  --j-radius: 0.5rem;
  --j-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--j-bg);
  color: var(--j-fg);
  font-family: var(--j-font);
  line-height: 1.6;
  font-size: 16px;
}

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

a {
  color: var(--j-primary);
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--j-primary);
  outline-offset: 2px;
}

/* ---------- Nagłówek ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 252, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--j-border);
}

.site-header-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
  text-decoration: none;
  color: var(--j-fg);
}

.site-brand img {
  height: 2.25rem;
  width: auto;
  flex-shrink: 0;
}

.site-brand .site-title {
  display: none;
  border-left: 1px solid var(--j-border);
  padding-left: 0.625rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--j-primary);
  white-space: nowrap;
}

@media (min-width: 1536px) {
  .site-brand .site-title {
    display: block;
  }
}

.site-nav-wrap {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.125rem;
}

.site-nav a {
  display: block;
  white-space: nowrap;
  padding: 0.375rem 0.625rem;
  border-radius: var(--j-radius);
  font-size: 13px;
  font-weight: 500;
  color: rgba(17, 27, 40, 0.8);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a {
  background: var(--j-secondary);
  color: var(--j-primary);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--j-border);
  border-radius: var(--j-radius);
  background: transparent;
  cursor: pointer;
  color: var(--j-fg);
}

.menu-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
}

.lang-switch {
  display: flex;
  border: 1px solid var(--j-border);
  border-radius: var(--j-radius);
  overflow: hidden;
}

.lang-switch a {
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--j-muted-fg);
}

.lang-switch a[aria-current="true"] {
  background: var(--j-primary);
  color: var(--j-primary-fg);
}

@media (max-width: 960px) {
  .site-nav {
    display: none;
    width: 100%;
  }

  .site-header-inner {
    flex-wrap: wrap;
  }

  .site-nav-wrap {
    width: auto;
  }

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

  .site-nav.is-open {
    display: block;
    width: 100%;
    border-top: 1px solid var(--j-border);
    padding: 0.5rem 0 0.75rem;
  }

  .site-nav.is-open ul {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav.is-open a {
    border-bottom: 1px solid rgba(217, 223, 230, 0.6);
    padding: 0.75rem 0.25rem;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background-image: var(--j-gradient);
  color: #f7fafd;
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: j-ken-burns 28s ease-in-out infinite alternate;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    135deg,
    rgba(17, 45, 85, 0.88),
    rgba(2, 88, 132, 0.82) 60%,
    rgba(0, 129, 146, 0.72)
  );
}

.hero-content {
  position: relative;
  max-width: 64rem;
  margin: 0 auto;
  padding: 4rem 1rem;
}

.hero-content .kicker {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.75;
  margin: 0;
}

.hero-content h1 {
  margin: 0.75rem 0 0;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
}

.hero-content .lead {
  margin: 1.25rem 0 0;
  max-width: 48rem;
  font-size: 1.125rem;
  line-height: 1.7;
  opacity: 0.9;
}

@keyframes j-ken-burns {
  from {
    transform: scale(1) translateY(0);
  }
  to {
    transform: scale(1.12) translateY(-1.5%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-photo {
    animation: none;
  }
}

/* ---------- Treść i karty ---------- */

.page-header {
  background-image: var(--j-gradient);
  color: #f7fafd;
}

.page-header-inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 3rem 1rem;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
}

.breadcrumb {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  opacity: 0.8;
}

.breadcrumb a {
  color: inherit;
}

.section {
  max-width: 64rem;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1rem;
}

.grid-cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid-cards {
    grid-template-columns: 1fr 1fr;
  }
}

.post-card {
  display: block;
  background: var(--j-card);
  border: 1px solid var(--j-border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: var(--j-shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.post-card .card-kicker {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--j-accent);
}

.post-card h2,
.post-card h3 {
  margin: 0.5rem 0 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--j-fg);
}

.post-card p {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--j-muted-fg);
}

.post-card .go {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--j-primary);
}

/* ---------- Pojedynczy wpis ---------- */

.entry-content {
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(17, 27, 40, 0.9);
}

.entry-content h2 {
  font-size: 1.375rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  color: var(--j-fg);
}

.entry-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  color: var(--j-fg);
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.5rem;
}

.entry-content li {
  margin: 0.4rem 0;
}

.entry-content li::marker {
  color: var(--j-accent);
}

.entry-content a {
  color: var(--j-primary);
}

.entry-content blockquote {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--j-accent);
  background: rgba(231, 240, 248, 0.6);
  border-radius: 0.5rem;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.entry-content th,
.entry-content td {
  border: 1px solid var(--j-border);
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.entry-content th {
  background: var(--j-secondary);
  color: var(--j-secondary-fg);
}

.entry-content figure {
  margin: 1.5rem 0;
}

.entry-content figcaption {
  font-size: 0.8125rem;
  color: var(--j-muted-fg);
}

.doc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--j-border);
  border-radius: var(--j-radius);
  background: var(--j-card);
}

.doc-list li + li {
  border-top: 1px solid var(--j-border);
}

.doc-list a {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  text-decoration: none;
  color: inherit;
}

.doc-list a:hover {
  background: var(--j-secondary);
}

/* ---------- Wyszukiwanie ---------- */

.search-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  max-width: 48rem;
  background: var(--j-bg);
  border-radius: var(--j-radius);
  padding: 0.5rem 0.75rem;
  color: var(--j-fg);
}

.search-form input[type="search"] {
  flex: 1;
  border: 0;
  background: transparent;
  font-size: 0.875rem;
  outline: none;
  color: inherit;
}

.search-form button {
  border: 0;
  border-radius: 0.375rem;
  background: var(--j-primary);
  color: var(--j-primary-fg);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.375rem 0.75rem;
  cursor: pointer;
}

/* ---------- Stopka ---------- */

.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--j-border);
  background: rgba(231, 240, 248, 0.5);
}

.site-footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.5rem 1rem;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .site-footer-inner {
    grid-template-columns: repeat(3, 1fr);
  }
}

.site-footer img {
  height: 2.5rem;
  width: auto;
}

.site-footer .footer-title {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--j-primary);
}

.site-footer p,
.site-footer li {
  font-size: 0.875rem;
  color: var(--j-muted-fg);
}

.site-footer h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--j-fg);
  margin: 0 0 0.5rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer ul li + li {
  margin-top: 0.25rem;
}

.site-footer a {
  color: var(--j-muted-fg);
}

.site-footer a:hover {
  color: var(--j-primary);
}

.site-footer .footer-menu ul {
  list-style: none;
}

/* ---------- Nawigacja wpisów ---------- */

.pagination {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

.pagination .nav-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
}

.pagination .page-numbers {
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--j-border);
  border-radius: var(--j-radius);
  text-decoration: none;
  color: var(--j-fg);
}

.pagination .current {
  background: var(--j-primary);
  color: var(--j-primary-fg);
  border-color: var(--j-primary);
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* Automatic navigation and role selector (1.1). */
.site-header-inner { flex-wrap: wrap; }
.site-nav-wrap { display: contents; }
.site-nav { order: 1; margin-left: auto; }
.lang-switch { order: 2; flex-shrink: 0; }
.menu-toggle { order: 3; }
.site-brand .site-title { display: none; }
.role-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.role-tile { width: 100%; min-height: 218px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem; padding: 1rem; border: 1px solid var(--j-border); border-radius: var(--j-radius); box-shadow: var(--j-shadow); background: var(--j-card); color: var(--j-fg); font: inherit; cursor: pointer; transition: transform .2s; }
.role-tile:hover { transform: translateY(-4px); }
.role-tile[aria-pressed="true"] { background: var(--j-secondary); border: 2px solid var(--j-primary); }
.role-tile img { width: 112px; height: 112px; object-fit: contain; animation: j-role-float 3.5s ease-in-out infinite; }
.role-tile strong { font-size: .875rem; line-height: 1.5; overflow-wrap: anywhere; }
.role-tile small { color: var(--j-muted-fg); }
.role-all-icon { font-size: 2.5rem; color: var(--j-primary); height: 112px; display: grid; place-items: center; }
.role-results { margin-top: 2rem; }
.role-results a { text-decoration: none; }
[hidden] { display: none !important; }
.role-status { font-size: .875rem; color: var(--j-muted-fg); }
@keyframes j-role-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (max-width: 1120px) {
  .site-nav { display: none; flex-basis: 100%; order: 4; margin: 0; }
  .lang-switch { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
  .site-nav.is-open { display: block; border-top: 1px solid var(--j-border); padding-top: .5rem; }
  .site-nav.is-open ul { flex-direction: column; align-items: stretch; }
  .site-nav.is-open a { padding: .75rem; }
  .role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 460px) {
  .site-header-inner { gap: .5rem; }
  .site-brand img { height: 1.75rem; }
  .lang-switch a { padding: .4rem .5rem; }
  .role-grid { gap: .75rem; }
  .role-tile { padding: .75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .role-tile img { animation: none; }
  .role-tile { transition: none; }
  .role-tile:hover { transform: none; }
}
