/* Site-wide footer: policy bar that overlaps a photo-backed footer. */

:root {
    --dk-footer-overlap: 44px;
    --dk-footer-accent: #ffd23f;
}

/* Policy bar */
.ham-premium-footer {
    position: relative;
    z-index: 2;
    margin-bottom: calc(var(--dk-footer-overlap) * -1);
    border-top: 0;
    background: transparent;
    overflow: visible;
}

.dk-home ~ .ham-premium-footer {
    background: linear-gradient(to bottom, #f5f7fa calc(100% - var(--dk-footer-overlap)), transparent 0);
}

.ham-footer-policies-section {
    padding: 32px 0 0;
    background: transparent;
}

.dk-home ~ .ham-premium-footer .ham-footer-policies-section { padding-top: 0; }

.ham-footer-policies-section .row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 16px 40px rgba(16, 42, 79, .18);
}

.ham-footer-policies-section .row > [class*="col-"] {
    flex: none;
    width: auto;
    max-width: none;
    margin: 0 !important;
    padding: 0;
    border-bottom: 1px solid #e4e9f0;
    border-inline-end: 1px solid #e4e9f0;
}

.ham-footer-policies-section .row > :nth-child(2n) { border-inline-end: 0; }
.ham-footer-policies-section .row > :nth-last-child(-n + 2) { border-bottom: 0; }

.ham-policy-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "icon title" "icon action";
    align-content: center;
    column-gap: 12px;
    height: 100%;
    padding: 16px 12px;
    text-align: start;
    text-decoration: none !important;
}

.ham-policy-card:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }

.ham-policy-icon-wrap {
    grid-area: icon;
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--soft-primary);
}

.ham-policy-icon-wrap svg { width: 22px; height: 22px; stroke: var(--primary); }
.ham-policy-icon-wrap svg rect { fill: var(--primary); }

.ham-policy-title {
    grid-area: title;
    align-self: end;
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--primary);
    text-transform: capitalize;
}

.ham-policy-action {
    grid-area: action;
    align-self: start;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
    font-size: 13px;
    font-weight: 500;
    color: #5b6778;
}

[dir="rtl"] .ham-policy-action i { transform: scaleX(-1); }

/* Footer */
.dk-footer {
    padding-top: calc(var(--dk-footer-overlap) + 40px);
    background: linear-gradient(rgba(12, 30, 58, .88), rgba(12, 30, 58, .95)), url("../img/footer-bg.jpg") center / cover no-repeat #0c1e3a;
    color: rgba(255, 255, 255, .78);
    font-size: 14px;
}

.dk-footer a { color: inherit; }
.dk-footer a:hover { color: var(--dk-footer-accent); }
.dk-footer a:focus-visible { outline: 2px solid var(--dk-footer-accent); outline-offset: 2px; }

.dk-footer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 24px;
    padding-bottom: 32px;
}

.dk-footer-brand,
.dk-footer-contact { grid-column: 1 / -1; }

.dk-footer-logo {
    display: inline-block;
    max-width: 100%;
    padding: 12px 20px;
    border-radius: 14px;
    background: #fff;
}

.dk-footer-logo img { display: block; height: 64px; width: auto; max-width: 100%; object-fit: contain; }

@media (min-width: 992px) {
    .dk-footer-logo { padding: 14px 24px; }
    .dk-footer-logo img { height: 80px; }
}

.dk-footer-about { margin: 16px 0 0; max-width: 36ch; line-height: 1.6; }

.dk-footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.dk-footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 18px;
    transition: background-color .2s ease, color .2s ease;
}

.dk-footer-social a:hover { background: var(--dk-footer-accent); color: #0c1e3a; }

.dk-footer-apps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.dk-footer-apps img { display: block; height: 40px; }

.dk-footer-title {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.dk-footer-links { margin: 0; padding: 0; list-style: none; }

.dk-footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    transition: color .2s ease;
}

.dk-footer-contact-list { margin: 0; padding: 0; list-style: none; }

.dk-footer-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.dk-footer-contact-list li:last-child { margin-bottom: 0; }

.dk-footer-contact-list i {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .12);
    color: var(--dk-footer-accent);
    font-size: 18px;
}

.dk-footer-contact-list span { display: block; min-width: 0; line-height: 1.45; overflow-wrap: anywhere; }
.dk-footer-label { font-size: 12px; color: rgba(255, 255, 255, .65); }

.dk-footer-bottom {
    padding: 16px 0 88px;
    border-top: 1px solid rgba(255, 255, 255, .14);
}

.dk-footer-bottom-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 24px;
    text-align: center;
}

.dk-footer-copy,
.dk-footer-copy * {
    background: transparent !important;
    color: rgba(255, 255, 255, .78) !important;
    font-family: inherit !important;
    font-size: 13px !important;
}

.dk-footer-copy p { margin: 0; }

.dk-footer-payments { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.dk-footer-payments img { display: block; max-height: 24px; width: auto; }

@media (min-width: 576px) {
    .ham-policy-card { padding: 20px 24px; column-gap: 16px; }
    .ham-policy-icon-wrap { width: 48px; height: 48px; }
    .ham-policy-title { font-size: 15px; }
}

@media (min-width: 992px) {
    .ham-footer-policies-section .row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .ham-footer-policies-section .row > [class*="col-"] { border-bottom: 0; }
    .ham-footer-policies-section .row > :nth-child(2n) { border-inline-end: 1px solid #e4e9f0; }
    .ham-footer-policies-section .row > :last-child { border-inline-end: 0; }

    .dk-footer { padding-top: calc(var(--dk-footer-overlap) + 56px); }
    .dk-footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1.4fr; gap: 40px; padding-bottom: 48px; }
    .dk-footer-brand,
    .dk-footer-contact { grid-column: auto; }
    .dk-footer-links a { min-height: 34px; }
}

@media (min-width: 1200px) {
    .dk-footer-bottom { padding-bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .dk-footer-social a,
    .dk-footer-links a { transition: none; }
}
