/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #2c1810;
    background-color: #f9fafb;
}

/* Paleta de Cores */
:root {
    /* Cores Motiva (Roxo/Azul) */
    --motiva-primary: #6366F1;
    --motiva-secondary: #818CF8;
    --motiva-light: #E0E7FF;
    
    /* Cores Manta (Laranja/Marrom) */
    --manta-primary: #C2410C;
    --manta-secondary: #EA580C;
    --manta-brown: #78350F;
    --manta-light: #FED7AA;
    
    /* Cores Neutras */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #1f2937;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--motiva-primary) 0%, var(--manta-secondary) 100%);
    color: white;
    padding: 2rem 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.logo-manta {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.logo-motiva {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.header-text h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.header-text p {
    font-size: 1.125rem;
    opacity: 0.95;
}

/* Layout Principal */
.main-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 200px);
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: white;
    border-right: 1px solid var(--gray-200);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    height: fit-content;
    max-height: 100vh;
    overflow-y: auto;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    border-left: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    width: 100%;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.menu-item:hover {
    background-color: var(--gray-100);
}

.menu-item.active {
    background-color: var(--manta-light);
    border-left-color: var(--manta-primary);
    color: var(--manta-brown);
    font-weight: 600;
}

.menu-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.menu-text {
    flex: 1;
}

/* Conteúdo */
.content {
    flex: 1;
    padding: 2.5rem;
    overflow-y: auto;
}

.section {
    display: none;
}

.section.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

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

.section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 4px solid var(--manta-secondary);
    display: inline-block;
}

.section > h2 {
    margin-bottom: 2rem;
}

/* Info Boxes */
.info-box {
    background: linear-gradient(to right, var(--manta-light), #FEF3C7);
    border-left: 4px solid var(--manta-primary);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.info-box h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--manta-brown);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-box p {
    color: var(--gray-700);
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.info-box ul {
    list-style: none;
    padding-left: 0;
    margin-top: 0.75rem;
}

.info-box li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.info-box li::before {
    content: "•";
    position: absolute;
    left: 0.5rem;
    color: var(--manta-secondary);
    font-weight: bold;
}

/* Methodology Grid */
.methodology-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.methodology-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--gray-200);
    transition: transform 0.2s, box-shadow 0.2s;
}

.methodology-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-color: var(--manta-secondary);
}

.methodology-number {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--manta-primary), var(--manta-secondary));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.methodology-card h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.methodology-card p {
    color: var(--gray-600);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Alternatives Grid */
.alternatives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.alternative-badge {
    background-color: white;
    padding: 1.25rem;
    border-radius: 0.5rem;
    border: 2px solid;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.alternative-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.alternative-badge.badge-cb {
    border-color: var(--gray-600);
}

.alternative-badge.badge-a0 {
    border-color: var(--manta-secondary);
}

.alternative-badge.badge-a1 {
    border-color: var(--motiva-primary);
}

.alternative-badge.badge-a2 {
    border-color: #A855F7;
}

.alternative-badge.badge-a3 {
    border-color: #10B981;
}

.badge-label {
    display: inline-block;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    line-height: 3rem;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: white;
}

.badge-cb .badge-label {
    background-color: var(--gray-600);
}

.badge-a0 .badge-label {
    background-color: var(--manta-secondary);
}

.badge-a1 .badge-label {
    background-color: var(--motiva-primary);
}

.badge-a2 .badge-label {
    background-color: #A855F7;
}

.badge-a3 .badge-label {
    background-color: #10B981;
}

.badge-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.badge-desc {
    font-size: 0.75rem;
    color: var(--gray-600);
    line-height: 1.4;
}

/* Warning Box */
.warning-box {
    background: linear-gradient(to right, #FEF3C7, #FDE68A);
    border: 2px solid #FBBF24;
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-top: 1.5rem;
    color: #78350F;
    font-size: 0.875rem;
}

.warning-box strong {
    font-weight: 700;
}

/* Traffic Card */
.traffic-card {
    background-color: white;
    border: 2px solid var(--gray-200);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.traffic-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
}

.traffic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.traffic-item {
    text-align: center;
    padding: 1rem;
    background-color: var(--gray-50);
    border-radius: 0.5rem;
}

.traffic-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.traffic-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--manta-primary);
}

/* Structure Cards */
.structure-card {
    background-color: white;
    border: 2px solid var(--gray-200);
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.structure-header {
    padding: 1.25rem;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.structure-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.structure-total {
    font-size: 0.875rem;
    opacity: 0.95;
}

.structure-layers {
    padding: 0;
}

.layer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.layer:last-child {
    border-bottom: none;
}

.layer-info {
    flex: 1;
}

.layer-info strong {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.layer-info span {
    font-size: 0.75rem;
    opacity: 0.9;
}

.layer-thickness {
    font-weight: 700;
    font-size: 1rem;
    margin-left: 2rem;
}

/* Alternative Cards (Análise) */
.alternative-card {
    background-color: white;
    border: 2px solid;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.alternative-card.card-a0 {
    border-color: var(--manta-secondary);
}

.alternative-card.card-a1 {
    border-color: var(--motiva-primary);
}

.alternative-card.card-a2 {
    border-color: #A855F7;
}

.alternative-card.card-a3 {
    border-color: #10B981;
}

.alternative-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background-color: var(--gray-50);
    cursor: pointer;
    transition: background-color 0.2s;
}

.alternative-header:hover {
    background-color: var(--gray-100);
}

.alternative-badge-large {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.card-a0 .alternative-badge-large {
    background-color: var(--manta-secondary);
}

.card-a1 .alternative-badge-large {
    background-color: var(--motiva-primary);
}

.card-a2 .alternative-badge-large {
    background-color: #A855F7;
}

.card-a3 .alternative-badge-large {
    background-color: #10B981;
}

.alternative-title {
    flex: 1;
}

.alternative-title h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.alternative-title p {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.4;
}

.expand-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: var(--gray-200);
    border: none;
    font-size: 1.5rem;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.expand-btn:hover {
    background-color: var(--manta-light);
    color: var(--manta-primary);
}

.alternative-card.expanded .expand-btn {
    transform: rotate(90deg);
}

.alternative-content {
    display: none;
    padding: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.alternative-card.expanded .alternative-content {
    display: block;
}

.pros-cons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.pros, .cons {
    padding: 1.25rem;
    border-radius: 0.5rem;
}

.pros {
    background-color: #F0FDF4;
    border: 2px solid #86EFAC;
}

.cons {
    background-color: #FEF2F2;
    border: 2px solid #FCA5A5;
}

.pros h4, .cons h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.pros h4 {
    color: #15803D;
}

.cons h4 {
    color: #B91C1C;
}

.pros ul, .cons ul {
    list-style: none;
    padding-left: 0;
}

.pros li, .cons li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.75rem;
    color: var(--gray-700);
    font-size: 0.875rem;
    line-height: 1.5;
}

.pros li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #15803D;
    font-weight: bold;
}

.cons li::before {
    content: "✗";
    position: absolute;
    left: 0;
    color: #B91C1C;
    font-weight: bold;
}

/* Budget Section */
.budget-section {
    margin-bottom: 3rem;
}

.budget-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.budget-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.methodology-refs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.ref-card {
    background-color: white;
    padding: 1.25rem;
    border-radius: 0.5rem;
    border: 2px solid var(--gray-200);
}

.ref-card h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
    margin-top: 0;
}

.ref-card p {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.5;
}

/* Budget Table */
.budget-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.budget-table thead {
    background-color: var(--motiva-primary);
    color: white;
}

.budget-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
}

.budget-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.875rem;
}

.budget-table tbody tr:last-child td {
    border-bottom: none;
}

.budget-table tbody tr:hover {
    background-color: var(--gray-50);
}

.budget-table td.positive {
    color: #15803D;
    font-weight: 600;
}

.budget-table td.negative {
    color: #B91C1C;
    font-weight: 600;
}

/* Synthesis Section */
.synthesis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

.synthesis-card {
    background-color: white;
    border: 2px solid;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.synthesis-card.card-a0 {
    border-color: var(--manta-secondary);
}

.synthesis-card.card-a1 {
    border-color: var(--motiva-primary);
}

.synthesis-card.card-a2 {
    border-color: #A855F7;
}

.synthesis-card.card-a3 {
    border-color: #10B981;
}

.synthesis-card h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.synthesis-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

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

.metric-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
}

.metric-value {
    font-size: 0.875rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
}

.metric-value.positive {
    background-color: #D1FAE5;
    color: #065F46;
}

.metric-value.negative {
    background-color: #FEE2E2;
    color: #991B1B;
}

.metric-value.warning {
    background-color: #FEF3C7;
    color: #92400E;
}

.synthesis-card p {
    font-size: 0.875rem;
    color: var(--gray-700);
    line-height: 1.5;
}

/* Observations Section */
.observations-section {
    margin-top: 2rem;
}

.observations-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
}

.observation-card {
    background-color: white;
    border-left: 4px solid var(--motiva-primary);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.observation-card strong {
    color: var(--gray-900);
    font-weight: 700;
}

.observation-card {
    color: var(--gray-700);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Final Considerations */
.final-considerations {
    background-color: white;
    border: 2px solid var(--manta-secondary);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-top: 2rem;
}

.final-considerations h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.final-considerations p {
    color: var(--gray-700);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

/* Footer */
.footer {
    background-color: var(--gray-900);
    color: white;
    padding: 2rem 1.5rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-text p {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-logo span {
    font-size: 0.875rem;
    opacity: 0.9;
}

.footer-logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

/* Responsive */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: static;
        border-right: none;
        border-bottom: 1px solid var(--gray-200);
    }
    
    .content {
        padding: 1.5rem;
    }
    
    .header-text h1 {
        font-size: 1.5rem;
    }
    
    .methodology-grid,
    .alternatives-grid,
    .synthesis-grid,
    .pros-cons-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

/* Color Classes for Structure Layers */
.bg-gray-800 {
    background-color: #1f2937;
}

.bg-gray-700 {
    background-color: #374151;
}

.bg-amber-600 {
    background-color: var(--manta-secondary);
}

.bg-amber-700 {
    background-color: var(--manta-primary);
}

.bg-orange-900 {
    background-color: var(--manta-brown);
}

.bg-blue-600 {
    background-color: var(--motiva-primary);
}

.bg-blue-500 {
    background-color: var(--motiva-secondary);
}

.bg-purple-600 {
    background-color: #9333EA;
}

.bg-purple-500 {
    background-color: #A855F7;
}

.bg-green-600 {
    background-color: #059669;
}

.bg-green-500 {
    background-color: #10B981;
}

.structure-header.bg-amber {
    background: linear-gradient(135deg, var(--manta-primary), var(--manta-secondary));
}

.structure-header.bg-blue {
    background: linear-gradient(135deg, var(--motiva-primary), var(--motiva-secondary));
}

.structure-header.bg-purple {
    background: linear-gradient(135deg, #9333EA, #A855F7);
}

.structure-header.bg-green {
    background: linear-gradient(135deg, #059669, #10B981);
}
