/* =====================================================
   AmoDesenho — Estilo lúdico e infantil
   ===================================================== */

:root {
    /* Paleta viva e alegre */
    --ad-yellow:  #ffd93d;
    --ad-orange:  #ff6b35;
    --ad-pink:    #ff4d94;
    --ad-purple:  #9b5de5;
    --ad-blue:    #00bbf9;
    --ad-green:   #00f5d4;
    --ad-lime:    #c9f218;

    /* Neutros */
    --ad-ink:     #1a1a2e;
    --ad-muted:   #6b7280;
    --ad-line:    #e5e7eb;
    --ad-bg:      #fffdf6;
    --ad-white:   #ffffff;

    /* Sombra fofa */
    --shadow-card: 4px 4px 0px rgba(0,0,0,.12);
    --shadow-hover: 6px 6px 0px rgba(0,0,0,.18);

    /* Border radius arredondado */
    --radius-card: 18px;
    --radius-pill: 999px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--ad-bg);
    color: var(--ad-ink);
    font-family: 'Nunito', 'Fredoka One', system-ui, -apple-system, sans-serif;
}

a {
    color: inherit;
}

/* ─── NAVBAR ─────────────────────────────────────── */

.site-nav {
    min-height: 68px;
    background: var(--ad-white) !important;
    border-bottom: 3px solid var(--ad-yellow) !important;
}

.brand-mark {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    margin-right: 8px;
    border-radius: 12px;
    background: var(--ad-orange);
    color: #fff;
    font-size: .85rem;
    font-weight: 900;
    box-shadow: 3px 3px 0 rgba(0,0,0,.15);
    transform: rotate(-3deg);
}

.navbar-brand {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--ad-ink) !important;
    letter-spacing: -0.5px;
}

.btn-icon {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 2px solid var(--ad-yellow);
    border-radius: 12px;
    background: var(--ad-white);
    transition: background .15s, transform .12s;
}

.btn-icon:hover {
    background: var(--ad-yellow);
    transform: scale(1.08);
}

.btn-icon i {
    font-size: 1.25rem;
}

/* Search bar no nav */
.search-mini {
    width: min(520px, 42vw);
}

.search-mini input {
    border-radius: 999px 0 0 999px;
    border: 2px solid var(--ad-blue);
    border-right: none;
    font-family: inherit;
    font-weight: 600;
}

.search-mini input:focus {
    box-shadow: none;
    border-color: var(--ad-purple);
    outline: none;
}

.search-mini button {
    border-radius: 0 999px 999px 0;
    width: 52px;
    background: var(--ad-blue);
    border-color: var(--ad-blue);
}

.search-mini button:hover {
    background: var(--ad-purple);
    border-color: var(--ad-purple);
}

/* ─── OFFCANVAS / MENU CATEGORIAS ────────────────── */

.offcanvas-title {
    font-weight: 900;
    font-size: 1.25rem;
    color: var(--ad-orange);
}

.list-group-item-action {
    font-weight: 700;
    border-left: 4px solid transparent;
    transition: border-color .15s, background .15s;
}

.list-group-item-action:hover {
    border-left-color: var(--ad-pink);
    background: #fff7f0;
    color: var(--ad-ink);
}

/* ─── HERO ───────────────────────────────────────── */

.hero {
    padding: 72px 0 38px;
    background: linear-gradient(135deg, #fff9e6 0%, #f0f8ff 100%);
    border-bottom: 3px dashed var(--ad-yellow);
    position: relative;
    overflow: hidden;
    text-align: center;
}

/* estrelinhas decorativas */
.hero::before,
.hero::after {
    content: '★';
    position: absolute;
    font-size: 5rem;
    opacity: .06;
    pointer-events: none;
}

.hero::before {
    top: -12px;
    right: 60px;
    transform: rotate(12deg);
    color: var(--ad-orange);
}

.hero::after {
    bottom: -18px;
    left: 30px;
    transform: rotate(-8deg);
    color: var(--ad-purple);
}

.hero h1 {
    font-weight: 900;
    font-size: clamp(1.5rem, 5vw, 2.6rem);
    line-height: 1.1;
    letter-spacing: -0.5px;
    color: var(--ad-ink);
}

.hero p {
    color: var(--ad-muted);
    font-size: 1.15rem;
    font-weight: 600;
}

.hero-search {
    display: flex;
    margin: 0px auto;
    max-width: 680px;
    border: 3px solid var(--ad-orange);
    border-radius: 999px;
    padding: 5px;
    background: #fff;
    box-shadow: 4px 4px 0 var(--ad-yellow);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    padding: 14px 20px;
    outline: 0;
    border-radius: 999px;
    font-family: inherit;
    font-weight: 700;
    font-size: 1rem;
    background: transparent;
}

.hero-search button {
    border-radius: 999px !important;
    padding-inline: 24px;
    font-weight: 900;
    font-family: inherit;
    background: var(--ad-orange);
    border-color: var(--ad-orange);
    color: #fff;
    transition: background .15s, transform .12s;
}

.hero-search button:hover {
    background: var(--ad-pink);
    border-color: var(--ad-pink);
    transform: scale(1.04);
}

/* ─── SECTIONS ───────────────────────────────────── */

.section {
    padding: 20px 0;
}

.section-title {
    /* 
    display: flex;
    align-items: center;
    justify-content: space-between;
    */
    gap: 16px;
    margin-bottom: 20px;
}

.section-title h2 {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 900;
    position: relative;
    padding-bottom: 6px;
}

/* sublinhado colorido no título de seção */
.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 48px;
    height: 4px;
    border-radius: 999px;
    background: var(--ad-yellow);
}

/* ─── GRIDS ──────────────────────────────────────── */

.category-grid,
.drawing-grid {
    display: grid;
    gap: 15px;
}

.drawing-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.category-grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .drawing-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}



/* ─── CARDS ──────────────────────────────────────── */

.category-card,
.drawing-card {
    display: block;
    overflow: hidden;
    border: 2.5px solid var(--ad-line);
    border-radius: var(--radius-card);
    background: var(--ad-white);
    text-decoration: none;
    box-shadow: var(--shadow-card);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.category-card:hover,
.drawing-card:hover {
    transform: translateY(-4px) rotate(-1deg);
    border-color: var(--ad-yellow);
    box-shadow: var(--shadow-hover);
}

/* Bordas coloridas rotativas nos cards de categoria */
.category-grid .category-card:nth-child(6n+1) { border-color: var(--ad-yellow); }
.category-grid .category-card:nth-child(6n+2) { border-color: var(--ad-orange); }
.category-grid .category-card:nth-child(6n+3) { border-color: var(--ad-pink);   }
.category-grid .category-card:nth-child(6n+4) { border-color: var(--ad-purple); }
.category-grid .category-card:nth-child(6n+5) { border-color: var(--ad-blue);   }
.category-grid .category-card:nth-child(6n+6) { border-color: var(--ad-green);  }

.category-card img,
.drawing-card-image {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    background: #fff9f0;
}

.category-card img{
    max-height: 200px;
}

@media (max-width: 768px) {
    .category-card img{
        width: 100%;
        max-width: 190px;
        max-height: 180px;
    }
}

.drawing-card-image {
    padding: 10px;
    border-bottom: 2px dashed var(--ad-line);
    background: #ffF;
}

.drawing-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.category-card-title,
.drawing-card-title {
    display: block;
    min-height: 48px;
    padding: 10px 12px;
    font-weight: 800;
    font-size: .95rem;
    line-height: 1.3;
    color: var(--ad-ink);
}

/* ─── PAGINAÇÃO ──────────────────────────────────── */

.pagination .page-link {
    border-radius: 10px !important;
    font-weight: 800;
    border: 2px solid var(--ad-line);
    margin: 0 2px;
    color: var(--ad-ink);
    transition: background .14s, border-color .14s;
}

.pagination .page-item.active .page-link {
    background: var(--ad-orange);
    border-color: var(--ad-orange);
    color: #fff;
}

.pagination .page-link:hover {
    background: var(--ad-yellow);
    border-color: var(--ad-yellow);
    color: var(--ad-ink);
}

/* ─── PÁGINA DE DESENHO ───────────────────────────── */

.drawing-section{
    width: 100%;
    max-width: 1000px;
    margin: 0px auto;
    padding: 10px !important;
}

.drawing-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    align-items: start;
}

/* Sidebar direita: tags + ad empilhados com gap */
.drawing-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.paper-box {
    width: 100%;
    padding: 10px;
    border: 3px dashed var(--ad-yellow);
    border-radius: var(--radius-card);
    background: var(--ad-white);
    /* Centraliza o bloco e limita a largura */
    max-width: 700px;
    max-height: 700px;
    margin-inline: auto;
}

.paper-box img {
    width: 100%;
    display: block;
    max-width: 630px;
    max-height: 630px;
    aspect-ratio: 1;
    object-fit: contain;
    margin: 0 auto;
    background: var(--ad-white);
}

@media (max-width: 768px) {
    .paper-box img {
        max-width: 400px;
        max-height: 400px;
    }
}


/* ─── AD PANEL ───────────────────────────────────── */

.ad-panel {
    border: 2.5px dashed var(--ad-line);
    border-radius: var(--radius-card);
    background: var(--ad-white);
    padding: 14px;
    box-shadow: var(--shadow-card);
    text-align: center;
    overflow: hidden;
}

.ad-panel-label {
    display: block;
    font-size: .72rem;
    font-weight: 700;
    color: var(--ad-muted);
    letter-spacing: .05em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

/* Botões de ação: imprimir / baixar / curtir */
.action-row .btn {
    font-family: inherit;
    font-weight: 900;
    border-radius: 14px;
    padding: 10px 20px;
    border-width: 2.5px;
    transition: transform .14s, box-shadow .14s;
    box-shadow: 3px 3px 0 rgba(0,0,0,.12);
}

.action-row .btn:hover {
    transform: translateY(-2px);
    box-shadow: 4px 5px 0 rgba(0,0,0,.18);
}

.action-row .btn-success {
    background: var(--ad-green);
    border-color: #00c9aa;
    color: var(--ad-ink);
}

.action-row .btn-primary {
    background: var(--ad-blue);
    border-color: #009ccf;
    color: var(--ad-ink);
}

.action-row .btn-outline-danger {
    border-color: var(--ad-pink);
    color: var(--ad-pink);
}

.action-row .btn-outline-danger:hover {
    background: var(--ad-pink);
    color: #fff;
}

/* ─── SIDE PANEL / COMMENT / EMPTY STATE ─────────── */

.side-panel,
.comment-panel,
.empty-state {
    border: 2.5px solid var(--ad-line);
    border-radius: var(--radius-card);
    background: var(--ad-white);
    padding: 20px;
    box-shadow: var(--shadow-card);
}

.empty-state {
    text-align: center;
    color: var(--ad-muted);
    font-weight: 700;
    padding: 32px 20px;
}

/* ─── TAGS ───────────────────────────────────────── */

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.tag-list a {
    padding: 6px 14px;
    border: 2px solid var(--ad-line);
    border-radius: 999px;
    background: var(--ad-bg);
    color: var(--ad-muted);
    text-decoration: none;
    font-size: .88rem;
    font-weight: 800;
    transition: background .14s, border-color .14s, color .14s;
}

.tag-list a:hover {
    background: var(--ad-yellow);
    border-color: var(--ad-yellow);
    color: var(--ad-ink);
}

/* ─── BREADCRUMB / LINKS DE CATEGORIA ───────────── */

.text-primary {
    color: var(--ad-purple) !important;
    font-weight: 800;
}

/* ─── BOTÕES GLOBAIS ─────────────────────────────── */

.btn-primary {
    background: var(--ad-blue);
    border-color: var(--ad-blue);
    font-family: inherit;
    font-weight: 800;
    border-radius: 12px;
}

.btn-danger {
    background: var(--ad-orange);
    border-color: var(--ad-orange);
    font-family: inherit;
    font-weight: 800;
    border-radius: 12px;
}

.btn-outline-primary {
    border-color: var(--ad-blue);
    color: var(--ad-blue);
    font-family: inherit;
    font-weight: 800;
    border-radius: 12px;
}

.btn-outline-secondary {
    font-family: inherit;
    font-weight: 800;
    border-radius: 12px;
}

/* ─── FOOTER ─────────────────────────────────────── */

.site-footer {
    margin-top: 30px;
    padding: 24px 0;
    background: var(--ad-white);
    border-top: 3px dashed var(--ad-yellow) !important;
    font-weight: 700;
}

.language-switcher a {
    margin-left: 10px;
    color: var(--ad-muted);
    text-decoration: none;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    transition: background .14s, color .14s;
    font-size: 12px;
}

.language-switcher a:hover {
    background: var(--ad-yellow);
    color: var(--ad-ink);
}

.language-switcher a.active {
    background: var(--ad-orange);
    color: #fff;
    font-weight: 900;
}

/* ─── RESPONSIVO ─────────────────────────────────── */

@media (max-width: 900px) {
    .drawing-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .hero-search {
        border-radius: 18px;
        flex-direction: column;
        box-shadow: none;
    }

    .hero-search button {
        width: 100%;
        border-radius: 14px !important;
    }
}

/* ─── PRINT ──────────────────────────────────────── */

@media print {
    .site-nav,
    .site-footer,
    .side-panel,
    .action-row,
    .section,
    .comment-panel {
        display: none !important;
    }

    body {
        background: #fff;
    }

    .paper-box {
        border: 0;
        padding: 0;
        box-shadow: none;
    }

    .paper-box img {
        width: 100%;
        max-width: none;
    }
}



.view-comment-image{
    max-width: 100px;
}

.btn-action{

    transition:all .2s;

}

.btn-action.action-success{

    transform:scale(1.08);

}

.btn-action:disabled{

    opacity:.7;

}


.toast-action{

    position:fixed;
    bottom:20px;
    left:50%;
    transform:translateX(-50%);

    background:#212529;
    color:#fff;

    padding:10px 18px;

    border-radius:30px;

    opacity:0;
    transition:.25s;

    z-index:9999;
}

.toast-action.show{

    opacity:1;
    bottom:35px;

}


/* COMENTARIOS NA PAGINA DO DESENHO */

/* ===== Galeria de Desenhos Coloridos ===== */
.drawing-gallery {
    padding: 1rem;
    background: linear-gradient(135deg, #fff9e6, #ffffff);
    border: 2px dashed #ffc107;
    border-radius: 1rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.gallery-item {
    position: relative;
    display: block;
    border-radius: 0.75rem;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-item-author {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 18px 8px 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}

.gallery-item-author i {
    font-size: 0.65rem;
    flex-shrink: 0;
}

/* Mobile: grid um pouco mais compacto */
@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 8px;
    }
    .gallery-item-author {
        font-size: 0.65rem;
        padding: 14px 6px 5px;
    }
}

/* Efeito de clique sutil e divertido nos botões lúdicos */
.hover-scale {
    transition: transform 0.2s ease-in-out;
}
.hover-scale:hover {
    transform: scale(1.04);
}

/* Deixa as imagens anexadas com aspecto de foto Polaroid/Exposição */
.view-comment-image img {
    transition: transform 0.2s ease;
}
.view-comment-image:hover img {
    transform: rotate(2deg) scale(1.05);
}

/* Ajuste fino na borda tracejada nativa */
.border-dashed {
    border-style: dashed !important;
}