/* ========================================
   MUKI SOLUTION - PAPER KIT THEME
   Colors, type and component accents tuned to match Paper Kit 2's design
   language (loaded via wwwroot/lib/paper-kit). Most components (.card,
   .btn-primary, .btn-outline-primary, .title, .page-header, ...) now come
   straight from paper-kit.min.css / bootstrap.min.css (BS4) - this file only
   supplies the brand palette, the page furniture Paper Kit doesn't ship
   (navbar gradient, hero, footer, chat widget, stat counters, timeline) and
   a couple of small Bootstrap 5 utility-class shims still present in markup.
   ======================================== */

/* Root Variables - hex values pulled straight from paper-kit.css itself
   (not invented): #0b1011 is Paper Kit's own .section-dark background,
   #51cbce/#51bcda/#6bd098/#fbc658/#f5593d are its btn-primary/info/success/
   warning/danger colors. No navy - that was never part of this kit. */
:root {
    --primary-color: #0b1011;
    --secondary-color: #51cbce;
    --secondary-color-light: #7ad9db;
    --accent-info: #51bcda;
    --brand-blue: #1a73f8;
    --brand-blue-light: #3d8bff;
    --brand-blue-dark: #0648c0;
    --accent-success: #6bd098;
    --accent-warning: #fbc658;
    --accent-danger: #f5593d;
    --dark-bg: #0b1011;
    --light-bg: #f4f3ef;
    --text-dark: #333333;
    --text-light: #6c757d;
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --font-display: 'Montserrat', 'Helvetica', Arial, sans-serif;
}

/* ========================================
   BOOTSTRAP 4 COMPATIBILITY SHIMS
   The site runs on Paper Kit's Bootstrap 4 build; a handful of Bootstrap 5
   utility class names (me-*, ms-*, fs-*, fw-*, gap-*, form-label) remain in
   the markup because they read identically either way. These rules give
   them the same visual result BS5 would have produced.
   ======================================== */
.me-0, .ms-0, .pe-0, .ps-0 { margin: 0 !important; }
.me-1 { margin-right: .25rem !important; }
.me-2 { margin-right: .5rem !important; }
.me-3 { margin-right: 1rem !important; }
.me-4 { margin-right: 1.5rem !important; }
.me-5 { margin-right: 3rem !important; }
.me-auto { margin-right: auto !important; }
.ms-1 { margin-left: .25rem !important; }
.ms-2 { margin-left: .5rem !important; }
.ms-3 { margin-left: 1rem !important; }
.ms-4 { margin-left: 1.5rem !important; }
.ms-5 { margin-left: 3rem !important; }
.ms-auto { margin-left: auto !important; }
.pe-1 { padding-right: .25rem !important; }
.pe-2 { padding-right: .5rem !important; }
.pe-3 { padding-right: 1rem !important; }
.ps-1 { padding-left: .25rem !important; }
.ps-2 { padding-left: .5rem !important; }
.ps-3 { padding-left: 1rem !important; }

.fs-1 { font-size: 2.5rem !important; }
.fs-2 { font-size: 2rem !important; }
.fs-3 { font-size: 1.75rem !important; }
.fs-4 { font-size: 1.5rem !important; }
.fs-5 { font-size: 1.25rem !important; }
.fs-6 { font-size: 1rem !important; }

.fw-light { font-weight: 300 !important; }
.fw-normal { font-weight: 400 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }
.fw-bolder { font-weight: bolder !important; }

.gap-0 { gap: 0 !important; }
.gap-1 { gap: .25rem !important; }
.gap-2 { gap: .5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }
.gap-5 { gap: 3rem !important; }

.form-label {
    display: inline-block;
    margin-bottom: .5rem;
}

/* Bootstrap 4's ".text-warning"/".bg-warning" are compiled to a hardcoded
   amber (#ffc107), unlike BS5 which reads a CSS variable. The markup still
   uses text-warning as "the accent color" (hero highlight, footer headings),
   so repoint it at the brand blue instead of leaving it amber. */
.text-warning {
    color: var(--brand-blue) !important;
}

/* Base Styles */
html {
    font-size: 14px;
    scroll-behavior: smooth;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: var(--font-display);
    font-weight: 300;
    color: var(--text-dark);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6,
.btn,
.nav-link,
.stat-number {
    font-family: var(--font-display);
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
}

main {
    margin-top: 102px;
    flex: 1 0 auto;
}

/* Navbar Styles */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 25px 0;
    background: #ffffff !important;
}

/* Widen just the navbar's inner container so menu items get more breathing
   room than the page's own .container (used by section content below). */
.navbar .container {
    max-width: 1320px;
}

/* Paper Kit's own ".navbar .navbar-brand" carries padding:20px 15px and
   margin:5px 0 (a hangover from its all-caps text-logo style), which blew
   the bar up to ~120px tall around our 34px image logo. Its compound
   selector out-specifies a plain .navbar-brand rule, so this needs
   !important to actually win and hug the logo's own height instead. */
.navbar-brand {
    padding: 0 !important;
    margin: 0 !important;
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
}

.navbar-brand:hover {
    transform: scale(1.05);
}

/* Brand mark (navbar + footer): the logo's navy text needs a light plate to
   stay legible on the dark footer, but the navbar is white now, so it gets
   no plate there - plain logo straight on white. */
.brand-mark {
    display: inline-flex;
    align-items: center;
}

.site-footer .brand-mark {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 6px 10px;
}

.brand-logo-img {
    display: block;
    width: auto;
}

/* Paper Kit animates the mobile hamburger icon into an X over 0.5s on
   .toggled; since a nav-link click triggers a full page reload at the same
   time (see site.js), that animation gets cut off mid-play and just looks
   like a glitch. Disabled instead of shortened. */
.toggled .bar1,
.toggled .bar2,
.toggled .bar3 {
    animation: none !important;
}

/* Paper Kit's own ".navbar-nav .nav-item .nav-link" rule adds
   margin:15px 3px + padding:10px 15px (sized for its all-caps text-brand
   navbar), which was stretching every .nav-item - and so the whole bar -
   to ~70px tall regardless of the .navbar-brand fix above. Its compound
   selector needs !important to lose here too. */
.nav-link {
    font-weight: 600;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin: 0 0.5rem !important;
    padding: 0.5rem 0 !important;
    position: relative;
    transition: var(--transition);
    color: var(--text-dark) !important;
}

.nav-link:hover,
.nav-link:focus {
    color: var(--brand-blue) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--brand-blue);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.nav-link-cta::after {
    display: none;
}

.nav-link-cta {
    background: var(--brand-blue);
    border-radius: 30px;
    padding: 0.5rem 1.5rem !important;
    margin-left: 1rem;
    color: #fff !important;
}

.nav-link-cta:hover,
.nav-link-cta:focus {
    background: var(--brand-blue-dark);
    color: #fff !important;
    transform: translateY(-2px);
}

/* Page headers (hero banners) use Paper Kit's native .page-header/.filter/
   .content-center/.title/.description markup directly. paper-kit.min.css
   handles the white title/description and the filter overlay; this just
   swaps the default grey background-image placeholder for a brand gradient
   built from the kit's own dark (#0b1011) and primary (#51cbce) colors, in
   one place instead of repeating an inline style on every page. Floating
   squares give it the kit's signature decorative motif. */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1c2427 55%, var(--brand-blue) 150%);
}

.page-header::before,
.page-header::after {
    content: '';
    position: absolute;
    border: 3px solid rgba(255, 255, 255, 0.12);
    pointer-events: none;
    z-index: 2;
}

.page-header::before {
    width: 220px;
    height: 220px;
    top: 15%;
    right: 8%;
    transform: rotate(25deg);
}

.page-header::after {
    width: 140px;
    height: 140px;
    bottom: 10%;
    left: 6%;
    transform: rotate(-15deg);
    border-color: rgba(255, 255, 255, 0.2);
}

/* In-page section titles (Paper Kit's own .title/.description classes,
   colored to match the brand). Inside .section-dark, paper-kit's own rules
   already force these white and win over this. */
.section .title {
    font-weight: 700;
    color: var(--primary-color);
}

/* Card visuals (rounded corners, shadow, hover lift) come from Paper Kit's
   own .card rules; this file only supplies the pieces Paper Kit has no
   built-in class for. */

/* Services page: circular icon showcase on each service card */
.service-icon-showcase {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--brand-blue) 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 30px rgba(11, 16, 17, 0.3);
}

.service-icon-showcase i {
    font-size: 2.75rem;
    color: white;
}

.service-card ul li {
    color: var(--text-light);
}

/* The markup uses Bootstrap 5's "row g-*" gutter classes, but this site runs
   Bootstrap 4 (see the compatibility shims above) where g-* does nothing -
   the columns get their default horizontal padding but no vertical gap, so
   stacked cards/fields touched (or overlapped) with 0px between them.
   margin-bottom on the child itself doesn't help here (the column is
   stretched to a fixed height by the flex row, so the child's margin has no
   line to push into); row-gap on the flex row itself is what actually
   separates the wrapped lines. Covers every "row g-*" size used site-wide
   (cards grids as well as stacked form fields like the Contact page). */
.row.g-3 {
    row-gap: 1rem;
}

.row.g-4 {
    row-gap: 1.5rem;
}

.row.g-5 {
    row-gap: 3rem;
}

.card-icon {
    font-size: 3rem;
    color: var(--brand-blue);
    margin-bottom: 1rem;
}

.card-title {
    color: var(--primary-color);
    font-weight: 600;
}

.card-body {
    margin-bottom: 1rem;
}

/* Paper Kit's own .alert-info is a cyan (#6ec7e0) tied to its --accent-info
   palette, not the site's blue brand color. Overridden to a blue tint so
   info alerts read as "blue" like the rest of the brand accents. */
.alert-info {
    color: var(--brand-blue-dark);
    background-color: rgba(26, 115, 248, 0.12);
    border-color: rgba(26, 115, 248, 0.25);
}

/* Bootstrap's own .bg-primary is a hardcoded #007bff !important, unrelated
   to the brand palette - repointed at the logo blue like everything else. */
.bg-primary {
    background-color: var(--brand-blue) !important;
}

/* Buttons: Paper Kit ships .btn-primary/.btn-outline-primary/.btn-secondary
   in its own teal palette; these overrides swap that for the blue from the
   Muki Solution logo instead. This also makes every button pill-shaped
   (Paper Kit's .btn-round, applied globally). */
.btn {
    border-radius: 30px;
}

.btn-primary,
.btn-secondary {
    background-color: var(--brand-blue);
    border-color: var(--brand-blue);
    color: #fff;
}

/* Paper Kit's own ".btn-primary:not(:disabled):not(.disabled).active" (e.g.
   the selected filter pill on the Case Studies page) chains 4 class-level
   selectors carrying its teal #34b5b8, out-specifying both the plain
   ".btn-primary" rule above and an equal-specificity ".btn-primary.active"
   restatement - needs !important to actually win. */
.btn-primary.active {
    background-color: var(--brand-blue) !important;
    border-color: var(--brand-blue) !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.dropdown-toggle,
.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active {
    background-color: var(--brand-blue-dark) !important;
    border-color: var(--brand-blue-dark) !important;
    color: #fff !important;
}

/* Paper Kit hard-codes its own colors for the disabled state
   (.btn:disabled, .btn-primary:disabled) at higher specificity than the
   plain .btn-primary/.btn-secondary rules above, so a disabled chat/offer
   button was falling back to Paper Kit's grey/teal instead of the brand
   blue - restated here to win over it. */
.btn-primary:disabled,
.btn-primary.disabled,
.btn-secondary:disabled,
.btn-secondary.disabled {
    background-color: var(--brand-blue) !important;
    border-color: var(--brand-blue) !important;
    color: #fff !important;
}

.btn-primary.btn-link {
    color: var(--brand-blue);
}

/* Paper Kit gives .icon-primary/info/success/warning/danger a different
   color each (teal/cyan/green/yellow/red) for the "Why Choose Us" and
   service feature icons - swapped for one consistent brand blue instead. */
.icon-primary,
.icon-info,
.icon-success,
.icon-warning,
.icon-danger {
    color: var(--brand-blue) !important;
}

.btn-outline-primary {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary.dropdown-toggle {
    background-color: var(--brand-blue) !important;
    border-color: var(--brand-blue) !important;
    color: #fff !important;
}

/* Technology Badge */
.tech-badge {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    background: var(--light-bg);
    border-radius: 20px;
    transition: var(--transition);
}

.tech-badge:hover {
    background: var(--brand-blue);
    color: white;
    transform: scale(1.05);
}

/* Stats Counter */
.stat-box {
    text-align: center;
    padding: 2rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--brand-blue);
    display: block;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Footer Styles */
.site-footer {
    background: var(--dark-bg) !important;
    width: 100%;
    flex-shrink: 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    color: #f8f9fa !important;
}

.site-footer * {
    color: #f8f9fa !important;
}

.site-footer h5,
.site-footer h6 {
    font-weight: 600;
    color: var(--brand-blue) !important;
}

.site-footer .text-warning {
    color: var(--brand-blue) !important;
}

.site-footer .text-muted {
    color: #adb5bd !important;
}

.site-footer p,
.site-footer li,
.site-footer a {
    color: #adb5bd !important;
}

.site-footer a {
    transition: var(--transition);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--brand-blue) !important;
    padding-left: 5px;
}

.social-links a {
    display: inline-block;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--brand-blue) !important;
    transform: translateY(-3px);
}

/* Nav user greeting: cap width so a long email can't blow out the navbar. */
.nav-user-greeting {
    display: inline-block;
    max-width: 160px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    vertical-align: middle;
}

/* AI Offer Chat */
.ai-offer-card {
    /* .card defaults to height:100% for equal-height grid rows elsewhere; these two
       cards are stacked (not a grid), so let each size to its own content instead. */
    height: auto;
}

.chat-window {
    height: 420px;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--light-bg);
}

.chat-message {
    display: flex;
    max-width: 80%;
}

.chat-message.user {
    align-self: flex-end;
    justify-content: flex-end;
}

.chat-message.assistant {
    align-self: flex-start;
}

.chat-bubble {
    padding: 0.65rem 1rem;
    border-radius: 16px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.chat-message.user .chat-bubble {
    background: var(--brand-blue);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.assistant .chat-bubble {
    background: white;
    color: var(--text-dark);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    border-bottom-left-radius: 4px;
}

/* Contact Form */
.form-control,
.form-select {
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 0.2rem rgba(26, 115, 248, 0.15);
}

/* Timeline */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--brand-blue);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-icon {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: var(--brand-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 1s ease;
}

.fade-in-up {
    animation: fadeInUp 1s ease;
}

/* Utilities */
.text-primary-custom {
    color: var(--primary-color) !important;
}

.text-secondary-custom {
    color: var(--brand-blue) !important;
}

.bg-primary-custom {
    background: var(--primary-color) !important;
}

.bg-secondary-custom {
    background: var(--brand-blue) !important;
}

.bg-light-custom {
    background: var(--light-bg) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .page-header .title {
        font-size: 2.5rem;
    }

    .section .title {
        font-size: 2rem;
    }

    .timeline::before {
        left: 30px;
    }

    .timeline-icon {
        left: 30px;
    }
}

/* Focus States */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--brand-blue);
}
