/* ═══════════════════════════════════════════════════════
   KORASTSHEROT OVERHAUL CSS — Staging v2.0
   Complete design system overrides
   ═══════════════════════════════════════════════════════ */

/* ─── Base ─── */
body {
    font-family: var(--ks-font, 'IBM Plex Sans Arabic', 'Cairo', Tahoma, Arial, sans-serif) !important;
    font-size: 16px;
    overflow-x: hidden;
}

/* ─── Header ─── */
.ks-header {
    background: var(--ks-surface, #fff);
    border-bottom: 1px solid var(--ks-border, #e0dcd8);
    transition: all .25s ease;
    z-index: 100;
}

.ks-header--sticky {
    position: fixed;
    top: 0;
    inset-inline: 0;
    box-shadow: var(--ks-shadow-md, 0 8px 24px rgba(0,52,66,.08));
    animation: slideDown .25s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.ks-header__inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    min-height: var(--ks-header-height, 80px);
    gap: 24px;
}

.ks-header__logo img,
.ks-header__logo svg {
    max-height: 56px !important;
    width: auto !important;
    object-fit: contain !important;
}

.ks-header__nav {
    flex: 1;
}

.ks-nav-list {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ks-nav-list > li {
    position: relative;
}

.ks-nav-list > li > a {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    color: var(--ks-text, #003441);
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    border-radius: var(--ks-radius);
    transition: all .15s;
}

.ks-nav-list > li > a:hover,
.ks-nav-list > li.current-menu-item > a {
    background: var(--ks-surface-soft);
    color: var(--ks-primary);
}

/* Dropdown */
.ks-nav-list .sub-menu {
    position: absolute;
    top: 100%;
    inset-inline-start: 0;
    background: var(--ks-surface);
    border: 1px solid var(--ks-border);
    border-radius: var(--ks-radius);
    box-shadow: var(--ks-shadow-md);
    min-width: 180px;
    padding: 8px 0;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all .2s;
    z-index: 101;
}

.menu-item-has-children:hover > .sub-menu,
.menu-item-has-children:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu li a {
    display: block;
    padding: 8px 16px;
    color: var(--ks-text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all .15s;
}

.sub-menu li a:hover {
    background: var(--ks-surface-soft);
    color: var(--ks-primary);
}

/* Header CTA */
.ks-header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ks-header__cta {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--ks-primary);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--ks-radius);
    transition: all .15s;
    white-space: nowrap;
}

.ks-header__cta:hover {
    background: var(--ks-primary-dark);
    transform: translateY(-1px);
}

/* Mobile toggle */
.ks-header__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.ks-header__toggle span {
    width: 26px;
    height: 3px;
    background: var(--ks-text);
    border-radius: 2px;
    transition: all .25s;
}

.ks-header__toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.ks-header__toggle.active span:nth-child(2) { opacity: 0; }
.ks-header__toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ─── Footer ─── */
.ks-footer {
    background: var(--ks-primary-dark, #002830);
    color: #c8d4d8;
    padding: 40px 0 0;
    margin-top: 40px;
}

.ks-footer__grid { margin-bottom: 30px; }

.ks-footer__logo { margin-bottom: 12px; }

.ks-footer__desc {
    font-size: 0.85rem;
    color: #a0b0b5;
    line-height: 1.7;
}

.ks-footer__heading {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 14px;
}

.ks-footer__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ks-footer__list li { margin-bottom: 8px; }

.ks-footer__list a {
    color: #a0b0b5;
    text-decoration: none;
    font-size: 0.88rem;
    transition: color .15s;
}

.ks-footer__list a:hover { color: var(--ks-accent, #d4a259); }

.ks-footer__contact {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}

.ks-footer__contact li { margin-bottom: 8px; }

.ks-footer__contact a {
    color: #c8d4d8;
    text-decoration: none;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ks-footer__contact a:hover { color: var(--ks-accent); }

.ks-footer__social {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.ks-footer__social a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.1);
    border-radius: 50%;
    color: #fff;
    transition: all .15s;
}

.ks-footer__social a:hover {
    background: var(--ks-accent);
    transform: translateY(-2px);
}

/* Footer bottom */
.ks-footer__bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 16px 0;
    margin-top: 20px;
}

.ks-footer__legal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.82rem;
    color: #8a9a9e;
}

.ks-footer__legal-links {
    display: flex;
    gap: 16px;
}

.ks-footer__legal-links a {
    color: #a0b0b5;
    text-decoration: none;
    transition: color .15s;
}

.ks-footer__legal-links a:hover { color: var(--ks-accent); }

/* ─── Floating Icons ─── */
.ks-float-icons {
    position: fixed;
    inset-inline-start: 16px;
    bottom: 80px;
    z-index: 90;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ks-float {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    text-decoration: none;
    box-shadow: var(--ks-shadow-md);
    transition: transform .2s;
}

.ks-float:hover { transform: scale(1.1); }
.ks-float--wa { background: #25d366; }
.ks-float--call { background: var(--ks-primary); }

.ks-back-top {
    position: fixed;
    inset-inline-end: 16px;
    bottom: 80px;
    width: 40px;
    height: 40px;
    background: var(--ks-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 90;
    text-decoration: none;
    box-shadow: var(--ks-shadow-md);
}

/* ─── Project Card ─── */
.ks-card {
    background: var(--ks-surface, #fff);
    border: 1px solid var(--ks-border, #e0dcd8);
    border-radius: var(--ks-radius-lg, 16px);
    overflow: hidden;
    transition: all .25s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ks-card:hover {
    box-shadow: var(--ks-shadow-md, 0 8px 24px rgba(0,52,66,.08));
    transform: translateY(-2px);
}

.ks-card__img {
    position: relative;
    aspect-ratio: 800/520;
    overflow: hidden;
    background: var(--ks-surface-soft);
}

.ks-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.ks-card:hover .ks-card__img img { transform: scale(1.05); }

.ks-card__city {
    position: absolute;
    bottom: 8px;
    inset-inline-start: 8px;
    background: rgba(255,255,255,.95);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ks-primary);
    text-decoration: none;
}

.ks-card__body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.ks-card__title a {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ks-text);
    text-decoration: none;
    line-height: 1.4;
}

.ks-card__title a:hover { color: var(--ks-primary); }

.ks-card__price-value { font-weight: 800; }

.ks-card__meta {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--ks-text-secondary);
    flex-wrap: wrap;
}

.ks-card__meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ks-card__actions { margin-top: auto; padding-top: 8px; }

/* Book button in card */
.ks-btn--book {
    width: 100%;
    padding: 10px 16px;
    background: var(--ks-accent, #d4a259);
    color: var(--ks-text);
    border: none;
    border-radius: var(--ks-radius);
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

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

/* Remove old card booking forms and zoom buttons */
.project-box .cta-email,
.project-box .cta-phone,
.project-box .cta-zoom,
.project-box .cta-wts { display: none !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%; z-index: 1;
    box-shadow: var(--ks-shadow-lg, 0 16px 40px rgba(0,52,66,.12));
}
.ks-modal__close {
    position: absolute; top: 12px; inset-inline-end: 16px;
    background: none; border: none; font-size: 1.5rem;
    color: var(--ks-text-muted); cursor: pointer;
    width: 36px; height: 36px; border-radius: 50%; transition: all .15s;
}
.ks-modal__close:hover { background: var(--ks-surface-soft); color: var(--ks-text); }

/* ─── 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);
    box-shadow: 0 -4px 16px rgba(0,0,0,.08); z-index: 95;
    padding: 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); 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); 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); color: #fff; }
.ks-btn--primary:hover { background: var(--ks-primary-dark); }
.ks-btn--wa { background: #25d366; color: #fff; }
.ks-btn--wa:hover { background: #1da851; }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .ks-header__inner { padding: 0 16px; }
}

@media (max-width: 768px) {
    .ks-header__toggle { display: flex; }
    .ks-header__nav {
        position: fixed; top: 0; inset-inline-end: -100%;
        width: 280px; height: 100vh; background: var(--ks-surface);
        padding: 80px 20px 20px; box-shadow: var(--ks-shadow-lg);
        transition: inset-inline-end .3s ease; z-index: 99; overflow-y: auto;
    }
    .ks-header__nav.ks-nav--open { inset-inline-end: 0; }
    .ks-nav-list { flex-direction: column; align-items: stretch; gap: 0; }
    .ks-nav-list > li > a { padding: 14px 12px; border-bottom: 1px solid var(--ks-border); }
    .ks-nav-list .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; padding: 0; }
    .ks-header__cta span { display: none; }
    .ks-header__cta { padding: 10px; }

    /* Mobile bottom bar */
    .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) !important; }

    .ks-modal__dialog { margin: 16px; max-width: calc(100% - 32px); padding: 20px; }
    body { font-size: 16px !important; }
    .ks-btn, button, input[type="submit"] { min-height: 48px; }
    html, body { overflow-x: hidden; max-width: 100%; }

    /* Hide floating icons on mobile (replaced by bottom bar) */
    .ks-float-icons { display: none; }
    .ks-back-top { bottom: 76px; }
}

@media (max-width: 360px) {
    .ks-header__inner { padding: 0 8px; gap: 8px; }
    .ks-header__logo img { max-height: 44px !important; }
}

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

/* ─── Input improvements ─── */
input[type="text"], input[type="tel"], input[type="email"],
select, textarea {
    min-height: 48px;
    font-size: 16px !important;
    font-family: var(--ks-font) !important;
}

/* ─── Fix old floating icons visibility ─── */
#floating-icons { z-index: 90; }
#back-top { z-index: 90; }
