/* ===================================
   Design System - Ecosistemas SERII
   =================================== */

:root {
    /* Cores principais - Verde Ecosistemas */
    --eco-green: #00B894;
    --eco-green-dark: #00A65A;
    --eco-green-light: #55EFC4;
    --eco-green-pale: #E8F8F5;

    /* Cores secundárias */
    --blue: #3B82F6;
    --blue-dark: #2563EB;
    --purple: #8B5CF6;
    --purple-dark: #7C3AED;
    --orange: #F59E0B;
    --orange-dark: #D97706;

    /* Grayscale */
    --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;

    /* Semantic colors */
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #3B82F6;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Border radius */
    --radius-sm: 0.375rem;
    --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 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-green: 0 10px 25px -5px rgba(0, 184, 148, 0.2);

    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    --font-weight-black: 900;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================
   Reset & Base Styles
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-900);
    background: var(--gray-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* ===================================
   Container & Layout
   =================================== */

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

/* ===================================
   Header
   =================================== */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, var(--eco-green) 0%, var(--eco-green-dark) 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.25rem;
    font-weight: var(--font-weight-normal);
    color: var(--gray-700);
}

.logo strong {
    font-weight: var(--font-weight-bold);
    color: var(--gray-900);
}

.header .logo img {
    filter: brightness(0) invert(1);
}

.header-nav {
    display: flex;
    gap: var(--space-xl);
}

.nav-link {
    font-size: 0.9375rem;
    font-weight: var(--font-weight-medium);
    color: rgba(255, 255, 255, 0.9);
    transition: all var(--transition-base);
    padding: var(--space-sm) 0;
    position: relative;
}

.nav-link:hover {
    color: white;
}

.nav-link.active {
    color: white;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: white;
    border-radius: var(--radius-full);
}

/* ===================================
   Hero Section
   =================================== */

.hero {
    padding: var(--space-3xl) 0;
    background: linear-gradient(180deg, white 0%, var(--gray-50) 100%);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: var(--eco-green-pale);
    color: var(--eco-green-dark);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-xl);
}

.hero-title {
    font-size: 3.75rem;
    font-weight: var(--font-weight-black);
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--eco-green) 0%, var(--eco-green-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: var(--space-2xl);
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    margin-bottom: var(--space-3xl);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2xl);
    padding-top: var(--space-2xl);
    border-top: 1px solid var(--gray-200);
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: var(--font-weight-extrabold);
    color: var(--eco-green);
    line-height: 1;
    margin-bottom: var(--space-sm);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* ===================================
   Buttons
   =================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
    transition: all var(--transition-base);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--eco-green) 0%, var(--eco-green-dark) 100%);
    color: white;
    box-shadow: var(--shadow-green);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -8px rgba(0, 184, 148, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: white;
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
}

.btn-secondary:hover {
    border-color: var(--eco-green);
    color: var(--eco-green);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ===================================
   Trilhas Section
   =================================== */

.trilhas-section {
    padding: var(--space-3xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-title {
    font-size: 2.5rem;
    font-weight: var(--font-weight-extrabold);
    color: var(--gray-900);
    margin-bottom: var(--space-md);
}

.section-description {
    font-size: 1.125rem;
    color: var(--gray-600);
}

.trilhas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
}

/* ===================================
   Trilha Cards
   =================================== */

.trilha-card {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.trilha-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--eco-green) 0%, var(--eco-green-light) 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.trilha-card.active::before {
    opacity: 1;
}

.trilha-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--eco-green);
}

.trilha-card.disabled {
    opacity: 0.7;
}

.trilha-card.disabled:hover {
    transform: none;
    border-color: var(--gray-200);
}

.trilha-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
}

.trilha-icon.green {
    background: linear-gradient(135deg, var(--eco-green) 0%, var(--eco-green-dark) 100%);
    color: white;
}

.trilha-icon.blue {
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
    color: white;
}

.trilha-icon.purple {
    background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
    color: white;
}

.trilha-icon.orange {
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    color: white;
}

.trilha-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-md);
}

.trilha-badge.disponivel {
    background: var(--eco-green-pale);
    color: var(--eco-green-dark);
}

.trilha-badge.em-breve {
    background: var(--gray-100);
    color: var(--gray-600);
}

.trilha-title {
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--gray-900);
    margin-bottom: var(--space-md);
}

.trilha-description {
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: var(--space-xl);
    flex-grow: 1;
}

.trilha-meta {
    display: flex;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--gray-200);
}

.trilha-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
    color: var(--gray-600);
}

.trilha-info svg {
    color: var(--gray-400);
}

/* ===================================
   Documentation Preview
   =================================== */

.docs-preview {
    padding: var(--space-3xl) 0;
    background: white;
}

.docs-preview-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.docs-preview-title {
    font-size: 2.5rem;
    font-weight: var(--font-weight-extrabold);
    color: var(--gray-900);
    margin-bottom: var(--space-lg);
}

.docs-preview-description {
    font-size: 1.125rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: var(--space-xl);
}

.docs-features {
    list-style: none;
    margin-bottom: var(--space-2xl);
}

.docs-features li {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    font-size: 1.0625rem;
    color: var(--gray-700);
}

.docs-features svg {
    color: var(--eco-green);
    flex-shrink: 0;
}

.docs-mockup {
    background: var(--gray-900);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.mockup-header {
    background: var(--gray-800);
    padding: var(--space-md);
    display: flex;
    align-items: center;
}

.mockup-buttons {
    display: flex;
    gap: var(--space-sm);
}

.mockup-buttons span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gray-600);
}

.mockup-content {
    display: grid;
    grid-template-columns: 200px 1fr;
    height: 300px;
    background: var(--gray-50);
}

.mockup-sidebar {
    background: white;
    border-right: 1px solid var(--gray-200);
}

.mockup-main {
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.mockup-line {
    height: 12px;
    background: var(--gray-300);
    border-radius: var(--radius-sm);
}

.mockup-line.short {
    width: 60%;
}

.mockup-line.medium {
    width: 80%;
}

/* ===================================
   Footer
   =================================== */

.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: var(--space-3xl) 0 var(--space-xl);
    margin-top: var(--space-4xl);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: var(--space-2xl);
    margin-bottom: var(--space-xl);
    border-bottom: 1px solid var(--gray-800);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-logo {
    height: 36px;
    filter: brightness(0) invert(1);
}

.footer-tagline {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: var(--space-2xl);
}

.footer-links a {
    color: var(--gray-400);
    font-size: 0.9375rem;
    transition: color var(--transition-base);
    text-decoration: none;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
}

.footer-bottom p {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin: 0;
}

/* ===================================
   Chatbot
   =================================== */

#chatbot-container {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    z-index: 1000;
}

.chatbot-button {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--eco-green) 0%, var(--eco-green-dark) 100%);
    border: none;
    color: white;
    box-shadow: var(--shadow-green);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    position: relative;
}

.chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 35px -8px rgba(0, 184, 148, 0.4);
}

.chat-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    background: var(--error);
    color: white;
    font-size: 0.75rem;
    font-weight: var(--font-weight-bold);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid white;
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 600px;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.chat-window.active {
    display: flex;
}

.chat-header {
    background: linear-gradient(135deg, var(--eco-green) 0%, var(--eco-green-dark) 100%);
    color: white;
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-title {
    font-weight: var(--font-weight-semibold);
    margin-bottom: 2px;
}

.chat-status {
    font-size: 0.875rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: #4ADE80;
}

.chat-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-base);
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-lg);
    background: var(--gray-50);
}

.message {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--eco-green);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.message-content {
    background: white;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    max-width: 75%;
    line-height: 1.6;
}

.message.user {
    flex-direction: row-reverse;
}

.message.user .message-avatar {
    background: var(--gray-300);
    color: var(--gray-700);
}

.message.user .message-content {
    background: var(--eco-green);
    color: white;
}

.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.quick-reply {
    padding: var(--space-sm) var(--space-md);
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    color: var(--gray-700);
    transition: all var(--transition-base);
}

.quick-reply:hover {
    background: var(--eco-green);
    color: white;
    border-color: var(--eco-green);
}

.chat-input-container {
    padding: var(--space-lg);
    background: white;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: var(--space-sm);
}

.chat-input {
    flex: 1;
    padding: var(--space-md);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    font-size: 0.9375rem;
    outline: none;
    transition: border-color var(--transition-base);
}

.chat-input:focus {
    border-color: var(--eco-green);
}

.chat-send {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    background: var(--eco-green);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-base);
}

.chat-send:hover {
    background: var(--eco-green-dark);
}

/* ===================================
   Responsive
   =================================== */

@media (max-width: 1024px) {
    .docs-preview-content {
        grid-template-columns: 1fr;
    }

    .docs-preview-image {
        order: -1;
    }

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-xl);
    }

    .footer-links {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1.125rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .section-title {
        font-size: 2rem;
    }

    .trilhas-grid {
        grid-template-columns: 1fr;
    }

    .footer-links {
        flex-direction: column;
        gap: var(--space-md);
    }

    .chat-window {
        width: calc(100vw - 2rem);
        right: -1rem;
    }

    #chatbot-container {
        right: var(--space-md);
        bottom: var(--space-md);
    }
}

@media (max-width: 640px) {
    .header-nav {
        display: none;
    }

    .container {
        padding: 0 var(--space-md);
    }
}
