@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,400&display=swap');

:root {
    --bg-main: #fbfbfa; /* Warm light canvas */
    --bg-secondary: #f4f3ee; /* Warm grey/cream */
    --bg-card: rgba(255, 255, 255, 0.95);
    --border-color: rgba(184, 147, 69, 0.18); /* Light gold border */
    --accent: #ad832f; /* Deep gold for reading on light theme */
    --accent-glow: rgba(173, 131, 47, 0.15);
    --accent-light: #c5a059;
    --text-primary: #111827; /* Dark slate */
    --text-secondary: #3b4252; /* Medium-dark slate */
    --text-muted: #6b7280; /* Neutral grey */
    --nav-height: 80px;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-quick: all 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: #e2e1d9;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 8rem 0;
    position: relative;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
    align-items: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Typographic Elements */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 {
    font-size: 4rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.75rem;
    letter-spacing: -0.01em;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 400;
    font-size: 1.1rem;
}

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

.serif-font {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 400;
}

.section-tag {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: 1rem;
    display: inline-block;
    font-weight: 700;
}

/* Premium Light Cards with Drop Shadow */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px -10px rgba(173, 131, 47, 0.06), 0 1px 3px rgba(0, 0, 0, 0.02);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    transition: var(--transition-smooth);
}

.glass-card:hover {
    transform: translateY(-8px);
    border-color: rgba(173, 131, 47, 0.4);
    box-shadow: 0 20px 40px -15px rgba(173, 131, 47, 0.15), 0 0 20px 0 rgba(173, 131, 47, 0.03);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 2.2rem;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    gap: 0.75rem;
}

.btn-primary {
    background: var(--accent);
    color: #ffffff;
    border: 1px solid var(--accent);
}

.btn-primary:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(173, 131, 47, 0.04);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.btn-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-quick);
}

.btn-link:hover {
    color: var(--accent-light);
}

.btn-link:hover svg, .btn-link:hover i {
    transform: translateX(4px);
}

.btn-link svg, .btn-link i {
    transition: var(--transition-quick);
}

/* Header & Navigation */
header {
    height: var(--nav-height);
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: var(--transition-smooth);
    background: transparent;
    border-bottom: 1px solid transparent;
}

header.scrolled {
    background: rgba(251, 251, 250, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 20px -10px rgba(173, 131, 47, 0.08);
}

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

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-img {
    height: 48px;
    object-fit: contain;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-quick);
    position: relative;
    padding: 0.5rem 0;
}

nav a:hover, nav a.active {
    color: var(--accent);
}

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

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

/* Header Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    background: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px -5px rgba(173, 131, 47, 0.12);
    border-radius: 8px;
    list-style: none;
    padding: 0.6rem 0;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    z-index: 1010;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(5px);
}

.dropdown-menu li {
    padding: 0;
    margin: 0;
    width: 100%;
}

.dropdown-menu a {
    display: block;
    padding: 0.6rem 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    width: 100%;
    transition: var(--transition-quick);
}

.dropdown-menu a::after {
    display: none;
}

.dropdown-menu a:hover, .dropdown-menu a.active {
    background: rgba(184, 147, 69, 0.06);
    color: var(--accent);
    padding-left: 1.8rem;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.8rem;
    cursor: pointer;
}

/* Hero Sections with Light Overlays */
.hero {
    min-height: 100vh;
    padding-top: var(--nav-height);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, var(--bg-main) 40%, rgba(251, 251, 250, 0.85) 65%, rgba(251, 251, 250, 0.4) 100%);
    z-index: 2;
}

.hero-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    opacity: 0.85; /* More visible on light background */
    animation: zoomHero 20s infinite alternate ease-in-out;
}

@keyframes zoomHero {
    0% { transform: scale(1); }
    100% { transform: scale(1.08); }
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 650px;
}

.hero-title {
    margin-bottom: 2rem;
    color: #0f172a;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
}

/* Inner Page Hero Banners (Light themed) */
.page-banner {
    height: 400px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding-bottom: 4rem;
    border-bottom: 4px solid var(--accent); /* Original Sepio page border */
}

.page-banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    opacity: 0.65;
}

.page-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, var(--bg-main) 0%, rgba(251, 251, 250, 0.65) 60%, rgba(251, 251, 250, 0.85) 100%);
    z-index: 2;
}

.page-banner-content {
    position: relative;
    z-index: 3;
}

/* Info Cards (Home CTAs) */
.info-cards-section {
    margin-top: -6rem;
    position: relative;
    z-index: 5;
    padding: 0;
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: rgba(184, 147, 69, 0.08);
    color: var(--accent);
    margin-bottom: 2rem;
    font-size: 1.5rem;
    border: 1px solid rgba(184, 147, 69, 0.15);
}

.info-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.info-card h3 {
    margin-bottom: 1rem;
    color: #0f172a;
}

.info-card p {
    flex-grow: 1;
    margin-bottom: 2rem;
}

/* Stats Section */
.stats-section {
    background: linear-gradient(180deg, var(--bg-main) 0%, var(--bg-secondary) 100%);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.stat-label {
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Features List & Side Images */
.feature-image-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px -15px rgba(184, 147, 69, 0.12);
}

.feature-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.feature-image-container:hover .feature-image {
    transform: scale(1.05);
}

.features-list {
    list-style: none;
}

.features-list li {
    position: relative;
    padding-left: 2.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.features-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent);
    font-weight: 800;
    font-size: 1.2rem;
}

/* Claims Accordion (Offer Page) */
.claims-accordion {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.accordion-item {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition-smooth);
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.01);
}

.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: var(--transition-quick);
}

.accordion-header:hover {
    color: var(--accent);
    background: rgba(184, 147, 69, 0.02);
}

.accordion-icon {
    font-size: 1.5rem;
    transition: var(--transition-smooth);
    color: var(--accent);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background: rgba(255, 255, 255, 0.4);
}

.accordion-body {
    padding: 0 2rem 2rem 2rem;
    color: var(--text-secondary);
    font-size: 1rem;
}

.accordion-item.active {
    border-color: var(--accent);
    background: #ffffff;
    box-shadow: 0 10px 30px -10px rgba(184, 147, 69, 0.15);
}

.accordion-item.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-item.active .accordion-content {
    max-height: 400px;
}

/* Product Cards (What We Offer Links) */
.product-cards {
    margin-top: 5rem;
}

.product-card {
    height: 350px;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2.5rem;
    text-decoration: none;
    transition: var(--transition-smooth);
    box-shadow: 0 10px 30px -10px rgba(184, 147, 69, 0.1);
}

.product-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    transition: var(--transition-smooth);
    opacity: 0.8; /* Higher opacity for light theme visibility */
}

.product-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(251, 251, 250, 0.95) 25%, rgba(251, 251, 250, 0.3) 100%);
    z-index: 2;
}

.product-card-content {
    position: relative;
    z-index: 3;
}

.product-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 20px 40px -10px rgba(184, 147, 69, 0.22);
}

.product-card:hover .product-card-bg {
    transform: scale(1.08);
}

.product-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

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

/* Form Styles (Contact page) */
.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 1rem 1.2rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-quick);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    background: #ffffff;
    box-shadow: 0 0 15px rgba(184, 147, 69, 0.15);
}

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

.contact-info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.contact-info-item {
    display: flex;
    gap: 1.5rem;
}

.contact-info-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: rgba(184, 147, 69, 0.06);
    border: 1px solid rgba(184, 147, 69, 0.12);
    color: var(--accent);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.contact-info-text h4 {
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.contact-info-text p, .contact-info-text a {
    color: var(--text-secondary);
    margin: 0;
    text-decoration: none;
    font-size: 0.95rem;
}

.contact-info-text a:hover {
    color: var(--accent);
}

.form-feedback {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    display: none;
    font-weight: 600;
}

.form-feedback.success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #047857;
}

.form-feedback.error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #b91c1c;
}

/* Map Simulated Container (Light themed) */
.map-container {
    height: 300px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    position: relative;
    box-shadow: 0 10px 30px -10px rgba(184, 147, 69, 0.1);
}

.map-placeholder {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, #ffffff 0%, #f6f5f0 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.map-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(184, 147, 69, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(184, 147, 69, 0.04) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}

/* Verification Code Field (Contact page detail) */
.verification-box {
    margin-top: 1.5rem;
    padding: 1.2rem;
    border-radius: 8px;
    background: var(--bg-secondary);
    border: 1px dashed var(--border-color);
}

.verification-box label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
}

/* Footer (Light/cream contrast styling) */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 5rem 0 3rem 0;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-brand p {
    margin-top: 1.5rem;
    font-size: 0.95rem;
}

.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-col a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-quick);
}

.footer-col a:hover {
    color: var(--accent);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(184, 147, 69, 0.12);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.footer-socials {
    display: flex;
    gap: 1.5rem;
}

.footer-socials a {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: var(--transition-quick);
}

.footer-socials a:hover {
    color: var(--accent);
}

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }

/* Responsive adjustments */
@media (max-width: 1024px) {
    h1 { font-size: 3.25rem; }
    h2 { font-size: 2.25rem; }
    .grid-2, .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .hero {
        text-align: center;
        padding-top: 6rem;
    }
    .hero-content {
        max-width: 100%;
        margin: 0 auto;
    }
    .hero-bg {
        width: 100%;
        opacity: 0.4;
    }
    .hero-overlay {
        background: radial-gradient(circle, rgba(251, 251, 250, 0.85) 0%, var(--bg-main) 100%);
    }
    .hero-actions {
        justify-content: center;
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    .grid-3 {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .info-cards-section {
        margin-top: 2rem;
        padding: 4rem 0;
    }
    .hamburger {
        display: block;
    }
    nav ul {
        position: fixed;
        top: var(--nav-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--nav-height));
        background: var(--bg-main);
        flex-direction: column;
        align-items: center;
        padding-top: 4rem;
        transition: var(--transition-smooth);
        z-index: 999;
        border-top: 1px solid var(--border-color);
    }
    nav ul.open {
        left: 0;
    }
    /* Disable dropdown hover in mobile and rely on standard flow */
    .dropdown:hover .dropdown-menu {
        transform: none;
    }
    .dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0;
        background: transparent;
        border: none;
    }
    .dropdown-menu a {
        text-align: center;
        padding: 0.5rem 0;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}

/* ==========================================
   Sonderbridge Premium Chat Bubble Styles
   ========================================== */

.sb-chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: var(--font-body);
}

/* Floating Action Button Launcher */
.sb-chat-launcher {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 25px rgba(173, 131, 47, 0.3), 0 0 0 0 rgba(173, 131, 47, 0.4);
    transition: var(--transition-smooth);
    position: relative;
    outline: none;
    animation: sb-pulse 2s infinite;
}

.sb-chat-launcher:hover {
    transform: scale(1.08);
    background: var(--accent-light);
    box-shadow: 0 15px 30px rgba(173, 131, 47, 0.4);
}

.sb-chat-launcher i {
    font-size: 1.5rem;
    transition: var(--transition-quick);
}

.sb-chat-launcher.open i {
    transform: rotate(90deg);
}

/* Pulse animation for the launcher */
@keyframes sb-pulse {
    0% {
        box-shadow: 0 10px 25px rgba(173, 131, 47, 0.3), 0 0 0 0 rgba(173, 131, 47, 0.4);
    }
    70% {
        box-shadow: 0 10px 25px rgba(173, 131, 47, 0.3), 0 0 0 15px rgba(173, 131, 47, 0);
    }
    100% {
        box-shadow: 0 10px 25px rgba(173, 131, 47, 0.3), 0 0 0 0 rgba(173, 131, 47, 0);
    }
}

/* Notification Badge */
.sb-chat-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #e63946;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid var(--bg-main);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Auto popup greeting tip */
.sb-chat-tip {
    position: absolute;
    bottom: 75px;
    right: 5px;
    width: 240px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 16px -8px rgba(173, 131, 47, 0.1);
    transform: translateY(15px);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.sb-chat-tip.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.sb-chat-tip-close {
    position: absolute;
    top: 6px;
    right: 8px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.8rem;
    transition: var(--transition-quick);
}

.sb-chat-tip-close:hover {
    color: var(--text-primary);
}

.sb-chat-tip-text {
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.4;
    font-weight: 500;
    padding-right: 12px;
    margin: 0;
}

.sb-chat-tip::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 22px;
    width: 15px;
    height: 15px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    transform: rotate(45deg);
}

/* Chat Main Panel */
.sb-chat-panel {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 360px;
    height: 520px;
    max-height: calc(90vh - 100px);
    background: rgba(251, 251, 250, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 20px 40px -10px rgba(173, 131, 47, 0.18), 0 10px 20px -10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(25px) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: bottom right;
}

.sb-chat-panel.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: all;
}

/* Chat Panel Header */
.sb-chat-header {
    background: var(--text-primary);
    padding: 1.25rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sb-chat-header-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sb-chat-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(173, 131, 47, 0.15);
    border: 1px solid var(--accent);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--accent);
}

.sb-chat-avatar i {
    font-size: 1.1rem;
}

.sb-chat-title-container {
    display: flex;
    flex-direction: column;
}

.sb-chat-title {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #ffffff;
    margin: 0;
}

.sb-chat-status {
    font-size: 0.75rem;
    color: #a0aec0;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.sb-chat-status::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #48bb78;
    border-radius: 50%;
}

.sb-chat-close-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    opacity: 0.7;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition-quick);
}

.sb-chat-close-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Chat Messages Container */
.sb-chat-messages {
    flex-grow: 1;
    padding: 1.25rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: linear-gradient(180deg, rgba(251, 251, 250, 0.5) 0%, rgba(244, 243, 238, 0.5) 100%);
}

/* Chat Scrollbar Customization */
.sb-chat-messages::-webkit-scrollbar {
    width: 5px;
}
.sb-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}
.sb-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(173, 131, 47, 0.15);
    border-radius: 3px;
}
.sb-chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Message Bubble Base */
.sb-chat-msg {
    max-width: 82%;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    font-size: 0.95rem;
    line-height: 1.4;
    word-wrap: break-word;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.sb-chat-msg p {
    margin: 0;
    font-size: inherit;
    color: inherit;
    line-height: inherit;
}

.sb-chat-msg-agent {
    align-self: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.sb-chat-msg-user {
    align-self: flex-end;
    background: var(--accent);
    color: #ffffff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 10px rgba(173, 131, 47, 0.2);
}

.sb-chat-msg-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    margin-bottom: 0;
    align-self: flex-start;
    padding-left: 2px;
}

.sb-chat-msg-user + .sb-chat-msg-time {
    align-self: flex-end;
    padding-right: 2px;
    padding-left: 0;
}

/* Quick Replies Container */
.sb-chat-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
    align-self: flex-start;
    max-width: 100%;
}

.sb-chat-quick-btn {
    background: var(--bg-card);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.5rem 0.85rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-quick);
    font-family: var(--font-body);
    box-shadow: 0 2px 5px rgba(173, 131, 47, 0.05);
}

.sb-chat-quick-btn:hover {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(173, 131, 47, 0.15);
}

/* Typing Indicator */
.sb-typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 2px;
}

.sb-typing-indicator span {
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: sb-bounce 1.4s infinite ease-in-out both;
}

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

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

@keyframes sb-bounce {
    0%, 80%, 100% { 
        transform: scale(0);
    } 
    40% { 
        transform: scale(1.0);
    }
}

/* Chat Input Area */
.sb-chat-input-area {
    padding: 0.85rem 1rem;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sb-chat-input {
    flex-grow: 1;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.55rem 1rem;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition-quick);
    background: var(--bg-main);
    font-family: var(--font-body);
    color: var(--text-primary);
}

.sb-chat-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(173, 131, 47, 0.1);
    background: #ffffff;
}

.sb-chat-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-quick);
    outline: none;
}

.sb-chat-send-btn:hover {
    background: var(--accent-light);
    transform: scale(1.05);
}

.sb-chat-send-btn:disabled {
    background: #cbd5e0;
    color: #718096;
    cursor: not-allowed;
    transform: none;
}

/* Mobile Responsiveness for Chat */
@media (max-width: 480px) {
    .sb-chat-widget {
        bottom: 20px;
        right: 20px;
    }
    .sb-chat-panel {
        width: calc(100vw - 40px);
        height: 480px;
        bottom: 70px;
    }
}

