/* Brandon Variables - Enterprise Grade */
:root {
    /* Primary Color: Dark Navy (Trust, Professionalism) */
    --primary-color: #0F172A; 
    /* Secondary Color: Corporate Blue (Action, reliable) */
    --secondary-color: #0EA5E9; 
    /* Accent Color: Teal (Modernity, growth) */
    --accent-color: #14B8A6; 
    /* Backgrounds */
    --bg-color: #F8FAFC; 
    --bg-white: #FFFFFF;
    /* Typography */
    --text-main: #1E293B; 
    --text-muted: #64748B;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing & Borders */
    --border-radius-sm: 0.375rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 1rem;
    
    /* Shadows - Layered for depth */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Base Styles */
body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-color);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar - Premium Feel */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 10px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* Custom Selection */
::selection {
    background-color: var(--secondary-color);
    color: white;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-weight: 600;
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

.section-padding {
    padding: 100px 0; /* More breathing room */
}

/* Navbar - Enterprise Clean */
.navbar {
    transition: all 0.4s ease;
    padding: 20px 0;
    background-color: transparent;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    padding: 15px 0;
}

.navbar-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    color: var(--primary-color) !important;
}

.brand-subtitle {
    font-size: 0.65rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: -2px;
    opacity: 0.7;
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--text-main) !important;
    font-size: 0.95rem;
    margin-left: 20px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--secondary-color) !important;
    opacity: 1;
}

.nav-link.active {
    font-weight: 600;
}

/* Buttons - High Conversion */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-md);
    font-weight: 500;
    font-family: var(--font-heading);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    box-shadow: 0 4px 6px -1px rgba(14, 165, 233, 0.3); /* Subtle blue shadow */
    color: white; /* Ensure readability */
}

.btn-primary:hover {
    background-color: #0284c7;
    border-color: #0284c7;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(14, 165, 233, 0.4);
    color: white;
}

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

/* Hero Section */
.hero-section {
    position: relative;
    padding-top: 120px;
    padding-bottom: 80px;
    background: linear-gradient(180deg, rgba(248,250,252,1) 0%, rgba(255,255,255,1) 100%);
}

.badge-subtle {
    background-color: rgba(14, 165, 233, 0.1);
    color: var(--secondary-color);
    font-weight: 600;
    padding: 0.5em 1em;
    border-radius: 50px;
    font-size: 0.85rem;
}

/* Cards - Enterprise Look */
.service-card, .project-card, .testimonial-card {
    background: var(--bg-white);
    border: 1px solid rgba(226, 232, 240, 0.8); /* Slate-200 */
    border-radius: var(--border-radius-lg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.service-card:hover, .project-card:hover:not(:has(.stretched-link:hover)), .testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(14, 165, 233, 0.3); /* Subtle blue glow on border */
}
/* Fix for stretched link affecting card hover */
.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(14, 165, 233, 0.3);
}

.icon-box {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(14, 165, 233, 0.05); /* Very subtle fill */
    margin: 0 auto;
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

.service-card:hover .icon-box {
    background-color: var(--secondary-color);
    color: white;
}

/* Project Cards */
.project-img {
    position: relative;
    overflow: hidden;
    background-color: #f1f5f9;
}

.project-card .badge {
    font-weight: 500;
    padding: 0.5em 0.8em;
}

/* Process Section */
.step-icon {
    font-family: var(--font-heading);
    box-shadow: var(--shadow-md);
    border: 4px solid rgba(255, 255, 255, 0.2);
}

/* Contact Form */
.contact-box {
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--border-radius-lg);
}

.form-control {
    padding: 0.8rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius-md);
    font-family: var(--font-body);
}

.form-control:focus {
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
    border-color: var(--secondary-color);
}

/* Animations & Utilities */
.text-teal { color: var(--accent-color) !important; }

.section-title .line {
    width: 60px;
    height: 4px;
    background-color: var(--secondary-color);
    margin: 20px auto;
    border-radius: 2px;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* About Me Section Refinement */
.about-img-container {
    padding: 20px;
    z-index: 1;
}

.about-img-wrapper {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    z-index: 2;
    transition: all 0.5s ease;
    box-shadow: var(--shadow-xl);
}

.about-img-wrapper img {
    transition: transform 0.8s ease;
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.about-img-container:hover .about-img-wrapper img {
    transform: scale(1.05);
}

/* Decorative Shapes */
.shape-1 {
    width: 200px;
    height: 200px;
    top: -20px;
    left: -20px;
    opacity: 0.3;
    z-index: -1;
    animation: float 6s ease-in-out infinite;
}

.shape-2 {
    width: 150px;
    height: 60px;
    bottom: -10px;
    right: 20px;
    opacity: 0.2;
    z-index: -1;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

/* Experience Floating Badge */
.exp-badge {
    bottom: 40px;
    left: -20px;
    z-index: 5;
    min-width: 200px;
    border-left: 5px solid var(--secondary-color);
    animation: fadeInUp 1s ease-out;
}

.exp-icon {
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.3);
}

/* Mobile Adjustments for About Section */
@media (max-width: 768px) {
    .exp-badge {
        bottom: 20px;
        left: 20px;
        right: 20px;
        min-width: auto;
    }
    .about-img-container {
        padding: 10px;
        margin-bottom: 30px;
    }
}

/* Modal Customization */
.modal-content {
    border-radius: 1rem;
    border: none;
    box-shadow: var(--shadow-xl);
}

.modal-header .btn-close {
    padding: 1rem;
    background-color: #fff;
    border-radius: 50%;
    opacity: 0.9;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.modal-header .btn-close:hover {
    transform: scale(1.1);
    opacity: 1;
}

/* Mobile Responsiveness & Refinement */
@media (max-width: 991px) {
    .section-padding { padding: 60px 0; }
    
    .hero-section {
        padding-top: 100px;
        text-align: center;
    }
    
    .hero-content { margin-bottom: 40px; }
    
    .trust-badges .d-flex { justify-content: center; }
    
    .navbar-collapse {
        background: white;
        padding: 20px;
        border-radius: var(--border-radius-lg);
        box-shadow: var(--shadow-lg);
        margin-top: 15px;
    }
    
    .feature-list li {
        margin-bottom: 0.5rem;
    }
    
    /* Ensure modals are full width on mobile with margin */
    .modal-dialog {
        margin: 1rem;
    }
}

@media (max-width: 768px) {
    .display-4 {
        font-size: 2.5rem; /* Smaller hero title on mobile */
    }
    
    .lead {
        font-size: 1.1rem;
    }
    
    .section-padding {
        padding: 60px 0; /* Reduce padding on mobile */
    }
    
    .hero-section {
        padding-top: 100px;
        text-align: center; /* Center align hero on mobile */
    }
    
    .hero-content p {
        padding-right: 0 !important; /* Remove right padding on mobile */
    }
    
    .trust-badges .d-flex {
        justify-content: center; /* Center trust badges */
    }
    
    /* Adjust Chatbot for mobile */
    #chatbot-window {
        width: 90%;
        right: 5%;
        bottom: 90px;
    }
    
    #chatbot-toggle {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
}

/* =========================================
   Chatbot Widget Styles
   ========================================= */

/* Floating Action Button */
#chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

#chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.4);
}

#chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 35px rgba(14, 165, 233, 0.5);
}

/* Chat Window */
#chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transform-origin: bottom right;
    animation: scaleIn 0.3s ease-out;
    display: flex; /* overridden by d-none class when hidden */
    flex-direction: column;
    border: 1px solid rgba(255,255,255,0.5);
}

#chatbot-window.d-none {
    display: none !important;
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* Chat Header */
#chatbot-window .card-header {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Chat Messages */
#chat-messages::-webkit-scrollbar {
    width: 6px;
}
#chat-messages::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.1);
    border-radius: 3px;
}

.bot-message {
    background: white;
    color: var(--text-main);
    border-radius: 12px;
    border-bottom-left-radius: 2px;
    padding: 10px 14px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    font-size: 0.9rem;
    max-width: 80%;
    align-self: flex-start;
}

.user-message {
    background: var(--secondary-color);
    color: white;
    border-radius: 12px;
    border-bottom-right-radius: 2px;
    padding: 10px 14px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    max-width: 80%;
    align-self: flex-end;
    margin-left: auto; /* Push to right */
}

/* Quick Replies */
.btn-outline-primary {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}
.btn-outline-primary:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* Responsive Chat */
@media (max-width: 576px) {
    #chatbot-window {
        width: 300px;
        right: -10px; /* Shift slightly if needed */
    }
}

/* =========================================
   WhatsApp FAB Styles & Refined Hints
   ========================================= */
.whatsapp-fab {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    animation: fab-float 3s ease-in-out infinite;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
}

.whatsapp-fab:hover {
    transform: scale(1.1) translateY(-5px);
    background-color: #128C7E;
    color: white;
    box-shadow: 0 15px 35px rgba(37, 211, 102, 0.5);
    animation-play-state: paused;
}

/* Simplified FAB Hint Tags (White Card Style) */
.fab-hint {
    position: absolute;
    background: #FFFFFF;
    color: #0F172A;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.8rem;
    white-space: nowrap;
    pointer-events: none;
    opacity: 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    font-weight: 600;
    z-index: -1;
}

.whatsapp-fab .fab-hint {
    left: 75px;
    top: 50%;
    transform: translateY(-50%);
}

#chatbot-toggle .fab-hint {
    right: 75px;
    top: 50%;
    transform: translateY(-50%);
}

/* Hover effect */
.whatsapp-fab:hover .fab-hint,
#chatbot-toggle:hover .fab-hint {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

/* Animations - keep them bobbing together */
@keyframes fab-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

#chatbot-toggle {
    animation: fab-float 3s ease-in-out infinite 1.5s;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#chatbot-toggle:hover {
    transform: scale(1.1);
    animation-play-state: paused;
}

@media (max-width: 991px) {
    /* Ensure hints are visible on tablet */
    .whatsapp-fab .fab-hint {
        left: 65px;
    }
    #chatbot-toggle .fab-hint {
        right: 65px;
    }
}

@media (max-width: 768px) {
    .whatsapp-fab {
        width: 50px;
        height: 50px;
        bottom: 20px;
        left: 20px;
    }
    #chatbot-toggle {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    
    /* On mobile, float the text ABOVE the icon for better fit */
    .fab-hint {
        left: 50% !important;
        right: auto !important;
        bottom: 60px;
        top: auto !important;
        transform: translateX(-50%) !important;
        font-size: 0.7rem;
        padding: 5px 10px;
    }
    
    .whatsapp-fab:hover .fab-hint,
    #chatbot-toggle:hover .fab-hint {
        transform: translateX(-50%) scale(1.05) !important;
    }
}

/* Impact Metrics - Results Driven */
.impact-metric {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(20, 184, 166, 0.05);
    border-radius: var(--border-radius-sm);
    border-left: 3px solid var(--accent-color);
}

.text-accent {
    color: var(--accent-color) !important;
}

/* Tech Expertise Integration - Modern Icon Grid */
.tech-expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

.tech-icon-card {
    background: var(--bg-white);
    border-radius: var(--border-radius-md);
    padding: 24px 16px;
    text-align: center;
    border: 1px solid rgba(15, 23, 42, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

.tech-icon-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary-color);
    box-shadow: var(--shadow-lg);
}

.tech-icon-card i {
    font-size: 2.2rem;
    margin-bottom: 12px;
    display: block;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tech-icon-card span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Final Conversion - Discovery Card */
.discovery-card {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 280px;
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 15px;
    border-left: 4px solid var(--secondary-color);
    z-index: 999;
    transition: all 0.4s ease;
    display: none; /* Triggered by JS or visible by default */
}

.discovery-card.visible {
    display: block;
    animation: slideUp 0.5s ease forwards;
}

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

.discovery-card .close-discovery {
    position: absolute;
    top: 5px;
    right: 10px;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Footer CTA - Elite Conversion */
.footer-cta {
    background: linear-gradient(135deg, var(--primary-color), #1e293b);
    padding: 80px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-cta h2 {
    color: var(--bg-white);
    font-size: 2.5rem;
}

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