/**
 * KSD Technologies - Clean Tech Agency Architecture
 * Restructured layout completely disassociated from legacy templates.
 */

@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;700;900&display=swap');

/* ── 1. CORE RESET & VARIABLES ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg-main: #ffffff;
    --bg-alt: #f4f4f5;
    --dark-bg: #09090b;
    --dark-surface: #18181b;
    --indigo: #4f46e5;
    --indigo-hover: #4338ca;
    --text-dark: #27272a;
    --text-muted: #71717a;
    --text-light: #e4e4e7;
    --border: #e4e4e7;
    --border-dark: #27272a;
}

html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: 'Rubik', sans-serif; background: var(--bg-main); color: var(--text-dark); overflow-x: hidden; direction: rtl; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ── 2. TYPOGRAPHY & HEADINGS ── */
.section-head { margin-bottom: 3.5rem; }
.section-head.center { text-align: center; }
.sub-heading { display: inline-block; font-size: 0.8rem; font-weight: 700; color: var(--indigo); letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 0.75rem; background: #eef2ff; padding: 0.25rem 0.75rem; border-radius: 2rem; }
.section-head h2 { font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 900; color: var(--dark-bg); line-height: 1.2; letter-spacing: -0.02em; }

/* Buttons */
.btn-primary-solid { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; background: var(--indigo); color: white; border: none; padding: 0.85rem 1.75rem; font-size: 1rem; font-weight: 700; border-radius: 0.5rem; cursor: pointer; transition: background 0.2s, transform 0.2s; text-decoration: none; }
.btn-primary-solid:hover { background: var(--indigo-hover); transform: translateY(-2px); }
.btn-outline-dark { display: inline-flex; align-items: center; justify-content: center; background: transparent; color: var(--dark-bg); border: 2px solid var(--border); padding: 0.8rem 1.75rem; font-size: 1rem; font-weight: 700; border-radius: 0.5rem; text-decoration: none; transition: all 0.2s; }
.btn-outline-dark:hover { border-color: var(--dark-bg); background: var(--dark-bg); color: white; }

/* ── 3. FLOATING PILL HEADER ── */
.pill-header { position: absolute; top: 1.5rem; left: 0; width: 100%; z-index: 100; pointer-events: none; }
.pill-inner { pointer-events: auto; display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); max-width: 900px; margin: 0 auto; padding: 0.75rem 1.5rem; border-radius: 3rem; box-shadow: 0 10px 30px rgba(0,0,0,0.08); border: 1px solid var(--border); width: calc(100% - 2rem); }
.ksd-brand { font-size: 1.5rem; font-weight: 900; color: var(--dark-bg); text-decoration: none; letter-spacing: -0.03em; }
.ksd-brand span { color: var(--indigo); }
.pill-nav { display: none; gap: 2rem; }
@media (min-width: 768px) { .pill-nav { display: flex; } }
.pill-nav a { font-size: 0.9rem; font-weight: 600; color: var(--text-dark); text-decoration: none; transition: color 0.2s; }
.pill-nav a:hover { color: var(--indigo); }
.mobile-menu-trigger { display: block; background: none; border: none; font-size: 1.25rem; color: var(--dark-bg); cursor: pointer; }
@media (min-width: 768px) { .mobile-menu-trigger { display: none; } }

/* Mobile Overlay */
.k-mobile-overlay { position: fixed; inset: 0; background: var(--dark-bg); z-index: 99999; display: none; flex-direction: column; padding: 2rem; }
.k-mobile-overlay.active { display: flex; }
.k-mobile-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4rem; }
.k-mobile-head .ksd-brand { color: white; }
.k-close-btn { background: none; border: none; font-size: 2rem; color: white; cursor: pointer; }
.k-mobile-nav { display: flex; flex-direction: column; gap: 1.5rem; }
.k-mob-link { font-size: 1.5rem; font-weight: 700; color: white; text-decoration: none; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border-dark); }
.k-mob-link:active { color: var(--indigo); }

/* ── 4. SPLIT SCREEN HERO ── */
.hero-split { display: flex; flex-direction: column; min-height: 100vh; position: relative; }
@media (min-width: 900px) { .hero-split { flex-direction: row; } }

.hero-dark-side { background: var(--dark-bg); color: white; flex: 1; padding: 8rem 1.5rem 4rem; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
@media (min-width: 900px) { .hero-dark-side { padding: 6rem 4rem; } }
.tech-tag { display: inline-block; font-size: 0.8rem; font-weight: 700; color: var(--indigo); border: 1px solid rgba(79, 70, 229, 0.4); padding: 0.3rem 0.85rem; border-radius: 2rem; margin-bottom: 1.5rem; }
.hero-headline { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 900; line-height: 1.1; margin-bottom: 1.5rem; letter-spacing: -0.03em; }
.hero-headline span { color: var(--indigo); }
.hero-sub { font-size: clamp(1rem, 2vw, 1.15rem); color: var(--text-muted); line-height: 1.6; max-width: 32rem; margin-bottom: 3rem; }

.hero-metrics { display: flex; gap: 2rem; border-top: 1px solid var(--border-dark); padding-top: 2rem; }
.metric strong { display: block; font-size: 1.5rem; font-weight: 800; color: white; }
.metric span { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }

.hero-light-side { background: var(--bg-alt); flex: 0.8; display: flex; align-items: center; justify-content: center; padding: 4rem 1.5rem; }
@media (min-width: 900px) { .hero-light-side { padding: 6rem 3rem; border-right: 1px solid var(--border); } }

.hero-form-wrapper { background: white; padding: 2.5rem; border-radius: 1rem; box-shadow: 0 20px 40px rgba(0,0,0,0.06); width: 100%; max-width: 400px; position: relative; }
.form-header h2 { font-size: 1.5rem; font-weight: 800; color: var(--dark-bg); margin-bottom: 0.25rem; }
.form-header p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.ksd-clean-form .input-row { margin-bottom: 1rem; position: relative; }
.ksd-clean-form label { display: block; font-size: 0.75rem; font-weight: 700; color: var(--text-dark); margin-bottom: 0.4rem; }
.ksd-clean-form input { width: 100%; background: var(--bg-main); border: 1px solid var(--border); padding: 0.85rem 1rem; border-radius: 0.5rem; font-family: inherit; font-size: 0.95rem; outline: none; transition: border-color 0.2s; }
.ksd-clean-form input:focus { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1); }
.ksd-clean-form button { width: 100%; margin-top: 1rem; }
.form-error-alert { position: absolute; right: 0; top: 0; color: #ef4444; font-size: 0.7rem; font-weight: 700; display: none; }
.form-success-overlay { position: absolute; inset: 0; background: white; border-radius: 1rem; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; text-align: center; }
.form-success-overlay i { font-size: 3rem; color: #10b981; }

/* ── 5. TRUST MARQUEE ── */
.trust-marquee { background: white; padding: 2.5rem 0; border-bottom: 1px solid var(--border); overflow: hidden; white-space: nowrap; }
.marquee-content { display: flex; gap: 3rem; align-items: center; justify-content: center; flex-wrap: wrap; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.marquee-content img { height: 2rem; width: auto; filter: grayscale(100%); opacity: 0.4; transition: opacity 0.3s; }
.marquee-content img:hover { opacity: 0.8; filter: none; }

/* ── 6. ZIG-ZAG ABOUT ── */
.zig-zag-section { padding: 6rem 0; background: white; }
.zz-row { display: grid; gap: 3rem; align-items: center; margin-bottom: 4rem; }
@media (min-width: 768px) { .zz-row { grid-template-columns: 1fr 1fr; } .zz-row.reverse { direction: ltr; } .zz-row.reverse .zz-text { direction: rtl; } }
.zz-text { max-width: 32rem; }
.icon-box { width: 3rem; height: 3rem; border-radius: 0.75rem; background: #e0e7ff; color: var(--indigo); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; margin-bottom: 1.25rem; }
.zz-text h3 { font-size: 1.75rem; font-weight: 800; color: var(--dark-bg); margin-bottom: 0.75rem; }
.zz-text p { font-size: 1rem; color: var(--text-muted); line-height: 1.7; }
.zz-visual { aspect-ratio: 4/3; border-radius: 1rem; background: var(--bg-alt); position: relative; overflow: hidden; border: 1px solid var(--border); }
.bg-pattern-1 { background: linear-gradient(45deg, #f4f4f5 25%, transparent 25%, transparent 75%, #f4f4f5 75%, #f4f4f5), linear-gradient(45deg, #f4f4f5 25%, transparent 25%, transparent 75%, #f4f4f5 75%, #f4f4f5); background-size: 20px 20px; background-position: 0 0, 10px 10px; }

/* ── 7. STAGGERED PRICING ── */
.pricing-staggered { padding: 6rem 0; background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.staggered-grid { display: grid; gap: 2rem; max-width: 68rem; margin: 0 auto; align-items: center; }
@media (min-width: 900px) { .staggered-grid { grid-template-columns: repeat(3, 1fr); } }
.p-card { background: white; border-radius: 1rem; padding: 2.5rem; border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0,0,0,0.03); display: flex; flex-direction: column; transition: transform 0.3s; }
.p-card:hover { transform: translateY(-5px); }
.p-card.pro { border-color: var(--indigo); box-shadow: 0 20px 40px rgba(79, 70, 229, 0.08); position: relative; }
@media (min-width: 900px) { .p-card.pro { padding: 3.5rem 2.5rem; z-index: 2; } }
.most-popular { position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%); background: var(--indigo); color: white; font-size: 0.75rem; font-weight: 700; padding: 0.35rem 1rem; border-radius: 2rem; }
.p-card h4 { font-size: 1.5rem; font-weight: 900; color: var(--dark-bg); margin-bottom: 0.5rem; }
.p-brief { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 1.5rem; min-height: 2.5rem; }
.p-price { font-size: 3rem; font-weight: 900; color: var(--dark-bg); margin-bottom: 2rem; letter-spacing: -0.05em; border-bottom: 1px solid var(--bg-alt); padding-bottom: 1.5rem; }
.p-price span { font-size: 1.25rem; font-weight: 700; color: var(--text-muted); }
.p-features { list-style: none; display: flex; flex-direction: column; gap: 0.85rem; font-size: 0.9rem; margin-bottom: 2rem; flex: 1; }
.p-features li { display: flex; align-items: flex-start; gap: 0.5rem; color: var(--text-dark); }
.p-features i { color: var(--indigo); margin-top: 0.25rem; }
.maintenance-note { text-align: center; margin-top: 3rem; font-size: 0.9rem; font-weight: 600; color: var(--text-muted); }

/* ── 8. MASONRY PORTFOLIO ── */
.masonry-portfolio { padding: 6rem 0; background: white; }
.m-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(2, 1fr); max-width: 72rem; margin: 0 auto; grid-auto-rows: 250px; }
@media (min-width: 768px) { .m-grid { grid-template-columns: repeat(3, 1fr); } }
.m-item { position: relative; border-radius: 1rem; overflow: hidden; display: block; text-decoration: none; background: var(--bg-alt); border: 1px solid var(--border); }
.m-item.span-tall { grid-row: span 2; }
.m-item.span-wide { grid-column: span 2; }
.m-item img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 0.6s ease; }
.m-item:hover img { transform: scale(1.05); }
.m-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(9,9,11,0.9) 0%, transparent 60%); display: flex; flex-direction: column; justify-content: flex-end; padding: 1.5rem; opacity: 0; transition: opacity 0.3s ease; }
.m-item:hover .m-overlay { opacity: 1; }
.m-overlay span { font-size: 0.75rem; font-weight: 700; color: #a5b4fc; margin-bottom: 0.25rem; }
.m-overlay h4 { font-size: 1.25rem; font-weight: 800; color: white; }

/* ── 9. VERTICAL TIMELINE PROCESS ── */
.timeline-section { padding: 6rem 0; background: var(--bg-alt); }
.timeline-wrapper { max-width: 40rem; margin: 0 auto; position: relative; padding-right: 2rem; border-right: 2px dashed var(--border); }
.timeline-item { position: relative; margin-bottom: 3rem; }
.timeline-item:last-child { margin-bottom: 0; }
.tl-dot { position: absolute; right: -3.15rem; top: 0; width: 2.25rem; height: 2.25rem; background: var(--dark-bg); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1rem; box-shadow: 0 0 0 4px var(--bg-alt); z-index: 2; }
.tl-content { background: white; padding: 2rem; border-radius: 1rem; border: 1px solid var(--border); box-shadow: 0 10px 20px rgba(0,0,0,0.02); }
.tl-content h3 { font-size: 1.25rem; font-weight: 800; color: var(--dark-bg); margin-bottom: 0.75rem; }
.tl-content p { font-size: 0.95rem; color: var(--text-muted); line-height: 1.6; }

/* ── 10. TWO COLUMN FAQ ── */
.faq-grid-section { padding: 6rem 0; background: white; }
.faq-grid { display: grid; gap: 2rem; max-width: 64rem; margin: 0 auto; }
@media (min-width: 768px) { .faq-grid { grid-template-columns: 1fr 1fr; } }
.faq-card { background: var(--bg-alt); padding: 2rem; border-radius: 1rem; border: 1px solid var(--border); }
.faq-card h4 { font-size: 1.15rem; font-weight: 800; color: var(--dark-bg); margin-bottom: 0.75rem; }
.faq-card p { font-size: 0.95rem; color: var(--text-muted); line-height: 1.6; }

/* ── 11. BOTTOM CTA ── */
.bottom-cta-section { padding: 4rem 0 6rem; background: white; }
.cta-banner { background: var(--dark-bg); color: white; padding: 4rem 2rem; border-radius: 1.5rem; text-align: center; max-width: 56rem; margin: 0 auto; box-shadow: 0 20px 40px rgba(9,9,11,0.15); }
.cta-banner h2 { font-size: clamp(2rem, 4vw, 2.5rem); font-weight: 900; margin-bottom: 1rem; }
.cta-banner p { font-size: 1.1rem; color: var(--text-light); margin-bottom: 2rem; max-width: 32rem; margin-inline: auto; }
.cta-direct-links { display: flex; flex-direction: column; gap: 1rem; align-items: center; justify-content: center; }
@media (min-width: 640px) { .cta-direct-links { flex-direction: row; gap: 2rem; } }
.cta-direct-links a { color: white; text-decoration: none; font-size: 1.1rem; font-weight: 700; display: flex; align-items: center; gap: 0.5rem; transition: color 0.2s; }
.cta-direct-links a:hover { color: var(--indigo); }
.cta-direct-links i { color: var(--indigo); font-size: 1.25rem; }

/* ── 12. FOOTER ── */
.ksd-footer { background: var(--bg-alt); padding: 3rem 0; border-top: 1px solid var(--border); }
.footer-wrap { display: flex; flex-direction: column; gap: 1rem; align-items: center; text-align: center; }
@media (min-width: 768px) { .footer-wrap { flex-direction: row; justify-content: space-between; } }
.footer-brand { font-size: 1.1rem; font-weight: 900; color: var(--dark-bg); }
.footer-brand span { color: var(--indigo); }
.footer-copy { font-size: 0.85rem; color: var(--text-muted); }
.footer-legal { display: flex; gap: 1rem; font-size: 0.85rem; font-weight: 600; }
.footer-legal a { color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.footer-legal a:hover { color: var(--dark-bg); }

/* ── 13. FLOATING BUTTONS ── */
.ksd-floaters { position: fixed; bottom: 1.5rem; left: 1.5rem; z-index: 100; display: flex; flex-direction: column; gap: 0.75rem; }
@media (min-width: 768px) { .ksd-floaters { bottom: 2rem; left: 2rem; flex-direction: row-reverse; } }
.f-btn { width: 3.5rem; height: 3.5rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: white; text-decoration: none; box-shadow: 0 10px 25px rgba(0,0,0,0.1); transition: transform 0.2s; }
.f-btn:hover { transform: translateY(-4px); }
.whatsapp-btn { background: #25d366; }
.call-btn { background: var(--dark-bg); border: 2px solid var(--indigo); }

/* ── 14. COOKIE BANNER ── */
#cookie-banner { position: fixed; bottom: 1.5rem; right: 1.5rem; background: white; border: 1px solid var(--border); padding: 1rem; border-radius: 0.75rem; box-shadow: 0 10px 30px rgba(0,0,0,0.05); max-width: 18rem; z-index: 9999; }
.cookie-inner p { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.75rem; line-height: 1.4; }
.cookie-inner a { color: var(--indigo); font-weight: 600; }
.c-actions { display: flex; gap: 0.5rem; }
.c-ok { background: var(--dark-bg); color: white; border: none; padding: 0.35rem 0.75rem; font-weight: 700; border-radius: 0.4rem; cursor: pointer; font-size: 0.75rem; }
.c-no { background: var(--bg-alt); color: var(--text-muted); border: none; padding: 0.35rem 0.75rem; font-weight: 700; border-radius: 0.4rem; cursor: pointer; font-size: 0.75rem; }

/* Reveal Animations */
.reveal { opacity: 0; transform: translateY(20px); transition: all 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.animate-up { animation: fadeInUp 0.8s ease forwards; opacity: 0; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
