/* Base Styles */
.how-it-works-page { background: #fcfbfa; color: #222; direction: rtl; transition: background 0.3s, color 0.3s; }
.how-container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

/* Hero */
.how-hero { padding: 70px 0 55px; text-align: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 999px; background: #fff; box-shadow: 0 8px 25px rgba(0, 0, 0, .06); font-size: .85rem; color: #555; margin-bottom: 22px; transition: background 0.3s, color 0.3s, box-shadow 0.3s; }
.hero-badge i { color: #37b36c; }
.how-hero h1 { margin: 0 auto 18px; max-width: 780px; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.35; font-weight: 800; color: #17202a; transition: color 0.3s; }
.hero-description { max-width: 760px; margin: auto; color: #6b7280; font-size: 1.05rem; line-height: 2.1; transition: color 0.3s; }
.hero-description strong { color: #222; transition: color 0.3s; }

/* Headings */
.section-heading { text-align: center; margin-bottom: 42px; }
.section-heading > span { display: inline-block; margin-bottom: 8px; color: #37b36c; font-size: .88rem; font-weight: 700; }
.section-heading h2 { margin: 0 0 12px; font-size: clamp(1.55rem, 3vw, 2.25rem); line-height: 1.5; color: #17202a; transition: color 0.3s; }
.section-heading p { max-width: 680px; margin: auto; color: #737b85; line-height: 2; transition: color 0.3s; }

/* Services */
.services-section { padding: 25px 0 75px; }
.services-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.service-card { display: flex; gap: 22px; padding: 30px; border-radius: 26px; background: #fff; border: 1px solid rgba(0, 0, 0, .05); box-shadow: 0 16px 45px rgba(0, 0, 0, .06); transition: background 0.3s, border-color 0.3s, box-shadow 0.3s; }
.service-icon { width: 58px; height: 58px; min-width: 58px; display: flex; align-items: center; justify-content: center; border-radius: 18px; font-size: 1.35rem; transition: background 0.3s, color 0.3s; }
.service-card-blue .service-icon { background: #eef5ff; color: #3978d6; }
.service-card-green .service-icon { background: #ebfaf2; color: #37b36c; }
.service-label { color: #9298a0; font-size: .78rem; transition: color 0.3s; }
.service-content h3 { margin: 4px 0 9px; font-size: 1.35rem; transition: color 0.3s; }
.service-content p { margin: 0 0 18px; color: #707780; line-height: 1.95; transition: color 0.3s; }
.service-link { display: inline-flex; align-items: center; gap: 9px; color: #222; text-decoration: none; font-weight: 700; transition: color 0.3s; }
.service-link i { transition: transform .2s ease; }
.service-link:hover i { transform: translateX(-4px); }

/* Process */
.process-section { padding: 80px 0; background: #f6f7f8; transition: background 0.3s; }
.process-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.process-card { position: relative; padding: 30px 24px 25px; background: #fff; border-radius: 24px; border: 1px solid rgba(0, 0, 0, .04); box-shadow: 0 12px 35px rgba(0, 0, 0, .045); transition: background 0.3s, border-color 0.3s, box-shadow 0.3s; }
.process-number { position: absolute; top: 18px; left: 18px; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #f1f3f4; color: #666; font-size: .85rem; font-weight: 800; transition: background 0.3s, color 0.3s; }
.process-icon { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; border-radius: 16px; background: #edf9f2; color: #37b36c; margin-bottom: 18px; font-size: 1.15rem; transition: background 0.3s, color 0.3s; }
.process-card h3 { margin: 0 0 10px; font-size: 1.08rem; transition: color 0.3s; }
.process-card p { margin: 0; color: #737a83; line-height: 1.9; font-size: .93rem; transition: color 0.3s; }

/* Strategies */
.strategy-section { padding: 80px 0; }
.strategy-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.strategy-card { position: relative; padding: 26px 22px; border-radius: 24px; border: 1px solid #e9eaec; background: #fff; transition: background 0.3s, border-color 0.3s, box-shadow 0.3s; }
.strategy-balanced { border-color: #bfe8cf; box-shadow: 0 14px 35px rgba(55, 179, 108, .08); }
.strategy-icon { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 15px; background: #f2f3f4; margin-bottom: 16px; color: #333; transition: background 0.3s, color 0.3s; }
.strategy-card h3 { margin: 0 0 8px; font-size: 1.05rem; transition: color 0.3s; }
.strategy-card strong { display: block; margin-bottom: 12px; font-size: .82rem; line-height: 1.7; color: #555; transition: color 0.3s; }
.strategy-card p { margin: 0; color: #777f88; line-height: 1.85; font-size: .88rem; transition: color 0.3s; }
.strategy-badge { position: absolute; top: 20px; left: 18px; padding: 5px 9px; border-radius: 999px; background: #eaf8f0; color: #278b52; font-size: .7rem; font-weight: 700; transition: background 0.3s, color 0.3s; }

/* CTA */
.final-cta { padding: 20px 0 80px; }
.cta-box { padding: 55px 25px; text-align: center; border-radius: 30px; background: linear-gradient(135deg, #17202a 0%, #24313c 100%); color: #fff; box-shadow: 0 22px 55px rgba(0, 0, 0, .14); }
.cta-icon { width: 62px; height: 62px; margin: 0 auto 20px; display: flex; align-items: center; justify-content: center; border-radius: 20px; background: rgba(255, 255, 255, .1); font-size: 1.4rem; }
.cta-box h2 { margin: 0 0 12px; font-size: 2rem; }
.cta-box p { max-width: 640px; margin: 0 auto 25px; color: rgba(255, 255, 255, .72); line-height: 2; }
.cta-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.cta-actions a { min-height: 48px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border-radius: 14px; text-decoration: none; font-weight: 700; transition: background 0.2s, transform 0.2s; }
.cta-primary { background: #37b36c; color: #fff; }
.cta-primary:hover { background: #2fa261; transform: translateY(-2px); }
.cta-secondary { background: rgba(255, 255, 255, .1); color: #fff; }
.cta-secondary:hover { background: rgba(255, 255, 255, .2); transform: translateY(-2px); }

/* --- Dark Mode Variables & Overrides --- */
body.dark-mode .how-it-works-page { background: #0f172a; color: #e2e8f0; }

body.dark-mode .hero-badge { background: #1e293b; color: #cbd5e1; box-shadow: none; }
body.dark-mode .how-hero h1, 
body.dark-mode .section-heading h2 { color: #f8fafc; }
body.dark-mode .hero-description { color: #94a3b8; }
body.dark-mode .hero-description strong { color: #f1f5f9; }
body.dark-mode .section-heading p { color: #94a3b8; }

body.dark-mode .service-card { background: #1e293b; border-color: #334155; box-shadow: 0 16px 45px rgba(0, 0, 0, .3); }
body.dark-mode .service-content h3 { color: #f1f5f9; }
body.dark-mode .service-content p { color: #94a3b8; }
body.dark-mode .service-label { color: #64748b; }
body.dark-mode .service-link { color: #f1f5f9; }
body.dark-mode .service-card-blue .service-icon { background: rgba(57, 120, 214, 0.15); color: #60a5fa; }
body.dark-mode .service-card-green .service-icon { background: rgba(55, 179, 108, 0.15); color: #4ade80; }

body.dark-mode .process-section { background: #0b1120; }
body.dark-mode .process-card { background: #1e293b; border-color: #334155; box-shadow: 0 12px 35px rgba(0, 0, 0, .3); }
body.dark-mode .process-number { background: #334155; color: #cbd5e1; }
body.dark-mode .process-icon { background: rgba(55, 179, 108, 0.15); color: #4ade80; }
body.dark-mode .process-card h3 { color: #f1f5f9; }
body.dark-mode .process-card p { color: #94a3b8; }

body.dark-mode .strategy-card { background: #1e293b; border-color: #334155; }
body.dark-mode .strategy-balanced { border-color: rgba(55, 179, 108, 0.5); box-shadow: 0 14px 35px rgba(0, 0, 0, 0.2); }
body.dark-mode .strategy-icon { background: #334155; color: #cbd5e1; }
body.dark-mode .strategy-card h3 { color: #f1f5f9; }
body.dark-mode .strategy-card strong { color: #94a3b8; }
body.dark-mode .strategy-card p { color: #64748b; }
body.dark-mode .strategy-badge { background: rgba(39, 139, 82, 0.2); color: #4ade80; }

@media (max-width: 900px) {
    .process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .strategy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
    .how-container { width: min(100% - 22px, 560px); }
    .how-hero { padding: 45px 0 38px; }
    .hero-description { font-size: .94rem; line-height: 2; }
    .services-grid, .process-grid, .strategy-grid { grid-template-columns: 1fr; }
    .services-section, .process-section, .strategy-section { padding: 55px 0; }
    .service-card { padding: 23px; gap: 15px; border-radius: 22px; }
    .service-icon { width: 48px; height: 48px; min-width: 48px; border-radius: 14px; }
    .process-card { padding: 24px 20px; }
    .section-heading { margin-bottom: 28px; }
    .cta-box { padding: 42px 20px; border-radius: 24px; }
    .cta-box h2 { font-size: 1.65rem; }
    .cta-actions { flex-direction: column; }
    .cta-actions a { width: 100%; }
}
