/* ARQUIVO: assets/css/parts/_special-cards.css */

/* IMPORTAÇÃO DE FONTES ORIGINAIS (Cinzel e Montserrat) */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Montserrat:wght@300;400;600&display=swap');

/* =========================================
   ESTRUTURA GERAL (Cards Existentes)
   ========================================= */
.ch-special-cards-section {
    width: 100%;
    margin: 60px auto;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Header */
.ch-special-header { display: flex; align-items: center; margin-bottom: 40px; position: relative; }
.ch-special-title {
    font-size: 1.75rem; font-weight: 700; color: var(--mod-text-color, #1a1a1a);
    margin: 0; position: relative; padding-right: 20px; background: var(--mod-bg-color, #fcfcfc); z-index: 2;
}
.ch-special-header::after { content: ''; position: absolute; top: 50%; left: 0; width: 100%; height: 1px; background: #e0e0e0; z-index: 1; }

/* Grids e Rotators dos cards antigos... */
.ch-special-grid { display: grid; gap: 30px; width: 100%; grid-template-columns: 1fr; }
@media (min-width: 600px) { .ch-special-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .ch-special-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } .ch-special-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }

.ch-special-rotator-wrapper { width: 100%; max-width: 450px; margin: 0 auto; position: relative; }
.ch-special-rotator { display: grid; grid-template-areas: "stack"; }
.ch-special-rotator .ch-special-card { grid-area: stack; width: 100%; opacity: 0; visibility: hidden; z-index: 1; pointer-events: none; transition: opacity 0.5s ease-in-out, visibility 0.5s; }
.ch-special-rotator .ch-special-card.active { opacity: 1 !important; visibility: visible !important; z-index: 5; pointer-events: auto; position: relative; }

/* CSS DOS CARDS ANTIGOS (Mantido) */
.ch-special-card { display: flex; flex-direction: column; background-color: #ffffff !important; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.08); border: 1px solid rgba(0,0,0,0.05); height: 100%; }
.ch-special-card:hover { transform: translateY(-5px); box-shadow: 0 20px 30px -5px rgba(0, 0, 0, 0.15); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.ch-special-img-wrapper { position: relative; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; background-color: #f0f0f0; flex-shrink: 0; }
.ch-special-img-wrapper img:not(.ch-special-logo-badge) { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.ch-special-card:hover .ch-special-img-wrapper img:not(.ch-special-logo-badge) { transform: scale(1.08); }
.ch-special-badge { position: absolute; top: 20px; left: 20px; right: auto; background: #7C4DFF; color: #fff; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.5px; padding: 8px 12px; border-radius: 4px; z-index: 10; text-transform: uppercase; box-shadow: 0 4px 6px rgba(0,0,0,0.2); transform: rotate(-3deg); }
.ch-special-logo-badge { position: absolute; top: 15px; right: 15px; left: auto; z-index: 10; width: 25%; min-width: 70px; max-width: 120px; height: auto; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); transition: transform 0.3s ease; }
.ch-special-card:hover .ch-special-logo-badge { transform: scale(1.1) rotate(5deg); }
.ch-special-content { padding: 25px; display: flex; flex-direction: column; flex-grow: 1; background: #fff; position: relative; z-index: 2; justify-content: space-between; }
.ch-special-card-title { margin: 0 0 20px 0 !important; font-size: 1.25rem !important; line-height: 1.4 !important; font-weight: 800 !important; color: #1a1a1a !important; display: block !important; display: -webkit-box !important; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ch-special-card-title a { color: inherit !important; text-decoration: none !important; }
.ch-special-footer { margin-top: auto; width: 100%; }
.ch-special-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 0.85rem; font-weight: 800; text-transform: uppercase; border: none !important; outline: none !important; padding: 12px 24px; border-radius: 50px; text-decoration: none !important; width: 100%; box-sizing: border-box; transition: all 0.2s ease; color: #fff !important; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.ch-special-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(0,0,0,0.3); }
.type-curio .ch-special-btn { background: linear-gradient(135deg, #7C4DFF 0%, #448AFF 100%); }
.type-aves .ch-special-btn { background: linear-gradient(135deg, #D32F2F 0%, #FF5252 100%); }

/* Dark Mode (Cards Antigos) */
body.ceclimar-dark-mode .ch-special-title { color: #fff; background: transparent; }
body.ceclimar-dark-mode .ch-special-card { background-color: #1e1e1e !important; border-color: #333; }
body.ceclimar-dark-mode .ch-special-content { background: #1e1e1e; }
body.ceclimar-dark-mode .ch-special-card-title { color: #fff !important; }
body.ceclimar-dark-mode .type-curio .ch-special-btn { background: #7C4DFF; }
body.ceclimar-dark-mode .type-aves .ch-special-btn { background: #D32F2F; }


/* =========================================================
   NOVO: EFEITO CARD 3D - MONITORAMENTO (AJUSTADO)
   ========================================================= */

/* Container Principal */
.card-container-3d {
    position: relative;
    width: 100%; 
    max-width: 380px;
    margin: 100px auto 40px auto; 
    perspective: 1000px;
    font-family: 'Montserrat', sans-serif;
    padding: 0 10px;
    box-sizing: border-box;
}

/* O Cartão (Fundo) */
.card-3d {
    background: var(--mod-element-bg, #ffffff);
    color: var(--mod-text-color, #333333);
    /* Borda fina discreta no card em si, se desejar */
    border: 1px solid var(--mod-border-color, #d4c5a3);
    
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    position: relative;
    
    padding-top: 240px; 
    padding-bottom: 30px;
    
    box-shadow: 0 30px 60px rgba(0,0,0,0.15); 
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    
    min-height: 500px; 
    display: flex;
    flex-direction: column;
}

/* Container da Imagem */
.image-box-3d {
    position: absolute;
    top: -100px;
    left: 0;
    width: 100%;
    height: 320px;
    z-index: 10;
    pointer-events: none; 
}

/* --- AJUSTES DA FOTO (BORDAS E CANTOS) --- */
.main-image-3d {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center; 
    
    /* CANTOS SUPERIORES ARREDONDADOS (Inferiores Retos) */
    border-radius: 20px 20px 0 0;
    
    /* BORDAS DOURADAS APENAS NAS LATERAIS */
    border-left: 4px solid #C5A059;  /* Dourado do botão */
    border-right: 4px solid #C5A059; /* Dourado do botão */
    border-top: none;
    border-bottom: none;

    /* Gradiente na base da foto */
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 80%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 0%, black 80%, transparent 100%);
    
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.4));
}

/* Conteúdo de Texto */
.content-3d {
    position: relative;
    z-index: 20;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.category-3d {
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #C5A059; 
    margin-bottom: 12px;
    display: block;
    font-weight: 600;
}

.title-3d {
    font-family: 'Cinzel', serif !important; 
    font-size: 1.3rem !important; 
    line-height: 1.4 !important;
    margin-bottom: 15px !important;
    margin-top: 0 !important;
    color: var(--mod-text-color, #1a1814) !important;
    text-shadow: none;
    background: none;
}

.text-3d {
    color: var(--mod-text-color, #555);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 25px;
    padding: 0 5px;
    text-align: justify;
    text-align-last: center;
    font-family: 'Montserrat', sans-serif;
}

/* Botão Dourado (Sem sublinhado e Cor Fixa) */
.btn-action-3d {
    display: inline-block;
    padding: 10px 25px;
    background: transparent;
    border: 1px solid #C5A059 !important;
    color: #C5A059 !important;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    
    text-decoration: none !important;
    border-bottom: 1px solid #C5A059 !important;
    
    margin-top: auto;
    align-self: center;
}

a.btn-action-3d {
    border-bottom: none !important;
    border: 1px solid #C5A059 !important;
}

.btn-action-3d:hover {
    background: #C5A059;
    color: #1a1814 !important;
    box-shadow: 0 0 20px rgba(197, 160, 89, 0.4);
    text-decoration: none !important;
}

/* --- MODO ESCURO --- */
body.ceclimar-dark-mode .card-3d {
    background: linear-gradient(to bottom, #2c2a25, #1a1814);
    border-color: #444;
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

body.ceclimar-dark-mode .title-3d {
    background: linear-gradient(to right, #d4c5a3, #fcf6ba, #9c8c74);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    text-shadow: 0 5px 10px rgba(0,0,0,0.3);
}

body.ceclimar-dark-mode .text-3d {
    color: #bbb;
}

@supports not (background-clip: text) {
    body.ceclimar-dark-mode .title-3d {
        color: #d4c5a3 !important;
        background: none;
    }
}

/* --- RESPONSIVIDADE EXTRA --- */
@media (max-width: 480px) {
    .card-container-3d {
        max-width: 100%;
        margin-top: 80px;
    }
    .image-box-3d {
        height: 250px;
        top: -80px;
    }
    .card-3d {
        padding-top: 180px;
        min-height: auto;
    }
}