/* recently.css - Light Theme */
*{ margin:0; padding:0; box-sizing:border-box; }

:root{
  --header-h: 60px;
  --sidebar-w: 220px;
  --menu-btn-size: 45px;
  --menu-btn-gap: 12px;

  --primary-color: #111c4e;
  --primary-hover: #0e173d;
  --primary-light: #2a3a94;

  --ctrl-bg: #fff;
  --ctrl-border: #e5e7eb;
  --ctrl-text: #111827;
  --ctrl-muted: #6b7280;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.12);

  --list-card-h: 240px;

  --lr-action-h: 48px;
  --lr-action-gap: 18px;
}

body{
  background:#f5f5f5;
  line-height:1.6;
  padding-top: var(--header-h);
  color:#333;
}
.container{ display:flex; min-height: calc(100vh - var(--header-h)); }

.main-content{
  font-family: 'Metropolis', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
               Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  flex:1;
  margin-left: var(--sidebar-w);
  padding:30px;
  background:#f5f5f5;
  transition: margin-left .3s ease;
  -webkit-user-select:text; user-select:text;
}

/* Sidebar active color */
.sidebar .nav-links a.active,
.sidebar .nav-links a.selected{
  background: var(--primary-color);
  color:#fff !important;
  font-weight:700;
}
.sidebar .nav-links a.active i,
.sidebar .nav-links a.selected i{ color:#fff !important; }

/* ===================== HEADER ===================== */
.content-header{
  display:flex; justify-content:space-between; align-items:center;
  margin-bottom:25px; gap:12px; flex-wrap:wrap;
}
.page-title{
  font-size:28px; font-weight:800; color:#1f2937; flex:1 1 auto; min-width:180px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}

/* Controls row */
.action-group{
  display:flex; align-items:center; gap:10px; flex:0 1 auto; margin-left:auto; flex-wrap:wrap;
}
.header-actions{ display:flex; align-items:center; gap:12px; }

/* ===================== SEARCH ===================== */
.search-bar{
  display:flex; align-items:center; gap:8px;
  background:#fff; border:1px solid #e5e7eb; border-radius:10px;
  padding:8px 12px; height:40px; box-shadow:0 2px 6px rgba(0,0,0,.06);
  min-width:220px; width: clamp(220px, 28vw, 420px);
  position: relative;
}
.search-bar i{ color:#6b7280; font-size:14px; }
.search-bar input{
  border:none; outline:none; background:transparent; flex:1; font-size:14px; color:#111827;
}
.clear-search{
  position:absolute; right:6px; top:50%; transform:translateY(-50%);
  width:28px; height:28px; border:none; background:transparent; color:#9ca3af;
  border-radius:8px; display:grid; place-items:center; cursor:pointer;
}
.clear-search:hover{ background:#f3f4f6; color:#6b7280; }

/* ===================== FILTER ===================== */
.filter-group{ position: relative; }

.filter-btn{
  height:40px; border:1px solid var(--ctrl-border);
  border-radius:10px; background:var(--ctrl-bg); color:#374151;
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:0 12px; cursor:pointer; box-shadow: var(--shadow-sm); transition: all .2s ease;
  white-space:nowrap;
}
.filter-btn:hover{ background:#f3f4f6; color:#111827; }
.filter-btn[aria-expanded="true"]{
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(17,28,78,.1);
}
.filter-toggle:hover{ border-color: var(--primary-color); color: var(--primary-color); transform: translateY(-1px); }

.filter-btn .filter-label{
  font-weight:700; font-size:13px; line-height:1; display:inline;
}
.filter-badge{
  display:inline-grid; place-items:center;
  width:20px; height:20px; font-size:12px; font-weight:800; color:#fff;
  background: var(--primary-color); border-radius:999px; margin-left:2px;
  opacity:0; transform: scale(.7); transition: all .18s ease;
}
.filter-badge.is-visible{ opacity:1; transform: scale(1); }

/* Default (desktop popover) */
.filter-panel{
  position:absolute; right:0; top:calc(100% + 8px);
  min-width:320px; max-width:86vw;
  background:#fff; border:1px solid var(--ctrl-border); border-radius:12px;
  box-shadow: var(--shadow-md); padding:12px; z-index: 50;
}
.filter-panel__header{
  display:flex; align-items:center; justify-content:space-between;
  font-weight:800; color:#111827; padding: 4px 2px 10px 2px; border-bottom:1px dashed #e5e7eb;
}
.filter-close{
  width:34px; height:34px; border-radius:8px; border: 1px solid #e5e7eb; background:#fff; cursor:pointer;
  display:grid; place-items:center; color:#6b7280;
}
.filter-close:hover{ background:#f9fafb; color:#374151; }

.filter-section{ padding: 10px 2px; }
.filter-label-h{
  font-size: 12px; text-transform: uppercase; letter-spacing:.12em; font-weight:900; color: var(--primary-color);
  margin-bottom: 8px;
}
.filter-options{ display:flex; flex-wrap: wrap; gap:8px; }
.checkbox-chip{
  display:inline-flex; align-items:center; gap:8px; padding:8px 10px;
  border-radius:999px; border:1px solid #e5e7eb; background:#fff; cursor:pointer; user-select:none;
  transition: all .18s ease; font-weight:700; color:#111827;
}
.checkbox-chip input{
  appearance: none; width:14px; height:14px; border-radius:4px; border:2px solid #9ca3af; display:inline-block; position:relative;
}
.checkbox-chip input:checked{ border-color: var(--primary-color); background: var(--primary-color); }
.checkbox-chip:hover{ transform: translateY(-1px); border-color: var(--primary-color); }
.checkbox-chip span{ font-size:12.5px; }

.filter-actions{
  display:flex; gap:8px; justify-content:flex-end; padding-top: 10px; border-top:1px dashed #e5e7eb;
}
.apply-btn, .reset-btn{
  display:inline-flex; align-items:center; gap:8px; padding:10px 14px; border-radius:10px; font-weight:900; cursor:pointer;
  border:1px solid var(--ctrl-border); background:#fff; color:#111827; transition: all .18s ease;
}
.apply-btn{
  background: var(--primary-color); color:#fff; border-color: var(--primary-color);
  box-shadow: 0 6px 16px rgba(17,28,78,.18);
}
.apply-btn:hover{ background: var(--primary-hover); border-color: var(--primary-hover); transform: translateY(-1px); }
.reset-btn:hover{ border-color: var(--primary-color); color: var(--primary-color); transform: translateY(-1px); }

/* ---------- Mobile floating popover (match screenshot) ---------- */
.filter-backdrop{
  position: fixed; inset: 0; background: rgba(0,0,0,.42);
  z-index: 49; opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.filter-backdrop.show{ opacity: 1; pointer-events: auto; }

@media (max-width: 768px){
  body.filter-sheet-open{ overflow: hidden; }

  /* Turn filter panel into a floating card near the top with rounded corners */
  .filter-panel{
    position: fixed; left: 12px; right: 12px; top: calc(var(--header-h) + 12px);
    bottom: auto; min-width: 0; max-width: none;
    border-radius:16px; padding:14px; max-height:72vh; overflow:auto; -webkit-overflow-scrolling: touch;
    box-shadow: 0 18px 40px rgba(2,6,23,.25);
    transform: translateY(-10px) scale(.98); opacity: 0; pointer-events: none;
    transition: transform .22s ease, opacity .18s ease;
    z-index: 50; /* above backdrop */
    margin-top: 60px;
  }
  .filter-panel.is-open{ transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
  .filter-panel__header{ padding: 6px 2px 12px; }

  /* Compact chips on mobile */
  .checkbox-chip{ padding:7px 9px; }
  .checkbox-chip span{ font-size:12px; }
}

/* ===================== VIEW CONTROLS ===================== */
.view-controls{
  display:flex; align-items:center; gap:4px; background:#fff; 
  border:1px solid #e5e7eb; border-radius:8px; padding:4px;
  box-shadow:0 2px 8px rgba(0,0,0,.1);
  white-space:nowrap;
}
.view-btn{
  display:flex; align-items:center; justify-content:center; 
  width:36px; height:36px; border:none; background:transparent; 
  color:#6b7280; cursor:pointer; border-radius:6px; 
  transition: all .2s ease; font-size:14px;
}
.view-btn:hover{ background:#f3f4f6; color:#374151; }
.view-btn.active{ background: var(--primary-color); color:#fff; }

/* ===================== CONTENT CONTAINER ===================== */
.cards-container{ display:flex; flex-direction:column; gap:16px; }
.no-results{ padding: 8px 2px; color: #4b5563; }
.action-buttons{ display:flex; align-items:center; gap:12px; margin-top:auto; flex-wrap:nowrap; }

/* ===================== LIST VIEW ===================== */
.cards-container.view-list .content-item{
  background:#fff; border-radius:12px; overflow:hidden;
  box-shadow:0 2px 8px rgba(0,0,0,.1);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  border:1px solid #e5e7eb; display:flex; flex-direction:row;
  min-height:140px; position: relative;
}
.cards-container.view-list .content-item::before{
  content:''; position:absolute; top:0; left:0; width:0; bottom:0;
  background: var(--primary-color); transition: width .3s ease; z-index:1;
}
.cards-container.view-list .content-item:hover::before{ width:5px; }
.cards-container.view-list .content-item:hover{
  transform: translateX(5px);
  box-shadow: 0 10px 20px rgba(17, 28, 78, 0.15), 0 6px 6px rgba(17, 28, 78, 0.1);
}
.cards-container.view-list .card-image{
  position:relative; width:220px; min-width:220px; aspect-ratio: 16 / 9;
  display:flex; align-items:center; justify-content:center;
  overflow:hidden; flex-shrink:0; transition: all 0.3s ease;
  background-image: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 50%, #9ca3af 100%);
  background-position:center; background-repeat:no-repeat; background-size:cover;
}
.cards-container.view-list .content-item:hover .card-image{ transform: scale(1.03); }
.cards-container.view-list .content-info{ padding:20px; flex:1; display:flex; flex-direction:column; justify-content:space-between; }
.cards-container.view-list .learn-more-btn{ align-self:flex-start; width:auto; padding:8px 20px; }

@media (min-width: 769px){
  .cards-container.view-list .content-item{ height: var(--list-card-h); }
  .cards-container.view-list .card-image{ height: 100%; aspect-ratio: auto; }
  .cards-container.view-list .content-info{ height: 100%; }
  .cards-container.view-list .content-description{
    /* No line clamp -> show DB spacing fully */
    overflow: hidden; margin-bottom: 12px;
  }
}

/* ===================== GRID VIEW ===================== */
.cards-container.view-grid{
  display:grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap:20px;
}
.cards-container.view-grid .content-item{
  background:transparent; border-radius:12px; overflow:hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor:pointer; position:relative;
}
.cards-container.view-grid .content-item:hover{ transform: translateY(-8px) scale(1.03); }
.cards-container.view-grid .card-image{
  position:relative; aspect-ratio: 16 / 9;
  display:flex; align-items:center; justify-content:center;
  overflow:hidden; border-radius:12px; box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
  background-image: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 50%, #9ca3af 100%);
  background-position: center; background-repeat: no-repeat; background-size: cover;
}
.cards-container.view-grid .content-item:hover .card-image{ box-shadow: 0 12px 30px rgba(17, 28, 78, 0.25); }
.cards-container.view-grid .content-info{ display:none; }

/* NEW: show material title below cover ONLY in grid */
.grid-title{ display:none; }
.cards-container.view-grid .grid-title{
  display:block;
  margin-top:10px;
  padding:0 6px;
  font-size:14px;
  font-weight:600;
  color:#374151;
  text-align:center;
  line-height:1.3;
  overflow:hidden;
  text-overflow:ellipsis;
  display:-webkit-box;
  -webkit-box-orient: vertical;
  --webkit-line-clamp: 2;
  transition: color 0.3s ease;
}
.cards-container.view-grid .content-item:hover .grid-title{ color: var(--primary-color); }

/* ===================== CARDS VIEW ===================== */
.cards-container.view-cards{
  display:grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap:20px;
}
.cards-container.view-cards .content-item{
  background:#fff; border-radius:12px; overflow:hidden;
  box-shadow:0 4px 15px rgba(0,0,0,.1);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  border:1px solid #e5e7eb; display:flex; flex-direction:column; position: relative;
}
.cards-container.view-cards .content-item::before{
  content:''; position:absolute; top:0; left:0; right:0; height:0;
  background: var(--primary-color); transition: height 0.3s ease; z-index: 1;
}
.cards-container.view-cards .content-item:hover::before{ height:5px; }
.cards-container.view-cards .content-item:hover{
  transform: translateY(-8px);
  box-shadow: 0 14px 28px rgba(0,0,0,0.15), 0 10px 10px rgba(0,0,0,0.1);
}
.cards-container.view-cards .card-image{
  position:relative; aspect-ratio: 16 / 9;
  display:flex; align-items:center; justify-content:center;
  overflow:hidden; flex-shrink:0; transition: all 0.3s ease;
  background-image: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 50%, #9ca3af 100%);
  background-position: center; background-repeat: no-repeat; background-size: cover;
}
.cards-container.view-cards .content-item:hover .card-image{ transform: scale(1.05); }
.cards-container.view-cards .content-info{ padding:16px; flex:1; display:flex; flex-direction:column; }

/* ===== DB spacing + justified text for ALL descriptions ===== */
.content-description{
  font-size:14px; color:#4b5563; line-height:1.5; margin-bottom:12px; flex:1;
  white-space: pre-wrap;         /* preserve DB spaces & line breaks */
  text-align: justify; 
  text-justify: inter-word;
  overflow-wrap: anywhere;       /* avoid overflow on long tokens */
}

/* Scrollbar when needed in cards view only */
.cards-container.view-cards .content-description{ max-height: 200px; overflow: auto; padding-right: 4px; }
.cards-container.view-cards .content-description::-webkit-scrollbar{ width: 6px; }
.cards-container.view-cards .content-description::-webkit-scrollbar-thumb{ background: #e5e7eb; border-radius: 999px; }

/* ===================== IMAGE PLACEHOLDER ===================== */
.image-placeholder{
  width:100%; height:100%; display:flex; align-items:center; justify-content:center;
  color:#6b7280; font-size:2.5rem;
  background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 50%, #9ca3af 100%);
}
.card-image.has-thumb .image-placeholder{ display:none; }

/* ===================== TEXT ===================== */
.meta-row{ display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.meta-row .tag{ padding:4px 8px; border-radius:999px; background:#e5e7eb; color:#374151; font-size:11px; font-weight:700; letter-spacing:.2px; text-transform:uppercase; }
.meta-row .dot{ color:#6b7280; font-weight:700; font-size:12px; }
.meta-row .date{ color:#6b7280; font-size:12px; font-weight:600; }
.generic-tag{ background:#eef2ff !important; color:#1d4ed8 !important; }
.content-title{ font-size:18px; font-weight:800; color:#1f2937; margin-bottom:4px; letter-spacing:.2px; transition: color 0.3s ease; }
.cards-container.view-cards .content-item:hover .content-title,
.cards-container.view-list .content-item:hover .content-title{ color: var(--primary-color); }

/* ===================== BUTTONS ===================== */
.learn-more-btn,
.learn-more-btn:link,
.learn-more-btn:visited{
  background:var(--primary-color); color:#fff;
  padding:10px 24px; border:none; border-radius:6px;
  font-size:13px; font-weight:700; cursor:pointer; width:100%;
  transition: all .3s ease; letter-spacing:.3px;
  margin-top:auto; position:relative; overflow:hidden; z-index:1; text-decoration:none;
  display:inline-flex; align-items:center; justify-content:center; text-align:center; gap:8px;
}
.learn-more-btn::before{
  content:''; position:absolute; top:0; left:-100%; width:100%; height:100%;
  background:var(--primary-hover); transition:all .4s ease; z-index:-1;
}
.learn-more-btn:hover::before{ left:0; }
.learn-more-btn:hover{ transform:translateY(-2px); box-shadow:0 4px 12px rgba(17,28,78,.3); }

.details-btn{
  display:none; background:#fff; color:#111827;
  padding:10px 20px; border:1px solid #e5e7eb; border-radius:6px;
  font-size:13px; font-weight:700; cursor:pointer; transition:all .2s ease; letter-spacing:.3px;
  align-items:center; justify-content:center; gap:8px;
}
.details-btn:hover{ background:#f8fafc; border-color:#d1d5db; box-shadow:0 2px 8px rgba(0,0,0,.06); color:#111c4e; }

/* ===================== IMAGE EFFECTS ===================== */
.card-image{ background:#0b0b0b; position:relative; }
.card-image.has-thumb::before{
  content:""; position:absolute; inset:0; z-index:0;
  background-image: var(--thumb); background-position:center; background-repeat:no-repeat; background-size:cover;
  filter: blur(24px) saturate(1.05) brightness(.92);
  transform: scale(1.2); pointer-events:none;
}
.card-image::after{
  content:""; position:absolute; inset:0; z-index:1;
  background: linear-gradient(90deg, rgba(0,0,0,.26), transparent 18%, transparent 82%, rgba(0,0,0,.26));
  pointer-events:none;
}
.card-image > img{
  position:relative; z-index:2;
  width:100%; height:100%; object-fit:contain; object-position:center; display:block;
}

/* ===================== RECOMMENDED BADGE ===================== */
.badge-recommended{
  position:absolute; top:10px; right:10px; z-index:5;
  background: var(--primary-color); color:#fff;
  padding:6px 12px; border-radius:999px;
  font-size:11px; font-weight:800; letter-spacing:.3px; text-transform:uppercase;
  box-shadow:0 6px 16px rgba(0,0,0,.15);
  pointer-events:none; user-select:none;
  display:inline-flex; align-items:center; gap:8px;
}
.badge-recommended i{ display:none; font-size:14px; line-height:1; }
.badge-recommended .label{ display:inline; }
.cards-container.view-grid .badge-recommended,
.cards-container.view-cards .badge-recommended{ padding:8px; border-radius:50%; }
.cards-container.view-grid .badge-recommended .label,
.cards-container.view-cards .badge-recommended .label{ display:none; }
.cards-container.view-grid .badge-recommended i,
.cards-container.view-cards .badge-recommended i{ display:block; }

/* ===================== PAGINATION ===================== */
.pagination-outer{ width:100%; display:flex; justify-content:center; margin-top: 18px; }
.pagination-inner{
  display:flex; align-items:center; gap:14px; padding:8px 14px;
  background:#fff; border:1px solid #e5e7eb; border-radius:14px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.08); max-width:100%; overflow-x:auto;
}
.pagination-inner::-webkit-scrollbar{ height:8px; }
.pagination-inner::-webkit-scrollbar-thumb{ background:#e5e7eb; border-radius:999px; }
.pagination-inner .nav-btn, .pagination-inner .page-btn{
  min-width:36px; height:36px; padding:0 10px; border:none; background:transparent; color:#111827;
  border-radius:10px; font-weight:800; cursor:pointer; display:flex; align-items:center; justify-content:center; transition: all .2s ease;
}
.pagination-inner .page-btn:hover, .pagination-inner .nav-btn:hover{ background:#f3f4f6; }
.pagination-inner .page-btn.active{ background: var(--primary-color); color:#fff; box-shadow: 0 6px 16px rgba(17,28,78,0.25); }
.pagination-inner .nav-btn[disabled]{ opacity:.35; cursor:not-allowed; pointer-events:none; }

/* ===================== SWEETALERT ===================== */
.swal2-container .swal2-popup{ font-family:'Metropolis', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif; }
.lr-swal{
  position:relative; width:min(860px, 92vw) !important; max-width:100%;
  border-radius:16px; padding:18px 18px calc(var(--lr-action-h) + var(--lr-action-gap) + env(safe-area-inset-bottom, 0px));
  background:#ffffff; box-shadow:0 28px 70px rgba(2,6,23,.28); max-height:86vh; display:flex; flex-direction:column; overflow:hidden;
}
.lr-swal::before{ content:""; position:absolute; left:0; right:0; top:0; height:4px; background: linear-gradient(90deg, var(--primary-color), #2c3e50); border-top-left-radius:16px; border-top-right-radius:16px; }
.lr-swal--show{ animation: lr-pop .18s ease-out; }
.lr-swal--hide{ animation: lr-fade .14s ease-in; }
.swal2-container{ backdrop-filter: blur(2px); }
.swal2-close, .lr-swal__close{ display:none !important; }
.lr-swal .swal2-html-container{ margin:0 !important; padding:0 !important; overflow:auto; flex:1 1 auto; box-sizing:border-box; padding-bottom: calc(var(--lr-action-h) + var(--lr-action-gap)); }

.lrm{ display:grid; grid-template-columns:1fr; grid-template-areas:"media" "content"; gap:14px; align-items:start; min-height:0; }
.lrm__media{ grid-area: media; border-radius:18px; overflow:hidden; background:#f1f5f9; display:flex; align-items:center; justify-content:center; margin-top:12px; }
.lrm__media img{ width:100%; aspect-ratio:16/9; object-fit:cover; display:block; border-radius:inherit; }
.lrm__content{ grid-area: content; }
.lrm__header{ display:flex; align-items:center; gap:10px; margin:10px 0 8px; }
.lrm__icon{ width:38px; height:38px; border-radius:10px; display:grid; place-items:center; color:var(--primary-color); background:#f7f9ff; border:1px solid #e8eefc; flex:0 0 auto; }
.lrm__title{ font-size:20px; font-weight:900; color:#0f172a; margin:0; line-height:1.25; }
.lrm-chips{ display:flex; flex-wrap:wrap; gap:8px; margin:6px 0 10px; }
.lrm-chip{ display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border-radius:999px; background:#EEF2FF; color:#1E3A8A; font-size:12px; font-weight:800; letter-spacing:.3px; text-transform:uppercase; }
.lrm__section-title{ font-size:12px; font-weight:900; text-transform:uppercase; letter-spacing:.14em; color:var(--primary-color); margin:20px 0 6px; opacity:.95; }

/* DB spacing + justified text in modal description (using <pre>) */
.lrm__desc{
  color:#334155; line-height:1.68; font-size:15px;
  max-height:min(58vh,520px); overflow:auto; padding-right:6px;
  scrollbar-width:thin; scrollbar-color:#c7cdd7 transparent;
  white-space: pre-wrap;        /* preserve spaces & newlines */
  text-align: justify; text-justify: inter-word;
  overflow-wrap: anywhere; font-family: inherit; margin: 0;
}
.lrm__desc::-webkit-scrollbar{ width:8px; } 
.lrm__desc::-webkit-scrollbar-thumb{ background:#c7cdd7; border-radius:8px; }

/* Fixed footer Close button */
.lr-swal .swal2-actions{
  position:absolute; left:0; right:0; bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  display:flex; justify-content:center; gap:0; padding: var(--lr-action-gap) 18px 0; margin:0;
  background: linear-gradient(180deg, rgba(255,255,255,0), #fff 60%); border-bottom-left-radius:16px; border-bottom-right-radius:16px;
}
.lr-swal__confirm{
  display:inline-flex !important; align-items:center; justify-content:center;
  background:var(--primary-color) !important; color:#fff !important; font-weight:900 !important;
  border-radius:12px !important; border:1px solid var(--primary-color) !important; padding:12px 22px !important;
  min-height:var(--lr-action-h) !important; box-shadow:0 10px 20px rgba(17,28,78,.25) !important;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px){
  .cards-container.view-cards{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ----- MOBILE controls & layout ----- */
@media (max-width: 768px){
  body{ padding-top: var(--header-h); }
  .main-content{
    margin-left:0; padding:20px 15px;
    padding-top: calc(20px + var(--menu-btn-gap) + var(--menu-btn-size) + 8px);
  }

  .content-header{ gap:10px; margin-bottom:18px; align-items:flex-start; }
  .page-title{ font-size:22px; }

  .action-group{
    width:100%;
    display:flex; align-items:center; gap:8px;
    flex-wrap:nowrap; white-space:nowrap;
  }
  .header-actions{ flex:0 1 auto; min-width:0; display:flex; align-items:center; gap:8px; }
  .search-bar{ flex:0 1 clamp(155px, 52vw, 220px); min-width:0; width:auto; }
  .filter-btn .filter-label{ display:none; }

  .view-controls{
    order:2; flex:0 0 auto; margin-left:2px; white-space:nowrap; padding:4px; gap:4px;
  }
  .view-controls .view-btn[data-view="list"]{ display:none; }

  .cards-container.view-grid{ grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap:12px; }
  .cards-container.view-cards{ grid-template-columns: repeat(2, minmax(0, 1fr)); gap:15px; }
  .cards-container.view-list .content-item{ flex-direction:column; min-height:auto; height:auto; }
  .cards-container.view-list .card-image{ width:100%; aspect-ratio: 16 / 9; height:auto; }

  .cards-container.view-list .content-description,
  .cards-container.view-cards .content-description{ display:none; }
  .details-btn{ display:inline-flex; }
  .cards-container.view-list .learn-more-btn,
  .cards-container.view-cards .learn-more-btn{ width:auto; }

  .lr-swal{ width:min(94vw, 540px) !important; max-height: 78vh; }
  .lrm__media{ margin-top:14px; }
  .lrm__media img{ width:auto; max-width:100%; height:auto; max-height:28vh; object-fit:contain; }
  .lrm__desc{ font-size:14.5px; max-height: 24vh; }
}

@media (max-width:480px){
  .cards-container.view-grid{ grid-template-columns:1fr 1fr; gap:10px; }
  .cards-container.view-cards{ grid-template-columns:1fr; gap:12px; }
  .main-content{ padding-left:10px; padding-right:10px; }
  .content-header{ margin-bottom:16px; }
  .page-title{ font-size:20px; }
  .view-btn{ width:32px; height:32px; font-size:13px; }

  .lr-swal{
    padding:14px 14px calc(var(--lr-action-h) + var(--lr-action-gap) + env(safe-area-inset-bottom, 0px));
    border-radius:14px;
  }
  .lrm{ gap:12px; }
  .lrm__media{ border-radius:16px; margin-top:12px; }
  .lrm__media img{ max-height:24vh; }
  .lrm__header{ gap:8px; margin:6px 0 6px; }
  .lrm__icon{ width:32px; height:32px; border-radius:8px; }
  .lrm__title{ font-size:18px; }
  .lrm-chip{ font-size:11px; padding:4px 8px; }
  .lrm__section-title{ font-size:11px; margin:14px 0 6px; }
  .lrm__desc{ font-size:13px; line-height:1.55; max-height: 22vh; }
  .lr-swal__confirm{
    padding:10px 18px !important; border-radius:10px !important; min-height:40px !important;
    box-shadow:0 8px 16px rgba(17,28,78,.22) !important; font-size:14px !important;
  }
}

/* Animations */
@keyframes lr-pop { from { opacity:0; transform: scale(.96) translateY(8px); } to { opacity:1; transform: scale(1) translateY(0); } }
@keyframes lr-fade{ from { opacity:1; transform: scale(1); } to { opacity:0; transform: scale(.98); } }

/* (repeat) ensure header action-group layout stable */
.action-group{ display:flex; align-items:center; gap:10px; margin-left:auto; flex:0 1 auto; flex-wrap:wrap; }
