/*! Calculi-TN (calculi.tn) - (c) 2022-2026 Ali Abdelkader Aydi. All rights reserved.
 *  Proprietary and confidential. Reproduction, redistribution or reuse of this
 *  file, in whole or in part, is prohibited without written permission.
 *  Contact: aliayditn02@gmail.com */

.rl {
  
  --rl-line: rgba(255, 255, 255, 0.13);
  --rl-surface: rgba(255, 255, 255, 0.065);
  --rl-sunk: rgba(1, 22, 33, 0.42);
  --rl-hover: rgba(255, 255, 255, 0.1);
  --rl-text: rgba(255, 255, 255, 0.94);
  --rl-text-soft: rgba(255, 255, 255, 0.74);
  --rl-text-faint: rgba(255, 255, 255, 0.55);
  --rl-accent: #4fc3e8;

  margin: 2.6rem 0 1.2rem;
  padding: 1.15rem 1.3rem 1.35rem;
  border: 1px solid var(--rl-line);
  border-radius: 14px;
  background: var(--rl-surface);
}

.rl-head {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 0.2rem;
  color: var(--rl-text);
}

.rl-head::before {
  content: "";
  flex: 0 0 auto;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 2px;
  background: var(--rl-accent);
  transform: translateY(-0.15em) rotate(45deg);
}

.rl-note {
  margin: 0 0 1rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--rl-text-faint);
}

.rl-list {
  list-style: none;
  
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.75rem;
}

.rl-list > li {
  margin: 0;
  min-width: 0;
}

.rl-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--rl-line);
  border-radius: 11px;
  background: var(--rl-sunk);
  text-decoration: none;
  color: var(--rl-text) !important; 
  transition: border-color 0.15s ease, background 0.15s ease,
    transform 0.15s ease;
}

.rl-card:hover,
.rl-card:focus-visible {
  border-color: var(--rl-accent);
  background: var(--rl-hover);
  transform: translateY(-2px);
}

.rl-card:focus-visible {
  outline: 2px solid var(--rl-accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .rl-card {
    transition: none;
  }

  .rl-card:hover,
  .rl-card:focus-visible {
    transform: none;
  }
}

.rl-art {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: #062b3d;
  border-block-end: 1px solid var(--rl-line);
}

.rl-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rl-art--empty {
  background-image: linear-gradient(
      135deg,
      rgba(79, 195, 232, 0.16),
      rgba(1, 22, 33, 0) 62%
    ),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cg fill='none' stroke='rgba(255,255,255,0.17)' stroke-width='1.1'%3E%3Crect x='10' y='10' width='28' height='28'/%3E%3Crect x='10' y='10' width='28' height='28' transform='rotate(45 24 24)'/%3E%3Ccircle cx='24' cy='24' r='3.2'/%3E%3C/g%3E%3C/svg%3E");
}

.rl-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1 1 auto;
  padding: 0.75rem 0.85rem 0.8rem;
}

.rl-title {
  display: block;
  font-weight: 600;
  line-height: 1.35;
  
  text-align: start;
}

.rl-excerpt {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--rl-text-soft);
  text-align: start;
  
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rl-more {
  margin-block-start: auto;
  padding-block-start: 0.5rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--rl-accent);
}

.rl-more::after {
  content: "\2192";
  display: inline-block;
  
  margin-inline-start: 0.3em;
  transition: transform 0.15s ease;
}

.rl-card:hover .rl-more::after,
.rl-card:focus-visible .rl-more::after {
  transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
  .rl-more::after {
    transition: none;
  }

  .rl-card:hover .rl-more::after,
  .rl-card:focus-visible .rl-more::after {
    transform: none;
  }
}

@media (max-width: 559px) {
  .rl {
    padding: 1rem 1rem 1.15rem;
  }

  .rl-card {
    flex-direction: row;
    align-items: stretch;
  }

  .rl-art {
    flex: 0 0 6.25rem;
    aspect-ratio: auto;
    border-block-end: 0;
    border-inline-end: 1px solid var(--rl-line);
  }

  .rl-body {
    padding: 0.65rem 0.75rem;
  }

  
  .rl-more {
    display: none;
  }
}
