/* Global Styles & Variables */
:root {
    --primary-color: #0D47A1; /* Deep Blue */
    --accent-color: #FF6F00; /* Amber/Orange */
    --secondary-accent-color: #E3F2FD; /* Light Blue */
    --text-color: #333333;
    --light-text-color: #FFFFFF;
    --bg-color: #FFFFFF;
    --section-bg-color: #F4F7F6; /* Very Light Gray */
    --card-bg-color: #FFFFFF;
    --border-color: #DDDDDD;
    --font-family: 'Roboto', sans-serif;
    --input-border-color: #CCCCCC;
    --input-focus-border-color: var(--primary-color);
    --button-secondary-bg: #6c757d;
    --chat-ai-bg: #e9e9eb;
    --chat-user-bg: var(--primary-color);
    --chat-user-text: var(--light-text-color);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px; /* Base font size */
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1;
}


.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2, h3, h4 {
    margin-bottom: 0.75em;
    color: var(--primary-color);
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem; /* Responsive: 40px */
}

h2 {
    font-size: 2rem; /* Responsive: 32px */
    text-align: center;
    margin-bottom: 1.5em;
}

h3 {
    font-size: 1.5rem; /* Responsive: 24px */
    color: var(--primary-color);
    text-align: center; /* Center team heading */
    margin-top: 1.5em; /* Space above team heading */
    margin-bottom: 1em;
}

h4 {
    font-size: 1.25rem; /* For card titles like team member names */
    color: var(--primary-color);
}


p {
    margin-bottom: 1em;
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

a:hover, a:focus {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Header & Navigation */
#main-header {
    background-color: var(--bg-color);
    padding: 0.8em 0; /* Adjusted padding */
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#main-header .header-container { /* Renamed for clarity */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-nav-wrapper {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    margin-right: 20px; /* Space between logo and nav/hamburger */
}
.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.logo-link:hover,
.logo-link:focus {
    text-decoration: none; /* Ensure logo link itself doesn't get underlined */
}
.logo-link:hover .logo-text { /* This rule is still fine for specific text styling if needed */
    text-decoration: none; 
}


.logo-icon-container {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 1.5rem; /* 24px */
    font-weight: bold;
}

.logo-b {
    line-height: 1; /* Adjust for better vertical centering if needed */
}

.logo-text {
    font-size: 1.75rem; /* 28px */
    color: var(--primary-color);
}

#main-nav {
    /* Styles for desktop navigation are below */
}

#main-nav ul {
    list-style: none;
    display: flex;
}

#main-nav ul li {
    margin-left: 20px;
}

#main-nav ul li:first-child {
    margin-left: 0;
}


#main-nav ul li a {
    color: var(--primary-color);
    font-weight: 500;
    padding: 0.5em;
    transition: color 0.3s ease;
    display: block; /* Helps with click area */
}

#main-nav ul li a:hover,
#main-nav ul li a:focus,
#main-nav ul li a.active {
    color: var(--accent-color);
    text-decoration: none;
}

.auth-links {
    display: flex;
    align-items: center;
}

.auth-link {
    color: var(--primary-color);
    font-weight: 500;
    padding: 0.5em 0.75em;
    margin-left: 10px;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.auth-link:hover, .auth-link:focus {
    color: var(--accent-color);
    text-decoration: none; /* Keep consistent with nav links */
}

.auth-link.auth-link-register {
    background-color: var(--accent-color);
    color: var(--light-text-color);
    border-color: var(--accent-color);
}

.auth-link.auth-link-register:hover, .auth-link.auth-link-register:focus {
    background-color: #E65100; /* Darker accent */
    border-color: #E65100;
    color: var(--light-text-color);
    text-decoration: none;
}


.menu-toggle {
    display: none; /* Hidden by default, shown in media query */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5em;
    order: -1; /* Ensure it's before nav in flex flow for some mobile layouts */
    margin-right: 10px; /* Space between hamburger and logo if nav is hidden */
}

.hamburger-icon {
    display: block;
    width: 24px;
    height: 3px;
    background-color: var(--primary-color);
    position: relative;
    transition: background-color 0.3s ease-in-out;
}

.hamburger-icon::before,
.hamburger-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 24px;
    height: 3px;
    background-color: var(--primary-color);
    transition: transform 0.3s ease-in-out, top 0.3s ease-in-out;
}

.hamburger-icon::before {
    top: -8px;
}

.hamburger-icon::after {
    top: 8px;
}

.menu-toggle[aria-expanded="true"] .hamburger-icon {
    background-color: transparent; /* Middle bar disappears */
}

.menu-toggle[aria-expanded="true"] .hamburger-icon::before {
    transform: rotate(45deg);
    top: 0;
}

.menu-toggle[aria-expanded="true"] .hamburger-icon::after {
    transform: rotate(-45deg);
    top: 0;
}


/* Hero Section */
#hero {
    background-color: var(--secondary-accent-color);
    color: var(--primary-color);
    padding: 4em 0;
    text-align: center;
    /* min-height: 70vh; */ /* Can be adjusted or removed if not desired */
    display: flex;
    align-items: center;
    justify-content: center;
}

#hero h1 {
    font-size: 3rem; /* 48px */
    margin-bottom: 0.5em;
}

#hero p {
    font-size: 1.25rem; /* 20px */
    margin-bottom: 1.5em;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: #0B3A7B; /* Slightly darker shade of primary for paragraph */
}

.cta-button {
    background-color: var(--accent-color);
    color: var(--light-text-color);
    padding: 0.8em 1.8em;
    border-radius: 25px;
    font-size: 1.1rem; /* 18px */
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-block;
    border: 2px solid transparent;
    text-align: center;
}

.cta-button:hover, .cta-button:focus {
    background-color: #E65100; /* Darker accent */
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    color: var(--light-text-color);
}

.product-cta {
    margin-top: 1em; /* Space above product demo button */
    font-size: 1rem; /* Slightly smaller for product cards */
    padding: 0.7em 1.5em;
}

/* General Section Styling */
main section {
    padding: 4em 0;
}

main section:nth-child(even) { 
    background-color: var(--section-bg-color);
}
#about {
    background-color: var(--bg-color);
}
#industries { 
     background-color: var(--section-bg-color);
}
#products {
    background-color: var(--bg-color);
}
#solutions-delivery {
    background-color: var(--section-bg-color);
}


/* Grid & Card Styles */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2em;
}

.card {
    background-color: var(--card-bg-color);
    padding: 2em;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

.card h3 { /* For product/solution/industry titles in cards */
    margin-bottom: 0.5em;
    font-size: 1.3rem; /* 21px */
    text-align: left; /* Override general h3 center for cards */
    margin-top: 0; /* Override general h3 margin */
}
.card h4 { /* For team member names */
     margin-bottom: 0.25em;
}

.card p {
    font-size: 0.95rem; /* ~15px */
    flex-grow: 1; /* Makes paragraphs take available space, aligning buttons if any */
}

.card-icon {
    font-size: 2.5rem; /* 40px */
    margin-bottom: 0.5em;
    color: var(--accent-color);
}

/* Team Section Styles */
.team-section {
    padding-top: 2em; /* Space between about paragraph and team */
}
.team-member-card {
    text-align: center;
}
.team-member-card .card-icon { /* Specific to team member icon placeholders */
    font-size: 3rem; /* Larger icon for team members */
    margin-bottom: 0.3em;
}
.team-member-title {
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: 500;
    margin-bottom: 0.5em;
}


/* Specific Section Adjustments */
#products .card, #solutions-delivery .card {
    text-align: center;
}
#products .card h3, #solutions-delivery .card h3 {
    text-align: center; /* Center h3 for these specific cards */
}


/* Footer */
#contact { /* Footer id is contact */
    background-color: var(--primary-color);
    color: var(--light-text-color);
    padding: 3em 0;
    text-align: center;
}

#contact .logo .logo-text,
#contact .footer-logo .logo-text { /* Ensure footer logo text is light */
    color: var(--light-text-color);
}
#contact .logo .logo-icon-container,
#contact .footer-logo .logo-icon-container { /* Ensure footer logo icon is styled for dark bg */
    background-color: var(--light-text-color);
    color: var(--primary-color);
}

#contact h3 { /* General h3 in footer, e.g. "Contact Us" */
    color: var(--light-text-color);
    text-align: center;
}

#contact p {
    margin-bottom: 0.5em;
    font-size: 0.9rem;
}

#contact a {
    color: var(--accent-color);
    font-weight: 500;
}

#contact a:hover, #contact a:focus {
    color: #FFC107; /* Lighter Orange for hover on dark background */
    text-decoration: underline; /* Footer links can have underline on hover */
}
#contact .logo-link:hover, /* Ensure footer logo link doesn't get underline from general #contact a:hover */
#contact .logo-link:focus {
    text-decoration: none;
}


/* Login and Register Page Styles */
.auth-page-container {
    max-width: 450px;
    margin: 3em auto;
    padding: 2em;
    background-color: var(--card-bg-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.auth-page-container h1 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 1.2em;
}

.form-group {
    margin-bottom: 1.2em;
}

.form-group label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 0.8em;
    border: 1px solid var(--input-border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus {
    outline: none;
    border-color: var(--input-focus-border-color);
    box-shadow: 0 0 0 2px rgba(13, 71, 161, 0.2);
}

.auth-button {
    width: 100%;
    padding: 0.9em;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.auth-button.primary {
    background-color: var(--primary-color);
    color: var(--light-text-color);
}
.auth-button.primary:hover, .auth-button.primary:focus {
    background-color: #0B3A7B; /* Darker primary */
}

.sso-options {
    margin-top: 1.5em;
    text-align: center;
}
.sso-options p {
    margin-bottom: 0.7em;
    font-size: 0.9rem;
    color: #555;
}
.sso-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.7em;
    margin-bottom: 0.7em;
    font-size: 1rem;
    border-radius: 4px;
    border: 1px solid var(--input-border-color);
    background-color: #fff;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.sso-button img {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}
.sso-button:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
}


.auth-links-footer {
    text-align: center;
    margin-top: 1.5em;
}
.auth-links-footer p {
    font-size: 0.95rem;
    margin-bottom: 0;
}
.auth-links-footer a {
    font-weight: 500;
    text-decoration: none; /* remove default underline */
}
.auth-links-footer a:hover,
.auth-links-footer a:focus {
    text-decoration: underline; /* add underline on hover/focus */
}


.forgot-password-link {
    display: block;
    text-align: right;
    font-size: 0.9rem;
    margin-top: 0.5em;
    margin-bottom: 1em;
    text-decoration: none; /* remove default underline */
}
.forgot-password-link:hover,
.forgot-password-link:focus {
    text-decoration: underline; /* add underline on hover/focus */
}

/* Live Chat Styles */
.live-chat-toggle-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: var(--light-text-color);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease, transform 0.2s ease;
    z-index: 1001; /* Above most content, below modals if any */
}

.live-chat-toggle-button:hover, .live-chat-toggle-button:focus {
    background-color: #0B3A7B; /* Darker primary */
    transform: scale(1.05);
}

.live-chat-toggle-button svg {
    pointer-events: none; /* Make sure SVG doesn't capture clicks meant for button */
}

.chat-widget {
    position: fixed;
    bottom: 90px; /* Above the toggle button */
    right: 20px;
    width: 350px;
    max-width: 90vw;
    height: 500px;
    max-height: 70vh;
    background-color: var(--bg-color);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000; /* Same as header, can be adjusted */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.chat-widget[hidden] {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
}

.chat-widget-header {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.chat-widget-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
    color: var(--light-text-color);
    text-align: left;
}

.chat-widget-close-button {
    background: none;
    border: none;
    color: var(--light-text-color);
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}
.chat-widget-close-button svg {
    display: block;
}

.chat-messages {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    padding: 8px 12px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
    font-size: 0.95rem;
    line-height: 1.4;
}
.message .message-content {
    white-space: pre-wrap; /* Preserve newlines from AI */
}

.user-message {
    background-color: var(--chat-user-bg);
    color: var(--chat-user-text);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.ai-message {
    background-color: var(--chat-ai-bg);
    color: var(--text-color);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-input-form {
    display: flex;
    padding: 10px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-color);
}

.chat-input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid var(--input-border-color);
    border-radius: 20px;
    margin-right: 8px;
    font-size: 0.95rem;
    resize: none; /* if it were a textarea */
}
.chat-input:focus {
    outline: none;
    border-color: var(--input-focus-border-color);
    box-shadow: 0 0 0 2px rgba(13, 71, 161, 0.2);
}

.chat-send-button {
    background-color: var(--accent-color);
    color: var(--light-text-color);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.chat-send-button:hover, .chat-send-button:focus {
    background-color: #E65100; /* Darker accent */
}
.chat-send-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}
.chat-send-button svg {
    margin-left: 2px; /* Slight adjustment for send icon */
}

.chat-loading-indicator {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    font-size: 0.9rem;
    color: #555;
    background-color: var(--bg-color); /* To cover messages if positioned absolutely */
}

.chat-loading-indicator .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--accent-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* Responsive Design */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    #hero h1 { font-size: 2.5rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.3rem; }
    h4 { font-size: 1.1rem; }

    #main-header .header-container {
        position: relative; /* For positioning mobile nav */
    }
    
    .logo-nav-wrapper {
        /* flex-grow: 1; Removed */
    }

    .auth-links {
        margin-left: auto; 
        padding-left: 10px; 
    }
    .auth-link {
        font-size: 0.9rem;
        padding: 0.4em 0.6em;
    }


    .menu-toggle {
        display: block; 
        z-index: 1001; 
        margin-left: 10px; 
        margin-right: 0;
    }

    #main-nav {
        /* display: none;  Removed to allow max-height transition */
        display: block; /* Keep it block for max-height to work */
        position: absolute;
        top: 100%; 
        left: 0;
        width: 100%;
        background-color: var(--bg-color);
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        z-index: 1000;
        max-height: 0; /* Initial state for transition */
        overflow: hidden;
        transition: max-height 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    }
    
    #main-nav.nav-active {
       /* display: block; No longer needed here, already block */
       max-height: 500px; /* Target height for transition */
    }

    #main-nav ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding: 1em 0; 
    }

    #main-nav ul li {
        margin: 10px 0; 
        width: 100%;
        text-align: center;
        margin-left: 0; 
    }
    #main-nav ul li a {
        padding: 0.8em;
        width: 100%; 
    }

    #hero {
        padding: 3em 0;
        min-height: auto;
    }
    #hero p {
        font-size: 1.1rem;
    }

    .grid-container {
        grid-template-columns: 1fr; /* Stack cards on smaller screens */
    }

    main section {
        padding: 3em 0;
    }
    
    .auth-page-container {
        margin: 2em auto;
        padding: 1.5em;
    }

    .chat-widget {
        bottom: 0;
        right: 0;
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    .live-chat-toggle-button {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }
    .live-chat-toggle-button svg {
      width: 24px;
      height: 24px;
    }

}

@media (max-width: 480px) {
    :root {
        font-size: 14px; /* Adjust base font for very small screens */
    }
    .logo-text { font-size: 1.5rem; }
    .logo-icon-container { width: 35px; height: 35px; font-size: 1.3rem;}

    .auth-links {
        justify-content: flex-end; 
    }
     .auth-link {
        font-size: 0.85rem;
        padding: 0.4em 0.5em;
    }

    .cta-button {
        padding: 0.7em 1.5em;
        font-size: 1rem;
    }

    #main-nav ul li {
        margin: 5px 0;
    }

    .auth-page-container {
        width: 95%;
        padding: 1em;
    }
    .auth-page-container h1 {
        font-size: 1.6rem;
    }
    .sso-button {
        font-size: 0.9rem;
    }

}