/* =========================================
   UNIFIED STYLESHEET - Zero Point AI
   Single source of truth for all styling
   ========================================= */

/* ==================== BASE & RESET ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f0;
    min-height: 100vh;
}

html {
    scroll-behavior: smooth;
}

/* ==================== CONTAINER ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== UTILITY CLASSES ==================== */
.hidden {
    display: none !important;
}

/* ==================== TYPOGRAPHY ==================== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto', sans-serif;
    color: #150438;
}

/* ==================== BUTTONS ==================== */
button,
.btn {
    background: #1A46F1;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    border: 2px solid #1A46F1;
}

/* ==================== ABOUT SECTION CUSTOM STYLING ==================== */
.about-section {
    background: linear-gradient(135deg, #150438 0%, #1A46F1 100%) !important;
}

.about-section .section-title {
    color: #f5f5f0;
}

.about-section .content-block p {
    color: #f5f5f0;
    line-height: 1.8;
}

.about-cta {
    text-align: center;
    margin-top: 30px;
}
.about-us-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    margin: 30px auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 0 0 2px #150438, 0 4px 12px rgba(21, 4, 56, 0.15);
}

button:hover,
.btn:hover {
    background: white;
    color: #1A46F1;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(26, 70, 241, 0.4);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #cbd5e1;
    transform: none;
}

.btn-primary {
    background: #1A46F1;
    color: white;
    padding: 14px;
}

.btn-primary:hover {
    background: white;
    color: #1A46F1;
}

.btn-secondary {
    background: #64748b;
    border-color: #64748b;
}

.btn-secondary:hover {
    background: white;
    color: #64748b;
}

.btn-danger {
    background: #ef4444;
    border-color: #ef4444;
}

.btn-danger:hover {
    background: white;
    color: #ef4444;
}

/* ==================== FORMS ==================== */
input[type="text"], 
input[type="password"], 
input[type="email"], 
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    background: white;
}

input:focus, 
textarea:focus,
select:focus {
    outline: none;
    border-color: #1A46F1;
    box-shadow: 0 0 0 3px rgba(26, 70, 241, 0.1);
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #475569;
}

.form-group {
    margin-bottom: 20px;
}

.form-group small {
    color: #64748b;
}

/* ==================== MESSAGES ==================== */
.error-message {
    color: #dc2626;
    font-size: 14px;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #fee2e2;
    border-radius: 6px;
    border: 1px solid #fecaca;
}

.success-message {
    color: #059669;
    font-size: 14px;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #d1fae5;
    border-radius: 6px;
    border: 1px solid #a7f3d0;
}

/* ==================== HEADER ==================== */
header {
    background: #150438;
    padding: 5px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    isolation: isolate; 
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 50px;
    width: auto;
}

.logo-placeholder {
    height: 60px;
    width: 200px;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f5f5f0;
    font-weight: bold;
    border-radius: 4px;
    border: 2px solid #1A46F1;
}

/* ==================== NAVIGATION ==================== */
nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    align-items: center;
}

nav li {
    position: relative;
}

nav a {
    text-decoration: none;
    color: #f5f5f0;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: #1A46F1;
}

nav a.active {
    color: #1A46F1;
    font-weight: 700;
}

/* Dropdown Styles */
nav .dropdown {
    position: relative;
}

nav .dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 0;
}

nav .dropdown-toggle::after {
    content: '▼';
    font-size: 0.7rem;
    transition: transform 0.3s;
}

nav .dropdown:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

nav .dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: #150438;
    min-width: 220px;
    padding: 10px 0;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border: 2px solid #1A46F1;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
    pointer-events: none;
}

nav .dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 20px;
    z-index: 9999;
}

nav .dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

nav .dropdown-menu li {
    padding: 0;
}

nav .dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: #f5f5f0;
    transition: background 0.3s, color 0.3s;
}

nav .dropdown-menu a:hover {
    background: rgba(26, 70, 241, 0.2);
    color: #1A46F1;
}

nav .contact-btn {
    background: #1A46F1;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    border: 2px solid #1A46F1;
    transition: all 0.3s;
    font-weight: 600;
}

nav .contact-btn:hover {
    background: white;
    color: #1A46F1;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(26, 70, 241, 0.4);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #f5f5f0;
}

/* ==================== HERO SECTION ==================== */
.hero {
    background: linear-gradient(rgba(21, 4, 56, 0.7), rgba(26, 70, 241, 0.7)), url('../images/hero-background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero h1 {
    font-family: 'Roboto', sans-serif;
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    color: white;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* ==================== SECTIONS ==================== */
.section {
    padding: 80px 0;
    background: #f5f5f0;
}

.section:nth-child(even) {
    background: #ffffff;
}

.section-title {
    font-family: 'Roboto', sans-serif;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    color: #150438;
}

/* ==================== GRID LAYOUT ==================== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

/* ==================== CARDS ==================== */
.card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(21, 4, 56, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 3px solid #1A46F1;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(26, 70, 241, 0.2);
}

.card-image {
    width: 100%;
    height: 250px;
    background: #e8e8e3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 1.1rem;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    padding: 25px;
}

.card-title {
    font-family: 'Roboto', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #150438;
}

.card-text {
    color: #555;
    line-height: 1.7;
}

.card-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: #1A46F1;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 500;
    border: 2px solid #1A46F1;
}

.card-link:hover {
    transform: translateY(-2px);
    background: white;
    color: #1A46F1;
    box-shadow: 0 4px 15px rgba(26, 70, 241, 0.4);
}

/* ==================== TWO COLUMN LAYOUT ==================== */
.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.image-placeholder {
    width: 100%;
    height: 400px;
    background: #e8e8e3;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 1.2rem;
    border: 2px solid #1A46F1;
}

.image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.content-block h2 {
    font-family: 'Roboto', sans-serif;
    font-size: 2rem;
    margin-bottom: 20px;
    color: #150438;
}

.content-block p {
    margin-bottom: 15px;
    color: #555;
    line-height: 1.8;
}

/* ==================== FOOTER ==================== */
footer {
    background: #150438;
    color: #f5f5f0;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-family: 'Roboto', sans-serif;
    color: #f5f5f0;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #d0d0c8;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #1A46F1;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(26, 70, 241, 0.3);
    color: #d0d0c8;
}

/* ==================== SOLUTIONS CAROUSEL ==================== */
.solutions-carousel {
    position: relative;
    overflow: hidden;
    padding: 2rem 0;
    background: #f5f5f0;
}

.solutions-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 2rem;
    will-change: transform;
}

.solution-card {
    flex: 0 0 calc((100% - 4rem) / 3);
    width: calc((100% - 4rem) / 3);
    max-width: calc((100% - 4rem) / 3);
    opacity: 1;
    transition: opacity 0.6s ease;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.carousel-button {
    background: #1A46F1;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: white;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(26, 70, 241, 0.3);
}

.carousel-button:hover {
    transform: scale(1.1);
    background: #0f2fb3;
    box-shadow: 0 6px 20px rgba(26, 70, 241, 0.5);
}

.carousel-button:active {
    transform: scale(0.95);
}

.carousel-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: scale(1);
    background: #666;
}

.carousel-dots {
    display: flex;
    gap: 0.5rem;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #cbd5e0;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.carousel-dot.active {
    background: #1A46F1;
    width: 30px;
    border-radius: 5px;
}

.card.solution-item {
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.card.solution-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(26, 70, 241, 0.2);
}

.card.solution-item .card-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #150438 0%, #1A46F1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    overflow: hidden;
    position: relative;
}

.card.solution-item .card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.card.solution-item .card-text {
    flex: 1;
    color: #4a5568;
    line-height: 1.6;
}

/* ==================== AUTH FORMS ==================== */
.login-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-form {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    width: 100%;
    max-width: 400px;
}

.login-form h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #1e293b;
    font-size: 28px;
}

.auth-link-text {
    text-align: center;
    margin-top: 20px;
    color: #64748b;
}

.auth-link {
    color: #1A46F1;
    text-decoration: none;
    font-weight: 500;
}

.auth-link:hover {
    text-decoration: underline;
}

/* ==================== LOADING & ANIMATIONS ==================== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f1f5f9;
    border-top: 3px solid #1A46F1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f1f5f9;
    border-top: 4px solid #1A46F1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ==================== CHAT MESSAGE BUBBLES ==================== */
.message {
    display: flex;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

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

/* User messages - align right with blue bubble */
.message.user {
    justify-content: flex-end;
}

.message.user .message-bubble {
    background: #1A46F1;
    color: white;
    border-radius: 18px 18px 4px 18px;
    max-width: 70%;
    padding: 12px 18px;
    box-shadow: 0 2px 8px rgba(26, 70, 241, 0.2);
}

/* Agent messages - align left with white bubble */
.message.agent {
    justify-content: flex-start;
}

.message.agent .message-bubble {
    background: white;
    color: #333;
    border-radius: 18px 18px 18px 4px;
    max-width: 70%;
    padding: 12px 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

/* Message content styling */
.message-bubble {
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.message-bubble p {
    margin: 0 0 8px 0;
}

.message-bubble p:last-child {
    margin-bottom: 0;
}

/* Markdown Support - Headers */
.message-bubble h1,
.message-bubble h2,
.message-bubble h3,
.message-bubble h4,
.message-bubble h5,
.message-bubble h6 {
    margin: 12px 0 8px 0;
    font-weight: 600;
    line-height: 1.3;
}

.message-bubble h1 { font-size: 1.5em; }
.message-bubble h2 { font-size: 1.3em; }
.message-bubble h3 { font-size: 1.15em; }
.message-bubble h4 { font-size: 1.05em; }
.message-bubble h5 { font-size: 1em; }
.message-bubble h6 { font-size: 0.95em; }

.message.user .message-bubble h1,
.message.user .message-bubble h2,
.message.user .message-bubble h3,
.message.user .message-bubble h4,
.message.user .message-bubble h5,
.message.user .message-bubble h6 {
    color: white;
}

/* Markdown Support - Lists */
.message-bubble ul,
.message-bubble ol {
    margin: 8px 0;
    padding-left: 24px;
}

.message-bubble li {
    margin: 4px 0;
}

.message-bubble ul {
    list-style-type: disc;
}

.message-bubble ol {
    list-style-type: decimal;
}

/* Markdown Support - Links */
.message-bubble a {
    color: #1A46F1;
    text-decoration: underline;
    transition: opacity 0.2s;
}

.message.user .message-bubble a {
    color: white;
    text-decoration: underline;
}

.message-bubble a:hover {
    opacity: 0.8;
}

/* Markdown Support - Emphasis */
.message-bubble strong {
    font-weight: 600;
}

.message-bubble em {
    font-style: italic;
}

/* Markdown Support - Blockquotes */
.message-bubble blockquote {
    margin: 8px 0;
    padding: 8px 12px;
    border-left: 3px solid #cbd5e1;
    background: #f8f9fa;
    font-style: italic;
}

.message.user .message-bubble blockquote {
    border-left-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
}

/* Markdown Support - Horizontal Rules */
.message-bubble hr {
    margin: 12px 0;
    border: none;
    border-top: 1px solid #cbd5e1;
}

.message.user .message-bubble hr {
    border-top-color: rgba(255, 255, 255, 0.3);
}

/* Markdown Support - Tables */
.message-bubble table {
    border-collapse: collapse;
    margin: 8px 0;
    width: 100%;
    font-size: 0.95em;
}

.message-bubble th,
.message-bubble td {
    border: 1px solid #cbd5e1;
    padding: 6px 10px;
    text-align: left;
}

.message-bubble th {
    background: #f1f5f9;
    font-weight: 600;
}

.message.user .message-bubble th {
    background: rgba(255, 255, 255, 0.2);
}

.message.user .message-bubble td,
.message.user .message-bubble th {
    border-color: rgba(255, 255, 255, 0.3);
}

/* Code blocks in messages */
.message-bubble pre {
    background: #f1f5f9;
    padding: 8px 12px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 8px 0;
}

.message.user .message-bubble pre {
    background: rgba(255, 255, 255, 0.2);
}

.message-bubble code {
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

/* Inline code */
.message-bubble :not(pre) > code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

.message.user .message-bubble :not(pre) > code {
    background: rgba(255, 255, 255, 0.2);
}

/* Message timestamp (if needed) */
.message-timestamp {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
    text-align: right;
}

.message.agent .message-timestamp {
    text-align: left;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 968px) {
    .solution-card {
        flex: 0 0 calc((100% - 2rem) / 2);
        width: calc((100% - 2rem) / 2);
        max-width: calc((100% - 2rem) / 2);
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .two-column {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .menu-toggle {
        display: block;
    }

    nav ul {
        display: none;
        flex-direction: column;
        gap: 0;
        position: absolute;
        top: 80px;
        right: 20px;
        background: #150438;
        padding: 10px 0;
        box-shadow: 0 3px 10px rgba(0,0,0,0.3);
        border-radius: 8px;
        border: 2px solid #1A46F1;
        min-width: 200px;
    }

    nav ul.active {
        display: flex;
    }

    nav li {
        width: 100%;
    }

    nav a {
        display: block;
        padding: 12px 20px;
    }

    nav .dropdown-menu {
        position: static;
        display: none;
        margin: 0;
        border: none;
        border-top: 1px solid rgba(26, 70, 241, 0.3);
        border-radius: 0;
        box-shadow: none;
        background: rgba(26, 70, 241, 0.1);
    }

    nav .dropdown.active .dropdown-menu {
        display: block;
    }

    nav .dropdown-toggle::after {
        float: right;
    }

    nav .contact-btn {
        margin: 10px 15px;
        text-align: center;
        display: block;
    }

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

    .section {
        padding: 50px 0;
    }
}

@media (max-width: 640px) {
    .solution-card {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
    }
    
    .solutions-track {
        gap: 1rem;
    }
    
    /* Make message bubbles wider on mobile */
    .message.user .message-bubble,
    .message.agent .message-bubble {
        max-width: 85%;
    }
}