/* Global Styles */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    color: #2d3748;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

header {
    background: linear-gradient(135deg, #0A2540 0%, #00A8CC 100%);
    color: white;
    padding: 5px 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 0 10px;
    flex-wrap: wrap;
}

/* Logo Link Overrides: Keep White, No Underline, Side-by-Side with Image */
.logo-container {
    display: flex;              /* Reinforce flex for row layout */
    align-items: center;        /* Vertically center text next to image */
    gap: 10px;                  /* Space between image and text */
    flex-wrap: nowrap;          /* Prevent wrapping to new line */
    text-decoration: none;      /* Removes underline */
    color: white;               /* Forces white, overriding any link defaults */
    align-self: center;         /* Centers the whole container in nav */
}

.logo-container:hover,
.logo-container:active,
.logo-container:visited {
    display: flex;              /* Ensure flex persists on states */
    align-items: center;        /* Keep alignment on hover/visited */
    flex-wrap: nowrap;          /* No wrap on interactions */
    text-decoration: none;      /* No underline on hover/active/visited */
    color: white;               /* Stays white—no purple/blue shifts */
}

.logo-container:hover .logo-text {
    color: rgba(255, 255, 255, 0.9);  /* Subtle fade on hover for engagement (optional) */
    transition: color 0.2s ease;      /* Smooth transition (optional) */
}

/* Ensure text stays inline and centered */
.logo-text {
    display: inline-block;      /* Keeps text as block but inline-flow */
    align-self: center;         /* Extra vertical center nudge */
    line-height: 1;             /* Tightens to match image baseline */
    white-space: nowrap;        /* Prevents text wrapping within itself */
}

.logo-img {
    height: 100px;
    width: auto;
}

.logo-text {
    font-size: 1.5em;
    font-weight: bold;
}

ul {
    list-style: none;
    display: flex;
    gap: 8px;
    margin: 0;
    flex-wrap: wrap;
}

ul li a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

ul li a:hover {
    background-color: rgba(255,255,255,0.2);
}

main {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #0A2540 0%, #00A8CC 100%);
    color: white;
    text-align: center;
    padding: 0px 0;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.5;
}

.hero-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* removed unused .hero-image */

.hero h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease 0.2s forwards;
    opacity: 0;
    transform: translateY(30px);
}
/* removed unused .hero h3 */
.hero p {
    font-size: 1.3em;
    margin-bottom: 40px;
    animation: fadeInUp 1s ease 0.4s forwards;
    opacity: 0;
    transform: translateY(30px);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 40px;
    animation: fadeInUp 1s ease 0.8s forwards;
    opacity: 0;
    transform: translateY(30px);
}

.stat {
    text-align: center;
}

.stat h3 {
    font-size: 3em;
    margin: 0;
    color: #00A8CC;
}

.stat p {
    margin: 0;
    opacity: 0.9;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 16px 32px;
    font-size: 1.2em;
    font-weight: 500;
    text-align: center;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    transition: background 0.3s ease, transform 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: #00A8CC;
    color: white;
    animation: fadeInUp 1s ease 0.8s forwards;
    opacity: 0;
    transform: translateY(30px);
}

.btn-primary:hover {
    background: #008FA3;
    transform: translateY(-2px);
}

/* Send Button Hover Enhancement - Strict White Base, Slower Blue Shift */
#chat-input-container .btn {
    background-color: #ffffff; /* Pure white base - strictly clean */
    color: #0A2540; /* Dark text for sharp contrast */
    border: 1px solid #e2e8f0; /* Very subtle gray border (or remove for no border at all) */
    transition: background-color 0.6s ease, color 0.6s ease, border-color 0.6s ease, transform 0.2s ease, box-shadow 0.6s ease; /* Slower color shifts, quicker lift */
}

#chat-input-container .btn:hover {
    background-color: #00A8CC; /* Blue highlight on hover */
    color: white; /* White text for readability */
    transform: translateY(-1px); /* Slight lift for depth */
    box-shadow: 0 4px 12px rgba(0, 168, 204, 0.3); /* Blue glow shadow */
    border-color: #00A8CC;
}

#chat-input-container .btn:active {
    transform: translateY(0); /* Press down on click */
    box-shadow: 0 2px 8px rgba(0, 168, 204, 0.2);
    transition: transform 0.1s ease, box-shadow 0.2s ease; /* Quick snap back on press */
}

/* Features Section */
.features {
    padding: 80px 0;
    background: white;
    width: 100%;
}

.features h2 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 60px;
    color: #0A2540;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    width: 90%;
    padding: 0 40px;
    margin: 0 auto;
}

.feature {
    text-align: center;
    padding: 40px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
    position: relative; /* For pseudo-element positioning */
    overflow: hidden;   /* Contain the top border */
}

.feature.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #00A8CC, #0A2540);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.feature:hover::before {
    transform: scaleX(1);
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.feature-icon {
    font-size: 3em;
    margin-bottom: 20px;
    color: #4CB3D5; /* Darker blue for icons */
    transition: color 0.3s ease;
}

.feature:hover .feature-icon {
    color: #00A8CC; /* Primary blue on hover */
}

.feature h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #0A2540;
}

.feature p {
    opacity: 0.8;
}

/* About Specific Sections */
.about-intro {
    padding: 80px 0;
    background: linear-gradient(135deg, #00A8CC 0%, #0A2540 100%);
    color: white;
    text-align: center;
}

.intro-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 40px;
}

.intro-content h1 {
    font-size: 3em;
    margin-bottom: 20px;
}

.intro-content p {
    font-size: 1.2em;
    margin-bottom: 30px;
}

/* removed unused stats section */

/* Mission Section */
.mission {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e6f3ff 100%);
    position: relative;
    color: #2d3748;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.mission.visible {
    opacity: 1;
    transform: translateY(0);
}

.mission-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 168, 204, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(10, 37, 64, 0.03) 0%, transparent 50%),
        linear-gradient(45deg, transparent 48%, rgba(0, 168, 204, 0.02) 50%, transparent 52%);
    background-size: 200% 200%, 150% 150%, 100% 100%;
    animation: patternShift 20s ease-in-out infinite;
    z-index: 1;
}

@keyframes patternShift {
    0%, 100% { background-position: 0% 50%, 0% 0%, 0% 0%; }
    50% { background-position: 100% 50%, 100% 100%, 100% 100%; }
}

.mission-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    text-align: center;
}

.mission-title {
    font-size: 2.8em;
    margin-bottom: 30px;
    color: #0A2540;
    position: relative;
    display: inline-block;
}

.mission-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #00A8CC, #0A2540);
    border-radius: 2px;
}

.mission-desc {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto 50px;
    line-height: 1.6;
    opacity: 0.9;
}

.mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.mission-item {
    background: white;
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 168, 204, 0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease, opacity 0.6s ease, transform 0.6s ease;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
}

.mission-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.mission-item:nth-child(1).visible {
    transition-delay: 0.1s;
}

.mission-item:nth-child(2).visible {
    transition-delay: 0.2s;
}

.mission-item:nth-child(3).visible {
    transition-delay: 0.3s;
}

.mission-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #00A8CC, #0A2540);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.mission-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 168, 204, 0.2);
}

.mission-item:hover::before {
    transform: scaleX(1);
}

.mission-icon {
    font-size: 3.5em;
    margin-bottom: 20px;
    display: block;
    transition: transform 0.3s ease;
    color: #4CB3D5; /* Darker blue for icons */
}

.mission-item:hover .mission-icon {
    transform: scale(1.1) rotate(5deg);
    color: #00A8CC; /* Primary blue on hover */
}

.mission-item h3 {
    font-size: 1.6em;
    margin-bottom: 15px;
    color: #0A2540;
}

.mission-item p {
    opacity: 0.85;
    line-height: 1.5;
}

/* Floating Shapes */
.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.shape {
    position: absolute;
    background: rgba(0, 168, 204, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 15%;
    background: rgba(10, 37, 64, 0.08);
    animation-delay: 2s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    bottom: 30%;
    left: 20%;
    animation-delay: 4s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    top: 40%;
    right: 5%;
    background: rgba(0, 168, 204, 0.06);
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* removed unused Values section */

/* Enquire Hero Section */
/* removed older enquire-hero styles (overridden by enforced block below) */

/* Split layout for enquiry page */
.contact-split {
    display: flex;
    gap: 60px;
    padding: 80px 40px;
    max-width: 1200px;
    margin: 0 auto;
    background: #f8f9fa;
    margin-top: -20px; /* Slight overlap for smooth transition from hero */
}

.split-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 40px;
}

.split-left h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #0A2540;
}

.split-left p {
    font-size: 1.1em;
    margin-bottom: 40px;
    color: #2d3748;
    line-height: 1.6;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1em;
    color: #2d3748;
}

.contact-icon {
    color: #4CB3D5;
    font-size: 1.2em;
    width: 20px;
    flex-shrink: 0;
}

.split-right {
    flex: 1;
    padding-left: 40px;
}

.split-right h3 {
    font-size: 1.8em;
    margin-bottom: 30px;
    color: #0A2540;
    text-align: left;
}

#main-contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: none; /* Full width in right column */
}

/* Form group wrapper */
.form-group {
    position: relative;
    margin-bottom: 20px;
    display: block;
}

/* Icon styling - positioned inside the input */
.form-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #4CB3D5;
    font-size: 1.2em;
    z-index: 1;
    pointer-events: none;
    transition: color 0.3s ease;
}

/* Specific alignment for message textarea icon */
.message-group .form-icon {
    top: 18px;
    transform: none;
}

/* Input/textarea adjustments */
#main-contact-form input,
#main-contact-form textarea {
    width: 100%;
    padding: 15px 15px 15px 60px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1em;
    font-family: 'Roboto', sans-serif;
    color: #2d3748;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

#main-contact-form input::placeholder,
#main-contact-form textarea::placeholder {
    color: #718096;
    font-family: 'Roboto', sans-serif;
    font-size: 1em;
}

#main-contact-form textarea {
    min-height: 120px;
    resize: vertical;
    padding: 20px 15px 20px 60px;
}

/* Focus states */
#main-contact-form input:focus,
#main-contact-form textarea:focus {
    outline: none;
    border-color: #4CB3D5;
}

.form-group:focus-within .form-icon {
    color: #00A8CC;
}

#main-contact-form button {
    align-self: flex-start;
    margin-top: 10px;
}

/* removed duplicate CTA block (kept updated version below) */

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 30px;
    border-radius: 12px;
    width: 80%;
    max-width: 500px;
    text-align: center;
    position: relative;
    animation: slideIn 0.3s ease;
}

.close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #000;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chat Widget */
#chat-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: #569be4;
    color: white;
    padding: 16px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 1000;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: transform 0.2s ease, background 0.3s ease;
}

#chat-button:hover {
    background-color: #2c5282;
    transform: scale(1.1);
}

#chat-container {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 350px;
    /* Ensure the entire widget (header, toolbar, window, input) fits viewport */
    max-height: calc(100vh - 96px - 24px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    z-index: 1000;
    display: none;
    overflow: hidden;
    /* Make internal sections stack and allow the window to flex */
    display: flex;
    flex-direction: column;
}

#chat-header {
    background-color: #2b6cb0;
    color: white;
    padding: 12px;
    border-radius: 12px 12px 0 0;
    text-align: center;
    font-weight: 500;
    font-size: 1.1em;
    flex: 0 0 auto;
}

#reset-btn {
    background: none;
    border: none;
    color: white;
    font-size: 0.9em;
    font-weight: 500;
    padding: 8px 12px;
    cursor: pointer;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1001;
}

#reset-btn:hover {
    color: #cbd5e0;
}

#back-btn {
    background: none;
    border: none;
    color: white;
    font-size: 0.9em;
    font-weight: 500;
    padding: 8px 12px;
    cursor: pointer;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1001;
}

#back-btn:hover {
    color: #cbd5e0;
}

#chat-window {
    flex: 1;
    min-height: 0; /* Critical so flex child can shrink and scroll */
    overflow-y: auto;
    padding: 16px;
    background-color: #f8f9fa;
}

/* Chat Toolbar */
#chat-toolbar {
    display: flex;
    justify-content: center; /* Align left for back/reset */
    align-items: center;
    padding: 8px 12px;
    background-color: #f8f9fa; /* Light background to separate from header */
    border-bottom: 1px solid #e2e8f0; /* Subtle divider */
    gap: 12px; /* Space between buttons */
    flex: 0 0 auto; /* Do not consume flexible height */
}

.toolbar-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em; /* Icon size */
    color: #2d3748; /* Neutral color */
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.3s ease, color 0.3s ease;
}

.toolbar-btn:hover {
    background-color: rgba(0, 168, 204, 0.1); /* Light hover effect */
    color: #00A8CC; /* Brand color on hover */
}

.toolbar-btn i {
    margin: 0; /* No extra spacing needed */
}

/* Hide back button when not needed (already in JS, but reinforce) */
.back-btn[style*="display: none"] {
    display: none !important;
}

/* Responsive: Smaller icons on mobile */
@media (max-width: 768px) {
    .toolbar-btn {
        font-size: 1em;
        padding: 4px 6px;
    }
}

/* Chat Input Enhancements: Multi-line wrapping like a bubble */
#chat-input-container {
    display: flex;
    gap: 10px;
    padding: 15px;
    border-top: 1px solid #e2e8f0;
    background: white;
    align-items: flex-end;  /* Align send button to bottom */
    flex: 0 0 auto; /* Keep input visible, don't let it stretch */
}

#userInput {
    flex: 1;
    min-height: 40px;      /* Base height like an input */
    max-height: 120px;     /* Cap growth to ~3 lines */
    padding: 10px 12px;    /* Bubble padding */
    border: 1px solid #d1d5db;
    border-radius: 20px;   /* Rounded bubble look */
    font-family: inherit;
    font-size: 14px;
    resize: none;          /* No manual resize handle */
    overflow-y: auto;      /* Scroll if hits max-height */
    word-wrap: break-word; /* Wrap long words */
    line-height: 1.4;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

#userInput:focus {
    outline: none;
    border-color: #00A8CC; /* Brand blue on focus */
    box-shadow: 0 0 0 3px rgba(0, 168, 204, 0.1);
}

/* Auto-grow textarea height on input (JS-free via CSS, but subtle) */
#userInput {
    overflow: hidden; /* Hide scrollbar until max */
}

/* Respect device safe area for bottom controls */
@supports (padding: max(0px)) {
    #chat-input-container {
        padding-bottom: max(15px, env(safe-area-inset-bottom));
    }
}

#report-issue-btn {
    color: #ff6347;  /* Tomato red for warning */
}
#find-out-more-btn {
    color: #00A8CC;  /* Brand blue */
}

/* Enhanced mobile touch targets and accessibility */
@media (max-width: 768px) {
    /* Ensure touch targets are at least 44px */
    ul li a {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .option-btn {
        min-height: 44px;
    }
    
    /* Chat header adjustments */
    #chat-header {
        padding: 16px 12px;
        font-size: 1.2em;
    }
    
    #reset-btn, #back-btn {
        padding: 12px;
        font-size: 1em;
    }
    
    /* Ensure chat toolbar is accessible */
    #chat-toolbar {
        padding: 12px;
        gap: 16px;
    }
    
    .toolbar-btn {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Chat input container adjustments for tablets */
    #chat-input-container {
        padding: 10px;
        gap: 8px;
    }
    
    #userInput {
        min-height: 35px;
        padding: 8px 10px;
        font-size: 16px; /* Mobile text size boost */
    }
    
    .btn { /* Send button */
        padding: 10px 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    /* Ultra-compact but still accessible */
    ul li a {
        min-height: 40px;
        padding: 6px 10px;
    }
    
    .btn {
        min-height: 40px;
        min-width: 40px;
    }
    
    .option-btn {
        min-height: 40px;
    }
    
    #chat-header {
        padding: 14px 10px;
        font-size: 1.1em;
    }
    
    #reset-btn, #back-btn {
        padding: 10px;
        font-size: 0.9em;
    }
    
    #chat-toolbar {
        padding: 10px;
        gap: 12px;
    }
    
    .toolbar-btn {
        min-width: 40px;
        min-height: 40px;
    }
    
    /* Chat input container adjustments */
    #chat-input-container {
        padding: 8px;
        gap: 6px;
    }
    
    #userInput {
        min-height: 32px;
        padding: 6px 8px;
        font-size: 16px;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 13px;
    }
}


.message {
    margin: 8px 0;
    padding: 10px 14px;
    border-radius: 12px;
    max-width: 80%;
    font-size: 0.9em;
    font-weight: 300;
}

.user {
    background-color: #2b6cb0;
    color: white;
    align-self: flex-end;
    margin-left: auto;
}

/* Remove emoji from bot messages and typing indicator */
.bot::before {
    content: none;  /* Remove emoji */
}

.typing-indicator::before {
    content: none;  /* Remove emoji */
}

/* New class for profile image */
.profile-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
    vertical-align: middle;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Update bot message and typing indicator to flex with image */
.bot {
    background-color: #e2e8f0;
    color: #2d3748;
    align-self: flex-start;
    margin-right: auto;
    display: flex;
    align-items: flex-start;  /* Align image and text */
    font-weight: 300;
    padding: 10px 14px;
    border-radius: 12px;
    max-width: 80%;
}

.bot .message-content {
    display: flex;
    flex-direction: column;
}

.bot-name {
    font-weight: 500;
    font-size: 0.8em;
    margin-bottom: 4px;
}

.typing-indicator {
    background-color: #e2e8f0;
    color: #2d3748;
    align-self: flex-start;
    margin-right: auto;
    padding: 10px 14px;
    border-radius: 12px;
    max-width: 80%;
    font-size: 0.9em;
    display: flex;
    align-items: center;
}

.typing-indicator span {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin: 0 2px;
    background-color: #2d3748;
    border-radius: 50%;
    animation: typing 1s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

.option-btn {
    background-color: #e2e8f0;
    color: #2d3748;
    padding: 10px 14px;
    margin: 4px 0;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 0.9em;
    font-weight: 500;
    display: block;
    width: 80%;
    text-align: left;
}

.option-btn:hover {
    background-color: #cbd5e0;
}

/* removed unused chat widget ID selectors (#contact-form-widget, #contact-response) */

/* Chat Bubble */
#chat-bubble {
    position: fixed;
    bottom: 90px;
    right: 50px;
    background-color: white;
    color: #2d3748;
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    font-size: 0.9em;
    font-weight: 500;
    display: none;
    z-index: 1001;
    animation: fadeIn 0.3s ease;
}

/* Bouncing Animation for Chat Button */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-30px);
    }
    60% {
        transform: translateY(-15px);
    }
}

.bouncing {
    animation: bounce 1.5s;
}

/* FAQ Section */
.faq-section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.5s ease-out, transform 1.5s ease-out;
}

.faq-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Form Response (Centralized for Enquire & Chat) */
#form-response {
    margin-top: 20px;
    text-align: center;
    font-size: 1em;
    padding: 10px;
    border-radius: 6px;
    min-height: 20px;
    transition: background 0.3s ease;
}

#form-response.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#form-response.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Icon Hover (Subtle Lift for Engagement) */
.contact-icon:hover,
.form-icon:hover {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Ensure Contact Items are Clickable (Optional: Link to Mail/Tel) */
.contact-item a {
    color: inherit;
    text-decoration: none;
}

.contact-item a:hover {
    color: #00A8CC;
}

/* Responsive Design - Enhanced for better mobile experience */

/* Large tablets and small desktops */
@media (max-width: 1024px) {
    .hero-content {
        padding: 0 30px;
    }
    .hero h1 {
        font-size: 3em;
    }
    .feature-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 30px;
    }
    .contact-split {
        gap: 40px;
        padding: 60px 30px;
    }
    .nebula-canvas {
        height: 400px;
    }
}

/* Tablets */
@media (max-width: 768px) {
    /* Keep navigation horizontal with smaller text */
    nav {
        flex-direction: row;
        gap: 8px;
        padding: 0 5px;
    }
    
    .logo-container {
        gap: 8px;
    }
    
    .logo-img {
        height: 80px;
    }
    
    .logo-text {
        font-size: 1.2em;
    }
    
    ul {
        flex-direction: row;
        gap: 4px;
        flex-wrap: wrap;
    }
    
    ul li a {
        padding: 6px 12px;
        font-size: 0.9em;
    }
    
    /* Hero adjustments */
    .hero-content {
        padding: 0 20px;
    }
    
    .hero h1 {
        font-size: 2.5em;
    }
    
    .hero p {
        font-size: 1.1em;
    }
    
    /* Features grid */
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 20px;
    }
    
    /* Chat container - keep functional but adjust size */
    #chat-container {
        width: 95%;
        max-width: 400px;
        right: 2.5%;
        bottom: 100px;
        max-height: calc(100vh - 100px - 16px);
    }
    
    .option-btn, .btn {
        font-size: 0.9em;
        padding: 10px 14px;
    }
    
    /* Mission section */
    .mission-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .mission-title {
        font-size: 2.2em;
    }
    
    .shape {
        display: none; /* Hide shapes on small screens for performance */
    }
    
    /* Contact form */
    .contact-split {
        flex-direction: column;
        gap: 40px;
        padding: 40px 20px;
    }
    
    .split-left,
    .split-right {
        padding: 0;
    }
    
    .split-right h3 {
        text-align: center;
    }
    
    .form-icon {
        left: 12px;
        font-size: 1em;
    }
    
    .message-group .form-icon {
        top: 16px;
    }
    
    #main-contact-form input,
    #main-contact-form textarea {
        padding-left: 50px;
    }
    
    #main-contact-form textarea {
        padding-left: 50px;
        padding-top: 18px;
    }
    
    /* Enquire hero */
    .enquire-hero {
        min-height: 30vh;
        padding: 15px 20px;
    }
    
    .enquire-hero h1 {
        font-size: 2.2em;
    }
    
    .enquire-hero p {
        font-size: 1.1em;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    /* Navigation - keep horizontal but more compact */
    header {
        padding: 5px 15px;
    }
    
    nav {
        gap: 4px;
    }
    
    .logo-img {
        height: 60px;
    }
    
    .logo-text {
        font-size: 1em;
    }
    
    ul li a {
        padding: 4px 8px;
        font-size: 0.8em;
    }
    
    /* Hero adjustments */
    .hero h1 {
        font-size: 2em;
    }
    
    .hero p {
        font-size: 1em;
    }
    
    /* Chat container - full width on very small screens */
    #chat-container {
        width: 98%;
        max-width: none;
        right: 1%;
        left: 1%;
        bottom: 80px;
        max-height: calc(100vh - 80px - 8px);
    }
    
    /* Chat button adjustments */
    #chat-button {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 20px;
    }
    
    /* Form adjustments */
    .contact-split {
        padding: 30px 15px;
    }
    
    .enquire-hero {
        padding: 10px 15px;
    }
    
    .enquire-hero h1 {
        font-size: 1.8em;
    }
    
    .enquire-hero p {
        font-size: 1em;
    }
    
    /* Feature cards */
    .feature {
        padding: 30px 15px;
    }
    
    .feature-icon {
        font-size: 2.5em;
    }
    
    /* Mission items */
    .mission-item {
        padding: 30px 20px;
    }
    
    .mission-icon {
        font-size: 3em;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    /* Ultra-compact navigation */
    .logo-text {
        font-size: 0.9em;
    }
    
    ul li a {
        padding: 3px 6px;
        font-size: 0.75em;
    }
    
    /* Chat adjustments */
    #chat-container {
        bottom: 70px;
    }
    
    #chat-button {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    /* Typography adjustments */
    .hero h1 {
        font-size: 1.8em;
    }
    
    .enquire-hero h1 {
        font-size: 1.6em;
    }
}
/* Enquire Hero Section */
.enquire-hero {
    background: linear-gradient(135deg, #0A2540 0%, #00A8CC 100%) !important;
    position: relative;
    overflow: hidden;
    min-height: 15vh !important; /* Enforce height */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px !important; /* Increased for breathing room */
    text-align: center;
    opacity: 1 !important; /* Force show on load */
    transform: translateY(0) !important; /* Skip animation if needed */
    border-bottom: 4px solid rgba(255, 255, 255, 0.1); /* Visual separator */
}

.enquire-hero.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.enquire-hero h1 {
    font-size: 2.8em;
    margin-bottom: 10px;
    color: white !important;
    font-weight: 700;
    line-height: 1.1;
}

.enquire-hero p {
    font-size: 1.2em;
    color: white !important;
    margin: 0;
    opacity: 0.95 !important;
    line-height: 1.4;
    max-width: 700px;
}
/* Footer Link Readability */
footer {
    background-color: #f8f9fa; /* Ensure light bg if not already set */
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e2e8f0; /* Optional subtle separator */
    color: #2d3748;
}

footer a {
    color: #00A8CC; /* Dark navy for high contrast and brand match */
    text-decoration: none;
    font-weight: 500; /* Slightly bolder for emphasis */
    transition: color 0.3s ease;
}

footer a:hover {
    color: #27b8d8; /* Your primary blue on hover for engagement */
    text-decoration: underline; /* Subtle underline on hover */
}
/* CTA Link Readability on Blue BG */
.cta {
    background: linear-gradient(135deg, #0A2540 0%, #00A8CC 100%); /* Ensure consistent bg if not already */
    color: white;
    padding: 60px 40px;
    text-align: center;
}

.cta a:not(.btn) {  /* Targets only inline links, not the Enquire button */
    color: #ffffff; /* Pure white for high contrast */
    text-decoration: underline; /* Subtle underline to signal "link" */
    font-weight: 500; /* Matches the <h2> weight for cohesion */
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

.cta a:not(.btn):hover {
    color: #f0f0f0; /* Very light gray on hover for subtle feedback */
    text-decoration: underline wavy; /* Fun, brand-friendly hover effect */
}
/* UPDATED: Values Nebula Section - Pure Circular Nodes */
.values-nebula {
    padding: 80px 40px;
    background: radial-gradient(ellipse at center, #154b82 0%, #000428 80%, #000000 100%);
    position: relative;
    overflow: hidden;
    color: white;
    text-align: center;
}

.values-nebula::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(2px 2px at 20px 30px, #00a8cc, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 90px 40px, #00a8cc, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.4), transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: nebula-drift 50s linear infinite;
    opacity: 0.6;
    pointer-events: none;
}

@keyframes nebula-drift {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(50px, 50px) rotate(360deg); }
}

.nebula-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.nebula-title {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(0, 168, 204, 0.5);
}

.nebula-subtitle {
    font-size: 1.1em;
    opacity: 0.8;
    margin-bottom: 60px;
    font-style: italic;
}

.nebula-canvas {
    position: relative;
    height: 500px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    perspective: 1000px; /* 3D depth */
}

.node {
    position: relative;
    cursor: pointer;
    opacity: 0;
    transform: translateZ(0) scale(0.8);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    animation: node-pulse 3s ease-in-out infinite alternate;
    /* NEW: Ensure node container is circular */
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: grid; /* precise centering */
    place-items: center;
    aspect-ratio: 1 / 1; /* Prevent stretching */
    flex: 0 0 auto; /* Do not stretch in flex container */
    box-sizing: border-box;
}

.node.visible {
    opacity: 1;
    transform: translateZ(50px) scale(1);
}

@keyframes node-pulse {
    0% { 
        box-shadow: 
            0 0 10px rgba(0, 168, 204, 0.3),
            inset 0 0 10px rgba(255, 255, 255, 0.1); /* Inner glow for orb feel */
    }
    100% { 
        box-shadow: 
            0 0 30px rgba(0, 168, 204, 0.8),
            inset 0 0 20px rgba(255, 255, 255, 0.2);
    }
}

.node-core {
    width: 80px;
    height: 80px;
    border-radius: 50%; /* Pure circle */
    background: linear-gradient(135deg, #00a8cc, #0a2540);
    display: grid;
    place-items: center;
    transition: all 0.3s ease;
    transform-style: preserve-3d;
    /* NEW: Circular clip-path for zero square bleed */
    clip-path: circle(50% at 50% 50%);
    border: none; /* Remove any borders that could square it */
    aspect-ratio: 1 / 1; /* Maintain perfect circle */
    flex: 0 0 auto;
    box-sizing: border-box;
}

.node-icon {
    font-size: 1.5em;
    color: white;
    transition: transform 0.3s ease;
}

.node:hover .node-core {
    transform: scale(1.2) rotateY(180deg);
    box-shadow: 
        0 0 40px rgba(0, 168, 204, 1),
        inset 0 0 30px rgba(255, 255, 255, 0.3); /* Enhanced circular glow */
}

.node-expand {
    position: absolute;
    top: -150px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: 300px;
    background: rgba(10, 37, 64, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 168, 204, 0.5);
    border-radius: 20px; /* Keep rounded rect for text readability */
    padding: 30px;
    text-align: center;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 10;
    pointer-events: none;
}

.node.active .node-expand {
    transform: translateX(-50%) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.expand-icon {
    font-size: 2em;
    margin-bottom: 15px;
    color: #00a8cc;
}

.node-expand h3 {
    margin: 10px 0 15px;
    font-size: 1.4em;
}

.node-expand p {
    line-height: 1.5;
    opacity: 0.9;
    font-size: 0.95em;
}

.synapse-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.synapse {
    stroke: rgba(0, 168, 204, 0.3);
    stroke-width: 2;
    fill: none;
    transition: stroke 0.3s ease;
    opacity: 0;
    animation: synapse-fade 4s ease-in-out infinite;
}

.synapse.visible {
    opacity: 1;
}

.node:hover ~ .synapse-lines .synapse[data-from*="innovation"],
.node.innovation:hover ~ .synapse-lines .synapse[data-to*="innovation"] {
    stroke: rgba(0, 168, 204, 0.8);
    animation: synapse-glow 1s ease-in-out infinite alternate;
}

@keyframes synapse-glow {
    0% { stroke-opacity: 0.3; }
    100% { stroke-opacity: 1; }
}

@keyframes synapse-fade {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.6; }
}

/* Responsive: Vertical Constellation Trail on Mobile */
@media (max-width: 768px) {
    .values-nebula {
        padding: 60px 20px;
    }
    
    .nebula-canvas {
        flex-direction: column;
        height: auto;
        gap: 40px;
    }
    
    .node {
        transform: none;
        /* Keep circular on mobile */
        width: 70px;
        height: 70px;
        aspect-ratio: 1 / 1;
        flex: 0 0 auto;
    }
    
    .node-core {
        width: 70px;
        height: 70px;
        aspect-ratio: 1 / 1;
        flex: 0 0 auto;
    }
    
    .synapse-lines {
        display: none; /* Hide lines on mobile for simplicity */
    }
    
    .node-expand {
        position: relative;
        top: 0;
        left: 0;
        transform: none;
        width: 100%;
        margin-top: 20px;
    }
    
    .node.active .node-expand {
        transform: none;
        opacity: 1;
    }
}