/* Icons */
.icon {
    width: 14px;
    height: 14px;
    display: inline-block;
    vertical-align: middle;
}

.icon-sm {
    width: 16px;
    height: 16px;
}

.icon-lg {
    width: 24px;
    height: 24px;
}

/* Force consistent scrollbar to prevent width shift */
html {
    overflow-y: scroll;
}

/* Stats Page Specific Styles */
.stats-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    background-color: #242424;
    min-height: 100vh;
    box-sizing: border-box;
    overflow-x: hidden;
}

.stats-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #404040;
}

.header-logo {
    height: 40px;
    width: auto;
    margin-bottom: 15px;
}

.stats-header h1 {
    font-family: Graphik, sans-serif;
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 10px;
}

.stats-header .header-description {
    color: #b9b9b9;
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Category Navigation - Desktop */
.category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 40px;
    padding: 20px;
    background-color: #1b1b1b;
    border-radius: 8px;
}

.category-nav .tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #343434;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-family: Graphik, sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

.category-nav .tab-btn svg {
    flex-shrink: 0;
}

.category-nav .tab-btn:hover,
.category-nav .tab-btn.active {
    background-color: #01f3b3;
    color: #000;
}

/* Mobile Dropdown */
.category-select-wrapper {
    display: none;
    margin-bottom: 40px;
    padding: 15px 20px;
    background-color: #1b1b1b;
    border-radius: 8px;
}

.category-select-wrapper label {
    display: block;
    color: #b9b9b9;
    font-size: 0.85rem;
    margin-bottom: 8px;
    font-family: Graphik, sans-serif;
}

.category-select {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    font-family: Graphik, sans-serif;
    background-color: #343434;
    color: #fff;
    border: 2px solid #515151;
    border-radius: 8px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2301f3b3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    transition: all 0.3s ease;
}

.category-select:focus {
    outline: none;
    border-color: #01f3b3;
    box-shadow: 0 0 0 3px rgba(1, 243, 179, 0.2);
}

.category-select option {
    background-color: #343434;
    color: #fff;
    padding: 10px;
}

@media (max-width: 768px) {
    .category-nav {
        display: none;
    }
    .category-select-wrapper {
        display: block;
    }
}

/* Category Sections */
.category-section {
    display: none;
    width: 100%;
}

.category-section.active {
    display: block;
}

.category-section.active + .category-section.active .stats-grid {
    margin-top: 30px;
}

/* Two Column Layout */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    width: 100%;
}

.todas-header {
    display: none;
}

/* Footer */
.stats-footer {
    background-color: #1b1b1b;
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
    border-top: 1px solid #404040;
}

.stats-footer p {
    color: #686868;
    font-size: 0.85rem;
    margin: 0;
}

@media (max-width: 900px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Stats Cards */
.stats-card {
    background-color: #343434;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.stats-card.full-width {
    grid-column: 1 / -1;
}

.stats-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #515151;
}

.stats-card-header h2 {
    font-family: Graphik, sans-serif;
    font-size: 1.2rem;
    color: #fff;
    margin: 0;
}

.stats-card-header .badge {
    background-color: #01f3b3;
    color: #000;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.stats-card-header .badge.red {
    background-color: #ff4757;
    color: #fff;
}

.stats-card-header .badge.yellow {
    background-color: #ffa502;
    color: #000;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 250px;
    width: 100%;
}

.chart-container.tall {
    height: 350px;
}

/* Key Stats */
.key-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.key-stat {
    text-align: center;
    padding: 15px;
    background-color: #404040;
    border-radius: 6px;
}

.key-stat-value {
    font-family: Graphik, sans-serif;
    font-size: 1.8rem;
    color: #01f3b3;
    display: block;
}

.key-stat-value.negative {
    color: #ff4757;
}

.key-stat-value.neutral {
    color: #ffa502;
}

.key-stat-label {
    font-size: 0.8rem;
    color: #b9b9b9;
    margin-top: 5px;
    display: block;
}

/* Section Dividers */
.section-title {
    font-family: Graphik, sans-serif;
    font-size: 1.5rem;
    color: #01f3b3;
    margin: 50px 0 25px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #01f3b3;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #515151;
}

.data-table th {
    color: #b9b9b9;
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.data-table td {
    color: #fff;
    font-size: 0.95rem;
}

.data-table tr:hover td {
    background-color: #404040;
}

.data-table .positive {
    color: #01f3b3;
}

.data-table .negative {
    color: #ff4757;
}

/* Progress Bars */
.progress-bar-container {
    margin: 10px 0;
}

.progress-bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    color: #fff;
    font-size: 0.9rem;
}

.progress-bar {
    height: 8px;
    background-color: #515151;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-bar-fill.green { background-color: #01f3b3; }
.progress-bar-fill.red { background-color: #ff4757; }
.progress-bar-fill.yellow { background-color: #ffa502; }
.progress-bar-fill.blue { background-color: #3498db; }

/* Chart Description */
.chart-description {
    color: #b9b9b9;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #515151;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card Footer */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #515151;
    gap: 10px;
    overflow: hidden;
}

.card-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.card-date {
    color: #686868;
    font-size: 0.8rem;
}

.card-author {
    color: #b9b9b9;
    font-size: 0.75rem;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background-color: #343434;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.card-link:hover {
    background-color: #01f3b3;
    color: #000;
    transform: translateY(-1px);
}

.card-link svg {
    width: 14px;
    height: 14px;
}

/* Update Badge */
.update-badge {
    font-size: 0.65rem;
    padding: 3px 8px;
    background-color: rgba(255, 255, 255, 0.06);
    color: #888;
    border-radius: 3px;
    margin-left: 8px;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

/* Fancybox iframe lightbox sizing */
.fancybox__content {
    max-width: 1024px !important;
    height: 768px !important;
}

/* Last Updated */
.last-updated {
    text-align: right;
    color: #686868;
    font-size: 0.8rem;
    margin-top: 10px;
}

/* Comparison Cards */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.comparison-item {
    background-color: #404040;
    padding: 20px;
    border-radius: 6px;
    text-align: center;
}

.comparison-item h4 {
    color: #b9b9b9;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.comparison-item .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.comparison-item .change {
    font-size: 0.85rem;
    margin-top: 5px;
}

.comparison-item .change.up {
    color: #01f3b3;
}

.comparison-item .change.down {
    color: #ff4757;
}
