/* Scoped styles for /refinery/ section */
.ref-wrap {
    font-size: 15px;
    line-height: 1.65;
    color: #2c3e50;
}

.ref-wrap p {
    margin: 0 0 13px;
}

/* Section / block header */
.ref-section-head {
    background: #f2f6f9;
    border-left: 4px solid #00adee;
    padding: 12px 16px;
    margin: 24px 0 14px;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.4;
    color: #1c2d3d;
}

.ref-section-head:first-child {
    margin-top: 4px;
}

/* Rich editorial text + inline gallery */
.ref-prose {
    font-size: 15px;
    line-height: 1.68;
    color: #2c3e50;
}

.ref-prose h3,
.ref-prose h4 {
    color: #1c2d3d;
    font-weight: 600;
    margin: 22px 0 10px;
}

.ref-prose ul,
.ref-prose ol {
    margin: 8px 0 16px;
    padding-left: 22px;
}

.ref-prose li {
    margin-bottom: 6px;
}

.ref-prose img {
    max-width: 100%;
    height: auto;
    border-radius: 3px;
    border: 1px solid #e1e8ed;
    margin: 10px 0 16px;
    display: block;
}

.ref-history-img {
    max-width: 100%;
    height: auto;
    border-radius: 3px;
    border: 1px solid #dfe7ed;
    margin: 8px 0 12px;
}

/* Callout / notification boxes */
.ref-callout {
    background: #f4fafe;
    border: 1px solid #ccebf8;
    border-left: 4px solid #00adee;
    border-radius: 3px;
    padding: 15px 18px;
    margin: 0 0 20px;
}

.ref-callout--warning {
    background: #fffcf2;
    border-color: #f3e2b3;
    border-left-color: #e0a800;
}

.ref-callout--neutral {
    background: #f8f9fa;
    border-color: #dee2e6;
    border-left-color: #6c757d;
}

.ref-callout p:last-child {
    margin-bottom: 0;
}

/* Leadership cards */
.ref-head-card {
    background: #fff;
    border: 1px solid #dce6ed;
    border-top: 3px solid #00adee;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 22px;
    box-shadow: 0 2px 6px rgba(28, 45, 61, 0.04);
}

.ref-head-top {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.ref-head-photo {
    flex: 0 0 175px;
}

.ref-head-photo img {
    width: 175px;
    height: 220px;
    object-fit: cover;
    object-position: top center;
    border-radius: 3px;
    border: 1px solid #dfe7ed;
    display: block;
}

.ref-head-meta {
    flex: 1 1 auto;
}

.ref-head-name {
    font-size: 20px;
    font-weight: 700;
    color: #163245;
    margin: 0 0 6px;
    line-height: 1.3;
}

.ref-head-pos {
    font-size: 14.5px;
    font-weight: 600;
    color: #0b4f75;
    margin: 0 0 12px;
    line-height: 1.45;
}

.ref-head-facts {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
    color: #465a6b;
}

.ref-head-facts li {
    margin-bottom: 4px;
}

.ref-head-details {
    border-top: 1px solid #e6edf2;
    padding-top: 12px;
}

.ref-head-details summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: #0b4f75;
    padding: 4px 0;
    user-select: none;
}

.ref-head-details summary:hover {
    color: #00adee;
}

.ref-head-bio {
    padding-top: 10px;
    font-size: 14px;
    line-height: 1.6;
}

.ref-head-bio h4 {
    font-size: 14.5px;
    font-weight: 700;
    color: #1c2d3d;
    margin: 14px 0 6px;
    padding-bottom: 3px;
    border-bottom: 1px dashed #dce6ed;
}

/* Org structure hierarchy */
.ref-org-chain {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 8px 0 26px;
}

.ref-org-box {
    width: 100%;
    max-width: 560px;
    border: 1px solid #ccebf8;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    text-align: center;
}

.ref-org-box-title {
    background: #0b4f75;
    color: #fff;
    font-weight: 600;
    font-size: 14.5px;
    padding: 9px 14px;
}

.ref-org-box-body {
    padding: 12px 16px;
    font-size: 14.5px;
    color: #1c2d3d;
}

.ref-org-box-body p {
    margin: 0 0 6px;
}

.ref-org-box-body p:last-child {
    margin-bottom: 0;
}

.ref-org-arrow {
    font-size: 20px;
    line-height: 1.2;
    color: #00adee;
    font-weight: 700;
    padding: 4px 0;
}

.ref-org-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -8px 20px;
}

.ref-org-col {
    width: 50%;
    padding: 0 8px 16px;
    box-sizing: border-box;
    display: flex;
}

.ref-dept-card {
    width: 100%;
    background: #fff;
    border: 1px solid #dce6ed;
    border-top: 3px solid #00adee;
    border-radius: 3px;
    display: flex;
    flex-direction: column;
}

.ref-dept-head {
    background: #f4fafe;
    padding: 10px 14px;
    font-weight: 600;
    font-size: 14.5px;
    line-height: 1.38;
    color: #163245;
    border-bottom: 1px solid #e1ecf2;
}

.ref-dept-body {
    padding: 12px 14px;
    font-size: 13.8px;
    line-height: 1.5;
    color: #34495e;
}

.ref-dept-body ul {
    margin: 0;
    padding-left: 18px;
}

.ref-dept-body li {
    margin-bottom: 5px;
}

/* Announcements */
.ref-ad-card {
    background: #fff;
    border: 1px solid #dce6ed;
    border-left: 4px solid #00adee;
    border-radius: 3px;
    padding: 14px 18px;
    margin-bottom: 14px;
}

.ref-ad-title {
    font-size: 15.5px;
    font-weight: 600;
    color: #163245;
    margin: 0 0 8px;
    line-height: 1.4;
}

.ref-ad-body {
    font-size: 14.5px;
    color: #2c3e50;
    line-height: 1.6;
}

.ref-ad-body p:last-child {
    margin-bottom: 0;
}

/* Document attachment cards */
.ref-doc-list {
    margin: 12px 0 22px;
    padding: 0;
    list-style: none;
}

.ref-doc-item {
    display: flex;
    align-items: flex-start;
    padding: 11px 14px;
    border: 1px solid #e3eaef;
    border-radius: 3px;
    margin-bottom: 9px;
    background: #fff;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ref-doc-item:hover {
    background: #f7fbfd;
    border-color: #b7dff2;
}

.ref-doc-badge {
    flex: 0 0 auto;
    min-width: 44px;
    text-align: center;
    padding: 3px 6px;
    margin-right: 12px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    background: #e6f4fb;
    color: #0b4f75;
    border: 1px solid #bce2f5;
}

.ref-doc-badge--pptx {
    background: #fdf0ec;
    color: #9e3315;
    border-color: #f3c8bc;
}

.ref-doc-badge--img {
    background: #edf7f1;
    color: #1f6b3b;
    border-color: #bfe4cd;
}

.ref-doc-link-wrap {
    flex: 1 1 auto;
}

.ref-doc-link {
    font-size: 14.8px;
    color: #0b4f75;
    text-decoration: underline;
    line-height: 1.45;
}

.ref-doc-link:hover {
    color: #00adee;
}

.ref-lang-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    font-size: 11px;
    font-weight: 600;
    color: #0b4f75;
    background: #e6f4fb;
    border: 1px solid #bce2f5;
    border-radius: 2px;
    vertical-align: middle;
}

.ref-doc-unavailable {
    color: #6c757d;
    font-style: italic;
}

/* Photo / Map galleries with lightbox */
.ref-gallery {
    display: flex;
    flex-wrap: wrap;
    margin: 12px -8px 22px;
}

.ref-gallery-col {
    width: 50%;
    padding: 0 8px 16px;
    box-sizing: border-box;
    display: flex;
}

.ref-gallery-card {
    width: 100%;
    border: 1px solid #dce6ed;
    border-radius: 3px;
    background: #fff;
    padding: 10px;
    display: flex;
    flex-direction: column;
}

.ref-gallery-card img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    border-radius: 2px;
    cursor: zoom-in;
    display: block;
}

.ref-gallery-caption {
    margin-top: 8px;
    font-size: 13.5px;
    font-weight: 500;
    color: #2c3e50;
}

.ref-map-wrap img {
    width: 100%;
    height: auto;
    border: 1px solid #dce6ed;
    border-radius: 3px;
    cursor: zoom-in;
}

.ref-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 25, 36, 0.86);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 10000;
    cursor: zoom-out;
}

.ref-lightbox.active {
    display: flex;
}

.ref-lightbox img {
    max-width: 94%;
    max-height: 92vh;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    background: #fff;
}

/* Tables */
.ref-table-wrap {
    width: 100%;
    overflow-x: auto;
    margin: 12px 0 22px;
    -webkit-overflow-scrolling: touch;
}

.content-block table.ref-table {
    width: 100% !important;
    border-collapse: collapse;
    border: 1px solid #cfdbe3;
    margin-bottom: 0;
    font-size: 14px;
    background: #fff;
}

.content-block table.ref-table th,
.content-block table.ref-table td {
    border: 1px solid #cfdbe3;
    padding: 9px 10px;
    vertical-align: middle;
    line-height: 1.4;
}

.content-block table.ref-table thead th {
    background: #e9f6fc;
    color: #163245;
    font-weight: 600;
    text-align: center;
}

.content-block table.ref-table td.ref-col-idx {
    text-align: center;
    width: 46px;
    font-weight: 600;
}

.content-block table.ref-table td.ref-col-unit,
.content-block table.ref-table td.ref-col-period {
    text-align: center;
    white-space: nowrap;
}

.content-block table.ref-table th.ref-col-num,
.content-block table.ref-table td.ref-col-num {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Accordion in Electronic DB */
.ref-acc-details {
    border: 1px solid #dce6ed;
    border-radius: 3px;
    margin-bottom: 14px;
    background: #fff;
}

.ref-acc-summary {
    cursor: pointer;
    padding: 12px 16px;
    background: #f2f6f9;
    border-left: 4px solid #00adee;
    font-weight: 600;
    font-size: 15.5px;
    color: #1c2d3d;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    list-style: none;
}

.ref-acc-summary::-webkit-details-marker {
    display: none;
}

.ref-acc-count {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    background: #e1f1fa;
    color: #0b4f75;
}

.ref-acc-body {
    padding: 12px 16px 4px;
}

@media (max-width: 767px) {
    .ref-head-top {
        flex-direction: column;
    }

    .ref-head-photo {
        flex: 0 0 auto;
    }

    .ref-org-col,
    .ref-gallery-col {
        width: 100%;
    }
}
