/* Variables CSS */
:root {
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-primary-light: #3b82f6;
    --color-secondary: #10b981;
    --color-text: #1f2937;
    --color-text-light: #6b7280;
    --color-border: #e5e7eb;
    --color-bg: #ffffff;
    --color-bg-light: #f9fafb;
    --color-bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--color-text);
    line-height: 1.6;
    background-color: var(--color-bg-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main {
    flex: 1;
}

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

/* Header */
.header {
    background: white;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    transition: opacity 0.2s;
}

.logo:hover {
    opacity: 0.8;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

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

.mobile-toggle {
    display: none;
}

/* Hero */
.hero {
    background: var(--color-bg-gradient);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
}

/* Search Box */
.search-box {
    max-width: 700px;
    margin: 0 auto 3rem;
}

.search-form {
    display: flex;
    gap: 1rem;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-light);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3.5rem;
    font-size: 1.125rem;
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    background: white;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary-light);
    box-shadow: var(--shadow-lg);
}

.autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: var(--radius-lg);
    margin-top: 0.5rem;
    box-shadow: var(--shadow-xl);
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.autocomplete.show {
    display: block;
}

.autocomplete-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--color-border);
    transition: background 0.15s;
}

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

.autocomplete-item:hover {
    background: var(--color-bg-light);
}

.autocomplete-name {
    font-weight: 600;
    color: var(--color-text);
}

.autocomplete-count {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

/* Stats */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 700px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Sections */
.section {
    padding: 1rem 0 4rem 0;
}

.bg-light {
    background: white;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-light);
    text-align: center;
    margin-bottom: 3rem;
}

/* Grids */
.apellidos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.apellido-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all 0.2s;
}

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

.apellido-rank {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    min-width: 3rem;
}

.apellido-info {
    flex: 1;
}

.apellido-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.apellido-count {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.apellido-arrow {
    color: var(--color-text-light);
}

/* Categories */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.category-card {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    text-align: center;
    text-decoration: none;
    border: 2px solid var(--color-border);
    transition: all 0.3s;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    border-radius: 50%;
    color: white;
    margin-bottom: 1.5rem;
}

.category-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.75rem;
}

.category-card p {
    color: var(--color-text-light);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: var(--radius);
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

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

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

.btn-white:hover {
    background: var(--color-bg-light);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

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

.btn-block {
    display: block;
    width: 100%;
}

/* Page Header */
.page-header {
    margin-bottom: 3rem;
    text-align: center;
}

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

.page-header p {
    font-size: 1.125rem;
    color: var(--color-text-light);
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0;
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.breadcrumb a {
    color: var(--color-primary);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Card */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 2rem;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.card-header h2,
.card-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.card-header p {
    color: var(--color-text-light);
    font-size: 0.875rem;
}

.card-body {
    padding: 1.5rem;
}

.bg-gradient {
    background: var(--color-bg-gradient);
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
}

.content-main {
    min-width: 0;
}

.content-sidebar {
    min-width: 0;
}

/* Apellido Detail */
.apellido-header {
    text-align: center;
    margin-bottom: 3rem;
}

.apellido-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.apellido-stats-row {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.stat-badge {
    text-align: center;
}

.stat-badge-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
}

.stat-badge-label {
    display: block;
    font-size: 0.875rem;
    color: var(--color-text-light);
}

/* Hero Compacto */
.apellido-hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-radius: var(--radius-lg);
    padding: 2rem 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

.apellido-hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.apellido-title-hero {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin: 0;
    line-height: 1.2;
}

.apellido-stats-hero {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
}

.stat-hero-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-hero-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.stat-hero-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.3);
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Analysis Cards */
.analysis-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.analysis-card .card-header h3 {
    font-size: 1rem;
    margin: 0;
}

/* Gauge Container */
.gauge-container {
    padding: 1rem 0;
}

.gauge-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.gauge-bar {
    width: 100%;
    height: 12px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.gauge-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.6s ease;
}

.gauge-value {
    text-align: center;
    margin-top: 1rem;
}

/* País Principal */
.pais-principal {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--color-bg-light);
    border-radius: var(--radius);
}

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

.pais-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--color-text-light);
    margin-bottom: 0.25rem;
}

.pais-name {
    font-size: 1.5rem;
    font-weight: 700;
}

.pais-principal-stat {
    text-align: right;
}

.pais-count {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary);
}

.pais-percentage {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

/* Progress Bar */
.progress-bar {
    height: 8px;
    background: var(--color-border);
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    border-radius: 999px;
    transition: width 0.3s;
}

.progress-bar-small {
    height: 4px;
    flex: 1;
}

/* País List */
.paises-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pais-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    transition: background 0.15s;
}

.pais-item:hover {
    background: var(--color-bg-light);
}

.pais-rank {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-light);
    min-width: 2.5rem;
    text-align: center;
}

.pais-info {
    flex: 1;
    min-width: 0;
}

.pais-name-small {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.pais-stats-small {
    text-align: right;
    min-width: 100px;
}

.pais-count-small {
    font-weight: 700;
    color: var(--color-text);
}

.pais-percentage-small {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.paises-complete {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Stats Sidebar */
.stats-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-item-sidebar {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.stat-item-sidebar:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.stat-label-sidebar {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-bottom: 0.25rem;
}

.stat-value-sidebar {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
}

.regions-list {
    list-style: none;
}

.region-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
}

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

.region-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--color-primary);
    color: white;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.region-name {
    flex: 1;
    font-weight: 500;
}

/* Países Grid */
.paises-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.pais-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all 0.2s;
}

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

.pais-card-flag {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: white;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.875rem;
}

.pais-card-info {
    flex: 1;
}

.pais-card-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.pais-card-info p {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.pais-card-arrow {
    color: var(--color-text-light);
}

/* Country Header */
.country-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.country-flag-large {
    width: 5rem;
    height: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: white;
    border-radius: 1rem;
    font-weight: 700;
    font-size: 1.5rem;
}

/* Filter */
.search-filter {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filter-input {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    transition: all 0.2s;
}

.filter-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--shadow);
}

.filter-stats {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

/* Table */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.data-table thead {
    background: var(--color-bg-light);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--color-text);
    border-bottom: 2px solid var(--color-border);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.data-table tbody tr:hover {
    background: var(--color-bg-light);
}

.rank-cell {
    font-weight: 700;
    color: var(--color-text-light);
    width: 80px;
}

.name-cell {
    font-size: 1.125rem;
}

.count-cell {
    color: var(--color-text-light);
}

.action-cell {
    width: 150px;
    text-align: right;
}

/* Alphabet */
.alphabet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.letter-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: white;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all 0.2s;
}

.letter-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.letter-big {
    font-size: 3rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.letter-count {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

/* Letter Header */
.letter-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.letter-display {
    width: 5rem;
    height: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-gradient);
    color: white;
    border-radius: 1rem;
    font-weight: 800;
    font-size: 2.5rem;
}

/* Letter Navigation */
.letter-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.letter-nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    color: var(--color-text);
    transition: all 0.2s;
}

.letter-nav-item:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.letter-nav-item.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* Apellidos List */
.apellidos-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.apellido-list-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: all 0.2s;
}

.apellido-list-item:hover {
    box-shadow: var(--shadow-md);
}

.apellido-list-rank {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-light);
    min-width: 3rem;
}

.apellido-list-info {
    flex: 1;
}

.apellido-list-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.apellido-list-name a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s;
}

.apellido-list-name a:hover {
    color: var(--color-primary);
}

.apellido-list-count {
    color: var(--color-text-light);
    font-size: 0.875rem;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
}

.pagination-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--color-text);
    font-weight: 600;
    transition: all 0.2s;
}

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

.pagination-info {
    color: var(--color-text-light);
}

/* Error Box */
.error-box {
    text-align: center;
    padding: 4rem 2rem;
}

.error-box h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-box p {
    color: var(--color-text-light);
    margin-bottom: 2rem;
}

/* Footer */
.footer {
    background: var(--color-text);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: white;
}

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

/* Utilities */
.text-center {
    text-align: center;
}

/* Podium */
.podium-container {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 1rem;
    padding: 2rem 1rem;
    min-height: 350px;
}

.podium-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 1.5rem 1rem 2rem;
    border-radius: var(--radius-lg);
    position: relative;
    transition: transform 0.3s;
}

.podium-item:hover {
    transform: translateY(-5px);
}

.podium-first {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    min-height: 280px;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(251, 191, 36, 0.3);
}

.podium-second {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    color: white;
    min-height: 240px;
    min-width: 180px;
    box-shadow: 0 8px 25px rgba(148, 163, 184, 0.3);
}

.podium-third {
    background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
    color: white;
    min-height: 200px;
    min-width: 180px;
    box-shadow: 0 6px 20px rgba(251, 146, 60, 0.3);
}

.podium-medal {
    margin-bottom: 1rem;
    opacity: 0.9;
}

.podium-rank {
    font-size: 0.875rem;
    font-weight: 600;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.podium-name {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-align: center;
    line-height: 1.2;
}

.podium-first .podium-name {
    font-size: 2rem;
}

.podium-count {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.podium-first .podium-count {
    font-size: 1.75rem;
}

.podium-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

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

    .quick-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .apellidos-grid {
        grid-template-columns: 1fr;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .content-sidebar {
        order: -1;
    }

    .apellido-title {
        font-size: 2rem;
    }

    .apellido-stats-row {
        flex-direction: column;
        gap: 1rem;
    }

    /* Hero Compacto Móvil */
    .apellido-hero {
        padding: 1.5rem;
    }

    .apellido-hero-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .apellido-title-hero {
        font-size: 1.75rem;
    }

    .apellido-stats-hero {
        width: 100%;
        justify-content: space-between;
        gap: 1rem;
    }

    .stat-hero {
        min-width: auto;
        flex: 1;
    }

    .stat-hero-number {
        font-size: 1.25rem;
    }

    .stat-hero-label {
        font-size: 0.65rem;
    }

    .stat-hero-divider {
        display: none;
    }

    /* Charts Grid Móvil */
    .charts-grid {
        grid-template-columns: 1fr;
    }

    /* Analysis Cards Móvil */
    .analysis-cards {
        grid-template-columns: 1fr;
    }

    /* Podium Móvil */
    .podium-container {
        flex-direction: column;
        align-items: center;
        min-height: auto;
        gap: 1rem;
    }

    .podium-item {
        width: 100%;
        max-width: 300px;
        min-height: auto !important;
        min-width: auto !important;
    }

    .podium-first,
    .podium-second,
    .podium-third {
        padding: 1.5rem;
    }

    .podium-name {
        font-size: 1.5rem;
    }

    .podium-first .podium-name {
        font-size: 1.75rem;
    }

    .pais-principal-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .pais-principal-stat {
        text-align: left;
    }

    .country-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .letter-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .letter-nav {
        flex-wrap: wrap;
    }

    .mobile-toggle {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        background: none;
        border: none;
        cursor: pointer;
    }

    .mobile-toggle span {
        width: 1.5rem;
        height: 2px;
        background: var(--color-text);
    }

    .nav-menu {
        display: none;
    }

    .paises-grid {
        grid-template-columns: 1fr;
    }

    .alphabet-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .letter-big {
        font-size: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}
