/**
 * WhatsBot AI - Main Stylesheet
 *
 * A modern, conversion-focused design for the SaaS landing page.
 * Mobile-first approach with responsive breakpoints.
 */

/* =============================================================================
   CSS CUSTOM PROPERTIES (Variables)
   ============================================================================= */

:root {
    /* Primary Colors */
    --primary: #25D366;
    --primary-dark: #1da851;
    --primary-light: #34eb7a;

    /* Secondary Colors */
    --secondary: #075E54;
    --secondary-dark: #054d44;

    /* Accent Colors */
    --accent: #128C7E;
    --accent-gradient: linear-gradient(135deg, #25D366 0%, #128C7E 100%);

    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --black: #000000;

    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    --font-size-6xl: 3.75rem;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;

    /* Z-Index Scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-tooltip: 600;
}

/* =============================================================================
   RESET & BASE STYLES
   ============================================================================= */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

ul, ol {
    list-style: none;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =============================================================================
   BUTTONS
   ============================================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-weight: 600;
    font-size: var(--font-size-sm);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-gradient);
    color: var(--white);
    box-shadow: 0 4px 14px 0 rgba(37, 211, 102, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(37, 211, 102, 0.5);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--gray-700);
    border: 2px solid var(--gray-300);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-white {
    background: var(--white);
    color: var(--secondary);
}

.btn-white:hover {
    background: var(--gray-100);
    color: var(--secondary);
    transform: translateY(-2px);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--font-size-base);
}

.btn-full {
    width: 100%;
}

/* =============================================================================
   HEADER
   ============================================================================= */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 700;
    font-size: var(--font-size-xl);
    color: var(--gray-900);
}

.logo:hover {
    color: var(--gray-900);
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    color: var(--white);
    border-radius: var(--radius-lg);
    font-weight: 800;
}

.logo-highlight {
    color: var(--primary);
}

.nav-links {
    display: none;
    gap: var(--space-8);
}

.nav-links a {
    color: var(--gray-600);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: var(--space-2);
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }

    .mobile-menu-toggle {
        display: none;
    }
}

/* =============================================================================
   HERO SECTION
   ============================================================================= */

.hero {
    position: relative;
    padding: calc(72px + var(--space-16)) 0 var(--space-24);
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 50%, #e8fff0 100%);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(37, 211, 102, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(18, 140, 126, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero .container {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-12);
    align-items: center;
}

.hero-badge {
    display: inline-block;
    padding: var(--space-2) var(--space-4);
    background: rgba(37, 211, 102, 0.1);
    color: var(--secondary);
    font-size: var(--font-size-sm);
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-4);
}

.hero-title {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    line-height: 1.1;
    color: var(--gray-900);
    margin-bottom: var(--space-6);
}

.hero-subtitle {
    font-size: var(--font-size-lg);
    color: var(--gray-600);
    margin-bottom: var(--space-8);
    max-width: 540px;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin-bottom: var(--space-10);
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-8);
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    color: var(--secondary);
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--gray-500);
}

.hero-visual {
    display: none;
    justify-content: center;
}

/* Phone Mockup */
.phone-mockup {
    width: 300px;
    height: 600px;
    background: var(--gray-900);
    border-radius: 40px;
    padding: 12px;
    box-shadow: var(--shadow-2xl);
    transform: perspective(1000px) rotateY(-5deg);
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #ece5dd;
    border-radius: 28px;
    overflow: hidden;
}

.chat-preview {
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    height: 100%;
    overflow: hidden;
}

.chat-message {
    max-width: 85%;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
    position: relative;
    animation: fadeInUp 0.5s ease backwards;
}

.chat-message.incoming {
    background: var(--white);
    border-bottom-left-radius: var(--radius-sm);
    align-self: flex-start;
}

.chat-message.outgoing {
    background: #dcf8c6;
    border-bottom-right-radius: var(--radius-sm);
    align-self: flex-end;
}

.chat-message.outgoing.ai {
    background: linear-gradient(135deg, #dcf8c6 0%, #c8f0b0 100%);
}

.ai-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-gradient);
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-full);
}

.chat-message p {
    margin-bottom: var(--space-1);
    line-height: 1.4;
}

.chat-message .time {
    font-size: 10px;
    color: var(--gray-500);
    text-align: right;
    display: block;
}

.chat-message:nth-child(1) { animation-delay: 0.2s; }
.chat-message:nth-child(2) { animation-delay: 0.6s; }
.chat-message:nth-child(3) { animation-delay: 1s; }
.chat-message:nth-child(4) { animation-delay: 1.4s; }

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: var(--space-4);
    background: #dcf8c6;
    border-radius: var(--radius-lg);
    width: fit-content;
    align-self: flex-end;
    animation: fadeInUp 0.5s ease backwards;
    animation-delay: 1.8s;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--gray-500);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

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

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-10px); }
}

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

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: var(--white);
    line-height: 0;
}

.hero-wave svg {
    width: 100%;
    height: 60px;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: var(--font-size-5xl);
    }
}

@media (min-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr 1fr;
    }

    .hero-title {
        font-size: var(--font-size-6xl);
    }

    .hero-visual {
        display: flex;
    }
}

/* =============================================================================
   SECTION COMMON STYLES
   ============================================================================= */

section {
    padding: var(--space-16) 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-12);
}

.section-tag {
    display: inline-block;
    padding: var(--space-2) var(--space-4);
    background: rgba(37, 211, 102, 0.1);
    color: var(--secondary);
    font-size: var(--font-size-sm);
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-4);
}

.section-title {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: var(--space-4);
}

.section-subtitle {
    font-size: var(--font-size-lg);
    color: var(--gray-600);
}

@media (min-width: 768px) {
    section {
        padding: var(--space-24) 0;
    }

    .section-title {
        font-size: var(--font-size-4xl);
    }
}

/* =============================================================================
   FEATURES SECTION
   ============================================================================= */

.features {
    background: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
}

.feature-card {
    padding: var(--space-8);
    background: var(--gray-50);
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
}

.feature-card:hover {
    background: var(--white);
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.feature-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-5);
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--white);
}

.feature-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-3);
}

.feature-desc {
    color: var(--gray-600);
    line-height: 1.7;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* =============================================================================
   HOW IT WORKS SECTION
   ============================================================================= */

.how-it-works {
    background: var(--gray-50);
}

.steps {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    max-width: 600px;
    margin: 0 auto;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: var(--space-5);
    padding: var(--space-6);
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.step-number {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    color: var(--white);
    font-size: var(--font-size-xl);
    font-weight: 800;
    border-radius: var(--radius-full);
}

.step-content h3 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-2);
}

.step-content p {
    color: var(--gray-600);
}

.step-connector {
    width: 2px;
    height: 24px;
    background: var(--gray-300);
    margin-left: 23px;
}

@media (min-width: 768px) {
    .steps {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        max-width: none;
        gap: var(--space-4);
    }

    .step {
        flex: 1;
        min-width: 250px;
        max-width: 280px;
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .step-connector {
        display: none;
    }
}

/* =============================================================================
   USE CASES SECTION
   ============================================================================= */

.use-cases {
    background: var(--white);
}

.use-cases-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
}

.use-case-card {
    padding: var(--space-6);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
}

.use-case-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.use-case-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 211, 102, 0.1);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-4);
}

.use-case-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--secondary);
}

.use-case-card h3 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-2);
}

.use-case-card p {
    color: var(--gray-600);
    font-size: var(--font-size-sm);
}

@media (min-width: 768px) {
    .use-cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .use-cases-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* =============================================================================
   CUSTOMIZATION SECTION
   ============================================================================= */

.customization {
    background: var(--gray-50);
}

.customization-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-12);
    align-items: center;
}

.customization-text .section-tag {
    display: inline-block;
}

.customization-text .section-title {
    text-align: left;
    margin-bottom: var(--space-4);
}

.customization-text > p {
    color: var(--gray-600);
    margin-bottom: var(--space-6);
}

.customization-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.customization-list li {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--gray-700);
}

.customization-list svg {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    stroke: var(--primary);
}

/* Flow Builder Preview */
.customization-visual {
    display: flex;
    justify-content: center;
}

.flow-builder-preview {
    background: var(--white);
    padding: var(--space-8);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    text-align: center;
    width: 100%;
    max-width: 400px;
}

.flow-node {
    display: inline-block;
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.flow-node.start {
    background: var(--accent-gradient);
    color: var(--white);
}

.flow-node.condition {
    background: var(--gray-800);
    color: var(--white);
}

.flow-node.action {
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: var(--font-size-xs);
    padding: var(--space-2) var(--space-3);
}

.flow-line {
    width: 2px;
    height: 24px;
    background: var(--gray-300);
    margin: 0 auto var(--space-2);
}

.flow-branches {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    margin-top: var(--space-4);
}

.flow-branch {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.flow-label {
    font-size: var(--font-size-xs);
    color: var(--gray-500);
    margin-bottom: var(--space-2);
}

@media (min-width: 1024px) {
    .customization-content {
        grid-template-columns: 1fr 1fr;
    }
}

/* =============================================================================
   SECURITY SECTION
   ============================================================================= */

.security {
    background: var(--white);
}

.security-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
}

.security-card {
    padding: var(--space-6);
    background: var(--gray-50);
    border-radius: var(--radius-xl);
    text-align: center;
}

.security-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: var(--radius-full);
    margin: 0 auto var(--space-4);
    box-shadow: var(--shadow);
}

.security-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--secondary);
}

.security-card h3 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-2);
}

.security-card p {
    color: var(--gray-600);
    font-size: var(--font-size-sm);
}

@media (min-width: 768px) {
    .security-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .security-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* =============================================================================
   CTA SECTION
   ============================================================================= */

.cta-section {
    background: var(--accent-gradient);
    padding: var(--space-16) 0;
}

.cta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    color: var(--white);
    margin-bottom: var(--space-4);
}

.cta-content > p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-8);
}

.cta-buttons {
    margin-bottom: var(--space-4);
}

.cta-note {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.8);
}

@media (min-width: 768px) {
    .cta-content h2 {
        font-size: var(--font-size-4xl);
    }

    .cta-section {
        padding: var(--space-24) 0;
    }
}

/* =============================================================================
   FOOTER
   ============================================================================= */

.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
    margin-bottom: var(--space-12);
}

.footer-brand {
    max-width: 300px;
}

.footer-brand .logo {
    margin-bottom: var(--space-4);
}

.footer-brand .logo-text {
    color: var(--white);
}

.footer-brand p {
    font-size: var(--font-size-sm);
    line-height: 1.7;
}

.footer-links h4 {
    color: var(--white);
    font-size: var(--font-size-base);
    font-weight: 600;
    margin-bottom: var(--space-4);
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.footer-links a {
    color: var(--gray-400);
    font-size: var(--font-size-sm);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding-top: var(--space-8);
    border-top: 1px solid var(--gray-800);
    text-align: center;
    font-size: var(--font-size-sm);
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

/* =============================================================================
   MODAL
   ============================================================================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: var(--z-modal-backdrop);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--white);
    border-radius: var(--radius-2xl);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    transform: scale(0.95) translateY(20px);
    transition: transform var(--transition-base);
    box-shadow: var(--shadow-2xl);
    display: flex;
    flex-direction: column;
}

.modal-header {
    flex-shrink: 0;
    padding: var(--space-6);
    border-bottom: 1px solid var(--gray-200);
    position: relative;
}

.modal-header h2 {
    margin: 0;
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--gray-900);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-6);
}

.modal-footer {
    flex-shrink: 0;
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    font-size: var(--font-size-2xl);
    color: var(--gray-500);
    transition: all var(--transition-fast);
    z-index: 10;
}

.modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}

.modal-tabs {
    display: flex;
    border-bottom: 2px solid var(--gray-200);
}

.modal-tab {
    flex: 1;
    padding: var(--space-5);
    font-weight: 600;
    color: var(--gray-500);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition-fast);
}

.modal-tab:hover {
    color: var(--gray-700);
}

.modal-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.modal-form {
    display: none;
    padding: var(--space-8);
}

.modal-form.active {
    display: block;
}

.modal-form h2 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-2);
}

.modal-form > p {
    color: var(--gray-600);
    margin-bottom: var(--space-6);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.form-group {
    margin-bottom: var(--space-5);
}

.form-group label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--space-2);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-base);
    color: var(--gray-900);
    transition: all var(--transition-fast);
    background: var(--white);
}

.form-group input::placeholder {
    color: var(--gray-400);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
}

.form-group input.error {
    border-color: var(--error);
}

.recaptcha-container {
    display: flex;
    justify-content: center;
}

.form-error {
    color: var(--error);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-4);
    text-align: center;
    display: none;
}

.form-error.visible {
    display: block;
}

.form-footer {
    text-align: center;
    font-size: var(--font-size-sm);
    color: var(--gray-600);
    margin-top: var(--space-4);
}

.form-footer a {
    color: var(--primary);
}

/* =============================================================================
   LOADING STATES
   ============================================================================= */

.btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--white);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        flex-direction: column;
        gap: var(--space-4);
    }

    .modal {
        max-height: 100vh;
        border-radius: 0;
    }
}

/* =============================================================================
   LANGUAGE SWITCHER
   ============================================================================= */

.lang-switcher {
    position: relative;
    margin-right: var(--space-4);
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lang-toggle:hover {
    background: var(--gray-200);
}

.lang-toggle svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    transition: transform var(--transition-fast);
}

.lang-switcher.active .lang-toggle svg {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: var(--space-2);
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
    z-index: var(--z-dropdown);
    min-width: 120px;
}

.lang-switcher.active .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: none;
    border: none;
    font-size: var(--font-size-sm);
    color: var(--gray-700);
    cursor: pointer;
    transition: background var(--transition-fast);
    text-align: left;
}

.lang-option:hover {
    background: var(--gray-50);
}

.lang-option.active {
    background: rgba(37, 211, 102, 0.1);
    color: var(--secondary);
}

.lang-option .lang-flag {
    font-size: var(--font-size-base);
}

/* =============================================================================
   RTL (Right-to-Left) SUPPORT
   ============================================================================= */

/* RTL Base Styles */
html[dir="rtl"] {
    direction: rtl;
}

html[dir="rtl"] body {
    text-align: right;
}

/* RTL Typography - Use Hebrew-friendly font stack */
html[dir="rtl"] {
    --font-family: 'Heebo', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header RTL */
html[dir="rtl"] .nav {
    flex-direction: row-reverse;
}

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

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

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

html[dir="rtl"] .lang-switcher {
    margin-right: 0;
    margin-left: var(--space-4);
}

html[dir="rtl"] .lang-dropdown {
    right: auto;
    left: 0;
}

html[dir="rtl"] .lang-option {
    text-align: right;
    flex-direction: row-reverse;
}

/* Hero RTL */
html[dir="rtl"] .hero-content {
    text-align: right;
}

html[dir="rtl"] .hero-cta {
    justify-content: flex-start;
}

html[dir="rtl"] .hero-stats {
    justify-content: flex-start;
}

html[dir="rtl"] .phone-mockup {
    transform: perspective(1000px) rotateY(5deg);
}

/* Chat Messages RTL */
html[dir="rtl"] .chat-message.incoming {
    align-self: flex-end;
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-sm);
}

html[dir="rtl"] .chat-message.outgoing {
    align-self: flex-start;
    border-bottom-right-radius: var(--radius-lg);
    border-bottom-left-radius: var(--radius-sm);
}

html[dir="rtl"] .chat-message .time {
    text-align: left;
}

html[dir="rtl"] .ai-badge {
    right: auto;
    left: -8px;
}

html[dir="rtl"] .typing-indicator {
    align-self: flex-start;
}

/* Sections RTL */
html[dir="rtl"] .section-header {
    text-align: center;
}

/* Features RTL */
html[dir="rtl"] .feature-card {
    text-align: right;
}

/* Steps RTL */
html[dir="rtl"] .step {
    flex-direction: row-reverse;
    text-align: right;
}

html[dir="rtl"] .step-connector {
    margin-left: 23px;
    margin-right: 0;
}

@media (min-width: 768px) {
    html[dir="rtl"] .step {
        flex-direction: column;
        text-align: center;
    }
}

/* Use Cases RTL */
html[dir="rtl"] .use-case-card {
    text-align: right;
}

/* Customization RTL */
html[dir="rtl"] .customization-text .section-title {
    text-align: right;
}

html[dir="rtl"] .customization-list li {
    flex-direction: row-reverse;
}

@media (min-width: 1024px) {
    html[dir="rtl"] .customization-content {
        direction: rtl;
    }
}

/* Security RTL */
html[dir="rtl"] .security-card {
    text-align: center;
}

/* Footer RTL */
html[dir="rtl"] .footer-brand {
    text-align: right;
}

html[dir="rtl"] .footer-links {
    text-align: right;
}

html[dir="rtl"] .footer-links ul {
    align-items: flex-start;
}

/* Modal RTL */
html[dir="rtl"] .modal-close {
    right: auto;
    left: var(--space-4);
}

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

html[dir="rtl"] .form-group label {
    text-align: right;
}

html[dir="rtl"] .form-group input,
html[dir="rtl"] .form-group select {
    text-align: right;
}

html[dir="rtl"] .form-footer {
    text-align: center;
}

html[dir="rtl"] .form-error {
    text-align: center;
}

/* Buttons RTL */
html[dir="rtl"] .btn {
    flex-direction: row-reverse;
}

/* Mobile Menu RTL */
html[dir="rtl"] .mobile-menu-toggle {
    order: -1;
}

/* Dashboard RTL */
html[dir="rtl"] .dashboard-header-content {
    flex-direction: row-reverse;
}

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

html[dir="rtl"] .user-info {
    text-align: left;
}

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

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

html[dir="rtl"] .placeholder-section {
    text-align: center;
}

/* =============================================================================
   CUSTOM ALERT MODAL
   ============================================================================= */

.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.custom-alert-overlay.active {
    opacity: 1;
    visibility: visible;
}

.custom-alert-box {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    max-width: 420px;
    width: 90%;
    padding: var(--space-8);
    transform: scale(0.8) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
}

.custom-alert-overlay.active .custom-alert-box {
    transform: scale(1) translateY(0);
}

.custom-alert-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-5);
    animation: alertIconPop 0.5s ease 0.2s both;
}

@keyframes alertIconPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.custom-alert-icon svg {
    width: 36px;
    height: 36px;
}

/* Alert Types */
.custom-alert-icon.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.custom-alert-icon.success svg {
    color: var(--white);
}

.custom-alert-icon.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.custom-alert-icon.error svg {
    color: var(--white);
}

.custom-alert-icon.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.custom-alert-icon.warning svg {
    color: var(--white);
}

.custom-alert-icon.info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.custom-alert-icon.info svg {
    color: var(--white);
}

.custom-alert-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-2);
    animation: alertSlideUp 0.4s ease 0.25s both;
}

.custom-alert-message {
    font-size: var(--font-size-base);
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: var(--space-6);
    animation: alertSlideUp 0.4s ease 0.3s both;
}

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

.custom-alert-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: var(--space-3) var(--space-6);
    font-size: var(--font-size-base);
    font-weight: 600;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    animation: alertSlideUp 0.4s ease 0.35s both;
}

.custom-alert-button.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: var(--white);
}

.custom-alert-button.success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.custom-alert-button.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: var(--white);
}

.custom-alert-button.error:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.custom-alert-button.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: var(--white);
}

.custom-alert-button.warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.custom-alert-button.info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: var(--white);
}

.custom-alert-button.info:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.custom-alert-button:active {
    transform: translateY(0);
}

/* Shake animation for errors */
@keyframes alertShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

.custom-alert-box.shake {
    animation: alertShake 0.5s ease;
}

/* Confirm dialog buttons row */
.custom-alert-buttons {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
    animation: alertSlideUp 0.4s ease 0.35s both;
}

.custom-alert-buttons .custom-alert-button {
    animation: none;
}

.custom-alert-button.cancel {
    background: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.custom-alert-button.cancel:hover {
    background: var(--gray-50);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.custom-alert-button.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: var(--white);
}

.custom-alert-button.danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}
