/* ===========================================
   CONEXÃO DO AGRO - Design System Premium
   Mobile-First | Glassmorphism | LGPD
   =========================================== */

/* CSS Custom Properties */
:root {
    /* Colors */
    --primary: #2E7D32;
    --primary-dark: #1B5E20;
    --primary-light: #4CAF50;
    --secondary: #F57C00;
    --secondary-dark: #E65100;
    --accent: #FFC107;

    /* Neutrals */
    --bg-light: #FAFAFA;
    --bg-white: #FFFFFF;
    --bg-dark: #1A1A1A;
    --text-primary: #212121;
    --text-secondary: #616161;
    --text-light: #FFFFFF;
    --border: #E0E0E0;

    /* Status */
    --success: #388E3C;
    --error: #D32F2F;
    --warning: #F9A825;

    /* 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;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --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: 2rem;
    --font-size-4xl: 2.5rem;
    --font-size-5xl: 3rem;

    /* Effects */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    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);
}

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

h1 {
    font-size: var(--font-size-4xl);
}

h2 {
    font-size: var(--font-size-3xl);
}

h3 {
    font-size: var(--font-size-2xl);
}

h4 {
    font-size: var(--font-size-xl);
}

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

    h2 {
        font-size: var(--font-size-4xl);
    }
}

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

/* ===========================================
   NAVBAR
   =========================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: var(--space-sm) 0;
    transition: all var(--transition-base);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.navbar-brand img {
    height: 40px;
    width: auto;
}

.navbar-nav {
    display: none;
    list-style: none;
    gap: var(--space-lg);
}

.navbar-nav a {
    color: var(--text-secondary);
    font-weight: 500;
    padding: var(--space-sm) 0;
    position: relative;
}

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

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

.navbar-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
}

.navbar-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-fast);
}

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

    .navbar-toggle {
        display: none;
    }
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-white);
    padding: var(--space-lg);
    box-shadow: var(--shadow-lg);
    z-index: 999;
}

.mobile-menu.open {
    display: block;
}

.mobile-menu ul {
    list-style: none;
}

.mobile-menu a {
    display: block;
    padding: var(--space-md);
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    font-weight: 500;
}

@media (min-width: 768px) {
    .mobile-menu {
        display: none !important;
    }
}

/* ===========================================
   HERO SECTION
   =========================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text-light);
    padding: 100px var(--space-md) var(--space-3xl);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 700px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-lg);
}

.hero h1 {
    color: var(--text-light);
    margin-bottom: var(--space-lg);
    font-size: var(--font-size-3xl);
    line-height: 1.1;
}

.hero-subtitle {
    font-size: var(--font-size-lg);
    opacity: 0.9;
    margin-bottom: var(--space-xl);
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

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

    .hero-cta {
        flex-direction: row;
    }
}

/* ===========================================
   BUTTONS
   =========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: var(--font-size-base);
    cursor: pointer;
    border: none;
    transition: all var(--transition-base);
    text-decoration: none;
}

.btn-primary {
    background: var(--secondary);
    color: var(--text-light);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--text-light);
}

.btn-outline {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--text-light);
}

.btn-outline:hover {
    background: var(--text-light);
    color: var(--primary);
}

.btn-whatsapp {
    background: #25D366;
    color: var(--text-light);
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-2px);
    color: var(--text-light);
}

/* ===========================================
   SECTIONS
   =========================================== */
section {
    padding: var(--space-3xl) 0;
}

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

.section-header h2 {
    margin-bottom: var(--space-md);
}

.section-header p {
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
}

/* ===========================================
   BENEFITS
   =========================================== */
.benefits {
    background: var(--bg-white);
}

.benefits-grid {
    display: grid;
    gap: var(--space-lg);
}

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

.benefit-card {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    transition: all var(--transition-base);
    border: 1px solid var(--border);
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.benefit-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
    font-size: 28px;
}

.benefit-card h3 {
    margin-bottom: var(--space-sm);
    font-size: var(--font-size-xl);
}

.benefit-card p {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* ===========================================
   HOW IT WORKS (Timeline)
   =========================================== */
.how-it-works {
    background: var(--bg-light);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary);
    border-radius: 2px;
}

@media (min-width: 768px) {
    .timeline::before {
        left: 50%;
        transform: translateX(-50%);
    }
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: var(--space-xl);
}

@media (min-width: 768px) {
    .timeline-item {
        padding-left: 0;
        width: 50%;
    }

    .timeline-item:nth-child(odd) {
        padding-right: 50px;
        text-align: right;
    }

    .timeline-item:nth-child(even) {
        margin-left: 50%;
        padding-left: 50px;
    }
}

.timeline-number {
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--text-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    z-index: 1;
}

@media (min-width: 768px) {
    .timeline-item:nth-child(odd) .timeline-number {
        left: auto;
        right: -20px;
    }

    .timeline-item:nth-child(even) .timeline-number {
        left: -20px;
    }
}

.timeline-content {
    background: var(--bg-white);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.timeline-content h3 {
    color: var(--primary);
    margin-bottom: var(--space-sm);
}

/* ===========================================
   FAQ (Accordion)
   =========================================== */
.faq {
    background: var(--bg-white);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    background: var(--bg-light);
    border: none;
    padding: var(--space-lg);
    text-align: left;
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition-fast);
}

.faq-question:hover {
    background: var(--bg-white);
}

.faq-question::after {
    content: '+';
    font-size: var(--font-size-xl);
    color: var(--primary);
    transition: transform var(--transition-fast);
}

.faq-item.open .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base);
}

.faq-item.open .faq-answer {
    max-height: 500px;
}

.faq-answer-content {
    padding: var(--space-lg);
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ===========================================
   PARTNERS SECTION
   =========================================== */
.partners {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: var(--text-light);
}

.partners .section-header h2,
.partners .section-header p {
    color: var(--text-light);
}

.partners-grid {
    display: grid;
    gap: var(--space-md);
}

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

.partner-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    transition: all var(--transition-base);
}

.partner-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.02);
}

.partner-card h3 {
    color: var(--text-light);
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-sm);
}

.partner-card p {
    font-size: var(--font-size-sm);
    opacity: 0.9;
}

.partners-cta {
    text-align: center;
    margin-top: var(--space-2xl);
}

/* ===========================================
   CTA SECTION
   =========================================== */
.cta-section {
    background: var(--bg-white);
    text-align: center;
}

.cta-box {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text-light);
    padding: var(--space-3xl);
    border-radius: var(--radius-xl);
    max-width: 800px;
    margin: 0 auto;
}

.cta-box h2 {
    color: var(--text-light);
    margin-bottom: var(--space-md);
}

.cta-box p {
    margin-bottom: var(--space-xl);
    opacity: 0.9;
}

/* ===========================================
   FOOTER
   =========================================== */
footer {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: var(--space-3xl) 0 var(--space-lg);
}

.footer-grid {
    display: grid;
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

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

.footer-brand img {
    height: 50px;
    margin-bottom: var(--space-md);
    filter: brightness(0) invert(1);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-size-sm);
}

.footer-col h4 {
    color: var(--text-light);
    margin-bottom: var(--space-md);
    font-size: var(--font-size-base);
}

.footer-col ul {
    list-style: none;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-size-sm);
    display: block;
    padding: var(--space-xs) 0;
    transition: color var(--transition-fast);
}

.footer-col a:hover {
    color: var(--text-light);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--space-lg);
    text-align: center;
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.5);
}

/* ===========================================
   MODAL
   =========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
}

.modal-overlay.open {
    display: flex;
}

.modal {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: none;
    border: none;
    font-size: var(--font-size-2xl);
    cursor: pointer;
    color: var(--text-secondary);
}

.modal-body {
    padding: var(--space-lg);
}

/* ===========================================
   FORMS
   =========================================== */
.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 500;
    font-size: var(--font-size-sm);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: var(--space-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-family: inherit;
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

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

.form-error {
    color: var(--error);
    font-size: var(--font-size-sm);
    margin-top: var(--space-xs);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
}

.checkbox-group input {
    width: auto;
    margin-top: 4px;
}

.checkbox-group label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* ===========================================
   WHATSAPP FLOAT
   =========================================== */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 1500;
    transition: all var(--transition-base);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: white;
}

/* ===========================================
   COOKIE BANNER
   =========================================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    color: var(--text-light);
    padding: var(--space-lg);
    z-index: 3000;
    display: none;
}

.cookie-banner.show {
    display: block;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

@media (min-width: 768px) {
    .cookie-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.cookie-text {
    flex: 1;
}

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

.cookie-buttons {
    display: flex;
    gap: var(--space-sm);
}

.cookie-btn {
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.cookie-btn.accept {
    background: var(--primary);
    color: var(--text-light);
}

.cookie-btn.reject {
    background: transparent;
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ===========================================
   PAGE CONTENT
   =========================================== */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text-light);
    padding: 120px 0 var(--space-3xl);
    text-align: center;
}

.page-header h1 {
    color: var(--text-light);
}

.page-content {
    padding: var(--space-3xl) 0;
    max-width: 800px;
    margin: 0 auto;
}

.page-content h2 {
    margin: var(--space-xl) 0 var(--space-md);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
}

.page-content h2:first-of-type {
    border-top: none;
    padding-top: 0;
}

.page-content p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}

.page-content ul,
.page-content ol {
    margin: var(--space-md) 0;
    padding-left: var(--space-xl);
}

.page-content li {
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
}

/* ===========================================
   404 PAGE
   =========================================== */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--bg-light);
}

.error-page h1 {
    font-size: 8rem;
    color: var(--primary);
    line-height: 1;
}

.error-page h2 {
    margin-bottom: var(--space-md);
}

.error-page p {
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
}

/* ===========================================
   ANIMATIONS
   =========================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

/* ===========================================
   UTILITIES
   =========================================== */
.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: var(--space-md);
}

.mt-2 {
    margin-top: var(--space-xl);
}

.mb-1 {
    margin-bottom: var(--space-md);
}

.mb-2 {
    margin-bottom: var(--space-xl);
}

.hidden {
    display: none;
}