:root {
    font-size: calc(0.5em + 1vw);

    --menus-height: 30px;
    --logo-height: 60px;  
    --bureau-height: 115px;  
    --title-height: 40px;

    --country-width: 490px;  /* Combined width for country data columns */
}

body {
  font-family: "Source Sans 3", sans-serif;
  font-weight: 500;
}

a,
a:visited,
a:hover,
a:focus,
a:active {
  text-decoration: none;
}

.container {
    display: grid;
    grid-template-areas:
        "logo           menus           menus"
        "logo           filters         filters"
        "chart-bureau   chart-sector    chart-sector"
        "chart-country  title-story     title-story"
        "chart-country  chart-story     chart-story";
        
    grid-template-columns: var(--country-width) 1fr 1fr;
    grid-template-rows: var(--menus-height) var(--logo-height) var(--bureau-height) var(--title-height) 1fr;
    gap: 10px 20px;
    margin: 3px;
    height: 100vh;
    width: calc(100vw - 20px);
    overflow: hidden;
}

#logo {
    grid-area: logo;
    font-size: 38px;
    font-weight: 700; 
    margin-top: 0;

    fill: rgb(6, 15, 240); 
}

#logo h1 {
    margin: 0;
}

#menus {
    grid-area: menus;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 24px;
    padding-right: 30px;
}

#menu-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

#menus a {
    color: #333;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
}

#menus a:hover {
    color: #0000CC;
}

#filters {
    grid-area: filters;
}

#title-story {
    grid-area: title-story;
    display: flex;
    align-items: flex-end;
    font-size: 14px;
    font-weight: 600;
}

#chart-sector {
    grid-area: chart-sector;
    overflow-y: auto;
}

#chart-bureau {
    grid-area: chart-bureau;
}

#chart-country {
    grid-area: chart-country;
    overflow-y: auto;
}

#chart-story {
    grid-area: chart-story;
    overflow-y: auto;
}

#chart-topic, #chart-country {
    font-weight: 500;
    font-size: 16px;
}

/* Country data table header - aligned with title-story row */
.country-header {
    display: grid;
    grid-template-columns: 150px 120px 120px 10px;
    font-weight: 600;
    font-size: 18px;
    height: var(--title-height);
    align-items: flex-end;
    padding-bottom: 5px;
    border-bottom: 1px solid #ccc;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

/* Country data row */
.country-row {
    display: grid;
    grid-template-columns: 150px 120px 120px 10px;
    height: 22px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
}

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

.country-row.country-active {
    background-color: #0052a3;
    color: white;
}

.country-row.country-active:hover {
    background-color: #003d7a;
}

.country-row.country-active .country-cell-name {
    color: white;
}

.country-row.country-active .country-bar-label {
    color: white !important;
}

/* Country row cells */
.country-cell {
    display: flex;
    align-items: center;
    height: 20px;
    margin-bottom: 2px;
    overflow: hidden;
}

.country-cell-name {
    font-weight: 500;
    font-size: 16px;
    padding-left: 4px;
}

.country-cell-bar {
    position: relative;
    height: 20px;
    overflow: hidden;
}

.country-bar {
    height: 20px;
    background-color: #9ecae1;
    max-width: 100%;
}

.country-bar-stories {
    height: 20px;
    background-color: #bbb;
    max-width: 100%;
}

.country-bar-label {
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 500;
    color: #333;
}
