/* --- Google Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Roboto:wght@400;500&display=swap');

/* --- Custom Design System & Bootstrap Overrides --- */
:root {
    --primary-green: #5A8B4C;
    --dark-green: #4a753d;
    --light-background-tone: #f8f9fa;
    --primary-text-light: #ffffff;
    --primary-text-dark: #3D3D3D;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Roboto', sans-serif;

    /* Overriding Bootstrap's default colors with our theme */
    --bs-primary: var(--primary-green);
    --bs-primary-rgb: 90, 139, 76;
    --bs-body-color: var(--primary-text-dark); /* Default text is DARK */
    --bs-body-font-family: var(--font-body);
}

/* --- General & Body Styles --- */
/* Base styles for pages with the dark, nature background (e.g., landing, auth) */
body {
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
        url('https://images.unsplash.com/photo-1448375240586-882707db888b?auto=format&fit=crop&q=80');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    min-height: 100vh;
    /* FIX: Changed overflow to allow vertical scrolling on all pages */
    overflow-x: hidden;
}

/* --- Styles for Pages with Light Background (Dashboard, Profile, etc.) --- */
body.dashboard-page {
    background-color: #F7F6F1; /* Calm, off-white background */
    /* FIX: Explicitly remove the dark background image from these pages */
    background-image: none;
}

.page-container {
    padding-top: 90px;
    padding-bottom: 5rem;
}

/* --- Landing & Auth Page Specific Styles --- */
.glass-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    /* FIX: Set text color to light for readability on dark background */
    color: var(--primary-text-light);
}

.landing-logo h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: var(--primary-text-light);
    margin: 0;
}

.landing-logo .nav-logo-icon {
    color: var(--primary-text-light);
}

/* --- General Component Styles --- */
.btn-primary {
    padding: 12px 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

/* --- Navbar Customization --- */
.navbar {
    background-color: #ffffff;
}

.navbar-brand {
    font-family: var(--font-heading);
    color: var(--primary-green) !important;
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-brand:hover {
    color: var(--dark-green) !important;
}

.nav-link {
    font-weight: 500;
}

/* --- Card Styles (Remedy & Marketplace) --- */
.remedy-card, .market-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.remedy-card:hover, .market-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important;
    border-color: var(--primary-green);
}

.remedy-card .card-footer, .market-card .card-footer {
    background-color: #f8f9fa;
    font-size: 0.85rem;
}

.market-card .card-img-top {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.market-card .price {
    color: var(--primary-green);
    font-size: 1.2rem;
}

/* --- Form Page Styles --- */
.form-card, .form-container-card {
    border: none;
    border-radius: 12px;
}

.form-card .card-body, .form-container-card .card-body {
    padding: 2.5rem;
}

@media (max-width: 576px) {
    .form-card .card-body, .form-container-card .card-body {
        padding: 1.5rem;
    }
}

/* --- Profile Page Styles --- */
.profile-header-card {
    border: none;
    background-color: #ffffff;
}

.profile-header-card .card-body {
    padding: 2rem;
}

.profile-header-card .card-title {
    font-family: var(--font-heading);
    color: var(--primary-green);
    font-size: 2.5rem;
}

/* --- Remedy Detail Page Styles --- */
.remedy-detail-card .card-header {
    background-color: transparent;
    border-bottom: 1px solid #eee;
    padding: 1.5rem;
}

.remedy-detail-card .card-header h1 {
    font-family: var(--font-heading);
    color: var(--primary-green);
}

.remedy-detail-card .card-body {
    padding: 1.5rem;
    line-height: 1.8;
}

.remedy-detail-card .card-body h5 {
    font-weight: 600;
    color: var(--primary-text-dark);
    margin-bottom: 0.75rem;
}

/* --- AI Assistant Styles --- */
.ai-assistant-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-green);
    color: white;
    border: none;
    font-size: 1.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1050;
}

.ai-assistant-btn:hover {
    transform: scale(1.1);
    background-color: var(--dark-green);
}

.modal-body {
    background-color: #f4f7f6;
}

.chat-message {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

.chat-message p {
    padding: 0.75rem 1rem;
    border-radius: 18px;
    margin-bottom: 0;
    max-width: 80%;
    word-wrap: break-word;
}

.chat-message.user {
    align-items: flex-end;
}
.chat-message.user p {
    background-color: var(--primary-green);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.bot {
    align-items: flex-start;
}
.chat-message.bot p {
    background-color: #ffffff;
    color: var(--primary-text-dark);
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 4px;
}

/* --- Animation --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
}

