/* ===========================================
   relacje.news - Custom Styles
   Bootstrap 5.3.3 compatible
   =========================================== */

/* Font face - ClashDisplay for headings */
@font-face {
  font-family: 'ClashDisplay';
  src: url('./font/ClashDisplay-Semibold.woff2') format('woff2'),
       url('./font/ClashDisplay-Semibold.woff') format('woff'),
       url('./font/ClashDisplay-Semibold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ===========================================
   Base
   =========================================== */
body.container {
  max-width: 1200px;
  font-family: "Lato", sans-serif;
}

h1, h2, h3, h4, h5, h6, .navbar-brand, .blockquote {
  font-family: "ClashDisplay", sans-serif;
  color: var(--accent-color);
}

a {
  color: var(--accent-color);
  font-weight: 600;
  text-decoration: none;
}

a:hover {
  color: var(--accent-color);
  opacity: 0.8;
}

/* ===========================================
   Navbar
   =========================================== */
.navbar {
  z-index: 100;
}

.navbar a, .navbar a h1 {
  display: inline-block;
  font-size: clamp(1rem, 3.5vw, 1.5rem);
  line-height: inherit;
  white-space: nowrap;
  font-weight: 400;
  margin: 0;
  padding: 0;
}

.navbar-brand h1 {
  margin: 0;
}

/* ===========================================
   Cards & Lists
   =========================================== */
.lista {
  display: grid;
  grid-gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 768px) {
  .lista {
    grid-template-columns: 1fr;
  }
}

.card {
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
}

/* ===========================================
   Cover Image with gradient fade
   =========================================== */
.cover-wrapper {
  position: relative;
  overflow: hidden;
  height: 280px;
}

.cover-wrapper::before,
.cover-wrapper::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 10%;
  z-index: 1;
  pointer-events: none;
}

.cover-wrapper::before {
  top: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0) 100%);
}

.cover-wrapper::after {
  bottom: 0;
  background: linear-gradient(to top, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0) 100%);
}

.cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.cover-wrapper-single {
  height: 320px;
}

/* ===========================================
   Share Button (FAB)
   =========================================== */
.fab {
  position: fixed;
  width: 55px;
  height: 55px;
  right: max(calc(50vw - 600px - 70px), 20px);
  bottom: 20px;
  border-radius: 55px;
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  z-index: 50;
}

.fab:hover {
  background-color: var(--accent-color);
  opacity: 0.9;
}

.fab-btn {
  color: #fff !important;
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

.fab-btn:hover {
  background-color: var(--accent-color);
  opacity: 0.9;
}

/* ===========================================
   Pagination
   =========================================== */
#pagination_select {
  max-width: 70px;
}

.pagination {
  margin: 0;
}

.pagination select {
  height: calc(1.5em + 1.5rem + 2px);
}

/* ===========================================
   Author Box
   =========================================== */
.author * {
  margin: 0;
}

.author .social-links,
.author h4,
.author img {
  margin: 1rem 0;
}

.icon svg {
  filter: invert(52%) sepia(87%) saturate(394%) hue-rotate(93deg) brightness(95%) contrast(88%);
}

.author .icon {
  padding: 0 5px;
  vertical-align: bottom;
}

/* ===========================================
   Next/Prev Navigation
   =========================================== */
.next-prev .page-item {
  width: 50%;
  text-align: center;
}

/* ===========================================
   Share Modal
   =========================================== */
.pop-up {
  display: none;
  position: fixed;
  z-index: 200;
  padding-top: 3rem;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.pop-up .content {
  position: absolute;
  background-color: #fefefe;
  padding: 2rem;
  border-radius: 0.5rem;
  width: 90%;
  max-width: 420px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.pop-up .close {
  cursor: pointer;
  font-size: 1.5rem;
}

#shareModal button,
#copy-alert {
  width: 100%;
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.modal-body .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.modal-body .btn svg {
  filter: brightness(0) invert(1);
  flex-shrink: 0;
}

#shareModal input.form-control {
  direction: ltr;
  text-overflow: ellipsis;
  text-align: left;
}

#copy-alert {
  display: grid;
  place-items: center;
}

/* ===========================================
   Blockquote
   =========================================== */
.blockquote {
  border-bottom: 2px solid var(--accent-color);
  border-top: 2px solid var(--accent-color);
  padding: 1rem 0;
  margin: 1.5rem 0;
}

/* ===========================================
   Shadow Override (accent color tint)
   =========================================== */
.shadow {
  box-shadow: 0 0.5rem 1rem rgba(46, 204, 113, 0.15) !important;
}

/* ===========================================
   Figure
   =========================================== */
.figure {
  display: table;
  margin: 1rem auto;
}

/* ===========================================
   Opinion/Felieton Badge
   =========================================== */
.badge-opinion {
  background-color: var(--accent-color-alt);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===========================================
   Mermaid diagrams
   =========================================== */
.mermaid svg {
  display: block;
  margin: auto;
}

/* ===========================================
   Responsive
   =========================================== */
@media (max-width: 768px) {
  .figure {
    padding: 0;
  }

  .fab {
    right: 15px;
    bottom: 15px;
  }
}
