/* 
 * BSM Bombe Premium Corporate Theme
 * Fonts: Montserrat, Inter
 * Colors: Premium Red Gradient, Deep Navy, White
 */

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

:root {
    --primary-red: #e11d48;
    --primary-red-hover: #be123c;
    --primary-gradient: linear-gradient(135deg, #e11d48 0%, #9f1239 100%);
    --dark-bg: #09090b; /* Deepest dark for premium contrast */
    --dark-gray: #18181b;
    --light-bg: #f8fafc;
    --text-dark: #27272a;
    --text-light: #f8fafc;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: 1px solid rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--light-bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: -0.03em;
}

/* Typography & Utilities */
.text-primary-red { color: var(--primary-red) !important; }
.bg-dark-custom { background-color: var(--dark-bg) !important; }
.bg-red { background: var(--primary-gradient) !important; }
.fw-800 { font-weight: 800; }
.fw-900 { font-weight: 900; }

/* Buttons */
.btn-custom {
    padding: 14px 35px;
    border-radius: 50px; /* Pill shape for modern look */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: none;
}

.btn-red {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 10px 20px -10px rgba(225, 29, 72, 0.5);
}

.btn-red::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, #be123c 0%, #881337 100%);
    opacity: 0;
    z-index: -1;
    transition: var(--transition);
}

.btn-red:hover {
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 15px 25px -10px rgba(225, 29, 72, 0.6);
}

.btn-red:hover::before {
    opacity: 1;
}

.btn-outline-white {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
}

.btn-outline-white:hover {
    background: white;
    color: var(--dark-bg);
    transform: translateY(-3px);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    box-shadow: 0 10px 20px -10px rgba(37, 211, 102, 0.5);
}

.btn-whatsapp:hover {
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 15px 25px -10px rgba(37, 211, 102, 0.6);
}

/* Navbar - Glassmorphism */
.navbar-custom {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 15px 0;
    transition: var(--transition);
}

.navbar-brand img {
    height: 55px;
    transition: var(--transition);
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--dark-gray) !important;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    padding: 10px 18px !important;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 5px;
    left: 18px;
    background: var(--primary-gradient);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-link:hover {
    color: var(--primary-red) !important;
}

.nav-link:hover::after, .nav-link.active::after {
    width: calc(100% - 36px);
}

.nav-link.active {
    color: var(--primary-red) !important;
}

.lang-selector {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 180px 0 150px;
    background-color: var(--dark-bg);
    color: white;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/hero-machine.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.6;
    z-index: 1;
    transform: scale(1.05);
    animation: slowZoom 20s infinite alternate linear;
}

@keyframes slowZoom {
    0% { transform: scale(1.05); }
    100% { transform: scale(1.15); }
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-top: 50px;
}

.hero-title {
    font-size: 5.5rem;
    line-height: 1.05;
    margin-bottom: 25px;
    text-transform: uppercase;
    font-weight: 900;
    background: linear-gradient(to right, #ffffff, #a1a1aa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.hero-title .text-primary-red {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 45px;
    max-width: 800px;
    color: #e4e4e7;
    line-height: 1.6;
}

/* Features Bar */
.features-bar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 50px 0;
    box-shadow: 0 -20px 40px rgba(0,0,0,0.08);
    position: relative;
    z-index: 10;
    margin-top: -50px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.8);
}

.feature-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 15px;
    border-radius: 12px;
    transition: var(--transition);
}

.feature-box:hover {
    background: rgba(0,0,0,0.02);
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.8rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.feature-text h4 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--dark-bg);
    font-weight: 800;
}

.feature-text p {
    margin: 0;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #71717a;
    letter-spacing: 1px;
}

/* Machines Section */
.section-title {
    text-transform: uppercase;
    font-size: 3rem;
    margin-bottom: 50px;
    color: var(--dark-bg);
    font-weight: 900;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.03);
}

.product-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.08);
}

.product-img-wrap {
    padding: 40px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.product-img-wrap img {
    max-width: 100%;
    height: auto;
    mix-blend-mode: multiply;
    transition: var(--transition);
}

.product-card:hover .product-img-wrap img {
    transform: scale(1.08);
}

.product-info {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: white;
}

.product-title {
    font-size: 1.25rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--dark-gray);
    line-height: 1.4;
}

.btn-view {
    margin-top: auto;
    border: 2px solid #e4e4e7;
    color: var(--text-dark);
    background: transparent;
    padding: 10px 25px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 50px;
    transition: var(--transition);
    align-self: flex-start;
}

.btn-view:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 15px -5px rgba(225, 29, 72, 0.4);
}

/* Dark Sections */
.dark-section {
    background: var(--dark-bg);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.dark-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at top right, rgba(225,29,72,0.1) 0%, transparent 40%);
    pointer-events: none;
}

.dark-section h3 {
    text-transform: uppercase;
    font-size: 1.4rem;
    margin-bottom: 35px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-weight: 800;
    letter-spacing: 1px;
}

/* References Grid */
.ref-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.ref-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.ref-item img {
    max-width: 120px;
    max-height: 50px;
    filter: grayscale(100%) brightness(200%);
    opacity: 0.6;
    transition: var(--transition);
}

.ref-item:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-5px);
}

.ref-item:hover img {
    filter: grayscale(0%) brightness(100%);
    opacity: 1;
}

/* Bottom Bar */
.bottom-bar {
    background-color: #050505; /* Pure black for premium feel */
    padding: 40px 0;
    color: white;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: var(--font-heading);
    font-weight: 600;
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateX(5px);
}

.contact-item i {
    font-size: 2.2rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.social-links a {
    color: #a1a1aa;
    font-size: 1.5rem;
    margin-left: 15px;
    transition: var(--transition);
    display: inline-block;
}

.social-links a:hover {
    color: var(--primary-red);
    transform: translateY(-3px);
}

/* AI Assistant Widget - Premium Design */
.ai-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 380px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2), 0 0 0 1px rgba(0,0,0,0.05);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(120%) scale(0.9);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ai-widget.open {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.ai-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-logo {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.4);
}

.ai-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    animation: ai-pulse 2s infinite;
}

@keyframes ai-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.ai-body {
    padding: 20px 16px;
    height: 380px;
    overflow-y: auto;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

/* Custom Scrollbar for AI Body */
.ai-body::-webkit-scrollbar { width: 5px; }
.ai-body::-webkit-scrollbar-track { background: transparent; }
.ai-body::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 10px; }

/* Chat Messages */
.ai-message {
    margin-bottom: 16px;
    display: flex;
    gap: 10px;
    max-width: 90%;
}

.ai-message.bot {
    align-items: flex-start;
}

.ai-message.user {
    margin-left: auto;
    justify-content: flex-end;
    flex-direction: row-reverse;
}

.ai-bot-avatar {
    min-width: 32px;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    box-shadow: 0 3px 8px rgba(225,29,72,0.25);
}

.ai-bot-bubble {
    background: white;
    padding: 12px 16px;
    border-radius: 4px 16px 16px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    font-size: 0.9rem;
    line-height: 1.6;
    color: #1e293b;
    border: 1px solid rgba(0,0,0,0.04);
}

.ai-user-bubble {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 16px 4px 16px 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Quick Action Buttons */
.ai-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 2px;
    transition: all 0.3s ease;
}

.ai-quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    background: white;
    color: #475569;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.ai-quick-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

.ai-quick-btn i {
    font-size: 0.75rem;
    color: var(--primary-red);
}

.ai-quick-primary {
    background: var(--primary-gradient) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(225,29,72,0.3) !important;
}

.ai-quick-primary i {
    color: white !important;
}

.ai-quick-primary:hover {
    box-shadow: 0 6px 16px rgba(225,29,72,0.4) !important;
}

/* Typing Animation */
.ai-typing-dots {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.ai-typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
    animation: ai-typing 1.4s infinite;
}

.ai-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes ai-typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* Fade In Animation */
.ai-fade-in {
    animation: aiFadeIn 0.4s ease forwards;
    opacity: 0;
}

@keyframes aiFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Footer */
.ai-footer {
    padding: 14px 16px;
    background: white;
    border-top: 1px solid rgba(0,0,0,0.06);
    display: flex;
    gap: 10px;
}

.ai-input {
    flex-grow: 1;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 25px;
    padding: 11px 18px;
    outline: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.ai-input:focus {
    background: white;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.1);
}

.ai-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ai-send {
    background: var(--primary-gradient);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.35);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.ai-send:hover {
    transform: scale(1.08) rotate(-5deg);
    box-shadow: 0 6px 16px rgba(225, 29, 72, 0.45);
}

.ai-send:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Toggle Button */
.ai-toggle-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 62px;
    height: 62px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 8px 25px rgba(225, 29, 72, 0.45);
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ai-toggle-btn:hover {
    transform: translateY(-4px) scale(1.06);
    box-shadow: 0 12px 35px rgba(225, 29, 72, 0.55);
}

.ai-notification-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    background: #22c55e;
    border-radius: 50%;
    border: 3px solid white;
    display: none;
    animation: ai-pulse 1.5s infinite;
}

/* RTL Support */
html[dir="rtl"] {
    text-align: right;
}

html[dir="rtl"] .ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

html[dir="rtl"] .ai-bot-bubble {
    border-radius: 16px 4px 16px 16px;
}

html[dir="rtl"] .ai-user-bubble {
    border-radius: 4px 16px 16px 16px;
}

html[dir="rtl"] .ai-message.user {
    margin-left: 0;
    margin-right: auto;
}

@media (max-width: 768px) {
    .hero-title { font-size: 3rem; }
    .hero-subtitle { font-size: 1.2rem; }
    .features-bar { margin-top: 20px; padding: 30px 15px; }
    .feature-box { margin-bottom: 25px; }
    .section-title { font-size: 2.2rem; }
    .ai-widget { width: calc(100% - 30px); right: 15px; bottom: 100px; }
    .ai-toggle-btn { bottom: 20px; right: 20px; width: 56px; height: 56px; font-size: 1.4rem; }
}
