/* ── Layout-08 "Festa Junina" ──────────────────────────────────
   Prefix: lp8-
   navDesktop: top | navMobile: top | banner: cover | atividades: bandeirinhas
   Theme: festive warm palette — maroon nav, cream bg, rope + pennant cards
   ─────────────────────────────────────────────────────────────── */

/* ── Variables ────────────────────────────────────────────────── */
:root {
    --lp8-maroon:  #6B0F0F;
    --lp8-maroon2: #4A0808;
    --lp8-amber:   #D97706;
    --lp8-yellow:  #F59E0B;
    --lp8-cream:   #FFF8E7;
    --lp8-rope:    #92400E;
    --lp8-nav-h:   58px;
}

/* ── Base ─────────────────────────────────────────────────────── */
.lp8-body {
    margin: 0;
    padding: 0;
    background: var(--lp8-cream);
    color: #1c0a00;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.6;
}

/* ── Sticky Header ────────────────────────────────────────────── */
.lp8-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--lp8-maroon);
    height: var(--lp8-nav-h);
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,.3);
}

.lp8-header-inner {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.lp8-logo-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    text-decoration: none;
}

.lp8-logo-img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,.2);
    flex-shrink: 0;
    display: block;
}

.lp8-logo-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255,255,255,.12);
    border: 2px solid rgba(255,255,255,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    letter-spacing: -.02em;
}

.lp8-header-title {
    font-size: .88rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    flex: 1;
}

.lp8-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
    flex-shrink: 0;
}

.lp8-nav a {
    display: block;
    padding: 6px 14px;
    color: rgba(255,255,255,.72);
    text-decoration: none;
    font-size: .83rem;
    font-weight: 500;
    border-radius: 6px;
    transition: color .15s, background .15s;
    white-space: nowrap;
}
.lp8-nav a:hover  { color: #fff; background: rgba(255,255,255,.1); }
.lp8-nav a.active { color: #fff; background: rgba(255,255,255,.15); font-weight: 600; }

/* ── Header user area ─────────────────────────────────────────── */
.lp8-header-user { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.lp8-user-drop   { position: relative; }

.lp8-user-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 8px;
    padding: 4px 10px 4px 4px;
    cursor: pointer;
    font-size: .78rem;
    color: #fff;
    transition: background .15s;
}
.lp8-user-btn:hover { background: rgba(255,255,255,.18); }

.lp8-user-av {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    display: flex; align-items: center; justify-content: center;
    font-size: .68rem; font-weight: 700; color: #fff;
    overflow: hidden; flex-shrink: 0;
}

.lp8-user-name-label {
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lp8-user-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    min-width: 175px;
    padding: 4px 0;
    list-style: none;
    margin: 0;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    z-index: 300;
}
.lp8-user-menu.show { display: block; }
.lp8-user-menu-hdr { padding: 8px 14px 5px; font-size: .72rem; color: #9ca3af; font-weight: 500; }
.lp8-user-menu li a { display: block; padding: 7px 14px; color: #374151; text-decoration: none; font-size: .82rem; transition: background .12s; }
.lp8-user-menu li a:hover { background: #f9fafb; }
.lp8-user-menu li a.text-danger { color: #dc2626; }

.lp8-btn-entrar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: var(--lp8-amber);
    color: #fff;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    font-size: .82rem;
    font-weight: 600;
    transition: background .15s;
}
.lp8-btn-entrar:hover { background: #B45309; }

/* ── Hamburger ────────────────────────────────────────────────── */
.lp8-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px; height: 36px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 7px;
    cursor: pointer;
    padding: 7px;
    flex-shrink: 0;
    margin-left: auto;
}
.lp8-hamburger span {
    display: block;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform .2s, opacity .2s;
}
.lp8-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.lp8-hamburger.is-open span:nth-child(2) { opacity: 0; }
.lp8-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hero Cover ───────────────────────────────────────────────── */
.lp8-hero {
    position: relative;
    min-height: 460px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.lp8-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.lp8-hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        160deg,
        rgba(107,15,15,.75) 0%,
        rgba(28,5,5,.92) 100%
    );
    z-index: 1;
}

/* Decorative mini-bandeirinhas along top of hero */
.lp8-hero-deco {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}
.lp8-hero-deco::before {
    content: '';
    position: absolute;
    top: 10px;
    left: -10px;
    right: -10px;
    height: 3px;
    background: repeating-linear-gradient(90deg, #78350F 0, #B45309 5px, #78350F 10px);
    border-radius: 2px;
}
.lp8-hero-deco-flags {
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    overflow: hidden;
}
.lp8-hero-deco-flags span {
    display: block;
    width: 26px;
    height: 38px;
    clip-path: polygon(8% 0, 92% 0, 50% 100%);
    flex-shrink: 0;
    opacity: .85;
}
.lp8-hero-deco-flags span:nth-child(6n+1) { background: #DC2626; }
.lp8-hero-deco-flags span:nth-child(6n+2) { background: #D97706; }
.lp8-hero-deco-flags span:nth-child(6n+3) { background: #16A34A; }
.lp8-hero-deco-flags span:nth-child(6n+4) { background: #2563EB; }
.lp8-hero-deco-flags span:nth-child(6n+5) { background: #7C3AED; }
.lp8-hero-deco-flags span:nth-child(6n)   { background: #C2410C; }

.lp8-hero-content {
    position: relative;
    z-index: 3;
    padding: 72px 40px 52px;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.lp8-hero-event-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 12px;
}

.lp8-hero-logo {
    width: 72px; height: 72px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,.25);
    flex-shrink: 0;
    display: block;
}
.lp8-hero-logo-placeholder {
    width: 72px; height: 72px;
    border-radius: 12px;
    background: rgba(255,255,255,.12);
    border: 2px solid rgba(255,255,255,.2);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; font-weight: 800; color: rgba(255,255,255,.8);
    flex-shrink: 0;
}

.lp8-hero-text-col { min-width: 0; flex: 1; }

.lp8-hero-badge {
    display: inline-block;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--lp8-yellow);
    margin-bottom: 8px;
}

.lp8-hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.18;
    margin: 0 0 14px;
    letter-spacing: -.02em;
    text-shadow: 0 2px 12px rgba(0,0,0,.4);
}

.lp8-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    font-size: .85rem;
    color: rgba(255,255,255,.8);
    margin-bottom: 16px;
}
.lp8-hero-meta-item { display: flex; align-items: center; gap: 6px; }
.lp8-hero-meta-item i { font-size: .72rem; color: var(--lp8-amber); }

.lp8-hero-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .72rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 99px;
    border: 1.5px solid;
    margin-bottom: 20px;
}
.lp8-hero-status.aberto    { color: #4ADE80; border-color: #4ADE80; background: rgba(74,222,128,.1); }
.lp8-hero-status.encerrado { color: rgba(255,255,255,.5); border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.05); }
.lp8-hero-status.futuro    { color: #C4B5FD; border-color: #C4B5FD; background: rgba(196,181,253,.1); }
.lp8-hero-status.andamento { color: var(--lp8-yellow); border-color: var(--lp8-yellow); background: rgba(245,158,11,.1); }

.lp8-btn-inscr-hero {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    background: var(--lp8-amber);
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, transform .1s;
    text-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.lp8-btn-inscr-hero:hover { background: #B45309; transform: translateY(-1px); }

/* ── Page body ────────────────────────────────────────────────── */
.lp8-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 72px;
}

/* ── Sections ─────────────────────────────────────────────────── */
.lp8-section {
    padding: 48px 0;
    border-bottom: 1px solid rgba(107,15,15,.1);
    scroll-margin-top: calc(var(--lp8-nav-h) + 10px);
}
.lp8-section:last-of-type { border-bottom: none; }

.lp8-section-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--lp8-maroon);
    margin: 0 0 28px;
    letter-spacing: -.01em;
    display: flex;
    align-items: center;
    gap: 10px;
}
.lp8-section-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 1.2em;
    background: var(--lp8-amber);
    border-radius: 3px;
    flex-shrink: 0;
}

/* ── Sobre ────────────────────────────────────────────────────── */
.lp8-descricao {
    font-size: .92rem;
    color: #3B1A0A;
    line-height: 1.85;
    max-width: 700px;
    white-space: pre-line;
}

/* ── Programação — varais de bandeirinhas ─────────────────────── */
.lp8-prog-empty { color: #9ca3af; font-size: .9rem; padding: 24px 0; }

.lp8-varal { margin-bottom: 60px; }
.lp8-varal:last-child { margin-bottom: 0; }

.lp8-varal-header { margin-bottom: 16px; }

.lp8-date-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--lp8-maroon);
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: 5px 16px;
    border-radius: 99px;
}
.lp8-date-chip i { font-size: .7rem; color: var(--lp8-yellow); }

/* ── Rope / varal ─────────────────────────────────────────────── */
.lp8-flags-row {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    padding-top: 26px;
    align-items: flex-start;
}

/* The rope itself */
.lp8-flags-row::before {
    content: '';
    position: absolute;
    top: 6px;
    left: -8px;
    right: -8px;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        #78350F 0px,
        #B45309 8px,
        #78350F 16px
    );
    border-radius: 3px;
    z-index: 0;
}

/* ── Individual pennant ───────────────────────────────────────── */
.lp8-pennant {
    position: relative;
    width: 178px;
    flex-shrink: 0;
    padding-bottom: 30px;   /* space for triangular tip */
    z-index: 1;
    cursor: default;
}

/* Color cycling via CSS custom property */
.lp8-pennant:nth-child(6n+1) { --pennant-color: #B91C1C; }
.lp8-pennant:nth-child(6n+2) { --pennant-color: #B45309; }
.lp8-pennant:nth-child(6n+3) { --pennant-color: #15803D; }
.lp8-pennant:nth-child(6n+4) { --pennant-color: #1D4ED8; }
.lp8-pennant:nth-child(6n+5) { --pennant-color: #6D28D9; }
.lp8-pennant:nth-child(6n)   { --pennant-color: #C2410C; }

/* Thread from rope to pennant */
.lp8-pennant::before {
    content: '';
    position: absolute;
    top: -26px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 26px;
    background: linear-gradient(to bottom, #92400E, rgba(146,64,14,.4));
    z-index: 2;
}

/* Triangular tip at bottom (via clip-path — scales with width) */
.lp8-pennant::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: var(--pennant-color, #B91C1C);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}

/* Rectangular body of the pennant */
.lp8-pennant-body {
    background: var(--pennant-color, #B91C1C);
    padding: 14px 13px 12px;
    border-radius: 4px 4px 0 0;
    min-height: 128px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative;
    z-index: 1;
    transition: filter .15s;
}
.lp8-pennant:hover .lp8-pennant-body { filter: brightness(1.1); }

/* Subtle texture stripe at top of each pennant */
.lp8-pennant-body::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: rgba(255,255,255,.2);
    border-radius: 4px 4px 0 0;
}

/* ── Pennant content ──────────────────────────────────────────── */
.lp8-pnt-time {
    font-size: .72rem;
    font-weight: 700;
    color: rgba(255,255,255,.85);
    letter-spacing: .02em;
}

.lp8-pnt-type {
    display: inline-block;
    align-self: flex-start;
    font-size: .6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    background: rgba(0,0,0,.2);
    color: rgba(255,255,255,.92);
    padding: 2px 7px;
    border-radius: 3px;
}

.lp8-pnt-title {
    font-size: .82rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin: 2px 0 0;
    flex: 1;
}

/* Info popover button — floats in the triangular tip */
.lp8-pnt-info-btn {
    position: absolute;
    bottom: -11px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    background: rgba(255,255,255,0.22);
    border: 1.5px solid rgba(255,255,255,0.5);
    color: #fff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.68rem;
    padding: 0;
    line-height: 1;
    transition: background .15s, border-color .15s;
}
.lp8-pnt-info-btn:hover,
.lp8-pnt-info-btn:focus {
    background: rgba(255,255,255,0.38);
    border-color: rgba(255,255,255,0.75);
    outline: none;
}

.lp8-pnt-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 4px;
}

.lp8-pnt-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    font-size: .67rem;
    color: rgba(255,255,255,.72);
    line-height: 1.35;
}
.lp8-pnt-meta-item i { font-size: .58rem; margin-top: 2px; flex-shrink: 0; color: rgba(255,255,255,.5); }

.lp8-pnt-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 8px;
    padding-top: 7px;
    border-top: 1px solid rgba(255,255,255,.15);
}

.lp8-pnt-vagas {
    font-size: .64rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 3px;
    background: rgba(0,0,0,.15);
    color: rgba(255,255,255,.82);
}
.lp8-pnt-vagas.sem-vaga { background: rgba(0,0,0,.25); color: rgba(255,180,180,.9); }

.lp8-pnt-btn-inscr {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1.5px solid rgba(255,255,255,.45);
    background: rgba(255,255,255,.15);
    color: #fff;
    border-radius: 5px;
    font-size: .67rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}
.lp8-pnt-btn-inscr:hover { background: rgba(255,255,255,.28); }
.lp8-pnt-btn-inscr:disabled { opacity: .4; cursor: not-allowed; }

/* ── Inscrição section ─────────────────────────────────────────── */
.lp8-inscricao-box {
    border: 2px solid rgba(107,15,15,.15);
    border-radius: 14px;
    padding: 36px 36px 32px;
    max-width: 480px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(107,15,15,.06);
}
.lp8-inscricao-box h3 { font-size: 1.1rem; font-weight: 800; color: var(--lp8-maroon); margin: 0 0 8px; }
.lp8-inscricao-box p  { font-size: .88rem; color: #6b7280; margin: 0 0 20px; line-height: 1.7; }

.lp8-btn-inscr-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: var(--lp8-maroon);
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}
.lp8-btn-inscr-main:hover { background: var(--lp8-maroon2); }

/* ── Footer ───────────────────────────────────────────────────── */
.lp8-footer {
    border-top: 1px solid rgba(107,15,15,.1);
    padding: 24px;
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
    font-size: .73rem;
    color: #9ca3af;
}
.lp8-footer a { color: inherit; text-decoration: none; }

/* ── Login modal field ─────────────────────────────────────────── */
.el-field {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: .9rem;
    color: #1e293b;
    outline: none;
    box-sizing: border-box;
    transition: border-color .2s;
}
.el-field:focus { border-color: var(--lp8-maroon); box-shadow: 0 0 0 3px rgba(107,15,15,.1); }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .lp8-header-title { display: none; }

    .lp8-nav {
        display: none;
        flex-direction: column;
        gap: 0;
        position: fixed;
        top: var(--lp8-nav-h);
        left: 0; right: 0;
        background: var(--lp8-maroon);
        padding: 10px 16px 16px;
        z-index: 199;
        box-shadow: 0 4px 12px rgba(0,0,0,.25);
    }
    .lp8-nav.is-open { display: flex; }
    .lp8-nav a { color: rgba(255,255,255,.8); font-size: .9rem; padding: 11px 12px; }
    .lp8-hamburger { display: flex; }

    .lp8-hero { min-height: 320px; }
    .lp8-hero-content { padding: 60px 20px 40px; }
    .lp8-hero-title { font-size: 1.75rem; }
    .lp8-hero-event-row { gap: 14px; }
    .lp8-hero-logo,
    .lp8-hero-logo-placeholder { width: 54px; height: 54px; border-radius: 10px; }

    .lp8-page { padding: 0 14px 48px; }
    .lp8-section { padding: 36px 0; }

    .lp8-pennant { width: 155px; }
    .lp8-pennant-body { min-height: 112px; padding: 12px 11px 10px; }
    .lp8-pnt-title { font-size: .78rem; }

    .lp8-inscricao-box { padding: 24px 20px; }
}

@media (max-width: 480px) {
    .lp8-flags-row { gap: 4px 4px; padding-top: 22px; }
    /* Two pennants per row on narrow screens */
    .lp8-pennant { width: calc(50% - 5px); }
    .lp8-pennant::after { height: 24px; }
    .lp8-pennant { padding-bottom: 24px; }
}

/* ── Contador de inscrições ──────────────────────────────── */
.lp8-insc-counter {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 16px;
    padding: 6px 16px;
    background: rgba(107,15,15,0.08);
    border: 1px solid rgba(107,15,15,0.25);
    border-radius: 999px;
    color: var(--lp8-maroon);
    font-size: 0.82rem;
    font-weight: 700;
    font-family: Georgia, serif;
}
.lp8-insc-counter-icon { font-size: 0.85rem; opacity: .85; }
.lp8-insc-counter-num  { font-size: 1.1rem; font-weight: 800; }

/* ── Alerta de prazo de inscrição ── */
.lp8-inscricao-alert {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: .82rem; font-weight: 600; color: #6B0F0F;
    min-height: 1.2em; margin-bottom: 8px;
}
