/* ============================================================
   John F. Brüne – Portfolio
   Rodrigo-Stil: Sans-Serif body, Georgia only for section banners
   ============================================================ */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #f2f4f4;
  color: #1a1a1a;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  max-width: 100vw;
  font-size: 1.0rem;
}

/* Prevent any child from exceeding viewport width */
img, iframe, .dash-graph, .js-plotly-plot {
  max-width: 100%;
}

/* Content area width */
.container, .container-lg, .container-md, .container-sm, .container-xl {
  max-width: 1140px !important;
}

/* ---------- Hero Section – clean sans-serif like Rodrigo ---------- */
.hero-section {
  background-color: #c8d4dc;
  padding: 80px 0 70px 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-greeting {
  font-style: normal;
  color: #9a9999;
  font-size: 3rem;
  font-weight: 400;
  margin-bottom: 4px;
}

.hero-name {
  font-weight: 700;
  color: #1a252f;
  font-size: 4rem;
  margin-bottom: 24px;
  line-height: 1.1;
}

.hero-bio {
  color: #1a1a1a;
  line-height: 1.8;
  font-size: 1.1rem;
  max-width: 580px;
  font-weight: 400;
}

/* ---------- Section Headers – Georgia serif, red italic (ONLY place serif is used) ---------- */
.section-banner {
  background-color: transparent;
  padding: 20px 40px 10px 40px;
  width: 100%;
  margin: 0;
  border-top: 3px solid #c0392b;
}

.section-banner h2 {
  color: #c0392b !important;
  font-family: Georgia, 'Times New Roman', serif !important;
  font-style: italic !important;
  text-align: center;
  font-size: 1.6rem;
  margin: 0;
  line-height: 1.6;
  font-weight: normal !important;
}

/* ---------- Content Sections ---------- */
.content-section {
  background-color: #f2f4f4;
  padding: 10px 0 30px 0;
}

.content-section-alt {
  background-color: #f2f4f4;
  padding: 10px 0 30px 0;
}

.about-section {
  background-color: #f2f4f4;
  padding: 0px 0 40px 0;
}

/* ---------- Typography inside sections – Playfair Display (Semafor/newspaper serif) ---------- */
.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  color: #1a252f;
  font-size: 1.05rem;
  margin-top: 20px;
  margin-bottom: 8px;
  font-weight: 700;
}

.section-body {
  font-family: 'Playfair Display', Georgia, serif;
  color: #1a1a1a;
  line-height: 1.8;
  font-size: 1.0rem;
  font-weight: 400;
  margin-bottom: 12px;
}

hr.section-divider {
  border-color: #c5d8e8;
  margin: 14px 0;
}

.control-label {
  font-size: 1.0rem;
  color: #6c757d;
  margin-bottom: 4px;
}

/* Bold dark chart-column subheadings */
.chart-col-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: normal;
  color: #1a1a1a;
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 12px;
  margin-bottom: 4px;
}

/* Highlighted data box */
.data-box {
  display: inline-block;
  background-color: #f0f3f5;
  border-left: 3px solid #c0392b;
  padding: 8px 14px;
  margin: 6px 4px 6px 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.0rem;
  color: #1a1a1a;
}

.data-box .data-box-value {
  font-weight: 700;
  font-size: 1.15rem;
  display: block;
  margin-bottom: 2px;
}

.data-box .data-box-label {
  font-size: 0.85rem;
  color: #6c757d;
  font-style: italic;
}

.chart-col-body {
  font-family: 'Playfair Display', Georgia, serif;
  color: #1a1a1a;
  font-size: 1.0rem;
  line-height: 1.8;
  margin-bottom: 8px;
}

/* ---------- DataTable ---------- */
.dash-table-container {
  overflow-x: auto;
  max-width: 100%;
}

.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner th {
  background-color: #232324 !important;
  color: #ffffff !important;
  font-weight: normal !important;
  font-style: italic !important;
  padding: 10px 8px !important;
  border: none !important;
  white-space: normal !important;
}

.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner td {
  color: #212529 !important;
  background-color: #ffffff !important;
  padding: 7px 6px !important;
  text-align: center;
  border-color: #dee2e6 !important;
  white-space: normal !important;
}

/* ---------- About / Profile ---------- */
.profile-img {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #c0392b;
  box-shadow: 0 4px 18px rgba(0,0,0,0.13);
  display: block;
  margin: 20px auto;
}

.skill-badge {
  display: inline-block;
  background-color: #1a252f;
  color: #ffffff;
  font-size: 0.88rem;
  padding: 4px 13px;
  border-radius: 14px;
  margin: 3px 4px 3px 0;
  font-weight: 500;
}

/* ---------- Education list ---------- */
.edu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.edu-list li {
  font-family: 'Playfair Display', Georgia, serif;
  color: #1a1a1a;
  padding: 6px 0;
  border-bottom: 1px solid #c5d8e8;
  font-size: 1.0rem;
}

.edu-list li:last-child { border-bottom: none; }
.edu-list li strong { color: #1a252f; }

/* ---------- Buttons ---------- */
.jb-btn {
  padding: 6px 14px;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
  margin-right: 6px;
  margin-top: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.15s, color 0.15s;
}

.jb-btn-outline {
  border: 1.5px solid #1a252f;
  color: #1a252f;
  background: transparent;
}

.jb-btn-outline:hover {
  background-color: #1a252f;
  color: #ffffff;
  text-decoration: none;
}

.jb-btn-primary {
  background-color: #c0392b;
  color: #ffffff;
  border: 1.5px solid #c0392b;
}

.jb-btn-primary:hover {
  background-color: #a93226;
  color: #ffffff;
  text-decoration: none;
}

.jb-btn-unibo {
  background-color: #BB2E29;
  color: #ffffff;
  border: 1.5px solid #BB2E29;
}

.jb-btn-unibo:hover {
  background-color: #9e2621;
  color: #ffffff;
  text-decoration: none;
}

.jb-btn-linkedin {
  background-color: #0077B5;
  color: #ffffff;
  border: 1.5px solid #0077B5;
}

.jb-btn-linkedin:hover {
  background-color: #005f8e;
  color: #ffffff;
  text-decoration: none;
}

/* ---------- Footer ---------- */
.jb-footer {
  background-color: #1a252f;
  padding: 22px;
  text-align: center;
  color: #adb5bd;
  font-size: 0.92rem;
}

/* ---------- Dropdowns ---------- */
.Select-control {
  border-radius: 6px !important;
  border-color: #b8cdd9 !important;
  background-color: #ffffff !important;
  height: 38px !important;
}

.Select-control:hover {
  border-color: #8aafc6 !important;
  box-shadow: 0 0 0 2px rgba(192,57,43,0.10) !important;
}

.Select-menu-outer {
  border-radius: 0 0 6px 6px !important;
  border-color: #b8cdd9 !important;
  font-size: 1.0rem !important;
}

.Select-option.is-focused {
  background-color: #fdf0ee !important;
  color: #c0392b !important;
}

.Select-option.is-selected {
  background-color: #c0392b !important;
  color: #ffffff !important;
}

.Select-placeholder, .Select-value-label {
  color: #3d5060 !important;
}

/* ---------- Parliament selector – pill button group ---------- */
.parliament-radio {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.parliament-radio label {
  padding: 5px 11px;
  border: 1.5px solid #b8cdd9;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  color: #3d5060;
  background: #ffffff;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.parliament-radio label:hover {
  border-color: #c0392b;
  color: #c0392b;
}

/* active pill — two selectors cover both Dash 1.x (input inside label)
   and Dash 2.x (input + label as siblings) */
.parliament-radio input:checked + label,
.parliament-radio label:has(input:checked) {
  background-color: #c0392b !important;
  border-color: #c0392b !important;
  color: #ffffff !important;
}

/* ---------- EP Group Composition Table ---------- */
.ep-group-table {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.ep-group-row {
  border-bottom: 1px solid #edf5fb;
  transition: background-color 0.1s;
}

.ep-group-row:hover {
  background-color: rgba(192, 57, 43, 0.05);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .hero-greeting { font-size: 2rem; }
  .hero-name    { font-size: 2.5rem; }
  .hero-bio     { font-size: 1rem; }
  .hero-section { padding: 70px 0 60px 0; min-height: 80vh; }
  .section-banner { padding: 30px 20px 8px 20px; }
  .section-banner h2 { font-size: 1.2rem; }
}

/* ---------- Simulator view toggle ---------- */
.sim-view-radio {
  display: inline-flex;
  gap: 6px;
  background: #f0f3f5;
  border-radius: 20px;
  padding: 3px;
}

.sim-view-radio label {
  padding: 5px 14px;
  border-radius: 16px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 500;
  color: #5a6e7a;
  background: transparent;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.sim-view-radio label:hover {
  color: #1a252f;
}

.sim-view-radio input:checked + label,
.sim-view-radio label:has(input:checked) {
  background: #ffffff !important;
  color: #1a252f !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12) !important;
  font-weight: 600 !important;
}
