/*
Theme Name: Dicas de Gateiro
Theme URI: https://dicasdegateiro.com.br
Author: Dicas de Gateiro
Description: Tema WordPress para blog de dicas sobre gatos. Design moderno com modo claro/escuro, grid de posts, sidebar, categorias e área de compartilhamento. Baseado no StreamVox, adaptado para blog de conteúdo.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dicasdegateiro
Tags: blog, gatos, dark, responsive, custom-menu, featured-images, grid-layout
*/

/* ========================================
   RESET & BASE
======================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #0f0f10;
    --bg2: #1a1a1e;
    --bg3: #242428;
    --card: #1e1e22;
    --card-hover: #28282d;
    --border: #2e2e35;
    --text: #e8e8ec;
    --text2: #a0a0aa;
    --text3: #6a6a75;
    --accent: #e07b39;      /* laranja felino */
    --accent2: #f5973d;
    --accent-dark: #b85f20;
    --accent-cat: #e07b39;
    --link: #c0c0cc;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 4px 20px rgba(0,0,0,.45);
    --shadow-card: 0 2px 10px rgba(0,0,0,.35);
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --header-h: 62px;
    --transition: .2s ease;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent2); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ========================================
   LAYOUT
======================================== */
.vp-wrapper { min-height: 100vh; display: flex; flex-direction: column; }

.vp-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.vp-body { flex: 1; padding: 28px 0; }

.vp-content-wrap {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 28px;
    align-items: start;
}

.vp-content-wrap.no-sidebar { grid-template-columns: 1fr; }

main { min-width: 0; }

/* ========================================
   HEADER
======================================== */
.vp-header {
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 200;
    height: var(--header-h);
}

.vp-header-row {
    display: flex;
    align-items: center;
    gap: 20px;
    height: var(--header-h);
}

.vp-header-top { justify-content: space-between; }

.vp-header-search-mobile {
    display: none;
    height: auto;
    padding: 10px 0;
    border-top: 1px solid var(--border);
}

.vp-logo { flex-shrink: 0; display: flex; align-items: center; gap: 10px; }
.vp-logo-img {
    height: 40px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    display: block;
}
.vp-logo-text {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}
.vp-logo-text::before { content: '🐱'; font-size: 1.3rem; flex-shrink: 0; }

/* Mobile: mostra versão curta e esconde a completa */
.vp-logo-short { display: none; }
.vp-logo-full  { display: block; overflow: hidden; text-overflow: ellipsis; }

/* Logo nativa do WP dentro de .vp-logo */
.vp-logo .custom-logo-link img,
.vp-logo .custom-logo-link .vp-logo-img {
    height: 40px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.vp-nav ul { display: flex; align-items: center; gap: 2px; }
.vp-nav ul li a {
    display: block;
    padding: 8px 14px;
    font-size: .875rem;
    font-weight: 500;
    color: var(--text2);
    border-radius: var(--radius);
    transition: all var(--transition);
    white-space: nowrap;
}
.vp-nav ul li a:hover, .vp-nav ul li.current-menu-item > a {
    background: var(--bg3);
    color: var(--accent);
}

.vp-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.vp-darkmode-btn {
    width: 34px;
    height: 34px;
    background: var(--bg3);
    border-radius: var(--radius);
    font-size: 1rem;
    color: var(--text2);
    display: grid;
    place-items: center;
    transition: all var(--transition);
}
.vp-darkmode-btn:hover { background: var(--border); color: var(--text); }

.vp-menu-toggle {
    display: none;
    width: 34px;
    height: 34px;
    background: var(--bg3);
    border-radius: var(--radius);
    font-size: 1.2rem;
    color: var(--text2);
    place-items: center;
}

/* Search form */
.vp-search-desktop { flex: 1; max-width: 360px; }

.search-form,
.vp-search-form {
    display: flex;
    align-items: center;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color var(--transition);
}
.search-form:focus-within,
.vp-search-form:focus-within { border-color: var(--accent); }

.search-form label { display: flex; flex: 1; }
.search-form .search-field,
.vp-search-form input[type="search"] {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 8px 14px;
    font-size: .875rem;
    color: var(--text);
    width: 100%;
}
.search-form .search-field::placeholder { color: var(--text3); }

.search-form .search-submit,
.vp-search-form button {
    background: transparent;
    border: none;
    padding: 8px 14px;
    cursor: pointer;
    color: var(--text3);
    font-size: .95rem;
    transition: color var(--transition);
}
.search-form .search-submit:hover,
.vp-search-form button:hover { color: var(--accent); }

/* Mobile search */
.vp-header-search-mobile .search-form { width: 100%; }

/* ========================================
   SECTION TITLE
======================================== */
.vp-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border);
    flex-wrap: wrap;
    gap: 10px;
}

.vp-section-title h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.vp-icon-cat::before { content: '🐱 '; }

/* ========================================
   POST GRID (blog cards)
======================================== */
.vp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.vp-grid.vp-grid-large { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.vp-grid.vp-grid-small { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* POST CARD */
.vp-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    display: flex;
    flex-direction: column;
}

.vp-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
}

.vp-card-thumb {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bg3);
}

.vp-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.vp-card:hover .vp-card-thumb img { transform: scale(1.06); }

/* Categoria badge sobre a imagem */
.vp-card-cat-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--accent);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: .04em;
    z-index: 2;
}

/* Tempo de leitura badge */
.vp-card-readtime {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,.72);
    color: #fff;
    font-size: .7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
    z-index: 2;
}

.vp-card-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }

.vp-card-title {
    font-size: .925rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.vp-card-title a { color: inherit; }
.vp-card-title a:hover { color: var(--accent); }

.vp-card-excerpt {
    font-size: .8rem;
    color: var(--text2);
    line-height: 1.55;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vp-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .75rem;
    color: var(--text3);
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.vp-card-date { display: flex; align-items: center; gap: 4px; }
.vp-card-cats a {
    color: var(--accent);
    font-size: .72rem;
    font-weight: 600;
}

/* ========================================
   CATEGORIA PAGE
======================================== */
.vp-cats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.vp-cat-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    text-decoration: none;
    display: block;
    color: inherit;
}

.vp-cat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
    color: inherit;
}

.vp-cat-card-thumb {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bg3);
}

.vp-cat-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.vp-cat-card:hover .vp-cat-card-thumb img { transform: scale(1.06); }

.vp-cat-card-body {
    padding: 14px 16px 16px;
}

.vp-cat-card-name {
    font-size: .95rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.vp-cat-card-count {
    font-size: .78rem;
    color: var(--text3);
}

/* ========================================
   SINGLE POST
======================================== */
.vp-single-info {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.vp-single-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 14px;
    line-height: 1.35;
}

.vp-single-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 20px;
    font-size: .8rem;
    color: var(--text3);
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.vp-single-meta span { display: flex; align-items: center; gap: 5px; }
.vp-single-meta a { color: var(--accent); }

/* Featured image no single */
.vp-single-featured {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 20px;
    aspect-ratio: 16/9;
}

.vp-single-featured img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Conteúdo do post */
.vp-single-desc {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    color: var(--text2);
    font-size: .95rem;
    line-height: 1.8;
}

.vp-single-desc h2,
.vp-single-desc h3,
.vp-single-desc h4 {
    color: var(--text);
    margin: 20px 0 10px;
    font-weight: 700;
    line-height: 1.3;
}
.vp-single-desc h2 { font-size: 1.25rem; }
.vp-single-desc h3 { font-size: 1.1rem; }
.vp-single-desc h4 { font-size: 1rem; }

.vp-single-desc p { margin-bottom: 14px; }
.vp-single-desc ul, .vp-single-desc ol {
    margin: 12px 0 16px 20px;
    list-style: disc;
}
.vp-single-desc ol { list-style: decimal; }
.vp-single-desc li { margin-bottom: 6px; }

.vp-single-desc a { color: var(--accent); }
.vp-single-desc a:hover { color: var(--accent2); text-decoration: underline; }

.vp-single-desc img {
    border-radius: var(--radius);
    margin: 14px 0;
    max-width: 100%;
}

.vp-single-desc blockquote {
    border-left: 3px solid var(--accent);
    padding: 12px 16px;
    background: var(--bg3);
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 16px 0;
    color: var(--text2);
    font-style: italic;
}

.vp-single-desc strong { color: var(--text); font-weight: 700; }
.vp-single-desc code {
    background: var(--bg3);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: .85em;
    font-family: monospace;
}

/* Tags */
.vp-single-tags { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.vp-single-tags a {
    background: var(--bg3);
    border: 1px solid var(--border);
    color: var(--text2);
    font-size: .75rem;
    padding: 3px 10px;
    border-radius: 50px;
    transition: all var(--transition);
}
.vp-single-tags a:hover { border-color: var(--accent); color: var(--accent); }

/* Share */
.vp-share {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}
.vp-share h3 {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text2);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.vp-share-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.vp-share-btns a {
    padding: 7px 16px;
    border-radius: 6px;
    font-size: .8rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: opacity var(--transition);
}
.vp-share-btns a:hover { opacity: .85; color: #fff; }
.vp-share-facebook  { background: #1877f2; }
.vp-share-twitter   { background: #1da1f2; }
.vp-share-whatsapp  { background: #25d366; }
.vp-share-telegram  { background: #0088cc; }
.vp-share-pinterest { background: #e60023; }

/* Related posts */
.vp-related-wrap { margin-top: 28px; }

/* ========================================
   SIDEBAR
======================================== */
.vp-sidebar { min-width: 0; }

.vp-widget {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.vp-widget-title {
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text2);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 7px;
}

.vp-widget-title::before {
    content: '';
    display: block;
    width: 3px;
    height: 13px;
    background: var(--accent);
    border-radius: 2px;
}

/* Recent posts widget */
.vp-widget-posts .vp-mini-post {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.vp-widget-posts .vp-mini-post:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.vp-mini-post-thumb {
    width: 70px;
    min-width: 70px;
    height: 52px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg3);
}
.vp-mini-post-thumb img { width: 100%; height: 100%; object-fit: cover; }

.vp-mini-post-title { font-size: .8rem; font-weight: 500; color: var(--text); line-height: 1.4; }
.vp-mini-post-title a { color: inherit; }
.vp-mini-post-title a:hover { color: var(--accent); }
.vp-mini-post-meta { font-size: .72rem; color: var(--text3); margin-top: 4px; }

/* Categories widget */
.vp-widget-cats ul li { border-bottom: 1px solid var(--border); }
.vp-widget-cats ul li:last-child { border-bottom: none; }
.vp-widget-cats ul li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    font-size: .85rem;
    color: var(--text2);
    transition: color var(--transition);
}
.vp-widget-cats ul li a:hover { color: var(--accent); }
.vp-widget-cats ul li a .cat-count,
.vp-widget-cats ul li a span {
    background: var(--bg3);
    padding: 1px 8px;
    border-radius: 50px;
    font-size: .7rem;
    color: var(--text3);
}

/* Tags widget */
.vp-widget-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.vp-widget-tags a {
    background: var(--bg3);
    border: 1px solid var(--border);
    color: var(--text2);
    font-size: .75rem;
    padding: 4px 10px;
    border-radius: 50px;
    transition: all var(--transition);
}
.vp-widget-tags a:hover { border-color: var(--accent); color: var(--accent); }

/* Sobre widget */
.vp-widget-about { text-align: center; }
.vp-widget-about .about-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 12px;
    border: 3px solid var(--accent);
}
.vp-widget-about .about-avatar img { width: 100%; height: 100%; object-fit: cover; }
.vp-widget-about .about-name { font-weight: 700; color: var(--text); margin-bottom: 6px; }
.vp-widget-about .about-bio { font-size: .82rem; color: var(--text2); line-height: 1.55; }

/* WP default widgets */
.vp-widget ul { list-style: none; }
.vp-widget ul li { padding: 6px 0; border-bottom: 1px solid var(--border); font-size: .85rem; color: var(--text2); }
.vp-widget ul li:last-child { border-bottom: none; }
.vp-widget ul li a { color: var(--text2); }
.vp-widget ul li a:hover { color: var(--accent); }
.vp-widget p { font-size: .85rem; color: var(--text2); line-height: 1.6; }
.vp-widget select { width: 100%; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 10px; color: var(--text); font-size: .85rem; }

/* ========================================
   PAGINATION
======================================== */
.vp-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.vp-pagination a,
.vp-pagination span {
    min-width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    font-size: .875rem;
    font-weight: 500;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text2);
    transition: all var(--transition);
    padding: 0 10px;
}

.vp-pagination a:hover { background: var(--bg3); border-color: var(--accent); color: var(--accent); }
.vp-pagination .current { background: var(--accent); border-color: var(--accent); color: #fff; }

/* WP-PageNavi override */
.wp-pagenavi { display: flex; justify-content: center; gap: 6px; margin-top: 28px; flex-wrap: wrap; }
.wp-pagenavi a, .wp-pagenavi span {
    min-width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius) !important;
    font-size: .875rem;
    background: var(--card) !important;
    border: 1px solid var(--border) !important;
    color: var(--text2) !important;
    transition: all var(--transition);
    padding: 0 10px;
}
.wp-pagenavi a:hover { background: var(--bg3) !important; border-color: var(--accent) !important; color: var(--accent) !important; }
.wp-pagenavi span.current { background: var(--accent) !important; border-color: var(--accent) !important; color: #fff !important; }

/* ========================================
   FOOTER
======================================== */
.vp-footer {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    padding: 32px 0 16px;
    margin-top: auto;
}

.vp-footer-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-bottom: 24px;
}

.vp-footer-col h4 {
    font-size: .85rem;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.vp-footer-col p { font-size: .85rem; color: var(--text3); line-height: 1.65; }
.vp-footer-col a { font-size: .85rem; color: var(--text3); }
.vp-footer-col ul li { margin-bottom: 7px; }
.vp-footer-col ul li a:hover { color: var(--accent); }

.vp-footer-bottom {
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    font-size: .8rem;
    color: var(--text3);
}

/* ========================================
   404 & SEARCH
======================================== */
.vp-404 {
    text-align: center;
    padding: 80px 20px;
}
.vp-404 h1 { font-size: 4rem; font-weight: 900; margin-bottom: 8px; }
.vp-404 h2 { font-size: 1.5rem; color: var(--text); margin-bottom: 12px; }
.vp-404 p { color: var(--text2); margin-bottom: 24px; }
.vp-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent);
    color: #fff;
    padding: 10px 22px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: .9rem;
    transition: background var(--transition);
}
.vp-btn:hover { background: var(--accent2); color: #fff; }

/* ========================================
   COMMENTS
======================================== */
.vp-comments {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--border);
    margin-top: 20px;
}
.vp-comments h2 { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 18px; }

/* WP native comments styling */
.commentlist { list-style: none; }
.comment { padding: 16px 0; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: none; }
.comment-author img { border-radius: 50%; }
.comment-author .fn { font-weight: 600; color: var(--text); font-size: .875rem; }
.comment-meta { font-size: .75rem; color: var(--text3); margin-bottom: 8px; }
.comment-content p { font-size: .875rem; color: var(--text2); line-height: 1.65; }
.reply a { font-size: .75rem; color: var(--accent); margin-top: 6px; display: inline-block; }

.comment-form-comment textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
    width: 100%;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    color: var(--text);
    font-size: .875rem;
    outline: none;
    transition: border-color var(--transition);
    margin-bottom: 10px;
}
.comment-form-comment textarea:focus,
.comment-form input:focus { border-color: var(--accent); }
.comment-form-comment textarea { min-height: 100px; resize: vertical; }
.comment-form input[type="submit"],
.form-submit input[type="submit"] {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 9px 22px;
    font-weight: 600;
    font-size: .875rem;
    cursor: pointer;
    transition: background var(--transition);
}
.comment-form input[type="submit"]:hover,
.form-submit input[type="submit"]:hover { background: var(--accent2); }

/* ========================================
   LIGHT MODE
======================================== */
html.sv-light body {
    --bg: #f5f5f7;
    --bg2: #ffffff;
    --bg3: #ebebee;
    --card: #ffffff;
    --card-hover: #f0f0f3;
    --border: #d8d8de;
    --text: #16161a;
    --text2: #55555f;
    --text3: #8888a0;
    --shadow: 0 4px 20px rgba(0,0,0,.12);
    --shadow-card: 0 2px 10px rgba(0,0,0,.08);
    --link: #444450;
}
body.light-mode {
    --bg: #f5f5f7;
    --bg2: #ffffff;
    --bg3: #ebebee;
    --card: #ffffff;
    --card-hover: #f0f0f3;
    --border: #d8d8de;
    --text: #16161a;
    --text2: #55555f;
    --text3: #8888a0;
    --shadow: 0 4px 20px rgba(0,0,0,.12);
    --shadow-card: 0 2px 10px rgba(0,0,0,.08);
    --link: #444450;
}

/* ========================================
   WIDGET CATEGORIAS HOME
======================================== */
.sv-home-cats { margin-top: 36px; }
.sv-home-cats-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sv-home-cats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}
.sv-home-cat-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition), border-color var(--transition);
    text-decoration: none;
    display: block;
    color: inherit;
}
.sv-home-cat-item:hover { transform: translateY(-2px); border-color: var(--accent); }
.sv-home-cat-thumb { aspect-ratio: 16/9; overflow: hidden; background: var(--bg3); }
.sv-home-cat-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.sv-home-cat-item:hover .sv-home-cat-thumb img { transform: scale(1.06); }
.sv-home-cat-info { padding: 10px 12px; }
.sv-home-cat-name { font-size: .875rem; font-weight: 700; color: var(--text); }
.sv-home-cat-count { font-size: .75rem; color: var(--text3); margin-top: 2px; }

/* ========================================
   LINK DE EDITAR POST (admins)
======================================== */
.vp-edit-link { display: inline-block; margin-top: 6px; }
.vp-edit-link a {
    font-size: .75rem;
    color: var(--text3);
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 4px;
    transition: all var(--transition);
}
.vp-edit-link a:hover { color: var(--accent); border-color: var(--accent); }

/* ========================================
   MOBILE BANNER ADS
======================================== */
.sv-mobile-banner { margin: 12px 0; text-align: center; }

/* ========================================
   WIDGETS MOBILE
======================================== */
.sv-mobile-widgets { padding-top: 20px; }
@media (min-width: 1025px) { .sv-mobile-widgets { display: none; } }

/* ========================================
   EMBEDS RESPONSIVOS
======================================== */
.wp-block-embed__wrapper,
.vp-embed-responsive {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}
.wp-block-embed__wrapper iframe,
.vp-embed-responsive iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 1024px) {
    .vp-content-wrap { grid-template-columns: 1fr; }
    .vp-footer-inner { grid-template-columns: 1fr 1fr; }

    /* Sidebar vira bloco abaixo do conteúdo em grid de 2 colunas */
    .vp-sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 18px;
        align-items: start;
        width: 100%;
        margin-top: 28px;
    }

    /* Cada widget ocupa 1 coluna; sem margin-bottom extra pois o gap já cuida */
    .vp-sidebar .vp-widget { margin-bottom: 0; }

    /* Widget "Sobre" e "Posts Recentes" ocupam coluna inteira */
    .vp-sidebar .vp-widget-about,
    .vp-sidebar .vp-widget-posts { grid-column: 1 / -1; }
}

@media (max-width: 540px) {
    /* Em telas muito pequenas vira 1 coluna */
    .vp-sidebar { grid-template-columns: 1fr; }
    .vp-sidebar .vp-widget-about,
    .vp-sidebar .vp-widget-posts { grid-column: auto; }
}

@media (max-width: 768px) {
    .vp-nav { display: none; }
    .vp-nav.is-open {
        display: flex;
        position: fixed;
        inset: var(--header-h) 0 0;
        background: var(--bg2);
        flex-direction: column;
        padding: 20px;
        z-index: 999;
        overflow-y: auto;
    }
    .vp-nav.is-open ul { flex-direction: column; width: 100%; }
    .vp-nav.is-open ul li a { padding: 12px 16px; font-size: 1rem; }
    .vp-menu-toggle { display: grid; }
    .vp-search-desktop { display: none; }
    .vp-header-search-mobile { display: flex; }
    .vp-header {
        height: auto;
        position: sticky;
        top: 0;
    }
    .vp-header-row { height: var(--header-h); }

    /* Logo responsiva */
    .vp-logo-img,
    .vp-logo .custom-logo-link img,
    .vp-logo .custom-logo-link .vp-logo-img {
        height: 32px;
        max-width: 130px;
    }
    .vp-logo-text { font-size: 1rem; max-width: 150px; }
    .vp-logo-full  { display: none; }
    .vp-logo-short { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .vp-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
    .vp-cats-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    .vp-footer-inner { grid-template-columns: 1fr; gap: 20px; }
    .vp-single-title { font-size: 1.25rem; }}

@media (max-width: 480px) {
    .vp-grid { grid-template-columns: 1fr 1fr; }
    .vp-cats-grid { grid-template-columns: 1fr 1fr; }
    .sv-home-cats-grid { grid-template-columns: 1fr 1fr; }
    .vp-footer-inner { grid-template-columns: 1fr; }
    .vp-share-btns a { padding: 7px 12px; font-size: .75rem; }
}
