/* === 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: 800px;         /* 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;
  }
}