/*== Rahbariyat (post/category/head) — kartalar va batafsil oynasi ==*/

/*-- Kartalar to'ri --*/
.head-grid {
    --head-accent: var(--primary, #f1ca29);
    margin-top: 8px;
}

.head-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .07);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    text-align: center;
    transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}

.head-card:hover,
.head-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .12);
    border-color: var(--head-accent);
    outline: none;
}

.head-card__photo {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #f2f4f7;
    overflow: hidden;
}

.head-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform .4s ease;
}

.head-card:hover .head-card__photo img {
    transform: scale(1.04);
}

.head-card__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 18px 20px 20px;
    gap: 4px;
}

.head-card__name {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    color: #1a1f36;
}

.head-card__position {
    font-size: 15.5px;
    font-weight: 500;
    color: #1a1f36;
    line-height: 1.4;
}

.head-card__days {
    font-size: 12.5px;
    color: rgba(0, 0, 0, .55);
    margin-top: 8px;
}

.head-card__days b {
    color: #1a1f36;
}

.head-card__more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    align-self: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--head-accent);
}

.head-card__more i {
    transition: transform .28s ease;
}

.head-card:hover .head-card__more i {
    transform: translateX(4px);
}

/*-- Batafsil oynasi (modal) --*/
.head-modal {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 20, 40, .55);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.head-modal.is-open {
    display: flex;
    animation: headFade .2s ease;
}

@keyframes headFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.head-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .35);
    animation: headSlide .25s ease;
}

@keyframes headSlide {
    from { transform: translateY(16px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.head-modal__close {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 2;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, .06);
    color: #333;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background .25s ease, color .25s ease;
}

.head-modal__close:hover {
    background: var(--primary, #f1ca29);
    color: #fff;
}

.head-modal__grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 0;
}

.head-modal__aside {
    padding: 28px 24px;
    background: #f7f8fb;
    border-right: 1px solid rgba(0, 0, 0, .06);
}

.head-modal__photo {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    overflow: hidden;
    background: #e9edf3;
    margin-bottom: 16px;
}

.head-modal__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.head-modal__name {
    font-size: 18px;
    font-weight: 700;
    color: #1a1f36;
    line-height: 1.3;
}

.head-modal__position {
    margin-top: 4px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--primary, #f1ca29);
}

.head-modal__contacts {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.head-modal__contacts a {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13.5px;
    color: #37424a;
    text-decoration: none;
    transition: color .2s ease;
    min-width: 0;
}

.head-modal__contacts a:hover {
    color: var(--primary, #f1ca29);
}

.head-modal__contacts a span {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.head-modal__contacts i {
    flex: 0 0 auto;
    margin-top: 1px;
    color: var(--primary, #f1ca29);
    font-size: 16px;
}

.head-modal__content {
    padding: 44px 30px 30px;
    font-size: 14.5px;
    line-height: 1.7;
    color: #37424a;
    overflow-wrap: break-word;
}

.head-modal__content p {
    margin: 0 0 12px;
}

.head-modal__content b,
.head-modal__content strong {
    color: #1a1f36;
}

@media (max-width: 767px) {
    .head-modal__grid {
        grid-template-columns: 1fr;
    }
    .head-modal__aside {
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, .06);
    }
    .head-modal__photo {
        max-width: 220px;
        margin-left: auto;
        margin-right: auto;
    }
    .head-modal__aside {
        text-align: center;
    }
    .head-modal__contacts {
        align-items: center;
    }
    .head-modal__content {
        padding: 24px 22px;
    }
}

/*-- Mas'ul shaxs bloki — rahbariyat sahifasida kattaroq ko'rinish --*/
.head-grid .responsible-block {
    padding: 30px 34px;
    border-radius: 14px;
    border-left-width: 5px;
}

.head-grid .responsible-block__title {
    font-size: 15px;
    margin-bottom: 18px;
}

.head-grid .responsible-block__person {
    gap: 16px;
    padding: 6px 0;
}

.head-grid .responsible-block__avatar {
    width: 52px;
    height: 52px;
    font-size: 22px;
}

.head-grid .responsible-block__name {
    font-size: 17px;
}

.head-grid .responsible-block__position {
    font-size: 13.5px;
}

.head-grid .responsible-block__phone {
    font-size: 15px;
    padding: 10px 18px;
}

.head-grid .responsible-block__note {
    margin-top: 18px;
    padding-top: 14px;
    font-size: 13px;
    line-height: 1.6;
}
