/* Iran Pharma 1405 homepage feature */
.khr-if {
    --if-dark: #003f42;
    --if-deep: #003538;
    --if-green: #00a477;
    --if-mint: #58c49d;
    --if-paper: #f6fbf8;
    --if-line: rgba(112, 219, 178, .3);
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(68px, 8vw, 112px) 0;
    background:
        radial-gradient(circle at 8% 12%, rgba(43, 167, 126, .2), transparent 26%),
        radial-gradient(circle at 96% 88%, rgba(66, 194, 150, .16), transparent 31%),
        linear-gradient(135deg, var(--if-deep), var(--if-dark));
    color: var(--if-paper);
    scroll-margin-top: 100px;
}

.khr-if__pattern {
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .22;
    pointer-events: none;
}

.khr-if__pattern span {
    position: absolute;
    width: clamp(120px, 15vw, 230px);
    aspect-ratio: 1;
    border: 1px solid var(--if-line);
    border-radius: 0 55% 0 55%;
}

.khr-if__pattern span:nth-child(1) { top: -4%; right: 4%; }
.khr-if__pattern span:nth-child(2) { top: 13%; right: 17%; transform: rotate(90deg); }
.khr-if__pattern span:nth-child(3) { bottom: 3%; right: 6%; transform: rotate(180deg); }
.khr-if__pattern span:nth-child(4) { top: 5%; left: 9%; transform: rotate(270deg); }
.khr-if__pattern span:nth-child(5) { bottom: 12%; left: 23%; transform: rotate(90deg); }
.khr-if__pattern span:nth-child(6) { bottom: -9%; left: -2%; transform: rotate(180deg); }

.khr-if__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
    align-items: center;
    gap: clamp(38px, 6vw, 86px);
    direction: rtl;
}

.khr-if__copy {
    min-width: 0;
}

.khr-if__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    color: var(--if-mint);
    font-size: .92rem;
    font-weight: 500;
}

.khr-if__eyebrow::before {
    content: '';
    width: 34px;
    height: 1px;
    background: currentColor;
}

.khr-if h2 {
    max-width: 740px;
    margin: 0;
    color: #fff;
    font-size: clamp(2rem, 4vw, 4.15rem);
    font-weight: 700;
    line-height: 1.42;
    letter-spacing: -.035em;
}

.khr-if__subtitle {
    margin: 18px 0 0;
    color: #b5ead5;
    font-size: clamp(1.02rem, 1.5vw, 1.28rem);
    line-height: 1.9;
}

.khr-if__lead {
    max-width: 720px;
    margin: 28px 0 0;
    color: rgba(246, 251, 248, .8);
    font-size: 1rem;
    line-height: 2.1;
    text-align: justify;
}

.khr-if__facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 34px;
    border-block: 1px solid var(--if-line);
}

.khr-if__fact {
    position: relative;
    padding: 20px 18px;
}

.khr-if__fact + .khr-if__fact::before {
    content: '';
    position: absolute;
    inset-block: 18px;
    right: 0;
    width: 1px;
    background: var(--if-line);
}

.khr-if__fact span,
.khr-if__fact strong {
    display: block;
}

.khr-if__fact span {
    margin-bottom: 7px;
    color: var(--if-mint);
    font-size: .78rem;
}

.khr-if__fact strong {
    color: #fff;
    font-size: .92rem;
    font-weight: 500;
    line-height: 1.75;
}

.khr-if__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
}

.khr-if__button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 10px 22px;
    font-size: .9rem;
    font-weight: 500;
    transition: transform .25s ease, background-color .25s ease, color .25s ease, border-color .25s ease;
}

.khr-if__button:hover {
    transform: translateY(-2px);
}

.khr-if__button:focus-visible,
.khr-if__story summary:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 4px;
}

.khr-if__button--primary {
    background: var(--if-mint);
    color: #003a36;
}

.khr-if__button--primary:hover {
    background: #7addb9;
}

.khr-if__story {
    margin-top: 18px;
    border-top: 1px solid var(--if-line);
}

.khr-if__story summary {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: #c7eee0;
    font-size: .86rem;
    cursor: pointer;
    list-style: none;
}

.khr-if__story summary::-webkit-details-marker { display: none; }

.khr-if__summary-icon {
    position: relative;
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    border: 1px solid var(--if-line);
    border-radius: 50%;
}

.khr-if__summary-icon::before,
.khr-if__summary-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 9px;
    height: 1px;
    background: #b9e7d5;
    transform: translate(-50%, -50%);
}

.khr-if__summary-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
    transition: transform .25s ease;
}

.khr-if__story[open] .khr-if__summary-icon::after {
    transform: translate(-50%, -50%) rotate(0deg);
}

.khr-if__story-body {
    padding: 6px 0 8px;
    color: rgba(246, 251, 248, .78);
    font-size: .92rem;
    line-height: 2.1;
}

.khr-if__story-body p {
    max-width: 760px;
    margin: 0 0 18px;
    text-align: justify;
}

.khr-if__story-body h3 {
    margin: 30px 0 12px;
    color: #fff;
    font-size: 1.28rem;
}

.khr-if__story-body ul {
    display: grid;
    gap: 10px;
    margin: 18px 0 24px;
    padding: 0;
}

.khr-if__story-body li {
    position: relative;
    padding: 13px 18px 13px 12px;
    border-right: 2px solid var(--if-mint);
    background: rgba(255, 255, 255, .045);
}

.khr-if__story-body strong { color: #eafaf3; }
.khr-if__story-body .khr-if__closing { color: var(--if-mint); font-weight: 700; }

.khr-if__visual {
    position: relative;
    margin: 0;
    direction: ltr;
}

.khr-if__visual::before {
    content: '';
    position: absolute;
    inset: -15px 18px 25px -18px;
    border: 1px solid rgba(101, 209, 168, .38);
    border-radius: 36px 0 36px 0;
    pointer-events: none;
}

.khr-if__poster-frame {
    position: relative;
    z-index: 1;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 28px 0 28px 0;
    background: #063f41;
    box-shadow: 0 30px 75px rgba(0, 20, 18, .38);
}

.khr-if__poster-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.khr-if__visual figcaption {
    position: relative;
    z-index: 2;
    width: max-content;
    margin: 18px 0 0 auto;
    color: rgba(205, 241, 226, .72);
    font: 10px/1.4 Arial, sans-serif;
    letter-spacing: .22em;
}

@media (max-width: 1040px) {
    .khr-if__inner {
        grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
        gap: 42px;
    }

    .khr-if__facts { grid-template-columns: 1fr; }

    .khr-if__fact + .khr-if__fact::before {
        inset-block: 0 auto;
        inset-inline: 18px;
        width: auto;
        height: 1px;
    }
}

@media (max-width: 760px) {
    .khr-if { padding: 64px 0 58px; }

    .khr-if__inner {
        grid-template-columns: 1fr;
        gap: 46px;
    }

    .khr-if__copy { order: 1; }
    .khr-if__visual { order: 2; width: min(100%, 430px); margin-inline: auto; }
    .khr-if h2 { font-size: clamp(2rem, 9vw, 3.15rem); }
    .khr-if__lead { text-align: right; }
    .khr-if__actions { align-items: stretch; }
    .khr-if__button { flex: 1 1 190px; }
}

@media (max-width: 480px) {
    .khr-if { padding-top: 54px; }
    .khr-if__eyebrow { font-size: .78rem; line-height: 1.8; }
    .khr-if__subtitle { margin-top: 14px; font-size: .96rem; }
    .khr-if__lead { margin-top: 22px; font-size: .92rem; line-height: 2; }
    .khr-if__facts { margin-top: 26px; }
    .khr-if__fact { padding: 15px 12px; }
    .khr-if__actions { margin-top: 24px; }
    .khr-if__button { width: 100%; }
    .khr-if__story-body { font-size: .86rem; }
    .khr-if__story-body p { text-align: right; }
    .khr-if__visual::before { inset: -10px 10px 18px -10px; }
    .khr-if__poster-frame { border-radius: 22px 0 22px 0; }
}

@media (prefers-reduced-motion: reduce) {
    .khr-if__button,
    .khr-if__summary-icon::after { transition: none; }
}
