:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --dark: #0f172a;
    --light: #f8fafc;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--dark);
    background: #0a0a0a;
}

/* New Creative Background */
#particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.particle {
    position: absolute;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 50%;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.particle::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary), transparent);
    opacity: 0.3;
}

/* Add this to the existing styles */
.glow {
    position: fixed;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle,
            rgba(37, 99, 235, 0.1) 0%,
            rgba(37, 99, 235, 0.05) 30%,
            transparent 70%);
    pointer-events: none;
    z-index: -1;
    transition: all 0.5s ease;
    opacity: 0.5;
}

/* Simplified Navigation Styles */
.navbar {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(10, 10, 10, 0.98);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 600;
    color: white !important;
    text-decoration: none;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    color: var(--primary) !important;
}

.navbar-nav {
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    padding: 0.75rem 1.5rem !important;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    color: var(--primary) !important;
    background: rgba(37, 99, 235, 0.1);
}

/* Simplified Mobile Navigation */
.hamburger-icon {
    width: 30px;
    height: 20px;
    position: relative;
    cursor: pointer;
}

.hamburger-icon span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: white;
    border-radius: 2px;
    transition: .3s ease-in-out;
}

.hamburger-icon span:nth-child(1) { top: 0; }
.hamburger-icon span:nth-child(2) { top: 8px; }
.hamburger-icon span:nth-child(3) { top: 16px; }

.navbar-toggler.active .hamburger-icon span:nth-child(1) {
    top: 8px;
    transform: rotate(45deg);
}

.navbar-toggler.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
}

.navbar-toggler.active .hamburger-icon span:nth-child(3) {
    top: 8px;
    transform: rotate(-45deg);
}

@media (max-width: 991px) {
    .navbar-toggler {
        display: block;
        border: none;
        background: transparent;
        padding: 0;
        margin-left: auto;
        z-index: 1000;
    }

    .navbar-collapse {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(10px);
        padding: 80px 30px 30px;
        transition: 0.3s ease-in-out;
        z-index: 999;
    }

    .navbar-collapse.show {
        right: 0;
    }

    .navbar-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .nav-link {
        font-size: 1.2rem;
        padding: 15px 0 !important;
        width: 100%;
    }
}

/* Add scroll effect */
@media (min-width: 992px) {
    .navbar.scrolled .navbar-brand {
        font-size: 1.6rem;
    }
    
    .navbar.scrolled .nav-link {
        padding: 0.5rem 1.2rem !important;
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(45deg, #fff, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
}

/* Mobile Hero Section Styles */
@media (max-width: 991px) {
    .hero {
        padding-top: 100px; /* Add padding to account for fixed navbar */
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .hero .btn:last-child {
        margin-bottom: 0;
    }
    
    .hero .btn.ms-3 {
        margin-left: 0 !important; /* Override Bootstrap margin on mobile */
    }
}

@media (max-width: 576px) {
    .hero {
        padding-top: 80px; /* Adjust padding for smaller screens */
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero .lead {
        font-size: 1rem;
    }
}

/* Team Section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    padding: 4rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

.team-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 2.5rem;
    color: white;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.team-card:hover {
    transform: translateY(-5px);
    background: rgba(10, 10, 10, 0.95);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.2);
}

.team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right,
            rgba(37, 99, 235, 0.2),
            transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.team-card:hover::before {
    opacity: 1;
}

.team-image-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(45deg, var(--primary), var(--primary-dark));
    padding: 3px;
}

.team-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background-color: #1a1a1a;
}

.team-card h3 {
    color: white;
    margin-bottom: 0.5rem;
}

.team-position {
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 1rem;
}

.team-bio {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.social-link {
    color: var(--primary);
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.social-link:hover {
    transform: translateY(-3px);
}

/* Features Section */
.features {
    padding: 8rem 0;
    color: white;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2rem;
    height: 100%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(10, 10, 10, 0.95);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.2);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right,
            rgba(37, 99, 235, 0.2),
            transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
    color: white;
}

.section-header h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #fff, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Enhanced Background Effects */
.creative-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.gradient-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.15;
    background: var(--primary);
    animation: sphereFloat 20s infinite;
}

.geometric-shape {
    position: absolute;
    border: 1px solid rgba(37, 99, 235, 0.2);
    opacity: 0.1;
    transform-origin: center;
    animation: rotate 30s linear infinite;
}

.particle-connection {
    position: absolute;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    height: 1px;
    transform-origin: left;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@keyframes sphereFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(5%, 10%) scale(1.1);
    }

    50% {
        transform: translate(-5%, -5%) scale(0.9);
    }

    75% {
        transform: translate(-10%, 5%) scale(1.05);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Neural Background */
.neural-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Add media query for responsiveness */
@media (max-width: 992px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .team-grid {
        grid-template-columns: 1fr;
    }
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 2rem 0;
}

.feature-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 2.5rem;
    color: white;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(10, 10, 10, 0.95);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.2);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right,
            rgba(37, 99, 235, 0.1),
            transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
}

.feature-card p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

@media (max-width: 992px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }
}

html {
    scroll-behavior: smooth;
}

/* Add padding-top to sections to account for fixed navbar */
section {
    padding-top: 80px;
    margin-top: -80px;
}

/* Style for contact section */
.contact-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-primary {
    background: var(--primary);
    border: none;
    padding: 1rem 2rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.modal-content {
    background: rgba(26, 26, 26, 0.95) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal .form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.8rem;
}

.modal .form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.25);
    color: white;
}

.modal .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Animation Section Styles */
.animation-section {
    padding: 60px 0 40px 0; /* Reduced bottom padding from 80px to 40px */
}

.animation-title {
    color: white;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.animation-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    margin-bottom: 2rem; /* Add space before video */
}

/* Updated Data Flow Video Animation Styles */
#data-flow-animation {
    position: relative;
    width: 100%;
    height: 450px; /* Reduced height to prevent overlap */
    background: #0a0f1c; /* Dark blue/navy to match video background */
    border-radius: 16px;
    padding: 0; /* Remove padding to make video full width */
    /* Removed box-shadow for cleaner look */
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden; /* This clips the video to rounded corners */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 40px auto; /* Add bottom margin */
}

#data-flow-animation::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, 
        rgba(37, 99, 235, 0.05) 0%, 
        rgba(124, 58, 237, 0.05) 50%, 
        rgba(37, 99, 235, 0.05) 100%);
    z-index: -1;
    border-radius: 16px;
}

.video-container {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
}

.animation-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0; /* No border-radius on video */
    opacity: 0;
    animation: fadeInVideo 1s ease 0.5s forwards;
}

/* Animation keyframes */
@keyframes fadeInVideo {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Add top margin to features section */
.why-choose-us {
    margin-top: 60px; /* Add separation from animation section */
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .animation-section {
        padding: 40px 0 30px 0; /* Reduced bottom padding */
    }
    
    .why-choose-us {
        margin-top: 40px;
    }
    
    #data-flow-animation {
        height: 350px;
        margin-bottom: 20px; /* Reduced margin */
    }
    
    .animation-title {
        font-size: 1.5rem;
    }
    
    .animation-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 576px) {
    .animation-section {
        padding: 30px 0 20px 0; /* Reduced bottom padding */
    }
    
    .why-choose-us {
        margin-top: 30px;
    }
    
    #data-flow-animation {
        height: 300px;
        padding: 0; /* Remove padding on mobile too */
        margin-bottom: 15px; /* Reduced margin */
    }
    
    .animation-title {
        font-size: 1.3rem;
    }
    
    .animation-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
}

/* Ensure video plays smoothly */
.animation-video::-webkit-media-controls {
    display: none !important;
}

.animation-video::-webkit-media-controls-panel {
    display: none !important;
}

.animation-video::-webkit-media-controls-play-button {
    display: none !important;
}

.animation-video::-webkit-media-controls-start-playback-button {
    display: none !important;
}

/* Hide animation section on mobile */
@media (max-width: 767px) {
    .animation-section {
        display: none; /* Completely hide video animation on mobile */
    }
}

/* Live Demo Button Animation */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4), 0 0 20px rgba(255, 107, 53, 0.2);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 8px 25px rgba(255, 107, 53, 0.6), 0 0 30px rgba(255, 107, 53, 0.4);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4), 0 0 20px rgba(255, 107, 53, 0.2);
        transform: scale(1);
    }
}

/* Hover effect for Live Demo button */
a[href="https://demo.containai.ge"]:hover {
    background: linear-gradient(45deg, #ff5722, #e91e63, #ff9800) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 35px rgba(255, 107, 53, 0.8) !important;
}

/* Live Demo Button - Only override visual styling, keep Bootstrap sizing */
#live-demo-button {
    background: linear-gradient(45deg, #ff6b35, #f7931e, #ffcc02) !important;
    border: none !important;
    color: white !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4) !important;
    animation: pulse-glow 2s infinite !important;
    outline: none !important;
    position: relative;
    overflow: visible;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 160px; /* keep width consistent */
    white-space: nowrap; /* prevent wrapping */
}

#live-demo-button:hover,
#live-demo-button:active {
    background: linear-gradient(45deg, #ff5722, #e91e63, #ff9800) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 35px rgba(255, 107, 53, 0.8) !important;
    color: white !important;
    outline: none !important;
    border: none !important;
}

/* Prevent focus from sticking hover styles */
#live-demo-button:focus {
    outline: none !important;
}

#live-demo-button:not(:hover):focus {
    transform: none !important;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4) !important;
}

/* Demo Section Styles */
.demo-section {
    background: linear-gradient(135deg, 
        rgba(15, 23, 42, 0.95) 0%, 
        rgba(30, 41, 59, 0.95) 50%, 
        rgba(15, 23, 42, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-top: 2px solid rgba(37, 99, 235, 0.3);
    border-bottom: 2px solid rgba(37, 99, 235, 0.3);
    margin: 0.5rem 0 4rem 0; /* Further reduced top margin from 1rem to 0.5rem */
    padding: 3rem 0;
    animation: slideDown 0.6s ease-out;
    position: relative;
    z-index: 1;
    transform-origin: top;
}

.demo-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(37, 99, 235, 0.03) 0%, 
        transparent 50%, 
        rgba(37, 99, 235, 0.03) 100%);
    z-index: -1;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px) scaleY(0.8);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0) scaleY(1);
        max-height: 1000px;
    }
}

/* Live Demo Button States */
#live-demo-button.active {
    background: linear-gradient(45deg, #ef4444, #dc2626) !important;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4) !important;
    transform: translateY(-1px);
    min-width: 160px; /* maintain width */
}

#live-demo-button .expand-arrow {
    transition: transform 0.3s ease;
    margin-left: 0.5rem;
}

#live-demo-button.active .expand-arrow {
    transform: rotate(180deg);
}

/* Add subtle button press effect */
#live-demo-button:active {
    transform: translateY(1px) !important;
    transition: transform 0.1s ease;
}

.demo-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.demo-card:hover {
    transform: translateY(-10px);
    background: rgba(10, 10, 10, 0.95);
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(37, 99, 235, 0.3);
}

.demo-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.demo-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.demo-card:hover .demo-image img {
    transform: scale(1.1);
}

/* Demo Placeholder Styles */
.demo-placeholder {
    background: linear-gradient(135deg, 
        rgba(37, 99, 235, 0.1) 0%, 
        rgba(124, 58, 237, 0.1) 50%, 
        rgba(37, 99, 235, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(37, 99, 235, 0.2);
    transition: all 0.3s ease;
}

.demo-card:hover .demo-placeholder {
    background: linear-gradient(135deg, 
        rgba(37, 99, 235, 0.2) 0%, 
        rgba(124, 58, 237, 0.2) 50%, 
        rgba(37, 99, 235, 0.2) 100%);
    transform: scale(1.05);
}

.placeholder-content {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

.placeholder-content i {
    font-size: 3rem;
    color: var(--primary);
    display: block;
    margin-bottom: 0.5rem;
}

.placeholder-content span {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Specific demo colors */
.demo-placeholder[data-demo="tbc"] .placeholder-content i {
    color: #10b981; /* Green for banking */
}

.demo-placeholder[data-demo="irao"] .placeholder-content i {
    color: #f59e0b; /* Orange for forms */
}

.demo-placeholder[data-demo="general"] .placeholder-content i {
    color: var(--primary); /* Blue for general */
}

.demo-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(37, 99, 235, 0.1) 0%, 
        transparent 50%, 
        rgba(37, 99, 235, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.demo-card:hover .demo-image::after {
    opacity: 1;
}

.demo-content {
    padding: 2rem;
    color: white;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.demo-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
    background: linear-gradient(45deg, #fff, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.demo-content p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.demo-content .btn {
    margin-top: auto;
    align-self: flex-start;
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    background: transparent;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

/* Responsive adjustments for demo section */
@media (max-width: 992px) {
    .demo-section {
        margin: 0.25rem 0 3rem 0; /* Further reduced top margin for tablets */
    }
    
    .demo-section .row {
        justify-content: center;
    }
    
    .demo-card {
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .demo-section {
        padding: 2rem 0;
        margin: 0.25rem 0 2rem 0; /* Further reduced top margin for mobile */
    }
    
    .demo-image {
        height: 180px;
    }
    
    .demo-content {
        padding: 1.5rem;
    }
    
    .demo-content h3 {
        font-size: 1.2rem;
    }
} 

/* --- Demo card visual enhancements --- */
.demo-image {
    display:flex;
    align-items:center;
    justify-content:center;
    position:relative;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.05), transparent 60%);
    overflow:hidden; /* clip floating elements */
    border-top-left-radius:20px;
    border-top-right-radius:20px;
}
.demo-image i{
    font-size:3.2rem;
    transition:transform 0.4s ease, filter 0.4s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}
.demo-card:hover .demo-image i{
    transform:scale(1.15) rotate(-3deg);
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.6));
}
/* subtle inner border glow */
.demo-card::after{
    content:"";
    position:absolute;
    inset:0;
    border-radius:20px;
    pointer-events:none;
    background:linear-gradient(120deg,rgba(37,99,235,0.25),transparent 40%,rgba(37,99,235,0.25));
    opacity:0;
    transition:opacity 0.4s ease;
}
.demo-card:hover::after{
    opacity:1;
}
/* center content vertically */
.demo-content{
    padding:1.5rem 2rem 2rem;
    text-align:center;
}
.demo-content h3{
    font-size:1.3rem;
    margin-bottom:1.2rem;
}
.demo-content .btn{
    align-self:center;
} 

/* theme gradients */
.demo-card.finance .demo-image{background: radial-gradient(circle, rgba(16,185,129,0.25) 0%, rgba(5,150,105,0.1) 70%);} 
.demo-card.insurance .demo-image{background: radial-gradient(circle, rgba(249,115,22,0.25) 0%, rgba(234,88,12,0.1) 70%);} 
.demo-card.ai .demo-image{background: radial-gradient(circle, rgba(99,102,241,0.25) 0%, rgba(79,70,229,0.1) 70%);} 

.demo-label{
    display:inline-block;
    margin-top:0.6rem;
    padding:0.2rem 0.6rem;
    font-size:0.7rem;
    letter-spacing:0.5px;
    background:rgba(255,255,255,0.08);
    border-radius:8px;
    text-transform:uppercase;
    color:white;
}

.demo-card:hover .demo-label{background:var(--primary);} 

/* corner language ribbons */
.lang-ribbon{
    position:absolute;
    top:12px; /* a bit more inset */
    right:12px;
    font-size:0.6rem;
    font-weight:700;
    padding:0.25rem 0.55rem;
    border-radius:6px;
    text-transform:uppercase;
    color:#fff;
    background:rgba(37,99,235,0.85);
    box-shadow:0 2px 6px rgba(0,0,0,0.4);
    letter-spacing:0.3px;
    transition:transform 0.3s ease, box-shadow 0.3s ease;
    z-index:2;
}
.demo-card:hover .lang-ribbon{
    box-shadow:0 3px 8px rgba(0,0,0,0.5);
}
.lang-ribbon.ge{background:#e11d48;} /* red */
.lang-ribbon.en{background:#2563eb;} 