/* =============================================================================
   NETRZERO ESG - CATÁLOGO DE SOLUÇÕES
   CSS para página pública de módulos ESG
   ============================================================================= */

:root {
    --primary: #16a34a;
    --primary-dark: #15803d;
    --primary-light: #dcfce7;
    --secondary: #1e40af;
    --secondary-light: #dbeafe;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --transition: 0.2s ease;
}

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

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: 80px;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

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

.catalog-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.catalog-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.catalog-header .logo {
    text-decoration: none;
}

.catalog-header .logo h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color var(--transition);
}

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

.btn-portal {
    background: var(--primary);
    color: white;
    padding: 8px 20px;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition);
}

.btn-portal:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

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

.catalog-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.catalog-hero h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 18px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* =============================================================================
   CATEGORY NAVIGATION
   ============================================================================= */

.category-nav {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 64px;
    z-index: 90;
}

.category-nav .container {
    display: flex;
    gap: 8px;
    padding: 16px 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.category-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.category-tab:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.category-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.category-tab i {
    font-size: 16px;
}

/* =============================================================================
   MODULES GRID
   ============================================================================= */

.catalog-main {
    padding: 40px 0;
}

.modules-section {
    margin-bottom: 50px;
}

.modules-section.hidden {
    display: none;
}

.section-header {
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header h2 i {
    color: var(--primary);
}

.section-description {
    color: var(--text-secondary);
    font-size: 15px;
    margin-top: 6px;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* =============================================================================
   MODULE CARD
   ============================================================================= */

.module-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--transition);
    position: relative;
}

.module-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.module-card.highlight {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.module-card.highlight::before {
    content: 'Destaque';
    position: absolute;
    top: -10px;
    right: 20px;
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
}

.module-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.module-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.module-icon i {
    font-size: 22px;
    color: var(--primary);
}

.module-info {
    flex: 1;
}

.module-info h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.module-info .tagline {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* Checkbox */
.interest-check {
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}

.interest-check input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.interest-check .checkmark {
    width: 28px;
    height: 28px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.interest-check .checkmark i {
    color: white;
    font-size: 14px;
    opacity: 0;
    transform: scale(0.5);
    transition: all var(--transition);
}

.interest-check:hover .checkmark {
    border-color: var(--primary);
}

.interest-check input:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.interest-check input:checked + .checkmark i {
    opacity: 1;
    transform: scale(1);
}

/* Quick Features */
.quick-features {
    list-style: none;
    margin: 16px 0;
    padding: 0;
}

.quick-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.quick-features li i {
    color: var(--primary);
    font-size: 12px;
}

/* Compliance Tags */
.compliance-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.compliance-tag {
    background: var(--secondary-light);
    color: var(--secondary);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

/* Details Button */
.btn-details {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-details:hover {
    background: var(--bg-light);
    border-color: var(--primary);
    color: var(--primary);
}

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

.sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    z-index: 100;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.sticky-footer.visible {
    transform: translateY(0);
}

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

.selected-info {
    font-size: 15px;
    color: var(--text-secondary);
}

.selected-count {
    font-weight: 700;
    color: var(--primary);
    font-size: 20px;
}

.footer-actions {
    display: flex;
    gap: 12px;
}

.btn-whatsapp {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #25D366;
    color: white;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition);
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-1px);
}

.btn-contact {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-contact:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

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

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.visible .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: var(--bg-light);
    border: none;
    border-radius: var(--radius-full);
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--border);
    color: var(--text-primary);
}

.modal-header {
    padding: 32px 32px 0;
    text-align: center;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.modal-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

/* Selected Modules Preview */
.selected-modules-preview {
    padding: 20px 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.module-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
}

.module-chip i {
    font-size: 12px;
}

/* Form */
#contactForm {
    padding: 0 32px 32px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: inherit;
    transition: all var(--transition);
}

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

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-submit {
    flex: 1;
    padding: 14px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-submit:hover {
    background: var(--primary-dark);
}

.btn-whatsapp-modal {
    padding: 14px 24px;
    background: white;
    color: #25D366;
    border: 2px solid #25D366;
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition);
}

.btn-whatsapp-modal:hover {
    background: #25D366;
    color: white;
}

/* Form Success */
.form-success {
    padding: 60px 32px;
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-light);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.success-icon i {
    font-size: 40px;
    color: var(--primary);
}

.form-success h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-success p {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 24px;
}

.btn-whatsapp-success {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: #25D366;
    color: white;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all var(--transition);
}

.btn-whatsapp-success:hover {
    background: #128C7E;
}

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

.modal-detail {
    max-width: 640px;
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 32px;
    border-bottom: 1px solid var(--border);
}

.detail-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.detail-icon i {
    font-size: 28px;
    color: var(--primary);
}

.detail-title h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.detail-title p {
    color: var(--text-secondary);
    font-size: 15px;
    margin: 0;
}

.detail-body {
    padding: 32px;
}

.detail-section {
    margin-bottom: 28px;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.detail-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.detail-section p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.detail-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.detail-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    color: var(--text-secondary);
}

.detail-list li i {
    color: var(--primary);
    margin-top: 4px;
}

.detail-compliance {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-footer {
    padding: 24px 32px;
    background: var(--bg-light);
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
}

.btn-select-detail {
    flex: 1;
    padding: 14px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-select-detail:hover {
    background: var(--primary-dark);
}

.btn-close-detail {
    padding: 14px 24px;
    background: white;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-close-detail:hover {
    background: var(--bg-light);
    border-color: var(--text-secondary);
}

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

@media (max-width: 768px) {
    .catalog-header .container {
        height: 56px;
    }

    .catalog-header .logo h1 {
        font-size: 18px;
    }

    .header-nav {
        gap: 12px;
    }

    .nav-link {
        display: none;
    }

    .btn-portal {
        padding: 6px 16px;
        font-size: 13px;
    }

    .catalog-hero {
        padding: 40px 0;
    }

    .catalog-hero h1 {
        font-size: 26px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .category-nav {
        top: 56px;
    }

    .category-nav .container {
        padding: 12px 16px;
    }

    .category-tab {
        padding: 8px 16px;
        font-size: 13px;
    }

    .modules-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .sticky-footer .container {
        flex-direction: column;
        height: auto;
        padding: 16px;
        gap: 12px;
    }

    .footer-actions {
        width: 100%;
    }

    .btn-whatsapp,
    .btn-contact {
        flex: 1;
        justify-content: center;
        padding: 14px 16px;
    }

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

    .modal-header {
        padding: 24px 20px 0;
    }

    .modal-header h2 {
        font-size: 20px;
    }

    #contactForm {
        padding: 0 20px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-whatsapp-modal {
        justify-content: center;
    }

    .detail-header {
        padding: 24px 20px;
    }

    .detail-body {
        padding: 24px 20px;
    }

    .detail-footer {
        padding: 20px;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .catalog-hero h1 {
        font-size: 22px;
    }

    .section-header h2 {
        font-size: 20px;
    }

    .module-card {
        padding: 20px;
    }

    .card-header {
        flex-wrap: wrap;
    }

    .interest-check {
        position: absolute;
        top: 20px;
        right: 20px;
    }
}
