/* Stanbic Bank Tanzania - Main Stylesheet */
@font-face {
    font-family: 'BentonSans';
    src: url('../fonts/BentonSans-Bold.woff2') format('woff2'),
    url('../fonts/BentonSans-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'BentonSans';
    src: url('../fonts/BentonSans.woff2') format('woff2'),
    url('../fonts/BentonSans.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'BentonSans';
    src: url('../fonts/BentonSans-Light.woff2') format('woff2'),
    url('../fonts/BentonSans-Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'BentonSans';
    src: url('../fonts/BentonSans-Black.woff2') format('woff2'),
    url('../fonts/BentonSans-Black.woff') format('woff');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

.display-none {
    display: none;
}
.width-0 {
    width: 0;
}

.color-stanbic-blue {
    color: #0062E1;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    background: #0032A4;
}

body {
    font-family: 'Benton-Sans-Regular', 'Inter', sans-serif;
    padding: 1.5rem 1.5rem 0 1.5rem;
    color: #475569;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===== App Container ===== */
.app-container {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
}

/* ===== Main Content Wrapper ===== */
.main-content {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

/* ===== Header & Navigation ===== */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 1.5rem 0;
    flex-wrap: wrap;
    gap: 1rem;
    flex-shrink: 0;
}

.app-header .logo-container {
    flex-shrink: 0;
}

.app-header .logo-container svg {
    display: block;
    max-width: 180px;
    height: auto;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.language-switcher {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.35rem;
    border-radius: 40px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.language-switcher-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 0.4rem 1rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    letter-spacing: 0.3px;
}

.language-switcher-btn.active {
    background: white;
    color: #002B5C;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.language-switcher-btn:hover:not(.active) {
    color: white;
}

/* ===== Help Button ===== */
.help-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    backdrop-filter: blur(4px);
}

.help-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.help-btn i {
    font-size: 1rem;
}

/* ===== Help Modal ===== */
.help-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.help-modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: helpSlideIn 0.3s ease;
}

@keyframes helpSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.help-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #002B5C;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.help-modal-header h2 {
    color: #002B5C;
    margin: 0;
    font-size: 1.4rem;
}

.help-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 5px 10px;
    transition: color 0.2s;
}

.help-modal-close:hover {
    color: #dc3545;
}

.help-modal-body {
    padding-right: 5px;
}

.help-section {
    margin-bottom: 25px;
}

.help-section h3 {
    color: #002B5C;
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.help-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.help-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.help-contact-item i {
    color: #0062E1;
    font-size: 1.1rem;
    margin-top: 2px;
    width: 20px;
    flex-shrink: 0;
}

.help-contact-item div {
    display: flex;
    flex-direction: column;
}

.help-contact-item strong {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.help-contact-item span {
    font-size: 0.9rem;
    color: #212529;
}

.help-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.help-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #0062E1;
    transition: background 0.2s;
}

.help-step:hover {
    background: #eef2f6;
}

.help-step-number {
    width: 32px;
    height: 32px;
    background: #002B5C;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.help-step-content {
    flex: 1;
}

.help-step-content .step-title {
    font-weight: 600;
    color: #002B5C;
    font-size: 0.95rem;
}

.help-step-content .step-desc {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 2px;
}

.help-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-tips ul li {
    padding: 8px 0 8px 30px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="%230062E1" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>') left center no-repeat;
    background-size: 18px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    font-size: 0.9rem;
}

.help-tips ul li:last-child {
    border-bottom: none;
}

.help-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
    margin-top: 10px;
}

/* ===== Account Selection Section ===== */
.account-selection-section {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.5rem 0 1rem 0;
}

.account-selection-section .section-header {
    text-align: center;
    color: white;
    margin-bottom: 2rem;
}

.account-selection-section .section-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    letter-spacing: -0.5px;
}

.account-selection-section .section-header p {
    font-size: 1rem;
    opacity: 0.85;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Account Cards Grid - Responsive ===== */
.account-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    width: 100%;
}

/* When only one card is visible, center it */
.account-cards-grid:has(.account-card.visible:only-child) {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
}

.account-card {
    background: white;
    border-radius: 24px;
    padding: 1.75rem 1.75rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: none;
    /* Hidden by default */;
    width: 100%;
}

.account-card.visible {
    display: block;
    /* Show when enabled */;
}

.account-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.account-card .card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.account-card .card-icon-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.account-card .card-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: transparent;
    flex-shrink: 0;
}

.account-card.personal .card-icon {
    border-color: #0057B3;
    color: #0057B3;
}

.account-card.business .card-icon {
    border-color: #007A3E;
    color: #007A3E;
}

.account-card .card-badge {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 0.25rem 0.9rem;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.06);
    color: #475569;
    white-space: nowrap;
}

.account-card.personal .card-badge {
    background: #E3F0FF;
    color: #0057B3;
}

.account-card.business .card-badge {
    background: #E6F7ED;
    color: #007A3E;
}

.account-card .card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #002B5C;
    margin-bottom: 0.2rem;
}

.account-card .card-subtitle {
    font-size: 0.85rem;
    color: #64748B;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.account-card .feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem 0;
}

.account-card .feature-list li {
    font-size: 0.85rem;
    color: #334155;
    padding: 0.35rem 0 0.35rem 1.75rem;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="%230062E1" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>') left center no-repeat;
    background-size: 16px;
    border-bottom: 1px solid #F1F5F9;
}

.account-card .feature-list li:last-child {
    border-bottom: none;
}

.account-card .card-arrow {
    display: flex;
    justify-content: flex-end;
    padding-top: 0.75rem;
}

.account-card .card-arrow .arrow-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    color: white;
    transition: opacity 0.2s ease;
}

.account-card .card-arrow .arrow-btn:hover {
    opacity: 0.8;
}

.account-card.personal .card-arrow .arrow-btn {
    background: #0057B3;
}

.account-card.business .card-arrow .arrow-btn {
    background: #007A3E;
}

/* ===== Full Width Footer (No Border Radius) ===== */
.footer-full {
    background: white;
    padding: 1.5rem 0 1rem 0;
    width: 100%;
    flex-shrink: 0;
    margin-top: auto;
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    width: calc(100% + 3rem);
}

.footer-full .footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-full .footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #E8ECF0;
}

.footer-full .footer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
}

.footer-full .footer-item .footer-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #F1F5F9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #0057B3;
}

.footer-full .footer-item .footer-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #002B5C;
}

.footer-full .footer-item .footer-desc {
    font-size: 0.7rem;
    color: #64748B;
    line-height: 1.4;
    max-width: 200px;
}

.footer-full .footer-bottom {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.footer-full .footer-bottom p {
    font-size: 0.7rem;
    color: #64748B;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    body {
        padding: 1rem 1rem 0 1rem;
    }

    .footer-full {
        margin-left: -1rem;
        margin-right: -1rem;
        width: calc(100% + 2rem);
    }
}

@media (max-width: 768px) {
    body {
        padding: 0.75rem 0.75rem 0 0.75rem;
    }

    .app-container {
        padding-bottom: 0;
    }

    .app-header {
        padding: 0 0 1rem 0;
    }

    .app-header .logo-container svg {
        max-width: 130px;
    }

    .header-right {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .language-switcher-btn {
        padding: 0.3rem 0.8rem;
        font-size: 0.7rem;
    }

    .help-btn span {
        display: none;
    }
    .help-btn {
        padding: 0.4rem 0.8rem;
    }

    /* Account Cards - Mobile: Single column */
    .account-cards-grid {
        grid-template-columns: 1fr !important;
        max-width: 100% !important;
        gap: 1rem;
    }

    .account-cards-grid:has(.account-card.visible:only-child) {
        max-width: 100% !important;
    }

    .account-card {
        padding: 1.25rem 1.25rem 1.25rem;
    }

    .account-card .card-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .account-card .card-title {
        font-size: 1.1rem;
    }

    .account-card .feature-list li {
        font-size: 0.8rem;
        padding: 0.3rem 0 0.3rem 1.5rem;
        background-size: 14px;
    }

    .account-card .card-arrow .arrow-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .account-selection-section .section-header h1 {
        font-size: 1.5rem;
    }

    .account-selection-section .section-header p {
        font-size: 0.9rem;
    }

    .footer-full {
        margin-left: -0.75rem;
        margin-right: -0.75rem;
        width: calc(100% + 1.5rem);
        padding: 1.5rem 0 1rem 0;
    }

    .footer-full .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .footer-full .footer-item .footer-desc {
        max-width: 100%;
    }

    .footer-full .footer-bottom p {
        font-size: 0.65rem;
    }

    .help-contact-grid {
        grid-template-columns: 1fr;
    }

    .help-modal-content {
        padding: 20px;
        margin: 10px;
        border-radius: 16px;
    }

    .help-step {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0.5rem 0.5rem 0 0.5rem;
    }

    .app-container {
        padding-bottom: 0;
    }

    .app-header {
        flex-direction: row;
        padding: 0 0 0.75rem 0;
        gap: 0.5rem;
    }

    .app-header .logo-container svg {
        max-width: 100px;
        height: auto;
    }

    .header-right {
        gap: 0.5rem;
    }

    .language-switcher {
        padding: 0.15rem;
        gap: 0.15rem;
    }

    .language-switcher-btn {
        padding: 0.2rem 0.5rem;
        font-size: 0.6rem;
    }

    .account-selection-section .section-header h1 {
        font-size: 1.25rem;
    }

    .account-selection-section .section-header p {
        font-size: 0.8rem;
    }

    .account-card {
        padding: 1rem 1rem 1rem;
        border-radius: 18px;
    }

    .account-card .card-icon {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
        border-width: 1.5px;
    }

    .account-card .card-title {
        font-size: 1rem;
    }

    .account-card .card-subtitle {
        font-size: 0.75rem;
    }

    .account-card .card-badge {
        font-size: 0.5rem;
        padding: 0.15rem 0.7rem;
    }

    .account-card .card-arrow .arrow-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .footer-full {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        width: calc(100% + 1rem);
        padding: 1.25rem 0 0.75rem 0;
    }

    .footer-full .footer-inner {
        padding: 0 1rem;
    }

    .footer-full .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        padding-bottom: 1rem;
    }

    .footer-full .footer-item .footer-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .footer-full .footer-item .footer-label {
        font-size: 0.7rem;
    }

    .footer-full .footer-item .footer-desc {
        font-size: 0.6rem;
    }

    .footer-full .footer-bottom {
        margin-top: 1rem;
        padding-top: 1rem;
    }

    .footer-full .footer-bottom p {
        font-size: 0.6rem;
    }
}

/* Landscape phones */
@media (max-height: 600px) and (orientation: landscape) {
    body {
        padding: 0.5rem 1rem 0 1rem;
    }

    .app-container {
        padding-bottom: 0;
    }

    .footer-full {
        margin-left: -1rem;
        margin-right: -1rem;
        width: calc(100% + 2rem);
    }

    .account-selection-section .section-header {
        margin-bottom: 1rem;
    }

    .account-selection-section .section-header h1 {
        font-size: 1.2rem;
    }

    .account-selection-section .section-header p {
        font-size: 0.75rem;
    }

    .account-card {
        padding: 0.75rem 1rem;
    }

    .account-card .card-icon {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .account-card .card-title {
        font-size: 0.95rem;
    }

    .account-card .feature-list li {
        font-size: 0.7rem;
        padding: 0.2rem 0 0.2rem 1.3rem;
    }

    .account-card .card-subtitle {
        font-size: 0.7rem;
        margin-bottom: 0.5rem;
    }

    .account-card .feature-list {
        margin-bottom: 0.5rem;
    }

    .footer-full {
        padding: 0.75rem 0 0.5rem 0;
    }

    .footer-full .footer-grid {
        gap: 0.75rem;
        padding-bottom: 0.5rem;
    }

    .footer-full .footer-item .footer-icon {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }

    .footer-full .footer-item .footer-label {
        font-size: 0.55rem;
    }

    .footer-full .footer-item .footer-desc {
        font-size: 0.5rem;
    }

    .footer-full .footer-bottom {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
    }

    .footer-full .footer-bottom p {
        font-size: 0.55rem;
    }
}

/* ============================================================
   Stanbic Official Brand Colors
   ============================================================ */
:root {
    --stanbic-blue: #0062E1;
    --stanbic-gold: #F5A623;
    --stanbic-navy: #014297;
    --stanbic-light-bg: #F8FAFE;
    --stanbic-gray-text: #475569;
    --stanbic-border: #E2E8F0;
    --stanbic-success: #10B981;
    --stanbic-warning: #F59E0B;
    --stanbic-danger: #EF4444;
}

/* ============================================================
   Header & Branding
   ============================================================ */
.header {
    margin-bottom: 2rem;
}

.logo-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    background: #0032A4;
    padding: 0.75rem 1.5rem;
    border-radius: 60px;
    border: 1px solid var(--stanbic-border);
}

.logo-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ============================================================
   Progress Steps
   ============================================================ */
.progress-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 60px;
    justify-content: space-between;
    border: 1px solid var(--stanbic-border);
}

.step-badge {
    flex: 1;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #94A3B8;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.step-badge.active {
    color: var(--stanbic-blue);
}

.step-badge.completed {
    color: var(--stanbic-success);
}

.step-circle {
    width: 32px;
    height: 32px;
    background: #F1F5F9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.step-badge.active .step-circle {
    background: var(--stanbic-blue);
    color: white;
}

.step-badge.completed .step-circle {
    background: var(--stanbic-success);
    color: white;
}

/* ============================================================
   Hero / Advertisement Section
   ============================================================ */
.hero-section {
    background: linear-gradient(135deg, #002B5C 0%, #004080 100%);
    border-radius: 32px;
    padding: 3rem 2rem;
    margin-top: 1rem;
    text-align: center;
    color: white;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 40px -20px rgba(0, 0, 0, 0.3);
}

.hero-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.hero-feature i {
    color: white;
}

.hero-button {
    background: #0062E1;
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
}

.hero-button:hover {
    background: #014297;
    transform: scale(1.05);
}

/* ============================================================
   Advertisement Cards Grid
   ============================================================ */
.ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.ad-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ad-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.2);
}

.ad-image {
    height: 160px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}

.ad-content {
    padding: 1.5rem;
}

.ad-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #002B5C;
    margin-bottom: 0.5rem;
}

.ad-description {
    font-size: 0.85rem;
    color: #64748B;
    margin-bottom: 1rem;
}

.ad-offer {
    display: inline-block;
    background: #0062E1;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* ============================================================
   Main Form Card
   ============================================================ */
.form-card {
    background: white;
    border-radius: 32px;
    padding: 2rem;
    margin-top: 1rem;
    border: 1px solid var(--stanbic-border);
    margin-bottom: 2rem;
}

.step-title {
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: var(--stanbic-blue);
}

.step-desc {
    color: var(--stanbic-gray-text);
    margin-bottom: 2rem;
    border-left: 3px solid var(--stanbic-navy);
    padding-left: 0.8rem;
}

/* ============================================================
   Form Elements
   ============================================================ */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 0.75rem;
}

@media (max-width: 640px) {
    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.form-group {
    margin-bottom: 1.4rem;
}

label {
    font-weight: 500;
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: #334155;
}

input,
select {
    width: 100%;
    padding: 12px 16px;
    border-radius: 16px;
    border: 1.5px solid var(--stanbic-border);
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--stanbic-blue);
    box-shadow: 0 0 0 3px rgba(0, 43, 92, 0.1);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    background: var(--stanbic-blue);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    min-height: 48px;
    touch-action: manipulation;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--stanbic-border);
    color: #334155;
}

.btn-outline:hover:not(:disabled) {
    background: #F8FAFC;
}

.btn-primary {
    background: var(--stanbic-blue);
}

.btn-primary:hover:not(:disabled) {
    background: var(--stanbic-navy);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--stanbic-success);
}

.btn-success:hover:not(:disabled) {
    background: #059669;
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--stanbic-danger);
}

.btn-danger:hover:not(:disabled) {
    background: #DC2626;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #64748B;
}

.btn-secondary:hover:not(:disabled) {
    background: #475569;
    transform: translateY(-1px);
}

.flex-btns {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 680px) {
    .flex-btns {
        flex-direction: column;
    }
}

/* ============================================================
   Messages
   ============================================================ */
.error-msg {
    color: #E53E3E;
    background: #FEF2F2;
    padding: 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    margin-top: 10px;
}

.success-msg {
    background: #E6F7EC;
    color: #0B5E42;
    padding: 12px;
    border-radius: 16px;
    font-size: 0.85rem;
}

/* ============================================================
   Selection Components
   ============================================================ */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #F8FAFE;
    padding: 8px 14px;
    border-radius: 40px;
    border: 1px solid var(--stanbic-border);
    cursor: pointer;
}

.product-option {
    border: 1px solid var(--stanbic-border);
    border-radius: 20px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.1s;
}

.product-option.selected {
    border-color: var(--stanbic-blue);
    background: #F0F7FF;
}

/* ============================================================
   Modals & Overlays
   ============================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 32px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.question-box {
    background: #F8FAFE;
    padding: 1.5rem;
    border-radius: 24px;
    margin: 1rem 0;
}

.photo-placeholder {
    width: 80px;
    height: 80px;
    background: #E2E8F0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
    overflow: hidden;
}

.summary-card {
    background: #F9FBFE;
    padding: 1.2rem;
    border-radius: 20px;
    margin-bottom: 1rem;
    border: 1px solid #EFF3F8;
}

/* ============================================================
   Footer
   ============================================================ */
.branch-note {
    margin-top: 1.5rem;
    font-size: 0.7rem;
    text-align: center;
    color: white;
    padding-top: 1rem;
}

hr {
    margin: 1rem 0;
    border: none;
    border-top: 1px solid var(--stanbic-border);
}

#submitAnswerBtn,
#securityAnswer {
    margin-top: 1%;
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid white;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================================
   LIVENESS MODAL - Mobile Optimized
   ============================================================ */
.liveness-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: livenessFadeIn 0.3s ease;
    padding: 0;
}

.liveness-modal-content {
    background: #ffffff;
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    max-height: 100vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: livenessSlideUp 0.3s ease;
    margin: 0;
}

.liveness-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 20px 20px 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.liveness-modal-header h2 {
    font-size: 18px;
    color: #002B5C;
    margin: 0;
}

.liveness-modal-header h2 i {
    color: #005CA4;
    margin-right: 8px;
}

.liveness-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #6c757d;
    cursor: pointer;
    padding: 0 8px;
    transition: color 0.2s ease;
    min-width: 44px;
    min-height: 44px;
}

.liveness-modal-close:hover {
    color: #002B5C;
}

.liveness-modal-body {
    padding: 16px 20px 20px;
}

.liveness-modal-desc {
    color: #6c757d;
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Video Wrapper - Mobile Optimized */
.video-wrapper {
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    aspect-ratio: 4/3;
    max-height: 400px;
    touch-action: none;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Camera Switch Button - Mobile */
.camera-switch-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.camera-switch-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.6);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 12px;
    transition: opacity 0.3s ease;
}

.video-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.video-overlay i {
    font-size: 40px;
    margin-bottom: 12px;
}

.video-overlay h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.video-overlay p {
    font-size: 14px;
    opacity: 0.8;
    margin: 4px 0 0;
}

/* Face Indicator */
.face-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
    transition: all 0.3s ease;
}

.face-indicator.detected {
    background: rgba(16, 185, 129, 0.9);
    color: white;
}

.face-indicator.not-detected {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

.face-indicator .pulse {
    animation: livenessPulse 1.5s ease-in-out infinite;
}

@keyframes livenessPulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

/* Face Box */
.face-box {
    position: absolute;
    border: 2px solid #10B981;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.3);
    display: none;
    z-index: 5;
}

.face-box.visible {
    display: block;
    animation: livenessFacePulse 1.5s ease-in-out infinite;
}

@keyframes livenessFacePulse {
    0%,
    100% {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(16, 185, 129, 0.6);
    }
}

/* Controls - Mobile Optimized */
.liveness-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 12px;
}

.liveness-controls .btn {
    flex: 1;
    min-width: 80px;
    justify-content: center;
    padding: 12px 16px;
    font-size: 14px;
    min-height: 48px;
    touch-action: manipulation;
}

/* Progress */
.progress-section {
    margin: 12px 0;
}

.progress-section .progress-bar {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.progress-section .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #002B5C, #005CA4);
    transition: width 0.3s ease;
    border-radius: 3px;
    width: 0%;
}

.progress-section .progress-text {
    text-align: center;
    margin-top: 6px;
    font-size: 13px;
    color: #6c757d;
}

/* Message Area */
.message-area {
    padding: 10px 14px;
    border-radius: 8px;
    margin: 12px 0;
    display: none;
    font-size: 13px;
}

.message-area.show {
    display: block;
}

.message-area.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10B981;
}
.message-area.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #EF4444;
}
.message-area.info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #3b82f6;
}
.message-area.warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #F59E0B;
}

/* Results - Mobile */
.liveness-results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 12px 0;
}

.liveness-results-grid .result-item {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e9ecef;
}

.liveness-results-grid .result-item .label {
    font-size: 10px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.liveness-results-grid .result-item .value {
    font-size: 16px;
    font-weight: 700;
    color: #002B5C;
    margin-top: 4px;
}

.liveness-results-grid .result-item .value.success {
    color: #10B981;
}
.liveness-results-grid .result-item .value.failure {
    color: #EF4444;
}
.liveness-results-grid .result-item .value.warning {
    color: #F59E0B;
}

/* Liveness Actions */
.liveness-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e9ecef;
}

.liveness-actions .btn {
    flex: 1;
    min-width: 100px;
    justify-content: center;
    padding: 12px 16px;
    font-size: 14px;
    min-height: 48px;
    touch-action: manipulation;
}

/* Animations */
@keyframes livenessFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* ===== Mobile-Specific Overrides ===== */
@media (max-width: 640px) {
    .liveness-modal-content {
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }

    .liveness-modal-header {
        border-radius: 0;
        padding: 12px 16px;
    }

    .liveness-modal-header h2 {
        font-size: 16px;
    }

    .liveness-modal-body {
        padding: 12px 16px 16px;
    }

    .liveness-modal-desc {
        font-size: 12px;
        margin-bottom: 12px;
    }

    .video-wrapper {
        max-height: 300px;
        aspect-ratio: 4/3;
    }

    .liveness-controls .btn {
        min-width: 60px;
        padding: 10px 12px;
        font-size: 12px;
        min-height: 44px;
    }

    .liveness-controls .btn .btn-text {
        display: none;
    }

    .liveness-controls .btn i {
        font-size: 18px;
    }

    .liveness-results-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .liveness-results-grid .result-item {
        padding: 8px;
    }

    .liveness-results-grid .result-item .value {
        font-size: 14px;
    }

    .liveness-actions .btn {
        min-width: 80px;
        padding: 10px 14px;
        font-size: 12px;
        min-height: 44px;
    }

    .camera-switch-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
        bottom: 12px;
        right: 12px;
    }

    .face-indicator {
        top: 8px;
        right: 8px;
        padding: 4px 10px;
        font-size: 10px;
    }
}

/* Very small screens */
@media (max-width: 380px) {
    .liveness-modal-header h2 {
        font-size: 14px;
    }

    .video-wrapper {
        max-height: 220px;
    }

    .liveness-controls .btn {
        padding: 8px 10px;
        font-size: 11px;
        min-height: 38px;
    }

    .liveness-results-grid .result-item .value {
        font-size: 12px;
    }
}

/* Landscape mode on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .liveness-modal-content {
        max-height: 100vh;
    }

    .video-wrapper {
        max-height: 200px;
        aspect-ratio: 16/9;
    }

    .liveness-modal-body {
        padding: 8px 16px;
    }

    .liveness-modal-desc {
        font-size: 11px;
        margin-bottom: 8px;
    }

    .liveness-controls {
        margin-bottom: 8px;
    }

    .liveness-controls .btn {
        padding: 6px 10px;
        min-height: 32px;
        font-size: 11px;
    }

    .liveness-results-grid {
        margin: 8px 0;
    }
}