/**
 * JNH — editorial polish: hero, imagery, cards (hospital sites often fail on blank/flat photos)
 */

/* -------------------------------------------------------------------------
   Hero without photo — soft clinical gradient + depth (not flat white)
   ------------------------------------------------------------------------- */
.hero-section.hero--elevated {
    background: linear-gradient(165deg, #f2f6fb 0%, #e9f0f8 45%, #dfe8f3 100%);
    overflow: hidden;
    isolation: isolate;
}

.hero-section.hero--elevated::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 90% 55% at 92% 8%, rgba(26, 84, 144, 0.11), transparent 58%),
        radial-gradient(ellipse 75% 50% at 8% 92%, rgba(0, 102, 204, 0.08), transparent 55%);
}

.hero-section.hero--elevated::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.35;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%231a5490' fill-opacity='0.04' d='M0 0h100v100H0z'/%3E%3Cpath stroke='%231a5490' stroke-opacity='0.07' fill='none' d='M0 50h100M50 0v100'/%3E%3C/svg%3E");
    background-size: 100px 100px;
}

/* Photo heroes: prefer center-weighted crops (set inline; improves faces/buildings) */
section.hero-section.hero-with-image {
    background-position: center center;
}

/* -------------------------------------------------------------------------
   Split homepage hero — editorial panel + clean photo (reference: Tier-1 hospital sites)
   ------------------------------------------------------------------------- */
.jnh-hero-split {
    position: relative;
    padding: 0 0 5.5rem;
    margin-top: 0;
    border-bottom: 1px solid var(--border-color);
    overflow: visible;
    background: #fff;
}

.jnh-hero-split--no-photo.hero--elevated {
    background: #fff;
}

.jnh-hero-split--no-photo.hero--elevated::before,
.jnh-hero-split--no-photo.hero--elevated::after {
    display: none;
}

.jnh-hero-split__grid {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    width: 100%;
    min-height: clamp(380px, 52vh, 680px);
}

@media (min-width: 901px) {
    .jnh-hero-split--has-photo .jnh-hero-split__grid {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
        min-height: clamp(440px, 62vh, 720px);
    }
}

/* Stack: hero row first, quick cards full width below — never beside the photo */
.jnh-hero-split {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.jnh-hero-split__copy {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(3.75rem, 8vw, 5.25rem) clamp(1.25rem, 4vw, 2.75rem) clamp(2.5rem, 5vw, 3.25rem);
    background: linear-gradient(155deg, var(--primary-dark, #0d3a6b) 0%, var(--primary-color) 50%, #1e5fa3 100%);
    color: #fff;
    overflow: hidden;
}

.jnh-hero-split__copy::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.18;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cpath fill='%23ffffff' fill-opacity='1' d='M28 0v17L0 49V32z'/%3E%3C/svg%3E");
    background-size: 14px 24px;
}

.jnh-hero-split__copy-inner {
    position: relative;
    z-index: 1;
    max-width: 36rem;
}

.jnh-hero-split--no-photo .jnh-hero-split__copy-inner {
    max-width: 42rem;
}

.jnh-hero-kicker {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    opacity: 0.92;
    margin: 0 0 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88) !important;
}

.jnh-hero-split__title {
    font-size: clamp(1.85rem, 3.1vw, 2.85rem);
    font-weight: 700;
    line-height: 1.12;
    margin: 0 0 0.65rem;
    letter-spacing: -0.02em;
    color: #fff !important;
}

/* Global h1 rules in style.css must not turn this headline dark on blue */
.jnh-hero-split__copy h1,
.jnh-hero-split__copy .jnh-hero-split__title,
.jnh-hero-split__copy .jnh-hero-split__title span {
    color: #fff !important;
}

.jnh-hero-split__lead {
    font-size: 1.12rem;
    opacity: 0.95;
    margin: 0 0 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.96) !important;
}

.jnh-hero-split__text {
    font-size: 1rem;
    line-height: 1.72;
    opacity: 0.94;
    margin: 0 0 1.65rem;
    max-width: 32rem;
    color: rgba(255, 255, 255, 0.92) !important;
}

.jnh-hero-split__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    margin-bottom: 1.35rem;
}

.jnh-hero-split__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.8rem 1.28rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.94rem;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.jnh-hero-split__cta--primary {
    background: #fff;
    color: var(--primary-dark, #0d3a6b);
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.14);
}

.jnh-hero-split__cta--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.jnh-hero-split__cta--ghost {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.48);
}

.jnh-hero-split__cta--ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

.jnh-hero-split__cta--emergency {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.jnh-hero-split__cta--emergency:hover {
    background: rgba(255, 255, 255, 0.22);
}

.jnh-hero-split__cta-icon {
    font-size: 0.82em;
}

.jnh-hero-split__social {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.jnh-hero-split__soc {
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.22rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.jnh-hero-split__soc:hover {
    color: #fff;
    transform: scale(1.06);
}

.jnh-hero-split__media {
    position: relative;
    min-height: 260px;
    background: linear-gradient(145deg, #dfe8f0, #ecf1f7);
    align-self: stretch;
    display: block;
}

.jnh-hero-split--has-photo .jnh-hero-split__media {
    min-height: 0;
}

.jnh-hero-split__img {
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Bundled multi-photo hero: cross-fade (JS toggles .is-active) */
.jnh-hero-split__media--slideshow {
    min-height: clamp(240px, 42vw, 560px);
    isolation: isolate;
}

.jnh-hero-split__media--slideshow .jnh-hero-split__img--slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 100%;
    margin: 0;
    opacity: 0;
    transition: opacity 1.05s ease;
    z-index: 0;
}

.jnh-hero-split__media--slideshow .jnh-hero-split__img--slide.is-active {
    opacity: 1;
    z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
    .jnh-hero-split__media--slideshow .jnh-hero-split__img--slide {
        transition: none;
    }
}

@media (min-width: 901px) {
    .jnh-hero-split--has-photo .jnh-hero-split__img {
        position: absolute;
        inset: 0;
        min-height: 100%;
    }

    .jnh-hero-split--has-photo .jnh-hero-split__media {
        min-height: 100%;
    }

    .jnh-hero-split--has-photo .jnh-hero-split__media--slideshow {
        min-height: 0;
    }
}

.jnh-hero-split__quick-wrap {
    position: relative;
    z-index: 3;
    margin-top: -2.5rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    flex: 0 0 auto;
}

.jnh-hero-quick {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.15rem;
    width: 100%;
}

.jnh-hero-quick__card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 0.35rem 0.9rem;
    background: #fff;
    border-radius: 14px;
    padding: 1.2rem 1.15rem;
    box-shadow: 0 14px 42px rgba(15, 30, 55, 0.1);
    border: 1px solid rgba(26, 84, 144, 0.08);
    text-decoration: none;
    color: var(--text-dark);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.jnh-hero-quick__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(15, 30, 55, 0.14);
}

.jnh-hero-quick__icon {
    grid-row: 1 / span 2;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--accent-light, #e6f2ff);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.jnh-hero-quick__title {
    grid-column: 2;
    font-weight: 700;
    font-size: 1.04rem;
    line-height: 1.25;
}

.jnh-hero-quick__hint {
    grid-column: 2;
    grid-row: 2;
    font-size: 0.84rem;
    color: var(--text-gray);
    line-height: 1.35;
}

.jnh-hero-quick__go {
    grid-row: 1 / span 2;
    grid-column: 3;
    color: var(--primary-color);
    opacity: 0.65;
    font-size: 1rem;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.jnh-hero-quick__card:hover .jnh-hero-quick__go {
    opacity: 1;
    transform: translateX(3px);
}

.jnh-hero-quick__card--primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark, #0d3a6b) 100%);
    color: #fff;
    border-color: transparent;
}

.jnh-hero-quick__card--primary .jnh-hero-quick__hint {
    color: rgba(255, 255, 255, 0.88);
}

.jnh-hero-quick__card--primary .jnh-hero-quick__icon {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.jnh-hero-quick__card--primary .jnh-hero-quick__go {
    color: #fff;
}

@media (max-width: 900px) {
    .jnh-hero-quick {
        grid-template-columns: 1fr;
    }

    .jnh-hero-split__quick-wrap {
        margin-top: -2rem;
    }

    .jnh-hero-split {
        padding-bottom: 3.5rem;
    }

    .jnh-hero-split--has-photo .jnh-hero-split__media:not(.jnh-hero-split__media--slideshow) .jnh-hero-split__img {
        position: relative;
        inset: auto;
        min-height: 260px;
        height: auto;
    }

    .jnh-hero-split--has-photo .jnh-hero-split__media:not(.jnh-hero-split__media--slideshow) {
        min-height: 0;
    }

    .jnh-hero-split__media--slideshow {
        min-height: 260px;
    }
}

body.rtl .jnh-hero-split__grid {
    direction: ltr;
}

body.rtl .jnh-hero-split__copy {
    direction: rtl;
    text-align: right;
}

body.rtl .jnh-hero-split__cta-icon {
    transform: scaleX(-1);
}

/* -------------------------------------------------------------------------
   Content & WordPress images — framing reads “finished”
   ------------------------------------------------------------------------- */
.entry-content img,
.hentry .entry-content img,
.wp-block-image img,
.wp-block-media-text__media img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(15, 30, 55, 0.08);
}

.entry-content .alignwide img,
.entry-content .alignfull img {
    border-radius: 10px;
}

/* Blog / archive cards */
.post-card .post-thumbnail {
    background: linear-gradient(145deg, #eef3f9 0%, #e2ebf5 100%);
}

.post-card .post-thumbnail a {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.post-card .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    box-shadow: none;
    transition: transform 0.45s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.03);
}

/* -------------------------------------------------------------------------
   Archive placeholder when no featured image
   ------------------------------------------------------------------------- */
.jnh-card-media-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    aspect-ratio: 16 / 10;
    text-decoration: none;
    background: linear-gradient(140deg, var(--primary-color) 0%, var(--primary-dark, #0d3a6b) 45%, var(--accent-color, #0066cc) 100%);
    color: rgba(255, 255, 255, 0.92);
    font-size: 2.75rem;
    transition: filter 0.3s ease, transform 0.3s ease;
}

.jnh-card-media-placeholder:hover,
.jnh-card-media-placeholder:focus {
    color: #fff;
    filter: brightness(1.06);
    transform: scale(1.01);
}

.jnh-card-media-placeholder i {
    opacity: 0.9;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

/* -------------------------------------------------------------------------
   Homepage “Why choose us” icons — professional rings, no emoji
   ------------------------------------------------------------------------- */
.services-section .service-card .service-icon i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--primary-color) 0%, var(--accent-color, #0066cc) 100%);
    color: #fff !important;
    font-size: 1.85rem !important;
    box-shadow: 0 12px 32px rgba(26, 84, 144, 0.28);
    border: 3px solid rgba(255, 255, 255, 0.35);
}

.services-section .service-card .service-icon {
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    border-bottom: 1px solid rgba(26, 84, 144, 0.08);
}

/* -------------------------------------------------------------------------
   Stats — lighter elevation
   ------------------------------------------------------------------------- */
.stats-section .stat-item {
    background: linear-gradient(180deg, #fff 0%, #fafbfd 100%);
    border: 1px solid rgba(26, 84, 144, 0.09);
    box-shadow: 0 8px 28px rgba(15, 30, 55, 0.06);
}

/* -------------------------------------------------------------------------
   Gallery strip (homepage)
   ------------------------------------------------------------------------- */
.gallery-item img {
    border-radius: 12px;
}

/* -------------------------------------------------------------------------
   Doctor / profile initials avatars
   ------------------------------------------------------------------------- */
.jnh-avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: 'Inter', 'Poppins', system-ui, sans-serif;
    letter-spacing: 0.03em;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.12) 100%);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* Doctor grid on white cards — solid gradient, no glass blur */
.jnh-avatar-initials.jnh-avatar-initials--on-light {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
