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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Slightly darker grey */
    background-color: #f8f9fa; /* Lighter, cleaner background */
}

.container {
    width: 80%;
    margin: auto;
    overflow: hidden;
}

/* Header */
header {
    background: #005fcc; /* Slightly brighter primary blue */
    color: #ffffff;
    padding-top: 30px;
    min-height: 70px;
    border-bottom: #004c9e 4px solid; /* Refined darker blue border */
}

header a {
    color: #ffffff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 16px;
}

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

header li {
    float: left;
    display: inline;
    padding: 0 20px 0 20px;
}

header #branding {
    float: left;
}

header #branding h1 {
    margin: 0;
    font-size: 28px;
}

header nav {
    float: right;
    margin-top: 10px;
}

header .highlight,
header .current a {
    color: #ffdd57; /* Soft Gold accent */
    font-weight: bold;
}

header a:hover {
    color: #e0e0e0; /* Lighter grey on hover */
    font-weight: bold;
}

/* Showcase Section */
#showcase {
    min-height: 400px;
    /* Using a gradient for a bit more depth */
    background: linear-gradient(rgba(0, 95, 204, 0.8), rgba(0, 76, 158, 0.9)), url('https://via.placeholder.com/1500x400/eeeeee/333333?text=Tengo+University+Campus') no-repeat center center;
    background-size: cover;
    text-align: center;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

#showcase h1 {
    margin-top: 0; /* Removed fixed margin-top as flexbox handles centering */
    font-size: 50px; /* Slightly adjusted */
    margin-bottom: 15px;
}

#showcase p {
    font-size: 22px; /* Slightly larger */
}

/* Main Content */
#main-content {
    padding: 30px 0; /* Increased padding */
    background: #ffffff;
}

#main-content .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Responsive grid */
    grid-gap: 20px;
}

.content-section {
    padding: 25px;
    background: #ffffff; /* Keep content sections white for now */
    border-radius: 8px; /* Slightly more rounded corners */
    border: 1px solid #e0e0e0; /* Lighter border */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Subtle shadow for depth */
}

.content-section h2 {
    color: #005fcc; /* Brighter blue for headings */
    margin-bottom: 15px;
    border-bottom: 2px solid #e0e0e0; /* Subtle underline */
    padding-bottom: 5px;
}

.content-section ul {
    list-style: none;
    padding: 0;
}

.content-section ul li {
    margin-bottom: 5px;
}

.content-section ul li a {
    text-decoration: none;
    color: #004c9e; /* Darker blue for links */
    transition: color 0.3s ease;
}

.content-section ul li a:hover {
    color: #ffdd57; /* Gold accent on hover */
    text-decoration: none;
}

/* Footer */
footer {
    padding: 25px;
    margin-top: 30px;
    color: #e0e0e0; /* Lighter text for footer */
    background-color: #004c9e; /* Darker Blue */
    text-align: center;
}

/* Chat Widget Styles */
#chat-widget-container {
    position: fixed;
    bottom: 90px; 
    right: 20px;
    width: 350px; 
    max-height: calc(100vh - 110px); 
    z-index: 1000; 
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    overflow: hidden;
    display: flex; 
    flex-direction: column; /* Main direction */
    background-color: #ffffff;
    /* Transition properties */
    transform: translateY(20px); 
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out, visibility 0s linear 0.3s;
}

#chat-widget-container.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out, visibility 0s linear 0s;
}

/* Styles for direct children of the container */
#chat-widget-container > h2 {
    color: #0056b3;
    text-align: center;
    margin: 0;
    padding: 15px;
    font-weight: 600;
    font-size: 1.1em;
    background-color: #f8f9fa; /* Header background */
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0; /* Header should not shrink */
}

#chat-widget-container > #chat-output { /* Target direct child */
    flex-grow: 1; /* Allows it to take up available vertical space */
    min-height: 0; /* Crucial for flex + overflow */
    overflow-y: auto; /* Enable vertical scrolling */
    overflow-x: hidden; 
    padding: 20px; 
    background-color: #e8f0f7; 
    display: flex;
    flex-direction: column;
    gap: 15px; 
    /* Custom scrollbar styles remain */
    &::-webkit-scrollbar {
        width: 6px;
    }
    &::-webkit-scrollbar-thumb {
        background-color: #c1d9f0;
        border-radius: 3px;
    }
    &::-webkit-scrollbar-track {
        background-color: transparent;
    }
}

#chat-widget-container > #chat-input-area { /* Target direct child */
    display: flex;
    padding: 12px 15px; 
    border-top: 1px solid #dee2e6; 
    background-color: #f1f3f5; 
    align-items: center; 
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.04); 
    flex-shrink: 0; /* Input area should not shrink */
}

/* Keep message styles (.message, .user-message, .ai-message) */
.message {
    padding: 12px 18px;
    border-radius: 18px;
    max-width: 80%;
    line-height: 1.55;
    word-wrap: break-word;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.07);
    transition: transform 0.2s ease-out;
}

.user-message {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-bottom-right-radius: 6px;
    align-self: flex-end;
    margin-left: auto;
}

.ai-message {
    background: #ffffff;
    color: #343a40;
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 6px;
    align-self: flex-start;
    margin-right: auto;
}

.ai-message.thinking {
    background-color: #f8f9fa;
    border-color: #e0e0e0;
    color: #6c757d;
    font-style: italic;
    box-shadow: none;
}

.ai-message.thinking em {
    color: inherit;
}

.message:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

/* Keep input field and send button styles */
#user-input { 
    flex-grow: 1;
    padding: 10px 18px; 
    border: 1px solid #ced4da;
    border-radius: 20px; 
    font-size: 15px; 
    margin-right: 10px;
    outline: none;
    background-color: #ffffff; 
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    color: #495057; 
}

#user-input::placeholder {
    color: #adb5bd; 
}

#user-input:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); 
}

#send-button {
    padding: 0; 
    width: 42px; 
    height: 42px; 
    background-color: #007bff; 
    color: white;
    border: none;
    border-radius: 50%; 
    font-size: 20px; 
    line-height: 42px; 
    text-align: center; 
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    display: flex; 
    align-items: center;
    justify-content: center;
    flex-shrink: 0; 
}

#send-button:hover {
    background-color: #0056b3; 
    transform: scale(1.05);
}

#send-button:active { 
    transform: scale(0.95);
    background-color: #004085;
}

/* Chat Toggle Button Styles */
#chat-toggle-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%; /* Circular */
    font-size: 16px; /* Adjust if using icon */
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 1001; /* Above the chat widget */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#chat-toggle-button:hover {
    background-color: #0056b3;
    transform: scale(1.05); /* Slight grow effect */
}

/* Utility Classes */
.container {
    width: 80%;
    margin: auto;
    overflow: hidden;
}

/* Responsive Design */
@media(max-width: 768px){
    /* Remove responsive rules that adjusted the old chat container */
    /* 
    #chat-container {
        ...
    }
    */

    #chat-widget-container {
        width: calc(100% - 20px); /* Almost full width */
        max-height: calc(100vh - 80px); /* Adjust height */
        bottom: 70px; /* Position above toggle */
        right: 10px;
        left: 10px; /* Center it horizontally */
    }

    #chat-toggle-button {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
        font-size: 14px;
    }

    /* Keep other general responsive rules */
    header #branding,
    header nav,
    header nav li,
    #main-content .container {
        float: none;
        text-align: center;
        width: 100%;
        grid-template-columns: 1fr; /* Stack grid items on smaller screens */
    }

    header {
        padding-bottom: 20px;
    }

    #showcase h1 {
        font-size: 40px;
    }

    #showcase p {
        font-size: 18px;
    }

    header nav ul {
        margin-top: 10px;
    }

    header nav li {
        padding: 5px 10px;
    }

    #chat-output {
        padding: 15px;
    }

    .message {
        max-width: 85%;
        padding: 10px 15px;
    }

    #chat-input-area {
        padding: 10px;
    }

    #user-input {
        padding: 10px 15px;
    }

    #send-button {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
} 