/**
 * CEFI Custom Theme - design tokens e utilitários
 *
 * Os tokens abaixo são exatamente os do design de referência
 * (ce-fraternidade-ipiranga.lovable.app). Eles são consumidos por estas
 * classes e pela configuração do Tailwind em header.php.
 */

:root {
    --background: 210 40% 98%;
    --foreground: 215 25% 20%;
    --card: 0 0% 100%;
    --card-foreground: 215 25% 20%;
    --popover: 0 0% 100%;
    --popover-foreground: 215 25% 20%;
    --primary: 200 70% 50%;
    --primary-foreground: 0 0% 100%;
    --secondary: 200 30% 94%;
    --secondary-foreground: 200 50% 30%;
    --muted: 200 20% 96%;
    --muted-foreground: 215 15% 50%;
    --accent: 180 50% 45%;
    --accent-foreground: 0 0% 100%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;
    --border: 200 25% 88%;
    --input: 200 25% 88%;
    --ring: 200 70% 50%;
    --radius: 0.75rem;

    --spiritual-gradient: linear-gradient(135deg, hsl(200 70% 50%), hsl(180 50% 45%));
    --hero-gradient: linear-gradient(180deg, hsl(200 40% 96%) 0%, hsl(200 50% 92%) 100%);
    --card-shadow: 0 4px 20px -4px hsl(200 50% 50% / 0.15);
    --card-shadow-hover: 0 8px 30px -4px hsl(200 50% 50% / 0.25);
}

html {
    scroll-behavior: smooth;
    /* compensa o cabeçalho fixo ao pular para uma âncora */
    scroll-padding-top: 5rem;
}

body {
    font-family: Inter, sans-serif;
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* A home compensa o cabeçalho fixo com o pt-20 do hero (igual à referência).
   As demais páginas precisam do respiro no topo. */
body:not(.home) #conteudo {
    padding-top: 4rem;
}

@media (min-width: 768px) {
    body:not(.home) #conteudo {
        padding-top: 5rem;
    }
}

/* ---------- utilitários do design ---------- */

.bg-hero {
    background: var(--hero-gradient);
}

.text-gradient {
    background: var(--spiritual-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.card-elevated {
    box-shadow: var(--card-shadow);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card-elevated:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
}

/* mantido por compatibilidade com os templates internos */
.card-shadow {
    box-shadow: var(--card-shadow);
}

.bg-gradient-soft {
    background: var(--hero-gradient);
}

/* ---------- animações ---------- */

@keyframes fadeUp {
    0%  { opacity: 0; transform: translateY(20px); }
    to  { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0%, to { transform: translateY(0); }
    50%    { transform: translateY(-10px); }
}

.animate-fade-up {
    opacity: 0;
    animation: fadeUp 0.6s ease-out forwards;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .animate-fade-up,
    .animate-float {
        animation: none;
        opacity: 1;
    }
    html { scroll-behavior: auto; }
}

/* ---------- menu ---------- */

.menu li {
    list-style: none;
}

.menu a {
    text-decoration: none;
}

/* ---------- logo ---------- */

.custom-logo-link {
    display: inline-block;
}

.custom-logo-link img {
    max-height: 80px;
    width: auto;
}

/* ---------- conteúdo editorial ---------- */

.prose {
    color: inherit;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.prose p {
    margin-bottom: 1em;
}

.prose a {
    color: hsl(var(--primary));
    text-decoration: underline;
}

.prose img {
    border-radius: var(--radius);
    margin: 1.5em 0;
}

/* embed do Google Maps definido em Configurações CEFI > Localização */
.cefi-mapa iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 320px;
    border: 0;
}

/* ---------- componentes das páginas internas ----------
   Substituem o DaisyUI, que trazia 2 MB de CSS só para estas poucas
   classes — e com uma paleta própria, que destoava do resto do site.
   Aqui elas seguem os mesmos tokens do tema.                         */

.card {
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: hsl(var(--card));
    color: hsl(var(--card-foreground));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
}

.card > figure {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    overflow: hidden;
}

.card > figure img {
    width: 100%;
    height: auto;
    display: block;
}

.card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 0.5rem;
    padding: 1.5rem;
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    color: hsl(var(--foreground));
    margin: 0;
}

.card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.5rem;
}

.card-actions.justify-end { justify-content: flex-end; }

/* fundos que vinham do DaisyUI, remapeados para a paleta do tema */
.bg-base-100 { background-color: hsl(var(--card)); }
.bg-base-200 { background-color: hsl(var(--secondary) / 0.35); }
.bg-base-300 { background-color: hsl(var(--muted)); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 2.75rem;
    padding: 0 1.5rem;
    border: 1px solid transparent;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.btn:hover { opacity: 0.9; }

.btn-primary {
    background-image: var(--spiritual-gradient);
    color: hsl(var(--primary-foreground));
}

.btn-outline {
    background: transparent;
    border-color: hsl(var(--primary));
    color: hsl(var(--primary));
}

.btn-outline:hover {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    opacity: 1;
}

.btn-sm { height: 2.25rem; padding: 0 0.875rem; font-size: 0.8125rem; }
.btn-lg { height: 3rem; padding: 0 2rem; font-size: 1rem; }
.btn-block { width: 100%; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border: 1px solid hsl(var(--border));
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.4;
}

.badge-primary {
    background-color: hsl(var(--primary) / 0.1);
    border-color: transparent;
    color: hsl(var(--primary));
}

.badge-accent,
.badge-success {
    background-color: hsl(var(--accent) / 0.2);
    border-color: transparent;
    color: hsl(var(--accent));
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    background-color: hsl(var(--secondary) / 0.4);
    color: hsl(var(--foreground));
    font-size: 0.9375rem;
}

.alert-info {
    background-color: hsl(var(--primary) / 0.06);
    border-color: hsl(var(--primary) / 0.25);
}

.alert-success {
    background-color: hsl(var(--accent) / 0.1);
    border-color: hsl(var(--accent) / 0.3);
}

.hero {
    display: grid;
    place-items: center;
    width: 100%;
    background: var(--hero-gradient);
}

.hero-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    max-width: 80rem;
    padding: 2rem 1rem;
}
