/* Estilos compartilhados por todas as páginas do ClicBook */
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
body { 
    font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif; 
    background-color: #0a0a0a; 
    color: #f3f4f6; 
    animation: fadeIn 0.8s ease-in-out; 
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

::selection { background-color: #b3152a; color: #fff; }

/* Scrollbar personalizada para um visual premium */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 5px; border: 2px solid #0a0a0a; }
::-webkit-scrollbar-thumb:hover { background: #ef4458; }

.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.masonry-item { break-inside: avoid; margin-bottom: 1rem; }
:focus-visible { outline: 2px solid #ef4458; outline-offset: 2px; }

/* ---------------------------------------------------- */
/* ANIMAÇÃO BIDIRECIONAL PARA O FAQ (ABRIR E FECHAR)    */
/* ---------------------------------------------------- */
details.group .faq-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease-out;
}

details.group .faq-content-inner {
    overflow: hidden;
}

/* O segredo para a animação de subida funcionar sem travar */
details.group[open]:not(.closing) .faq-content {
    grid-template-rows: 1fr;
}

/* Rotação suave da setinha */
details.group .ph-caret-down {
    transition: transform 0.3s ease;
}
details.group[open]:not(.closing) .ph-caret-down {
    transform: rotate(-180deg);
}
/* ---------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Páginas protegidas */
html[data-guard="client"]:not([data-ok]) body,
html[data-guard="admin"]:not([data-ok]) body { visibility: hidden; }