/* ==========================================================================
   Variables globales
   ========================================================================== */
:root {
    --primary-color: #239F40;
    --secondary-color: #4A4A4A;
    --text-color: #333333;
    --light-bg: #F5F5F5;
    --header-bg: #239F40;
    --hover-color: #1b7e32;
}

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

html, body {
    height: 100%;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #eee;
}

/* ==========================================================================
   Tipografía
   ========================================================================== */
h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }

p, li, span, a, div, input, button, textarea {
    font-family: 'Montserrat', sans-serif;
    font-size: 19px;
}

/* ==========================================================================
   Header y Navegación
   ========================================================================== */
header {
    background-color: var(--header-bg);
    color: white;
    padding: 0.7rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
}

/* Logo estilo China Index */
header .logo {
    color: white;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 2rem;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}

/* Menú principal estilo China Index */
header nav ul li .nav-link {
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    text-decoration: none;
    padding: 0 10px;
    transition: color 0.2s;
}
header nav ul li .nav-link:hover {
    color: #fff;
    text-decoration: none;
}

header nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hamburger {
    margin-left: 18px;
    margin-right: 0;
    align-self: center;
}

/* ==========================================================================
   Main Content y Mapa
   ========================================================================== */
main {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Estilos del mapa para la página principal */
#hero {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 400px;
    margin-bottom: 2rem;
    background: white;
    z-index: 1;
}

#hero {
    background: url('../images/kv_bg.png') repeat!important;
    background-size: auto!important;
    width: 100%;
    height: 94vh;
    position: relative;
    z-index: 2;
}

/* Elimina z-index y background innecesarios de las secciones siguientes */
section {
    position: static;
    z-index: auto;
    background: none;
}

/* Estilos del mapa para los perfiles de dominio */
.map-container {
    position: relative;
    width: 100%;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.map-container #map {
    width: 100%;
    height: 100%;
    min-height: 300px;
    position: relative;
}

/* Overlay text para la página principal */
.overlay-text {
    position: absolute;
    bottom: 13vh;
    left: 50px;
    color: black;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
    z-index: 2;
}

.overlay-text h1 {
    font-size: 4rem;
    margin: 0 0 10px 0;
    color: white;
    font-weight: 900;
}

.overlay-text p {
    font-size: 1.7rem;
    margin: 0 0 15px 0;
    max-width: 600px;
}

/* Leyenda del mapa */
.legend {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 40px;
}

.legend-bar {
    width: 300px;
    height: 15px;
    background: linear-gradient(to right, #e1f3e1, #006400);
    border-radius: 5px;
}

.legend-labels {
    display: flex;
    justify-content: space-between;
    width: 300px;
    font-size: 1.2rem;
}

/* ==========================================================================
   Media Queries
   ========================================================================== */
@media (max-width: 991.98px) {
    .overlay-text {
        left: 30px;
        bottom: 10vh;
    }

    .overlay-text h1 {
        font-size: 3rem;
    }

    .overlay-text p {
        font-size: 1.4rem;
    }

    .legend-bar,
    .legend-labels {
        width: 250px;
    }
}

@media (max-width: 768px) {
    .overlay-text {
        left: 20px;
        bottom: 8vh;
    }

    .overlay-text h1 {
        font-size: 2.5rem;
    }

    .overlay-text p {
        font-size: 1.2rem;
    }

    .legend-bar,
    .legend-labels {
        width: 200px;
    }

    .map-container {
        height: 200px;
    }
}

/* ==========================================================================
   Contenedores
   ========================================================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.about-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* ==========================================================================
   Componentes
   ========================================================================== */
/* Botones */
.btn {
    font-family: 'Montserrat', sans-serif;
    font-size: 19px;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    background-color: #239F40;
    color: white;
    border: none;
}

.btn:hover {
    background-color: #1b7e32;
    color: white;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    margin-bottom: 2rem;
    background: white;
}

.card-body {
    padding: 2rem;
}

/* Tables */
.table {
    width: 100%;
    margin-bottom: 1rem;
}

.table th {
    font-weight: 900;
    background-color: #f8f9fa;
}

.table td, .table th {
    font-size: 19px;
    padding: 1rem;
}

/* Forms */
input, 
textarea, 
select {
    font-family: 'Montserrat', sans-serif;
    font-size: 19px;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* ==========================================================================
   Utilidades
   ========================================================================== */
.text-center { text-align: center !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-2 { margin-top: 2rem !important; }
.mb-2 { margin-bottom: 2rem !important; }

/* ==========================================================================
   Media Queries
   ========================================================================== */
@media (max-width: 991.98px) {
    .navbar-nav {
        padding: 1rem 0;
    }
    
    .nav-link {
        padding: 0.5rem 0 !important;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    .container {
        padding: 0 1.5rem;
    }
}

/* About Page Styles */
.about-section h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #333;
}

.about-section h2 {
    font-size: 2rem;
    margin: 2rem 0 1rem;
    color: #333;
}

.about-section p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #444;
    margin-bottom: 1rem;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.scoring-table {
    max-width: 500px;
}

.scoring-table th {
    background-color: #f8f9fa;
}

.director-card {
    text-align: center;
    margin-bottom: 2rem;
}

.director-card img {
    margin-bottom: 1rem;
    max-width: 200px;
}

.director-card h4 {
    margin-bottom: 0.5rem;
    color: #333;
}

.director-card p {
    color: #666;
    margin: 0;
}

/* Country Profiles Styles */
.country-profiles {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.region-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--primary-color);
}

.country-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.country-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(35, 159, 64, 0.1);
}

.country-item:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 12px rgba(35, 159, 64, 0.1);
    border-color: var(--primary-color);
}

.country-info {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
}

.country-info h3 {
    font-size: 1.3rem;
    margin: 0;
    min-width: 200px;
    color: var(--text-color);
    font-weight: 600;
}

.rank {
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 500;
}

.score-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 2;
}

.score-value {
    min-width: 60px;
    text-align: right;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.progress {
    flex: 1;
    height: 12px;
    background-color: #e1f3e1;
    border-radius: 6px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, 
        var(--primary-color) 0%, 
        var(--hover-color) 100%
    );
    transition: width 0.3s ease;
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 3rem 0;
    position: relative;
    z-index: 2;
}

footer h5 {
    color: white;
    margin-bottom: 1.5rem;
}

footer a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

footer a:hover {
    color: white;
    opacity: 0.8;
}

/* Explore Section Styles */
.explore-section, .materials-section {
    background-color: white;
    padding: 60px 0;
}

.explore-section h2, .materials-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.explore-card {
    border: 2px solid #239F40;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    transition: transform 0.3s ease;
}

.explore-card:hover {
    transform: translateY(-5px);
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
}

.icon-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.explore-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.explore-card p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.btn-explore {
    background-color: #239F40;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.btn-explore:hover {
    background-color: #1b7e32;
    color: white;
}

.btn-coming-soon {
    background-color: rgba(139, 69, 19, 0.15) !important;
    color: rgba(139, 69, 19, 0.7) !important;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    cursor: default;
    opacity: 1;
    border: none;
    box-shadow: none;
}

/* User Guides Section */
.guides-section {
    background-color: #f8f9fa;
    padding: 60px 0;
}

.guide-card {
    display: block;
    text-decoration: none;
    border-radius: 8px;
    overflow: hidden;
    height: 180px;
    position: relative;
    transition: transform 0.3s ease;
}

.guide-card:hover {
    transform: translateY(-5px);
}

.guide-card.burgundy {
    background-color: #8B0000;
    background-image: url('../images/patterns/persian-pattern.png');
    background-blend-mode: multiply;
}

.guide-card.blue {
    background-color: #005288;
}

.guide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
    padding: 20px;
}

.guide-content h3 {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.guide-content p {
    color: white;
    font-size: 1.2rem;
    margin: 0;
}

.guide-label {
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 500;
}

/* Quoted by Section */
.quoted-section {
    padding: 4rem 0;
    background-color: #f8f9fa;
}

.quoted-section .container {
    max-width: 1400px;
}

.quoted-section .carousel-control-prev,
.quoted-section .carousel-control-next {
    width: 5%;
    color: #333;
}

.quoted-section .carousel-indicators {
    bottom: -50px;
    margin-bottom: 0;
}

.quoted-section .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ddd;
    margin: 0 8px;
}

.quoted-section .carousel-indicators button.active {
    background-color: var(--primary-color);
}

.quoted-section img {
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
    max-height: 120px;
    width: auto;
    margin: 0 auto;
    display: block;
    object-fit: contain;
}

.quoted-section img:hover {
    filter: grayscale(0);
    opacity: 1;
}

.quoted-section .row {
    margin: 0 -8px;
}

.quoted-section .col-md-3 {
    padding: 0 8px;
}

@media (max-width: 768px) {
    .quoted-section img {
        max-height: 80px;
    }
    .quoted-section .row {
        margin: 0 -4px;
    }
    .quoted-section .col-md-3 {
        padding: 0 4px;
        margin-bottom: 15px;
    }
}

/* Country Hero Section */
.country-hero {
    background-color: var(--primary-color);
    padding: 4rem 0;
    margin-bottom: 2rem;
    position: relative;
}

.country-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(to bottom right, transparent 49%, white 50%);
}

.country-hero h1 {
    color: white;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.country-hero .lead {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    max-width: 800px;
}

/* Country Profiles New Styles */
.country-profiles h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.country-profiles .lead {
    font-size: 1.1rem;
    color: var(--text-color);
}

.text-burgundy {
    color: #800020;
    font-weight: 500;
}

.region-marker {
    color: var(--primary-color);
    font-weight: 900;
    margin-right: 0.5rem;
}

.region-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.country-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr 3fr;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    color: #666;
}

.country-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr 3fr;
    padding: 1rem 1.5rem;
    align-items: center;
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.2s ease;
}

.country-row:hover {
    background-color: #f8f9fa;
}

.country-name a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
}

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

.country-ranking {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rank-change {
    font-size: 0.85rem;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-weight: 500;
}

.rank-change.up {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.rank-change.down {
    background-color: #ffebee;
    color: #c62828;
}

.rank-change.new {
    background-color: #e3f2fd;
    color: #1565c0;
}

.rank-change::before {
    content: '▲';
    margin-right: 2px;
}

.rank-change.down::before {
    content: '▼';
}

.rank-change.new::before {
    content: none;
}

.score-trend {
    font-size: 0.85rem;
}

.score-trend.up {
    color: #2e7d32;
}

.score-trend.down {
    color: #c62828;
    transform: rotate(180deg);
}

.score-trend.none {
    display: none;
}

.country-score {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.country-domains {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.domain-tag {
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    color: white;
}

.domain-tag.warning {
    background-color: #ffc107;
}

.domain-tag.purple {
    background-color: #6f42c1;
}

.domain-tag.success {
    background-color: #28a745;
}

.domain-tag.danger {
    background-color: #dc3545;
}

.domain-tag.info {
    background-color: #17a2b8;
}

.domain-tag.primary {
    background-color: #0d6efd;
}

.domain-tag.olive {
    background-color: #808000;
}

.domain-tag.brown {
    background-color: #795548;
}

.domain-tag.teal {
    background-color: #009688;
}

@media (max-width: 1200px) {
    .table-header, .country-row {
        grid-template-columns: 2fr 1fr 1fr 1.5fr 2fr;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .table-header {
        display: none;
    }

    .country-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .country-domains {
        margin-top: 0.5rem;
    }

    #hero {
        min-height: 400px;
        padding: 50px 0;
    }

    #hero h1 {
        font-size: 2.5rem;
    }

    #hero .lead {
        font-size: 1.2rem;
    }

    .country-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .country-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .score-container {
        width: 100%;
    }

    .country-info h3 {
        min-width: unset;
    }

    .explore-card {
        margin-bottom: 2rem;
    }
    
    .explore-section h2, .materials-section h2 {
        font-size: 2rem;
    }

    .guide-card {
        margin-bottom: 2rem;
        height: 150px;
    }

    .guide-content h3 {
        font-size: 1.5rem;
    }

    .guide-content p {
        font-size: 1rem;
    }

    .quoted-section .col-6 {
        margin-bottom: 2rem;
    }
}

/* Data Explorer Navigation */
.data-explorer-nav {
    background-color: #2eb556; /* Verde más claro que el header */
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 1rem 0;
}

.data-explorer-nav .nav-pills {
    justify-content: flex-end;
}

.data-explorer-nav .nav-pills .nav-link {
    color: rgba(255,255,255,0.8) !important;
    border-radius: 0;
    padding: 0.5rem 1rem;
    margin-right: 1rem;
    font-weight: 500;
}

.data-explorer-nav .nav-pills .nav-link.active {
    background-color: transparent;
    color: white !important;
    border-bottom: 2px solid white;
}

.data-explorer-nav .nav-pills .nav-link:hover {
    color: white !important;
}

/* Domain Grid */
.domain-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

/* Domain Cards */
.domain-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 2rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.domain-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.domain-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.domain-icon i {
    font-size: 2.5rem;
}

.domain-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.domain-divider {
    height: 2px;
    background-color: #e9ecef;
    margin: 1rem 0;
}

.domain-card p {
    color: #6c757d;
    margin-bottom: 2rem;
    line-height: 1.6;
    flex-grow: 1;
}

.explore-btn {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    text-align: center;
    text-decoration: none;
    color: white;
    border-radius: 4px;
    transition: all 0.3s ease;
    margin-top: auto;
}

/* Domain-specific colors for icons and buttons */
.media-domain .domain-icon i { color: #F0A500; }
.academia-domain .domain-icon i { color: #E74C3C; }
.economy-domain .domain-icon i { color: #8B4513; }
.society-domain .domain-icon i { color: #27AE60; }
.military-domain .domain-icon i { color: #16A085; }
.law-enforcement-domain .domain-icon i { color: #008B8B; }
.technology-domain .domain-icon i { color: #0066CC; }
.domestic-politics-domain .domain-icon i { color: #8E44AD; }
.foreign-policy-domain .domain-icon i { color: #6B8E23; }

.media-domain .explore-btn { background-color: #F0A500; }
.academia-domain .explore-btn { background-color: #E74C3C; }
.economy-domain .explore-btn { background-color: #8B4513; }
.society-domain .explore-btn { background-color: #27AE60; }
.military-domain .explore-btn { background-color: #16A085; }
.law-enforcement-domain .explore-btn { background-color: #008B8B; }
.technology-domain .explore-btn { background-color: #0066CC; }
.domestic-politics-domain .explore-btn { background-color: #8E44AD; }
.foreign-policy-domain .explore-btn { background-color: #6B8E23; }

.explore-btn:hover {
    opacity: 0.9;
    color: white;
    transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .domain-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Indicator Scoreboards */
.scoreboards-container {
    margin-top: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.domain-scoreboard {
    background: white;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.domain-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: white;
    cursor: pointer;
}

.domain-title {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.domain-title i {
    font-size: 2rem;
}

.domain-title h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 800;
}

/* Media Domain */
.media-domain .domain-title i,
.media-domain .domain-title h2,
.media-domain .score-value,
.media-domain .indicator-text .highlight,
.media-domain .stat-group:first-child .stat-value { color: #F0A500; }
.media-domain .explore-button { background-color: #F0A500; }
.media-domain .domain-indicators { border-top-color: #F0A500; }

/* Academia Domain */
.academia-domain .domain-title i,
.academia-domain .domain-title h2,
.academia-domain .score-value,
.academia-domain .indicator-text .highlight,
.academia-domain .stat-group:first-child .stat-value { color: #E74C3C; }
.academia-domain .explore-button { background-color: #E74C3C; }
.academia-domain .domain-indicators { border-top-color: #E74C3C; }

.economy-domain .domain-title i,
.economy-domain .domain-title h2,
.economy-domain .score-value,
.economy-domain .indicator-text .highlight,
.economy-domain .stat-group:first-child .stat-value { color: #8B4513; }
.economy-domain .explore-button { background-color: #8B4513; }
.economy-domain .domain-indicators { border-top-color: #8B4513; }

.society-domain .domain-title i,
.society-domain .domain-title h2,
.society-domain .score-value,
.society-domain .indicator-text .highlight,
.society-domain .stat-group:first-child .stat-value { color: #27AE60; }
.society-domain .explore-button { background-color: #27AE60; }
.society-domain .domain-indicators { border-top-color: #27AE60; }

.military-domain .domain-title i,
.military-domain .domain-title h2,
.military-domain .score-value,
.military-domain .indicator-text .highlight,
.military-domain .stat-group:first-child .stat-value { color: #16A085; }
.military-domain .explore-button { background-color: #16A085; }
.military-domain .domain-indicators { border-top-color: #16A085; }

.law-enforcement-domain .domain-title i,
.law-enforcement-domain .domain-title h2,
.law-enforcement-domain .score-value,
.law-enforcement-domain .indicator-text .highlight,
.law-enforcement-domain .stat-group:first-child .stat-value { color: #008B8B; }
.law-enforcement-domain .explore-button { background-color: #008B8B; }
.law-enforcement-domain .domain-indicators { border-top-color: #008B8B; }

.technology-domain .domain-title i,
.technology-domain .domain-title h2,
.technology-domain .score-value,
.technology-domain .indicator-text .highlight,
.technology-domain .stat-group:first-child .stat-value { color: #0066CC; }
.technology-domain .explore-button { background-color: #0066CC; }
.technology-domain .domain-indicators { border-top-color: #0066CC; }

.domestic-politics-domain .domain-title i,
.domestic-politics-domain .domain-title h2,
.domestic-politics-domain .score-value,
.domestic-politics-domain .indicator-text .highlight,
.domestic-politics-domain .stat-group:first-child .stat-value { color: #8E44AD; }
.domestic-politics-domain .explore-button { background-color: #8E44AD; }
.domestic-politics-domain .domain-indicators { border-top-color: #8E44AD; }

.foreign-policy-domain .domain-title i,
.foreign-policy-domain .domain-title h2,
.foreign-policy-domain .score-value,
.foreign-policy-domain .indicator-text .highlight,
.foreign-policy-domain .stat-group:first-child .stat-value { color: #6B8E23; }
.foreign-policy-domain .explore-button { background-color: #6B8E23; }
.foreign-policy-domain .domain-indicators { border-top-color: #6B8E23; }

.domain-scores {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
    margin-left: auto;
}

.score {
    text-align: center;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.score-value {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
    text-align: right;
}

.score-value::after {
    content: "%";
    display: inline;
}

.score-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
    text-align: right;
}

.expand-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    margin-left: 2rem;
    cursor: pointer;
}

.expand-btn i {
    font-size: 1.5rem;
    color: #666;
    transition: transform 0.3s ease;
}

.expand-btn:hover i {
    color: #333;
}

/* Titles */
.scoreboards-container h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #333;
    margin-bottom: 1rem;
}

.scoreboards-container .lead {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 3rem;
    font-weight: 500;
}

/* Quick Links */
.domain-quick-links {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 100;
}

.quick-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.quick-link i {
    font-size: 1.4rem;
}

/* Colores específicos para cada ícono del quick-link */
.quick-link.media i { color: #F0A500; }
.quick-link.academia i { color: #E74C3C; }
.quick-link.economy i { color: #8B4513; }
.quick-link.society i { color: #27AE60; }
.quick-link.military i { color: #16A085; }
.quick-link.law-enforcement i { color: #008B8B; }
.quick-link.technology i { color: #0066CC; }
.quick-link.domestic-politics i { color: #8E44AD; }
.quick-link.foreign-policy i { color: #6B8E23; }

.quick-link:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

@media (max-width: 1400px) {
    .domain-quick-links {
        display: none;
    }
}

@media (max-width: 992px) {
    .domain-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .domain-scores {
        width: 100%;
        justify-content: space-between;
    }

    .score {
        min-width: auto;
    }

    .score-value {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .domain-scores {
        flex-wrap: wrap;
        gap: 1.5rem;
    }

    .score {
        flex: 1;
        min-width: calc(33% - 1rem);
    }
}

/* Indicator Content Styles */
.domain-indicators {
    display: none;
    padding: 0;
    border-top: 2px solid #F0A500;
    background: #fff;
}

.domain-scoreboard.expanded .domain-indicators {
    display: block;
}

.indicator-item {
    margin: 0;
    padding: 2rem;
    border-bottom: 1px solid #e9ecef;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: start;
}

.indicator-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.indicator-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0;
}

.indicator-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: #333;
    min-width: 2rem;
}

.indicator-text {
    font-size: 1.25rem;
    line-height: 1.6;
    color: #333;
    font-weight: 500;
    padding-right: 0;
}

.indicator-text .highlight {
    color: #F0A500;
    font-weight: 600;
}

.indicator-stats {
    display: flex;
    gap: 4rem;
    margin: 0;
    justify-content: flex-end;
}

.stat-group {
    text-align: left;
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.stat-year {
    font-size: 1rem;
    color: #333;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 3rem;
    font-weight: 800;
    color: #F0A500;
    line-height: 1;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: baseline;
}

.stat-group:first-child .stat-value {
    color: #F0A500;
}

.stat-group:nth-child(2) .stat-value {
    color: #999;
}

.stat-value::after {
    content: "/101";
    font-size: 1.2rem;
    margin-left: 0.3rem;
    color: #666;
    font-weight: 500;
}

.stat-group:nth-child(2) .stat-value::after {
    content: "/80";
}

.stat-label {
    font-size: 1rem;
    color: #666;
    font-weight: 500;
}

.explore-button {
    margin: 1.5rem 0 0 3rem;
    padding: 0.75rem 2rem;
    background: #F0A500;
    border: none;
    border-radius: 4px;
    color: white !important;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.3s ease;
    width: fit-content;
}

.explore-button:hover {
    background: #d89400;
    text-decoration: none;
}

.explore-button i {
    font-size: 1rem;
    color: white !important;
}

/* Asegurarse de que todos los elementos de formulario usen Montserrat */
input, 
button, 
select, 
textarea, 
.btn {
    font-family: var(--font-family);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
#hero {
    
    height: auto !important;
    min-height: unset !important;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 0 !important;
    
    margin-top: 0 !important;
    padding-top: 0 !important;
}

#hero .container {
    position: relative;
    z-index: 2;
    padding: 0 80px 20vh 80px;
    width: 100%;
    max-width: none;
}

#hero h1 {
    color: white;
    font-size: 4rem;
    font-weight: 900;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

#hero .lead {
    color: black;
    font-size: 1.7rem;
    max-width: 600px;
    margin: 0 0 15px 0;
}

.legend {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 40px;
}

.legend-bar {
    width: 300px;
    height: 15px;
    background: linear-gradient(to right, #e1f3e1, #006400);
    border-radius: 5px;
}

.legend-labels {
    display: flex;
    justify-content: space-between;
    width: 300px;
    font-size: 1.2rem;
    color: black;
}

/* Ajustes responsivos para el hero */
@media (max-width: 991.98px) {
    #hero {
        padding: 40px;
        height: 60vh;
    }

    #hero .container {
        padding: 0 40px 10vh 40px;
    }

    #hero h1 {
        font-size: 3rem;
    }

    #hero .lead {
        font-size: 1.4rem;
    }
}

@media (max-width: 768px) {
    #hero {
        padding: 20px;
    }

    #hero .container {
        padding: 0 20px 5vh 20px;
    }

    #hero h1 {
        font-size: 2.5rem;
    }

    #hero .lead {
        font-size: 1.2rem;
    }

    .legend-bar,
    .legend-labels {
        width: 250px;
    }
}

/* === Media Domain Profile Custom Styles === */
.map-container {
    position: relative;
    width: 100%;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
}

#map {
    background: url('assets/images/kv_bg.png') center center no-repeat !important;
    background-size: cover !important;
    width: 100%;
    height: 94vh;
    z-index: 1;
}

.domainName.exposure {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    padding: 48px 32px 40px 32px;
    margin-bottom: 2rem;
}
.domainName.exposure .icon {
    font-size: 2.5rem;
    color: #d4af37;
    margin-right: 16px;
}
.domainName.exposure h1 {
    color: #d4af37;
    font-weight: 700;
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: 0;
}
.domainName.exposure p {
    font-size: 1.15rem;
    color: #222;
    font-weight: 400;
    max-width: 700px;
    margin: 16px auto 0 auto;
    text-align: center;
}

.card.active {
    border-radius: 18px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    background: #fff;
    padding: 32px 32px 24px 32px;
    max-width: 1040px;
    margin: 0 auto 2rem auto;
}
.card .question .num {
    font-size: 2rem;
    font-weight: 700;
    color: #222;
    margin-right: 8px;
}
.card .question p {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 500;
    color: #222;
}
.card .score {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 32px;
    margin-top: 1.5rem;
}
.card .score .inner {
    min-width: 100px;
    text-align: center;
}
.card .score .tit.year {
    color: #bdbdbd;
    font-weight: 700;
    margin-bottom: 0;
}
.card .score span {
    font-size: 2.5rem;
    color: #d4af37;
    font-weight: 700;
}
.card .score .tit {
    color: #888;
    font-size: 1rem;
}
.card .btn.more, .card .btn.hide {
    font-weight: 600;
    border-radius: 6px;
    padding: 8px 32px;
    display: inline-block;
    text-decoration: none;
    margin-top: 1.5rem;
    transition: background 0.2s, color 0.2s;
    font-family: var(--font-family);
    -webkit-box-shadow: 0 5px 10px 5px rgba(0,0,0,.1);
    box-shadow: 0 5px 10px 5px rgba(0,0,0,.1);
}
.card .btn.more {
    background: #239F40;
    color: #fff;
    border: none;
}
.card .btn.more:hover {
    background: #1b7e32;
    color: #fff;
}
.card .btn.hide {
    background: #fff;
    color: #239F40;
    border: 1.5px solid #239F40;
}
.card .btn.hide:hover {
    background: #f7f7f7;
    color: #1b7e32;
}
.card .num {
    color: #239F40;
    font-weight: 700;
    font-size: 1.1rem;
    margin-right: 8px;
}
.card .value {
    color: #239F40;
    font-weight: 700;
    font-size: 1.1rem;
}
.card .option {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}
.card .option .value {
    min-width: 120px;
    font-weight: 700;
    color: #d4af37;
    font-size: 1.1rem;
}
.card .option .caption {
    flex: 1;
    margin-left: 16px;
}
.card .option .bar {
    width: 100%;
    height: 10px;
    background: #eee;
    border-radius: 5px;
    margin-bottom: 8px;
    overflow: hidden;
}
.card .option .bar .color {
    background: #239F40;
}
.card .fyi {
    color: #888;
    font-size: 0.95rem;
    margin-top: 1.5rem;
}
@media (max-width: 768px) {
    .map-container { height: 200px; }
    .domainName.exposure { padding: 32px 8px 24px 8px; }
    .card.active { padding: 16px 4px 12px 4px; }
    .card .score { flex-direction: column; gap: 12px; }
}

.academia-domain .btn.more, .academia-domain .btn.hide {
    font-weight: 600;
    border-radius: 6px;
    padding: 8px 32px;
    display: inline-block;
    text-decoration: none;
    margin-top: 1.5rem;
    transition: background 0.2s, color 0.2s;
    font-family: var(--font-family);
    -webkit-box-shadow: 0 5px 10px 5px rgba(0,0,0,.1);
    box-shadow: 0 5px 10px 5px rgba(0,0,0,.1);
}
.academia-domain .btn.more {
    background: #E74C3C;
    color: #fff;
    border: none;
}
.academia-domain .btn.more:hover {
    background: #c0392b;
    color: #fff;
}
.academia-domain .btn.hide {
    background: #fff;
    color: #E74C3C;
    border: 1.5px solid #E74C3C;
}
.academia-domain .btn.hide:hover {
    background: #f7f7f7;
    color: #c0392b;
}
.academia-domain .num {
    color: #E74C3C;
    font-weight: 700;
    font-size: 1.1rem;
    margin-right: 8px;
}
.academia-domain .value {
    color: #E74C3C;
    font-weight: 700;
    font-size: 1.1rem;
}
.academia-domain .option .bar .color {
    background: #E74C3C;
}

.academia-domain .card .option .value { color: #E74C3C !important; }
.media-domain .card .option .value { color: #d4af37 !important; }
.economy-domain .card .option .value { color: #8B4513 !important; }
.society-domain .card .option .value { color: #27AE60 !important; }
.military-domain .card .option .value { color: #16A085 !important; }
.law-enforcement-domain .card .option .value { color: #008B8B !important; }
.technology-domain .card .option .value { color: #0066CC !important; }
.domestic-politics-domain .card .option .value { color: #8E44AD !important; }

.academia-domain .card .question .num { color: #E74C3C !important; }
.media-domain .card .question .num { color: #d4af37 !important; }
.economy-domain .card .question .num { color: #8B4513 !important; }
.society-domain .card .question .num { color: #27AE60 !important; }
.military-domain .card .question .num { color: #16A085 !important; }
.law-enforcement-domain .card .question .num { color: #008B8B !important; }
.technology-domain .card .question .num { color: #0066CC !important; }
.domestic-politics-domain .card .question .num { color: #8E44AD !important; }
.foreign-policy-domain .card .question .num { color: #6B8E23 !important; }

/* === Economy Domain Buttons === */
.economy-domain .btn.more {
    background: #8B4513;
    color: #fff;
    border: none;
}
.economy-domain .btn.more:hover {
    background: #5c3310;
    color: #fff;
}
.economy-domain .btn.hide {
    background: #fff;
    color: #8B4513;
    border: 1.5px solid #8B4513;
}
.economy-domain .btn.hide:hover {
    background: #f7f7f7;
    color: #5c3310;
}
.economy-domain .num,
.economy-domain .value {
    color: #8B4513;
}

/* === Botones generales: verde Iran Index === */
.card .btn.more {
    background: #239F40;
    color: #fff;
    border: none;
}
.card .btn.more:hover {
    background: #1b7e32;
    color: #fff;
}
.card .btn.hide {
    background: #fff;
    color: #239F40;
    border: 1.5px solid #239F40;
}
.card .btn.hide:hover {
    background: #f7f7f7;
    color: #1b7e32;
}

/* === Estilos movidos desde index2.php === */
body {
    margin: 0;
    font-family: Arial;
    background-color: #f4f4f4;
}

#map {
    width: 100%;
    height: 70vh;
    min-height: 400px;
    /* border-radius: 12px; */
    /* box-shadow: 0 2px 16px rgba(0,0,0,0.08); */
}

.map-legend {
    margin-top: 1rem;
    padding: 10px;
    background: white;
    border-radius: 5px;
    font-size: 14px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    display: inline-block;
}

/* Estilos para el mapa Society como en China Index */
.map.society.min {
    --swiper-theme-color: #007aff;
    --swiper-navigation-size: 44px;
    --font-family: '__Montserrat_0c0d4d', '__Montserrat_Fallback_0c0d4d',"Montserrat", "Noto Sans CJK TC", "微軟正黑體", "SF Pro TC", "SF Pro Text", "SF Pro Icons", "PingFang TC", sans-serif;
    line-height: 1;
    font-family: var(--font-family);
    box-sizing: border-box;
    margin: 0;
    border: 0;
    vertical-align: baseline;
    width: 100%;
    position: relative;
    padding: 0;
    margin-bottom: 100px;
    overflow: hidden;
    min-height: 750px;
    height: 636px;
}

/* Estilos para la leyenda del mapa */
.info {
    padding: 6px 8px;
    font: 14px/16px Arial, Helvetica, sans-serif;
    background: white;
    background: rgba(255,255,255,0.8);
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    border-radius: 5px;
}

.info h4 {
    margin: 0 0 5px;
    color: #777;
}

.legend {
    line-height: 18px;
    color: #555;
}

.legend i {
    width: 18px;
    height: 18px;
    float: left;
    margin-right: 8px;
    opacity: 0.7;
}

/* Estilos para los popups */
.leaflet-popup-content {
    margin: 10px;
    font-family: 'Montserrat', sans-serif;
}

.leaflet-popup-content strong {
    color: #333;
    font-size: 14px;
}

/* Estilos para el hover de los países */
.leaflet-interactive:hover {
    stroke-width: 2px;
    stroke: #666;
}

/* Ajustes para dispositivos móviles */
@media (max-width: 768px) {
    #map {
        height: 50vh;
    }
    
    .info {
        font-size: 12px;
    }
}

/* FAB para mostrar el ranking */
.ranking-fab {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1002;
    background: #239F40;
    color: #fff;
    border: none;
    border-radius: 24px;
    padding: 12px 28px;
    font-size: 1.2rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    cursor: pointer;
    transition: background 0.2s;
}
.ranking-fab:hover {
    background: #1b7e32;
}

/* Drawer tipo card flotante, centrado verticalmente y solo con el alto necesario */
.ranking-drawer {
    position: fixed;
    top: 50%;
    right: 40px;
    transform: translateY(-50%);
    width: 420px;
    max-width: 95vw;
    max-height: 90vh;
    height: auto;
    background: #fff;
    box-shadow: 0 4px 32px rgba(0,0,0,0.18);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    overflow: hidden;
    transition: opacity 0.35s cubic-bezier(.4,0,.2,1), right 0.35s cubic-bezier(.4,0,.2,1);
    opacity: 0;
    pointer-events: none;
}
.ranking-drawer.open {
    right: 40px;
    opacity: 1;
    pointer-events: auto;
}
@media (max-width: 600px) {
    .ranking-drawer, .ranking-drawer.open {
        width: 98vw;
        max-width: 98vw;
        right: 1vw;
        left: 1vw;
        top: 10vh;
        transform: none;
        max-height: 80vh;
        border-radius: 14px;
    }
}

.ranking-fab-vertical {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 1002;
    background: #239F40;
    color: #fff;
    border: none;
    border-radius: 12px 0 0 12px;
    padding: 0.7rem 0.6rem 0.7rem 0.6rem;
    font-size: 1.1rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 0.05em;
    transition: background 0.2s;
}
.ranking-fab-vertical:hover {
    background: #1b7e32;
}
.ranking-fab-vertical .arrow {
    font-size: 1.3rem;
    margin-bottom: 0.2rem;
    writing-mode: initial;
    transform: rotate(0deg);
}
.ranking-fab-vertical .text {
    font-size: 1.1rem;
    font-weight: 700;
    writing-mode: initial;
    margin: 0;
}
@media (max-width: 600px) {
    .ranking-fab-vertical {
        font-size: 0.95rem;
        padding: 0.5rem 0.4rem 0.5rem 0.4rem;
    }
}

.ranking-fab-tab {
    position: absolute;
    right: -40px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    z-index: 1002;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    background: #239F40;
    color: #fff;
    padding: 12px 18px 12px 18px;
    font-size: 1.2rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    cursor: pointer;
    border: none;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s;
}
.ranking-fab-tab:hover {
    background: #1b7e32;
}
.ranking-fab-tab .arrow {
    font-size: 1.3rem;
    margin-left: 0.3rem;
}
@media (max-width: 600px) {
    .ranking-fab-tab {
        right: -60px;
        top: 80px;
        font-size: 1rem;
        padding: 8px 18px 8px 10px;
    }
}

/* Submenu estilo igual que nav principal */
.submenu-link {
    color: white !important;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.5px;
    text-decoration: none !important;
    padding: 0.3rem 12px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
    background: transparent !important;
}
.submenu-link:hover {
    color: #fff !important;
    background: rgba(255,255,255,0.08) !important;
    text-decoration: none !important;
}
.submenu-link.active, .nav-pills .nav-link.active.submenu-link {
    color: #fff !important;
    background: rgba(255,255,255,0.18) !important;
    font-weight: 900;
    text-decoration: none !important;
}

/* --- Drawer estilo China Index pero con colores corporativos --- */
.ranking-drawer {
    background: #fff;
    box-shadow: 0 4px 32px rgba(0,0,0,0.18);
    border-radius: 18px;
    border: 2px solid #e0e0e0;
}
.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, #239F40 80%, #1b7e32 100%);
    color: #fff;
    border-radius: 16px 16px 0 0;
    min-height: 68px;
    box-shadow: 0 2px 8px rgba(35,159,64,0.08);
    font-family: 'Montserrat', sans-serif;
    padding: 0 1.5rem 0 1.5rem;
}
.drawer-title {
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}
.close-btn {
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1rem;
    transition: background 0.18s, color 0.18s;
    box-shadow: none;
    outline: none;
}
.close-btn:hover {
    background: rgba(255,255,255,0.22);
    color: #fff;
}
.drawer-content {
    padding: 1.5rem 1.5rem 1.2rem 1.5rem;
    background: #fff;
}
.overall-score-section {
    gap: 1.1rem;
    margin-bottom: 1.5rem;
}
.overall-score-icon svg {
    width: 38px;
    height: 38px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(35,159,64,0.10);
    border: 2px solid #239F40;
}
.overall-score-text strong {
    font-size: 1.13rem;
    color: #239F40;
    font-weight: 900;
    letter-spacing: 0.2px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.overall-score-text p {
    font-size: 0.98rem;
    color: #444;
    margin: 0.2rem 0 0 0;
    line-height: 1.5;
}
.ranking-table-section {
    margin-top: 0.5rem;
}
.ranking-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 1.05rem;
    background: #fff;
    border-radius: 0 0 14px 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(35,159,64,0.06);
}
.ranking-table th, .ranking-table td {
    padding: 0.65rem 0.5rem;
    text-align: left;
    font-family: 'Montserrat', sans-serif;
}
.ranking-table th {
    background: #239F40;
    color: #fff;
    font-weight: 900;
    border: none;
    font-size: 1.08rem;
    letter-spacing: 0.2px;
}
.ranking-table tr:nth-child(even) td {
    background: #f3f7f4;
}
.ranking-table tr:nth-child(odd) td {
    background: #fff;
}
.ranking-table td {
    border-bottom: 1px solid #e5e5e5;
    font-size: 1.05rem;
    font-weight: 700;
    color: #222;
}
.ranking-table td.rank {
    font-weight: 900;
    color: #239F40;
    font-size: 1.08rem;
}
.ranking-table tr:last-child td {
    border-bottom: none;
}
/* Badges para cambios de ranking */
.rank-change {
    font-size: 0.85rem;
    padding: 0.18rem 0.5rem;
    border-radius: 6px;
    font-weight: 700;
    margin-left: 0.3rem;
    background: #e8f5e9;
    color: #239F40;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    border: 1.5px solid #239F40;
}
.rank-change.down {
    background: #ffebee;
    color: #c62828;
    border-color: #c62828;
}
.rank-change.new {
    background: #e3f2fd;
    color: #1565c0;
    border-color: #1565c0;
}
.rank-change::before {
    content: '▲';
    margin-right: 2px;
}
.rank-change.down::before {
    content: '▼';
}
.rank-change.new::before {
    content: none;
}
.score-trend {
    font-size: 0.85rem;
    color: #239F40;
    margin-left: 0.2rem;
}
.score-trend.down {
    color: #c62828;
    transform: rotate(180deg);
}
.score-trend.none {
    display: none;
}