:root {
    /* Primary Color Palette - Light Mode Refined */
    --bg-dark: #f0f4f8;
    /* Soft Ice Blue/Grey */
    --bg-card: rgba(255, 255, 255, 0.65);
    --accent-primary: #0055ff;
    /* Slightly deeper blue for contrast */
    --accent-secondary: #065f46;
    /* Sophisticated Dark Green */
    --text-main: #1a1b1e;
    /* Deep grey/black for readability */
    --text-muted: #5d6370;
    /* Muted text for hierarchy */
    --glass-border: rgba(0, 85, 255, 0.1);
    /* Subtle blue tint border */
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Glassmorphism Utility - Light Version */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    /* Soft shadow instead of glow */
}

/* Bento Grid System */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(220px, auto);
    /* Flexible height with consistent base */
    gap: 1.2rem;
    padding: 2rem 0;
}

.bento-item {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    padding: 1.8rem;
    /* Balanced padding */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* Ensures space between top and bottom */
    align-items: center;
    text-align: center;
    height: 100%;
}

.bento-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent-secondary);
    box-shadow: 0 10px 30px rgba(6, 95, 70, 0.1);
}

.bento-item .content-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.bento-item h3 {
    font-size: 1.25rem;
    margin-top: 0.8rem;
    margin-bottom: 1rem;
    color: var(--accent-secondary);
    line-height: 1.2;
}

.bento-item p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.bento-item .icon {
    font-size: 2.2rem;
    /* Slightly larger icon */
    margin-bottom: 0.2rem;
    display: flex;
    justify-content: center;
}

/* Bento Variants */
.span-2-w {
    grid-column: span 2;
}

.span-2-h {
    grid-row: span 2;
}

.span-large {
    grid-column: span 2;
    grid-row: span 2;
}

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

@media (max-width: 600px) {
    .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .span-2-w,
    .span-2-h,
    .span-large {
        grid-column: span 1;
        grid-row: span 1;
    }
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #0a7e5a, var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Button & Interactive Elements - Dark Green */
.btn-primary {
    background: var(--accent-secondary);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(6, 95, 70, 0.2);
}

/* Neon Glow Effect */
.glow {
    box-shadow: 0 0 20px rgba(6, 95, 70, 0.15);
}

/* Navigation & Navbar Refinement */
.navbar {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    z-index: 1000;
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.navbar .logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.navbar .logo a {
    text-decoration: none;
    color: inherit;
}

.navbar .nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.navbar .nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar .nav-links a:hover {
    color: var(--accent-primary);
}

.btn-primary-sm {
    padding: 0.6rem 1.5rem;
    text-decoration: none;
    color: var(--accent-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid var(--accent-secondary);
    border-radius: 50px;
    background: transparent;
    transition: all 0.3s ease;
}

.btn-primary-sm:hover {
    background: var(--accent-secondary);
    color: white !important;
}

/* Hamburger Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-main);
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

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

.hero-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-bg-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.1);
    transition: visibility 1.5s ease;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 27, 30, 0.75) 0%, rgba(26, 27, 30, 0.5) 50%, rgba(240, 244, 248, 0.2) 100%);
    z-index: 1;
}

.hero-container {
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 80px 1rem 40px;
}

.hero-title {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.hero-span {
    color: #ffffff;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #ffffff;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    font-weight: 500;
    opacity: 0.9;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.btn-hero-primary {
    background: var(--accent-primary);
    color: white;
    padding: 1.2rem 2.8rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.btn-hero-secondary {
    color: #ffffff;
    padding: 1.2rem 2.8rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

/* Mobile Media Queries */
@media (max-width: 992px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .navbar .nav-links {
        position: fixed;
        top: 0;
        right: -110vw;
        /* Push further off-screen using viewport width */
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        padding: 2rem;
        transition: all 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1000;
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
    }

    .navbar .nav-links.active {
        right: 0;
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }

    .navbar .nav-links a {
        font-size: 1.5rem;
        font-weight: 700;
        margin: 0.5rem 0;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        padding: 0 1rem;
    }

    .hero-cta {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
    }

    .hero-cta .btn-hero-primary,
    .hero-cta .btn-hero-secondary {
        width: 100%;
        text-align: center;
    }
}

/* Ken Burns Animation */
@keyframes kenburns {
    0% {
        transform: scale(1.1) translate(0, 0);
    }

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

.hero-bg-slide.active-animation {
    animation: kenburns 15s linear infinite alternate;
}

/* Chatbot UI */
#chat-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2000;
    font-size: 1.5rem;
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 10px 25px rgba(0, 85, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#chat-toggle:hover {
    transform: scale(1.1) rotate(5deg);
}

#chat-container {
    position: fixed;
    bottom: 6rem;
    right: 2rem;
    width: 380px;
    height: 500px;
    background: white;
    display: none;
    /* Controlled by .active class */
    flex-direction: column;
    z-index: 2000;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid var(--glass-border);
}

#chat-container.active {
    display: flex;
    transform: translateY(0);
    opacity: 1;
}

.chat-header {
    padding: 1.2rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 85, 255, 0.03);
}

.chat-header h4 {
    margin: 0;
    font-size: 1.1rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: #059669;
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.5;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

#chat-body {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    background: #fcfdfe;
}

.chat-message {
    margin-bottom: 1rem;
    padding: 0.9rem 1.2rem;
    border-radius: 18px;
    font-size: 0.92rem;
    max-width: 85%;
    line-height: 1.4;
    position: relative;
}

.chat-message.bot {
    align-self: flex-start;
    background: white;
    color: var(--text-main);
    border: 1px solid #eee;
    border-bottom-left-radius: 4px;
}

.chat-message.user {
    align-self: flex-end;
    background: var(--accent-primary);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 85, 255, 0.15);
}

.typing-indicator {
    padding: 0.8rem 1.2rem;
    background: #eee;
    border-radius: 18px;
    display: flex;
    gap: 4px;
    align-self: flex-start;
    margin-bottom: 1rem;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

.chat-footer {
    padding: 1.2rem;
    border-top: 1px solid var(--glass-border);
    background: white;
}

#chat-form {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

#chat-input {
    flex: 1;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 0.8rem 1.2rem;
    border-radius: 25px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
}

#chat-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: white;
}

.chat-send-btn {
    background: var(--accent-primary);
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chat-send-btn:hover {
    background: #0044cc;
    transform: scale(1.05);
}

@media (max-width: 480px) {
    #chat-container {
        width: calc(100% - 2rem);
        height: 70vh;
        right: 1rem;
        bottom: 5rem;
    }

    #chat-toggle {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
    }
}

/* Leads & Dashboard Section */
.leads-section {
    padding: 100px 0;
    border-top: 1px solid var(--glass-border);
}

.leads-container {
    display: flex;
    gap: 4rem;
    align-items: center;
    flex-wrap: wrap;
}

.leads-content {
    flex: 1;
    min-width: 300px;
}

.leads-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.leads-text {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.leads-list {
    list-style: none;
    color: var(--text-muted);
    padding: 0;
}

.leads-list li {
    margin-bottom: 0.8rem;
}

.dashboard-preview {
    flex: 1.2;
    min-width: 350px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    background: white;
    border: 1px solid var(--accent-primary);
    box-shadow: 0 20px 50px rgba(0, 85, 255, 0.1);
}

.dashboard-inner {
    background: #f8f9fc;
    border-radius: 12px;
    height: 100%;
    border: 1px solid #ddd;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Contact Section */
.contact-section {
    padding: 100px 0;
    background: #f0f4f8;
}

.contact-card {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.05);
}

.contact-bg-glow {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: var(--accent-secondary);
    filter: blur(80px);
    opacity: 0.1;
}

.contact-header {
    text-align: center;
    margin-bottom: 3rem;
}

.contact-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-subtitle {
    color: var(--text-muted);
}

.contact-form {
    display: grid;
    gap: 1.2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-input,
.form-select,
.form-textarea {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 10px;
    color: var(--text-main);
    width: 100%;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: white;
    box-shadow: 0 5px 15px rgba(0, 85, 255, 0.05);
}

.form-textarea {
    resize: none;
}

.form-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-top: 1rem;
}

.form-actions .btn-primary {
    flex: 1;
    text-align: center;
}

.btn-secondary {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.btn-secondary:hover {
    color: var(--accent-primary);
}

/* More Responsive Fixes */
@media (max-width: 768px) {
    .leads-section {
        padding: 60px 0;
    }

    .leads-container {
        gap: 2.5rem;
        flex-direction: column;
    }

    .leads-content {
        min-width: 100%;
        text-align: center;
    }

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

    .dashboard-preview {
        min-width: 100%;
        width: 100%;
        padding: 1rem;
    }

    .contact-section {
        padding: 60px 0;
    }

    .contact-card {
        padding: 2.5rem 1.5rem;
    }

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

    .form-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .form-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .form-actions button,
    .form-actions .btn-primary {
        width: 100%;
        padding: 1.2rem;
    }
}