/**
 * Resources CSS
 * -----------------------------------------------------------------------
 * Styles for all resource archive pages and single resource types.
 * Selectors use custom classes assigned in Elementor on each page.
 * -----------------------------------------------------------------------
 */


/* ==========================================================================
   Resources Archive — /resources/
   Sidebar filter + results grid layout
   ========================================================================== */

@media (min-width: 768px) {
    /* Desktop: filter sidebar on left, results on right */
    .resources-view .elementor-widget-container { display: flex !important; flex-direction: row !important; flex-wrap: wrap !important; }
    .resources-filter-wrapper { max-width: 25% !important; }
    .resources-view .dce-view-results-wrapper { width: 71% !important; }
    .resources-view .dce-view-posts-pagination-wrapper { width: 100% !important; }
    .resources-view .dce-view-grid-element { padding: 0px !important; margin-bottom: 20px; }
    /* Sticky filter sidebar — stays visible while scrolling through results */
    .resources-filters { position: sticky !important; top: 140px !important; }
    .resources-grid .elementor-column { display: block !important; }
}
@media (max-width: 765px) {
    /* Mobile: stack each resource card as a block */
    .resources-view-single { margin-bottom: 30px !important; }
    .resources-view .dce-view-grid-element { display: block !important; }
}


/* ==========================================================================
   Brochures Archive — /brochures/
   Same sidebar + grid layout as Resources
   ========================================================================== */

.brochures-view .elementor-widget-container { display: flex !important; flex-direction: row !important; }
.brochures-filter-wrapper { max-width: 25% !important; }
.brochures-view .dce-view-results-wrapper { width: 75% !important; }
.brochures-view .dce-view-grid-element { padding: 0px !important; margin-bottom: 20px; }
/* Sticky filter sidebar */
.brochures-filters { position: sticky !important; top: 140px !important; }


/* ==========================================================================
   App Notes Archive — /application-notes/
   Same sidebar + grid layout as Resources
   ========================================================================== */

.appnotes-view .elementor-widget-container { display: flex !important; flex-direction: row !important; }
.appnotes-filter-wrapper { max-width: 25% !important; }
.appnotes-view .dce-view-results-wrapper { width: 75% !important; }
.appnotes-view .dce-view-grid-element { padding: 0px !important; margin-bottom: 20px; }
/* Full-width single app note card */
.appnotes-view .dce-view-single { width: 100%; }
/* Sticky filter sidebar */
.appnotes-filters { position: sticky !important; top: 140px !important; }


/* ==========================================================================
   Webinars Archive — /webinars/
   Same sidebar + grid layout as Resources
   ========================================================================== */

@media (min-width: 768px) {
    /* Desktop: filter sidebar on left, results on right */
    .webinars-view .elementor-column { flex-direction: column; }
    .webinars-view .elementor-widget-container { display: flex !important; flex-direction: row !important; }
    .webinars-filter-wrapper { max-width: 25% !important; }
    .webinars-view .dce-view-results-wrapper { width: 75% !important; padding: 0px !important; }
    .webinars-view .dce-view-grid-element { padding: 0px !important; margin-bottom: 20px; }
    /* Group-by year header — full width row above the webinar cards */
    .group-by-wrapper { width: 100%; }
    /* Sticky filter sidebar */
    .webinars-filters { position: sticky !important; top: 140px !important; }
}
/* Removes top/bottom margin from the year group heading (e.g. "2024") */
.group-by-wrapper .webinars-group-wrapper h4 { margin-block-start: 0em !important; margin-block-end: 0em !important; }
/* Right margin between webinar card blocks */
.webinars-view .dce-block { margin-right: 20px; }


/* ==========================================================================
   Single Webinar — /webinars/[slug]/
   Speaker bio section layout
   ========================================================================== */

@media (max-width: 768px) {
    /* Mobile: stack speaker photo and bio vertically */
    .webinar-speakers .dce-post-block { flex-direction: column !important; }
    .webinar-speakers .dce-posts-container.dce-skin-grid .dce-post-item .dce-item-area { width: 100% !important; }
}
/* Speaker headshot — fixed 300px width on desktop */
.dce-image-area.dce-item-area { width: 300px !important; }


/* ==========================================================================
   Single Article — measured densities table
   Used on: specific article pages that include a density comparison table
   e.g. https://micromeritics.com/resource-library/... articles with .measured-densities
   ========================================================================== */

/* Table container — grey border around the whole table */
.measured-densities table { border: 5px solid grey; }

/* Header row — grey background */
.measured-densities table tr:first-child { background: #d3d3d3; }

/* Header row 2nd cell — removes right border (visually merged with 3rd cell) */
.measured-densities table tr:first-child td:nth-child(2) { border-right: 0px !important; }

/* Header row 3rd cell — removes left border (visually merged with 2nd cell) */
.measured-densities table tr:first-child td:nth-child(3) { border-left: 0px !important; }

/* All cells — equal 33% width, grey borders, padding */
.measured-densities td { width: 33% !important; border: 1px solid #d3d3d3; padding: 20px; }
