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

:root {
    --bg-dark: #fcfcfd;
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff;
    --bg-elevated: #f8fafc;
    --primary-cyan: #ff3b30;
    --primary-cyan-light: rgba(255, 59, 48, 0.08);
    --secondary-blue: #f97316;
    --brand-red: #ff3b30;
    --brand-orange: #f97316;
    --text-main: #0f172a;
    --text-muted: #475569;
    --glass-border: #e2e8f0;
    --card-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.03);
    --card-shadow-hover: 0 20px 40px -10px rgba(255, 59, 48, 0.14), 0 4px 6px rgba(15, 23, 42, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-main);
    letter-spacing: -0.01em;
}
a {
    color: inherit;
    text-decoration: none;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, var(--primary-cyan), var(--secondary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-main);
}

p {
    font-size: 1.1rem;
    color: var(--text-muted);
    text-align: left;
    line-height: 1.7;
}

/* Layout & Whitespace */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

section {
    padding: 6rem 0;
}

/* Navbar */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04);
}

.logo {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.logo span {
    color: var(--primary-cyan);
}

.logo-img {
    height: 36px;
    width: 36px;
    object-fit: contain;
    border-radius: 50%;
    display: inline-block;
    vertical-align: middle;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: #334155;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.98rem;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--primary-cyan);
}

.cta-btn {
    background: linear-gradient(135deg, var(--primary-cyan), var(--secondary-blue));
    color: #ffffff;
    padding: 0.7rem 1.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(255, 59, 48, 0.3);
}

.cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 59, 48, 0.4);
}

.cta-btn-secondary {
    background: #ffffff;
    color: #0f172a;
    padding: 0.7rem 1.4rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 1.5px solid #cbd5e1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.cta-btn-secondary:hover {
    border-color: var(--primary-cyan);
    color: var(--primary-cyan);
    background: var(--primary-cyan-light);
    transform: translateY(-1px);
}

/* Hero Section */
.hero {
    min-height: auto;
    display: flex;
    align-items: center;
    position: relative;
    padding: 8rem 0 4rem;
    background: radial-gradient(circle at 80% 20%, rgba(255, 59, 48, 0.05), transparent 45%);
}

.hero-content {
    flex: 1;
    z-index: 2;
}

.hero-image {
    flex: 1;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
}

.hero-image img {
    max-width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
    animation: float 6s ease-in-out infinite;
    border: 1px solid var(--glass-border);
}

.hero p {
    margin-bottom: 2rem;
    max-width: 540px;
    font-size: 1.15rem;
}

/* Features (Why Us) */
.features {
    background: #ffffff;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    padding: 5rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.75rem;
    margin-top: 3.5rem;
}

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .features-grid:has(> :nth-child(3):last-child) {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1023px) and (min-width: 641px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 2rem 1.75rem;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-8px);
    border-color: var(--primary-cyan);
    box-shadow: var(--card-shadow-hover);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.25rem;
    color: var(--primary-cyan);
    display: inline-block;
    padding: 12px;
    background: var(--primary-cyan-light);
    border-radius: 14px;
}

.feature-card h3 {
    margin-bottom: 1rem;
    font-size: 1.35rem;
}

.feature-card a {
    margin-top: auto;
    font-weight: 600;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-top: 3.5rem;
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.service-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 350px;
    display: flex;
    align-items: flex-end;
    padding: 2rem;
    background: #0f172a;
    border: 1px solid var(--glass-border);
    transition: all 0.4s ease;
    box-shadow: var(--card-shadow);
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.25));
    z-index: 1;
}

.service-content {
    position: relative;
    z-index: 2;
}

.service-item h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.service-item p {
    font-size: 0.95rem;
    opacity: 0.9;
    transform: translateY(20px);
    transition: all 0.4s ease;
    color: #cbd5e1;
}

.service-item:hover {
    border-color: var(--primary-cyan);
    box-shadow: var(--card-shadow-hover);
}

.service-item:hover p {
    opacity: 1;
    transform: translateY(0);
}

.bottom-cta {
    background: #f8fafc !important;
    padding: 6rem 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
}

/* Contact/Footer */
footer {
    background: var(--bg-elevated);
    padding: 4.5rem 0 2.5rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2.5rem;
    margin-bottom: 3.5rem;
}

.footer-col h4 {
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
    color: var(--text-main);
    font-weight: 700;
}

.footer-col p, .footer-col a {
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 0.6rem;
    display: block;
    font-size: 0.95rem;
}

.footer-col a:hover {
    color: var(--primary-cyan);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #cbd5e1;
    color: var(--text-muted);
}

/* Animations */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-16px); }
    100% { transform: translateY(0px); }
}

/* Responsive Base */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 120px;
    }
    .hero h1 { font-size: 2.5rem; }
    .hero p { margin: 0 auto 2rem; }
    .hero-image { margin-top: 3rem; }
}

/* Calculator Section (Advanced Light Scoping Engine) */
.calculator {
    background: var(--bg-dark);
    border-top: 1px solid var(--glass-border);
    padding: 6rem 0;
}
.calc-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 32px;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
}
@media (max-width: 900px) {
    .calc-grid { grid-template-columns: 1fr; }
}

.calc-panel {
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--card-shadow);
}

.calc-panel-label {
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 20px;
    font-weight: 700;
}

/* Wizard Progress */
.wizard-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 32px;
    position: relative;
}
.wizard-progress::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--glass-border);
    z-index: 1;
    transform: translateY(-50%);
}
.wizard-step {
    background: #ffffff;
    border: 2px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 20px;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}
.wizard-step.active {
    border-color: var(--primary-cyan);
    color: var(--primary-cyan);
    background: var(--primary-cyan-light);
    box-shadow: 0 0 12px rgba(255, 59, 48, 0.15);
}
.wizard-step.completed {
    border-color: var(--primary-cyan);
    background: var(--primary-cyan);
    color: #ffffff;
}
@media (max-width: 600px) {
    .wizard-progress {
        display: flex;
        justify-content: center;
        gap: 0.35rem;
        margin-bottom: 1.25rem;
    }
    .wizard-progress::before { display: none; }
    .wizard-step {
        padding: 6px 8px;
        font-size: 0.65rem;
        border-radius: 999px;
        white-space: nowrap;
    }
}

/* Wizard Panels */
.wizard-panel {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}
.wizard-panel.active {
    display: block;
}

/* Wizard Navigation */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 2.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--glass-border);
}
.wizard-btn-prev, .wizard-btn-next {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: inherit;
    font-size: 0.95rem;
}
.wizard-btn-prev {
    background: var(--bg-elevated);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}
.wizard-btn-prev:hover { background: #e2e8f0; }
.wizard-btn-next {
    background: var(--primary-cyan);
    color: #ffffff;
    margin-left: auto;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.25);
}
.wizard-btn-next:hover { box-shadow: 0 6px 18px rgba(255, 59, 48, 0.35); transform: translateY(-1px); }

.calc-field-row {
    margin-bottom: 1.25rem;
}
.calc-field-row label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 600;
    margin-bottom: 8px;
}
.calc-field-row input, .calc-field-row select {
    width: 100%;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    padding: 12px 14px;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.calc-field-row input:focus, .calc-field-row select:focus {
    border-color: var(--primary-cyan);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.15);
}
.calc-field-row input.is-invalid, .calc-field-row select.is-invalid {
    border-color: #ff3b30 !important;
    box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.15) !important;
}
.calc-field-row input.is-valid, .calc-field-row select.is-valid {
    border-color: #10b981 !important;
}
.req-star {
    color: #ff3b30;
    font-weight: 700;
    margin-left: 2px;
}
.field-error-msg {
    font-size: 0.78rem;
    color: #ff3b30;
    margin-top: 4px;
    display: block;
    font-weight: 500;
}
.calc-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 16px;
    line-height: 1.5;
}

/* Tier Cards */
.calc-tier-grid { display: flex; flex-direction: column; gap: 10px; }
.calc-tier-card {
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 14px 16px;
    cursor: pointer;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    transition: all 0.2s ease;
}
.calc-tier-card:hover { border-color: var(--primary-cyan); }
.calc-tier-card.selected {
    border-color: var(--primary-cyan);
    background: var(--primary-cyan-light);
}
.calc-tier-name { font-weight: 600; font-size: 1rem; margin-bottom: 3px; color: var(--text-main); }
.calc-tier-desc { font-size: 0.85rem; color: var(--text-muted); }

/* Deliverables */
.calc-deliv-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
@media (max-width: 640px) { .calc-deliv-grid { grid-template-columns: 1fr; } }
.calc-deliv-card {
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 14px 14px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}
.calc-deliv-card:hover { border-color: var(--primary-cyan); }
.calc-deliv-card.selected {
    border-color: var(--primary-cyan);
    background: var(--primary-cyan-light);
}
.calc-deliv-tag {
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    color: var(--primary-cyan);
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: 700;
}
.calc-deliv-label { font-weight: 600; font-size: 0.95rem; line-height: 1.3; color: var(--text-main); }

/* Elements / Systems Grid */
.calc-systems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 8px;
}
.calc-system-card {
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    user-select: none;
}
.calc-system-card:hover {
    border-color: var(--primary-cyan);
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.calc-system-card.selected {
    border-color: var(--primary-cyan);
    background: var(--primary-cyan-light);
    box-shadow: 0 0 0 1px var(--primary-cyan);
}
.calc-system-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary-cyan);
    margin-bottom: 4px;
}
.calc-system-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 3px;
}
.calc-system-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.35;
}

/* Readout Panel (Clean Light Theme Card) */
.calc-readout {
    position: sticky;
    top: 100px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 10px 35px -5px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.03);
    color: var(--text-main);
    transition: all 0.3s ease;
}
.calc-readout::before {
    content: '';
    display: block;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-red), var(--brand-orange));
    width: 100%;
}
@media (max-width: 900px) { .calc-readout { position: static; } }
.calc-readout-scene {
    position: relative;
    padding: 28px 28px 22px;
    overflow: hidden;
    border-bottom: 1px solid var(--glass-border);
    background: linear-gradient(180deg, #ffffff 0%, var(--bg-elevated) 100%);
}
.calc-readout-scene svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.12; }
.calc-scanline {
    position: absolute;
    left: 0; right: 0;
    height: 70px;
    background: linear-gradient(to bottom, transparent, rgba(255, 59, 48, 0.04) 45%, rgba(255, 59, 48, 0.15) 50%, rgba(255, 59, 48, 0.04) 55%, transparent);
    filter: blur(2px);
    animation: sweep 3.6s linear infinite;
    pointer-events: none;
}
.calc-scanline.resweep { animation: sweep 0.7s ease-out 1; }
@keyframes sweep {
    0% { transform: translateY(-90px); }
    100% { transform: translateY(320px); }
}

.calc-readout-label {
    position: relative; z-index: 2;
    font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--primary-cyan); margin: 0 0 8px; font-weight: 700;
}
.calc-readout-total {
    position: relative; z-index: 2;
    font-weight: 700;
    font-size: 2.2rem;
    color: var(--text-main);
    letter-spacing: -0.01em;
    line-height: 1.25;
}
.calc-readout-mode {
    position: relative; z-index: 2;
    font-size: 0.9rem;
    color: var(--brand-orange);
    margin-top: 10px;
    font-weight: 600;
    display: inline-block;
    padding: 4px 12px;
    background: rgba(249, 115, 22, 0.08);
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: 20px;
}

.calc-breakdown { padding: 20px 28px 8px; background: #ffffff; }
.calc-bline {
    display: flex; justify-content: space-between; align-items: baseline;
    font-size: 0.92rem; padding: 11px 0; border-bottom: 1px solid var(--glass-border);
    color: var(--text-muted);
}
.calc-bline:last-child { border-bottom: none; }
.calc-bline b { color: var(--text-main); font-weight: 600; font-size: 0.98rem; }

.calc-actions { padding: 8px 28px 26px; background: #ffffff; }
.calc-disclaimer {
    padding: 16px 28px 24px;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.6;
    background: #ffffff;
    border-top: 1px solid var(--glass-border);
}

/* Dropdown Navigation */
.dropdown {
    position: relative;
    display: inline-block;
}
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #ffffff;
    min-width: 230px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
    z-index: 1;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    top: 100%;
    left: 0;
    overflow: hidden;
    padding: 6px 0;
}
.dropdown-content a {
    color: var(--text-main) !important;
    padding: 12px 18px;
    text-decoration: none;
    display: block;
    font-size: 0.95rem;
    transition: background 0.2s ease, color 0.2s ease;
}
.dropdown-content a:hover {
    background-color: var(--primary-cyan-light) !important;
    color: var(--primary-cyan) !important;
}
.dropdown:hover .dropdown-content {
    display: block;
}

/* AI Chatbot Styles */
.ai-chatbot-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Outfit', sans-serif;
}

.ai-chat-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-cyan), var(--secondary-blue));
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(255, 59, 48, 0.35);
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.ai-chat-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 30px rgba(255, 59, 48, 0.45);
}

.ai-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 360px;
    height: 520px;
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
    transform-origin: bottom right;
    transform: scale(0);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    pointer-events: none;
}
.ai-chat-window.active {
    transform: scale(1);
    opacity: 1;
    pointer-events: all;
}

.ai-chat-header {
    background: var(--bg-elevated);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ai-chat-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.ai-chat-header h3 i {
    color: var(--primary-cyan);
}
.ai-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s;
}
.ai-close-btn:hover {
    color: var(--text-main);
}

.ai-chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-bubble {
    max-width: 80%;
    padding: 0.8rem 1.2rem;
    border-radius: 15px;
    font-size: 0.95rem;
    line-height: 1.4;
    animation: fadeIn 0.3s ease forwards;
}
.chat-bubble.bot {
    background: var(--bg-elevated);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    align-self: flex-start;
    border-bottom-left-radius: 0;
}
.chat-bubble.user {
    background: linear-gradient(135deg, var(--primary-cyan), var(--secondary-blue));
    color: #ffffff;
    align-self: flex-end;
    border-bottom-right-radius: 0;
    font-weight: 600;
}

.ai-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.ai-quick-reply-btn {
    background: transparent;
    border: 1px solid var(--primary-cyan);
    color: var(--primary-cyan);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.ai-quick-reply-btn:hover {
    background: var(--primary-cyan-light);
}

.ai-chat-input-area {
    padding: 1rem;
    border-top: 1px solid var(--glass-border);
    background: #ffffff;
    display: flex;
    gap: 0.5rem;
}
.ai-chat-input {
    flex: 1;
    background: var(--bg-elevated);
    border: 1px solid var(--glass-border);
    padding: 0.8rem 1rem;
    border-radius: 20px;
    color: var(--text-main);
    outline: none;
    font-family: inherit;
}
.ai-chat-input:focus {
    border-color: var(--primary-cyan);
}
.ai-chat-send {
    background: var(--primary-cyan);
    color: #ffffff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
}
.ai-chat-send:hover {
    transform: scale(1.1);
}
.ai-typing-indicator {
    display: flex;
    gap: 4px;
    padding: 0.5rem;
}
.ai-typing-indicator span {
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}
.ai-typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.ai-typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Mobile Navigation Drawer */
.mobile-menu-toggle {
    display: none;
    font-size: 2rem;
    color: var(--text-main);
    cursor: pointer;
}

@media (max-width: 1024px) {

    .desktop-nav-cta {
        display: none !important;
    }
    .mobile-only-cta {
        display: block !important;
    }
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        z-index: 110;
    }
    
    .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        max-height: min(80vh, 100dvh);
        overflow-y: auto;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(12px);
        padding: 1.25rem 1.5rem 2rem;
        gap: 0.75rem;
        border-bottom: 1px solid var(--glass-border);
        box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
        transform: translateY(-120%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.3s ease, opacity 0.3s ease;
        z-index: 100;
        -webkit-overflow-scrolling: touch;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 0.75rem 0.5rem;
        min-height: 44px;
    }
    
    .dropdown-content {
        position: static;
        display: none;
        background: transparent;
        border: none;
        padding: 0.25rem 0 0.5rem;
        width: 100%;
        box-shadow: none;
    }
    
    .dropdown.open .dropdown-content,
    .dropdown:hover .dropdown-content {
        display: block;
    }

    body.menu-open {
        overflow: hidden;
    }
}

/* Subpage Hero Modifier */
.hero-subpage {
    min-height: auto !important;
    padding-top: 160px !important;
    padding-bottom: 4rem !important;
}

/* Accordion Dropdown FAQ Styling */
.faq-accordion {
    max-width: 850px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.faq-item:hover {
    border-color: var(--primary-cyan);
}

.faq-item[open] {
    border-color: var(--primary-cyan);
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.08);
}

.faq-summary {
    padding: 1.25rem 1.5rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.faq-summary::-webkit-details-marker {
    display: none;
}

.faq-summary::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--primary-cyan);
    transition: transform 0.3s ease;
    margin-left: 1rem;
    flex-shrink: 0;
}

.faq-item[open] .faq-summary::after {
    content: '−';
    transform: rotate(180deg);
}

.faq-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: var(--text-muted);
    line-height: 1.7;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
    margin-top: 0.25rem;
    padding-top: 1rem;
}

/* Full Width Cyan Banner */
.cyan-banner {
    background: linear-gradient(135deg, var(--primary-cyan), var(--secondary-blue));
    color: #ffffff;
    text-align: center;
    padding: 1.5rem 1rem;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Infinite Client Logo Slideshow Ticker */
.client-slider-wrapper {
    overflow: hidden;
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 0;
    mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.client-logos-track {
    display: flex;
    align-items: center;
    width: max-content;
    gap: 4rem;
    animation: logo-scroll 25s linear infinite;
}

.client-slider-wrapper:hover .client-logos-track {
    animation-play-state: paused;
}

@keyframes logo-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.client-logo-badge {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 64px;
    flex-shrink: 0;
}

.client-logo-badge img {
    height: 56px;
    max-width: 170px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.85;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.client-logo-badge img[src*="eskom"],
.client-logo-badge img[src*="bmsa"] {
    height: 72px;
    max-width: 220px;
    transform: scale(1.25);
}

.client-logo-badge:hover img {
    filter: grayscale(100%);
    opacity: 1;
}

.client-logo-badge:hover img[src*="eskom"],
.client-logo-badge:hover img[src*="bmsa"] {
    transform: scale(1.3);
}

/* Mobile Responsive Adjustments */
@media (max-width: 1024px) {
    html, body { overflow-x: hidden; }
    .container { width: 92%; }

    h1 { font-size: 2.15rem !important; line-height: 1.15; }
    h2 { font-size: 1.65rem !important; line-height: 1.25; }
    h3 { font-size: 1.25rem !important; }
    p { font-size: 1rem !important; line-height: 1.5; }

    nav { padding: 0.75rem 4%; }
    .logo { font-size: 1.1rem; }

    .hero { min-height: auto; padding-top: 96px !important; padding-bottom: 2.5rem !important; }
    .hero-subpage { padding-top: 110px !important; padding-bottom: 2rem !important; }
    section { padding: 3rem 0 !important; }
    .bottom-cta { padding: 3.5rem 0 !important; }

    .hero .container > div,
    .hero-content > div {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: wrap !important;
        gap: 1.25rem !important;
        align-items: stretch !important;
        width: 100%;
    }
    .hero-content, .hero-image, .hero-actions { width: 100%; max-width: 100%; }
    .hero-actions { flex-direction: column !important; }
    .hero-image { margin-top: 0; }
    .hero p { max-width: none; margin-left: 0; margin-right: 0; }

    .hero .cta-btn, .hero .cta-btn-secondary,
    .bottom-cta .cta-btn, .bottom-cta .cta-btn-secondary,
    .mobile-only-cta .cta-btn, .mobile-only-cta .cta-btn-secondary {
        width: 100%;
        text-align: center;
        justify-content: center;
        min-height: 48px;
        box-sizing: border-box;
    }

    img {
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain;
    }

    .services-grid, .two-col-layout, .footer-content, .grid-3, .features-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
        grid-template-columns: 1fr !important;
    }
    .features-grid { grid-template-columns: 1fr !important; }
    .feature-card, .tech-box, .service-item {
        flex: 1 1 100% !important;
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        padding: 1.5rem 1.25rem !important;
    }
    [style*="min-width"] { min-width: 0 !important; width: 100% !important; flex: 1 1 100% !important; }

    .footer-content { text-align: center; align-items: center; }
    .footer-col { min-width: 0 !important; width: 100%; }
    .footer-bottom {
        flex-direction: column !important;
        text-align: center;
        gap: 1rem;
    }
    .partner-links {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    .partner-links span.banner-part, .partner-links a { margin: 0 !important; }

    .cyan-banner {
        font-size: 0.85rem !important;
        padding: 0.85rem !important;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    .cyan-banner .banner-divider { display: none; }

    /* Estimator */
    .calculator .container > p,
    #estimator > .container > p { text-align: center; max-width: none !important; }
    .calc-grid {
        display: flex !important;
        flex-direction: column;
        gap: 1rem;
    }
    .calc-panel { padding: 1.25rem; overflow: hidden; }
    .calc-readout {
        order: -1;
        position: sticky;
        top: 62px;
        z-index: 30;
        overflow: hidden;
    }
    .calc-readout-scene {
        padding: 14px 16px 12px;
        min-height: 0;
    }
    .calc-readout-scene svg,
    .calc-scanline { display: none; }
    .calc-readout-total,
    #calc-total-display {
        font-size: 1.1rem !important;
        line-height: 1.35;
        word-break: break-word;
        overflow-wrap: anywhere;
    }
    .calc-breakdown, .calc-disclaimer { padding-left: 16px; padding-right: 16px; }
    .calc-bline { flex-wrap: wrap; gap: 0.25rem 0.75rem; }

    .wizard-progress {
        display: flex;
        justify-content: space-between;
        gap: 0.4rem;
        margin-bottom: 1rem;
    }
    .wizard-progress::before { display: none; }
    .wizard-step {
        flex: 1 1 auto;
        width: 36px;
        max-width: 42px;
        height: 36px;
        padding: 0 !important;
        font-size: 0 !important;
        line-height: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
    }
    .wizard-step::before {
        content: attr(data-step);
        font-size: 0.8rem;
        font-weight: 700;
    }

    .calc-field-row[style*="display:flex"],
    .calc-dates {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    .calc-deliv-grid { grid-template-columns: 1fr !important; }

    input:not([type="checkbox"]):not([type="radio"]),
    textarea, select {
        width: 100% !important;
        font-size: 16px !important;
        max-width: 100%;
    }
    input[type="checkbox"], input[type="radio"] {
        width: 20px !important;
        height: 20px !important;
        min-width: 20px;
        flex-shrink: 0;
        margin: 0;
    }
    .area-unknown-row {
        display: flex;
        align-items: flex-start;
        gap: 10px;
    }
    .area-unknown-row label {
        flex: 1;
        white-space: normal;
    }
    select { text-overflow: ellipsis; }

    .wizard-nav {
        gap: 0.75rem;
        flex-wrap: wrap;
        position: sticky;
        bottom: 0;
        background: #ffffff;
        padding-top: 0.85rem;
        margin-top: 1rem;
        z-index: 5;
    }
    .wizard-btn-prev, .wizard-btn-next {
        min-height: 48px;
        flex: 1;
        text-align: center;
    }

    .ai-chatbot-widget { right: 16px; bottom: 16px; }
    .ai-chat-window {
        width: min(350px, calc(100vw - 24px));
        height: min(500px, calc(100dvh - 100px));
        right: 0;
        bottom: 72px;
    }
}
