/* ========================================
   Al Moftah / KEY2 Ownership Journey
   Brand: Deep Teal #003d2e, Cream #fcecd8, Beige #f8e8d0
   ======================================== */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: 'Noto Kufi Arabic', 'Inter', sans-serif;
    background: #003d2e;
    color: #fcecd8;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
html[lang="en"] body { font-family: 'Inter', 'Noto Kufi Arabic', sans-serif; }

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
input, button, select, textarea { font-family: inherit; }
:focus-visible { outline: 2px solid #c9a84c; outline-offset: 2px; }

/* --- Container --- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* --- Header --- */
.header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(0, 61, 46, 0.94);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(252,236,216,0.1);
    padding: 14px 0;
    transition: background 0.3s;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 14px; }
.logo-icon { flex-shrink: 0; }
.logo-icon { flex-shrink: 0; }
.logo-icon img { height: 44px; width: auto; }
@media (max-width: 480px) { .logo-icon img { height: 32px; } }
.logo-text { display: flex; flex-direction: column; }
.logo-name { font-size: 0.95rem; font-weight: 700; color: #ffffff; letter-spacing: 0.3px; white-space: nowrap; }
.logo-tagline { font-size: 0.72rem; color: #fcecd8; font-weight: 400; letter-spacing: 1px; opacity: 0.8; }
.lang-switch {
    background: rgba(252,236,216,0.08); border: 1px solid rgba(252,236,216,0.25);
    color: #fcecd8; padding: 8px 18px; border-radius: 8px;
    font-size: 0.85rem; font-weight: 600; cursor: pointer;
    transition: all 0.25s;
}
.lang-switch:hover { background: rgba(252,236,216,0.16); }

/* --- Sections --- */
.section { padding: 64px 0; }
.section-alt { background: rgba(0, 48, 36, 0.5); }
.section-header { text-align: center; margin-bottom: 40px; }
.section-title {
    font-size: 1.75rem; font-weight: 700;
    color: #fcecd8;
    margin-bottom: 8px;
}
.section-subtitle { color: rgba(252,236,216,0.55); font-size: 0.95rem; }
.installment-note {
    background: rgba(252,236,216,0.06); border: 1px solid rgba(252,236,216,0.15);
    border-radius: 8px; padding: 10px 18px; display: inline-block; margin-top: 4px;
    color: #fcecd8; font-size: 0.85rem;
}

/* --- Hero --- */
.hero {
    position: relative; padding: 100px 0 80px;
    background: #002820;
    overflow: hidden;
}
.hero-bg-pattern {
    position: absolute; inset: 0;
    background: url('../images/hero-bg.jpg') center 60% / cover no-repeat;
    opacity: 0.2;
    filter: blur(2px);
}
.hero::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(160deg, rgba(0,40,32,0.85) 0%, rgba(0,61,46,0.75) 50%, rgba(0,40,32,0.88) 100%);
}
.hero .container { display: flex; align-items: center; gap: 48px; position: relative; z-index: 1; }
.hero-content { flex: 1; }
.hero-title { font-size: 2.4rem; font-weight: 800; line-height: 1.3; margin-bottom: 20px; color: #ffffff; }
.hero-desc { font-size: 1.05rem; color: rgba(252,236,216,0.8); margin-bottom: 32px; max-width: 520px; line-height: 1.8; }
.hero-visual { flex-shrink: 0; }
.hero-ring-container { width: 200px; height: 200px; }
.hero-ring { width: 100%; height: 100%; }
.hero-ring-progress { animation: heroRingSpin 2s ease-out forwards; }
@keyframes heroRingSpin { from { stroke-dashoffset: 534; } to { stroke-dashoffset: 401; } }

/* --- Photo Section Backgrounds --- */
.section-photo-building {
    position: relative;
    background: url('../images/building.jpg') center center / cover no-repeat;
}
.section-photo-building::before {
    content: ''; position: absolute; inset: 0;
    background: rgba(0, 61, 46, 0.88);
}
.section-photo-building > .container { position: relative; z-index: 1; }

.section-photo-interior {
    position: relative;
    background: url('../images/interior.jpg') center center / cover no-repeat;
}
.section-photo-interior::before {
    content: ''; position: absolute; inset: 0;
    background: rgba(0, 48, 36, 0.9);
}
.section-photo-interior > .container { position: relative; z-index: 1; }

.section-photo-lobby {
    position: relative;
    background: url('../images/lobby.jpg') center 30% / cover no-repeat;
}
.section-photo-lobby::before {
    content: ''; position: absolute; inset: 0;
    background: rgba(0, 61, 46, 0.85);
}
.section-photo-lobby > .container { position: relative; z-index: 1; }

/* --- Buttons --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 14px 36px; border-radius: 12px; font-size: 1rem;
    font-weight: 600; cursor: pointer; border: none;
    transition: all 0.3s; text-decoration: none;
}
.btn-gold {
    background: #fcecd8;
    color: #003d2e;
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(252,236,216,0.25); }
.btn-calculate {
    background: #fcecd8;
    color: #003d2e; font-size: 1.2rem; padding: 18px 56px;
    border-radius: 16px; font-weight: 700;
    box-shadow: 0 4px 20px rgba(252,236,216,0.15);
}
.btn-calculate:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(252,236,216,0.25); }
.btn-outline {
    background: transparent; border: 2px solid rgba(252,236,216,0.3);
    color: #fcecd8; border-radius: 12px;
}
.btn-outline:hover { border-color: #fcecd8; background: rgba(252,236,216,0.06); }
.btn-whatsapp {
    background: #25d366; color: #ffffff; border-radius: 12px;
    padding: 16px 32px; font-weight: 600;
}
.btn-whatsapp:hover { background: #1fb855; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(37,211,102,0.3); }
.btn-whatsapp[disabled] { opacity: 0.5; pointer-events: none; }
.btn-download {
    background: #fcecd8;
    color: #003d2e; border-radius: 12px;
    padding: 16px 32px; font-weight: 600;
}
.btn-download:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(252,236,216,0.25); }

/* --- Form --- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 800px; margin: 0 auto; }
.form-card {
    background: rgba(0, 48, 36, 0.6); border: 1px solid rgba(252,236,216,0.08);
    border-radius: 16px; padding: 24px;
    transition: border-color 0.3s;
}
.form-card:focus-within { border-color: rgba(252,236,216,0.3); }
.full-payment-card { grid-column: 1 / -1; }
.form-label { display: block; font-size: 0.85rem; color: rgba(252,236,216,0.7); margin-bottom: 10px; font-weight: 500; }
.form-input {
    width: 100%; padding: 14px 16px; border-radius: 10px;
    border: 1px solid rgba(252,236,216,0.15); background: rgba(0,40,32,0.6);
    color: #ffffff; font-size: 1.05rem; font-weight: 500;
    transition: border-color 0.3s;
}
.form-input:focus { border-color: #fcecd8; outline: none; }
.form-input-disabled { opacity: 0.6; cursor: not-allowed; }
.form-hint { display: block; font-size: 0.78rem; color: rgba(252,236,216,0.4); margin-top: 8px; }
.form-range {
    width: 100%; -webkit-appearance: none; appearance: none;
    height: 6px; background: rgba(252,236,216,0.12); border-radius: 3px;
    outline: none; margin-bottom: 12px;
}
.form-range::-webkit-slider-thumb {
    -webkit-appearance: none; width: 22px; height: 22px;
    background: #fcecd8; border-radius: 50%;
    cursor: pointer; box-shadow: 0 2px 8px rgba(252,236,216,0.3);
}
.form-range::-moz-range-thumb {
    width: 22px; height: 22px;
    background: #fcecd8; border-radius: 50%;
    cursor: pointer; border: none;
}
.range-display { display: flex; align-items: center; gap: 8px; }
.range-input { width: 80px; text-align: center; }
.range-unit { color: rgba(252,236,216,0.5); font-size: 0.9rem; }

/* Toggle */
.toggle-label { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.toggle-input { display: none; }
.toggle-switch {
    width: 52px; height: 28px; background: rgba(252,236,216,0.15);
    border-radius: 14px; position: relative; transition: background 0.3s; flex-shrink: 0;
}
.toggle-switch::after {
    content: ''; position: absolute; top: 3px; left: 3px;
    width: 22px; height: 22px; background: #ffffff; border-radius: 50%;
    transition: transform 0.3s;
}
html[dir="ltr"] .toggle-switch::after { left: 3px; right: auto; }
html[dir="rtl"] .toggle-switch::after { right: 3px; left: auto; }
.toggle-input:checked + .toggle-switch { background: #fcecd8; }
.toggle-input:checked + .toggle-switch::after { transform: translateX(24px); background: #003d2e; }
html[dir="rtl"] .toggle-input:checked + .toggle-switch::after { transform: translateX(-24px); }
.toggle-text { font-size: 0.95rem; color: #fcecd8; font-weight: 500; }

/* --- Summary Cards --- */
.summary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.summary-card {
    background: rgba(0, 48, 36, 0.5); border: 1px solid rgba(252,236,216,0.06);
    border-radius: 14px; padding: 20px; text-align: center;
    transition: transform 0.3s, border-color 0.3s;
}
.summary-card:hover { transform: translateY(-3px); border-color: rgba(252,236,216,0.15); }
.summary-icon { font-size: 1.6rem; margin-bottom: 8px; }
.summary-label { font-size: 0.8rem; color: rgba(252,236,216,0.5); margin-bottom: 6px; }
.summary-value { font-size: 1.15rem; font-weight: 700; color: #ffffff; }
.discount-value { color: #86efac; }
.highlight-card { border-color: rgba(252,236,216,0.2); background: rgba(252,236,216,0.04); }
.highlight-card .summary-value { color: #fcecd8; font-size: 1.3rem; }
.currency { font-size: 0.8em; font-weight: 500; opacity: 0.7; }

/* Delight message */
.delight-msg {
    text-align: center; margin-top: 28px; padding: 14px 24px;
    background: rgba(252,236,216,0.06); border: 1px solid rgba(252,236,216,0.15);
    border-radius: 12px; color: #fcecd8; font-size: 0.9rem; font-weight: 500;
}

/* --- Plan Cards --- */
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 900px; margin: 0 auto; }
.plan-card {
    background: rgba(0, 48, 36, 0.5); border: 2px solid rgba(252,236,216,0.08);
    border-radius: 18px; padding: 32px 24px; text-align: center;
    cursor: pointer; transition: all 0.35s;
}
.plan-card:hover { border-color: rgba(252,236,216,0.25); transform: translateY(-4px); }
.plan-card.active {
    border-color: #fcecd8; background: rgba(252,236,216,0.06);
    box-shadow: 0 8px 32px rgba(252,236,216,0.1);
}
.plan-icon { color: #fcecd8; margin-bottom: 16px; display: flex; justify-content: center; }
.plan-card.active .plan-icon { color: #ffffff; }
.plan-name { font-size: 1.1rem; font-weight: 700; color: #ffffff; margin-bottom: 8px; }
.plan-desc { font-size: 0.82rem; color: rgba(252,236,216,0.5); line-height: 1.6; }

/* --- Installment Chips --- */
.installment-selector { text-align: center; }
.count-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 16px; }
.count-chip {
    padding: 12px 24px; border-radius: 12px;
    background: rgba(0, 48, 36, 0.5); border: 1px solid rgba(252,236,216,0.1);
    color: rgba(252,236,216,0.7); font-size: 1rem; font-weight: 600; cursor: pointer;
    transition: all 0.25s;
}
.count-chip:hover { border-color: rgba(252,236,216,0.3); }
.count-chip.active { background: rgba(252,236,216,0.08); border-color: #fcecd8; color: #fcecd8; }

/* --- Flexible Grid --- */
.flexible-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 900px; margin: 0 auto; }

/* --- Validation --- */
.validation-msg {
    margin-top: 16px; padding: 12px 20px; border-radius: 10px;
    background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3);
    color: #fca5a5; font-size: 0.88rem; display: inline-block;
}

/* --- Results Grid --- */
.results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.result-card {
    background: rgba(0, 48, 36, 0.5); border: 1px solid rgba(252,236,216,0.06);
    border-radius: 14px; padding: 20px; text-align: center;
    animation: fadeUp 0.5s ease both;
}
.result-card .result-label { font-size: 0.78rem; color: rgba(252,236,216,0.5); margin-bottom: 6px; }
.result-card .result-value { font-size: 1.1rem; font-weight: 700; color: #ffffff; }
.result-card.gold-card { border-color: rgba(252,236,216,0.2); }
.result-card.gold-card .result-value { color: #fcecd8; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* --- Payments Timeline --- */
.payments-timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; max-width: 800px; margin: 0 auto; }
.payment-step {
    position: relative; text-align: center;
    background: rgba(0, 48, 36, 0.5); border: 1px solid rgba(252,236,216,0.08);
    border-radius: 16px; padding: 24px 16px;
    animation: fadeUp 0.5s ease both;
}
.payment-step:nth-child(2) { animation-delay: 0.1s; }
.payment-step:nth-child(3) { animation-delay: 0.2s; }
.payment-step:nth-child(4) { animation-delay: 0.3s; }
.payment-num {
    width: 36px; height: 36px; border-radius: 50%;
    background: #fcecd8;
    color: #003d2e; font-weight: 700; font-size: 0.9rem;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 12px;
}
.payment-month { font-size: 0.8rem; color: rgba(252,236,216,0.5); margin-bottom: 6px; }
.payment-amount { font-size: 1.05rem; font-weight: 700; color: #ffffff; }
.payment-step.no-payment { opacity: 0.5; }
.payment-step.no-payment .payment-num { background: rgba(252,236,216,0.15); color: rgba(252,236,216,0.4); }

/* --- Visuals --- */
.visuals-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.visual-card {
    background: rgba(0, 48, 36, 0.5); border: 1px solid rgba(252,236,216,0.06);
    border-radius: 18px; padding: 28px; overflow: hidden;
}
.visual-card-wide { grid-column: span 2; }
.visual-title { font-size: 1rem; font-weight: 600; color: rgba(252,236,216,0.7); margin-bottom: 20px; text-align: center; }

.ownership-ring-container { display: flex; justify-content: center; }
.ownership-ring { width: 220px; height: 220px; }

/* --- Journey Summary --- */
.journey-summary-card {
    background: rgba(0, 48, 36, 0.5); border: 1px solid rgba(252,236,216,0.1);
    border-radius: 18px; padding: 36px; line-height: 2; color: rgba(252,236,216,0.75); font-size: 0.95rem;
    max-width: 800px; margin: 0 auto 24px;
}
.journey-summary-card strong { color: #fcecd8; font-weight: 600; }
.disclaimer {
    text-align: center; font-size: 0.8rem; color: rgba(252,236,216,0.35);
    max-width: 600px; margin: 0 auto; line-height: 1.7;
    padding: 16px; border-top: 1px solid rgba(252,236,216,0.08);
}

/* --- Action Buttons --- */
.action-buttons { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.whatsapp-hint { color: rgba(252,236,216,0.4); font-size: 0.82rem; max-width: 480px; margin: 0 auto; line-height: 1.7; }

/* --- Footer --- */
.footer {
    padding: 28px 0; text-align: center;
    border-top: 1px solid rgba(252,236,216,0.06);
}
.footer-text { color: rgba(252,236,216,0.3); font-size: 0.82rem; }

/* --- Calculate Section --- */
.calculate-section { padding: 40px 0; }

/* ======================================
   RESPONSIVE
   ====================================== */
@media (max-width: 768px) {
    .hero .container { flex-direction: column; text-align: center; }
    .hero-title { font-size: 1.8rem; }
    .hero-desc { margin: 0 auto 24px; font-size: 0.95rem; }
    .hero-ring-container { width: 160px; height: 160px; }
    .form-grid { grid-template-columns: 1fr; }
    .plan-grid { grid-template-columns: 1fr; }
    .flexible-grid { grid-template-columns: 1fr; }
    .payments-timeline { grid-template-columns: repeat(2, 1fr); }
    .visuals-grid { grid-template-columns: 1fr; }
    .visual-card-wide { grid-column: span 1; }
    .summary-grid { grid-template-columns: repeat(2, 1fr); }
    .results-grid { grid-template-columns: repeat(2, 1fr); }
    .section-title { font-size: 1.4rem; }
    .btn-calculate { font-size: 1.05rem; padding: 16px 40px; }
}
@media (max-width: 480px) {
    .summary-grid { grid-template-columns: 1fr; }
    .results-grid { grid-template-columns: 1fr; }
    .payments-timeline { grid-template-columns: 1fr; }
    .hero-title { font-size: 1.5rem; }
    .container { padding: 0 16px; }
}
