/* === RESET === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden; /* Prevent horizontal scrollbar */
  width: 100%;
  height: 100%;
}

body {
  position: relative;
  font-family: "Segoe UI", sans-serif;
  background: #fff;
  color: #000;
  line-height: 1.6;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

img, video, iframe {
  max-width: 100%;
  height: auto;
  display: block; /* Prevent inline elements from causing overflow */
}

/* === TOPBAR === */
.topbar {
  background-color: #002f6c;
  color: white;
  font-size: 14px;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
  padding: 0 20px;
}

.topbar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
}

.topbar-left {
  font-weight: bold;
}

.topbar-right {
  font-size: 1.2em;
}

.toggle-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.5em;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.toggle-btn.rotate {
  transform: rotate(180deg);
}

/* Expandable content */
.expandable-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
  background-color: #002f6c;
}

.expandable-content.show {
  max-height: 500px; /* adjust as needed */
}

/* Inner columns */
.topbar-content {
  display: flex;
  flex-direction: row;
  gap: 40px;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.topbar-column {
  flex: 1;
  min-width: 300px;
}

.topbar-column h4 {
  color: white;
  margin-bottom: 10px;
}

.topbar-column p {
  color: white;
  line-height: 1.5;
}

.topbar-column a {
  color: #9ddcff;
  text-decoration: underline;
}

/* === HEADER === */
.site-header {
  background: #fff;
  border-bottom: 1px solid #ccc;
  padding: 15px 0;
}
.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  height: 60px;
  margin-right: 15px;
}
.title h1 {
  font-size: 24px;
  color: #153a75;
}
.title p {
  font-size: 14px;
  color: #666;
}
.search-form {
  display: flex;
  gap: 5px;
}
.search-form input {
  padding: 6px 10px;
  border: 1px solid #aaa;
  border-radius: 2px;
}
.search-form button {
  background-color: #153a75;
  color: white;
  border: none;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 2px;
}

/* === NAVIGATION === */
.main-nav {
  background: #f0f0f0;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
}
.main-nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
  padding: 10px 0;
  justify-content: center;
}
.main-nav a {
  text-decoration: none;
  color: #000;
  font-weight: bold;
  font-size: 18px;
  transition: color 0.2s;
}
.main-nav a:hover {
  color: #153a75;
}

/* === SECTION TITLE === */
.section-title {
  margin: 30px 0 20px;
  font-size: 24px;
  border-bottom: 2px solid #153a75;
  padding-bottom: 5px;
}

/* === NEWS GRID === */
.news-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}
.news-main img {
  width: 100%;
  border-radius: 4px;
}
.news-main .news-text {
  padding: 10px 0;
}
.news-main .date {
  font-size: 13px;
  color: #666;
  margin-bottom: 5px;
}
.news-main h a3 {
  color: #153a75;
  text-decoration: none;
  font-size: 18px;
}
.news-main h3 a:hover {
  text-decoration: underline;
}
.video-tag {
  background-color: #c00;
  color: white;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 6px;
}

.news-side article {
  margin-bottom: 20px;
}
.news-side img {
  width: 100%;
  border-radius: 4px;
  margin-bottom: 5px;
}
.news-side .date {
  font-size: 13px;
  color: #666;
  margin-bottom: 3px;
}
.news-side a {
  text-decoration: none;
  color: #153a75;
  font-weight: 500;
}
.news-side a:hover {
  text-decoration: underline;
}

/* === FOOTER === */
footer {
  background-color: #f2f2f2;
  padding: 20px 0;
  text-align: center;
  font-size: 14px;
  color: #666;
  margin-top: 40px;
}

/* === DROPDOWN MENU === */
.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)); /* Gradient for depth */
  padding: 10px 0;
  list-style: none;
  border-radius: 20px; /* More rounded corners */
  min-width: 240px; /* increased from 180px */
  box-shadow: 0 4px 8px rgba(0,0,0,0.15); /* Subtle shadow */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease;
  z-index: 1000; /* Higher than anything else */
  overflow: visible !important; /* Force ignore parent overflows */
  clip-path: none !important; /* Prevent clipping */
  white-space: nowrap; /* prevents text from wrapping */
  transform: scale(0.95); /* Start slightly smaller */
  transform-origin: top center; /* Origin from the top */
  backdrop-filter: blur(5px); /* Blur effect for glassy look */
  border: 1px solid rgba(255, 255, 255, 0.2); /* Subtle border */
}

/* Visible when active */
.dropdown-menu.active {
  display: block;
  opacity: 1;
  visibility: visible;
  z-index: 2;
  animation: openMenu 0.4s ease forwards;
}

.dropdown-menu li {
  position: relative;
  padding: 8px 20px;
  transition: none; /* Ensure smooth transition */
}

.dropdown-menu li a {
  color: #002f6c; /* Blue text */
  text-decoration: none;
  display: block;
  position: relative;
  z-index: 4;
}

/* Highlight Pill */
.highlight-pill {
  position: absolute;
  top: 0;
  width: 120%; /* Make the pill wider */
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 47, 108, 0.2) 0%, rgba(0, 47, 108, 0.1) 100%); /* Blue gradient */
  border-radius: 20px;
  pointer-events: none; /* Ensure it doesn't interfere with clicks */
  transition: transform 0.4s ease, opacity 0.4s ease;
  transform: scale(0.9) translateX(-50%); /* Slightly smaller to create a liquid effect and center it */
  box-shadow: 0 2px 4px rgba(0, 47, 108, 0.3); /* Subtle shadow for depth */
  backdrop-filter: blur(10px); /* Increase the blur effect for a glassy look */
  z-index: 3; /* Ensure it is below the text */
}

/* Inflate animation */
@keyframes openMenu {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Close animation */
@keyframes closeMenu {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

/* === FLAG LINE === */
.flag-line {
  height: 4px;
  background: repeating-linear-gradient(
    to right,
    white 0,
    white 10px,
    #002f6c 10px,
    #002f6c 20px,
    #ee1c25 20px,
    #ee1c25 30px
  );
}

.flag-line::before,
.flag-line::after,
.flag-line div {
  content: "";
  flex: 1;
  height: 100%;
}

.flag-line div:nth-child(1) {
  background-color: white;
}
.flag-line div:nth-child(2) {
  background-color: #002f6c; /* Dark blue */
}
.flag-line div:nth-child(3) {
  background-color: #ee1c25; /* Red */
}

/* === GOVERNMENT SECTION === */
.gov-section {
  font-size: 16px;
  line-height: 1.8;
}

.gov-section h2 {
  margin-top: 25px;
  font-size: 20px;
  color: #153a75;
  border-bottom: 1px solid #ccc;
  padding-bottom: 5px;
}

.gov-section ul {
  list-style: disc;
  padding-left: 20px;
  margin-top: 10px;
}

.gov-section li {
  margin-bottom: 5px;
}

.breadcrumbs {
  font-size: 14px;
  color: #6b6b6b;
  margin: 20px auto;
  max-width: 900px;
}

.breadcrumbs a {
  color: #0071ce;
  text-decoration: none;
}

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

.gov-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  font-family: "Segoe UI", sans-serif;
}

.gov-wrapper h1 {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 20px;
}

.gov-wrapper p {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.gov-wrapper a {
  color: #3b46ce;
  text-decoration: underline;
}

.link-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px 60px;
  border-top: 1px solid #ddd;
  padding-top: 20px;
  margin-top: 20px;
}

.link-grid a {
  color: #3b46ce;
  font-weight: 500;
  text-decoration: underline;
  display: inline-block;
  padding-bottom: 5px;
  border-bottom: 1px solid #ddd;
}

.link-grid a:hover {
  text-decoration: none;
  border-bottom: 1px solid #3b46ce;
}

.vlada-section {
  padding: 50px 20px;
  background-color: white;
  font-family: 'Segoe UI', sans-serif;
}

.vlada-section .container {
  max-width: 1200px;
  margin: 0 auto;
}

.vlada-section h1 {
  font-size: 38px;
  font-weight: bold;
  margin-bottom: 40px;
}

.profile-box {
  display: flex;
  align-items: center;
  gap: 40px;
}

.profile-photo {
  width: 300px;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.profile-text h2 {
  font-size: 30px;
  margin: 0 0 10px;
}

.profile-text .function {
  font-size: 18px;
  color: #6c757d;
  margin-bottom: 20px;
}

.more-btn {
  display: inline-block;
  padding: 12px 24px;
  background-color: #005aa7;
  color: white;
  text-decoration: none;
  border-radius: 3px;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.more-btn:hover {
  background-color: #00437e;
}

.pm-section {
  font-family: Arial, sans-serif;
  max-width: 500px;         /* Limit šírky na 800px */
  margin: 0 auto 40px auto; /* Vycentrovanie sekcie na stred stránky + odstup zdola */
  padding: 20px;
  color: #333;
}

.pm-profile {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 30px;
  align-items: center;      /* VERTIKÁLNE VYCENTROVANIE TEXTU VOČI FOTKE */
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.pm-photo {
  flex-shrink: 0;           /* Fotka sa nebude zmenšovať */
  width: 275px;
}

.pm-photo img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid #ddd;
  display: block;
}

.pm-basic-info {
  flex-grow: 1;
  min-width: 0;
}

.pm-basic-info h2 {
  margin: 0 0 10px 0;       /* Žiadny horný margin, aby center fungoval presne */
  color: #222;
}

.pm-basic-info p {
  margin: 8px 0;
  color: #555;
  line-height: 1.5;         /* Lepšia čitateľnosť textu */
}

/* Nadpisy sekcií (Koordinátor, Predseda) */
.pm-section h1 {
  text-align: left;       /* Vycentruje hlavný nadpis nad profilom */
  margin-bottom: 20px;
  font-size: 1.8rem;
  color: #000;
}

.info-table {
  margin-bottom: 40px;
}

.info-table h3 {
  color: #333;
  border-bottom: 2px solid #ddd;
  padding-bottom: 8px;
  margin-bottom: 15px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
}

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

th {
  background-color: #f8f8f8;
  font-weight: bold;
}

tr:hover {
  background-color: #f5f5f5;
}

@media (max-width: 600px) {
  .pm-profile {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  th, td {
    padding: 8px 10px;
    font-size: 14px;
  }
}

.financial-overview {
  background-color: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
  text-align: center;
}

.financial-overview h2 {
  margin-bottom: 20px;
  color: #333;
}

.financial-stats {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.stat-item {
  flex: 1 1 200px;
  background-color: #fff;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);

  display: flex; /* icon + text side by side */
  align-items: center; /* vertically center icon with text */
  justify-content: center;
  gap: 10px;
}

.text-block {
  display: flex;
  flex-direction: column; /* label above amount */
  align-items: center; /* center text horizontally */
}

.stat-item .icon {
  font-size: 32px;
}

.stat-item .green {
  color: #4CAF50;
}

.stat-item .red {
  color: #F44336;
}

.stat-item .blue {
  color: #2196F3;
}

.stat-item .label {
  font-size: 16px;
  color: #555;
}

.stat-item .amount {
  font-size: 20px;
  color: #333;
}

/* === MOBILE / RESPONSIVE TWEAKS === */

/* Hamburger button (hidden on desktop) */
.nav-toggle {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  display: none; /* hidden on desktop */
  color: #002f6c;
  padding: 10px 15px;
}

/* Legislative Tracker Styles */
.legislative-tracker {
    margin-top: 40px;
    background: #fff;
    padding: 25px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.legislative-tracker h2 {
    color: #003366;
    border-bottom: 2px solid #003366;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.table-container {
    overflow-x: auto;
}

#trackerTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

#trackerTable th {
    background-color: #f8f9fa;
    color: #333;
    text-align: left;
    padding: 12px;
    border-bottom: 2px solid #003366;
    text-transform: uppercase;
    font-size: 0.8rem;
}

#trackerTable td {
    padding: 15px 12px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

#trackerTable tr:hover {
    background-color: #f1f5f9;
}

/* Status Badges - Slovak Parliament Style */
.badge {
    padding: 4px 10px;
    border-radius: 2px;
    font-size: 0.8rem;
    font-weight: bold;
    display: inline-block;
}

.badge-reading { background-color: #cfe2ff; color: #084298; border: 1px solid #b6d4fe; }
.badge-signed { background-color: #d1e7dd; color: #0f5132; border: 1px solid #badbcc; }
.badge-committee { background-color: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.badge-rejected { background-color: #f8d7da; color: #842029; border: 1px solid #f5c2c7; }

/* Styling for the Bill Links */
.bill-link {
    color: #003366;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease-in-out;
}

.bill-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.bill-link i {
    margin-left: 5px;
    font-size: 0.9em;
    color: #d9534f; /* Red-ish for PDF icon */
}

/* Linear Progress Tracker in Table */
.progress-track {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    width: 300px; /* Controlled width for table cell */
    padding-top: 15px;
}

.progress-track::before {
    content: '';
    position: absolute;
    top: 21px;
    left: 10px;
    right: 10px;
    height: 2px;
    background: #e9ecef;
    z-index: 1;
}

.step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dot {
    width: 12px;
    height: 12px;
    background: #fff;
    border: 2px solid #dee2e6;
    border-radius: 50%;
    margin-bottom: 4px;
}

.label {
    font-size: 0.65rem;
    color: #adb5bd;
    font-weight: bold;
    text-transform: uppercase;
}

/* State: Finished */
.step.finished .dot {
    background: #28a745;
    border-color: #28a745;
}
.step.finished .label {
    color: #28a745;
}

/* State: Active (Current Step) */
.step.active .dot {
    background: #003366;
    border-color: #003366;
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.15);
}
.step.active .label {
    color: #003366;
}

@media (max-width: 768px) {
  /* Show hamburger on mobile */
  .nav-toggle {
    display: block;
  }

  /* Hide nav by default on mobile */
  .main-nav {
    display: none;
    background: #f0f0f0; /* match your existing nav background */
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
  }

  /* Show nav when toggled */
  .main-nav.active {
    display: block;
  }

  /* Stack menu items vertically */
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0;
    align-items: stretch;
  }

  .main-nav li {
    width: 100%;
    border-top: 1px solid #ddd;
  }

  .main-nav a {
    display: block;
    padding: 12px 16px;
    font-size: 16px;
    text-align: center;
  }

  /* Header adjustments */
  .header-content {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  .logo {
    height: 50px;
    margin: 0 auto;
  }

  /* Search form adjustments */
  .search-form {
    flex-direction: column;
    width: 100%;
  }

  .search-form input,
  .search-form button {
    width: 100%;
  }

  /* Topbar columns: stack instead of side-by-side */
  .topbar-content {
    flex-direction: column;
    gap: 20px;
    padding: 10px;
  }

  /* News grid: single column */
  .news-grid {
    grid-template-columns: 1fr;
  }

  /* Profile section adjustments */
  .profile-box {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .profile-photo {
    width: 100%;
    max-width: 250px;
    margin: 0 auto;
  }
}
.vote-modal {
  display: none; /* Skryté pri štarte */
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 20, 40, 0.7);
  backdrop-filter: blur(8px);
  align-items: center; /* Flex centrovanie */
  justify-content: center;
}

/* OKNO POPUPU */
.vote-modal-content {
    background-color: #ffffff;
    width: 95%;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden; /* Aby zaoblené rohy fungovali aj na hlavičke */
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* HLAVIČKA MODALU */
.vote-modal-header {
    background-color: #003366;
    color: white;
    padding: 18px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vote-modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.close-modal {
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    transition: 0.2s;
}

.close-modal:hover {
    color: white;
}

/* TABUĽKA / ZOZNAM */
#voteList {
    padding: 10px 0;
    max-height: 60vh;
    overflow-y: auto;
}

.vote-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    border-bottom: 1px solid #f0f2f5;
    transition: background 0.2s;
}

.vote-row:last-child {
    border-bottom: none;
}

.vote-row:hover {
    background-color: #f9fbff;
}

.vote-subject {
    color: #333;
    font-weight: 500;
    flex: 1;
    padding-right: 15px;
}

/* ŠTÝLOVÉ TAGY (ZA/PROTI) */
.vote-tag {
    font-size: 0.75rem;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 6px;
    text-transform: uppercase;
    min-width: 65px;
    text-align: center;
    border: 1px solid transparent;
}

.tag-za { 
    background: #e6ffed; 
    color: #1a7f37; 
    border-color: #acf2bd;
}

.tag-proti { 
    background: #ffeef0; 
    color: #cf222e; 
    border-color: #fdb3b9;
}

.tag-zdrzal { 
    background: #fff8c5; 
    color: #9a6700; 
    border-color: #f7e07a;
}

.tag-tajne { 
    background: #f3f4f6; 
    color: #57606a; 
    border-color: #d0d7de;
}
/* Tlačidlo v profile člena */
.vote-info-btn {
    background-color: #003366; /* Vaša parlamentná modrá */
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Efekt pri prejdení myšou */
.vote-info-btn:hover {
    background-color: #004a94;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.3);
}

/* Efekt pri kliknutí */
.vote-info-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 51, 102, 0.2);
}

/* Responzivita pre mobily */
@media (max-width: 480px) {
    .vote-info-btn {
        width: 100%; /* Na mobile bude cez celú šírku profilu */
        justify-content: center;
        padding: 12px;
    }
}

/* Kontajner pre celú hierarchiu */
.cabinet-container {
  max-width: 1200px; /* Rozšírime, aby sa zmestil grid */
  margin: 0 auto;
  padding: 20px;
}

/* Level 1 - Predseda (Najväčší) */
.level-1 .pm-section {
  max-width: 500px;
  background: #fcfcfc;
  border: 2px solid #eee;
  border-radius: 8px;
  justify-content: center;
}

/* Level 2 - Podpredseda */
.level-2 .pm-section {
  max-width: 750px;
  opacity: 0.95;
}

/* Mriežka pre predsedov výborov */
.executive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 20px;
}

/* Úprava profilu pre členov výborov (menšie fotky, aby sa zmestili vedľa seba) */
.committee-member.pm-section {
  max-width: 100% !important;
  border: 1px solid #ddd;
  background: white;
}

.committee-member .pm-photo {
  width: 150px; /* Zmenšená fotka pre výbory */
}

.committee-member .pm-section h1 {
  font-size: 1.3rem; /* Menší nadpis pre výbor */
}

/* Oddeľovač */
.hierarchy-divider {
  border: 0;
  height: 2px;
  background: #eee;
  margin: 50px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 30px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #777;
}

/* Responzivita pre mobily */
@media (max-width: 768px) {
  .pm-profile {
    flex-direction: column;
    text-align: center;
  }
  .executive-grid {
    grid-template-columns: 1fr;
  }
}

:root {
  --line-color: #000;
  --node-width: 250px;
  --photo-size: 250px;
  /* Pomocná hodnota pre stred fotky: (250px / 2) = 125px */
}

.org-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px;
  background: white;
}

/* Karta */
.node {
  width: var(--node-width);
  text-align: center;
  position: relative;
  z-index: 5;
}

.photo-wrapper {
  width: var(--node-width);
  height: var(--photo-size);
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: 12px; /* Trochu väčšia medzera pod veľkou fotkou */
}

.photo-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* HLAVNÝ STROM (Trunk) */
.main-trunk {
  position: relative;
  width: 2px;
  height: 500px; /* Upravené na 500px, aby to nebolo príliš dlhé pri veľkých fotkách */
  background: var(--line-color);
  margin: 0 auto;
}

/* Odbočka pre Podpredsedu */
.side-branch {
  position: absolute;
  top: 50%; 
  left: 0;
  width: 100px; /* Dĺžka vodorovnej čiary od kmeňa */
  border-top: 2px solid var(--line-color);
}

.side-branch .node {
  position: absolute;
  left: 100px; /* Musí sedieť s width .side-branch */
  /* PREPOČET: Stred fotky (125px) + polovica hrúbky čiary */
  top: -125px;  
}

/* Horný riadok */
.top-row {
  display: flex;
  gap: 150px; /* Zväčšený gap kvôli širším fotkám */
  margin-bottom: 0;
}

/* Bodkovaná čiara k učiteľovi (Koordinátorovi) */
.chair { position: relative; }
.chair::after {
  content: "";
  position: absolute;
  /* PREPOČET: 125px od vrchu fotky je presný stred */
  top: 125px;
  right: -150px; /* Musí sedieť s gapom v .top-row */
  width: 150px;
  border-top: 2px dotted var(--line-color);
  z-index: 1;
}

/* Spodný rad výborov */
.bottom-row {
  display: flex;
  gap: 30px;
  border-top: 2px solid var(--line-color);
  padding-top: 50px;
  position: relative;
}

/* Paličky nad výbormi */
.committee::before {
  content: "";
  position: absolute;
  top: -52px; /* Musí sa dotknúť border-topu .bottom-row */
  left: 50%;
  width: 2px;
  height: 50px;
  background: var(--line-color);
}

/* Farby borderov */
.chair img { border: 4px solid #e74c3c; }
.coordinator img { border: 4px solid #2ecc71; }
.vice-chair img { border: 4px solid #9b59b6; }
.committee img { border: 3px solid #3498db; }