/**
 * Module: Procedures Directory Archive
 * Path: assets/css/iatrics-procedures-directory.css
 */

.procedures-archive {
    padding-bottom: 100px;
}

/* ================================================================
   SURGERY ARCHIVE — Intro Strip
   ================================================================ */

.surgery-archive-intro {
    background: var(--medical-bg-light, #f8fafc);
    border-bottom: 1px solid var(--medical-border, #e2e8f0);
    padding: 48px 0;
}

.surgery-archive-intro-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.surgery-archive-eyebrow {
    display: block;
    margin-bottom: 10px;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

.surgery-archive-intro-title {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 800;
    color: var(--medical-heading);
    margin: 0 0 12px;
    line-height: 1.2;
}

.surgery-archive-intro-text {
    flex: 1 1 380px;
}

.surgery-archive-intro-text p {
    color: var(--medical-body-text);
    font-size: 0.97rem;
    line-height: 1.7;
    margin: 0;
    max-width: 560px;
}

.surgery-archive-intro-stats {
    display: flex;
    gap: 32px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.intro-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
    min-width: 80px;
}

.intro-stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--medical-accent);
    line-height: 1;
}

.intro-stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--medical-body-text);
}

/* ================================================================
   SURGERY ARCHIVE — Card Media Badges
   ================================================================ */

.proc-card-media-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.proc-media-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 9px 3px 6px;
    border-radius: 4px;
    line-height: 1;
}

.proc-media-badge .dashicons {
    font-size: 13px !important;
    width: 13px !important;
    height: 13px !important;
    flex-shrink: 0;
}

.proc-media-badge--images {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.proc-media-badge--video {
    background: #fdf4ff;
    color: #7e22ce;
    border: 1px solid #e9d5ff;
}

@media (max-width: 640px) {
    .surgery-archive-intro-inner { flex-direction: column; align-items: flex-start; }
    .surgery-archive-intro-stats { gap: 20px; }
}

/* --- Premium Deep Blue Hero with Blend Effect --- */
.procedure-directory-hero {
    position: relative;
    background-color: #1e293b; /* Deep clinical slate/blue */
    padding: 80px 0 100px;
    text-align: center;
    border-bottom: 4px solid var(--medical-accent); /* Burgundy bottom accent */
    margin-bottom: 60px;
    overflow: hidden; /* Keeps the background image contained */
}

/* Background Image Blend Logic */
.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.25; /* Fades the image */
    mix-blend-mode: luminosity; /* Strips the original color, adopting the dark blue */
    z-index: 1;
}

/* Darkening Gradient to guarantee text is readable over the image */
.procedure-directory-hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(30, 41, 59, 0.4) 0%, rgba(30, 41, 59, 0.95) 100%);
    z-index: 2;
}

/* Content Wrapper */
.procedure-directory-hero .hero-content-relative {
    position: relative;
    z-index: 10; /* Ensures text is layered ON TOP of the image and gradients */
}

/* Breadcrumbs */
.iatrics-breadcrumbs {
    font-size: 0.85rem;
    margin-bottom: 25px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.iatrics-breadcrumbs a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

.iatrics-breadcrumbs a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.iatrics-breadcrumbs .separator {
    margin: 0 8px;
    opacity: 0.5;
}

.iatrics-breadcrumbs .current {
    color: #ffffff; 
}

/* Header Text */
.procedure-directory-hero .directory-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    color: #ffffff !important; /* Force white over dark background */
    margin-bottom: 20px;
    font-weight: 800;
    line-height: 1.2;
    display: block;
}

.procedure-directory-hero .directory-intro {
    font-size: 1.15rem;
    color: #cbd5e1 !important; /* Soft slate/grey for readable contrast */
    max-width: 750px;
    margin: 0 auto;
    line-height: 1.7;
    display: block;
}

/* ================================================================
   SURGERY PROCEDURE CARDS — Redesigned Archive Grid
   Replaces the old .medical-feature-card centred layout.
   .medical-feature-card rules in iatrics-hub.css are left intact
   (used on the homepage shortcode).
   ================================================================ */

/* ── Grid ─────────────────────────────────────────────────── */
.surgery-proc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* ── Card shell ───────────────────────────────────────────── */
.surgery-proc-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

/* Accent bar: slides up from bottom on hover */
.surgery-proc-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 3px;
    background: var(--medical-accent);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.25s ease;
    border-radius: 2px 0 0 2px;
    z-index: 1;
}

.surgery-proc-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(30, 41, 59, 0.09);
    border-color: #cbd5e1;
}

.surgery-proc-card:hover::before {
    transform: scaleY(1);
}

/* ── Featured image strip (only when .has-image is set) ───── */
.surgery-proc-card.has-image .proc-card-img {
    height: 160px;
    overflow: hidden;
    flex-shrink: 0;
}

.surgery-proc-card.has-image .proc-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Card body ────────────────────────────────────────────── */
.proc-card-body {
    padding: 24px 26px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

/* Anatomy label (e.g. "HIP", "KNEE") */
.proc-anatomy-pill {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    color: var(--medical-accent);
    line-height: 1;
}

/* Surgery title */
.proc-card-title {
    font-size: 1.01rem;
    font-weight: 800;
    color: var(--medical-heading);
    margin: 0;
    line-height: 1.32;
}

.proc-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.proc-card-title a:hover {
    color: var(--medical-accent);
}

/* Excerpt — CSS clamp to 3 lines */
.proc-card-excerpt {
    font-size: 0.855rem;
    color: #64748b;
    line-height: 1.65;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer with "Learn more →" */
.proc-card-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.proc-card-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--medical-accent) !important;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.proc-card-link:hover {
    opacity: 0.75;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
    .surgery-proc-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .proc-card-body { padding: 20px; }
}