/* --- Base Styles & Variables --- */
:root {
    --primary-color: #4F46E5; /* Indigo */
    --primary-dark: #4338CA;
    --secondary-color: #111827; /* Dark Gray for text */
    --muted-color: #6B7280;   /* Medium Gray */
    --light-gray: #F3F4F6;     /* Background for sections */
    --white: #FFFFFF;
    --border-color: #E5E7EB;
    --heading-font: 'Inter', sans-serif;
    --body-font: 'Inter', sans-serif;

    /* --- Overrides for n8n Chat Variables --- */

    /* Primary Color Theme (Matches Page) */
    --chat--color-primary: var(--primary-color); /* Use page's primary Indigo */
    --chat--color-primary-shade-50: var(--primary-dark); /* Use page's darker Indigo */
    --chat--color-primary-shade-100: #3730A3; /* Even darker Indigo shade */

    /* Secondary Color (Used for User Messages - Align with Primary) */
    --chat--color-secondary: var(--primary-color); /* User messages use primary color */
    --chat--color-secondary-shade-50: var(--primary-dark);

    /* Backgrounds & Text Colors (Align with Page) */
    --chat--color-white: var(--white);
    --chat--color-light: var(--light-gray); /* Use page's light gray */
    --chat--color-light-shade-50: var(--border-color); /* Use page's border color */
    --chat--color-light-shade-100: #D1D5DB; /* Slightly darker gray */
    --chat--color-medium: #D1D5DB;
    --chat--color-dark: var(--secondary-color); /* Use page's dark text color */
    --chat--color-disabled: #9CA3AF; /* Lighter medium gray */
    --chat--color-typing: var(--muted-color); /* Use page's muted text color */

    /* Spacing & Radius (Slightly softer) */
    --chat--spacing: 0.875rem; /* Optional: Slightly less spacing */
    --chat--border-radius: 0.5rem; /* Softer corners than default */
    
    /* Header Styling (Minimalistic) */
    --chat--header-height: 0;
    --chat--header--background: var(--chat--color-white); /* Clean white header */
    --chat--header--color: var(--chat--color-dark); /* Dark text for header */
    --chat--header--padding: 0; /* Adjust padding */
    --chat--header--border-bottom: 0px solid var(--chat--color-light-shade-50); /* Subtle separator */
    --chat--heading--font-size: 0em; /* Smaller, cleaner heading */
    --chat--subtitle--font-size: 0em;
    --chat--subtitle--color: var(--chat--color-typing); /* Muted color for subtitle */

    /* Message Bubble Styling */
    --chat--message--font-size: 0.95rem; /* Slightly smaller text */
    --chat--message--padding: 0.75rem 1rem; /* Adjust padding */
    --chat--message--border-radius: var(--chat--border-radius); /* Use updated radius */
    --chat--message-line-height: 1.5; /* Adjust line height */
    
    /* Bot Messages (Light background, dark text) */
    --chat--message--bot--background: var(--chat--color-light); /* Light gray background */
    --chat--message--bot--color: var(--chat--color-dark); 
    --chat--message--bot--border: none;

    /* User Messages (Primary background, white text) */
    --chat--message--user--background: var(--chat--color-primary); /* Page primary color */
    --chat--message--user--color: var(--chat--color-white);
    --chat--message--user--border: none;

    /* Input Area */
    --chat--textarea--height: 50px; /* Optional: Adjust height */

    /* Toggle Button Styles (Irrelevant in fullscreen, but harmless to define) */
    /* --chat--toggle--background: var(--chat--color-primary); */
    /* --chat--toggle--hover--background: var(--chat--color-primary-shade-50); */
    /* --chat--toggle--color: var(--chat--color-white); */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth; /* Smooth scroll for anchor links */
}

body {
    font-family: var(--body-font);
    line-height: 1.6;
    color: var(--secondary-color);
    /* background-color: var(--white); */
    font-size: 16px; /* Base font size */
    background-color: var(--white); /* Set base color */
    background-image:
        linear-gradient(to right,
            rgba(255, 255, 255, 0) 0%,      /* Start transparent */
            rgba(255, 255, 255, 0) 15%,     /* Stay transparent */
            var(--white) 30%,               /* Fade to white by 30% */
            var(--white) 70%,               /* Stay white until 70% */
            rgba(255, 255, 255, 0) 85%,     /* Fade back to transparent by 85% */
            rgba(255, 255, 255, 0) 100%     /* End transparent */
        ),
        radial-gradient(circle, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
    background-repeat: no-repeat, repeat; /* Gradient doesn't repeat, pattern does */
    background-size: 100% 100%, 10px 10px; /* Gradient covers body, pattern tiles */
}

.container {
    max-width: 1100px; /* Wider container for SaaS look */
    width: 90%;
    margin: 0 auto; /* Center container within sections */
    padding: 60px 0; /* Vertical padding for sections */
}

/* --- Header --- */
.page-header {
    background-color: var(--white);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky; /* Optional: make header sticky */
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1100px;
    width: 90%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--primary-color);
    margin-right: 8px; /* Add some space between logo and label */
}

.beta-label {
    display: inline-block; /* Allows padding and background */
    background-color: #E0E7FF; /* Light indigo background (adjust as needed) */
    color: var(--primary-color); /* Use primary color for text */
    font-size: 0.7rem; /* Small font size */
    font-weight: 600; /* Medium weight */
    padding: 2px 6px; /* Small padding */
    border-radius: 4px; /* Slightly rounded corners */
    text-transform: uppercase; /* Uppercase text */
    vertical-align: middle; /* Align nicely with the logo text */
    margin-left: 5px; /* Space from the logo text */
}

/* --- Hero Section --- */
.hero {
    text-align: center;
    padding: 80px 20px; /* More padding */
    /* background-color: var(--white); /* Ensure a solid background color if the image has transparency */
    /* === Background Image Styles === */
    background-image: url('jonbot.png'); /* The relative path to your image */
    background-repeat: no-repeat; /* Prevent the image from tiling */
    background-position: left 10% bottom; /* Left align horizontally, align with the bottom */
    background-size: 35% auto; /* Image width is X% of hero section width */
    /* OR: background-size: contain;  /* Fit the entire image, might leave gaps */
    min-height: 50%; /* Adjust this value so that the image is aligned correctly with the features section. */
}

.hero-content {
     max-width: 750px;
     margin: 0 auto;
}

.hero h1 {
    font-family: var(--heading-font);
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive font size */
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero .subtitle {
    font-size: 1.15rem;
    color: var(--muted-color);
    max-width: 650px;
    margin: 0 auto 30px auto;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 14px 30px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.2);
}

/* Add specific margin-bottom ONLY to the CTA button within the hero section */
.hero .cta-button {
    margin-bottom: 20%;
}

.cta-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

/* --- Features Section --- */
.features {
    background-color: var(--light-gray); /* Alternating background */
}

.features h2 {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 50px;
    color: var(--secondary-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Responsive grid */
    gap: 30px;
}

.feature-item {
    background-color: var(--white);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.07);
}

.feature-icon {
    display: inline-flex; /* Helps center icon */
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    background-color: rgba(79, 70, 229, 0.1); /* Light primary background */
    border-radius: 50%;
    margin-bottom: 20px;
}

.feature-icon svg {
    width: 30px;
    height: 30px;
    color: var(--primary-color); /* SVG color */
}

.feature-item h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.feature-item p {
    font-size: 0.95rem;
    color: var(--muted-color);
    line-height: 1.5;
}

/* --- Chat Section --- */
.chat-section {
    /* background-color: var(--white); */
}

/* --- Chat Section Intro Styling --- */
.chat-section h2 { /* Keep existing h2 styles */
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 15px; /* Reduce bottom margin slightly */
    text-align: center;
}

.chat-intro-text { /* Style the intro paragraph */
    color: var(--muted-color);
    max-width: 650px; /* Slightly wider */
    margin: 0 auto 35px auto; /* Adjust bottom margin */
    font-size: 1.05rem; /* Slightly smaller */
    text-align: center;
    line-height: 1.6;
}

.chat-intro-text a { /* Ensure link style is consistent */
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 600;
}
.chat-intro-text a:hover {
    color: var(--primary-dark);
}


.chat-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive columns */
    gap: 25px;
    max-width: 800px; /* Limit overall width */
    margin: 0 auto 40px auto; /* Center grid and add margin below */
}

/* --- Chat Section Access Blocks Styling --- */

.chat-access-block {
    /* Change background to light gray (assuming section bg is white) */
    background-color: var(--light-gray);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    /* Add a subtle top border for extra separation if desired */
    /* border-top: 3px solid var(--primary-color); */
}

.access-icon {
    width: 50px;
    height: 50px;
    /* Make icon background white to contrast with gray block */
    background-color: var(--white);
    /* Add a border to the icon circle */
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

/* Keep existing styles for .access-icon svg, h4, p within the block */
.access-icon svg {
    width: 26px;
    height: 26px;
    color: var(--primary-color);
}

.chat-access-block h4 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.chat-access-block p {
    font-size: 0.95rem;
    color: var(--muted-color);
    line-height: 1.5;
    flex-grow: 1;
}

.chat-disclaimer {
    font-size: 0.8rem; /* Small font size */
    color: var(--muted-color); /* Muted text color */
    text-align: center; /* Center the text */
    max-width: 750px; /* Limit width slightly less than chatbox */
    margin: 15px auto 0 auto; /* Add space above, center horizontally */
    padding: 0 15px; /* Add padding in case text wraps */
    line-height: 1.4;
}

#n8n-chat {
    border: 1px solid var(--border-color);
    background-color: var(--white); /* Keep it clean */
    min-height: 150px; /* Increase height */
    max-width: 800px; /* Max width for chat */
    margin: 0 auto; /* Center the chat box */
    border-radius: 10px;
    display: flex;
    align-items: top;
    overflow: hidden; 
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

#n8n-chat .placeholder-text {
    color: var(--muted-color);
    font-style: italic;
}

#n8n-chat iframe {
    width: 100%;
    height: 500px; 
    border: none;
}

/* --- FAQ Section --- */
.faq-section {
    /* background-color: var(--white); /* Or alternate with var(--light-gray) */
}

.faq-section h2 {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--secondary-color);
}

.faq-grid {
    max-width: 800px; /* Constrain width for readability */
    margin: 0 auto;
    display: grid;
    gap: 15px;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden; /* Contain background */
}

.faq-question { /* Styles the <summary> tag */
    padding: 18px 25px;
    font-weight: 600;
    cursor: pointer;
    display: block; /* Ensure it takes full width */
    background-color: var(--white);
    position: relative; /* For pseudo-element arrow */
    transition: background-color 0.2s ease;
}

.faq-question:hover {
    background-color: rgba(79, 70, 229, 0.05); /* Subtle hover */
}

.faq-question::after { /* Simple arrow indicator */
    content: '+';
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4em;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.faq-item[open] > .faq-question::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq-answer { /* Styles the content div */
    padding: 0 25px 20px 25px; /* Padding only when open */
    background-color: var(--white);
    color: var(--muted-color);
    line-height: 1.6;
    font-size: 0.95rem;
}

.faq-answer p {
    margin-bottom: 10px;
}
.faq-answer p:last-child {
    margin-bottom: 0;
}

/* --- Pricing Section --- */
.pricing-section {
    background-color: var(--light-gray); /* Alternate background */
}

.pricing-section h2 {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 50px;
    color: var(--secondary-color);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    align-items: stretch; /* Make cards equal height if needed */
}

.pricing-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 35px;
    display: flex;
    flex-direction: column;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative; /* For badge positioning */
    overflow: hidden; /* Contain badge */
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Highlight 'popular' tier */
.pricing-card.popular {
    border-color: var(--primary-color);
    border-width: 2px;
}

.popular-badge {
    position: absolute;
    top: 15px;
    right: -40px; /* Position off-card initially */
    background-color: var(--primary-color);
    color: var(--white);
    padding: 5px 40px; /* Wide padding for diagonal look */
    font-size: 0.8rem;
    font-weight: 600;
    text-indent: 0px;
    transform: rotate(30deg);
    transform-origin: center;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.pricing-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.pricing-card .price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.pricing-card .tier-description {
    font-size: 0.9rem;
    color: var(--muted-color);
    margin-bottom: 25px;
    min-height: 40px; /* Ensure space even if description is short */
}

.features-list {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
    text-align: left;
    flex-grow: 1; /* Pushes button to bottom */
}

.features-list .list-heading {
    font-weight: 600; /* Make heading bolder */
    color: var(--secondary-color); /* Ensure dark text */
    margin-top: 20px; /* Add space above heading */
    margin-bottom: 10px; /* Space below heading */
    padding-left: 0; /* Align text to left, override icon padding */
}

.features-list .list-heading::before {
    content: none; /* Remove the default check/cross icon */
}

.features-list li:first-child.list-heading {
    margin-top: 0; /* Remove extra top margin for the very first heading */
}

.features-list li {
    margin-bottom: 12px;
    color: var(--secondary-color);
    font-size: 0.80rem;
    position: relative;
    padding-left: 25px; /* Space for icon */
}
/* Basic check/cross using pseudo-elements */
.features-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    font-weight: bold;
    text-align: center;
    line-height: 16px;
    border-radius: 50%;
}
/* Checkmark style */
.features-list li:not(:contains('❌'))::before {
    content: '✓';
    background-color: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
}
/* Cross style */
.features-list li:contains('❌') {
    color: var(--muted-color); /* Mute text for unavailable features */
}
.features-list li:contains('❌')::before {
    content: '✕';
    background-color: #FEE2E2; /* Light red */
    color: #DC2626; /* Red */
}

.pricing-button {
    margin-top: auto; /* Push to bottom */
    width: 100%;
    padding: 12px 20px; /* Slightly smaller button */
}

.pricing-button[disabled] {
    background-color: var(--light-gray);
    border: 1px solid var(--border-color);
    color: var(--muted-color);
    cursor: not-allowed;
    box-shadow: none;
}
.pricing-button[disabled]:hover {
    background-color: var(--light-gray);
    transform: none;
}

/* Adjustments for pricing section on smaller screens */
@media (max-width: 768px) {
    .pricing-grid {
        grid-template-columns: 1fr; /* Stack pricing cards */
    }
    .popular-badge {
        top: 10px;
        right: -45px; /* Adjust position slightly */
    }
}

/* Adjustments for FAQ section on smaller screens */
@media (max-width: 768px) {
    .faq-question {
        padding: 15px 20px;
    }
     .faq-question::after {
        right: 20px;
    }
    .faq-answer {
        padding: 0 20px 15px 20px;
    }
}

/* --- Footer --- */
.page-footer {
    background-color: var(--white); /* Can match body or be darker */
    padding: 30px 20px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--muted-color);
    border-top: 1px solid var(--border-color);
    /* Removed flex from body, footer should now position correctly after content */
    width: 100%; 
}


/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .container {
        padding: 40px 0; /* Reduce padding on smaller screens */
    }

     .hero h1 {
        font-size: 2.2rem;
    }
     .hero .subtitle {
        font-size: 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr; /* Stack features */
        gap: 20px;
    }

    .chat-section #chatbot-placeholder {
        min-height: 400px; /* Adjust chat height */
    }
     .chat-section #chatbot-placeholder iframe {
         height: 400px;
     }

    .contact-link {
         display: block; /* Stack contact links */
         margin: 10px auto;
         max-width: 200px;
     }
}