/* =========================================================
   Theme for layouts.frontLayout.front_design (CSS-only)
   Brand: #50BFB6
   ========================================================= */

/* ---- Tokens ---- */
:root{
  --brand:#50BFB6;
  --ink:#0f172a;          /* dark text */
  --ink-2:#334155;        /* secondary text */
  --muted:#64748b;
  --bg:#fbfbf9;           /* soft background */
  --card:#ffffff;
  --line:#e5e7eb;         /* light border */
  --shadow:0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.05);
  --max:1180px;
  --radius:12px;
  --gap:28px;
  --font:"Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:var(--font);
  background:var(--bg);
  color:var(--ink);
  line-height:1.7;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* ---- Links & buttons ---- */
a{color:#0b6f68;text-decoration:none}
a:hover{color:var(--brand);text-decoration:underline;text-underline-offset:.15em}

.btn,.button{
  display:inline-block;border:1px solid var(--line);background:#fff;color:var(--ink);
  padding:.55rem 1rem;font-weight:600;border-radius:8px;box-shadow:var(--shadow);
  transition:transform .08s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover,.button:hover{background:var(--brand);color:#fff;transform:translateY(-1px)}

/* ---- Header / Nav ---- */
.site-header{background:#fff;border-bottom:1px solid var(--line)}
.wrap{max-width:var(--max);margin-inline:auto;padding:0 20px}
.head-wrap{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:16px 0}

.site-title{margin:0;line-height:1}
.site-title a{font-size:clamp(26px,3.2vw,36px);font-weight:800;letter-spacing:.2px;color:#5ec9c1}
.site-title a:hover{color:var(--brand)}

.site-nav{display:flex;gap:26px;flex-wrap:wrap;align-items:center}
.site-nav a{
  color:var(--ink);font-weight:700;text-decoration:none;padding-bottom:.45rem;
  border-bottom:3px solid transparent;transition:color .15s ease, border-color .15s ease;
}
.site-nav a:hover,
.site-nav a[aria-current="page"],
.site-nav .active > a{
  color:#0b6f68;border-color:var(--brand);
}

/* thin accent under header */
.brand-bar{height:3px;background:var(--brand)}

/* mobile toggle only on small screens */
.nav-toggle{display:none;background:none;border:0;font-size:1.4rem}
@media (max-width:860px){
  .nav-toggle{display:block}
  .site-nav{display:none;flex-direction:column;gap:12px;padding:10px 0}
  .site-nav.open{display:flex}
}

/* ---- Main grid (3 columns) ---- */
.grid{
  display:grid;
  grid-template-columns:1fr 2fr 1fr; /* left | middle | right */
  gap:var(--gap);
  padding:24px 0 40px;
}

/* sidebars */
.lbar,.rbar{display:flex;flex-direction:column;gap:20px}

/* cards / widgets */
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:16px 18px;
  box-shadow:var(--shadow);
}
.card h3{
  margin:0 0 10px;font-weight:800;color:var(--ink);
  border-bottom:2px solid var(--brand);padding-bottom:.35rem
}
.stack{list-style:disc;padding-left:18px;margin:0}

/* ---- Post list (middle column) ---- */
.post-list{display:flex;flex-direction:column;gap:28px}
.post-list .post,
.post-list article{
  background:#fff;border:1px solid var(--line);border-radius:var(--radius);
  padding:18px 20px;box-shadow:var(--shadow)
}
.post-list h2{margin:0 0 6px;font-weight:800;color:#0e6d66;font-size:clamp(22px,2.1vw,28px)}
.post-list h2 a{color:inherit;text-decoration:none}
.post-list h2 a:hover{color:var(--brand)}
.post-list .meta{color:var(--muted);font-size:.95rem;margin:2px 0 8px}

.post-list img{
  max-width:100%;height:auto;display:block;border-radius:12px;border:1px solid var(--line);
  margin:12px 0 10px;box-shadow:0 2px 12px rgba(0,0,0,.06)
}

/* ---- Footer ---- */
.site-footer{border-top:1px solid var(--line);text-align:center;padding:18px 0;margin-top:24px;color:#576176}

/* ---- Responsive ---- */
@media (max-width:1020px){
  .grid{grid-template-columns:1fr;gap:22px}
  .lbar,.rbar{order:2}
  .post-list{order:1}
}

/* =========================================================
   PATCH: Sidebar book thumbnails inside LEFT "Now" card only
   (scoped tightly to avoid side effects)
   ========================================================= */

/* Frame for the book image coming from @forelse($books as $book) */
.lbar .card .textwidget.custom-html-widget{
  aspect-ratio: 3 / 2;      /* change to 2/3 if you prefer a tall book-cover look */
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  margin-bottom: 0.75rem;   /* space below the thumbnail */
  background: #fafafa;
}

/* Make the image fill the frame without distortion (no global img changes) */
.lbar .card .textwidget.custom-html-widget a{
  display:block; width:100%; height:100%;
}
.lbar .card .textwidget.custom-html-widget img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;         /* crop neatly to the frame */
  border-radius:12px;
  transition:transform .2s ease;
}
.lbar .card .textwidget.custom-html-widget img:hover{
  transform:scale(1.02);
}

/* Optional portrait modifier if needed */
.lbar .card .textwidget.custom-html-widget.is-portrait{
  aspect-ratio: 2 / 3;
}
/* =========================================================
   PATCH: Pagination (Bootstrap/Laravel links) – reset & style
   ========================================================= */

/* Layout & reset */
.pagination,
nav .pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 22px 0 10px;
  padding: 0;
  list-style: none;            /* kill bullets */
}

.pagination li,
nav .pagination li {
  list-style: none;            /* double-kill bullets from any resets */
}

/* Links & buttons */
.pagination .page-link,
.pagination li > a,
.pagination li > span {
  display: inline-block;
  min-width: 36px;
  padding: 8px 12px;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .08s ease;
}

.pagination .page-link:hover,
.pagination li > a:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  transform: translateY(-1px);
  text-decoration: none;
}

/* Active page */
.pagination .active .page-link,
.pagination li.active > a,
.pagination li > span[aria-current="page"] {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  pointer-events: none;
}

/* Disabled (prev/next at edges) */
.pagination .disabled .page-link,
.pagination li.disabled > span,
.pagination li.disabled > a {
  opacity: .45;
  pointer-events: none;
}

/* Make ellipsis look tidy */
.pagination .page-item.disabled .page-link[aria-label="…"],
.pagination li.disabled > span:contains("…") {
  border-style: dashed;
}

/* Optional: keep it aligned with cards */
.post-list + nav .pagination,
.post-list + .pagination {
  margin-top: 8px;
}
