/* Main Design System */
:root {
    /* Premium Life Sciences Palette */
    --primary: #0b2341;
    /* Deep Royal Blue */
    --primary-light: #1c3a63;
    /* Lighter shade for hover */
    --secondary: #00acc1;
    /* Teal/Cyan for accents */
    --accent: #ffb74d;
    /* Warm Orange/Gold for CTAs (Complementary) */

    /* Neutrals */
    --background: #FFFFFF;
    --light-bg: #f4f7fa;
    /* Very subtle cool gray */
    --text: #333333;
    --text-light: #666666;
    --border: #e0e0e0;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);

    /* Layout */
    --container-width: 1200px;
    --header-height: 80px;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text);
    background-color: var(--background);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--primary);
    line-height: 1.3;
}

a {
    text-decoration: none;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary);
}

.text-secondary {
    color: var(--secondary);
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

/* Header & Navigation */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 50px;
}

.logo-text {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
    letter-spacing: 0.5px;
}

nav ul {
    display: flex;
    gap: 30px;
}

nav ul li a {
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 5px 0;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--secondary);
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--secondary);
    transition: var(--transition);
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    box-shadow: 0 4px 15px rgba(0, 172, 193, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 172, 193, 0.4);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    /* Reverse gradient on hover */
}

.btn-secondary {
    background: transparent;
    color: white;
    /* Default for hero overlay */
    border-color: white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #004d40 100%);
    /* Deep rich gradient */
    padding: calc(var(--header-height) + 80px) 0 100px;
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

/* Abstract background shapes using pseudo-elements instead of data uri for cleaner code/customization */
.hero::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    top: -100px;
    right: -100px;
    border-radius: 50%;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.95;
    font-weight: 300;
}

.spline-container {
    flex: 1;
    height: 500px;
    position: relative;
}

/* Generic Section Styles */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.section-title p {
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-light);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--secondary);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* Cards & Grids */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--light-bg);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--secondary);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 20px;
}

.card h3,
.card h4 {
    margin-bottom: 15px;
    color: var(--primary);
}

/* Checkmark Lists */
.check-list {
    margin-top: 15px;
}

.check-list li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
    color: var(--text-light);
}

.check-list li::before {
    content: '\f00c';
    /* FontAwesome check */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--secondary);
    font-size: 0.9rem;
    top: 3px;
}

/* About Section */
.about {
    background-color: var(--light-bg);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
}

/* Footer */
footer {
    background-color: var(--primary);
    color: white;
    padding: 70px 0 30px;
}

.footer-logo {
    margin-bottom: 20px;
    filter: brightness(0) invert(1);
    /* Make logo white if it's an image */
}

.footer-logo img {
    height: 50px;
}

.footer h4 {
    color: var(--secondary);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    display: block;
    margin-bottom: 10px;
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.social-links a:hover {
    background: var(--secondary);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    margin-top: 50px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Chatbot Styles */
.chatbot-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #1e3c5e);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 1000;
}

.chatbot-btn i {
    font-size: 28px;
    color: white;
}

.chatbot-btn:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent);
    color: var(--dark);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.chat-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 550px;
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 999;
    animation: fadeIn 0.3s ease-in-out;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-header {
    background: linear-gradient(to right, var(--primary), #1e3c5e);
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar-container {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.chat-title {
    font-weight: 600;
    font-size: 16px;
}

.chat-subtitle {
    font-size: 12px;
    opacity: 0.9;
}

.chat-actions {
    display: flex;
    gap: 10px;
}

.chat-actions button {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.8;
    transition: var(--transition);
}

.chat-actions button:hover {
    opacity: 1;
    transform: scale(1.1);
}

.chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background-color: #f9f9f9;
    background-image: radial-gradient(#e0e0e0 1px, transparent 1px);
    background-size: 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    clear: both;
    word-wrap: break-word;
    line-height: 1.5;
    position: relative;
    animation: messageAppear 0.2s ease-out;
    font-size: 14px;
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.message.bot {
    background: white;
    color: var(--dark);
    align-self: flex-start;
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Formatted message styles */
.formatted-message {
    background: white;
    border-left: 4px solid var(--secondary);
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.formatted-message h3 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
}

.category-list {
    list-style-type: none;
    margin: 10px 0;
    padding: 0;
}

.category-list li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
    font-size: 13px;
}

.category-list li:before {
    content: "•";
    color: var(--secondary);
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 18px;
    line-height: 1;
}

.typing-indicator {
    display: none;
    background: white;
    padding: 12px 16px;
    border-radius: 18px;
    align-self: flex-start;
    margin-bottom: 5px;
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    float: left;
    margin: 0 2px;
    background-color: #aaa;
    display: block;
    border-radius: 50%;
    opacity: 0.4;
}

.typing-indicator span:nth-of-type(1) {
    animation: typing 1s infinite;
}

.typing-indicator span:nth-of-type(2) {
    animation: typing 1s 0.33s infinite;
}

.typing-indicator span:nth-of-type(3) {
    animation: typing 1s 0.66s infinite;
}

@keyframes typing {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-5px);
    }

    100% {
        transform: translateY(0px);
    }
}

.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.quick-reply {
    background: white;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.quick-reply:hover {
    background: var(--primary);
    color: white;
}

.chat-input-container {
    display: flex;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background: white;
    padding: 12px;
    align-items: center;
    gap: 10px;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 24px;
    outline: none;
    transition: var(--transition);
    font-size: 14px;
}

.chat-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(11, 35, 65, 0.1);
}

.send-btn {
    background: var(--primary);
    color: white;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.send-btn:hover {
    background: #1e3c5e;
    transform: scale(1.05);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .header-container {
        padding: 0 20px;
    }

    .mobile-menu-btn {
        display: block;
        font-size: 24px;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--primary);
        z-index: 1001;
        /* Ensure above menu */
    }

    nav ul {
        display: none;
        position: fixed;
        /* Fixed to cover screen */
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        /* Glassmorphism */
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 40px;
        z-index: 1000;
        gap: 25px;
    }

    nav ul.active {
        display: flex;
        animation: fadeInMenu 0.3s ease forwards;
    }

    nav ul li {
        width: 100%;
        text-align: center;
        border: none;
    }

    nav ul li a {
        display: inline-block;
        padding: 10px 20px;
        font-size: 1.2rem;
        font-weight: 600;
        color: var(--primary);
    }

    nav ul li a:hover,
    nav ul li a.active {
        color: var(--secondary);
        transform: scale(1.1);
    }

    nav ul li a::after {
        display: none;
    }

    .hero-container,
    .about-content {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .hero-content {
        padding: 0;
        margin-bottom: 20px;
        order: 1;
        /* Ensure text comes first */
    }

    .spline-container {
        order: 2;
        /* Model below text on mobile */
        height: 400px;
        /* Reduced from 500px */
        width: 100%;
    }

    .hero h1 {
        font-size: 2.8rem;
    }
}

@keyframes fadeInMenu {
    from {
        opacity: 0;
        visibility: hidden;
    }

    to {
        opacity: 1;
        visibility: visible;
    }
}

@media (max-width: 768px) {

    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .spline-container {
        height: 300px;
        /* Further reduce for smaller screens */
    }

    /* Chatbot Mobile Styles - Bottom Sheet */
    .chat-window {
        width: 100%;
        height: 80vh;
        right: 0;
        left: 0;
        bottom: 0;
        border-radius: 20px 20px 0 0;
        border: none;
        box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.15);
        margin: 0;
    }

    .chatbot-btn {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 22px;
    }

    .section-title h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 20px;
    }

    header {
        height: 70px;
    }

    .hero {
        padding-top: 100px;
        padding-bottom: 60px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .spline-container {
        height: 250px;
        /* Compact for phones */
    }

    .logo-text {
        font-size: 1.3rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}