:root {
    --primary: #b13216;
    --primary-dark: #842111;
    --primary-light: #e2682d;
    --surface: #ffffff;
    --surface-soft: #f7f7f7;
    --warm-sand: #f3f1ef;
    --text: #2b2b2b;
    --muted: #666666;
    --border: #ded8d4;
    --dark: #33241f;
    --white: #ffffff;
    --shadow: 0 10px 24px rgba(45, 35, 31, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--surface);
    color: var(--text);
    font-family: "Noto Sans", Arial, sans-serif;
    line-height: 1.55;
}

body[dir="rtl"] {
    text-align: right;
    font-family: "Noto Naskh Arabic", "Noto Sans", Arial, sans-serif;
}

.ltr-text {
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-block;
    text-align: left;
    font-family: Arial, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
}

.legacy-header {
    background: #eee9df;
    border-top: 2px solid #a9220f;
    box-shadow: none;
}

.legacy-top {
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #fff;
    font-size: 17px;
    background:
        radial-gradient(circle at 13% 40%, rgba(255, 183, 42, 0.8), transparent 18%),
        linear-gradient(105deg, #b7200d 0%, #f47b1d 21%, #ffe491 42%, #f5ecd0 68%, #e9e5dc 100%);
}

.phone-icons {
    font-size: 18px;
}

.legacy-nav-wrap {
    min-height: 120px;
    background:
        linear-gradient(115deg, rgba(183, 32, 13, 0.95) 0%, rgba(244, 123, 29, 0.75) 16%, rgba(255, 231, 158, 0.62) 35%, rgba(238, 233, 223, 0.96) 55%, #eee9df 100%);
    border-bottom: 1px solid #d4c9b8;
}

.legacy-nav {
    min-height: 120px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 36px;
}

.legacy-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    font-size: 15px;
    color: #1f1a16;
}

.legacy-menu a,
.legacy-menu > .nav-dropdown > a {
    white-space: nowrap;
}

body[dir="ltr"] .legacy-menu {
    gap: 24px;
    font-size: 14px;
}

.nav-dropdown {
    position: relative;
    display: inline-flex;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 50;
    display: none;
    min-width: 230px;
    padding: 16px 0;
    background: rgba(93, 91, 80, 0.94);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
}

body[dir="ltr"] .nav-dropdown-menu {
    left: 0;
    right: auto;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    display: grid;
}

.nav-dropdown-menu a {
    display: block;
    box-sizing: border-box;
    padding: 12px 34px;
    color: #fff;
    white-space: nowrap;
    border-bottom: 0;
}

body[dir="rtl"] .nav-dropdown-menu a {
    padding-right: 48px;
    padding-left: 34px;
    text-align: right;
}

body[dir="ltr"] .nav-dropdown-menu a {
    padding-left: 48px;
    padding-right: 34px;
    text-align: left;
}

.nav-dropdown-menu a:hover {
    color: #ff8b43;
    background: rgba(255, 255, 255, 0.06);
}

.legacy-menu > a,
.legacy-menu > .nav-dropdown > a {
    padding: 8px 0;
    border-bottom: 1px solid transparent;
}

.legacy-menu a.active,
.legacy-menu a:hover {
    color: #b13216;
    border-bottom-color: #b13216;
}

.legacy-menu .nav-dropdown-menu a {
    padding: 12px 34px;
    border-bottom: 0;
}

body[dir="rtl"] .legacy-menu .nav-dropdown-menu a {
    padding-right: 48px;
    padding-left: 34px;
}

body[dir="ltr"] .legacy-menu .nav-dropdown-menu a {
    padding-left: 48px;
    padding-right: 34px;
}

.legacy-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
    color: #6d6b68;
}

.legacy-logo.image-logo {
    justify-content: flex-end;
}

.legacy-logo.image-logo img {
    width: 320px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.legacy-logo-mark {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    color: #ef6a2e;
    font-size: 42px;
    background: rgba(255, 255, 255, 0.4);
}

.legacy-logo-text strong {
    display: block;
    color: #8b8a88;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 34px;
    line-height: 1;
    font-weight: 400;
}

.legacy-logo-text em {
    display: block;
    margin-top: 10px;
    color: #5b5048;
    font-style: normal;
    text-align: center;
}

.button,
button.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 11px 20px;
    border: 1px solid var(--primary);
    border-radius: 7px;
    background: var(--primary);
    color: var(--white);
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.button.secondary {
    background: transparent;
    color: var(--primary);
}

.button.light {
    border-color: #fff;
    background: #fff;
    color: var(--primary);
}

.button.outline-light {
    border-color: rgba(255, 255, 255, 0.72);
    background: transparent;
    color: #fff;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 26px;
}

.button-row.centered {
    justify-content: center;
}

h1,
h2,
h3 {
    margin: 0 0 16px;
    line-height: 1.12;
}

h1 {
    font-size: clamp(38px, 5vw, 56px);
    letter-spacing: 0;
}

h2 {
    font-size: clamp(26px, 3vw, 38px);
}

h3 {
    font-size: 21px;
}

p {
    margin-top: 0;
}

.lead {
    max-width: 650px;
    color: var(--muted);
    font-size: 17px;
}

.centered {
    text-align: center;
}

.centered .lead,
.centered p {
    margin-left: auto;
    margin-right: auto;
}

.section {
    padding: 78px 0;
}

.section.alt {
    background: var(--warm-sand);
}

.page-intro {
    padding: 42px 0 34px;
    background: var(--surface);
}

.page-intro h1 {
    font-size: clamp(32px, 4vw, 48px);
}

.page-intro .lead {
    font-size: 16px;
}

.grid {
    display: grid;
    gap: 24px;
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.card-body {
    padding: 26px;
}

.card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 16px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
}

.section-kicker {
    background: transparent;
    color: var(--primary);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding-left: 0;
}

.legacy-slider {
    background:
        linear-gradient(90deg, #0d0d0d 0%, rgba(16, 16, 16, 0.86) 7%, transparent 18%, transparent 82%, rgba(16, 16, 16, 0.86) 93%, #0d0d0d 100%),
        #111;
}

.legacy-slide-frame {
    position: relative;
    width: min(1660px, 100%);
    height: clamp(520px, 76vh, 820px);
    margin: 0 auto;
    overflow: hidden;
    background: #111;
}

.legacy-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 700ms ease;
}

.legacy-slide.active {
    opacity: 1;
}

.legacy-slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.legacy-slide-caption {
    position: absolute;
    right: 42px;
    bottom: 48px;
    width: min(520px, calc(100% - 84px));
    padding: 16px 22px;
    color: #fff;
    background: rgba(0, 0, 0, 0.72);
    border-top: 1px solid rgba(255, 255, 255, 0.74);
    text-align: right;
}

body[dir="ltr"] .legacy-slide-caption {
    left: 42px;
    right: auto;
    text-align: left;
}

.legacy-slide-caption h1 {
    margin-bottom: 8px;
    color: #f06b2f;
    font-size: 16px;
    font-weight: 700;
}

.legacy-slide-caption p,
.legacy-slide-caption .rich-content {
    margin: 0;
    font-size: 13px;
    line-height: 1.8;
}

.legacy-dots {
    position: absolute;
    left: 50%;
    bottom: 19px;
    display: flex;
    gap: 12px;
    transform: translateX(-50%);
}

.legacy-dots button {
    width: 14px;
    height: 14px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #d7d7d7;
    cursor: pointer;
}

.legacy-dots button.active {
    background: #f47b1d;
}

.mission-grid {
    display: grid;
    grid-template-columns: 1fr 0.95fr;
    gap: 72px;
    align-items: center;
}

.home-about-cards-section {
    padding: 34px 0;
    background: var(--warm-sand);
}

.home-about-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
}

.home-about-card {
    position: relative;
    min-height: 255px;
    overflow: hidden;
    background: #ddd;
}

.home-about-card img {
    width: 100%;
    height: 100%;
    min-height: 255px;
    object-fit: cover;
    transition: transform 300ms ease;
}

.home-about-card span {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    display: block;
    padding: 18px 22px;
    color: #fff;
    background: rgba(239, 106, 46, 0.78);
    text-align: right;
}

body[dir="ltr"] .home-about-card span {
    text-align: left;
}

.home-about-card strong,
.home-about-card em {
    display: block;
}

.home-about-card strong {
    margin-bottom: 10px;
    font-size: 16px;
}

.home-about-card em {
    font-style: normal;
    font-size: 14px;
    line-height: 1.8;
}

.home-about-card:hover img {
    transform: scale(1.04);
}

.mission-points {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-top: 28px;
    font-size: 14px;
}

.mission-points strong {
    display: block;
    color: var(--text);
}

.mission-points span {
    color: var(--muted);
}

.mission-photo-wrap {
    position: relative;
}

.mission-photo {
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.experience-badge {
    position: absolute;
    left: -32px;
    bottom: -24px;
    width: 170px;
    padding: 20px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 18px 38px rgba(173, 55, 0, 0.3);
}

body[dir="rtl"] .experience-badge {
    left: auto;
    right: -32px;
}

.experience-badge strong {
    display: block;
    font-size: 32px;
    line-height: 1;
}

.experience-badge span {
    display: block;
    font-size: 12px;
    margin-top: 8px;
}

.section-heading {
    margin-bottom: 42px;
}

.section-heading p {
    max-width: 540px;
    color: var(--muted);
}

.services-mosaic {
    display: grid;
    grid-template-columns: 1.25fr 0.72fr 0.72fr;
    grid-auto-rows: minmax(190px, auto);
    gap: 22px;
}

.service-tile {
    display: grid;
    align-content: center;
    min-height: 190px;
    padding: 30px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.service-tile.featured {
    background: var(--primary);
    color: #fff;
}

.service-tile.featured p,
.service-tile.featured a {
    color: #fff;
}

.service-tile img {
    width: calc(100% + 60px);
    height: 160px;
    margin: -30px -30px 22px;
    object-fit: cover;
}

.service-icon {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 22px;
    border-radius: 8px;
    background: #f5dfd7;
    color: var(--primary);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.mosaic-photo {
    width: 100%;
    height: 100%;
    min-height: 190px;
    object-fit: cover;
    border-radius: 10px;
}

.impact-band {
    padding: 64px 0;
    background: #303030;
    color: #fff;
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 34px;
}

.impact-stat span {
    display: block;
    color: var(--primary-light);
    font-size: 38px;
    line-height: 1;
    font-weight: 900;
}

.goal-line {
    width: min(470px, 100%);
    height: 16px;
    margin: 42px auto 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    overflow: hidden;
}

.goal-line span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary-light), var(--primary));
}

.news-preview {
    background: #fff;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 28px;
}

.toolbar p {
    margin-bottom: 0;
    color: var(--muted);
}

.toolbar a,
.news-card a {
    color: var(--primary);
    font-weight: 900;
}

.news-card {
    background: transparent;
}

.news-card img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 18px;
}

.news-card small,
.card small {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.news-card h3 {
    font-size: 20px;
}

.cta-panel {
    padding: 58px 28px;
    border-radius: 14px;
    background: var(--primary);
    color: #fff;
    text-align: center;
    box-shadow: 0 24px 46px rgba(173, 55, 0, 0.22);
}

.cta-panel p {
    max-width: 620px;
    margin: 0 auto;
}

.footer {
    background: var(--dark);
    color: #fff8f6;
    padding: 56px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 36px;
}

.footer a {
    color: #fff8f6;
    opacity: 0.86;
}

.loan-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.services-intro {
    padding-bottom: 24px;
}

.services-tabs-section {
    padding-top: 34px;
}

.tab-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.tab-button {
    min-width: 180px;
    padding: 12px 22px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.tab-button.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.tab-panel[hidden] {
    display: none;
}

.tab-panel > h2 {
    margin-bottom: 24px;
}

.eligibility-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 22px 10px;
    color: #111;
    line-height: 2.1;
}

.eligibility-content h2 {
    margin-bottom: 24px;
}

.eligibility-content h3 {
    color: #ff6a2a;
    font-size: 22px;
    margin-top: 24px;
    margin-bottom: 10px;
}

.eligibility-content ul {
    margin: 0 0 24px;
    padding-inline-start: 24px;
}

body[dir="rtl"] .eligibility-content ul {
    padding-inline-start: 0;
    padding-inline-end: 24px;
}

.eligibility-content li {
    margin-bottom: 9px;
}

.loan-card {
    display: grid;
    grid-template-columns: 0.9fr 1fr;
    min-height: 260px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.loan-card:not(.wide) {
    grid-template-columns: 1fr;
}

.loan-card img {
    width: 100%;
    height: 100%;
    min-height: 230px;
    object-fit: cover;
}

.loan-card:not(.wide) img {
    height: 190px;
}

.legacy-products-list {
    display: grid;
    gap: 34px;
}

.legacy-product {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 34px;
    align-items: start;
    padding: 24px 0;
    border-bottom: 1px solid #d8d0c6;
}

body[dir="ltr"] .legacy-product {
    grid-template-columns: 320px minmax(0, 1fr);
}

.legacy-product-image {
    min-height: 210px;
    border: 1px solid #8d8d8d;
    background: transparent;
}

body[dir="ltr"] .legacy-product-image {
    order: -1;
}

.legacy-product-image img {
    width: 100%;
    height: 100%;
    min-height: 210px;
    object-fit: cover;
}

.legacy-product-body {
    color: #050505;
    font-size: 18px;
    line-height: 2;
}

.legacy-product-body h3 {
    color: #ff6a2a;
    font-size: 24px;
    margin-bottom: 10px;
}

.rich-content p {
    margin: 0 0 12px;
}

.rich-content ul,
.rich-content ol {
    margin-top: 0;
    padding-inline-start: 24px;
}

body[dir="rtl"] .rich-content ul,
body[dir="rtl"] .rich-content ol {
    padding-inline-start: 0;
    padding-inline-end: 24px;
}

.apply-grid,
.measured-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 72px;
    align-items: start;
}

.requirement-list {
    display: grid;
    gap: 18px;
    margin-top: 28px;
}

.requirement-list div,
.journey-card {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
}

.requirement-list strong,
.requirement-list span,
.journey-card span {
    display: block;
}

.requirement-list span,
.journey-card span {
    color: var(--muted);
}

.journey-card {
    background: var(--warm-sand);
}

.journey-card ol {
    display: grid;
    gap: 22px;
    margin: 0;
    padding-left: 22px;
}

body[dir="rtl"] .journey-card ol {
    padding-left: 0;
    padding-right: 22px;
}

.impact-hero {
    min-height: 520px;
    display: grid;
    align-items: center;
    background-size: cover;
    background-position: center;
    position: relative;
}

.impact-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.55));
}

.impact-hero .container {
    position: relative;
}

.stat {
    padding: 28px;
    text-align: center;
}

.stat-value {
    display: block;
    color: var(--primary);
    font-size: 34px;
    line-height: 1;
    font-weight: 900;
}

.social-impact-main {
    display: grid;
    gap: 22px;
    align-items: start;
}

.social-impact-main.has-image {
    grid-template-columns: 370px minmax(0, 1fr);
}

body[dir="ltr"] .social-impact-main {
    grid-template-columns: 370px minmax(0, 1fr);
}

body[dir="ltr"] .social-impact-main:not(.has-image) {
    grid-template-columns: 1fr;
}

.social-impact-text {
    color: #050505;
    font-size: 17px;
    line-height: 2.1;
}

.social-impact-text .rich-content {
    text-align: right;
}

body[dir="ltr"] .social-impact-text .rich-content {
    text-align: left;
}

.social-impact-text h2,
.social-impact-table-wrap h3 {
    color: #ff6a2a;
    font-size: 22px;
}

.social-impact-image {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
}

.social-impact-image {
    order: -1;
}

.social-impact-table-wrap {
    width: min(520px, 100%);
    margin: 34px auto 0;
}

.social-impact-layout.has-image .social-impact-table-wrap {
    width: calc(100% - 392px);
    margin-left: 392px;
    margin-right: 0;
}

body[dir="rtl"] .social-impact-layout.has-image .social-impact-table-wrap {
    margin-left: 0;
    margin-right: 392px;
}

.social-impact-table-wrap h3 {
    margin-bottom: 14px;
}

.social-impact-table {
    width: 100%;
    max-width: 520px;
    border-collapse: collapse;
    background: transparent;
    color: #050505;
    font-size: 16px;
}

body[dir="rtl"] .social-impact-table {
    margin-left: auto;
}

.social-impact-table th,
.social-impact-table td {
    width: 50%;
    padding: 10px 18px;
    border: 1px solid #111;
    font-weight: 400;
}

.social-impact-table td {
    direction: ltr;
    text-align: left;
}

body[dir="rtl"] .social-impact-table td {
    text-align: right;
}

.about-page {
    min-height: 620px;
}

.about-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 370px;
    gap: 32px;
    align-items: start;
}

.about-panel[hidden] {
    display: none;
}

body[dir="ltr"] .about-panel {
    grid-template-columns: 370px minmax(0, 1fr);
}

.about-copy {
    color: #050505;
    font-size: 16px;
    line-height: 2;
}

.about-copy h1 {
    color: #ff6a2a;
    font-size: 22px;
}

.about-copy .rich-content {
    direction: rtl;
    text-align: right !important;
    text-align-last: right !important;
}

body[dir="ltr"] .about-copy .rich-content {
    direction: ltr;
    text-align: left !important;
    text-align-last: left !important;
}

.about-copy .rich-content div,
.about-copy .rich-content p {
    display: block !important;
    width: 100% !important;
    direction: rtl !important;
    text-align: right !important;
    text-align-last: right !important;
}

body[dir="ltr"] .about-copy .rich-content div,
body[dir="ltr"] .about-copy .rich-content p {
    direction: ltr !important;
    text-align: left !important;
    text-align-last: left !important;
}

.about-image {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
}

body[dir="ltr"] .about-image {
    order: -1;
}

.find-us-title {
    color: #2b2b2b;
    font-size: 28px;
    text-align: right;
}

body[dir="ltr"] .find-us-title {
    text-align: left;
}

.find-us-layout {
    display: grid;
    grid-template-columns: minmax(360px, 0.72fr) minmax(520px, 1.28fr);
    grid-template-areas: "info map";
    gap: 42px;
    align-items: start;
}

body[dir="ltr"] .find-us-layout {
    grid-template-columns: minmax(360px, 0.72fr) minmax(520px, 1.28fr);
}

.find-us-info {
    display: grid;
    grid-area: info;
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: start;
}

.find-us-info h2 {
    font-size: 18px;
}

.find-us-table {
    width: 100%;
    border-collapse: collapse;
    color: #050505;
}

.find-us-table th,
.find-us-table td {
    padding: 4px 0 10px 18px;
    border: 0;
    vertical-align: top;
    font-weight: 400;
    line-height: 1.8;
}

body[dir="rtl"] .find-us-table th,
body[dir="rtl"] .find-us-table td {
    padding-right: 0;
    padding-left: 18px;
    text-align: right;
}

.find-us-table th {
    width: 95px;
    font-weight: 700;
}

.find-us-map img {
    width: 100%;
    max-height: 640px;
    object-fit: contain;
    background: #fff;
}

.find-us-map {
    grid-area: map;
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.album-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--shadow);
}

.album-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.photo-grid,
.admin-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.photo-card,
.admin-photo-grid div {
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.photo-card img,
.admin-photo-grid img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.photo-lightbox-trigger {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.photo-card figcaption,
.admin-photo-grid a {
    display: block;
    margin: 12px;
}

.photo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 52px 76px;
    background: rgba(0, 0, 0, 0.86);
}

.photo-lightbox[hidden] {
    display: none;
}

.photo-lightbox img {
    max-width: 100%;
    max-height: 88vh;
    object-fit: contain;
}

.photo-lightbox-close,
.photo-lightbox-nav {
    position: absolute;
    border: 0;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    cursor: pointer;
}

.photo-lightbox-close {
    top: 18px;
    right: 24px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 34px;
    line-height: 1;
}

.photo-lightbox-nav {
    top: 50%;
    width: 48px;
    height: 64px;
    border-radius: 7px;
    font-size: 56px;
    line-height: 1;
    transform: translateY(-50%);
}

.photo-lightbox-nav.prev {
    left: 18px;
}

.photo-lightbox-nav.next {
    right: 18px;
}

body.has-lightbox {
    overflow: hidden;
}

.story-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

.story-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.story-card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
}

.story-card .card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.story-card .card-body p:last-of-type {
    margin-bottom: 18px;
}

.story-card .read-link {
    display: inline-flex;
    margin-top: auto;
}

.story-detail {
    max-width: 900px;
}

.story-detail-image {
    width: 100%;
    height: 460px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 28px;
}

.service-detail {
    max-width: 900px;
}

.service-detail-image {
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 28px;
}

.news-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
}

.news-list-card {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 250px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.news-list-card.has-image {
    grid-template-columns: 0.9fr 1.1fr;
}

.news-thumb {
    min-height: 250px;
    background: var(--warm-sand);
}

.news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-list-body {
    display: flex;
    min-height: 250px;
    flex-direction: column;
    justify-content: center;
    padding: 28px;
}

.news-list-body h2 {
    margin-bottom: 12px;
    font-size: 27px;
}

.news-list-body p {
    color: var(--text);
}

.read-link {
    color: var(--primary);
    font-weight: 900;
}

.form-grid {
    display: grid;
    gap: 16px;
}

.field {
    display: grid;
    gap: 7px;
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

label {
    font-weight: 800;
}

input,
textarea,
select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    font: inherit;
}

textarea {
    min-height: 150px;
    resize: vertical;
}

.notice {
    margin: 16px 0;
    padding: 12px 14px;
    border-radius: 8px;
    font-weight: 700;
}

.notice.success {
    background: #e8f7f0;
    color: #176044;
}

.notice.error {
    background: #ffe8e5;
    color: #9b1c10;
}

.install-page,
.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.install-card,
.login-card {
    width: min(520px, 100%);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 32px;
    box-shadow: 0 20px 50px rgba(60, 45, 39, 0.12);
}

.admin-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px 1fr;
}

.admin-sidebar {
    background: var(--dark);
    color: #fff;
    padding: 24px;
}

.admin-sidebar a {
    display: block;
    padding: 10px 0;
    color: #fff;
    opacity: 0.9;
}

.admin-main {
    padding: 32px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    border-bottom: 1px solid #eee0da;
    text-align: left;
    vertical-align: top;
}

body[dir="rtl"] .admin-table th,
body[dir="rtl"] .admin-table td {
    text-align: right;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-actions form {
    margin: 0;
}

.admin-filter-bar {
    display: grid;
    grid-template-columns: 160px 160px 160px minmax(220px, 1fr) auto auto;
    gap: 12px;
    align-items: end;
    margin: 0 0 18px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.admin-panel {
    margin: 0 0 28px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.admin-help {
    margin-top: 0;
    color: var(--muted);
}

.rich-editor {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.rich-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid #eee0da;
    background: #f8f5f2;
}

.rich-toolbar button,
.rich-toolbar input[type="color"] {
    height: 32px;
    border: 1px solid #cfc4bd;
    border-radius: 5px;
    background: #fff;
    color: #222;
    cursor: pointer;
}

.rich-toolbar button {
    width: auto;
    min-width: 34px;
    padding: 0 10px;
    font: inherit;
    font-size: 13px;
}

.rich-toolbar input[type="color"] {
    width: 42px;
    min-width: 42px;
    padding: 3px;
}

.rich-color-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-inline-start: 4px;
    font-size: 13px;
    font-weight: 700;
}

.rich-editable {
    min-height: 180px;
    padding: 12px 14px;
    outline: none;
}

@media (max-width: 920px) {
    .legacy-nav {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 18px 0;
    }

    .legacy-logo {
        justify-self: center;
        order: -1;
    }

    .legacy-menu {
        flex-wrap: wrap;
        gap: 16px 24px;
    }

    .legacy-nav-wrap {
        min-height: auto;
    }

    .grid-3,
    .grid-4,
    .home-about-cards,
    .impact-grid,
    .footer-grid,
    .mission-grid,
    .services-mosaic,
    .loan-grid,
    .apply-grid,
    .measured-grid,
    .social-impact-main,
    .about-panel,
    .find-us-layout,
    .find-us-info,
    .album-grid,
    .photo-grid,
    .admin-photo-grid,
    .story-grid,
    .news-layout,
    .news-grid,
    .news-list-card.has-image,
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .find-us-layout {
        grid-template-areas:
            "info"
            "map";
    }

    .impact-hero {
        min-height: 480px;
    }

    .legacy-slide-frame {
        height: 520px;
    }

    .legacy-slide-caption,
    body[dir="ltr"] .legacy-slide-caption {
        left: 20px;
        right: 20px;
        width: auto;
        text-align: inherit;
    }

    .experience-badge {
        left: 20px;
        right: auto;
    }
}
