/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


: 100vh;
}


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


/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 3rem;
}


header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}


.subtitle {
    font-size: 1.2rem;
    color: #7f8c8d;
    font-weight: 300;
}


/* Main content */
main {
    padding-bottom: 4rem;
}


/* Category sections */
.category {
    margin-bottom: 3rem;
}


.category-title {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Para alinhar o ícone de seta */
    gap: 0.75rem;
    font-size: 1.8rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 1.5rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer; /* Adiciona cursor de ponteiro para indicar que é clicável */
    user-select: none; /* Previne seleção de texto ao clicar */
}


.category-title .title-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: blue;
}


.icon {
    font-size: 1.5rem;
}


.collapse-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}


/* Estado de recolhido da categoria */
.category.collapsed .cards-grid {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    overflow: hidden;
    margin-bottom: 0;
    transition: max-height 0.5s ease-out, opacity 0.3s ease-out, padding 0.3s ease;
}


.category.collapsed .collapse-icon {
    transform: rotate(-90deg); /* Gira o ícone para indicar o estado */
}


/* Cards grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    max-height: 5000px; /* Valor alto para transição suave */
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.5s ease-out, opacity 0.3s ease-out;
}


/* Card styles */
.card-link {
    text-decoration: none;
    color: inherit;
}


.card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}


.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}


.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}


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


.ticker {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


.fee {
    background: #e8f5e8;
    color: #27ae60;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #d5e8d5;
}


.card-body {
    margin-top: 1rem;
}


.subcategory {
    font-size: 0.9rem;
    font-weight: 600;
    color: #8e44ad;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    background: #f8f4ff;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    display: inline-block;
}


.description {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}


/* Botão de impressão */
.print-button-container {
    text-align: center;
    margin-top: -1.5rem;
    margin-bottom: 1.5rem;
}


.print-button {
    background: #27ae60;
    color: #fff;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
    transition: background-color 0.3s ease, transform 0.2s ease;
}


.print-button:hover {
    background: #219653;
    transform: translateY(-2px);
}


/* Footer */
footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}


footer p {
    color: #7f8c8d;
    font-size: 0.9rem;
}


/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .category-title {
        font-size: 1.5rem;
        padding: 0.8rem 1rem;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .card {
        padding: 1.2rem;
    }
    
    .ticker {
        font-size: 1.2rem;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}


@media (max-width: 480px) {
    header {
        padding: 1.5rem 0;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .category-title {
        font-size: 1.3rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .card {
        padding: 1rem;
    }
}


/* Animações suaves */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.card {
    animation: fadeInUp 0.6s ease-out;
}


.category:nth-child(1) .card { animation-delay: 0.1s; }
.category:nth-child(2) .card { animation-delay: 0.2s; }
.category:nth-child(3) .card { animation-delay: 0.3s; }
.category:nth-child(4) .card { animation-delay: 0.4s; }
.category:nth-child(5) .card { animation-delay: 0.5s; }


/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
}


::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}


::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}


::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}


/* Estilos de impressão */
@media print {
    body {
        background: none;
        color: #000;
    }
    header, footer, .print-button-container, .collapse-icon {
        display: none; /* Esconde elementos não essenciais para a impressão */
    }
    .container {
        padding: 0;
    }
    .card {
        box-shadow: none; /* Remove sombras para impressão mais limpa */
        border: 1px solid #ddd;
    }
    .cards-grid {
        display: block; /* Garante que os cards apareçam um abaixo do outro na impressão */
        grid-template-columns: 1fr;
        max-height: none !important; /* Expande todos os cards */
        opacity: 1 !important;
    }
    .category-title {
        color: #000;
        background: none;
        border: none;
        padding-left: 0;
    }
}