/* Custom Therapeutic Theme Styles */

:root {
    --primary-color: #8B7EC8;  /* Soft lavender */
    --secondary-color: #9BB5D6; /* Muted blue */
    --accent-color: #B8C5D1;   /* Light blue-gray */
    --success-color: #81C784;  /* Soft green */
    --warning-color: #FFB74D;  /* Warm orange */
    --danger-color: #F06292;   /* Soft pink */
    --light-color: #F8F9FC;    /* Very light blue */
    --dark-color: #4A5568;     /* Soft gray */
    --text-muted: #718096;     /* Medium gray */
    --border-color: #E2E8F0;   /* Light border */
}

/* Override Bootstrap primary colors */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #7B6EBD;
    border-color: #7B6EBD;
}

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

.bg-primary {
    background-color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

/* Global Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #FAFBFC;
    color: var(--dark-color);
    line-height: 1.6;
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* Navigation */
.navbar-brand .brand-text {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #F8F9FC 0%, #E8EDFD 50%, #F0F4FF 100%);
    padding: 80px 0;
    min-height: 70vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 20%, rgba(139, 126, 200, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(155, 181, 214, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 40% 60%, rgba(184, 197, 209, 0.06) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
    z-index: 1;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 10%;
    right: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(139, 126, 200, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 8s ease-in-out infinite;
    z-index: 1;
}

/* Add subtle geometric shapes */
.hero-section .container::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, rgba(139, 126, 200, 0.1), rgba(155, 181, 214, 0.1));
    transform: rotate(45deg);
    z-index: 1;
}

.hero-section .container::after {
    content: '';
    position: absolute;
    bottom: -5%;
    right: -5%;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(184, 197, 209, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
}

/* Additional floating geometric shapes */
.hero-section .hero-icon::before {
    content: '';
    position: absolute;
    top: 20%;
    left: -200px;
    width: 80px;
    height: 80px;
    background: linear-gradient(60deg, rgba(139, 126, 200, 0.06), rgba(155, 181, 214, 0.06));
    transform: rotate(30deg);
    animation: float-reverse 25s ease-in-out infinite;
    z-index: 1;
}

.hero-section .hero-icon::after {
    content: '';
    position: absolute;
    bottom: -150px;
    right: -100px;
    width: 120px;
    height: 40px;
    background: linear-gradient(45deg, rgba(184, 197, 209, 0.05), transparent);
    border-radius: 20px;
    transform: rotate(-15deg);
    animation: drift 18s ease-in-out infinite;
    z-index: 1;
}

/* Third floating element */
.hero-section .features::before {
    content: '';
    position: absolute;
    top: -80px;
    right: 15%;
    width: 60px;
    height: 60px;
    background: conic-gradient(from 45deg, rgba(139, 126, 200, 0.04), rgba(155, 181, 214, 0.04), rgba(184, 197, 209, 0.04), rgba(139, 126, 200, 0.04));
    border-radius: 50%;
    animation: spin-slow 30s linear infinite;
    z-index: 1;
}

/* Fourth floating element */
.hero-section .features::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 10%;
    width: 90px;
    height: 20px;
    background: linear-gradient(90deg, rgba(155, 181, 214, 0.06), transparent, rgba(155, 181, 214, 0.06));
    border-radius: 10px;
    animation: sway 22s ease-in-out infinite;
    z-index: 1;
}

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

@keyframes drift {
    0%, 100% { transform: translateX(0px) rotate(-15deg); }
    50% { transform: translateX(-30px) rotate(15deg); }
}

@keyframes spin-slow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes sway {
    0%, 100% { transform: translateX(0px) scaleX(1); }
    50% { transform: translateX(20px) scaleX(1.1); }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.5; }
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-icon {
    position: relative;
    z-index: 3;
}

.hero-icon i {
    font-size: 4rem;
    color: var(--primary-color);
    filter: drop-shadow(0 4px 12px rgba(139, 126, 200, 0.2));
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.hero-subtitle-secondary {
    font-family: 'Inter', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.features {
    margin-top: 3rem;
}

/* Feature Items */
.feature-item {
    text-align: center;
    padding: 2rem 1.5rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.feature-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.12);
}

.feature-item i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

.feature-item h6 {
    color: var(--dark-color);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

/* Chat Styles */
.chat-container {
    height: calc(100vh - 76px); /* Subtract navbar height */
}

.chat-main {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-header {
    flex-shrink: 0;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: linear-gradient(to bottom, #FAFBFC, #F1F5F9);
}

.message {
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.3s ease-out;
}

.message-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.user-message .message-content {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.user-message .message-avatar {
    background-color: var(--primary-color);
    color: white;
}

.bot-message .message-avatar {
    background-color: var(--success-color);
    color: white;
}

.message-bubble {
    max-width: 70%;
    padding: 1rem 1.25rem;
    border-radius: 1.25rem;
    position: relative;
}

.user-message .message-bubble {
    background-color: var(--primary-color);
    color: white;
    border-bottom-right-radius: 0.5rem;
}

.bot-message .message-bubble {
    background-color: white;
    color: var(--dark-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-bottom-left-radius: 0.5rem;
}

.message-text {
    margin: 0;
    word-wrap: break-word;
}

.message-time {
    display: block;
    margin-top: 0.5rem;
    opacity: 0.7;
    font-size: 0.75rem;
}

.user-message .message-time {
    color: rgba(255,255,255,0.8);
    text-align: right;
}

.bot-message .message-time {
    color: var(--text-muted);
}

/* Welcome Message */
.welcome-message {
    text-align: center;
    padding: 3rem 1rem;
}

/* Message Input */
.message-input-container {
    flex-shrink: 0;
    background: white;
}

.message-input {
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    padding: 0.75rem 1rem;
    resize: none;
    transition: border-color 0.2s ease;
}

.message-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(139, 126, 200, 0.25);
}

/* Chat Sidebar */
.chat-sidebar {
    border-left: 1px solid var(--border-color);
}

.reminder-card .card {
    transition: transform 0.2s ease;
}

.reminder-card .card:hover {
    transform: translateY(-2px);
}

.upgrade-card .card {
    background: linear-gradient(135deg, #F8F9FC 0%, #E8EDFD 100%);
}

/* Premium Styles */
.premium-benefits .benefit-item {
    text-align: center;
    padding: 1rem;
}

.premium-benefits .benefit-item i {
    font-size: 2rem;
    display: block;
}

/* Success/Cancel Pages */
.success-icon, .cancel-icon {
    animation: bounceIn 0.6s ease-out;
}

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

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle-secondary {
        font-size: 1.2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .message-bubble {
        max-width: 85%;
    }
    
    .chat-sidebar {
        border-left: none;
        border-top: 1px solid var(--border-color);
    }
    
    .hero-section {
        padding: 40px 0;
        min-height: 60vh;
    }
}

@media (max-width: 576px) {
    .message-bubble {
        max-width: 90%;
        padding: 0.75rem 1rem;
    }
    
    .messages-container {
        padding: 0.5rem;
    }
    
    .message {
        margin-bottom: 1rem;
    }
}

/* Custom Scrollbar */
.messages-container::-webkit-scrollbar {
    width: 6px;
}

.messages-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.messages-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
    opacity: 0.7;
}

.messages-container::-webkit-scrollbar-thumb:hover {
    background: #7B6EBD;
}

/* Focus states for accessibility */
.btn:focus,
.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(139, 126, 200, 0.25);
}

/* Disclaimer Modal */
.modal-content {
    border-radius: 1rem;
}

.disclaimer-content h6 {
    color: var(--primary-color);
}

/* Loading states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Badge styles */
.badge {
    font-weight: 500;
}

/* Card hover effects */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* How Our Chatbot Can Help Section - Slider */
.help-methods-slider {
    margin-top: 2rem;
}

.carousel-inner {
    overflow: hidden;
}

.carousel-item {
    height: 400px;
}

.help-slide {
    padding: 3rem 2rem;
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(139, 126, 200, 0.1);
    height: 400px;
    display: flex;
    align-items: center;
}

.help-slide-graphic {
    text-align: center;
    margin-bottom: 2rem;
}

.help-svg {
    width: 100%;
    max-width: 300px;
    height: auto;
}

.help-slide-content {
    padding-left: 2rem;
}

.help-slide-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(139, 126, 200, 0.2);
}

.help-slide-icon i {
    font-size: 1.5rem;
    color: white;
}

.help-slide-content h3 {
    color: var(--dark-color);
    font-weight: 600;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.help-slide-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

/* Carousel customizations */

.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background: rgba(139, 126, 200, 0.1);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: rgba(139, 126, 200, 0.2);
    opacity: 1;
}

.carousel-control-prev {
    left: -25px;
}

.carousel-control-next {
    right: -25px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 20px;
    height: 20px;
}

/* Alert customizations */
.alert {
    border-radius: 0.75rem;
    border: none;
}

.alert-warning {
    background-color: #FFF8E1;
    color: #E65100;
}

.alert-info {
    background-color: #E3F2FD;
    color: #0D47A1;
}

.alert-success {
    background-color: #E8F5E8;
    color: #2E7D32;
}

/* Typing Indicator Animation */
.typing-indicator {
    opacity: 0.8;
    animation: fadeIn 0.3s ease-in;
}

.typing-dots {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 5px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--primary-color);
    animation: typingDots 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

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

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

@keyframes typingDots {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 0.8;
        transform: translateY(0);
    }
}

/* Section Titles */
.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

/* FAQ Section */
.accordion-item {
    background-color: white;
    border-radius: 0.75rem !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.accordion-button {
    background-color: white;
    border: none;
    font-weight: 500;
    color: var(--dark-color);
    padding: 1.25rem 1.5rem;
    font-size: 1rem;
}

.accordion-button:not(.collapsed) {
    background-color: var(--light-color);
    color: var(--primary-color);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(139, 126, 200, 0.25);
    border-color: transparent;
}

.accordion-body {
    padding: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-muted);
}

/* Contact Section */
.contact-item {
    padding: 3rem 2rem;
    transition: transform 0.2s ease;
    text-align: center;
}

.contact-item:hover {
    transform: translateY(-5px);
}

.contact-icon i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.contact-item h4 {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.contact-item .btn {
    border-radius: 2rem;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: max-content;
    display: inline-block;
    margin: 0 auto;
}

.contact-item .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 126, 200, 0.3);
}

/* What Our Chatbot Is For Section */
.use-case-card {
    padding: 1.5rem;
    background: white;
    border-radius: 0.75rem;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    height: 100%;
}

.use-case-card:hover {
    transform: translateX(5px);
    box-shadow: 0 3px 20px rgba(0, 0, 0, 0.1);
    border-left-color: #7B6EBD;
}

.use-case-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 126, 200, 0.1);
    border-radius: 50%;
}

.use-case-icon i {
    font-size: 1.25rem;
}

.use-case-card h5 {
    color: var(--dark-color);
    font-weight: 600;
    font-size: 1.1rem;
}

/* Responsive adjustments for new sections */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .contact-item {
        padding: 2rem 1rem;
        margin-bottom: 2rem;
    }
    
    .contact-item .btn {
        font-size: 0.85rem;
        padding: 0.6rem 1.25rem;
        word-break: break-all;
        white-space: normal;
        line-height: 1.3;
    }
    
    .use-case-card {
        padding: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .use-case-card:hover {
        transform: none;
    }
    
    .use-case-icon {
        width: 35px;
        height: 35px;
    }
    
    .use-case-icon i {
        font-size: 1.1rem;
    }
    
    .accordion-button {
        padding: 1rem;
        font-size: 0.95rem;
    }
    
    .accordion-body {
        padding: 1rem;
    }
    
    .hero-section::after {
        width: 200px;
        height: 200px;
        top: 5%;
        right: 5%;
    }
    
    .hero-section .container::before {
        width: 60px;
        height: 60px;
    }
    
    .hero-section .container::after {
        width: 100px;
        height: 100px;
    }
    
    .hero-section .hero-icon::before {
        width: 50px;
        height: 50px;
        left: -120px;
    }
    
    .hero-section .hero-icon::after {
        width: 80px;
        height: 30px;
        bottom: -100px;
        right: -60px;
    }
    
    .hero-section .features::before {
        width: 40px;
        height: 40px;
        top: -50px;
    }
    
    .hero-section .features::after {
        width: 60px;
        height: 15px;
        bottom: -20px;
    }
    
    .help-slide {
        padding: 2rem 1.5rem;
        height: 320px;
    }
    
    .help-slide-content {
        padding-left: 0;
        text-align: center;
        margin-top: 1rem;
    }
    
    .help-slide-graphic {
        margin-bottom: 1rem;
    }
    
    .help-svg {
        max-width: 250px;
    }
    
    .help-slide-icon {
        width: 50px;
        height: 50px;
        margin: 0 auto 1rem auto;
    }
    
    .help-slide-icon i {
        font-size: 1.2rem;
    }
    
    .help-slide-content h3 {
        font-size: 1.3rem;
    }
    
    .help-slide-content p {
        font-size: 1rem;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
        height: 40px;
    }
    
    .carousel-control-prev {
        left: -20px;
    }
    
    .carousel-control-next {
        right: -20px;
    }
    
    .carousel-item {
        height: 320px;
    }
}
