/* ═══════════════════════════════════════════════════════
   KORASTSHEROT OVERHAUL CSS — Staging v1.0
   ═══════════════════════════════════════════════════════ */

/* ─── Font & Base ─── */
body {
    font-family: var(--ks-font, 'IBM Plex Sans Arabic', 'Cairo', Tahoma, Arial, sans-serif) !important;
}

/* ─── Booking Modal ─── */
.ks-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ks-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,40,48,.7);
    backdrop-filter: blur(4px);
}

.ks-modal__dialog {
    position: relative;
    background: var(--ks-surface, #fff);
    border-radius: var(--ks-radius-lg, 16px);
    padding: 28px;
    max-width: 460px;
    width: 100%;
    box-shadow: var(--ks-shadow-lg, 0 16px 40px rgba(0,52,66,.12));
    z-index: 1;
}

.ks-modal__close {
    position: absolute;
    top: 12px;
    inset-inline-end: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--ks-text-muted, #999);
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: all .15s;
}

.ks-modal__close:hover {
    background: var(--ks-surface-soft, #f5f5f4);
    color: var(--ks-text, #003442);
}

.ks-modal__dialog h3 {
    margin: 0 0 8px;
    color: var(--ks-primary, #003442);
    font-size: 1.2rem;
}

/* ─── Mobile Bottom Bar ─── */
.ks-mobile-bar {
    display: none;
    position: fixed;
    bottom: 0;
    inset-inline: 0;
    background: var(--ks-surface, #fff);
    border-top: 1px solid var(--ks-border, #e0dcd8);
    box-shadow: 0 -4px 16px rgba(0,0,0,.08);
    z-index: 95;
    padding: 8px env(safe-area-inset-bottom, 8px);
}

.ks-mobile-bar__btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px;
    color: var(--ks-text-secondary, #5a6c70);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: color .15s;
}

.ks-mobile-bar__wa { color: #25d366; }

/* ─── Buttons ─── */
.ks-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--ks-radius, 10px);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
    min-height: 48px;
}

.ks-btn--primary {
    background: var(--ks-primary, #003442);
    color: #fff;
}
.ks-btn--primary:hover { background: var(--ks-primary-dark, #002830); }

.ks-btn--wa {
    background: #25d366;
    color: #fff;
}
.ks-btn--wa:hover { background: #1da851; }

/* ─── Fix project card: remove embedded booking form ─── */
.project-card .booking-form-full {
    display: none !important;
}

.project-card .ks-book-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--ks-accent, #d4a259);
    color: var(--ks-text, #003442);
    border: none;
    border-radius: var(--ks-radius, 10px);
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
}

.project-card .ks-book-btn:hover {
    background: var(--ks-accent-strong, #b8860b);
    transform: translateY(-1px);
}

/* ─── Installment calculator ─── */
.ks-calc {
    margin: 20px 0;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .ks-mobile-bar {
        display: flex;
        align-items: center;
        justify-content: space-around;
        min-height: var(--ks-mobile-bar-height, 64px);
    }

    body { padding-bottom: var(--ks-mobile-bar-height, 64px); }

    .ks-modal__dialog {
        margin: 16px;
        max-width: calc(100% - 32px);
        padding: 20px;
    }

    /* Fix font size for mobile */
    body { font-size: 16px !important; }

    /* Buttons 48px min height */
    .ks-btn, button, a[href*="tel:"], a[href*="wa.me"] {
        min-height: 48px;
    }

    /* Prevent horizontal scroll */
    html, body { overflow-x: hidden; max-width: 100%; }
}

/* ─── Input improvements ─── */
input[type="text"], input[type="tel"], input[type="email"],
select, textarea {
    min-height: 48px;
    font-size: 16px !important; /* prevent iOS zoom */
}

/* ─── Fix header: replace English with Arabic ─── */
.header-section-flex {
    min-height: var(--ks-header-height, 80px);
}

/* ─── Remove duplicate project cards on homepage ─── */
.home .projects-section + .projects-section {
    display: none;
}
