/* ============================================================
   FestaMulti — estilo principal
   Verde (principal), amarelo e laranja (complementares)
   ============================================================ */

:root {
    --fm-green: #157a4b;
    --fm-green-dark: #0d5c37;
    --fm-green-light: #e6f6ee;
    --fm-green-soft: #f2fbf6;
    --fm-yellow: #ffc857;
    --fm-yellow-soft: #fff6da;
    --fm-orange: #ff8a3d;
    --fm-orange-soft: #fff0e5;
    --fm-ink: #1d2b26;
    --fm-muted: #687a72;
    --fm-cream: #fffdf8;
    --fm-border: #dcece3;
    --fm-radius: 1.15rem;
    --fm-shadow: 0 12px 32px rgba(21, 122, 75, .10);
    --fm-shadow-sm: 0 6px 18px rgba(21, 122, 75, .08);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
}

body {
    background: var(--fm-cream);
    color: var(--fm-ink);
    font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, .navbar-brand {
    font-weight: 800;
    letter-spacing: -.02em;
}

a {
    color: var(--fm-green);
}

a:hover {
    color: var(--fm-green-dark);
}

.fm-skip-link {
    position: absolute;
    z-index: 2000;
    background: var(--fm-green);
    color: #fff;
    padding: .6rem 1rem;
    border-radius: 0 0 .6rem 0;
}

/* ---------------- Navbar ---------------- */

.fm-navbar {
    background: rgba(255, 253, 248, .94);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--fm-border);
    padding-top: .7rem;
    padding-bottom: .7rem;
}

.fm-brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    color: var(--fm-ink);
    font-size: 1.4rem;
    font-weight: 900;
    text-decoration: none;
}

.fm-brand:hover {
    color: var(--fm-green-dark);
}

.fm-brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: .85rem;
    background: linear-gradient(135deg, var(--fm-green), #2aa86a);
    color: #fff;
    box-shadow: 0 6px 14px rgba(21, 122, 75, .25);
    font-size: 1.15rem;
}

.fm-navbar .nav-link {
    color: var(--fm-ink);
    font-weight: 600;
    border-radius: .6rem;
    padding: .45rem .75rem;
}

.fm-navbar .nav-link:hover {
    background: var(--fm-green-light);
    color: var(--fm-green-dark);
}

/* ---------------- Botões ---------------- */

.btn {
    border-radius: .85rem;
    font-weight: 700;
}

.btn-fm-primary {
    background: var(--fm-green);
    border-color: var(--fm-green);
    color: #fff;
    box-shadow: 0 8px 18px rgba(21, 122, 75, .22);
}

.btn-fm-primary:hover,
.btn-fm-primary:focus {
    background: var(--fm-green-dark);
    border-color: var(--fm-green-dark);
    color: #fff;
}

.btn-fm-accent {
    background: var(--fm-yellow);
    border-color: var(--fm-yellow);
    color: #5d4300;
}

.btn-fm-accent:hover,
.btn-fm-accent:focus {
    background: #ffb627;
    border-color: #ffb627;
    color: #4a3500;
}

.btn-fm-orange {
    background: var(--fm-orange);
    border-color: var(--fm-orange);
    color: #401c00;
}

.btn-fm-orange:hover {
    background: #ff7519;
    border-color: #ff7519;
    color: #401c00;
}

.btn-outline-fm {
    border: 1.5px solid var(--fm-green);
    color: var(--fm-green);
    background: transparent;
}

.btn-outline-fm:hover {
    background: var(--fm-green);
    color: #fff;
}

.btn-soft {
    background: var(--fm-green-light);
    color: var(--fm-green-dark);
    border: 1px solid transparent;
}

.btn-soft:hover {
    background: #d5f0e2;
    color: var(--fm-green-dark);
}

/* ---------------- Alertas ---------------- */

.fm-alert {
    border: 0;
    border-radius: var(--fm-radius);
    box-shadow: var(--fm-shadow-sm);
}

/* ---------------- Hero ---------------- */

.fm-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(3rem, 7vw, 6rem) 0 clamp(2.5rem, 5vw, 4rem);
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 200, 87, .30), transparent 45%),
        radial-gradient(circle at 88% 12%, rgba(255, 138, 61, .18), transparent 40%),
        linear-gradient(180deg, var(--fm-green-soft), var(--fm-cream));
}

.fm-hero::after {
    content: "";
    position: absolute;
    inset: auto -10% -55% -10%;
    height: 70%;
    background: radial-gradient(ellipse at center, rgba(21, 122, 75, .10), transparent 65%);
    pointer-events: none;
}

.fm-hero .container {
    position: relative;
    z-index: 1;
}

.fm-badge-soft {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    background: #fff;
    border: 1px solid var(--fm-border);
    color: var(--fm-green-dark);
    border-radius: 999px;
    padding: .45rem .9rem;
    font-size: .85rem;
    font-weight: 700;
    box-shadow: var(--fm-shadow-sm);
}

.fm-hero-title {
    font-size: clamp(2.5rem, 6vw, 4.25rem);
    line-height: 1.02;
    margin-bottom: 1rem;
}

.fm-hero-slogan {
    font-size: clamp(1.15rem, 2.4vw, 1.5rem);
    font-weight: 700;
    color: var(--fm-green-dark);
}

.fm-hero-lead {
    font-size: 1.08rem;
    color: var(--fm-muted);
    max-width: 36rem;
}

.fm-hero-art {
    position: relative;
    min-height: 340px;
}

.fm-float-card {
    background: #fff;
    border-radius: var(--fm-radius);
    box-shadow: var(--fm-shadow);
    border: 1px solid var(--fm-border);
    padding: 1rem 1.1rem;
    display: flex;
    align-items: center;
    gap: .8rem;
}

.fm-float-card .fm-ic {
    width: 2.7rem;
    height: 2.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .9rem;
    font-size: 1.25rem;
    flex: 0 0 auto;
}

.fm-hero-stack {
    position: relative;
    max-width: 380px;
    margin: 0 auto;
    display: grid;
    gap: .9rem;
}

.fm-hero-stack .fm-float-card:nth-child(1) { transform: rotate(-2deg); }
.fm-hero-stack .fm-float-card:nth-child(2) { transform: rotate(1.5deg) translateX(1.1rem); }
.fm-hero-stack .fm-float-card:nth-child(3) { transform: rotate(-1deg); }
.fm-hero-stack .fm-float-card:nth-child(4) { transform: rotate(2deg) translateX(-.6rem); }

.fm-blob {
    position: absolute;
    inset: 50% auto auto 50%;
    width: 320px;
    height: 320px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255, 200, 87, .55), rgba(255, 138, 61, .12) 60%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    filter: blur(2px);
}

/* ---------------- Seções ---------------- */

.fm-section {
    padding: clamp(2.5rem, 5vw, 4.5rem) 0;
}

.fm-section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
}

.fm-eyebrow {
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .78rem;
    font-weight: 800;
    color: var(--fm-orange);
}

.fm-card {
    background: #fff;
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius);
    box-shadow: var(--fm-shadow-sm);
}

.fm-step {
    height: 100%;
    padding: 1.5rem;
    transition: transform .18s ease, box-shadow .18s ease;
}

.fm-step:hover {
    transform: translateY(-4px);
    box-shadow: var(--fm-shadow);
}

.fm-step-number {
    width: 2.6rem;
    height: 2.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 900;
    background: var(--fm-green);
    color: #fff;
    margin-bottom: .9rem;
}

.fm-feature-icon {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    font-size: 1.3rem;
    margin-bottom: .9rem;
}

.fm-ic-green { background: var(--fm-green-light); color: var(--fm-green-dark); }
.fm-ic-yellow { background: var(--fm-yellow-soft); color: #8a6300; }
.fm-ic-orange { background: var(--fm-orange-soft); color: #b34d00; }

.fm-campaign {
    position: relative;
    overflow: hidden;
    border-radius: 1.6rem;
    background:
        radial-gradient(circle at 90% 10%, rgba(255, 200, 87, .45), transparent 45%),
        linear-gradient(135deg, var(--fm-green-dark), var(--fm-green));
    color: #fff;
    box-shadow: var(--fm-shadow);
}

.fm-campaign .display-5 {
    font-weight: 900;
    letter-spacing: -.03em;
}

.fm-campaign-pill {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
    padding: .35rem .8rem;
    font-size: .82rem;
    font-weight: 700;
}

.fm-progress {
    height: .8rem;
    background: rgba(255, 255, 255, .18);
    border-radius: 999px;
    overflow: hidden;
}

.fm-progress-bar {
    background: linear-gradient(90deg, var(--fm-yellow), var(--fm-orange));
    border-radius: 999px;
}

/* ---------------- Evento público ---------------- */

.fm-event-hero {
    background:
        radial-gradient(circle at 85% 10%, rgba(255, 200, 87, .25), transparent 42%),
        linear-gradient(180deg, var(--fm-green-soft), var(--fm-cream));
    border-bottom: 1px solid var(--fm-border);
    padding: clamp(2rem, 5vw, 3.5rem) 0;
}

.fm-event-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
}

.fm-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.fm-meta-item {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    background: #fff;
    border: 1px solid var(--fm-border);
    border-radius: 999px;
    padding: .45rem .85rem;
    font-size: .9rem;
    font-weight: 600;
    color: var(--fm-ink);
}

.fm-category {
    scroll-margin-top: 100px;
}

.fm-category-title {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.fm-category-icon {
    width: 2.4rem;
    height: 2.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .75rem;
    background: var(--fm-green-light);
    color: var(--fm-green-dark);
}

.fm-contribution {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    padding: .9rem 1rem;
    border: 1px solid var(--fm-border);
    border-radius: 1rem;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.fm-contribution:hover {
    border-color: #bfe3d1;
    box-shadow: var(--fm-shadow-sm);
}

.fm-avatar {
    width: 2.5rem;
    height: 2.5rem;
    flex: 0 0 auto;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--fm-green-light);
    color: var(--fm-green-dark);
    font-weight: 800;
    font-size: .9rem;
}

.fm-avatar.alt-1 { background: var(--fm-yellow-soft); color: #7a5800; }
.fm-avatar.alt-2 { background: var(--fm-orange-soft); color: #a44900; }
.fm-avatar.alt-3 { background: #e9f0ff; color: #334d9e; }

.fm-qty {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    background: var(--fm-green-light);
    color: var(--fm-green-dark);
    border-radius: 999px;
    padding: .15rem .55rem;
    font-size: .78rem;
    font-weight: 800;
    white-space: nowrap;
}

.fm-participant-chip {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: #fff;
    border: 1px solid var(--fm-border);
    border-radius: 999px;
    padding: .4rem .8rem .4rem .4rem;
    font-weight: 600;
    font-size: .9rem;
}

.fm-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    border: 1.5px dashed var(--fm-border);
    border-radius: var(--fm-radius);
    color: var(--fm-muted);
    background: #fff;
}

.fm-empty .fm-empty-icon {
    font-size: 2.4rem;
    color: var(--fm-green);
}

/* ---------------- Formulários ---------------- */

.form-label {
    font-weight: 700;
    font-size: .92rem;
}

.form-control,
.form-select {
    border-radius: .8rem;
    border-color: #cfe4d9;
    padding: .65rem .85rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--fm-green);
    box-shadow: 0 0 0 .22rem rgba(21, 122, 75, .15);
}

.fm-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------------- Footer ---------------- */

.fm-footer {
    background: #0f2a20;
    color: #e8f4ee;
    margin-top: 3rem;
}

.fm-brand-footer {
    color: #fff;
}

.fm-brand-footer:hover {
    color: var(--fm-yellow);
}

.fm-footer-muted {
    color: #9fbcae;
}

.fm-footer-title {
    color: var(--fm-yellow);
    letter-spacing: .1em;
    font-weight: 800;
    margin-bottom: 1rem;
}

.fm-footer-links li {
    margin-bottom: .5rem;
}

.fm-footer-links a {
    color: #d6e8df;
    text-decoration: none;
}

.fm-footer-links a:hover {
    color: var(--fm-yellow);
    text-decoration: underline;
}

/* ---------------- Utilidades ---------------- */

.fm-sticky-card {
    position: sticky;
    top: 92px;
}

.fm-divider {
    height: 1px;
    background: var(--fm-border);
}

.fm-text-muted {
    color: var(--fm-muted) !important;
}

.fm-share-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.fm-copy-feedback {
    font-size: .82rem;
    color: var(--fm-green-dark);
    font-weight: 700;
}

.fm-hidden {
    display: none !important;
}

.fm-loading {
    pointer-events: none;
    opacity: .65;
}

.spinner-border-sm {
    --bs-spinner-width: 1rem;
    --bs-spinner-height: 1rem;
}

/* ---------------- Login / admin base reutiliza variáveis ---------------- */

.fm-auth-wrap {
    min-height: calc(100vh - 180px);
    display: grid;
    place-items: center;
    padding: 3rem 1rem;
}

.fm-auth-card {
    width: 100%;
    max-width: 430px;
}

@media (max-width: 991.98px) {
    .fm-hero-art {
        min-height: auto;
        margin-top: 2rem;
    }

    .fm-hero-stack {
        max-width: 100%;
    }

    .fm-sticky-card {
        position: static;
    }

    .fm-navbar .navbar-nav {
        padding-top: .75rem;
    }
}

@media (max-width: 575.98px) {
    .fm-hero {
        padding-top: 2.2rem;
    }

    .fm-meta-item {
        font-size: .82rem;
        padding: .38rem .7rem;
    }

    .fm-contribution {
        padding: .75rem;
    }

    .btn-lg {
        font-size: 1rem;
        padding: .7rem 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

/* Utilitário: permite que itens flex com texto longo encolham no mobile */
.min-w-0 {
    min-width: 0 !important;
}
/* Evita quebra de linha nos itens do menu (bot?es longos) */
.fm-navbar .nav-link,
.fm-navbar .btn {
    white-space: nowrap;
}

/* Modal de confirmacao */
.fm-confirm-modal .modal-content {
    border: 0;
    border-radius: 1.1rem;
    box-shadow: 0 24px 60px rgba(20, 40, 30, .18);
}

.fm-confirm-modal .modal-header,
.fm-confirm-modal .modal-footer {
    border-color: var(--fm-border);
}

.fm-confirm-modal .modal-title {
    font-weight: 800;
}

.fm-confirm-icon {
    width: 2.75rem;
    height: 2.75rem;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .9rem;
    background: var(--fm-yellow-soft);
    color: #8a6300;
    font-size: 1.3rem;
}

.fm-confirm-danger .fm-confirm-icon {
    background: #fde8e8;
    color: #b42318;
}

.fm-confirm-message {
    white-space: pre-line;
}

/* Botao apenas com icone: area do administrador */
.fm-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    padding: 0;
}
