/* Basic Style for Collections */
.dvc-archive-wrapper {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    margin: 30px auto;
    max-width: 1200px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}


/* Grid Layout handled by Bootstrap in this theme context */

/* Collection Card (Archive) - Enhanced */
.dvc-collections-grid {
    display: grid;
    grid-template-columns: repeat(var(--dvc-cols, 3), 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .dvc-collections-grid {
        grid-template-columns: repeat(1, 1fr) !important;
    }
}


.dvc-collection-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    /* Soft shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    display: flex;
    flex-direction: column;
}

.dvc-collection-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.dvc-card-image {
    display: block;
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    border-bottom: 1px solid #f0f0f0;
}

.dvc-card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.6) 100%);
    pointer-events: none;
}

.dvc-view-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: #2271b1;
    /* WordPress Blue or Theme Color */
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s;
    z-index: 2;
}

.dvc-collection-card:hover .dvc-view-btn {
    opacity: 1;
    transform: translateY(0);
}

.dvc-item-count {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    z-index: 2;
}

.dvc-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Specific H2 Override for Cards */
.dvc-collection-card h2.dvc-card-title {
    /* Resets to avoid Theme H2 bleeding */
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 0 10px !important;
    text-transform: none !important;
    /* Just in case theme forces uppercase */

    /* Enforced Plugin Styles */
    font-size: 20px !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
    color: #1d2327 !important;
}

.dvc-collection-card h2.dvc-card-title a {
    text-decoration: none !important;
    color: #1d2327 !important;
    transition: color 0.2s;
    box-shadow: none !important;
    /* Remove link underlines if theme uses box-shadow */
}

#content .dvc-collection-card h2.dvc-card-title a:hover,
.dvc-collection-card h2.dvc-card-title a:hover {
    color: #2271b1 !important;
}

.dvc-card-divider {
    width: 40px;
    height: 3px;
    background-color: #2271b1;
    /* Blue accent */
    margin: 5px 0 15px 0;
    border-radius: 2px;
}

.dvc-excerpt p {
    font-size: 14px;
    color: #646970;
    line-height: 1.5;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Banner Shortcode [collection_card] */
.dvc-collection-banner {
    width: 100%;
    min-height: 250px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.dvc-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.5) 60%, rgba(0, 0, 0, 0.2) 100%);
    display: flex;
    align-items: center;
    padding: 40px;
}

.dvc-banner-content {
    max-width: 60%;
    color: #fff;
}

.dvc-banner-content h2 {
    color: #fff;
    font-size: 32px;
    margin: 0 0 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.dvc-banner-content p {
    font-size: 16px;
    margin: 0 0 25px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

/* Specific Reset for Banner Titles to override Theme/Plugin injections */
.dvc-banner-content h1,
.dvc-banner-content h2 {
    background-image: none !important;
    position: static !important;
    /* Reset pseudo-elements often used for underlines/decorations */
}

.dvc-banner-content h1::before,
.dvc-banner-content h1::after,
.dvc-banner-content h2::before,
.dvc-banner-content h2::after {
    content: none !important;
    display: none !important;
    background: none !important;
    width: 0 !important;
    height: 0 !important;
}

.dvc-banner-meta {
    display: flex;
    align-items: center;
    gap: 20px;
}

.dvc-banner-meta .count {
    font-size: 14px;
    font-weight: 600;
    opacity: 0.8;
}

.dvc-banner-btn {
    background: #fff;
    color: #000;
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 14px;
    transition: transform 0.2s, background 0.2s;
    display: inline-block;
}

.dvc-banner-btn:hover {
    background: #f0f0f0;
    transform: scale(1.05);
    color: #000;
}

@media (max-width: 600px) {
    .dvc-banner-overlay {
        background: rgba(0, 0, 0, 0.7);
        /* Darker overlay for mobile */
        padding: 20px;
    }

    .dvc-banner-content {
        max-width: 100%;
        text-align: center;
    }

    .dvc-banner-content h2 {
        font-size: 24px;
    }

    .dvc-banner-meta {
        justify-content: center;
    }
}

/* Hide unwanted theme elements on Single Collection */
/* Hide unwanted theme elements on Single Collection */
.single-collection .talvez_te_interesa,
.single-collection .ant_y_sig,
.single-collection .autor,
.single-collection .post-thumbnail,
.single-collection .featured-image,
.single-collection .wp-post-image,
.single-collection .page-header-image,
.single-collection .page-header-image-single,
.single-collection .entry-header img,
.single-collection .inside-article>.featured-image,
.single-collection figure.wp-block-post-featured-image,
.single-collection .post-img {
    display: none !important;
}

/* Hide theme title elements on Collections Archive Page */
.post-type-archive-collection .H1Titulos,
.post-type-archive-collection .post-img,
.post-type-archive-collection .page-header-image,
.post-type-archive-collection .page-header-image-single {
    display: none !important;
}

/* Isolate and style the archive page title */
.post-type-archive-collection .entry-header {
    background: none !important;
    background-image: none !important;
    padding: 0 !important;
    margin: 0 0 30px 0 !important;
}

.post-type-archive-collection .entry-title {
    background: none !important;
    background-image: none !important;
    color: #333 !important;
    font-size: 2em !important;
    font-weight: 700 !important;
    text-align: center !important;
    text-transform: none !important;
    padding: 0 !important;
    margin: 0 0 20px 0 !important;
    border: none !important;
    box-shadow: none !important;
    display: block !important;
}

/* Force full width on archive page - no sidebar space */
.post-type-archive-collection #primary,
.post-type-archive-collection .content-area {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 !important;
}

.post-type-archive-collection #main,
.post-type-archive-collection .site-main {
    width: 100% !important;
    max-width: 100% !important;
}

/* Single collection page - adaptable background (works with most themes) */
.single-collection article.dvc-single-collection {
    background: #fff;
    background-color: #fff;
    background-image: none;
    padding: 30px;
    border-radius: 8px;
}

/* Fallback for themes that wrap content differently */
.single-collection .inside-article {
    background: transparent;
}

/* Back to Collections Button Hover Effect */
.dvc-back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
    opacity: 0.9;
}

/* Aggressively Hide Ad Inserter Blocks */
.single-collection .ai-viewport,
.single-collection .ai-ip-data,
.single-collection .code-block,
.single-collection .ai-insert-before,
.single-collection .ai-insert-after,
.single-collection .ai-insert-post,
.single-collection .ai-rotate,
.single-collection div[class^="code-block"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Single Collection Separator */
.dvc-custom-collection {
    margin-top: 40px;
    padding-top: 30px;
    padding-bottom: 40px;
    /* Space at bottom */
    border-top: 1px solid #f0f0f0;
    position: relative;
}

.dvc-custom-collection::before {
    content: '';
    position: absolute;
    top: -2px;
    /* Center on the border */
    left: 0;
    width: 60px;
    height: 4px;
    background: #2271b1;
    /* Accent color */
    border-radius: 2px;
}