/* ============================================================
   ASSUON — projetos.css
   Página: projetos.php
   Visual integrado ao hero, sem cards brancos puros
============================================================ */

:root {
    --proj-blue: #3574F0;
    --proj-blue-dark: #10213c;
    --proj-ink: #0f2340;
    --proj-text: #334155;
    --proj-muted: #64748b;
    --proj-line: rgba(72, 100, 145, .26);
    --proj-panel: #d8e4f2;
    --proj-panel-2: #e2ebf5;
    --proj-card: #ccd9e8;
    --proj-card-2: #dbe6f2;
    --proj-chip: rgba(255, 255, 255, .42);
}

/* Base */
body {
    background: #dfe9f6;
}

.proj-hero,
.projetos-main-area,
.proj-grid,
.proj-card,
.proj-card *,
.filter-bar,
.modal-overlay,
.modal,
.modal * {
    box-sizing: border-box;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

/* ============================================================
   HERO
============================================================ */

.proj-hero {
    background:
        radial-gradient(circle at top left, rgba(53, 116, 240, .28), transparent 34%),
        radial-gradient(circle at top right, rgba(58, 190, 64, .16), transparent 32%),
        linear-gradient(135deg, #071629 0%, #10213c 58%, #3574F0 100%);
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    padding: 3rem 0 2.35rem;
    color: #ffffff;
}

.proj-hero .hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .45rem .85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .22);
    color: #dbeafe;
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.proj-hero h1 {
    color: #ffffff;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.proj-hero p {
    color: rgba(255, 255, 255, .90) !important;
}

.proj-hero div[style*="color:var(--gold-400)"] {
    color: #ffffff !important;
    font-weight: 900;
}

.proj-hero div[style*="color:var(--gray-400)"] {
    color: rgba(255, 255, 255, .76) !important;
}

/* ============================================================
   ÁREA PRINCIPAL
============================================================ */

.projetos-main-area {
    background:
        radial-gradient(circle at top left, rgba(53, 116, 240, .14), transparent 30%),
        radial-gradient(circle at bottom right, rgba(16, 33, 60, .10), transparent 34%),
        linear-gradient(180deg, #c7d6e8 0%, #d7e3f1 45%, #e5edf7 100%);
    margin-top: -1px;
    padding: 2rem 1rem 3.6rem;
    border-top: 1px solid rgba(255, 255, 255, .18);
}

.projetos-main-area > .container {
    background: transparent;
}

/* ============================================================
   FILTROS
============================================================ */

.filter-bar {
    display: flex;
    align-items: center;
    gap: .7rem;
    flex-wrap: wrap;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, .30), transparent 35%),
        linear-gradient(180deg, #bacce1 0%, #cbd9e9 100%);
    border: 1px solid rgba(56, 82, 124, .30);
    border-radius: 22px;
    padding: 1rem;
    margin-bottom: 1.35rem;
    box-shadow:
        0 18px 42px rgba(15, 23, 42, .16),
        0 0 0 1px rgba(255, 255, 255, .24) inset;
}

.filter-bar span[style*="color:var(--gray-400)"] {
    color: #263d5d !important;
}

.filter-bar .form-control {
    background: rgba(255, 255, 255, .56);
    border: 1px solid rgba(56, 82, 124, .26);
    color: var(--proj-ink);
    border-radius: 14px;
    outline: none;
}

.filter-bar .form-control::placeholder {
    color: #667b98;
}

.filter-bar .form-control:focus {
    background: rgba(255, 255, 255, .82);
    border-color: rgba(53, 116, 240, .62);
    box-shadow: 0 0 0 4px rgba(53, 116, 240, .15);
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    min-height: 36px;
    padding: .42rem .85rem;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 900;
    border: 1px solid rgba(56, 82, 124, .26);
    color: #263d5d;
    background: rgba(255, 255, 255, .42);
    text-decoration: none;
    transition: all .18s ease;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(15, 23, 42, .06);
}

.filter-chip:hover {
    color: #0f3f99;
    border-color: rgba(53, 116, 240, .44);
    background: rgba(255, 255, 255, .70);
}

.filter-chip.active {
    background: linear-gradient(135deg, #3574F0 0%, #245fd1 100%);
    border-color: rgba(53, 116, 240, .78);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(53, 116, 240, .26);
}

.projetos-main-area .btn-secondary {
    background: rgba(255, 255, 255, .50) !important;
    border-color: rgba(56, 82, 124, .24) !important;
    color: #263d5d !important;
}

.projetos-main-area .btn-secondary:hover {
    background: var(--proj-blue) !important;
    border-color: var(--proj-blue) !important;
    color: #ffffff !important;
}

/* Contagem */
.projetos-main-area .container > div[style*="font-size:.84rem"] {
    color: #314a6c !important;
    font-weight: 700;
}

.projetos-main-area .container > div[style*="font-size:.84rem"] strong {
    color: var(--proj-ink) !important;
}

/* ============================================================
   GRID E CARDS
============================================================ */

.proj-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(295px, 1fr));
    gap: 1.2rem;
    padding-bottom: 3rem;
}

.proj-card {
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, .34), transparent 42%),
        linear-gradient(180deg, #b9cce2 0%, #ccdae9 54%, #d8e4f1 100%);
    border: 1px solid rgba(49, 74, 108, .30);
    border-radius: 24px;
    overflow: hidden;
    box-shadow:
        0 20px 44px rgba(15, 23, 42, .18),
        0 0 0 1px rgba(255, 255, 255, .20) inset;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
    color: var(--proj-ink);
}

.proj-card:hover {
    transform: translateY(-4px);
    border-color: rgba(53, 116, 240, .52);
    box-shadow:
        0 28px 62px rgba(15, 23, 42, .24),
        0 0 0 1px rgba(255, 255, 255, .26) inset;
}

.proj-card.inativo {
    opacity: .72;
}

.proj-card-body {
    padding: 1.25rem;
}

.proj-tags {
    display: flex;
    gap: .45rem;
    flex-wrap: wrap;
    margin-bottom: .95rem;
}

.proj-title {
    margin: 0 0 .65rem;
    color: #0d213c;
    font-size: 1.13rem;
    font-weight: 900;
    line-height: 1.32;
    letter-spacing: -0.02em;
}

.proj-desc {
    color: #273d5a;
    font-size: .92rem;
    line-height: 1.58;
    margin: 0 0 1rem;
    font-weight: 600;
}

/* Corrige cores inline herdadas */
.proj-card [style*="color:var(--white)"] {
    color: #0d213c !important;
}

.proj-card [style*="color:var(--gray-300)"] {
    color: #273d5a !important;
}

.proj-card [style*="color:var(--gray-400)"] {
    color: #415979 !important;
}

/* ============================================================
   PROGRESSO
============================================================ */

.progress-wrap {
    margin: 1rem 0;
    padding: .85rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, .30);
    border: 1px solid rgba(56, 82, 124, .16);
}

.progress-wrap .flex-between {
    color: #334f73 !important;
}

.progress-wrap span[style*="color:var(--white)"] {
    color: #0d213c !important;
}

.progress-wrap span[style*="color:var(--success)"] {
    color: #166534 !important;
}

.progress-bar {
    height: 10px;
    background: rgba(49, 74, 108, .18);
    border-radius: 999px;
    overflow: hidden;
    margin-top: .5rem;
}

.progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #245fd1, #5b8fff);
    transition: width .5s ease;
}

.proj-card.concluido .progress-fill {
    background: linear-gradient(90deg, #15803d, #4ade80);
}

.proj-card.pausado .progress-fill {
    background: linear-gradient(90deg, #d97706, #facc15);
}

/* ============================================================
   META E BOTÃO DETALHES
============================================================ */

.proj-meta {
    display: flex;
    flex-direction: column;
    gap: .38rem;
    color: #415979;
    font-size: .8rem;
    line-height: 1.45;
    margin-top: .95rem;
    font-weight: 700;
}

.proj-meta span {
    color: #415979;
}

.proj-meta span[style*="var(--danger)"] {
    color: #b91c1c !important;
    font-weight: 900;
}

.proj-meta span[style*="var(--warning)"] {
    color: #a16207 !important;
    font-weight: 900;
}

.proj-meta span[style*="var(--success)"] {
    color: #166534 !important;
    font-weight: 900;
}

.proj-detail-btn {
    padding: .95rem 1.25rem;
    border-top: 1px solid rgba(49, 74, 108, .18);
    color: #0f3f99;
    font-size: .86rem;
    font-weight: 900;
    background: linear-gradient(180deg, rgba(168, 190, 217, .58), rgba(187, 205, 226, .72));
}

.proj-card:hover .proj-detail-btn {
    color: #ffffff;
    background: linear-gradient(135deg, #3574F0 0%, #245fd1 100%);
}

/* ============================================================
   BADGES
============================================================ */

.proj-card .badge,
.modal .badge,
.filter-bar .badge {
    display: inline-flex;
    align-items: center;
    gap: .32rem;
    border-radius: 999px;
    padding: .36rem .62rem;
    font-size: .72rem;
    font-weight: 900;
    line-height: 1;
}

.badge-info {
    background: rgba(219, 234, 254, .78);
    color: #1d4ed8;
    border: 1px solid rgba(147, 197, 253, .80);
}

.badge-success {
    background: rgba(220, 252, 231, .82);
    color: #166534;
    border: 1px solid rgba(134, 239, 172, .80);
}

.badge-warning {
    background: rgba(254, 243, 199, .88);
    color: #92400e;
    border: 1px solid rgba(253, 186, 116, .82);
}

.badge-danger {
    background: rgba(254, 226, 226, .86);
    color: #991b1b;
    border: 1px solid rgba(252, 165, 165, .82);
}

.badge-muted {
    background: rgba(241, 245, 249, .72);
    color: #334155;
    border: 1px solid rgba(148, 163, 184, .42);
}

.badge-primary {
    background: rgba(219, 234, 254, .78);
    color: #1d4ed8;
    border: 1px solid rgba(147, 197, 253, .80);
}

/* ============================================================
   EMPTY
============================================================ */

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, .35), transparent 34%),
        linear-gradient(180deg, #b9cce2, #d5e1ee);
    border: 1px dashed rgba(49, 74, 108, .34);
    border-radius: 24px;
    padding: 3rem 1rem;
    color: #314a6c;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .12);
}

.empty-state h3 {
    color: #0d213c !important;
}

.empty-state p {
    color: #314a6c;
}

.empty-icon {
    font-size: 2.6rem;
    margin-bottom: .75rem;
}

.text-gold {
    color: #245fd1 !important;
}

/* ============================================================
   MODAL
============================================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(7, 22, 41, .72);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
    z-index: 9999;
}

.modal-overlay.open {
    display: flex;
}

.modal {
    width: min(780px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, .38), transparent 35%),
        linear-gradient(180deg, #c7d6e8, #dce7f3);
    border: 1px solid rgba(49, 74, 108, .30);
    border-radius: 24px;
    box-shadow: 0 30px 86px rgba(15, 23, 42, .38);
    color: var(--proj-ink);
}

.modal-header {
    padding: 1.5rem 1.6rem;
    background:
        radial-gradient(circle at top left, rgba(53, 116, 240, .16), transparent 34%),
        linear-gradient(180deg, #b9cce2, #cbd9e9);
    border-bottom: 1px solid rgba(49, 74, 108, .22);
}

.modal-header h2 {
    color: #0d213c !important;
}

.modal-header div[style*="color:var(--gray-400)"] {
    color: #415979 !important;
}

.modal-body {
    padding: 1.5rem 1.6rem;
    color: var(--proj-ink);
}

.modal-body p,
.modal-body div[style*="color:var(--gray-300)"] {
    color: #273d5a !important;
}

.modal-body div[style*="color:var(--gray-400)"] {
    color: #415979 !important;
}

.modal-body .flex-between span:last-child {
    color: #0d213c;
    font-weight: 900;
}

.modal-close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    border: 1px solid rgba(49, 74, 108, .24);
    background: rgba(255, 255, 255, .56);
    color: #0d213c;
    border-radius: 999px;
    padding: .45rem .85rem;
    cursor: pointer;
    font-weight: 900;
    transition: .18s ease;
}

.modal-close:hover {
    background: var(--proj-blue);
    border-color: var(--proj-blue);
    color: #ffffff;
}

.modal-body div[style*="background:rgba(4,13,26"] {
    background: rgba(255, 255, 255, .35) !important;
    border-color: rgba(49, 74, 108, .22) !important;
    color: #273d5a !important;
}

.modal-body div[style*="border-left:3px"] {
    border-left-color: var(--proj-blue) !important;
}

/* ============================================================
   TIMELINE
============================================================ */

.timeline {
    position: relative;
    margin-top: .75rem;
    padding-left: 1.35rem;
}

.timeline::before {
    content: "";
    position: absolute;
    left: .42rem;
    top: .2rem;
    bottom: .2rem;
    width: 2px;
    background: rgba(49, 74, 108, .22);
}

.timeline-item {
    position: relative;
    padding: .2rem 0 1.15rem;
}

.timeline-dot {
    position: absolute;
    left: -1.13rem;
    top: .35rem;
    width: .75rem;
    height: .75rem;
    border-radius: 50%;
    background: var(--proj-blue);
    border: 2px solid #e5edf7;
    box-shadow: 0 0 0 2px rgba(147, 197, 253, .80);
}

.timeline-dot.milestone,
.timeline-dot.conclusao {
    background: #16a34a;
    box-shadow: 0 0 0 2px #86efac;
}

.timeline-dot.alerta {
    background: #f59e0b;
    box-shadow: 0 0 0 2px #fdba74;
}

.timeline-item div[style*="color:var(--white)"] {
    color: #0d213c !important;
}

.timeline-item div[style*="color:var(--gray-300)"] {
    color: #273d5a !important;
}

.timeline-item div[style*="color:var(--gray-400)"] {
    color: #415979 !important;
}

/* ============================================================
   BOTÕES
============================================================ */

.btn {
    border-radius: 12px;
    font-weight: 900;
}

.btn-primary {
    background: var(--proj-blue) !important;
    border-color: var(--proj-blue) !important;
    color: #ffffff !important;
}

.btn-primary:hover {
    background: #245fd1 !important;
    border-color: #245fd1 !important;
}

/* ============================================================
   RESPONSIVO
============================================================ */

@media (max-width: 820px) {
    .proj-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        align-items: stretch;
    }

    .filter-bar form {
        min-width: 100% !important;
    }

    .filter-chip {
        flex: 1;
        min-width: fit-content;
    }
}

@media (max-width: 560px) {
    .proj-hero {
        padding: 2.2rem 0 1.7rem;
    }

    .projetos-main-area {
        padding: 1.4rem .75rem 2.6rem;
    }

    .proj-card-body {
        padding: 1rem;
    }

    .modal {
        border-radius: 18px;
    }

    .modal-header,
    .modal-body {
        padding: 1.2rem;
    }

    .modal-close {
        position: static;
        margin-bottom: .8rem;
    }
}