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

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --accent-green: #28a745;
    --accent-blue: #007bff;
    --accent-orange: #fd7e14;
    --accent-gray: #e9ecef;
    --border-color: #dee2e6;
    --prompt-color: #6c757d;
}

html {
    scroll-behavior: smooth;
    scroll-restoration: manual;
    overflow-anchor: none;
}

body {
    font-family: 'JetBrains Mono', 'Fira Code', 'Monaco', 'Consolas', monospace;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-anchor: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.prompt-indicator {
    color: var(--accent-blue);
    font-weight: 500;
    font-size: 16px;
}

.main {
    flex: 1;
}

.hero {
    max-width: 800px;
}

.hero-logo {
    width: 250px;
    height: auto;
    margin: 1.5rem 0;
}

/* Who We Are two-column layout */
.who-we-are-section {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2rem;
}

.who-we-are-content {
    flex: 1;
}

.who-we-are-logo {
    flex-shrink: 0;
    width: 200px;
}

.who-we-are-logo svg {
    width: 100%;
    height: auto;
}

/* Calendar booking section styling */
.calendar-booking-container {
    margin: 1rem 0;
}

.calendar-intro {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.calendar-toggle-btn {
    background-color: var(--accent-blue);
    color: var(--bg-primary);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    display: inline-block;
}

.calendar-toggle-btn:hover {
    background-color: var(--accent-green);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.calendar-toggle-btn:active {
    transform: translateY(0);
}

.calendar-widget-container {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0;
    background-color: var(--bg-secondary);
    overflow: hidden;
    contain: layout style paint;
    overflow-anchor: none;
}

.calendar-widget-container iframe {
    border-radius: 4px;
    contain: strict;
    overflow-anchor: none;
}

.calendar-placeholder {
    text-align: center;
    color: var(--text-secondary);
}

.calendar-config-note {
    margin-top: 1rem;
    padding: 1rem;
    background-color: var(--bg-primary);
    border-radius: 4px;
    border-left: 4px solid var(--accent-blue);
}

.calendar-config-note p {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.calendar-config-note ol {
    margin-left: 1rem;
    line-height: 1.8;
}

.calendar-config-note li {
    margin-bottom: 0.25rem;
}

.terminal-line {
    display: flex;
    align-items: baseline;
    margin-bottom: 0.5rem;
    font-family: inherit;
    font-size: 14px;
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
}

.section-icon {
    margin-right: 0.5rem;
    font-size: 18px;
}

.section-title {
    color: var(--text-primary);
}

.prompt {
    color: var(--accent-green);
    margin-right: 0.5rem;
    font-weight: 600;
}

.command {
    color: var(--text-primary);
    font-weight: 400;
}

.output {
    margin-left: 1.5rem;
    margin-bottom: 2rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
}

.company-name {
    font-size: 3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1rem 0 0.5rem 0;
    letter-spacing: -0.02em;
    font-family: inherit;
}

.company-description {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0;
}

.mission-statement {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.mission-statement p {
    margin-bottom: 1rem;
}

.mission-statement p {
    color: var(--text-secondary);
    font-weight: 400;
}

.output.who-we-are-section p {
    color: var(--text-secondary);
    font-weight: 400;
}

.hero .company-description {
    color: var(--text-primary);
    font-weight: 500;
}

.services-list {
    font-size: 14px;
}

.service-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    position: relative;
}

.service-item:hover {
    background-color: var(--bg-secondary);
    border-color: var(--accent-blue);
    transform: translateX(4px);
}

.service-item:hover .service-name {
    color: var(--accent-green);
}

.service-item:hover .service-desc {
    color: var(--text-primary);
}

.service-icon {
    margin-right: 0.5rem;
    font-size: 16px;
    min-width: 20px;
}

.service-name {
    color: var(--accent-blue);
    margin-right: 1rem;
    min-width: 150px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.service-desc {
    color: var(--text-secondary);
    flex: 1;
    transition: color 0.3s ease;
}

.expand-indicator {
    margin-left: auto;
    color: var(--accent-green);
    font-size: 12px;
    transition: transform 0.3s ease;
}

.service-item.expanded .expand-indicator {
    transform: rotate(90deg);
}

.service-item.expanded .service-icon {
    transform: scale(1.1);
}

.service-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.service-content.expanded {
    max-height: 500px;
    opacity: 1;
}

.service-subitem {
    display: flex;
    align-items: flex-start;
    padding: 0.5rem 1rem;
    margin-bottom: 0.25rem;
    border-radius: 3px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    cursor: pointer;
    border-left: 2px solid transparent;
    gap: 1rem;
}

.service-subitem:hover {
    background-color: rgba(74, 158, 255, 0.1);
    border-left-color: var(--accent-blue);
    transform: translateX(2px);
}

.service-subitem:hover .service-name {
    color: var(--accent-blue);
}

.service-subitem:hover .service-desc {
    color: var(--text-primary);
}

.service-subitem .service-name {
    font-size: 13px;
    min-width: 280px;
    max-width: 320px;
    font-weight: 400;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.service-subitem .service-desc {
    font-size: 12px;
    font-style: italic;
    flex: 1;
}

.cursor-blink {
    margin-top: 2rem;
}

.cursor {
    animation: blink 1s infinite;
    color: var(--accent-green);
    font-weight: 600;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.footer .output {
    margin-bottom: 0;
}

.footer p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.footer a {
    color: var(--accent-blue);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.footer a:hover {
    border-bottom-color: var(--accent-blue);
}

.terminal-chat {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
    font-family: 'JetBrains Mono', monospace;
}

.chat-session {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    margin-bottom: 1rem;
    padding: 0.5rem;
    scroll-behavior: smooth;
}

/* Chat message styling */
.message {
    margin-bottom: 1.5rem; /* Increased spacing between messages */
    display: block;
    font-size: 13px;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.message-prefix {
    font-weight: bold;
    margin-right: 0.25rem;
}

.user-prefix {
    color: #007bff; /* Blue for User: */
}

.assistant-prefix {
    color: #28a745; /* Green for Spring AI: */
}

.message-content {
    color: var(--text-primary);
}

.assistant-content {
    color: #6c757d; /* Grey for Spring AI responses */
}

.user-content {
    color: var(--text-primary); /* Normal color for user messages */
}

.terminal-message {
    margin-bottom: 0.75rem;
    display: block;
    font-size: 13px;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    width: 100%;
    box-sizing: border-box;
}

.terminal-prompt {
    font-weight: 500;
    margin-right: 0.5rem;
    user-select: none;
}

.system-prompt {
    color: #dc3545; /* Spring red for Spring AI */
}

.user-prompt {
    color: #007bff; /* Blue for user - matches chat message prefix */
}

.terminal-text {
    color: var(--text-primary);
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    white-space: pre-wrap;
    max-width: 100%;
    display: inline-block;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    background-color: var(--bg-primary);
    border: 1px solid var(--accent-orange);
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    margin-top: 0.5rem;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    outline: none;
    margin-left: 0.5rem;
}

.terminal-input::placeholder {
    color: var(--text-secondary);
    font-style: italic;
}

.input-hint {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 400;
    margin-left: 0.5rem;
    opacity: 0.7;
}

.typing-indicator .terminal-text {
    color: var(--text-secondary);
    font-style: italic;
}

.typing-dots {
    animation: terminal-typing 1.5s infinite;
}

@keyframes terminal-typing {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

.terminal-chat::-webkit-scrollbar {
    width: 8px;
}

.terminal-chat::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.terminal-chat::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.terminal-chat::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .hero-logo {
        width: 200px;
    }
    
    /* Stack who-we-are section on mobile */
    .who-we-are-section {
        flex-direction: column;
        gap: 1rem;
    }
    
    .who-we-are-logo {
        width: 150px;
        align-self: center;
    }
    
    /* Calendar responsive design */
    .calendar-widget-container iframe {
        height: 500px;
    }
    
    .calendar-config-note {
        padding: 0.75rem;
    }
    
    .company-name {
        font-size: 2rem;
    }
    
    .mission-statement {
        font-size: 14px;
    }
    
    .service-item {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 1rem;
    }
    
    .service-name {
        margin-bottom: 0.25rem;
        min-width: auto;
    }
    
    .service-content {
        margin-left: 0.5rem;
        width: calc(100% - 1rem);
        box-sizing: border-box;
    }
    
    .service-content.expanded {
        max-height: 350px;
        overflow-y: auto;
        overflow-x: hidden;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        position: relative;
        border-radius: 4px;
        background: linear-gradient(to bottom, transparent 90%, rgba(248, 249, 250, 0.8) 100%);
    }
    
    .service-subitem {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.5rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    .service-subitem .service-name {
        min-width: auto;
        margin-bottom: 0.25rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        width: 100%;
        max-width: 100%;
    }
    
    .service-subitem .service-desc {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        width: 100%;
        font-size: 11px;
        line-height: 1.4;
    }
    
    .terminal-chat {
        margin: 0.5rem 0;
        padding: 0.75rem;
    }
    
    .input-hint {
        display: none;
    }
    
    .terminal-input-line {
        flex-direction: column;
        align-items: stretch;
        padding: 0.5rem;
    }
    
    .terminal-input {
        margin-left: 0;
        margin-top: 0.5rem;
        width: 100%;
        box-sizing: border-box;
        font-size: 14px;
        padding: 0.5rem;
        border-radius: 4px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .terminal-input::placeholder {
        font-size: 12px;
    }
    
    .chat-history {
        max-height: 200px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 12px;
    }
    
    .hero-logo {
        width: 180px;
    }
    
    .company-name {
        font-size: 1.5rem;
    }
    
    .mission-statement {
        font-size: 13px;
    }
    
    .terminal-line {
        font-size: 12px;
    }
    
    .section-header {
        font-size: 14px;
    }
    
    .section-icon {
        font-size: 16px;
    }
    
    /* Extra small mobile adjustments */
    .service-content {
        margin-left: 0.25rem;
        width: calc(100% - 0.5rem);
    }
    
    .service-content.expanded {
        max-height: 300px;
        overflow-y: auto;
        overflow-x: hidden;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        position: relative;
        border-radius: 4px;
        background: linear-gradient(to bottom, transparent 90%, rgba(248, 249, 250, 0.8) 100%);
    }
    
    .service-subitem {
        padding: 0.375rem;
    }
    
    .service-subitem .service-desc {
        font-size: 10px;
        line-height: 1.3;
    }
    
    .terminal-chat {
        padding: 0.5rem;
        margin: 0.25rem 0;
    }
    
    .terminal-input {
        font-size: 13px;
        padding: 0.4rem;
    }
    
    .terminal-input::placeholder {
        font-size: 11px;
    }
    
    /* Mobile scrollbar styling for service content */
    .service-content.expanded::-webkit-scrollbar {
        width: 4px;
    }
    
    .service-content.expanded::-webkit-scrollbar-track {
        background: rgba(233, 236, 239, 0.3);
        border-radius: 2px;
    }
    
    .service-content.expanded::-webkit-scrollbar-thumb {
        background: var(--accent-blue);
        border-radius: 2px;
        opacity: 0.7;
    }
    
    .service-content.expanded::-webkit-scrollbar-thumb:hover {
        background: var(--accent-green);
        opacity: 1;
    }
}