@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600&display=swap');

/* =====================
   GRID
===================== */
.aura-portfolio-grid,
.aura-skeleton-grid{
  display:grid;
  /* Default = 3 columns on normal desktops */
  grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
  gap:24px;
}

/* 1 col on mobile */
@media (max-width: 767px){
  .aura-portfolio-grid,
  .aura-skeleton-grid{ grid-template-columns:repeat(1, minmax(0,1fr)) !important; }
}

/* 2 cols on tablets / small laptops */
@media (min-width: 768px) and (max-width: 1099px){
  .aura-portfolio-grid,
  .aura-skeleton-grid{ grid-template-columns:repeat(2, minmax(0,1fr)) !important; }
}

/* 3 cols on normal desktops */
@media (min-width: 1100px) and (max-width: 1499px){
  .aura-portfolio-grid,
  .aura-skeleton-grid{ grid-template-columns:repeat(3, minmax(0,1fr)) !important; }
}

/* 4 cols only on large desktop 1500px+ */
@media (min-width: 1500px){
  .aura-portfolio-grid,
  .aura-skeleton-grid{ grid-template-columns:repeat(4, minmax(0,1fr)) !important; }
}

/* =====================
   CARD (YOUR DESIGN)
   Scoped to plugin wrapper to avoid conflicts
===================== */
.aura-portfolio-grid-wrap .mqc-card{
  width:100%;
  font-family:'Montserrat',system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif !important;
}

.aura-portfolio-grid-wrap,
.aura-portfolio-toolbar{
  font-family:'Montserrat',system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif !important;
}

.aura-portfolio-grid-wrap .mqc-media{
  width:100%;
  overflow:hidden;
  position:relative;
  /* Robust sizing across iOS/embedded browsers (avoid 0-height cards) */
  height:0;
  padding-top:100%;
}

/* Disable older pseudo-fallback (we use padding-top on the container itself) */
.aura-portfolio-grid-wrap .mqc-media::before{ content:none !important; }

.aura-portfolio-grid-wrap .mqc-media img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .35s ease;
}

.aura-portfolio-grid-wrap .mqc-overlay-link{
  position:absolute;
  inset:0;
  display:block;
  text-decoration:none;
  z-index:2;
}

/* Grid behavior: overlay appears on hover */
.aura-portfolio-grid-wrap .mqc-min-overlay{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  padding:18px 20px 20px;
  background:linear-gradient(
    to top,
    rgba(0,0,0,.65) 0%,
    rgba(0,0,0,.35) 40%,
    rgba(0,0,0,0) 100%
  );
  opacity:0;
  transition:opacity .25s ease;
  pointer-events:none;
}

.aura-portfolio-grid-wrap .mqc-card:hover .mqc-min-overlay{
  opacity:1;
  pointer-events:auto;
}

.aura-portfolio-grid-wrap .mqc-card:hover .mqc-media img{
  transform:scale(1.05);
}

.aura-portfolio-grid-wrap .mqc-tags{
  display:flex;
  gap:6px;
  margin-bottom:8px;
  flex-wrap:wrap;
}

.aura-portfolio-grid-wrap .mqc-tag{
  font-family:Montserrat,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  font-size:10px;
  font-weight:500;
  color:#fff;
  background:rgba(255,255,255,.18);
  padding:7px 10px;
  border-radius:0px;
  line-height:1;
}

.aura-portfolio-grid-wrap .mqc-title-row{
  display:flex;
  align-items:center;
  gap:8px;
}

.aura-portfolio-grid-wrap .mqc-title{
  font-family:Montserrat,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif !important;
  font-size:20px;
  font-weight:600;
  color:#fff;
  margin:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.aura-portfolio-grid-wrap .mqc-arrow{
  width:18px;
  fill:#fff;
  transition:transform .35s ease;
  flex:0 0 auto;
}

.aura-portfolio-grid-wrap .mqc-card:hover .mqc-arrow{
  transform:translateX(3px);
}

@media (max-width: 768px){
  .aura-portfolio-grid-wrap .mqc-title{font-size:18px;}
}

/* =====================
   FILTER BAR (MATCH SCREENSHOT)
   - Full-width: left aligned filters, right aligned sort
   - Light, minimal buttons with checkmark when selected
   - Modern popup panel
===================== */
.aura-portfolio-toolbar{
  font-family:'Montserrat',system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif !important;
  width:100% !important;
  max-width:none !important;
  display:flex !important;
  align-items:center;
  justify-content:space-between !important;
  gap:14px;
  position:relative;
  z-index:10;
}

/* Consistent button sizing + subtle hover darken (no theme yellow) */
.aura-portfolio-toolbar{
  --aura-btn-h: 42px;
  --aura-btn-bg: #fff;
  --aura-btn-bg-hover: #f2f2f2;
  --aura-btn-bd: #bdbdbd;
  --aura-btn-fg: #2b2b2b;
}

.aura-portfolio-toolbar__left{
  display:flex !important;
  align-items:center;
  gap:12px;
  flex:1 1 auto;
  min-width:0;
}

.aura-portfolio-toolbar__right{
  display:flex !important;
  align-items:center;
  justify-content:flex-end;
  flex:0 0 auto;
  margin-left:auto !important;
}

/* Filter toggle button */
.aura-filter-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:10px 14px;
  border:1px solid var(--aura-btn-bd) !important;
  border-radius:0 !important;
  background:var(--aura-btn-bg) !important;
  color:var(--aura-btn-fg) !important;
  font-family:'Montserrat',system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif !important;
  font-size:13px;
  cursor:pointer;
  letter-spacing:.1px;
  min-height:var(--aura-btn-h);
}

.aura-filter-toggle:hover,
.aura-filter-toggle:focus,
.aura-filter-toggle:active{
  background:var(--aura-btn-bg-hover) !important;
  color:var(--aura-btn-fg) !important;
  border-color:var(--aura-btn-bd) !important;
  box-shadow:none !important;
  outline:none !important;
}

/* Lucide SVG icons (in markup) */
.aura-filter-toggle__icon,
.aura-sort__icon{
  width:18px;
  height:18px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  opacity:.9;
}

.aura-lucide{
  width:18px;
  height:18px;
  stroke:#2b2b2b;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
  fill:none;
}

/* Active filter chips */
.aura-active-filters{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  min-width:0;
}

.aura-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border:1px solid var(--aura-btn-bd) !important;
  border-radius:0 !important;
  background:var(--aura-btn-bg) !important;
  color:var(--aura-btn-fg) !important;
  font-family:'Montserrat',system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif !important;
  font-size:13px;
  letter-spacing:.1px;
  cursor:pointer;
  min-height:var(--aura-btn-h);
}

.aura-chip:hover,
.aura-chip:focus,
.aura-chip:active{
  background:var(--aura-btn-bg-hover) !important;
  color:var(--aura-btn-fg) !important;
  border-color:var(--aura-btn-bd) !important;
  box-shadow:none !important;
  outline:none !important;
}

.aura-chip__icon{
  width:auto;
  height:auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:0;
  font-size:14px;
  line-height:1;
  margin-right:2px;
}
.aura-chip .aura-chip__icon::before{content:'✓';}

/* Sort control styled to match */
.aura-sort-wrap{
  display:flex;
  align-items:center;
  gap:10px;
}

.aura-sort-label{
  display:none; /* keep UI minimal; label is still present in markup for accessibility */
}

.aura-sort-control{
  position:relative;
  display:inline-flex;
  align-items:center;
}

/* Faux button label (matches the Project Filter button style) */
.aura-sort-faux{
  display:inline-flex;
  align-items:center;
  gap:14px;
  padding:10px 38px 10px 14px;
  border:1px solid var(--aura-btn-bd) !important;
  border-radius:0 !important;
  background:var(--aura-btn-bg) !important;
  color:var(--aura-btn-fg) !important;
  font-family:'Montserrat',system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif !important;
  font-size:13px;
  letter-spacing:.1px;
  line-height:1;
  white-space:nowrap;
  min-height:var(--aura-btn-h);
}

.aura-sort__icon{
  position:absolute;
  right:14px;
  pointer-events:none;
}

.aura-sort{
  /* Keep the real select for logic, but make it act like a clickable overlay */
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  opacity:0;
  cursor:pointer;
}

.aura-sort:hover,
.aura-sort:focus,
.aura-sort:active{
  background:transparent !important;
  color:var(--aura-btn-fg) !important;
  border-color:var(--aura-btn-bd) !important;
  box-shadow:none !important;
  outline:none !important;
}

/* Apply hover to the visible faux button when select is hovered */
.aura-sort-control:hover .aura-sort-faux,
.aura-sort-control:focus-within .aura-sort-faux{
  background:var(--aura-btn-bg-hover) !important;
  border-color:var(--aura-btn-bd) !important;
}

.aura-sort option{color:#111;}

/* Panel */
.aura-filter-panel{
  position:absolute;
  left:0;
  top:52px;
  width:min(860px,100%);
  border:1px solid #d6d6d6;
  background:#fff;
  box-shadow:0 12px 40px rgba(0,0,0,.12);
  padding:16px;
  border-radius:10px;
}

.aura-filter-panel__inner{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:14px;
}

.aura-filter-group{
  border:1px solid #e3e3e3;
  padding:14px;
  border-radius:10px;
}

.aura-filter-group__title{
  color:#2b2b2b;
  font-size:12px;
  font-weight:600;
  margin-bottom:10px;
}

.aura-filter-group__options{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.aura-filter-option{
  border:1px solid var(--aura-btn-bd) !important;
  background:var(--aura-btn-bg) !important;
  color:var(--aura-btn-fg) !important;
  padding:10px 12px;
  font-size:12px;
  cursor:pointer;
  letter-spacing:.1px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  border-radius:0 !important;
  min-height:var(--aura-btn-h);
}

.aura-filter-option:hover,
.aura-filter-option:focus,
.aura-filter-option:active{
  background:var(--aura-btn-bg-hover) !important;
  color:var(--aura-btn-fg) !important;
  border-color:var(--aura-btn-bd) !important;
  box-shadow:none !important;
  outline:none !important;
}

.aura-filter-option::before{
  content:'';
  width:14px;
  height:14px;
  border:1px solid #bdbdbd;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  line-height:1;
}

.aura-filter-option.is-active{
  border-color:#2b2b2b;
}
.aura-filter-option.is-active::before{
  content:'✓';
  border-color:#2b2b2b;
}

.aura-filter-panel__footer{
  grid-column:1 / -1;
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-top:8px;
}

.aura-clear-all,
.aura-close-panel{
  border:1px solid var(--aura-btn-bd) !important;
  border-radius:0 !important;
  background:var(--aura-btn-bg) !important;
  color:var(--aura-btn-fg) !important;
  padding:10px 14px;
  font-size:12px;
  cursor:pointer;
  letter-spacing:.1px;
  border-radius:0 !important;
  min-height:var(--aura-btn-h);
}

.aura-clear-all:hover,
.aura-clear-all:focus,
.aura-clear-all:active,
.aura-close-panel:hover,
.aura-close-panel:focus,
.aura-close-panel:active{
  background:var(--aura-btn-bg-hover) !important;
  color:var(--aura-btn-fg) !important;
  border-color:var(--aura-btn-bd) !important;
  box-shadow:none !important;
  outline:none !important;
}

/* Responsive toolbar: allow wrap on small screens */
@media (max-width: 767px){
  .aura-portfolio-toolbar{flex-wrap:wrap;}
  .aura-portfolio-toolbar__right{width:100%; justify-content:flex-start;}
  .aura-sort-wrap{width:100%; justify-content:space-between;}

  /* Mobile only: keep active tags checked inside the filter panel,
     but don't show the chips next to the filter button */
  .aura-active-filters{display:none !important;}
}

/* Mobile filter panel usability: avoid horizontal overflow and allow scrolling */
@media (max-width: 767px){
  .aura-filter-panel{
    position:fixed;
    left:15px;
    right:15px;
    top:80px;
    width:auto;
    max-height:calc(100vh - 120px);
    overflow:hidden;
    z-index:9999;
  }

  .aura-filter-panel__inner{
    grid-template-columns:1fr;
    max-height:calc(100vh - 180px);
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
  }
}

/* =====================
   SKELETON (MATCH CARD LAYOUT)
   Note: JS outputs aura-skel-* classes. We support both.
===================== */
.aura-skeleton-card,
.aura-skel-card{
  position:relative;
  overflow:hidden;
  border:1px solid #e3e3e3;
  background:#fff;
}

.aura-skeleton-media,
.aura-skel-media{
  position:relative;
  aspect-ratio:1/1;
}

.aura-skeleton-media::before,
.aura-skel-img{
  content:'';
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.04);
}

.aura-skeleton-overlay,
.aura-skel-overlay{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  padding:18px 20px 20px;
  background:linear-gradient(to top, rgba(0,0,0,.12) 0%, rgba(0,0,0,.06) 40%, rgba(0,0,0,0) 100%);
}

.aura-skeleton-tags,
.aura-skel-tags{
  display:flex;
  gap:6px;
  margin-bottom:8px;
  flex-wrap:wrap;
}

.aura-skeleton-tag,
.aura-skel-tag{
  height:24px;
  width:64px;
  background:rgba(0,0,0,.06);
}

.aura-skeleton-title-row,
.aura-skel-title-row{
  display:flex;
  align-items:center;
  gap:8px;
}

.aura-skeleton-title,
.aura-skel-title{
  height:18px;
  width:70%;
  background:rgba(0,0,0,.06);
}

.aura-skeleton-arrow,
.aura-skel-arrow{
  height:18px;
  width:18px;
  background:rgba(0,0,0,.06);
}

/* shimmer */
.aura-skeleton-card::after,
.aura-skel-card::after{
  content:'';
  position:absolute;
  inset:0;
  transform:translateX(-100%);
  background:linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.06) 50%, rgba(0,0,0,0) 100%);
  animation:auraShimmer 1.1s infinite;
}

@keyframes auraShimmer{100%{transform:translateX(100%);}}

/* Fallback empty */
.aura-empty{padding:18px;border:1px solid rgba(255,255,255,.10);color:#fff;}
.aura-img-fallback{position:absolute;inset:0;background:rgba(255,255,255,.04);}

/* JS skeleton uses aura-skel-* classes; keep CSS compatible without touching logic */
.aura-skel-media{position:relative;aspect-ratio:1/1;}
.aura-skel-img{position:absolute;inset:0;background:rgba(0,0,0,.06);}
.aura-skel-overlay{position:absolute;left:0;right:0;bottom:0;padding:18px 20px 20px;background:linear-gradient(to top, rgba(0,0,0,.10) 0%, rgba(0,0,0,.06) 40%, rgba(0,0,0,0) 100%);} 
.aura-skel-tags{display:flex;gap:6px;margin-bottom:8px;flex-wrap:wrap;}
.aura-skel-tag{height:24px;width:64px;background:rgba(0,0,0,.08);}
.aura-skel-title-row{display:flex;align-items:center;gap:8px;}
.aura-skel-title{height:18px;width:70%;background:rgba(0,0,0,.08);} 
.aura-skel-arrow{height:18px;width:18px;background:rgba(0,0,0,.08);} 

/* Hard overrides against theme/Elementor button hover (stop yellow) */
.aura-portfolio-toolbar .aura-clear-all:hover,
.aura-portfolio-toolbar .aura-clear-all:focus,
.aura-portfolio-toolbar .aura-clear-all:active,
.aura-portfolio-toolbar .aura-close-panel:hover,
.aura-portfolio-toolbar .aura-close-panel:focus,
.aura-portfolio-toolbar .aura-close-panel:active,
.aura-portfolio-toolbar .aura-filter-toggle:hover,
.aura-portfolio-toolbar .aura-filter-toggle:focus,
.aura-portfolio-toolbar .aura-filter-toggle:active,
.aura-portfolio-toolbar .aura-chip:hover,
.aura-portfolio-toolbar .aura-chip:focus,
.aura-portfolio-toolbar .aura-chip:active,
.aura-portfolio-toolbar .aura-sort-control:hover,
.aura-portfolio-toolbar .aura-sort-control:focus,
.aura-portfolio-toolbar .aura-sort-control:active,
.aura-portfolio-toolbar .aura-filter-option:hover,
.aura-portfolio-toolbar .aura-filter-option:focus,
.aura-portfolio-toolbar .aura-filter-option:active{
  background: var(--aura-btn-bg-hover) !important;
  border-color: var(--aura-btn-bd) !important;
  color: var(--aura-btn-fg) !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Ensure grid is never collapsed to 0 height on live */
.aura-portfolio-grid-wrap{min-height: 30px;}
.aura-portfolio-grid{
  display:grid !important;
  gap:15px !important;
  row-gap:15px !important;
  column-gap:15px !important;
}



/* ===== Skeleton cards (per-card) ===== */
.aura-skel-card{position:relative; overflow:hidden; width:100%;}
.aura-skel-media{position:relative; overflow:hidden;}
.aura-skel-img{position:absolute; inset:0; background:rgba(0,0,0,.06);}
.aura-skel-overlay{position:absolute; left:0; right:0; bottom:0; padding:18px 20px 20px;
  background:linear-gradient(to top, rgba(0,0,0,.18) 0%, rgba(0,0,0,.10) 40%, rgba(0,0,0,0) 100%); pointer-events:none;}
.aura-skel-tags{display:flex; gap:6px; margin-bottom:8px; flex-wrap:wrap;}
.aura-skel-tag{height:24px; width:64px; background:rgba(255,255,255,.18); border:none;}
.aura-skel-title-row{display:flex; align-items:center; gap:8px;}
.aura-skel-title{height:18px; width:72%; background:rgba(255,255,255,.18);}
.aura-skel-arrow{height:18px; width:18px; background:rgba(255,255,255,.18);}
.aura-skel-card::after{content:''; position:absolute; inset:0; transform:translateX(-100%);
  background:linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.22) 50%, rgba(255,255,255,0) 100%);
  animation:auraSkShimmer 1.1s infinite;}
@keyframes auraSkShimmer{100%{transform:translateX(100%);}}

/* Skeleton media ratio fallback */
.aura-skel-media::before{content:''; display:block; padding-top:83.3333%;} /* 6/5 */
@media (max-width: 767px){ .aura-skel-media::before{padding-top:166.6667%;} } /* 3/5 */

/* ===== Mobile: hide Sort (keep desktop) ===== */
@media (max-width: 1024px){
  .aura-portfolio-toolbar__right{display:none !important;}
}

/* ===== Popup radius 0 ===== */
.aura-filter-panel, .aura-filter-panel *{border-radius:0 !important;}

/* ===== Height stability + footer overlap fix ===== */
.aura-portfolio-grid-wrap{overflow:visible !important;}
@media (max-width: 1024px){
  .aura-portfolio-grid-wrap{padding-bottom:80px !important;}
}

/* Media height fallback for real cards (prevents Safari collapse after AJAX) */
.mqc-media{position:relative;}
.mqc-media::before{content:''; display:block; padding-top:100%;}
@media (min-width:1280px){ .mqc-media::before{padding-top:83.3333%;} } /* 6/5 */
@media (max-width:767px){ .mqc-media::before{padding-top:166.6667%;} } /* 3/5 */
.mqc-media img{position:absolute; inset:0;}




/* ===== Footer spacing guard ===== */
/* Mobile & tablet */
@media (max-width: 1024px){
  .aura-portfolio-grid-wrap::after{
    content: "" !important;
    display: block !important;
    height: 30px !important;
  }
}

/* Desktop */
@media (min-width: 1025px){
  .aura-portfolio-grid-wrap::after{
    content: "" !important;
    display: block !important;
    height: 60px !important;
  }
}


/* Enforce 15px gap across all breakpoints */
.aura-portfolio-grid{
  gap:15px !important;
  row-gap:15px !important;
  column-gap:15px !important;
}
