/*
 * Global styles and variables
 *
 * This stylesheet defines the look and feel of the 3nom.AI marketing site.
 * It uses a dark theme with bright accent colors to convey a modern, tech‑savvy
 * aesthetic. The layout is responsive and adapts gracefully to smaller screens.
 */

:root {
    /* Colour palette inspired by modern tech brands */
    --color-bg-primary: #0a192f;      /* Very dark blue background */
    --color-bg-secondary: #112240;    /* Slightly lighter dark blue */
    --color-accent: #38bdf8;          /* Bright sky blue accent */
    --color-primary: #2563eb;         /* Indigo primary (buttons) */
    --color-text-light: #f1f5f9;      /* Very light grey for headings */
    --color-text-medium: #cbd5e1;     /* Soft light grey for paragraphs */
    --color-text-muted: #94a3b8;      /* Muted grey for small text */
}

/* Reset and basic styling */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    color: var(--color-text-light);
    background-color: var(--color-bg-primary);
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Navbar styling */
.navbar {
    background-color: rgba(10, 25, 47, 0.9);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo img {
    height: 42px;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links li a {
    color: var(--color-text-light);
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* Button styling */
.cta-btn {
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 0.9rem;
}

.cta-btn.chat-btn {
    background-color: var(--color-accent);
    color: var(--color-bg-primary);
}

.cta-btn.secondary-btn {
    background-color: transparent;
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    margin-left: 0.5rem;
}

.cta-btn.submit-btn {
    background-color: var(--color-primary);
    color: #ffffff;
}

.cta-btn:hover {
    background-color: var(--color-primary);
    color: #ffffff;
}

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

/* Hero section */
.hero {
    position: relative;
    height: 80vh;
    min-height: 500px;
    /* Use the locally stored hero image for the background */
    background: url('hero.png') center/cover no-repeat;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: left;
    padding: 0 1rem;
}

.hero .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 25, 47, 0.6);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    /* Add padding-top to prevent overlap with the fixed navbar */
    padding-top: 4rem;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content .subtitle {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--color-text-medium);
}

.benefits {
    margin-bottom: 1.5rem;
}

.benefits li {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.benefits li i {
    /* Enhance icons in the hero benefits list with circular backgrounds for more visual finesse */
    margin-right: 0.8rem;
    color: var(--color-accent);
    background-color: rgba(56, 189, 248, 0.15);
    border-radius: 50%;
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Section styling */
.services-section, .process-section, .about-section, .contact-section {
    padding: 4rem 1rem;
}

.services-section {
    background-color: var(--color-bg-secondary);
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--color-bg-primary);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.service-icon {
    font-size: 2.5rem;
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.step {
    background-color: var(--color-bg-primary);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.step-number {
    display: inline-block;
    background-color: var(--color-accent);
    color: var(--color-bg-primary);
    font-weight: 700;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    line-height: 40px;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.about-section .about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-section p {
    line-height: 1.7;
    margin-bottom: 1rem;
    color: var(--color-text-medium);
}

.contact-section {
    background-color: var(--color-bg-secondary);
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 2rem;
}

.contact-form {
    flex: 1;
    min-width: 300px;
    background-color: var(--color-bg-primary);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.contact-form .form-group {
    margin-bottom: 1rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #334155;
    border-radius: 4px;
    background-color: #0f2545;
    color: #ffffff;
    font-size: 1rem;
}

.contact-form textarea {
    resize: vertical;
}

.contact-details {
    flex: 1;
    min-width: 300px;
    background-color: var(--color-bg-primary);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    color: var(--color-text-medium);
}

.contact-details h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--color-text-light);
}

.footer {
    background-color: var(--color-bg-primary);
    padding: 2rem 1rem;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* Footer layout for office information */
.footer-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1rem;
    text-align: left;
    color: var(--color-text-medium);
}

.footer-column h4 {
    margin: 0 0 0.4rem 0;
    color: var(--color-text-light);
    font-size: 1rem;
}

.footer-column p {
    margin: 0;
    line-height: 1.4;
}

/* Responsive footer adjustments */
@media (max-width: 768px) {
    .footer-info {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    .nav-links {
        display: none; /* Hide navigation links on small screens; a hamburger menu could be implemented here if desired */
    }
    .services-grid,
    .process-steps {
        grid-template-columns: 1fr;
    }
    .contact-container {
        flex-direction: column;
    }

    /* Increase top padding on small screens to avoid overlap with navbar */
    .hero-content {
        padding-top: 5rem;
    }
}

/*
 * Blog section styles
 * These classes style the blog listing page and individual post pages.
 */

/* Blog header for listing page */
.blog-header {
    padding: 8rem 1rem 4rem;
    text-align: center;
    background-color: var(--color-bg-secondary);
}

.blog-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.blog-header p {
    color: var(--color-text-medium);
    max-width: 700px;
    margin: 0 auto;
}

/* Posts grid on blog listing page */
.post-listing {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.post-card {
    background-color: var(--color-bg-primary);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.post-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.post-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-info h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.blog-date {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 0.8rem;
}

.post-info p {
    flex-grow: 1;
    color: var(--color-text-medium);
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Post hero section for individual articles */
.post-hero {
    position: relative;
    height: 50vh;
    min-height: 300px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
}

.post-hero .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 25, 47, 0.6);
}

.post-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 1rem;
}

.post-body {
    padding: 4rem 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.post-body h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.post-body p {
    margin-bottom: 1.5rem;
    color: var(--color-text-medium);
    line-height: 1.7;
    font-size: 1.05rem;
}

/* Chat widget styles */
.chat-widget {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 320px;
    max-height: 60vh;
    background-color: var(--color-bg-secondary);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
}

.chat-header {
    background-color: var(--color-accent);
    color: var(--color-bg-primary);
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    font-size: 1rem;
}

.chat-close {
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
}

.chat-messages {
    flex-grow: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.chat-messages .message {
    margin-bottom: 0.8rem;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    max-width: 80%;
    word-wrap: break-word;
}

.chat-messages .message.user {
    background-color: var(--color-primary);
    color: #ffffff;
    align-self: flex-end;
}

.chat-messages .message.ai {
    background-color: var(--color-bg-primary);
    color: var(--color-text-medium);
    align-self: flex-start;
    border: 1px solid #334155;
}

.chat-input {
    display: flex;
    border-top: 1px solid #334155;
}

.chat-input input {
    flex-grow: 1;
    padding: 0.6rem;
    border: none;
    background-color: #0f2545;
    color: #ffffff;
    font-size: 1rem;
    outline: none;
}

.chat-input button {
    background-color: var(--color-accent);
    border: none;
    color: var(--color-bg-primary);
    padding: 0 1rem;
    cursor: pointer;
    font-weight: 600;
}

.chat-input button:hover {
    background-color: var(--color-primary);
}