/*
 * GV Estilos — cards próprios do Guia Vegano (plg_system_gvestilos, 2026-11-28)
 *
 * Cada card existe em duas formas, com o mesmo visual:
 *   YOOtheme Builder → .uk-card.uk-card-gv-<nome>  (o Builder põe uk-card e uk-card-body)
 *   Editor JCE       → .gv-card.gv-card-<nome>     (div criado pela lista "Estilos")
 *
 * Os seletores ficam dentro de :is(...) de propósito: assim o JCE não importa
 * estas classes como itens soltos na lista "Estilos" (ele só importa seletores
 * simples como ".classe"). Não trocar por seletores simples.
 *
 * Fonte: /home/vegano/_docs/joomla/gvestilos/  (não editar só no servidor)
 */

/* ------------------------------------------------------------------ */
/* Base comum                                                          */
/* ------------------------------------------------------------------ */

:is(.uk-card[class*="uk-card-gv-"], .gv-card[class*="gv-card-"]) {
  --gv-raio: 24px;
  --gv-sombra: 0 14px 34px -18px rgba(6, 39, 59, .30);
  --gv-sombra-hover: 0 20px 44px -18px rgba(6, 39, 59, .38);
  position: relative;
  border-radius: var(--gv-raio);
  box-shadow: var(--gv-sombra);
  transition: box-shadow .45s ease, border-color .45s ease;
}

:is(.uk-card[class*="uk-card-gv-"], .gv-card[class*="gv-card-"]):hover {
  box-shadow: var(--gv-sombra-hover);
}

/* Só no conteúdo dos artigos (JCE): o Builder já dá o espaçamento */
:is(.gv-card[class*="gv-card-"]) {
  box-sizing: border-box;
  display: flow-root;
  margin: 0 0 28px;
  padding: clamp(22px, 3.2vw, 36px);
}

:is(.gv-card[class*="gv-card-"]) > :first-child { margin-top: 0; }
:is(.gv-card[class*="gv-card-"]) > :last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------ */
/* Cards escuros animados: Azul noite e Verde floresta                 */
/*   ::before = aurora de luz que passeia devagar pelo fundo           */
/*   ::after  = filete de luz que corre em volta da borda              */
/* ------------------------------------------------------------------ */

@property --gv-giro {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

:is(.uk-card.uk-card-gv-noite, .gv-card.gv-card-noite) {
  --gv-raio: 28px;
  --gv-fundo-a: #28446a;              /* mesmo azul do "Tile Secondary" */
  --gv-fundo-b: #213857;
  --gv-aurora-a: rgba(255, 122, 69, .24);   /* coral do site */
  --gv-aurora-b: rgba(58, 209, 167, .20);   /* verde-água */
  --gv-filete-a: rgba(255, 138, 66, .95);
  --gv-filete-b: rgba(92, 224, 190, .90);
  --gv-sombra: 0 26px 54px -24px rgba(14, 28, 50, .80), 0 3px 10px rgba(14, 28, 50, .16), inset 0 1px 0 rgba(255, 255, 255, .10);
  --gv-sombra-hover: 0 30px 64px -22px rgba(14, 28, 50, .85), 0 0 0 1px rgba(255, 255, 255, .06), 0 0 40px -6px rgba(255, 122, 69, .30), inset 0 1px 0 rgba(255, 255, 255, .14);
}

:is(.uk-card.uk-card-gv-floresta, .gv-card.gv-card-floresta) {
  --gv-raio: 28px;
  --gv-fundo-a: #1f5446;
  --gv-fundo-b: #14382e;
  --gv-aurora-a: rgba(237, 185, 51, .22);   /* dourado */
  --gv-aurora-b: rgba(140, 230, 180, .18);
  --gv-filete-a: rgba(246, 215, 127, .95);
  --gv-filete-b: rgba(150, 236, 190, .90);
  --gv-sombra: 0 26px 54px -24px rgba(10, 36, 28, .80), 0 3px 10px rgba(10, 36, 28, .16), inset 0 1px 0 rgba(255, 255, 255, .10);
  --gv-sombra-hover: 0 30px 64px -22px rgba(10, 36, 28, .85), 0 0 0 1px rgba(255, 255, 255, .06), 0 0 40px -6px rgba(237, 185, 51, .30), inset 0 1px 0 rgba(255, 255, 255, .14);
}

:is(.uk-card.uk-card-gv-noite, .gv-card.gv-card-noite, .uk-card.uk-card-gv-floresta, .gv-card.gv-card-floresta) {
  isolation: isolate;
  background-color: var(--gv-fundo-a);
  background-image: linear-gradient(40deg, var(--gv-fundo-a), var(--gv-fundo-b));
  color: rgba(255, 255, 255, .86);
}

:is(.uk-card.uk-card-gv-noite, .gv-card.gv-card-noite, .uk-card.uk-card-gv-floresta, .gv-card.gv-card-floresta)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background-image:
    radial-gradient(closest-side, var(--gv-aurora-b), transparent),
    radial-gradient(closest-side, var(--gv-aurora-a), transparent),
    radial-gradient(closest-side, rgba(255, 255, 255, .07), transparent);
  background-repeat: no-repeat;
  background-size: 75% 90%, 85% 100%, 45% 55%;
  background-position: -10% -20%, 115% 120%, 70% 10%;
  animation: gv-aurora 18s ease-in-out infinite alternate;
}

:is(.uk-card.uk-card-gv-noite, .gv-card.gv-card-noite, .uk-card.uk-card-gv-floresta, .gv-card.gv-card-floresta)::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  padding: 1.5px;
  pointer-events: none;
  background: conic-gradient(from var(--gv-giro), transparent 0deg 235deg, var(--gv-filete-b) 285deg, var(--gv-filete-a) 330deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: .75;
  transition: opacity .45s ease;
  animation: gv-giro 8s linear infinite;
}

:is(.uk-card.uk-card-gv-noite, .gv-card.gv-card-noite, .uk-card.uk-card-gv-floresta, .gv-card.gv-card-floresta):hover::after {
  opacity: 1;
  animation-duration: 4s;
}

@keyframes gv-aurora {
  0%   { background-position: -10% -20%, 115% 120%, 70% 10%; }
  50%  { background-position: 35% 10%, 70% 80%, 20% 60%; }
  100% { background-position: 100% -10%, 0% 110%, 85% 85%; }
}

@keyframes gv-giro {
  to { --gv-giro: 360deg; }
}

/* Texto claro também no editor JCE, onde o CSS do tema pode não estar */
:is(.gv-card.gv-card-noite, .gv-card.gv-card-floresta) :is(h1, h2, h3, h4, h5, h6, strong, b) {
  color: #fff;
}

:is(.gv-card.gv-card-noite, .gv-card.gv-card-floresta) a:not([class*="uk-button"]) {
  color: #ffc994;
  text-decoration-color: rgba(255, 201, 148, .55);
}

/* ------------------------------------------------------------------ */
/* Rosa (como as seções do artigo da B12)                              */
/* ------------------------------------------------------------------ */

:is(.uk-card.uk-card-gv-rosa, .gv-card.gv-card-rosa) {
  --gv-raio: 30px;
  --gv-sombra: 0 18px 44px rgba(135, 35, 78, .09);
  --gv-sombra-hover: 0 22px 52px rgba(135, 35, 78, .15);
  color: #3d2530;
  background-color: #fff;
  background-image:
    radial-gradient(circle at 92% 0%, rgba(165, 148, 201, .20), transparent 50%),
    radial-gradient(circle at 6% 8%, rgba(210, 79, 134, .08), transparent 34%),
    linear-gradient(135deg, rgba(248, 211, 227, .62), rgba(255, 255, 255, .97));
  border: 1px solid rgba(168, 47, 99, .18);
}

/* ------------------------------------------------------------------ */
/* Verde com faixa à esquerda (como a "Resposta rápida")               */
/* ------------------------------------------------------------------ */

:is(.uk-card.uk-card-gv-verde, .gv-card.gv-card-verde) {
  --gv-raio: 28px;
  --gv-sombra: 0 16px 38px rgba(45, 90, 81, .10);
  --gv-sombra-hover: 0 20px 46px rgba(45, 90, 81, .17);
  color: #322820;
  background-color: #fff;
  background-image:
    radial-gradient(circle at 90% 0%, rgba(78, 139, 126, .14), transparent 46%),
    linear-gradient(135deg, rgba(78, 139, 126, .10), rgba(255, 255, 255, .97));
  border: 1px solid rgba(45, 90, 81, .26);
  border-left: 7px solid #4e8b7e;
}

/* ------------------------------------------------------------------ */
/* Dourado — borda em degradê de ouro que brilha devagar               */
/* ------------------------------------------------------------------ */

:is(.uk-card.uk-card-gv-dourado, .gv-card.gv-card-dourado) {
  --gv-raio: 26px;
  --gv-sombra: 0 18px 40px -20px rgba(154, 87, 28, .45), 0 2px 6px rgba(154, 87, 28, .07);
  --gv-sombra-hover: 0 22px 48px -18px rgba(154, 87, 28, .55), 0 0 26px -6px rgba(237, 185, 51, .45);
  color: #3b2d1a;
  border: 2px solid transparent;
  background-color: #fffaf0;
  background-image:
    radial-gradient(circle at 100% 0%, rgba(237, 185, 51, .24), transparent 48%),
    linear-gradient(135deg, #fff6df 0%, #fffcf4 65%, #fff 100%),
    linear-gradient(120deg, #c2752c, #edb933, #f6d77f, #c98a3c, #edb933, #c2752c);
  background-origin: padding-box, padding-box, border-box;
  background-clip: padding-box, padding-box, border-box;
  background-size: 100% 100%, 100% 100%, 300% 300%;
  background-repeat: no-repeat;
  animation: gv-ouro 9s ease-in-out infinite alternate;
}

@keyframes gv-ouro {
  from { background-position: 0 0, 0 0, 0% 50%; }
  to   { background-position: 0 0, 0 0, 100% 50%; }
}

/* ------------------------------------------------------------------ */
/* Azul claro com faixa (como a abertura das categorias de Ciência)    */
/* ------------------------------------------------------------------ */

:is(.uk-card.uk-card-gv-celeste, .gv-card.gv-card-celeste) {
  --gv-raio: 18px;
  --gv-sombra: 0 1px 2px rgba(35, 64, 94, .06), 0 8px 24px -14px rgba(35, 64, 94, .35);
  --gv-sombra-hover: 0 1px 2px rgba(35, 64, 94, .06), 0 14px 32px -14px rgba(35, 64, 94, .45);
  color: #3c4b58;
  background-color: #eaf1f6;
  background-image:
    linear-gradient(180deg, #6fa3b5 0%, #23405e 55%, #c98a3c 100%),
    linear-gradient(135deg, #f2f6f9 0%, #e8eff5 45%, #e3ecf1 100%);
  background-size: 8px 100%, 100% 100%;
  background-position: 0 0, 0 0;
  background-repeat: no-repeat;
}

/* ------------------------------------------------------------------ */
/* Laranja para branco (como o resumo dos capítulos do livro)          */
/* ------------------------------------------------------------------ */

:is(.uk-card.uk-card-gv-laranja, .gv-card.gv-card-laranja) {
  --gv-raio: 20px;
  --gv-sombra: 0 10px 28px -18px rgba(120, 80, 30, .40);
  --gv-sombra-hover: 0 16px 36px -18px rgba(120, 80, 30, .50);
  color: #4a3a28;
  background-color: #fff;
  background-image:
    linear-gradient(180deg, #a8702c, #5f8a3a),
    linear-gradient(90deg, #fbe9d3 0%, #fdf5ea 55%, #fff 92%);
  background-size: 5px 100%, 100% 100%;
  background-position: 0 0, 0 0;
  background-repeat: no-repeat;
}

/* ------------------------------------------------------------------ */
/* Lavanda — faixa colorida no topo que desliza                        */
/* ------------------------------------------------------------------ */

:is(.uk-card.uk-card-gv-lavanda, .gv-card.gv-card-lavanda) {
  --gv-raio: 24px;
  --gv-sombra: 0 16px 36px -18px rgba(73, 53, 106, .35);
  --gv-sombra-hover: 0 22px 44px -18px rgba(73, 53, 106, .45);
  color: #3a2f4a;
  background-color: #fff;
  background-image:
    linear-gradient(90deg, #a594c9, #6a4f8f, #d24f86, #a594c9),
    radial-gradient(circle at 0% 100%, rgba(165, 148, 201, .22), transparent 55%),
    linear-gradient(160deg, #f6f2fc 0%, #fff 80%);
  background-size: 300% 5px, 100% 100%, 100% 100%;
  background-position: 0% 0, 0 0, 0 0;
  background-repeat: no-repeat;
  border: 1px solid rgba(106, 79, 143, .16);
  animation: gv-faixa 10s ease-in-out infinite alternate;
}

@keyframes gv-faixa {
  to { background-position: 100% 0, 0 0, 0 0; }
}

/* ------------------------------------------------------------------ */
/* Vidro fosco — para pôr sobre seções com imagem ou cor de fundo      */
/* ------------------------------------------------------------------ */

:is(.uk-card.uk-card-gv-vidro, .gv-card.gv-card-vidro) {
  --gv-raio: 24px;
  --gv-sombra: 0 20px 44px -22px rgba(6, 39, 59, .45), inset 0 1px 0 rgba(255, 255, 255, .8);
  --gv-sombra-hover: 0 26px 52px -22px rgba(6, 39, 59, .55), inset 0 1px 0 rgba(255, 255, 255, .9);
  color: #1f2d3a;
  background-color: rgba(255, 255, 255, .62);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  backdrop-filter: blur(14px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, .72);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :is(.uk-card.uk-card-gv-vidro, .gv-card.gv-card-vidro) {
    background-color: rgba(255, 255, 255, .90);
  }
}

/* ------------------------------------------------------------------ */
/* Quem pediu menos movimento no sistema não vê animação               */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  :is(.uk-card[class*="uk-card-gv-"], .gv-card[class*="gv-card-"]),
  :is(.uk-card[class*="uk-card-gv-"], .gv-card[class*="gv-card-"])::before,
  :is(.uk-card[class*="uk-card-gv-"], .gv-card[class*="gv-card-"])::after {
    animation: none !important;
    transition: none !important;
  }
}
