/*
 * OHM Portfolio — Frontend Styles
 * Brand: Onspire Health Marketing
 * Colors: Navy #003B5E | Green #9BC53D | Orange #E67200 | Charcoal #525556
 */

/* ── Reset / Base ──────────────────────────────────────────────────────────── */

.ohm-portfolio-wrap *,
.ohm-portfolio-wrap *::before,
.ohm-portfolio-wrap *::after { box-sizing: border-box; }

/* ── Archive Header ────────────────────────────────────────────────────────── */

.ohm-archive-header {
    background: #003B5E;
    padding: 60px 20px;
    text-align: center;
}

.ohm-archive-header__inner {
    max-width: 720px;
    margin: 0 auto;
}

.ohm-archive-header__title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 16px;
    line-height: 1.2;
}

.ohm-archive-header__subtitle {
    font-size: 1.125rem;
    color: rgba(255,255,255,0.85);
    margin: 0;
    line-height: 1.6;
}

.ohm-archive-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

/* ── Filters ───────────────────────────────────────────────────────────────── */

.ohm-filters {
    margin-bottom: 40px;
}

/* Audience Toggle */
.ohm-filters__audience {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 16px;
}

.ohm-audience-btn {
    background: transparent;
    border: 2px solid #d1d5db;
    color: #525556;
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.ohm-audience-btn:hover {
    border-color: #003B5E;
    color: #003B5E;
}

.ohm-audience-btn.is-active {
    background: #003B5E;
    border-color: #003B5E;
    color: #ffffff;
}

.ohm-audience-btn:focus-visible {
    outline: 3px solid #9BC53D;
    outline-offset: 2px;
}

/* Secondary Filters */
.ohm-filters__secondary {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.ohm-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 180px;
}

.ohm-filter-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #525556;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ohm-filter-select {
    padding: 10px 32px 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23525556' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
    appearance: none;
    font-size: 0.9375rem;
    color: #525556;
    cursor: pointer;
    transition: border-color 0.2s;
}

.ohm-filter-select:focus {
    outline: none;
    border-color: #003B5E;
    box-shadow: 0 0 0 3px rgba(0,59,94,0.12);
}

.ohm-filters__reset {
    background: transparent;
    border: 1px solid #d1d5db;
    color: #525556;
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    align-self: flex-end;
}

.ohm-filters__reset:hover {
    border-color: #E67200;
    color: #E67200;
}

.ohm-filters__status {
    margin-top: 12px;
    font-size: 0.875rem;
    color: #525556;
    min-height: 20px;
}

/* Mobile filters */
@media (max-width: 640px) {
    .ohm-filters__secondary { flex-direction: column; }
    .ohm-filter-group { min-width: 100%; }
    .ohm-filter-select { width: 100%; }
    .ohm-filters__reset { width: 100%; text-align: center; }
}

/* ── Portfolio Grid ─────────────────────────────────────────────────────────── */

.ohm-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    position: relative;
}

.ohm-portfolio-wrap.cols-2 .ohm-portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 900px) {
    .ohm-portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 580px) {
    .ohm-portfolio-grid { grid-template-columns: 1fr; }
}

/* Loading overlay */
.ohm-portfolio-grid.is-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.7);
    z-index: 10;
}

/* ── Card (Gallery Style) ───────────────────────────────────────────────────── */

.ohm-card {
    position: relative;
    overflow: hidden;
    background: #1a1a1a;
    cursor: pointer;
    display: block;
}

.ohm-card--featured {
    box-shadow: inset 0 3px 0 #9BC53D;
}

/* Image */
.ohm-card__image-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #1a1a1a;
}

.ohm-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

@media (hover: hover) {
    .ohm-card:hover .ohm-card__image {
        transform: scale(1.04);
    }
}

.ohm-card__image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2a2a2a;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Badges */
.ohm-card__badge {
    position: absolute;
    top: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 3px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 3;
}

.ohm-card__badge--featured {
    left: 12px;
    background: #9BC53D;
    color: #ffffff;
}

.ohm-card__badge--video {
    right: 12px;
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ── Gallery Overlay ────────────────────────────────────────────────────────── */

.ohm-card__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

/* Desktop: reveal on hover */
@media (hover: hover) {
    .ohm-card:hover .ohm-card__overlay {
        transform: translateY(0);
    }
}

/* Keyboard: reveal when card or any child has focus */
.ohm-card:focus-within .ohm-card__overlay {
    transform: translateY(0);
}

/* Mobile/touch: JS adds this class on tap */
.ohm-card.is-overlay-active .ohm-card__overlay {
    transform: translateY(0);
}

/* Buttons container — subtle settle animation after overlay slides in */
.ohm-card__overlay-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    padding: 20px;
    transform: translateY(-10px);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) 0.08s;
}

@media (hover: hover) {
    .ohm-card:hover .ohm-card__overlay-inner {
        transform: translateY(0);
    }
}

.ohm-card:focus-within .ohm-card__overlay-inner,
.ohm-card.is-overlay-active .ohm-card__overlay-inner {
    transform: translateY(0);
}

/* Buttons */
.ohm-card__overlay-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    padding: 10px 24px;
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 4px;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: background 0.2s ease, border-color 0.2s ease;
    background: transparent;
    white-space: nowrap;
}

.ohm-card__overlay-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: #ffffff;
    color: #ffffff;
    text-decoration: none;
}

.ohm-card__overlay-btn:focus-visible {
    outline: 3px solid #9BC53D;
    outline-offset: 3px;
    background: rgba(255, 255, 255, 0.1);
}

/* Accessible focus ring on the card article itself */
.ohm-card:focus-visible {
    outline: 3px solid #9BC53D;
    outline-offset: 0;
    z-index: 1;
}

/* ── Tags ───────────────────────────────────────────────────────────────────── */

.ohm-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.4;
}

.ohm-tag--specialty {
    background: #EEF6FB;
    color: #003B5E;
}

.ohm-tag--service {
    background: #F0F8E6;
    color: #4a6b1a;
}

a.ohm-tag:hover {
    opacity: 0.8;
}

/* ── No Results ─────────────────────────────────────────────────────────────── */

.ohm-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #525556;
}

.ohm-no-results p {
    font-size: 1.0625rem;
    margin: 0;
}

/* ── Load More ──────────────────────────────────────────────────────────────── */

.ohm-load-more-wrap {
    text-align: center;
    margin-top: 48px;
}

.ohm-load-more {
    background: #003B5E;
    color: #ffffff;
    border: none;
    padding: 14px 40px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ohm-load-more:hover {
    background: #005080;
}

.ohm-load-more:focus-visible {
    outline: 3px solid #9BC53D;
    outline-offset: 2px;
}

.ohm-load-more.is-loading {
    opacity: 0.7;
    cursor: wait;
}

.ohm-load-more-count {
    font-size: 0.875rem;
    opacity: 0.75;
}

/* ── Single Detail Page ─────────────────────────────────────────────────────── */

.ohm-single-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

/* Breadcrumbs */
.ohm-breadcrumbs {
    padding: 16px 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 40px;
}

.ohm-breadcrumbs__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    font-size: 0.875rem;
    color: #525556;
}

.ohm-breadcrumbs__list a {
    color: #003B5E;
    text-decoration: none;
}

.ohm-breadcrumbs__list a:hover { text-decoration: underline; }
.ohm-breadcrumbs__sep { color: #9ca3af; }

/* Hero */
.ohm-single-hero {
    margin-bottom: 48px;
}

.ohm-single-hero__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

@media (max-width: 768px) {
    .ohm-single-hero__inner { grid-template-columns: 1fr; }
}

.ohm-single-hero__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.ohm-single-hero__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #003B5E;
    margin: 0 0 16px;
    line-height: 1.2;
}

.ohm-single-hero__excerpt {
    font-size: 1.0625rem;
    color: #525556;
    line-height: 1.65;
    margin: 0 0 24px;
}

.ohm-single-hero__img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    display: block;
}

/* Buttons */
.ohm-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 4px;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: 2px solid transparent;
}

.ohm-btn--primary {
    background: #28a5de;
    color: #ffffff;
}

.ohm-btn--primary:hover { background: #1a87bb; }

.ohm-btn--outline {
    background: transparent;
    border-color: #003B5E;
    color: #003B5E;
}

.ohm-btn--outline:hover {
    background: #003B5E;
    color: #ffffff;
}

/* Metrics strip */
.ohm-single-metrics {
    background: #003B5E;
    border-radius: 8px;
    padding: 32px 40px;
    margin-bottom: 48px;
}

.ohm-single-metrics__inner {
    display: flex;
    gap: 48px;
    flex-wrap: wrap;
    justify-content: center;
}

.ohm-single-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
}

.ohm-single-metric__value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #9BC53D;
    line-height: 1;
}

.ohm-single-metric__label {
    font-size: 0.9375rem;
    color: rgba(255,255,255,0.85);
}

/* Video embed */
.ohm-single-video {
    margin-bottom: 48px;
}

.ohm-video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}

.ohm-video-embed iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

.ohm-video-caption {
    text-align: center;
    color: #525556;
    font-size: 0.875rem;
    margin-top: 12px;
    font-style: italic;
}

/* Main content */
.ohm-single-content {
    margin-bottom: 48px;
}

.ohm-single-content__inner {
    max-width: 760px;
    font-size: 1.0625rem;
    line-height: 1.75;
    color: #525556;
}

/* Case study */
.ohm-single-case-study {
    background: #f8fafc;
    border-radius: 8px;
    padding: 48px 40px;
    margin-bottom: 64px;
}

.ohm-single-case-study__heading {
    font-size: 1.5rem;
    font-weight: 700;
    color: #003B5E;
    margin: 0 0 32px;
    padding-bottom: 16px;
    border-bottom: 3px solid #9BC53D;
    display: inline-block;
}

.ohm-case-study-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 48px;
}

.ohm-case-study-html--after {
    margin-top: 8px;
}

@media (max-width: 768px) {
    .ohm-case-study-grid { grid-template-columns: 1fr; }
}

.ohm-case-study-block h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #003B5E;
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
}

.ohm-case-study-block p {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: #525556;
    margin: 0;
}

.ohm-case-study-block--results {
    background: #003B5E;
    border-radius: 6px;
    padding: 24px;
}

.ohm-case-study-block--results h3 { color: #9BC53D; }
.ohm-case-study-block--results p  { color: rgba(255,255,255,0.9); }

/* Related */
.ohm-related {
    border-top: 1px solid #e5e7eb;
    padding-top: 64px;
}

.ohm-related__inner { max-width: 1160px; }

.ohm-related__heading {
    font-size: 1.5rem;
    font-weight: 700;
    color: #003B5E;
    margin: 0 0 32px;
}

.ohm-related__cta {
    text-align: center;
    margin-top: 40px;
}

/* ── Metrics Block (shortcode) ──────────────────────────────────────────────── */

.ohm-metrics-block {
    text-align: center;
    padding: 60px 20px;
}

.ohm-metrics-heading {
    font-size: 1.75rem;
    font-weight: 700;
    color: #003B5E;
    margin: 0 0 40px;
}

.ohm-metrics-stats {
    display: flex;
    gap: 48px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.ohm-metric-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.ohm-metric-stat-value {
    font-size: 3rem;
    font-weight: 700;
    color: #9BC53D;
    line-height: 1;
}

.ohm-metric-stat-label {
    font-size: 1rem;
    color: #525556;
}

.ohm-metrics-cta {
    display: inline-block;
    background: #003B5E;
    color: #ffffff;
    padding: 14px 36px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.2s;
}

.ohm-metrics-cta:hover { background: #005080; }
