/**
 * 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;
}
