/* ===== RESET & BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #070738;
    --secondary: #1A1A5E;
    --accent: #FE0000;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--primary);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    border-radius: 0.5rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-accent {
    background-color: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}

.btn-accent:hover {
    background-color: #e00000;
    border-color: #e00000;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn-block {
    width: 100%;
    text-align: center;
}

.btn-reset {
    background: none;
    border: 1px solid var(--gray-300);
    color: var(--gray-600);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-reset:hover {
    background: var(--gray-100);
    color: var(--primary);
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

.header.scrolled {
    box-shadow: 0 4px 20px rgba(7, 7, 56, 0.1);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--primary);
}

.logoimg {
    height: 30px;
    width: 30px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.125rem;
    line-height: 1.2;
    color: var(--primary);
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--secondary);
    font-weight: 500;
}

.nav-desktop {
    display: none;
    align-items: center;
    gap: 2rem;
}

.nav-desktop a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.nav-desktop a:hover {
    color: var(--accent);
}

.nav-desktop a.active {
    color: var(--accent);
    font-weight: 600;
}

.header > .container > .btn {
    display: none;
}

.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--primary);
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.nav-mobile {
    display: none;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background-color: var(--white);
    border-top: 1px solid var(--gray-200);
}

.nav-mobile.active {
    display: flex;
}

.nav-mobile a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 500;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.nav-mobile a.active {
    color: var(--accent);
    font-weight: 600;
}

#userAvatar {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 50px;
}

#userName {
    margin-left: 4px;
    font-size: 0.9rem;
    color: var(--primary);
}

#userDiv {
    display: flex;
    align-items: center;
}

/* Cores dos links de navegação */
#v { color: #e57f26; }
#c { color: #38fb31; }
#d { color: #a51afb; }
#a { color: #e6148b; }
#g { color: #fbcd34; }

@media (min-width: 768px) {
    .nav-desktop {
        display: flex;
    }
    
    .header > .container > .btn {
        display: inline-flex;
    }
    
    .menu-toggle {
        display: none;
    }
}

/* ===== CALCULATOR HERO ===== */
.calculator-hero {
    padding: 120px 0 60px;
    background: linear-gradient(rgba(7, 7, 56, 0.9), rgba(7, 7, 56, 0.95)), 
                url('https://i.ibb.co/7djPWQf6/profess.png') center/cover;
    color: var(--white);
    position: relative;
}

.calculator-hero-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.calculator-hero-info {
    flex: 1;
}

.calculator-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--accent);
    color: var(--white);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.75rem;
    border-radius: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.calculator-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--white);
    margin-bottom: 1rem;
    line-height: 1.1;
}

.calculator-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 600px;
}

.calculator-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 200px;
}

.stat-item i {
    font-size: 2rem;
    color: var(--accent);
}

.stat-item div {
    display: flex;
    flex-direction: column;
}

.stat-item strong {
    font-size: 2rem;
    font-weight: 900;
    color: var(--white);
    line-height: 1;
}

.stat-item span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* ===== MAIN CONTENT LAYOUT ===== */
.calculator-main {
    padding: 3rem 0;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 50%, rgba(7, 7, 56, 0.03) 100%);
}

.calculator-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 992px) {
    .calculator-layout {
        grid-template-columns: 1.2fr 2fr;
        gap: 2.5rem;
        align-items: start;
    }
    
    .calculator-hero-content {
        flex-direction: row;
        align-items: center;
    }
    
    .calculator-left-column {
        position: sticky;
        top: 100px;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }
    
    .calculator-left-column::-webkit-scrollbar {
        width: 6px;
    }
    
    .calculator-left-column::-webkit-scrollbar-track {
        background: var(--gray-100);
        border-radius: 3px;
    }
    
    .calculator-left-column::-webkit-scrollbar-thumb {
        background: var(--gray-300);
        border-radius: 3px;
    }
}

/* ===== LEFT COLUMN ===== */
.calculator-left-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.calculator-left-column > * {
    width: 100%;
}

/* Input Card */
.input-card, .filter-card {
    background: linear-gradient(135deg, var(--white), var(--gray-50));
    border: 1px solid var(--gray-200);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.input-card:hover, .filter-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(7, 7, 56, 0.1);
}

.input-header {
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.input-header h3 {
    font-size: 1.25rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.input-header h3 i {
    color: var(--accent);
}

.vestibular-toggle {
    display: flex;
    background: var(--gray-100);
    padding: 0.25rem;
    border-radius: 0.75rem;
}

.toggle-vest {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray-600);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-vest.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Formulários */
.input-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-form.hidden {
    display: none !important;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group label i {
    color: var(--accent);
}

.input-with-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-with-info input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.input-with-info input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(254, 0, 0, 0.1);
}

.input-info {
    font-size: 0.85rem;
    color: var(--gray-500);
    white-space: nowrap;
    min-width: 120px;
}

.input-info span {
    color: var(--primary);
    font-weight: 600;
}

.form-help {
    margin-top: 5px;
    color: var(--gray-500);
    font-size: 0.85em;
}

.form-help p {
    margin: 0;
}

/* Resultado do Formulário */
.form-result {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-top: 1rem;
}

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

.result-header h4 {
    font-size: 1.1rem;
    color: var(--primary);
}

.result-total {
    text-align: center;
    padding: 1rem;
    background: var(--white);
    border-radius: 0.75rem;
    border: 2px solid var(--gray-200);
    margin-bottom: 1rem;
}

.total-score {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--accent);
    display: block;
    line-height: 1;
}

.total-max {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin-top: 0.5rem;
    display: block;
}

/* Filtros */
.filter-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label i {
    color: var(--accent);
    font-size: 0.9rem;
}

.filter-select, .sort-select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    background: var(--white);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-select:focus, .sort-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(254, 0, 0, 0.1);
}

.filter-actions {
    margin-top: 1rem;
}

/* Checkbox personalizado */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.help-text {
    display: block;
    color: var(--gray-500);
    font-size: 0.85em;
    margin-top: 5px;
}

/* Sistema de Cotas */
.cota-filter-card {
    margin-top: 0;
}

.cota-groups-container, .cota-especifica-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
}

.cota-especifica-container.hidden,
.cota-groups-container.hidden {
    display: none !important;
}

.grupo-cota-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    cursor: pointer;
}

.cota-detalhes {
    margin-left: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.cota-tag {
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    border: 1px solid #dee2e6;
    cursor: help;
}

.bonus-filter {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 10px;
    margin-top: 10px;
}

/* ===== RIGHT COLUMN ===== */
.calculator-right-column {
    display: flex;
    flex-direction: column;
}

.calculator-results {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 600px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 1rem;
    overflow: hidden;
}

.results-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--white), var(--gray-50));
    border-bottom: 1px solid var(--gray-200);
    flex-shrink: 0;
}

.results-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.results-title h3 {
    font-size: 1.25rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.results-title h3 i {
    color: var(--accent);
}

.results-count {
    font-size: 0.9rem;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
}

.results-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-box {
    flex: 1;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(254, 0, 0, 0.1);
}

/* Container de Resultados */
.results-container {
    flex: 1;
    min-height: 400px;
    max-height: calc(100vh - 400px);
    overflow-y: auto;
    padding: 1.5rem;
    background: var(--white);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.loading-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray-500);
}

.loading-results i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray-500);
    grid-column: 1 / -1;
}

.no-results i {
    font-size: 3rem;
    color: var(--gray-300);
    margin-bottom: 1rem;
}

/* Cards de Curso */
.course-card {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 1rem;
    padding: 1.25rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.course-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(7, 7, 56, 0.1);
}

.course-card.pass {
    border-left: 4px solid var(--success);
}

.course-card.close {
    border-left: 4px solid var(--warning);
}

.course-card.fail {
    border-left: 4px solid var(--danger);
}

.course-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.course-title h4 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.course-university {
    font-size: 0.85rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.course-university i {
    font-size: 0.8rem;
}

.course-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
}

.course-status.pass {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.course-status.close {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.course-status.fail {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.course-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.8rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.info-value {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.95rem;
}

.info-value.pass { color: var(--success); }
.info-value.close { color: var(--warning); }
.info-value.fail { color: var(--danger); }
.course-comparison {
    background: var(--gray-50);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-top: 0.5rem;
    display: block !important; /* Força a exibição */
}

.comparison-bar {
    height: 10px;
    background: var(--gray-200);
    border-radius: 5px;
    overflow: visible !important; /* IMPORTANTE: permite ver o marcador */
    margin-bottom: 0.75rem;
    position: relative;
    width: 100%;
}

.bar-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gray-200);
    border-radius: 5px;
    z-index: 1;
}

.comparison-fill {
    height: 100%;
    border-radius: 5px;
    position: absolute;
    left: 0;
    top: 0;
    transition: width 0.5s ease-in-out;
    z-index: 2;
}

.comparison-fill.pass {
    background: linear-gradient(135deg, #10b981, #0da271);
}

.comparison-fill.close {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.comparison-fill.fail {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* Marcador da nota do usuário */
.comparison-marker {
    position: absolute;
    top: -3px;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    z-index: 10;
    border: 2px solid var(--white);
    box-shadow: 0 2px 8px rgba(7, 7, 56, 0.3);
    transition: all 0.3s ease;
}

.comparison-marker:hover {
    transform: translateX(-50%) scale(1.2);
    box-shadow: 0 4px 12px rgba(7, 7, 56, 0.4);
}

/* Tooltip do marcador */
.marker-tooltip {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--white);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 100;
}

.marker-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--primary);
}

.comparison-marker:hover .marker-tooltip {
    opacity: 1;
    visibility: visible;
    bottom: 30px;
}

.comparison-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--gray-600);
    margin-top: 0.25rem;
}

.comparison-min {
    color: var(--gray-500);
}

.comparison-max {
    color: var(--gray-500);
}

/* ===== CORREÇÕES PARA O LAYOUT DOS CARDS ===== */

/* Ajustar o card para garantir que tudo caiba */
.course-card {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 1rem;
    padding: 1.25rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: visible; /* Mudar de hidden para visible */
}

.course-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(7, 7, 56, 0.1);
    border-color: var(--primary);
}

/* Status das bordas */
.course-card.pass {
    border-left: 4px solid var(--success);
}

.course-card.close {
    border-left: 4px solid var(--warning);
}

.course-card.fail {
    border-left: 4px solid var(--danger);
}

/* Ajustar o container de resultados */
.results-container {
    flex: 1;
    min-height: 400px;
    max-height: calc(100vh - 400px);
    overflow-y: auto;
    padding: 1.5rem;
    background: var(--white);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ===== CORREÇÕES PARA O MODO MÚLTIPLAS COTAS ===== */

.cota-comparacao {
    margin-top: 10px;
}

.comparacao-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    position: relative;
    margin: 10px 0;
    overflow: visible !important;
}

.comparacao-fill {
    height: 100%;
    border-radius: 4px;
    position: absolute;
    left: 0;
    top: 0;
    transition: width 0.5s ease;
    z-index: 2;
}

.comparacao-marker {
    position: absolute;
    top: -3px;
    width: 14px;
    height: 14px;
    background: var(--primary);
    border-radius: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    border: 2px solid var(--white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.comparacao-marker:hover {
    transform: translateX(-50%) scale(1.2);
}

/* Estilos para modo múltiplas cotas */
.curso-multiplas-cotas {
    background: var(--white);
    border-radius: 10px;
    border: 1px solid var(--gray-200);
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.curso-header-multiplo {
    background: var(--gray-50);
    padding: 15px;
    border-bottom: 1px solid var(--gray-200);
}

.curso-titulo-multiplo h4 {
    margin: 0 0 5px 0;
    color: var(--primary);
}

.curso-info-geral {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    font-size: 0.9em;
    color: var(--gray-600);
}

.info-geral-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cotas-container {
    padding: 0;
}

.cota-item {
    padding: 15px;
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.2s;
}

.cota-item:last-child {
    border-bottom: none;
}

.cota-item:hover {
    background: var(--gray-50);
}

.cota-item.pass {
    border-left: 4px solid var(--success);
}

.cota-item.close {
    border-left: 4px solid var(--warning);
}

.cota-item.fail {
    border-left: 4px solid var(--danger);
}

.cota-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.cota-tipo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bonus-tag {
    background: #17a2b8;
    color: var(--white);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.8em;
    font-weight: bold;
}

.cota-status {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.cota-status.pass {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.cota-status.close {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.cota-status.fail {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.cota-descricao {
    color: var(--gray-600);
    font-size: 0.9em;
    margin-bottom: 10px;
    line-height: 1.4;
}

.cota-nota, .cota-vagas, .cota-colocacao {
    display: flex;
    flex-direction: column;
}

.cota-nota span, .cota-vagas span, .cota-colocacao span {
    font-size: 0.85em;
    color: var(--gray-600);
}

.cota-nota strong, .cota-vagas strong, .cota-colocacao strong {
    font-size: 1.1em;
    color: var(--primary);
}

.cota-comparacao {
    margin-top: 10px;
}

.comparacao-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    position: relative;
    margin: 10px 0;
}

.comparacao-fill {
    height: 100%;
    border-radius: 4px;
    position: absolute;
    left: 0;
    top: 0;
    transition: width 0.5s ease;
}

.comparacao-fill.pass {
    background: var(--success);
}

.comparacao-fill.close {
    background: var(--warning);
}

.comparacao-fill.fail {
    background: var(--danger);
}

.comparacao-marker {
    position: absolute;
    top: -3px;
    width: 14px;
    height: 14px;
    background: var(--primary);
    border-radius: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    border: 2px solid var(--white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.comparacao-marker:hover {
    transform: translateX(-50%) scale(1.2);
}

.comparacao-diff {
    text-align: right;
    font-weight: 600;
    font-size: 0.9em;
}

.comparacao-diff.positive {
    color: var(--success);
}

.comparacao-diff.negative {
    color: var(--danger);
}

/* Legendas */
.results-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1rem 1.5rem;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    justify-content: center;
    flex-shrink: 0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.legend-pass {
    background: var(--success);
}

.legend-close {
    background: var(--warning);
}

.legend-fail {
    background: var(--danger);
}

.legend-item span {
    font-size: 0.85rem;
    color: var(--gray-600);
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 1rem;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 1;
    border-radius: 1rem 1rem 0 0;
}

.modal-header h3 {
    font-size: 1.5rem;
    color: var(--primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--gray-500);
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--accent);
}

.modal-body {
    padding: 2rem;
}

.modal-course-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal-course-details {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-label {
    font-size: 0.9em;
    color: var(--gray-600);
}

.detail-value {
    font-weight: 600;
}

.detail-desc {
    font-size: 0.85em;
    color: var(--gray-500);
    margin-top: 2px;
}

.scores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.score-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: var(--gray-50);
    border-radius: 6px;
}

.modal-course-comparison {
    margin-top: 20px;
}

.comparison-result {
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comparison-result.positive {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-left: 4px solid var(--success);
}

.comparison-result.negative {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

.comparison-result .diff {
    font-size: 0.9em;
    opacity: 0.8;
}

/* ===== FOOTER ===== */
.footer {
    padding: 4rem 0 2rem;
    background: linear-gradient(180deg, var(--primary) 0%, #050530 100%);
    color: var(--white);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--secondary), var(--primary));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer-brand {
    max-width: 300px;
}

.logo.light .logo-name,
.logo.light .logo-subtitle {
    color: var(--white);
}

.logo.light .logo-subtitle {
    color: rgba(255, 255, 255, 0.7);
}

.footer-brand > p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin: 1rem 0;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    transition: all 0.2s ease;
}

.social-links a:hover {
    background-color: var(--accent);
}

.footer-links h4,
.footer-contact h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--white);
}

.footer-links ul,
.footer-contact ul {
    list-style: none;
}

.footer-links li,
.footer-contact li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-contact i {
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

/* ===== UTILITY CLASSES ===== */
.hidden {
    display: none !important;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 767px) {
    .calculator-hero {
        padding: 100px 0 40px;
    }
    
    .calculator-title {
        font-size: 2rem;
    }
    
    .calculator-stats {
        flex-direction: column;
    }
    
    .stat-item {
        width: 100%;
    }
    
    .input-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .vestibular-toggle {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .toggle-vest {
        flex: 1;
        min-width: 60px;
        text-align: center;
    }
    
    .results-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .course-info {
        grid-template-columns: 1fr;
    }
    
    .results-legend {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .input-with-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .input-info {
        min-width: auto;
    }
    
    .scores-grid {
        grid-template-columns: 1fr;
    }
    
    .cota-detalhes {
        grid-template-columns: 1fr;
    }
    
    .cota-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .curso-info-geral {
        flex-direction: column;
        gap: 5px;
    }
    
    .cota-tag {
        font-size: 0.75em;
        padding: 1px 6px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .calculator-layout {
        grid-template-columns: 1fr;
    }
    
    .calculator-left-column {
        position: static;
        max-height: none;
        overflow-y: visible;
    }
    
    .calculator-right-column .results-container {
        max-height: none;
    }
}

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

@media (min-width: 1200px) {
    .calculator-layout {
        grid-template-columns: 1fr 2.2fr;
    }
    
    .calculator-right-column .results-container {
        max-height: calc(100vh - 380px);
    }
}

/* ===== ANIMAÇÕES E NOTIFICAÇÕES ===== */
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #f8d7da;
    color: #721c24;
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
    animation: slideIn 0.3s ease;
}

.notification.notification-error {
    background: #f8d7da;
    color: #721c24;
}

.notification-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1.2em;
    margin-left: 10px;
}

/* Estilos para os checkboxes de cotas */
.cota-checkboxes {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: 0.5rem;
    border: 1px solid var(--gray-200);
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkbox-group label:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-group i {
    color: var(--accent);
    font-size: 1rem;
    min-width: 20px;
}

.checkbox-group span {
    font-weight: 500;
    color: var(--primary);
    flex: 1;
}

/* Estilo para bônus */
.cota-bonus {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 0.25rem;
    font-size: 0.8rem;
}

.cota-bonus i {
    color: #ffc107;
}

.cota-bonus small {
    color: var(--gray-500);
    margin-left: auto;
}

/* Para modo múltiplas cotas */
.curso-multiplas-cotas {
    background: var(--white);
    border-radius: 1rem;
    border: 1px solid var(--gray-200);
    margin-bottom: 1rem;
    overflow: hidden;
}

.curso-header-multiplo {
    padding: 1rem 1.5rem;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.curso-titulo-multiplo h4 {
    margin: 0;
    color: var(--primary);
}

.cotas-container {
    padding: 0;
}

.cota-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
}

.cota-item:last-child {
    border-bottom: none;
}

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

.cota-tipo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bonus-tag {
    background: #17a2b8;
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.cota-info {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.cota-nota, .cota-vagas {
    display: flex;
    flex-direction: column;
}

.cota-nota span, .cota-vagas span {
    font-size: 0.8rem;
    color: var(--gray-600);
}

.cota-nota strong, .cota-vagas strong {
    font-size: 1rem;
    color: var(--primary);
}

/* Responsividade */
@media (min-width: 768px) {
    .cota-checkboxes {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .cota-checkboxes {
        grid-template-columns: 1fr;
    }
}