/*
Theme Name: Apocalypse
Description: WordPress theme for Apocalypse Endeavours based on the original Lovable design.
Version: 1.0.0
Text Domain: apocalypse
*/

[hidden] {
  display: none !important;
}

.apoc-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  max-height: 95dvh;
}

.apoc-dialog[open] {
  display: grid;
}

.apoc-dialog::backdrop {
  background: rgb(0 0 0 / 80%);
}

body:has(.apoc-dialog[open]) {
  overflow: hidden;
}

.apoc-category-active {
  border-left-color: hsl(var(--primary));
  color: hsl(var(--primary));
  background-color: hsl(var(--primary) / 0.1);
}

body.admin-bar #apocalypse-nav {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar #apocalypse-nav {
    top: 46px;
  }
}

.apoc-dialog { color:hsl(var(--foreground)); background:hsl(var(--card)); border:2px solid hsl(var(--border)); width:min(95vw, 700px); overflow:auto; }
.apoc-dialog:not([open]) { display:none!important; }
.apoc-dialog [data-dialog-close] { min-width:32px; min-height:32px; cursor:pointer; }
.apoc-gallery { width:95vw; max-width:1400px; padding:2.5rem; }
.apoc-gallery img { max-height:80dvh; max-width:100%; margin:auto; object-fit:contain; }
.apoc-gallery-controls { display:flex; justify-content:space-between; gap:1rem; padding-top:1rem; }
@media (prefers-reduced-motion:reduce) { *, *::before, *::after { animation:none!important; transition:none!important; } }

@media(max-width:640px){ body.home #main section:first-child .grid-cols-3 > div {padding:1rem .5rem;} body.home #main section:first-child .grid-cols-3 .text-xs {font-size:clamp(.45rem,1.9vw,.75rem);letter-spacing:0;} }
@media(max-width:640px) {
  #main .grid-cols-3.gap-8 {gap:.75rem;}
  #main .grid-cols-3.gap-8 > div {min-width:0;}
  #main .grid-cols-3.gap-8 .text-3xl {font-size:clamp(1.125rem,4.6vw,1.5rem);overflow-wrap:anywhere;}
  #main .grid-cols-3.gap-8 .text-sm {font-size:.6875rem;overflow-wrap:anywhere;}
}
