/* --- Root Variables (Light Theme) --- */
:root {
    --primary-color: #005a9c; /* A strong, professional blue */
    --secondary-color: #007bff; /* A brighter blue for accents */
    --bg-color: #ffffff;
    --surface-color: #f9f9f9;
    --text-color: #333333;
    --light-gray-color: #ddd;
    --success-color: #28a745;
    --error-color: #dc3545;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --transition-smooth: all 0.3s ease-in-out;
}

/* --- Global Reset & Typography --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 60px 0;
}

h1, h2, h3 {
    line-height: 1.3;
    margin-bottom: 15px;
    color: var(--primary-color);
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; text-align: center; }
p { margin-bottom: 15px; }

.section-subtitle {
    text-align: center;
    max-width: 700px;
    margin: -10px auto 30px auto;
    font-size: 1.1rem;
}

.cta-button {
    display: inline-block;
    background-color: var(--secondary-color);
    color: #fff;
    padding: 12px 28px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 90, 156, 0.2);
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Header & Navigation --- */
.header {
    background-color: var(--bg-color);
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 100;
    box-shadow: var(--shadow);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition-smooth);
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition-smooth);
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background-color: var(--primary-color);
    transition: var(--transition-smooth);
}

/* --- Hero Section --- */
.hero {
    background: linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)), 
                url('https://images.unsplash.com/photo-1569949381669-ecf31ae8e613?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzNjUyOXwwfDF8c2VhcmNofDEwfHxmZW5jZXxlbnwwfHx8fDE2NzU3OTkwMzk&ixlib=rb-4.0.3&q=80&w=1920');
    background-size: cover;
    background-position: center;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content {
    max-width: 700px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 25px;
}

/* --- Services Section --- */
#services {
    background-color: var(--surface-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--bg-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.service-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.service-card h3 {
    margin: 20px 20px 10px 20px;
}
.service-card p {
    padding: 0 20px 20px 20px;
}

/* --- Contact Form --- */
.contact-form {
    max-width: 700px;
    margin: 0 auto;
    display: grid;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    padding: 12px;
    border: 1px solid var(--light-gray-color);
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(0, 90, 156, 0.2);
}

.form-group .error-message {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 5px;
    display: none; /* Hidden by default */
}

.form-group.invalid .error-message {
    display: block; /* Show on invalid */
}

.form-group.invalid input,
.form-group.invalid textarea {
    border-color: var(--error-color);
}

.form-success-message {
    color: var(--success-color);
    background-color: #eaf6ec;
    border: 1px solid var(--success-color);
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    margin-top: 15px;
}

/* --- Footer --- */
.footer {
    background-color: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: 30px 20px;
    margin-top: 30px;
}

/* --- Chatbot Widget --- */
.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.chatbot-toggle-button {
    background-color: var(--primary-color);
    color: white;
    font-size: 2rem;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: var(--transition-smooth);
}

.chatbot-toggle-button:hover {
    background-color: var(--secondary-color);
    transform: scale(1.1);
}

.chatbot-window {
    width: 350px;
    height: 500px;
    background: var(--bg-color);
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Hidden by default, toggled with JS */
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.2s ease-in-out;
    visibility: hidden;
}

.chatbot-window.active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.chatbot-header {
    background: var(--primary-color);
    color: white;
    padding: 15px;
    font-weight: 600;
    text-align: center;
}

.chatbot-body {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    padding: 10px 14px;
    border-radius: 15px;
    max-width: 80%;
    line-height: 1.4;
    word-wrap: break-word;
}

.chat-message.bot {
    background-color: var(--surface-color);
    color: var(--text-color);
    border-bottom-left-radius: 2px;
    align-self: flex-start;
}

.chat-message.user {
    background-color: var(--secondary-color);
    color: white;
    border-bottom-right-radius: 2px;
    align-self: flex-end;
}

.chatbot-footer {
    display: flex;
    border-top: 1px solid #eee;
    padding: 10px;
}

#chatbot-input {
    flex-grow: 1;
    border: 1px solid var(--light-gray-color);
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 0.9rem;
}

#chatbot-input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

#chatbot-send {
    background: var(--secondary-color);
    border: none;
    color: white;
    font-weight: 600;
    border-radius: 20px;
    padding: 0 15px;
    margin-left: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
}
#chatbot-send:hover {
    background: var(--primary-color);
}


/* --- Responsive Design (Media Queries) --- */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }

    .nav-menu {
        position: fixed;
        left: -100%; /* Off-screen */
        top: 70px; /* Below header */
        flex-direction: column;
        background-color: var(--bg-color);
        width: 100%;
        height: calc(100vh - 70px);
        text-align: center;
        transition: 0.3s;
        gap: 0;
    }

    .nav-menu.active {
        left: 0; /* On-screen */
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-link {
        display: block;
        padding: 20px;
        border-bottom: 1px solid #f0f0f0;
    }
    .nav-link:hover, .nav-link:hover::after {
        background-color: var(--surface-color);
        width: 100%;
    }

    .hamburger {
        display: block;
    }

    /* Animate hamburger into an 'X' */
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Make chatbot smaller on mobile */
    .chatbot-window {
        width: calc(100vw - 40px);
        height: 70vh;
        bottom: 20px;
        right: 20px;
    }
    .chatbot-container {
        bottom: 20px;
        right: 20px;
    }
}