/* Custom styles for Botomatic landing page */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #14213d;
    background: #ffffff;
}

a {
    color: #0d6efd;
}

a:hover {
    color: #0a58ca;
}

:focus-visible {
    outline: 3px solid #ffbf47;
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    top: -48px;
    right: 1rem;
    z-index: 2000;
    background: #ffffff;
    color: #111827;
    padding: 0.75rem 1rem;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
    text-decoration: none;
    font-weight: 700;
}

.skip-link:focus {
    top: 0;
}

/* Navigation */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.brand-logo {
    height: 36px;
    width: auto;
    display: block;
}

/* Hero Section */
.hero-section {
    background: var(--gradient);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.05"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(12, 8, 28, 0.28);
    pointer-events: none;
}

.hero-image {
    position: relative;
    z-index: 2;
    animation: float 6s ease-in-out infinite;
}

/* Improve contrast for highlighted text/icons on the hero gradient */
.hero-section .hero-accent {
    color: #ffe9a8;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
}

.hero-section .container,
.hero-section .row,
.hero-section .col-lg-6 {
    position: relative;
    z-index: 2;
}

[dir="rtl"] .hero-section h1,
[dir="rtl"] .hero-section p {
    unicode-bidi: plaintext;
}

[dir="rtl"] .hero-section .ltr-token {
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-block;
}

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

/* Features */
.feature-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    border: 1px solid #e9ecef;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

/* Demo */
.chat-demo-section .demo-copy {
    padding-right: 1rem;
}

.demo-point {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.chat-demo-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.12);
    border: 1px solid rgba(0,0,0,0.06);
    overflow: hidden;
    font-family: 'Heebo', sans-serif;
}

.chat-demo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.9rem 0.8rem;
    background: #075e54;
    color: #ecfdf3;
    position: relative;
}

.chat-demo-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 16px;
    background: #054c43;
    opacity: 0.95;
}

.chat-demo-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 18px;
}

.chat-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #25d366;
    color: #0b3a2d;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.5px;
}

.chat-name {
    font-weight: 600;
    color: #f0fdf4;
}

.chat-status {
    font-size: 0.8rem;
    color: rgba(236,253,243,0.8);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #25d366;
    display: inline-block;
    box-shadow: 0 0 0 3px rgba(37,211,102,0.18);
}

.chat-demo-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding-top: 18px;
    color: rgba(236,253,243,0.9);
    font-size: 0.95rem;
}

.chat-demo-actions i {
    opacity: 0.9;
}

.chat-demo-badge {
    background: #e7ffef;
    border-radius: 999px;
    padding: 0.18rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #0b3a2d;
    border: 1px solid rgba(37,211,102,0.35);
}

.chat-demo-body {
    padding: 1.1rem 0.9rem 1.5rem;
    background: #e5ddd5;
    background-image:
        radial-gradient(circle at 12px 12px, rgba(255,255,255,0.28) 1px, transparent 1px),
        radial-gradient(circle at 6px 6px, rgba(255,255,255,0.16) 1px, transparent 1px);
    background-size: 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    min-height: 320px;
    direction: rtl;
}

.chat-bubble {
    max-width: 85%;
    padding: 0.65rem 0.9rem 0.4rem;
    border-radius: 14px;
    font-size: 0.92rem;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(10px);
    animation: messageIn 0.6s ease forwards;
    animation-delay: var(--delay);
    position: relative;
}

.chat-bubble.user {
    align-self: flex-end;
    background: #dcf8c6;
    color: #0f172a;
    border-bottom-right-radius: 6px;
    box-shadow: 0 6px 14px rgba(15,23,42,0.08);
}

.chat-bubble.user::after {
    content: '';
    position: absolute;
    bottom: 6px;
    right: -6px;
    width: 10px;
    height: 10px;
    background: #dcf8c6;
    transform: rotate(45deg);
}

.chat-bubble.bot {
    align-self: flex-start;
    background: #ffffff;
    color: #0f172a;
    border: 1px solid rgba(0,0,0,0.08);
    border-bottom-left-radius: 6px;
    box-shadow: 0 6px 14px rgba(15,23,42,0.06);
}

.chat-bubble.bot::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: -6px;
    width: 10px;
    height: 10px;
    background: #ffffff;
    border-left: 1px solid rgba(0,0,0,0.08);
    border-bottom: 1px solid rgba(0,0,0,0.08);
    transform: rotate(45deg);
}

.typing-indicator {
    align-self: flex-start;
    display: inline-flex;
    gap: 0.3rem;
    padding: 0.5rem 0.85rem;
    background: #ffffff;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.08);
    opacity: 0;
    animation: typingReveal 1.6s ease forwards;
    animation-delay: var(--delay);
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    animation: typingDots 1s infinite;
}

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

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

.chat-demo-input {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.8rem;
    background: #f0f2f5;
    color: #94a3b8;
    font-size: 0.9rem;
    border-top: 1px solid rgba(0,0,0,0.1);
    direction: rtl;
}

.chat-demo-input span {
    background: #ffffff;
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    flex: 1;
    color: #94a3b8;
    border: 1px solid rgba(0,0,0,0.08);
}

.chat-demo-input i {
    color: #6b7280;
}

.chat-demo-input-actions {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.bubble-meta {
    margin-top: 0.35rem;
    font-size: 0.7rem;
    color: rgba(15,23,42,0.55);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    justify-content: flex-end;
}

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

.bubble-meta i {
    font-size: 0.7rem;
    color: #4fc3f7;
}

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

@keyframes typingDots {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50% { transform: translateY(-3px); opacity: 1; }
}

@keyframes typingReveal {
    0% { opacity: 0; transform: translateY(8px); }
    20% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(0); }
}

/* Testimonials */
.testimonials-section {
    background: #ffffff;
}

.testimonial-card {
    background: white;
    border-radius: 18px;
    padding: 2rem;
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.12);
}

.testimonial-card.featured {
    border: 2px solid rgba(0,123,255,0.35);
    box-shadow: 0 18px 45px rgba(0,123,255,0.15);
}

.testimonial-quote {
    font-size: 3rem;
    line-height: 1;
    color: rgba(0,123,255,0.35);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.testimonial-text {
    font-size: 1rem;
    color: #1f2933;
    margin-bottom: 1.5rem;
}

.testimonial-footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.testimonial-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gradient);
    color: white;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 1px;
}

.testimonial-name {
    font-weight: 600;
}

.testimonial-role {
    font-size: 0.85rem;
    color: var(--secondary-color);
}

/* Contact Form */
.contact-form {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.form-helper {
    font-size: 0.95rem;
}

.form-legal-note {
    font-size: 0.92rem;
    color: #4b5563;
}

.form-optional-note {
    font-size: 0.9rem;
    color: #6b7280;
}

.form-status {
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.status-success {
    background: #e9f9ef;
    color: #0f5132;
}

.status-error {
    background: #fdecec;
    color: #842029;
}

.status-info {
    background: #edf5ff;
    color: #0c4a6e;
}

.btn-whatsapp {
    background: #25d366;
    border-color: #25d366;
    color: #ffffff;
}

.btn-whatsapp:hover {
    background: #1ebe5d;
    border-color: #1ebe5d;
    color: #ffffff;
}

.footer-logo {
    height: 28px;
    width: auto;
    display: inline-block;
}

.footer-title {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.footer-links li + li {
    margin-top: 0.5rem;
}

.footer-links a,
.footer-contact a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
}

.footer-links a:hover,
.footer-contact a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.form-control {
    border-radius: 10px;
    border: 1px solid #e9ecef;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Buttons */
.btn {
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--gradient);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.btn-whatsapp:focus-visible,
.btn-primary:focus-visible,
.btn-outline-light:focus-visible,
.btn-outline-primary:focus-visible {
    outline-color: #ffffff;
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
        padding: 5rem 0;
    }

    .display-4 {
        font-size: 2.5rem;
    }

    .chat-demo-section .demo-copy {
        padding-right: 0;
        text-align: center;
    }

    .chat-demo-section .demo-copy .demo-point {
        justify-content: center;
    }

    .testimonial-card {
        text-align: center;
    }

    .testimonial-footer {
        justify-content: center;
    }

    .legal-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .legal-nav-links {
        justify-content: space-between;
    }

    .legal-shell {
        padding: 1.5rem;
        border-radius: 18px;
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

.legal-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(13,110,253,0.12), transparent 30%),
        linear-gradient(180deg, #f8fbff 0%, #ffffff 35%);
}

.legal-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(20,33,61,0.08);
}

.legal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}

.legal-brand {
    display: inline-flex;
    align-items: center;
}

.legal-nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.legal-nav-links a {
    text-decoration: none;
    color: #1f2937;
    font-weight: 600;
}

.legal-main {
    padding: 3rem 0 4rem;
}

.legal-shell {
    max-width: 860px;
    margin: 0 auto;
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(20,33,61,0.08);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
    padding: 2rem;
}

.legal-eyebrow {
    color: #0d6efd;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.legal-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 0.75rem;
}

.legal-updated {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.legal-intro {
    font-size: 1.1rem;
    color: #374151;
    margin-bottom: 2rem;
}

.legal-section + .legal-section {
    margin-top: 2rem;
}

.legal-section h2 {
    font-size: 1.35rem;
    margin-bottom: 0.85rem;
}

.legal-section p {
    color: #374151;
    margin-bottom: 0.85rem;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* RTL (Hebrew) Support */
[dir="rtl"] body {
    font-family: 'Heebo', sans-serif;
    direction: rtl;
}

[dir="rtl"] .navbar-nav {
    flex-direction: row-reverse;
}

[dir="rtl"] .navbar-brand {
    margin-right: 0;
    margin-left: 1rem;
}

[dir="rtl"] .me-2 {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}

[dir="rtl"] .me-1 {
    margin-right: 0 !important;
    margin-left: 0.25rem !important;
}

[dir="rtl"] .text-md-end {
    text-align: left !important;
}

[dir="rtl"] .hero-section .row {
    flex-direction: row-reverse;
}

[dir="rtl"] .hero-section {
    text-align: right;
}

[dir="rtl"] .hero-section .d-flex {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

[dir="rtl"] .feature-card {
    text-align: right;
}

[dir="rtl"] .btn {
    flex-direction: row-reverse;
}

[dir="rtl"] .fas.fa-paper-plane {
    margin-left: 0.5rem;
    margin-right: 0;
}

[dir="rtl"] .dropdown-menu {
    left: auto;
    right: 0;
    text-align: right;
}

[dir="rtl"] .chat-demo-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .chat-demo-title {
    flex-direction: row-reverse;
}

[dir="rtl"] .testimonial-card {
    text-align: right;
}

[dir="rtl"] .testimonial-footer {
    flex-direction: row-reverse;
}

/* Adjust spacing for RTL */
[dir="rtl"] .container {
    padding-left: 15px;
    padding-right: 15px;
}

[dir="rtl"] .navbar-toggler {
    margin-left: auto;
    margin-right: 0;
}

[dir="rtl"] .navbar-nav.me-auto {
    margin-left: 0 !important;
    margin-right: auto !important;
}

/* Form adjustments for RTL */
[dir="rtl"] .form-control {
    text-align: right;
}

[dir="rtl"] .form-control::placeholder {
    text-align: right;
}

/* Button adjustments */
[dir="rtl"] .btn i {
    margin-left: 0.5rem;
    margin-right: 0;
}

[dir="rtl"] .skip-link {
    left: auto;
    right: 1rem;
}

[dir="rtl"] .legal-nav-links {
    flex-direction: row-reverse;
}

[dir="rtl"] .footer-links,
[dir="rtl"] .legal-shell,
[dir="rtl"] .form-optional-note,
[dir="rtl"] .form-legal-note,
[dir="rtl"] .form-helper {
    text-align: right;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-image,
    .chat-bubble,
    .fade-in-up {
        animation: none !important;
        transform: none !important;
    }
}
