/* ============================================
   LAVENDER HOME CARE - COMPLETE STYLES
   ============================================ */

/* CSS Variables */
:root {
    --lavender-50: #f5f3ff;
    --lavender-100: #ede9fe;
    --lavender-500: #9b87f5;
    --lavender-600: #7c61db;
    --lavender-700: #6d28d9;
}

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

html, body {
    overflow-x: hidden;
    max-width: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: #1f2937;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Raleway', sans-serif;
}

/* ============================================
   HERO SECTION
   ============================================ */
#hero {
    background: linear-gradient(rgba(92, 77, 166, 0.85), rgba(124, 97, 219, 0.8)), 
                url('../assets/images/pic1.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 70vh;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    background: linear-gradient(135deg, var(--lavender-500), var(--lavender-600));
    color: white;
    padding: 12px 32px;
    border-radius: 9999px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(155, 135, 245, 0.3);
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav-link {
    position: relative;
    padding-bottom: 4px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--lavender-500);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ============================================
   SECTION TITLES
   ============================================ */
.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c4964;
    margin-bottom: 1rem;
}

.section-title p {
    font-size: 1.125rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   ICON BOX
   ============================================ */
.icon-box {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--lavender-500), var(--lavender-600));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 25px rgba(155, 135, 245, 0.2);
}

/* ============================================
   SERVICE BOX
   ============================================ */
.service-box {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.service-box:hover {
    transform: translateY(-10px);
    border-color: var(--lavender-500);
    box-shadow: 0 20px 50px rgba(155, 135, 245, 0.15);
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */
.scroll-reveal,
.scroll-reveal-left,
.scroll-reveal-right {
    opacity: 1;
    transform: translate(0);
    transition: all 0.8s ease;
}

.animations-ready .scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
}

.animations-ready .scroll-reveal-left {
    opacity: 0;
    transform: translateX(-50px);
}

.animations-ready .scroll-reveal-right {
    opacity: 0;
    transform: translateX(50px);
}

.scroll-reveal.active,
.scroll-reveal-left.active,
.scroll-reveal-right.active {
    opacity: 1 !important;
    transform: translate(0) !important;
}

/* ============================================
   IMAGE SLIDER (About Section)
   ============================================ */
.image-slider {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.slider-container {
    display: flex;
    transition: transform 0.5s ease;
}

.slider-image {
    min-width: 100%;
    height: 400px;
    object-fit: cover;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--lavender-600);
    transition: all 0.3s ease;
}

.slider-btn:hover {
    background: var(--lavender-50);
    transform: translateY(-50%) scale(1.1);
}

.slider-btn.prev {
    left: 20px;
}

.slider-btn.next {
    right: 20px;
}

/* ============================================
   CONTACT MODAL
   ============================================ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal.active {
    display: flex !important;
    animation: fadeIn 0.25s ease;
}

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

@keyframes slideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content {
    background: white;
    border-radius: 24px;
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
    animation: slideUp 0.3s ease;
    position: relative;
}

.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--lavender-500);
    border-radius: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--lavender-50);
}

/* Modal Header */
.contact-header {
    background: linear-gradient(135deg, var(--lavender-500), var(--lavender-600));
    padding: 28px 32px;
    border-radius: 24px 24px 0 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.contact-header h3 {
    color: white;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.55;
    margin: 0;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* Modal Body */
.contact-body {
    padding: 28px 32px 32px;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 7px;
}

.form-group label span {
    color: #ef4444;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    transition: border 0.2s, box-shadow 0.2s;
    background: #fafafa;
    font-family: inherit;
    color: #374151;
}

.form-control:focus {
    border-color: var(--lavender-500);
    background: white;
    box-shadow: 0 0 0 4px rgba(155, 135, 245, 0.1);
}

.form-control::placeholder {
    color: #b0b7c3;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Contact Type Checkboxes */
.contact-type {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.contact-type label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    padding: 9px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    transition: all 0.2s;
    margin: 0;
}

.contact-type label:hover {
    border-color: var(--lavender-500);
    background: var(--lavender-50);
    color: var(--lavender-700);
}

.contact-type input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--lavender-600);
    cursor: pointer;
}

/* Radio Group */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    color: #374151;
    margin: 0;
}

.radio-option:hover {
    border-color: var(--lavender-500);
    background: var(--lavender-50);
    color: var(--lavender-700);
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--lavender-600);
    cursor: pointer;
    flex-shrink: 0;
}

/* Terms Checkbox */
.terms-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 24px;
    font-size: 12.5px;
    color: #6b7280;
    cursor: pointer;
    line-height: 1.5;
}

.terms-check input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin-top: 2px;
    accent-color: var(--lavender-600);
    cursor: pointer;
    flex-shrink: 0;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--lavender-500), var(--lavender-600));
    color: white;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.3px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(155, 135, 245, 0.4);
}

.btn-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 48px 32px;
}

.success-message h4 {
    font-size: 26px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
}

.success-message p {
    font-size: 15px;
    color: #6b7280;
    margin-bottom: 28px;
    line-height: 1.65;
}

/* Loading State */
.loading {
    display: none;
    text-align: center;
    padding: 4rem 2rem;
}

.loading.active {
    display: block;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--lavender-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* ============================================
   CHATBOT
   ============================================ */

/* Toggle Button */
.chat-toggle {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 58px;
    height: 58px;
    background: linear-gradient(135deg, var(--lavender-500), var(--lavender-600));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(155, 135, 245, 0.45);
    z-index: 9000;
    transition: all 0.3s;
    border: none;
    font-size: 26px;
}

.chat-toggle:hover {
    transform: scale(1.1);
}

.chat-toggle.hidden-toggle {
    opacity: 0;
    pointer-events: none;
}

/* Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 360px;
    height: 520px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18);
    z-index: 9001;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.chat-widget.active {
    display: flex;
    animation: slideUp 0.3s ease;
}

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, var(--lavender-500), var(--lavender-600));
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

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

.chat-header-avatar {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.chat-header-text h3 {
    color: white;
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 2px 0;
}

.chat-header-text p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 11px;
    margin: 0;
}

/* Chat Close Button */
.chat-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.2s;
    flex-shrink: 0;
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* Chat Messages Area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f9fafb;
}

.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

/* Chat Message Rows */
.chat-msg {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.chat-msg.bot {
    justify-content: flex-start;
}

.chat-msg.user {
    justify-content: flex-end;
}

.chat-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--lavender-500), var(--lavender-600));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

/* Chat Bubbles */
.chat-bubble {
    max-width: 76%;
    padding: 11px 14px;
    border-radius: 18px;
    font-size: 13.5px;
    line-height: 1.55;
    word-break: break-word;
}

.bot-bubble {
    background: white;
    color: #374151;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.user-bubble {
    background: var(--lavender-500);
    color: white;
    border-bottom-right-radius: 4px;
}

/* Typing Indicator */
.typing-dots {
    display: flex;
    gap: 5px;
    padding: 4px 2px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lavender-500);
    animation: bounce 1.2s infinite;
}

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

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

@keyframes bounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

/* Chat Input Area */
.chat-input-area {
    padding: 12px 14px;
    background: white;
    border-top: 1px solid #f0ebff;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.chat-input-area input {
    flex: 1;
    padding: 11px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    font-size: 13.5px;
    outline: none;
    transition: border 0.2s;
    font-family: inherit;
}

.chat-input-area input:focus {
    border-color: var(--lavender-500);
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--lavender-500);
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    background: var(--lavender-600);
    transform: scale(1.05);
}

/* WhatsApp Button in Chat */
.whatsapp-chat-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25D366;
    color: white;
    padding: 10px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    margin-left: 36px;
}

.whatsapp-chat-btn:hover {
    background: #20ba5a;
    transform: scale(1.03);
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Modal Responsive */
@media (max-width: 640px) {
    .modal {
        align-items: flex-end;
        padding: 0;
    }

    .modal-content {
        border-radius: 20px 20px 0 0;
        max-height: 95vh;
        margin-top: auto;
    }

    .contact-header {
        padding: 22px 20px;
        border-radius: 20px 20px 0 0;
    }

    .contact-header h3 {
        font-size: 15px;
    }

    .contact-body {
        padding: 20px;
    }

    .contact-type {
        flex-direction: column;
    }

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

/* Chatbot Responsive */
@media (max-width: 480px) {
    .chat-widget {
        width: calc(100vw - 20px);
        height: calc(100vh - 100px);
        right: 10px;
        bottom: 10px;
    }

    .chat-toggle {
        bottom: 20px;
        right: 16px;
    }
}

/* Slider Responsive */
@media (max-width: 768px) {
    .slider-image {
        height: 300px;
    }

    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .slider-btn.prev {
        left: 10px;
    }

    .slider-btn.next {
        right: 10px;
    }
}