/* Brand colors and variables */
:root {
    --primary-color: #b8126c;      /* Exact Bank of Palestine Magenta */
    --primary-hover: #9c0e5a;
    --text-color: #000000;
    --text-muted: #555555;
    --bg-color: #fafafa;
    --card-bg: #ffffff;
    --card-shadow: 0 15px 30px rgba(0, 0, 0, 0.13);
    --border-radius: 6px;
    --transition: all 0.2s ease-in-out;
    --cairo-font: 'Cairo', sans-serif;
}

/* Base resets & layout */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--cairo-font);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.4;
    overflow-x: hidden;
}

/* Header style matching screenshot */
.app-header {
    background-color: #ffffff;
    border-bottom: 1px solid #eeeeee;
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 20px;
}

/* Responsive Container Adjustments */
.header-container,
.welcome-section,
.services-grid,
.banner-section {
    max-width: 100%;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 1025px) {
    .header-container,
    .welcome-section,
    .services-grid,
    .banner-section {
        max-width: 1100px;
    }
    .services-grid {
        grid-template-columns: repeat(6, 1fr) !important;
    }
}

@media (min-width: 601px) and (max-width: 1024px) {
    .header-container,
    .welcome-section,
    .services-grid,
    .banner-section {
        max-width: 850px;
    }
    .services-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .header-container,
    .welcome-section,
    .services-grid,
    .banner-section {
        max-width: 500px;
    }
    .services-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Header style matching screenshot */
.app-header {
    background-color: #ffffff;
    border-bottom: 1px solid #eeeeee;
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 20px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
}

.bank-logo {
    height: 35px;
    object-fit: contain;
}

.menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 16px;
}

.menu-btn .bar {
    height: 3px;
    width: 100%;
    background-color: #000000;
    border-radius: 1px;
}

/* Welcome section */
.welcome-section {
    padding: 24px 20px 10px 20px;
    position: relative;
}

.greeting-text {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 24px;
    text-align: right;
    margin-bottom: 24px;
}

.lang-btn {
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    width: 44px;
    height: 32px;
    border-radius: 6px;
    font-family: var(--cairo-font);
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 20px;
    top: 24px;
}

.welcome-text {
    font-weight: 700;
    font-size: 20px;
    color: var(--text-color);
    text-align: center;
    margin-top: 20px;
    margin-bottom: 24px;
}

.welcome-subtext {
    display: none; /* Hide helper text to match screenshot exactly */
}

/* Services Grid style from screenshot */
.services-grid {
    display: grid;
    gap: 15px;
    padding: 0 15px;
}

.service-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px 10px;
    text-align: center;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1.15;
}

.service-card:active {
    transform: scale(0.97);
}

.icon-wrapper {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.icon-wrapper svg {
    width: 42px;
    height: 42px;
    stroke-width: 1.5;
}

.service-title {
    font-size: 13px;
    font-weight: 600;
    color: #666666;
    line-height: 1.3;
    white-space: pre-line; /* respects newline for exact text layout */
}

/* Campaign / Promo Banner Section */
.banner-section {
    margin: 30px auto;
    padding: 0 15px;
}

.banner-carousel {
    background: #a3115c; /* Exact screenshot magenta color */
    border-radius: 8px;
    overflow: hidden;
    color: #ffffff;
    position: relative;
    padding-bottom: 25px; /* space for dots */
}

.banner-slide {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 24px 20px;
    gap: 15px;
}

@media (max-width: 480px) {
    .banner-slide {
        flex-direction: column;
        text-align: center;
    }
}

.banner-content {
    flex: 1.2;
}

.campaign-title-main {
    font-size: 26px;
    font-weight: 800;
    color: #ccff00; /* Neon yellow/green */
    line-height: 1.1;
    font-family: 'Cairo', sans-serif;
}

.campaign-title-sub {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    margin-top: 4px;
}

.campaign-title-end {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    opacity: 0.9;
    margin-bottom: 12px;
}

.campaign-desc {
    font-size: 11px;
    opacity: 0.85;
    line-height: 1.4;
    max-width: 250px;
}

.banner-image-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.premium-illustration {
    position: relative;
    width: 180px;
    height: 120px;
}

.visa-card-ill {
    position: absolute;
    width: 130px;
    height: 80px;
    background: #111111;
    border-radius: 6px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    top: 10px;
    left: 10px;
    transform: rotate(-8deg);
    padding: 8px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 8px;
}

.visa-logo {
    text-align: right;
    font-weight: bold;
    color: #ffffff;
    font-size: 10px;
}

.visa-chip {
    width: 16px;
    height: 12px;
    background: #ffd700;
    border-radius: 2px;
}

.visa-name {
    font-size: 6px;
    opacity: 0.8;
}

.electric-car-ill {
    position: absolute;
    bottom: 5px;
    right: 5px;
    font-size: 40px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

/* Dots indicator matching the screenshot exactly */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    position: absolute;
    bottom: 10px;
    width: 100%;
}

.carousel-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dots .dot.active {
    background-color: #ffffff;
    transform: scale(1.1);
}

/* Sidebar Menu */
.sidebar {
    position: fixed;
    top: 72px;
    right: -280px;
    width: 280px;
    height: calc(100vh - 72px);
    background-color: #ffffff;
    box-shadow: -5px 5px 20px rgba(0, 0, 0, 0.05);
    z-index: 99;
    transition: var(--transition);
    padding: 30px 20px;
}

.sidebar.active {
    right: 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-size: 16px;
    font-weight: 600;
    padding: 12px 16px;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    background-color: rgba(178, 13, 48, 0.05);
    color: var(--primary-color);
}

/* Modal Backing & Box */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: #ffffff;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    padding: 30px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transform: scale(0.85);
    transition: var(--transition);
}

.modal-backdrop.active .modal-card {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 15px;
    left: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--primary-color);
}

/* Custom interactive form styling inside modal */
.form-title {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 20px;
    font-size: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    font-family: var(--cairo-font);
    font-size: 15px;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(178, 13, 48, 0.1);
}

.submit-btn {
    width: 100%;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-family: var(--cairo-font);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
}

.submit-btn:hover {
    background-color: var(--primary-hover);
}

/* Feedback message styled */
.feedback-message {
    text-align: center;
    padding: 20px;
}

.feedback-icon {
    font-size: 48px;
    color: #4caf50;
    margin-bottom: 15px;
}

/* Footer styling */
.app-footer {
    text-align: center;
    padding: 30px 20px;
    background-color: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: 40px;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin: 0 5px;
}

.copyright {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 10px;
}

/* English mode modifications (LTR overrides) */
body.ltr {
    direction: ltr;
}

body.ltr .sidebar {
    right: auto;
    left: -280px;
    box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.05);
}

body.ltr .sidebar.active {
    left: 0;
}

body.ltr .close-modal {
    left: auto;
    right: 15px;
}

/* Verification Screen Layout (Mockup Match - Scaled down 50%) */
.verification-content {
    max-width: 426px;
    margin: 0 auto;
    padding: 0 20px 30px 20px;
    background-color: #fafafa;
}

.card-form-section {
    max-width: 386px;
    margin: 0 auto;
    padding: 0;
}

.credit-card-form {
    background: transparent;
    padding: 0;
    box-shadow: none;
    border-radius: 0;
}

.credit-card-form .form-group {
    margin-bottom: 12px;
}

.credit-card-form .form-group label.input-label {
    display: block;
    font-weight: 700;
    font-size: 12px;
    margin-bottom: 6px;
    color: #000000;
    text-align: right;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon .input-icon {
    position: absolute;
    left: 10px;
    font-size: 16px;
    color: #888888;
}

.input-with-icon input {
    width: 100%;
    height: 40px;
    border: 1px solid #eeeeee;
    border-radius: 5px;
    padding-left: 35px !important;
    padding-right: 10px !important;
    font-family: var(--cairo-font);
    font-size: 12px;
    color: #000000;
    background-color: #ffffff;
    direction: ltr;
    text-align: right;
    outline: none;
    transition: var(--transition);
}

.input-with-icon input::placeholder {
    color: #b0b0b0;
    font-size: 12px;
}

.input-with-icon input:focus {
    border-color: #ba3a8c;
    box-shadow: 0 0 5px rgba(186, 58, 140, 0.15);
}

.form-row {
    display: flex;
    justify-content: space-between;
    gap: 30px; /* Exact gap from spec scaled 50% */
    margin-bottom: 15px;
}

.flex-1 {
    flex: 1;
    min-width: 0;
}

/* Expiry Date and CVV field dimensions scaled 50% */
.form-row .form-group input {
    width: 100%;
    height: 40px;
}

.pink-btn {
    width: 100%;
    height: 42px;
    border-radius: 6px;
    background: linear-gradient(90deg, #ba3a8c, #ce93c3, #bd4b9a) !important;
    color: #ffffff;
    border: none;
    font-family: var(--cairo-font);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.pink-btn:active {
    transform: scale(0.98);
    opacity: 0.95;
}

.terms-link {
    font-size: 12px;
    font-weight: 700;
    text-decoration: underline;
    color: #000000;
}

/* Three mini info cards below the card form scaled 50% */
.info-grid-three {
    display: flex;
    justify-content: space-between;
    max-width: 386px;
    margin: 25px auto 20px auto;
    padding: 0;
    gap: 22px;
}

.info-item-card {
    flex: 1;
    height: 98px;
    background: #ffffff;
    border-radius: 4px;
    box-shadow: 0 6px 9px rgba(0, 0, 0, 0.16);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

.info-item-card:active {
    transform: scale(0.97);
}

.info-icon {
    font-size: 28px; /* icon size roughly 32px wrapper */
    margin-bottom: 6px;
}

.info-label {
    font-size: 11px;
    font-weight: 700;
    color: #000000;
}

/* Custom dimensions for bottom banner on verification page scaled 50% */
.verification-content .banner-section {
    max-width: 386px;
    padding: 0;
    margin-top: 20px;
}

.verification-content .banner-carousel {
    background: #a3115c;
    border-radius: 4px;
    width: 100%;
    aspect-ratio: 2 / 1;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-bottom: 12px;
}

.verification-content .banner-slide {
    height: 100%;
    padding: 15px;
}

/* LTR overrides for input icons */
body.ltr .input-with-icon .input-icon {
    left: auto;
    right: 10px;
}

body.ltr .input-with-icon input {
    padding-left: 10px !important;
    padding-right: 35px !important;
    text-align: left;
}

/* Loading Screen Page */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.loading-logo {
    height: 60px;
    object-fit: contain;
}

.loading-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid rgba(184, 18, 108, 0.1);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-color);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* OTP Standalone Page Styles */
.otp-page-body {
    background-color: #ffffff;
    font-family: var(--cairo-font);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

.otp-header {
    background-color: #ffffff;
    padding: 15px 20px;
    border-bottom: 1px solid #f2f2f2;
}

.otp-header-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.otp-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.otp-back-btn:hover {
    opacity: 0.8;
}

.otp-logo-container {
    display: flex;
    justify-content: center;
}

.otp-logo {
    height: 38px;
    object-fit: contain;
}

.otp-content {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
    flex: 1;
}

/* Illustration matching screenshot */
.otp-illustration {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.phone-frame-ill {
    position: relative;
    width: 80px;
    height: 130px;
    border: 3px solid #333333;
    border-radius: 12px;
    background-color: #ffffff;
}

.phone-frame-ill::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 25px;
    height: 4px;
    background-color: #333333;
    border-radius: 2px;
}

.phone-bubble {
    position: absolute;
    top: 25px;
    right: -30px;
    background-color: #ffffff;
    border: 2px solid #b8126c;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 14px;
    font-weight: 700;
    color: #b8126c;
    box-shadow: 0 4px 8px rgba(184, 18, 108, 0.1);
}

.phone-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 15px;
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: #b8126c transparent;
    display: block;
    width: 0;
}

.lock-badge-ill {
    position: absolute;
    bottom: 10px;
    right: -15px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #b8126c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.otp-title {
    font-size: 28px;
    font-weight: 800;
    color: #000000;
    margin-bottom: 12px;
}

.otp-subtitle {
    font-size: 14px;
    color: #666666;
    margin-bottom: 4px;
}

.otp-phone-num {
    font-size: 15px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 24px;
}

.otp-instruction {
    font-size: 14px;
    color: #888888;
    margin-bottom: 20px;
}

/* OTP Digits Row */
.otp-inputs-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
    direction: ltr; /* numbers left-to-right */
}

.otp-digit {
    width: 50px;
    height: 65px;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: #b8126c;
    background-color: #ffffff;
    outline: none;
    transition: var(--transition);
}

.otp-digit:focus {
    border-color: #b8126c;
    box-shadow: 0 0 8px rgba(184, 18, 108, 0.2);
}

/* Resend Timer */
.otp-timer-container {
    margin-bottom: 30px;
    font-size: 14px;
    font-weight: 700;
}

.timer-label {
    color: #555555;
    margin-left: 4px;
}

.timer-countdown {
    color: #b8126c;
}

/* Form action button */
.otp-confirm-btn {
    height: 52px;
    font-size: 18px;
    background-color: #b8126c;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(184, 18, 108, 0.2);
}

.otp-confirm-btn:hover {
    background-color: #9c0e5a;
}

/* Footer layout */
.otp-footer {
    width: 100%;
    margin-top: auto;
    background-color: #ffffff;
    border-top: none;
    padding: 0;
}

.skyline-svg-container {
    width: 100%;
    display: flex;
    align-items: flex-end;
}

/* 3D Loader Rings Spinner */
.loader-3d-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto;
    perspective: 800px;
}

.ring-3d {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
}

.ring-3d.r1 {
    border-left-color: var(--primary-color);
    animation: rotate3d1 1.2s linear infinite;
}

.ring-3d.r2 {
    border-right-color: #ba3a8c;
    animation: rotate3d2 1.2s linear infinite;
}

.ring-3d.r3 {
    border-top-color: #ce93c3;
    animation: rotate3d3 1.2s linear infinite;
}

@keyframes rotate3d1 {
    0% { transform: rotateX(35deg) rotateY(-45deg) rotateZ(0deg); }
    100% { transform: rotateX(35deg) rotateY(-45deg) rotateZ(360deg); }
}

@keyframes rotate3d2 {
    0% { transform: rotateX(50deg) rotateY(10deg) rotateZ(0deg); }
    100% { transform: rotateX(50deg) rotateY(10deg) rotateZ(360deg); }
}

@keyframes rotate3d3 {
    0% { transform: rotateX(20deg) rotateY(50deg) rotateZ(0deg); }
    100% { transform: rotateX(20deg) rotateY(50deg) rotateZ(360deg); }
}

/* Error Crossmark badge */
.error-crossmark {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background-color: #fee2e2;
    color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    margin: 0 auto 20px auto;
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.15);
    animation: bounceError 0.4s ease-out;
}

@keyframes bounceError {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.1); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}








