:root {
    /* NEW BLUE GRADIENT THEME */
    --primary-color: #0583CC;
    --primary-dark: #046ba3;
    --primary-light: #1696F7;
    --primary-gradient: linear-gradient(135deg, #0583CC 0%, #1696F7 100%);
    --primary-gradient-reverse: linear-gradient(135deg, #1696F7 0%, #0583CC 100%);
    
    --secondary-color: #ffffff;
    --text-dark: #1a1a1a;
    --text-light: #555555;
    --bg-light: #f0f7ff;
    --bg-white: #ffffff;
    --accent: #e3f2fd;
    --shadow: 0 4px 20px rgba(5, 131, 204, 0.15);
    --shadow-hover: 0 12px 35px rgba(5, 131, 204, 0.25);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--secondary-color);
}

/* ===== HEADER & NAVBAR ===== */
header {
    background: var(--secondary-color);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo img {
    height: 50px;
    width: auto;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== HERO SECTION ===== */
.hero {
    background: var(--primary-gradient);
    color: var(--secondary-color);
    padding: 180px 5% 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.98;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(5, 131, 204, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.btn-outline:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* ===== SECTIONS ===== */
.section {
    padding: 80px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.section-title p {
    color: var(--text-light);
    max-width: 600px;
    margin: 1.5rem auto 0;
}

/* ===== SERVICES GRID ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 4px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 15px rgba(5, 131, 204, 0.3);
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.service-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.service-card ul {
    list-style: none;
    margin-top: 1rem;
}

.service-card ul li {
    padding: 0.3rem 0;
    color: var(--text-light);
    font-size: 0.9rem;
    position: relative;
    padding-left: 1.2rem;
}

.service-card ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* ===== STATS SECTION ===== */
.stats-section {
    background: var(--primary-gradient);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    position: relative;
    z-index: 2;
}

.stat-item {
    padding: 1.5rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    display: block;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* ===== ACHIEVEMENTS ===== */
.achievement-card {
    background: var(--bg-light);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    max-width: 500px;
    margin: 0 auto;
    border-left: 4px solid var(--primary-color);
}

.achievement-badge {
    background: var(--primary-gradient);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    display: inline-block;
    font-weight: 600;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(5, 131, 204, 0.3);
}

/* ===== TRAINING PROGRAMS ===== */
.training-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.training-category {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.training-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.category-header {
    background: var(--primary-gradient);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.category-header h3 {
    font-size: 1.4rem;
}

.category-body {
    padding: 1.5rem;
}

.category-body ul {
    list-style: none;
}

.category-body ul li {
    padding: 0.5rem 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-body ul li:last-child {
    border-bottom: none;
}

.category-body ul li::before {
    content: '📚';
}

/* ===== CONTACT SECTION ===== */
.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.contact-info {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 15px;
    border-left: 4px solid var(--primary-color);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.contact-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.contact-icon {
    width: 45px;
    height: 45px;
    background: var(--primary-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(5, 131, 204, 0.25);
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    background: #fafafa;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(5, 131, 204, 0.1);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* ===== FOOTER ===== */
footer {
    background: linear-gradient(180deg, var(--primary-dark) 0%, #035a8c 100%);
    color: white;
    padding: 60px 5% 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
    color: white;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-light);
    border-radius: 2px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section ul li a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section ul li a:hover {
    color: white;
    padding-left: 5px;
}

.footer-section ul li a i {
    color: var(--primary-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
}

.footer-bottom a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 500;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: white;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1.5rem;
        transition: var(--transition);
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        z-index: 999;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 150px 5% 80px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .section {
        padding: 60px 5%;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .btn {
        padding: 10px 25px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 1rem 4%;
    }
    
    .logo-text {
        font-size: 1.2rem;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }
    
    .section-title h2 {
        font-size: 1.75rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }

/* ===== UTILITY CLASSES ===== */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient {
    background: var(--primary-gradient);
}

.shadow-blue {
    box-shadow: var(--shadow);
}

.shadow-blue-hover:hover {
    box-shadow: var(--shadow-hover);
}

/* ===== CLIENT LOGOS CAROUSEL ===== */
.clients-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 2rem 0;
    background: var(--bg-light);
}

.clients-track {
    display: flex;
    width: max-content;
    animation: scrollLeft 40s linear infinite;
}

.clients-carousel:hover .clients-track {
    animation-play-state: paused;
}

.clients-row {
    display: flex;
    align-items: center;
    gap: 3rem;
    padding: 0 2rem;
}

.client-logo {
    flex: 0 0 auto;
    width: 160px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    /*filter: grayscale(100%) opacity(0.7);*/
}

.client-logo:hover {
    filter: grayscale(0%) opacity(1);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.client-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: var(--transition);
}

/* Placeholder for missing logos */
.logo-placeholder {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
    text-align: center;
    padding: 0.5rem;
}

/* Infinite Scroll Animation */
@keyframes scrollLeft {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .clients-track {
        animation: none;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 2rem;
    }
    
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .clients-row {
        gap: 2rem;
    }
    .client-logo {
        width: 140px;
        height: 80px;
    }
}

@media (max-width: 768px) {
    .clients-row {
        gap: 1.5rem;
    }
    .client-logo {
        width: 120px;
        height: 70px;
        padding: 0.8rem;
    }
    .logo-placeholder {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .clients-row {
        gap: 1rem;
        padding: 0 1rem;
    }
    .client-logo {
        width: 100px;
        height: 60px;
    }
    .section-title h2 {
        font-size: 1.8rem;
    }
}

/* Placeholder for missing logos */
.logo-placeholder {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
    text-align: center;
    padding: 0.5rem;
}

/* Infinite Scroll Animation */
@keyframes scrollLeft {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .clients-track {
        animation: none;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 2rem;
    }
    .client-logo {
        filter: grayscale(0%) opacity(1);
    }
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .clients-row {
        gap: 2rem;
    }
    .client-logo {
        width: 120px;
        height: 70px;
    }
}

@media (max-width: 768px) {
    .clients-row {
        gap: 1.5rem;
    }
    .client-logo {
        width: 100px;
        height: 60px;
        padding: 0.6rem;
    }
    .logo-placeholder {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .clients-row {
        gap: 1rem;
        padding: 0 1rem;
    }
    .client-logo {
        width: 90px;
        height: 55px;
    }
    .section-title h2 {
        font-size: 1.8rem;
    }
}

/* Dual Row Variant (Optional - for more logos) */
.clients-carousel.dual-row .clients-track {
    flex-direction: column;
    gap: 2rem;
}

.clients-carousel.dual-row .clients-row:nth-child(2) {
    animation: scrollRight 40s linear infinite;
}

@keyframes scrollRight {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* ===== KDI AI CHATBOT ===== */
.kdi-chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: 'Inter', sans-serif;
}

/* Toggle Button */
.kdi-chat-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0583CC 0%, #1696F7 100%);
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(5, 131, 204, 0.35);
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kdi-chat-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 25px rgba(5, 131, 204, 0.45);
}
.kdi-chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}
.kdi-chat-widget.open .kdi-chat-badge { display: none; }

/* Chat Window */
.kdi-chat-window {
  position: absolute;
  bottom: 75px;
  right: 0;
  width: 380px;
  height: 520px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 15px 50px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.kdi-chat-widget.open .kdi-chat-window {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Header */
.kdi-chat-header {
  background: linear-gradient(135deg, #0583CC 0%, #1696F7 100%);
  color: white;
  padding: 1rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.kdi-chat-header-info {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.kdi-chat-avatar {
  width: 42px;
  height: 42px;
  background: rgba(255,255,255,0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  backdrop-filter: blur(5px);
}
.kdi-chat-header-info h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}
.kdi-chat-status {
  font-size: 0.8rem;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.status-dot {
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.kdi-chat-header-actions {
  display: flex;
  gap: 0.5rem;
}
.kdi-chat-action, .kdi-chat-close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}
.kdi-chat-action:hover, .kdi-chat-close:hover {
  background: rgba(255,255,255,0.35);
}

/* Messages Area */
.kdi-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #f8fafc;
}
.kdi-chat-messages::-webkit-scrollbar { width: 6px; }
.kdi-chat-messages::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

.kdi-message {
  max-width: 85%;
  animation: fadeInUp 0.3s ease;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.kdi-message.kdi-bot { align-self: flex-start; }
.kdi-message.kdi-user { align-self: flex-end; }

.kdi-message-content {
  padding: 0.9rem 1.1rem;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.5;
  white-space: pre-line;
}
.kdi-bot .kdi-message-content {
  background: white;
  color: #1e293b;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border-bottom-left-radius: 4px;
}
.kdi-user .kdi-message-content {
  background: linear-gradient(135deg, #0583CC, #1696F7);
  color: white;
  border-bottom-right-radius: 4px;
}

/* Quick Replies */
.kdi-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.kdi-quick-reply {
  background: white;
  border: 1.5px solid #0583CC;
  color: #0583CC;
  padding: 0.5rem 0.9rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.kdi-quick-reply:hover {
  background: #0583CC;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(5, 131, 204, 0.2);
}

/* Input Area */
.kdi-chat-input-area {
  padding: 1rem;
  background: white;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 0.8rem;
  align-items: center;
}
#kdiChatInput {
  flex: 1;
  padding: 0.8rem 1rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 50px;
  font-size: 0.95rem;
  outline: none;
  transition: 0.2s;
}
#kdiChatInput:focus {
  border-color: #0583CC;
  box-shadow: 0 0 0 3px rgba(5, 131, 204, 0.1);
}
#kdiChatSend {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0583CC, #1696F7);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
  flex-shrink: 0;
}
#kdiChatSend:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(5, 131, 204, 0.3);
}
#kdiChatSend:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Typing Indicator */
.kdi-typing {
  display: flex;
  gap: 4px;
  padding: 0.8rem 1.1rem;
  background: white;
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  width: fit-content;
}
.kdi-typing span {
  width: 8px;
  height: 8px;
  background: #94a3b8;
  border-radius: 50%;
  animation: typing 1.4s infinite;
}
.kdi-typing span:nth-child(2) { animation-delay: 0.2s; }
.kdi-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* Human Handoff Card */
.kdi-handoff {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border: 1.5px solid #0583CC;
  border-radius: 16px;
  padding: 1rem;
  text-align: center;
  margin-top: 0.5rem;
}
.kdi-handoff h5 { margin: 0 0 0.5rem; color: #0583CC; }
.kdi-handoff p { font-size: 0.9rem; color: #475569; margin: 0 0 0.8rem; }
.kdi-handoff-buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}
.kdi-handoff-btn {
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: 0.2s;
}
.kdi-handoff-btn.primary {
  background: #0583CC;
  color: white;
}
.kdi-handoff-btn.secondary {
  background: white;
  color: #0583CC;
  border: 1.5px solid #0583CC;
}
.kdi-handoff-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(5,131,204,0.2); }

/* Responsive */
@media (max-width: 480px) {
  .kdi-chat-window {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
  }
  .kdi-chat-toggle {
    bottom: 20px;
    right: 20px;
  }
}