/* ESCISAH - Stylesheet Otimizado - post.css */

:root {
    --gold: #C9A84C;
    --gold-light: #E2C06E;
    --gold-pale: #F5E9C8;
    --gold-dark: #9E7B2E;
    --teal: #1D4E5F;
    --teal-mid: #2A6478;
    --teal-light: #3A8099;
    --teal-pale: #E6F2F6;
    --ink: #0F1923;
    --charcoal: #263040;
    --slate: #4A5A6B;
    --muted: #7A8B9A;
    --border: #DDE3EB;
    --bg: #F4F6F9;
    --white: #FFFFFF;
    --shadow-sm: 0 1px 4px rgba(15,25,35,0.06);
    --shadow-md: 0 4px 16px rgba(15,25,35,0.08);
    --shadow-lg: 0 12px 40px rgba(15,25,35,0.12);
    --shadow-gold: 0 4px 20px rgba(201,168,76,0.3);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --navbar-h: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    padding-top: var(--navbar-h);
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Foco visível consistente para navegação por teclado */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* ════════════════════════════════════════
   SCROLLBAR
════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 6px; }
* { scrollbar-width: thin; scrollbar-color: var(--gold) var(--bg); }

/* ════════════════════════════════════════
   NAVBAR
════════════════════════════════════════ */
.navbar {
    position: fixed;
    inset: 0 0 auto;
    height: var(--navbar-h);
    background: var(--teal);
    border-bottom: 2px solid var(--gold);
    box-shadow: 0 2px 24px rgba(15,25,35,0.2);
    z-index: 9000;
}

.nav-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    object-fit: cover;
}

.logo-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.01em;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0 auto;
    gap: 2px;
    align-items: center;
    height: 100%;
}

.nav-links li { height: 100%; display: flex; align-items: center; }

.nav-links a,
.nav-links .dropbtn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    height: 40px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
}

.nav-links a svg,
.nav-links .dropbtn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.nav-links a:hover, .nav-links .dropbtn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--white);
}

.nav-links a:hover svg, .nav-links .dropbtn:hover svg {
    opacity: 1;
}

/* Item ativo: texto em destaque + sublinhado dourado, sem fundo preenchido */
.nav-links a.active {
    background: none;
    color: var(--white);
}

.nav-links a.active svg {
    opacity: 1;
    color: var(--gold-light);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 2px;
    height: 2px;
    border-radius: 2px;
    background: var(--gold);
}

.chevron { width: 11px; height: 11px; opacity: 0.6; transition: transform 0.2s; }
.dropdown:hover .chevron { transform: rotate(180deg); }

.dropdown { position: relative; height: 100%; display: flex; align-items: center; }
.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 210px;
    background: #163849;
    border: 1px solid rgba(201,168,76,0.18);
    border-radius: var(--radius-md);
    padding: 6px;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
}
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu { display: block; }
.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    color: rgba(255,255,255,0.85);
    font-size: 0.83rem;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
    height: auto;
    text-decoration: none;
}
.dropdown-menu a:hover { background: rgba(201,168,76,0.14); color: var(--gold-light); }
.dropdown-menu a svg { width: 15px; height: 15px; flex-shrink: 0; opacity: 0.7; }

.nav-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-left: auto; }

.btn-primary {
    background: var(--gold);
    color: var(--teal);
    padding: 9px 20px;
    border: none;
    border-radius: 24px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.btn-primary:hover { background: var(--gold-light); box-shadow: var(--shadow-gold); transform: translateY(-1px); }
.btn-primary svg { width: 14px; height: 14px; flex-shrink: 0; }

.nav-burger {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    color: var(--white);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.nav-burger svg { width: 20px; height: 20px; }

/* ════════════════════════════════════════
   MOBILE MENU
════════════════════════════════════════ */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
}
.mobile-overlay.open { display: block; }

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 82vw;
    background: var(--teal);
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding: 1.5rem;
}
.mobile-menu.open { transform: translateX(0); }

.mobile-menu-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.75rem; }

.mobile-menu-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.mobile-menu-logo img { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--gold); }
.mobile-menu-logo span {
    font-family: 'Playfair Display', serif;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--white);
}

.mobile-menu-close {
    width: 34px;
    height: 34px;
    border: none;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--gold-light);
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.mobile-menu-links { list-style: none; display: flex; flex-direction: column; gap: 2px; }

.mobile-menu-links a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 10px;
    color: rgba(255,255,255,0.88);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.mobile-menu-links a svg { width: 13px; height: 13px; flex-shrink: 0; opacity: 0.7; }

.mobile-menu-links a:hover { background: rgba(255,255,255,0.08); }

.mobile-menu-links a.active {
    background: rgba(201,168,76,0.18);
    color: var(--gold-light);
    font-weight: 700;
}

.mobile-menu-links a.active svg { opacity: 1; }

@media (max-width: 900px) {
    .nav-links { display: none; }
    .nav-burger { display: flex; }
}

/* ════════════════════════════════════════
   MAIN CONTENT
════════════════════════════════════════ */
.main-wrapper {
    max-width: 1320px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.feed-title { font-size: 1.75rem; font-weight: 800; }
.feed-count { font-size: 0.9rem; color: var(--muted); }

.feed-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.search-box {
    flex: 1;
    min-width: 220px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 10px 12px 10px 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.search-box input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,0.1); }

.search-box::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: url('data:image/svg+xml;utf8,<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/></svg>') no-repeat center;
    background-size: contain;
    opacity: 0.5;
    pointer-events: none;
}

.category-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cat-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--charcoal);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.cat-btn:hover {
    background: var(--gold-pale);
    color: var(--gold-dark);
    border-color: var(--gold);
}

.cat-btn.active {
    background: var(--gold);
    color: var(--white);
    border-color: var(--gold);
}

/* ════════════════════════════════════════
   POSTS GRID
════════════════════════════════════════ */
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 1.5rem; }

@media (max-width: 768px) { .posts-grid { grid-template-columns: 1fr; } }

.post-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: box-shadow 0.3s, transform 0.3s;
    display: flex;
    flex-direction: column;
    /* Garante que a âncora #post-<id> não fica escondida atrás da navbar fixa */
    scroll-margin-top: calc(var(--navbar-h) + 16px);
}

.post-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.post-stripe { height: 4px; background: linear-gradient(90deg, var(--gold), var(--teal)); }

.post-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
}

.post-author { display: flex; align-items: center; gap: 10px; min-width: 0; }

.post-avatar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--teal), var(--teal-light));
    color: var(--white);
    font-weight: 700;
    font-size: 0.9rem;
}

.post-author-info { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }

.post-author-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-author-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--gold-dark);
    background: rgba(201,168,76,0.14);
    border-radius: 999px;
    vertical-align: middle;
}

.post-date { font-size: 0.75rem; color: var(--muted); }

.post-meta { display: flex; align-items: center; gap: 0.5rem; }

.delete-btn {
    background: none;
    border: none;
    width: 24px;
    height: 24px;
    cursor: pointer;
    color: #dc2626;
    opacity: 0.6;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.delete-btn:hover { opacity: 1; }

.post-images-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 4px;
    padding: 0.5rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

/* Quando o post tem apenas 1 imagem, ela ocupa o bloco inteiro */
.post-images-wrap.single-image {
    display: block;
    padding: 0;
    border-bottom: none;
}
.post-img-wrap {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--bg);
    cursor: pointer;
    transition: all 0.2s;
    aspect-ratio: 1;
}

.post-images-wrap.single-image .post-img-wrap {
    aspect-ratio: 16 / 10;
    border-radius: 0;
}

.post-images-wrap.single-image .post-img-wrap:hover {
    transform: none;
    box-shadow: none;
}

.post-img-wrap:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 2px var(--gold);
}

.post-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.img-count-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.post-cat-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--ink);
    background: rgba(255,255,255,0.92);
    padding: 4px 10px;
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
}

.post-body {
    padding: 1rem;
    flex: 1;
}

.post-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.post-title a { color: var(--ink); text-decoration: none; transition: color 0.2s; }
.post-title a:hover { color: var(--gold); }

.post-text {
    font-size: 0.9rem;
    color: var(--charcoal);
    margin-bottom: 0.75rem;
    line-height: 1.5;
    /* Corta em 3 linhas para os cartões manterem altura consistente na grelha */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cat-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gold);
    background: rgba(201,168,76,0.1);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.post-stats {
    display: flex;
    gap: 1.25rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--muted);
}

.stat-item { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; transition: color 0.2s; }
.stat-item:hover { color: var(--gold); }
.stat-item svg { width: 14px; height: 14px; flex-shrink: 0; }

.post-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0 0.5rem 0.5rem;
}

.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--slate);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover { border-color: var(--gold); color: var(--gold); }
.action-btn.liked, .action-btn.loved { color: var(--gold); border-color: var(--gold); background: rgba(201,168,76,0.08); }
.action-btn svg { width: 16px; height: 16px; }

.comments-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: var(--bg);
    border-top: 1px solid var(--border);
}

.comments-panel.open { max-height: 500px; overflow-y: auto; }

.comment-form {
    padding: 0.75rem;
    display: flex;
    gap: 6px;
}

.comment-field-wrap { display: flex; gap: 6px; flex: 1; }

.comment-field {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.comment-field:focus { outline: none; border-color: var(--gold); }

.comment-send {
    padding: 8px 12px;
    background: var(--gold);
    border: none;
    border-radius: var(--radius-md);
    color: var(--teal);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.comment-send:hover { background: var(--gold-light); }

.comment-item {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.comment-bubble {
    background: var(--white);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.comment-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.comment-author { font-weight: 600; color: var(--ink); }

.comment-text {
    font-size: 0.85rem;
    color: var(--charcoal);
    word-break: break-word;
}

.comment-del {
    background: none;
    border: none;
    width: 16px;
    height: 16px;
    cursor: pointer;
    color: #dc2626;
    opacity: 0.5;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-del:hover { opacity: 1; }

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.empty-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.empty-text { color: var(--muted); font-size: 0.95rem; }

.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ════════════════════════════════════════
   PAGINAÇÃO
════════════════════════════════════════ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--teal);
    background: var(--white);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.pagination a:hover { border-color: var(--gold); color: var(--gold-dark); background: var(--gold-pale); }
.pagination .active { background: var(--teal); color: var(--white); border-color: var(--teal); }
.pagination .disabled { opacity: 0.4; pointer-events: none; }

/* ════════════════════════════════════════
   MODAL
════════════════════════════════════════ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.open { display: flex; }

.modal-box {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-head-title { font-size: 1.25rem; font-weight: 700; }

.modal-close {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    color: var(--muted);
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover { background: var(--bg); color: var(--ink); }

.modal-form {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--charcoal);
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,168,76,0.1);
}

.form-textarea { resize: vertical; min-height: 100px; }

.form-file {
    display: block;
    width: 100%;
    padding: 10px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.85rem;
    transition: border-color 0.2s;
}

.form-file:focus { outline: none; border-color: var(--gold); }

.btn-submit {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: white;
    padding: 12px;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-submit:hover { box-shadow: var(--shadow-gold); transform: translateY(-2px); }

/* ════════════════════════════════════════
   PHOTO VIEWER
════════════════════════════════════════ */
.photo-viewer {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(8px);
}

.photo-viewer.open { display: flex; }

.pv-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    transition: transform 0.2s;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-drag: none;
}

.pv-prev, .pv-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10002;
}

.pv-prev:hover, .pv-next:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--gold);
    color: var(--gold);
}

.pv-prev { left: 16px; }
.pv-next { right: 16px; }

@media (max-width: 768px) {
    .pv-img { max-width: 95vw; max-height: 80vh; }
    .pv-prev, .pv-next { width: 40px; height: 40px; }
}
/* ════════════════════════════════════════
   PHOTO VIEWER — TOOLBAR (zoom + fechar)
════════════════════════════════════════ */
.pv-toolbar {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 8px;
    z-index: 10003;
}

.pv-tool-btn {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.pv-tool-btn svg { width: 20px; height: 20px; }

.pv-tool-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--gold);
    color: var(--gold);
}

.pv-close-btn:hover {
    background: rgba(220, 38, 38, 0.25);
    border-color: #dc2626;
    color: #fca5a5;
}

@media (max-width: 768px) {
    .pv-toolbar { top: 10px; right: 10px; }
    .pv-tool-btn { width: 36px; height: 36px; }
    .pv-tool-btn svg { width: 17px; height: 17px; }
    .pv-prev, .pv-next { display: none !important; }
}

/* ════════════════════════════════════════
   PHOTO VIEWER — CONTADOR + PONTOS (mobile swipe)
════════════════════════════════════════ */
.pv-counter {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 999px;
    z-index: 10003;
    display: none;
}

.pv-dots {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    gap: 6px;
    z-index: 10003;
}

.pv-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    transition: background 0.2s, width 0.2s;
}

.pv-dot.active {
    background: var(--gold);
    width: 18px;
    border-radius: 3px;
}

@media (max-width: 768px) {
    .pv-counter { top: 10px; left: 10px; font-size: 0.75rem; padding: 5px 12px; }
    .pv-dots { bottom: 16px; }
}

/* ════════════════════════════════════════
   OPTIMIZAÇÕES GERAIS
════════════════════════════════════════ */
img { max-width: 100%; height: auto; }