/****************************************
 * HOME – SHOWCASE (HERO)
 ****************************************/

/* 1) Layout / spacing (override theme defaults) */
body.home #showcase.rad-showcase {
  padding-top: 80px !important;
  padding-bottom: 30px !important;
  min-height: 0 !important;
  height: auto !important;
}

@media (min-width: 992px) {
  body.home #showcase.rad-showcase {
    min-height: 600px !important;
  }
}

/* 2) Typography spacing */
body.home #showcase h1.display-1 {
  margin-top: 0 !important;
  margin-bottom: 10px !important;
}

body.home #showcase h2.display-5 {
  margin-bottom: 15px !important;
}

body.home #showcase .lead {
  margin-bottom: 20px !important;
}

/* 3) Image sizing */
body.home #showcase .profile-image img {
  max-width: 80% !important;
  height: auto !important;
  display: block;
  margin: 0 auto;
}

/* ===== Typography ===== */
:root {
  --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bs-body-line-height: 1.6;
  --arkonia-heading-font-family: 'EB Garamond', Georgia, 'Times New Roman', serif;
}

body {
  font-family: var(--bs-body-font-family);
  line-height: var(--bs-body-line-height);
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--arkonia-heading-font-family);
  letter-spacing: 0.02em;
  font-weight: 500;
}

h1, .h1 { font-weight: 600; }
h2, .h2 { font-weight: 600; }

/* ===== Navbar Branding ===== */
.arkonia-brand {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  padding: 8px 0;
  padding-left: 0;
  padding-right: 0;
}

.navbar-brand.arkonia-brand {
  margin: 0;
  padding-left: 0;
  padding-right: 0;
}

.arkonia-brand__icon {
  height: clamp(46px, 3.5vw, 52px);
  width: auto;
  display: block;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
}

/* Override theme's forced 156px width at >=768px */
/* Theme: .header .navbar-brand img { width: 156px } → specificity (0,2,1) */
/* This:  .header .navbar-brand img.arkonia-brand__icon → specificity (0,3,1) */
.header .navbar-brand img.arkonia-brand__icon {
  width: auto;
  max-height: none;
  height: 50px;
}

@media (max-width: 767px) {
  .header .navbar-brand img.arkonia-brand__icon {
    height: 40px;
  }
}

.arkonia-brand__text {
  font-family: var(--arkonia-heading-font-family);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: inherit;
  line-height: 1;
  padding-left: 0;
  margin-left: 10px;
  margin-right: 0;
}

/* ===== Social Media Icons ===== */
.arkonia-social-icons {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: 16px;
}

.arkonia-social-icon {
  color: inherit;
  font-size: 1.25rem;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.arkonia-social-icon:hover {
  opacity: 0.7;
  transform: translateY(-2px);
  color: inherit;
}

/* ===== Aktualności: lista z miniaturą obok ===== */
.arkonia-newslist{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.arkonia-newsitem{
  border:1px solid var(--bs-border-color);
  border-radius:14px;
  overflow:hidden;
  background:var(--bs-card-bg, var(--bs-body-bg));
  color:var(--bs-card-color, var(--bs-body-color));
  position:relative;
  cursor:pointer;
}

/* Stretched-link: title <a>::after covers the whole card */
.arkonia-newsitem__titlelink {
  color: inherit;
  text-decoration: none;
}
.arkonia-newsitem__titlelink::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}
/* Social buttons inside cards must sit above the stretched-link overlay */
.arkonia-newsitem .arkonia-social-btn,
.arkonia-newsitem__body a:not(.arkonia-newsitem__titlelink) {
  position: relative;
  z-index: 2;
}

.arkonia-newslist .arkonia-newsitem .arkonia-newsitem__link{
  display:grid !important;
  grid-template-columns:96px 1fr !important;
  grid-template-rows:auto !important;
  gap:14px !important;
  align-items:start !important;
  padding:0;
  color:inherit;
}

.arkonia-newslist .arkonia-newsitem .arkonia-newsitem__thumb{
  width:96px !important;
  max-width:96px !important;
  min-width:96px !important;
  height:96px !important;
  max-height:96px !important;
  min-height:96px !important;
  object-fit:cover !important;
  display:block !important;
  grid-column:1 / 2 !important;
  grid-row:1 / 2 !important;
  margin:0 !important;
}

/* Default thumbnail fallback - uses CSS custom properties set inline in template */
/* Light mode: dark icons (--thumb-light) | Dark mode: light icons (--thumb-dark) */
.arkonia-default-thumb {
  background-image: var(--thumb-light);
  background-size: 55%;
  background-position: center;
  background-repeat: no-repeat;
}

[data-bs-theme="dark"] .arkonia-default-thumb {
  background-image: var(--thumb-dark);
}

/* Modifier classes (--jajko, --rybka, --slub) use same styling */
/* Image URLs are set via inline CSS variables in the template based on title keywords */

.arkonia-newslist .arkonia-newsitem .arkonia-newsitem__body{
  padding:2px 2px 2px 0 !important;
  grid-column:2 / 3 !important;
  grid-row:1 / 2 !important;
  min-width:0 !important;
  max-width:100% !important;
  overflow:hidden;
}

.arkonia-newsitem__title{
  margin:0 0 6px;
  font-size:1.05rem;
  line-height:1.3;
  word-wrap:break-word;
  overflow-wrap:break-word;
  color:var(--bs-heading-color, var(--bs-body-color));
}

.arkonia-newsitem__meta{
  font-size:.9rem;
  margin-bottom:8px;
  color:var(--bs-secondary-color, var(--bs-body-color));
  opacity:.85;
}

.arkonia-newsitem__text{
  margin:0;
  line-height:1.5;
  word-wrap:break-word;
  overflow-wrap:anywhere;
  word-break:break-word;
  color:var(--bs-body-color);
  opacity:.95;
  text-align:justify;
}

/* Prevent long URLs / buttons inside summary from blowing out the grid column */
.arkonia-newsitem__body a,
.arkonia-newsitem__body .arkonia-social-btn {
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
  display: inline-block;
}

.arkonia-newsitem:hover{
  box-shadow: 0 8px 18px rgba(0,0,0,.15);
  transition: box-shadow .12s ease;
}

/* Slightly elevated background on hover */
[data-bs-theme="light"] .arkonia-newsitem:hover {
  background:rgba(0,0,0,.02);
}

[data-bs-theme="dark"] .arkonia-newsitem:hover {
  background:rgba(255,255,255,.05);
}

/* ===== Google Maps Embed ===== */
.arkonia-map {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  margin: 24px 0;
  border: 1px solid var(--bs-border-color);
}

.arkonia-map iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ===== Custom Footer Bar ===== */
.arkonia-footer-bar {
  border-top: 1px solid var(--bs-border-color);
  padding: 16px 0;
  margin-top: 24px;
  opacity: 0.75;
}

.arkonia-footer-bar__content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--bs-body-color);
}

.arkonia-footer-bar__left {
  color: inherit;
}

.arkonia-footer-bar__right {
  color: inherit;
}

.arkonia-footer-bar__link {
  color: inherit;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.arkonia-footer-bar__link:hover,
.arkonia-footer-bar__link:focus {
  opacity: 0.7;
  color: inherit;
  text-decoration: underline;
}

/* Mobile: center content when wrapped */
@media (max-width: 576px) {
  .arkonia-footer-bar__content {
    justify-content: center;
    text-align: center;
  }
}

/* ===== Social Media Link Buttons ===== */
.arkonia-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  margin-top: 12px;
  margin-bottom: 4px;
  border: 1px solid var(--bs-border-color);
  border-radius: 6px;
  background: transparent;
  color: var(--bs-body-color);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.arkonia-social-btn i {
  font-size: 1.1rem;
  opacity: 0.85;
}

.arkonia-social-btn:hover {
  background: var(--bs-secondary-bg);
  border-color: var(--bs-secondary-color);
  color: var(--bs-body-color);
  text-decoration: none;
}

/* YouTube button - subtle red accent on hover */
.arkonia-social-btn--yt:hover {
  border-color: rgba(255, 0, 0, 0.3);
}

[data-bs-theme="light"] .arkonia-social-btn--yt:hover {
  background: rgba(255, 0, 0, 0.04);
}

[data-bs-theme="dark"] .arkonia-social-btn--yt:hover {
  background: rgba(255, 0, 0, 0.1);
}

/* Facebook button - subtle blue accent on hover */
.arkonia-social-btn--fb:hover {
  border-color: rgba(24, 119, 242, 0.3);
}

[data-bs-theme="light"] .arkonia-social-btn--fb:hover {
  background: rgba(24, 119, 242, 0.04);
}

[data-bs-theme="dark"] .arkonia-social-btn--fb:hover {
  background: rgba(24, 119, 242, 0.1);
}

/* Instagram button - subtle gradient accent on hover */
.arkonia-social-btn--ig:hover {
  border-color: rgba(225, 48, 108, 0.3);
}

[data-bs-theme="light"] .arkonia-social-btn--ig:hover {
  background: rgba(225, 48, 108, 0.04);
}

[data-bs-theme="dark"] .arkonia-social-btn--ig:hover {
  background: rgba(225, 48, 108, 0.1);
}

/* Stack buttons nicely when multiple appear */
.arkonia-social-btn + .arkonia-social-btn {
  margin-left: 8px;
}

/* Mobile: stack vertically */
@media (max-width: 576px) {
  .arkonia-social-btn {
    display: flex;
    width: 100%;
    justify-content: center;
  }

  .arkonia-social-btn + .arkonia-social-btn {
    margin-left: 0;
    margin-top: 8px;
  }
}

/* ===== Semester Switcher ===== */
.arkonia-semester-switcher {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.arkonia-semester-switcher__label {
  font-family: var(--arkonia-heading-font-family);
  font-weight: 600;
  font-size: 1rem;
  color: var(--bs-body-color);
  white-space: nowrap;
}

.arkonia-semester-switcher__select {
  padding: 8px 36px 8px 14px;
  font-size: 0.95rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 6px;
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
  max-width: 340px;
  cursor: pointer;
  appearance: auto;
}

.arkonia-semester-switcher__select:focus {
  outline: 2px solid var(--bs-primary, #0d6efd);
  outline-offset: 1px;
}

/* ===== Pagination Controls ===== */
.arkonia-pagination {
  margin-top: 32px;
}

.arkonia-pagination__list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: center;
}

.arkonia-pagination__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 8px 12px;
  border: 1px solid var(--bs-border-color);
  border-radius: 6px;
  color: var(--bs-body-color);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}

a.arkonia-pagination__link:hover {
  background: var(--bs-secondary-bg);
  border-color: var(--bs-secondary-color);
  text-decoration: none;
  color: var(--bs-body-color);
}

.arkonia-pagination__link--active {
  background: var(--bs-primary, #0d6efd);
  border-color: var(--bs-primary, #0d6efd);
  color: #fff;
  font-weight: 600;
  cursor: default;
}

.arkonia-pagination__link--disabled {
  opacity: 0.4;
  cursor: default;
}

.arkonia-pagination__ellipsis {
  display: inline-flex;
  align-items: center;
  padding: 8px 6px;
  color: var(--bs-secondary-color);
  font-size: 0.9rem;
}

/* ===== Sidebar: Active Semester Highlight ===== */
.arkonia-news-toc__link--active {
  background: var(--bs-primary, #0d6efd);
  color: #fff;
  font-weight: 600;
}

.arkonia-news-toc__link--active:hover {
  background: var(--bs-primary, #0d6efd);
  color: #fff;
}

.arkonia-news-toc__link--active .arkonia-news-toc__count {
  opacity: 0.85;
}

/* ===== Sidebar: Pagination Info ===== */
.arkonia-sidebar-pagination {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--bs-border-color);
}

.arkonia-sidebar-pagination__info {
  font-size: 0.9rem;
  color: var(--bs-secondary-color);
  text-align: center;
  padding: 4px 0;
}

/* Mobile pagination adjustments */
@media (max-width: 576px) {
  .arkonia-pagination__list {
    gap: 2px;
  }
  .arkonia-pagination__link {
    min-width: 36px;
    padding: 6px 8px;
    font-size: 0.85rem;
  }
  .arkonia-semester-switcher__select {
    max-width: 100%;
    width: 100%;
  }
}

/* ===== News List with Academic Year Sidebar ===== */

/* Two-column layout: main content + sidebar */
.arkonia-news-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
}

/* Desktop: two columns with sidebar on right */
@media (min-width: 992px) {
  .arkonia-news-layout {
    grid-template-columns: 1fr 260px;
  }

  /* Sidebar becomes sticky */
  .arkonia-news-sidebar {
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
  }
}

/* Academic year section headings */
.arkonia-news-year-heading {
  font-family: var(--arkonia-heading-font-family);
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--bs-border-color);
  color: var(--bs-heading-color, var(--bs-body-color));
}

.arkonia-news-year-section {
  margin-bottom: 48px;
  scroll-margin-top: 80px; /* offset for sticky header */
}

/* Sidebar table of contents */
.arkonia-news-toc {
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 8px;
  padding: 20px;
}

.arkonia-news-toc__title {
  font-family: var(--arkonia-heading-font-family);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--bs-heading-color, var(--bs-body-color));
}

.arkonia-news-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.arkonia-news-toc__item {
  margin-bottom: 4px;
}

.arkonia-news-toc__link {
  display: block;
  padding: 8px 12px;
  border-radius: 4px;
  color: var(--bs-body-color);
  text-decoration: none;
  font-size: 0.95rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.arkonia-news-toc__link:hover {
  background: var(--bs-secondary-bg);
  color: var(--bs-body-color);
  text-decoration: none;
}

.arkonia-news-toc__count {
  opacity: 0.6;
  font-size: 0.9em;
}

/* Mobile: sidebar moves to top */
@media (max-width: 991px) {
  .arkonia-news-layout {
    grid-template-columns: 1fr;
  }

  .arkonia-news-sidebar {
    order: -1; /* Move sidebar above content on mobile */
    margin-bottom: 24px;
  }

  .arkonia-news-toc {
    padding: 16px;
  }

  .arkonia-news-toc__title {
    font-size: 1rem;
  }
}

/* ===== Text Justification (Global Article Content) ===== */

/* Article content justification — three wrappers:
   .arkonia-postcontent  = aktualnosci single posts (custom template)
   article#content       = theme _default/single.html (leaf bundles)
   div.content           = theme section.html: Historia, Podstawy, etc. (_index.md) */
.arkonia-postcontent p,
.arkonia-postcontent li,
article#content p,
article#content li,
main div.content p,
main div.content li {
  text-align: justify !important;
}

/* Keep headings left-aligned */
.arkonia-postcontent h1,
.arkonia-postcontent h2,
.arkonia-postcontent h3,
.arkonia-postcontent h4,
.arkonia-postcontent h5,
.arkonia-postcontent h6,
article#content h1,
article#content h2,
article#content h3,
article#content h4,
article#content h5,
article#content h6,
main div.content h1,
main div.content h2,
main div.content h3,
main div.content h4,
main div.content h5,
main div.content h6 {
  text-align: left !important;
}

/* Keep figcaptions centered (not justified) */
.arkonia-postcontent figcaption,
article#content figcaption,
main div.content figcaption {
  text-align: center !important;
}

/* ===== Post Images and Figures ===== */

/* Cover hero image - preserve aspect ratio, no cropping */
.arkonia-hero {
  margin: 0 0 2rem;
  text-align: center;
}

.arkonia-hero img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  object-fit: contain;
  max-width: 100%;
}

.arkonia-hero__caption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--bs-secondary-color);
  text-align: center;
  font-style: italic;
  line-height: 1.4;
}

.arkonia-hero__credit {
  display: block;
  font-size: 0.85rem;
  margin-top: 0.25rem;
  opacity: 0.8;
}

/* Inline content images with captions (via render-image.html hook) */
.arkonia-figure {
  margin: 1.5rem auto;
  text-align: center;
  max-width: 100%;
}

.arkonia-figure img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  object-fit: contain;
}

.arkonia-figure__caption {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--bs-secondary-color);
  font-style: italic;
  text-align: center;
  line-height: 1.4;
}

/* Ensure all post content images preserve aspect ratio and don't crop */
.arkonia-postcontent img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

/* Images without captions (plain img tags) - add subtle spacing */
.arkonia-postcontent > img,
.arkonia-postcontent p > img {
  display: block;
  margin: 1.5rem auto;
  border-radius: 8px;
}

/* ===== Compact about-sections on home page ===== */
#about,
#podstawy,
#historia,
#kontakt {
  padding-top: 128px;
  padding-bottom: 128px;
}

#about .about__profile-picture,
#podstawy .about__profile-picture,
#historia .about__profile-picture,
#kontakt .about__profile-picture {
  margin-top: 0;
  flex: 0 0 50% !important;
  max-width: 50% !important;
  padding-left: 24px;
}

#about .about__profile-picture img.image-left-overflow,
#podstawy .about__profile-picture img.image-left-overflow,
#historia .about__profile-picture img.image-left-overflow,
#kontakt .about__profile-picture img.image-left-overflow {
  margin-left: 0 !important;
  min-height: auto;
  max-height: 350px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
}

/* ===== Random Quote Banner ===== */
.arkonia-quote {
  background: linear-gradient(180deg, #f5f3ee 0%, #eae7e0 100%);
  border-bottom: 1px solid #d9d4cb;
  padding: 88px 0 1rem; /* 88px clears ~76px fixed-top navbar + 12px breathing room */
  text-align: center;
}

/* When quote is present, breadcrumb no longer needs its own navbar clearance.
   Uses ~ (general sibling) because quote.html's <script> sits between <aside> and <section>. */
.arkonia-quote ~ #breadcrumb-bar {
  padding-top: 0.5rem;
}

.arkonia-quote__inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1rem;
}

.arkonia-quote__item {
  margin: 0;
  opacity: 0;
  transition: opacity 380ms ease-in;
}

.arkonia-quote__item--visible {
  opacity: 1;
}

.arkonia-quote__text {
  font-family: var(--arkonia-heading-font-family);
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.65;
  color: #3a3530;
  margin: 0;
}

.arkonia-quote__text p {
  margin: 0;
}

.arkonia-quote__author {
  font-family: var(--arkonia-heading-font-family);
  font-variant: small-caps;
  font-size: 0.85rem;
  color: #6b6359;
  margin-top: 0.4rem;
  letter-spacing: 0.04em;
}

@media print {
  .arkonia-quote { display: none; }
}

/* Dark mode — triggered by theme JS setting data-bs-theme on <html> */
[data-bs-theme="dark"] .arkonia-quote {
  background: linear-gradient(180deg, #2a2520 0%, #1e1b17 100%);
  border-bottom-color: #3d3830;
}

[data-bs-theme="dark"] .arkonia-quote__text {
  color: #d4cfc8;
}

[data-bs-theme="dark"] .arkonia-quote__author {
  color: #9a9189;
}
