﻿/* ========================================
   DIVIDILO - MODERN UI (Mobile Optimized)
   Brand Colors: Green #009639
   ======================================== */

/* === CSS Variables === */
:root {
    /* Colors */
    --primary: #009639;
    --primary-dark: #007a2d;
    --primary-light: #e6f4ea;
    --accent: #1a1a1a;
    --text-main: #1a1a1a;
    --text-muted: #666666;
    --bg-body: #ffffff;
    --bg-secondary: #f8f9fa;
    --border-color: #e5e7eb;
    --white: #ffffff;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;

    /* Borders */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 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 8px 24px rgba(0, 150, 57, 0.25);

    /* Transitions */
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Reset & Base === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-body);
    line-height: 1.5;
    overflow-x: hidden;
}

img, svg {
    display: block;
    max-width: 100%;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* === Components === */

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary);
    color: var(--white);
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    transition: var(--transition-base);
    box-shadow: var(--shadow-green);
    text-decoration: none;
    gap: 0.5rem;
    font-size: 1.1rem;
    width: 100%;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 150, 57, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

/* === Layout Sections === */

/* Hero Section */
.hero-modern {
    padding: var(--spacing-2xl) var(--spacing-md);
    padding-top: var(--spacing-xl);
    background: linear-gradient(180deg, var(--bg-body) 0%, var(--primary-light) 100%);
    overflow: hidden;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    gap: var(--spacing-2xl);
    align-items: center;
}

.hero-logo {
    height: 32px;
    margin-bottom: var(--spacing-lg);
}

.hero-title-new {
    font-size: 2.25rem;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: var(--spacing-lg);
    color: var(--accent);
}

.text-green {
    color: var(--primary);
}

.hero-subtitle-new {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-xl);
    line-height: 1.6;
}

.btn-hero-new {
    width: 100%;
    margin-bottom: var(--spacing-xl);
}
.btn-hero-new svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}
.btn-hero-new:hover svg {
    transform: translateX(4px);
}

.hero-image {
    width: 100%;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    animation: fadeInUp 0.8s ease-out;
}

/* Features Section */
.features-compact {
    padding: var(--spacing-2xl) var(--spacing-md);
    background: var(--bg-body);
}

.container-compact {
    max-width: 1200px;
    margin: 0 auto;
}

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

.feature-item-detailed {
    background: var(--bg-secondary);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-md);
    transition: var(--transition-base);
}

.feature-icon-large {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-xs);
}

.feature-icon-large svg {
    width: 24px;
    height: 24px;
}

.feature-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    color: var(--text-main);
}

.feature-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* How It Works */
.how-it-works {
    padding: var(--spacing-2xl) var(--spacing-md);
    background: var(--bg-secondary);
}

.section-title {
    font-size: 1.75rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: var(--spacing-xl);
    letter-spacing: -0.02em;
}

.steps-grid {
    display: grid;
    gap: var(--spacing-md);
}

.step-card {
    background: var(--white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.step-num {
    background: var(--primary);
    color: white;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: var(--spacing-md);
}

.step-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* CTA Section */
.cta-section {
    padding: 0 var(--spacing-md);
    margin-bottom: var(--spacing-3xl);
    margin-top: var(--spacing-2xl);
    text-align: center;
}

.cta-card {
    background: var(--accent);
    color: white;
    padding: var(--spacing-xl) var(--spacing-lg);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
}

.cta-card h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
}

.cta-card p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--spacing-xl);
    font-size: 1rem;
}

.cta-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    max-width: 400px;
    margin: 0 auto;
}

.btn-cta {
    width: 100%;
    padding: 1rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
}

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

.cta-input-group {
    display: flex;
    gap: var(--spacing-xs);
    flex-direction: column;
}

.input-code-cta {
    padding: 1rem;
    border-radius: var(--radius-lg);
    border: none;
    font-size: 1rem;
    text-align: center;
    font-family: monospace;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.btn-cta.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Footer */
.footer-modern {
    padding: var(--spacing-lg);
    text-align: center;
    background: var(--bg-body);
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-2xl);
    position: relative;
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-close {
    font-size: 2rem;
    line-height: 1;
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
}

.input-field {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color 0.2s;
    margin-bottom: var(--spacing-md);
}

.modal-footer {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
}

/* Loading */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 2000;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.loading-overlay.active {
    display: flex;
}
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--primary-light);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: var(--spacing-md);
}

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ========================================
   DESKTOP MEDIA QUERIES (min-width: 1024px)
   ======================================== */
@media (min-width: 1024px) {
    /* Layout */
    .hero-content {
        grid-template-columns: 1fr 1fr;
        padding-top: var(--spacing-3xl);
    }

    .hero-left {
        order: 1;
    }
    .hero-right {
        order: 2;
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .steps-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Scaling */
    .hero-title-new {
        font-size: 3.5rem;
    }
    
    .hero-subtitle-new {
        font-size: 1.25rem;
    }

    .btn-hero-new {
        width: auto;
        padding: 1rem 3rem;
    }

    .cta-actions {
        flex-direction: row;
        max-width: 600px;
    }
    
    .cta-input-group {
        flex-direction: row;
    }

    .input-code-cta {
        width: 200px;
    }
}
