/* ------------------------------------------ */
/*              Departments Page              */
/* ------------------------------------------ */

.omsar-departments-section {
    padding: 18px 0 48px;
}

.omsar-dept-lead-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.omsar-dept-lead-card {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    padding: 28px;
    color: #fff;
    min-height: 210px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    box-shadow: 0 12px 40px rgba(8, 44, 94, 0.08);
}

.omsar-dept-lead-card.minister {
    background: linear-gradient(165deg, #082C5E 0%, #0E4A8A 50%, #1A6DAA 100%);
}

.omsar-dept-lead-card.dg {
    background: linear-gradient(165deg, #0b3a73 0%, #1a5fa8 55%, #307fe2 100%);
}

.omsar-dept-lead-card::after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    inset-block-end: -60px;
    inset-inline-start: -40px;
    pointer-events: none;
}

.omsar-dept-lead-copy {
    position: relative;
    z-index: 1;
}

.omsar-dept-lead-title {
    font-family: var(--font-main, inherit);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.35;
    color: #fff;
    margin: 0 0 8px;
    text-align: start;
}

.omsar-dept-lead-note {
    opacity: 0.85;
    font-size: 14px;
    line-height: 1.7;
    color: #fff;
    text-align: start;
}

.omsar-dept-lead-note p {
    margin: 0 0 0.4em;
}

.omsar-dept-lead-note p:last-child {
    margin-bottom: 0;
}

.omsar-dept-contact-row {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}

.omsar-dept-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #fff;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.2;
    text-decoration: none;
}

.omsar-dept-chip:hover,
.omsar-dept-chip:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    text-decoration: none;
}

.omsar-dept-chip svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.omsar-dept-chip span {
    unicode-bidi: isolate;
}

@media (max-width: 980px) {
    .omsar-dept-lead-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .omsar-departments-section {
        padding: 16px 0 40px;
    }

    .omsar-dept-lead-grid {
        grid-template-columns: 1fr;
    }

    .omsar-dept-lead-card {
        padding: 22px;
        min-height: 0;
    }

    .omsar-dept-lead-title {
        font-size: 1.25rem;
    }
}

/* ------------------------------------------ */
/*         Department Type / Categories       */
/* ------------------------------------------ */

.omsar-dept-type-block {
    margin-top: 42px;
}

.omsar-dept-type-heading {
    font-family: var(--font-main, inherit);
    font-size: 1.45rem;
    font-weight: 800;
    color: #082c5e;
    margin: 0 0 8px;
    text-align: start;
}

.omsar-dept-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 22px;
}

.omsar-dept-type-grid > .omsar-dept-cat-card:only-child,
.omsar-dept-type-grid > .omsar-dept-cat-card:last-child:nth-child(3n + 1) {
    grid-column: 1 / -1;
}

.omsar-dept-cat-card {
    background: #fff;
    border-radius: 12px;
    border-top: 4px solid #082c5e;
    box-shadow: 0 8px 24px rgba(8, 44, 94, 0.08);
    padding: 22px;
}

.omsar-dept-cat-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #082c5e;
    margin: 0 0 6px;
    text-align: start;
}

.omsar-dept-cat-description {
    color: #5b6b82;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.85;
    margin: 0 0 14px;
    text-align: start;
}

.omsar-dept-cat-description p {
    margin: 0 0 8px;
}

.omsar-dept-cat-description p:last-child {
    margin-bottom: 0;
}

.omsar-dept-cat-location {
    color: #5b6b82;
    font-size: 13px;
    line-height: 1.6;
    margin: 0 0 12px;
    text-align: start;
}

.omsar-dept-cat-contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 18px;
    margin-bottom: 16px;
}

.omsar-dept-cat-contact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #082c5e;
    font-size: 13px;
    text-decoration: none;
}

.omsar-dept-cat-contact:hover,
.omsar-dept-cat-contact:focus {
    color: #307fe2;
    text-decoration: none;
}

.omsar-dept-cat-contact svg {
    width: 15px;
    height: 15px;
    color: #307fe2;
    flex-shrink: 0;
}

.omsar-dept-unit-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.omsar-dept-unit-list li {
    margin: 0;
}

.omsar-dept-unit-list a,
.omsar-dept-unit-list span,
.omsar-dept-unit-trigger {
    display: block;
    width: 100%;
    background: #f0f4f8;
    color: #082c5e;
    border-radius: 8px;
    padding: 10px 14px;
    border: 0;
    border-inline-start: 3px solid #307fe2;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
    font-family: inherit;
    text-align: start;
    cursor: pointer;
}

.omsar-dept-unit-list a:hover,
.omsar-dept-unit-list a:focus,
.omsar-dept-unit-trigger:hover,
.omsar-dept-unit-trigger:focus {
    color: #082c5e;
    background: #e8f1fc;
    text-decoration: none;
    outline: none;
}

/* ------------------------------------------ */
/*            Department details popup        */
/* ------------------------------------------ */

body.omsar-dept-popup-open {
    overflow: hidden;
}

.omsar-dept-popup {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.omsar-dept-popup.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.omsar-dept-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 20, 40, 0.55);
    backdrop-filter: blur(2px);
}

.omsar-dept-popup-dialog {
    position: relative;
    z-index: 1;
    width: min(640px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 18px 50px rgba(8, 44, 94, 0.28);
    transform: translateY(12px) scale(0.98);
    transition: transform 0.25s ease;
}

.omsar-dept-popup.is-open .omsar-dept-popup-dialog {
    transform: none;
}

.omsar-dept-popup-header {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #082c5e;
    color: #fff;
    padding: 18px 52px;
    text-align: center;
}

.omsar-dept-popup-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.45;
    color: #fff;
}

.omsar-dept-popup-close {
    appearance: none;
    -webkit-appearance: none;
    position: absolute;
    inset-block-start: 50%;
    inset-inline-end: 14px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    border-radius: 4px;
}

.omsar-dept-popup-close-icon,
.omsar-dept-popup-close svg {
    width: 12px;
    height: 12px;
    display: block;
    pointer-events: none;
}

.omsar-dept-popup-close:hover,
.omsar-dept-popup-close:focus {
    background: rgba(255, 255, 255, 0.12);
    outline: none;
}

.omsar-dept-popup-body {
    padding: 28px 32px 30px;
}

.omsar-dept-popup-summary {
    color: #1a2333;
    font-size: 15px;
    line-height: 1.85;
    text-align: start;
}

.omsar-dept-popup-summary h1,
.omsar-dept-popup-summary h2,
.omsar-dept-popup-summary h3,
.omsar-dept-popup-summary h4 {
    font-size: 1em;
    font-weight: 700;
    line-height: 1.7;
    color: inherit;
    margin: 0 0 10px;
}

.omsar-dept-popup-summary p,
.omsar-dept-popup-summary ul,
.omsar-dept-popup-summary ol {
    margin: 0 0 12px;
}

.omsar-dept-popup-summary p:last-child,
.omsar-dept-popup-summary ul:last-child,
.omsar-dept-popup-summary ol:last-child {
    margin-bottom: 0;
}

.omsar-dept-popup-summary ul,
.omsar-dept-popup-summary ol {
    padding-inline-start: 1.2em;
}

.omsar-dept-popup-summary li {
    margin: 0 0 8px;
}

.omsar-dept-popup-summary li:last-child {
    margin-bottom: 0;
}

.omsar-dept-popup-contact {
    margin-top: 22px;
    background: #e8f1fc;
    border-radius: 8px;
    border-inline-start: 4px solid #307fe2;
    padding: 14px 18px;
}

.omsar-dept-popup-contact-label {
    margin: 0 0 8px;
    color: #082c5e;
    font-size: 14px;
    font-weight: 700;
    text-align: start;
}

.omsar-dept-popup-contact-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 22px;
}

.omsar-dept-popup-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #082c5e;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    background: #fff;
    border-radius: 999px;
    padding: 4px 10px;
}

.omsar-dept-popup-contact-item:hover,
.omsar-dept-popup-contact-item:focus {
    color: #0e4a8a;
    text-decoration: none;
}

.omsar-dept-popup-contact-item svg {
    width: 16px;
    height: 16px;
    color: #082c5e;
    flex-shrink: 0;
}

.omsar-dept-popup-contact-item span {
    word-break: break-word;
}

@media (max-width: 640px) {
    .omsar-dept-popup {
        padding: 12px;
        align-items: flex-end;
    }

    .omsar-dept-popup-dialog {
        max-height: calc(100vh - 24px);
        border-radius: 10px 10px 0 0;
    }

    .omsar-dept-popup-header {
        padding: 16px 44px;
    }

    .omsar-dept-popup-title {
        font-size: 1.05rem;
    }

    .omsar-dept-popup-body {
        padding: 20px 18px 22px;
    }
}

@media (max-width: 980px) {
    .omsar-dept-type-grid {
        grid-template-columns: 1fr 1fr;
    }

    .omsar-dept-type-grid > .omsar-dept-cat-card:last-child:nth-child(3n + 1) {
        grid-column: auto;
    }

    .omsar-dept-type-grid > .omsar-dept-cat-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .omsar-dept-type-grid {
        grid-template-columns: 1fr;
    }

    .omsar-dept-type-grid > .omsar-dept-cat-card:last-child:nth-child(odd) {
        grid-column: auto;
    }

    .omsar-dept-type-heading {
        font-size: 1.25rem;
    }
}
