/* CSS Variables for easy color customization */
:root {
  --primary-color: #003865; /* Modra po diskusii 14.7 */
  --primary-dark: #001c33;
  --primary-light: #6ea2d5;
  --secondary-color: #266eaa;
  --text-dark: #333333;
  --text-light: #666666;
  --background-light: #f8f9fa;
  --white: #ffffff;
  --shadow: rgba(0, 0, 0, 0.1);
  --shadow-dark: rgba(0, 0, 0, 0.2);
}

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
  /* Slightly larger base font size for better readability */
  font-size: 112.5%; /* 18px */
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 15px;
  color: var(--secondary-color);
}

.section-subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 50px;
}

/* Navigation */
.navbar {
  background: var(--white);
  box-shadow: 0 2px 10px var(--shadow);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  padding: 15px 20px;
}

.nav-brand h2 {
  color: var(--primary-color);
  font-size: 1.8rem;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-link {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: color 0.3s ease;
  padding: 5px 0;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--primary-color);
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--primary-color);
  transition: all 0.3s ease;
}

/* Hero Section */
.hero {
  margin-top: 60px;
  background: var(--primary-color);
}

.hero-image {
  display: block;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

/* Achievements Section */
.achievements {
  background: var(--background-light);
}

.carousel {
  position: relative;
}

.carousel[hidden] {
  display: none;
}

.carousel-container {
  display: flex;
  width: 100%;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 20px 0;
  scrollbar-width: none;
}

.carousel-container::-webkit-scrollbar {
  display: none;
}

.project-card {
  min-width: 350px;
  background: var(--white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px var(--shadow);
  transition: transform 0.3s ease;
}

.project-card:hover {
  transform: translateY(-10px);
}

.project-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--primary-light);
}

.project-content {
  padding: 20px;
}

.project-content h3 {
  color: var(--secondary-color);
  margin-bottom: 10px;
}

.project-content p {
  color: var(--text-light);
  line-height: 1.6;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  z-index: 2;
  background: var(--primary-color);
  color: var(--white);
  border: none;
  width: 60px;
  height: 60px;
  flex: 0 0 60px;
  border-radius: 50%;
  font-size: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px var(--shadow);
  transform: translateY(-50%);
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

.carousel-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-50%) scale(1.1);
}

.project-year {
  display: inline-block;
  color: var(--primary-color);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag {
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  white-space: nowrap;
}

/* Toggle between carousel and full list of achievements */
.achievements-toggle {
  text-align: center;
  margin-top: 30px;
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  cursor: pointer;
}

.btn-outline:hover {
  background: var(--primary-color);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px var(--shadow-dark);
}

.achievements-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.achievements-list[hidden] {
  display: none;
}

.achievement-list-item {
  background: var(--white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px var(--shadow);
  transition: transform 0.3s ease;
}

.achievement-list-item:hover {
  transform: translateY(-5px);
}

.achievement-list-item .project-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--primary-light);
}

.achievement-list-item .project-content {
  padding: 20px;
}

.achievement-list-item .project-content h3 {
  color: var(--secondary-color);
  margin-bottom: 10px;
}

.achievement-list-item .project-content p {
  color: var(--text-light);
  line-height: 1.6;
}

/* Plans Section */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.plan-card {
  background: var(--white);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 5px 15px var(--shadow);
  transition: all 0.3s ease;
  border-left: 5px solid var(--primary-color);
}

.plan-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px var(--shadow-dark);
}

.plan-number {
  display: inline-block;
  background: var(--primary-color);
  color: var(--white);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 15px;
}

.plan-card h3 {
  color: var(--secondary-color);
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.plan-card p {
  color: var(--text-light);
  line-height: 1.6;
}

/* Wraps the number + title so the whole header can act as a toggle on
   small screens. On wider screens it is a plain inert block and the card
   looks unchanged. */
.plan-card-toggle {
  display: block;
  width: 100%;
  padding: 0;
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: default;
}

.plan-toggle-chevron {
  display: none;
}

/* Candidates Section */
.candidates {
  background: var(--background-light);
}

.candidate-subsection {
  margin-bottom: 60px;
}

.candidate-subsection:last-child {
  margin-bottom: 0;
}

.candidate-subsection-title {
  font-size: 1.6rem;
  color: var(--secondary-color);
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--primary-color);
  display: inline-block;
  left: 50%;
  position: relative;
  transform: translateX(-50%);
}

.mayor-candidate {
  display: flex;
  align-items: center;
  gap: 40px;
  max-width: 800px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px var(--shadow);
  padding: 30px;
}

.mayor-candidate-image {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 5px 15px var(--shadow);
}

.mayor-candidate-info .candidate-name {
  padding: 0;
  color: var(--primary-color);
  font-size: 1.7rem;
  margin-bottom: 8px;
}

.mayor-candidate-info .candidate-info {
  padding: 0;
  color: var(--primary-dark);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.mayor-candidate-info .candidate-bio {
  padding: 0;
  color: var(--text-light);
  line-height: 1.6;
}

.candidates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

@media (min-width: 769px) and (max-width: 1199px) {
  .candidates-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1200px) {
  .candidates-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.candidates-grid-single {
  max-width: 300px;
  margin: 0 auto;
}

.candidate-card {
  background: var(--white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px var(--shadow);
  transition: all 0.3s ease;
  text-align: center;
}

.candidate-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 25px var(--shadow-dark);
}

.candidate-image {
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: center top;
  background: var(--primary-light);
  display: block;
}

.candidate-image-wrap {
  position: relative;
}

.candidate-number {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
  color: var(--primary-color);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 3px 10px var(--shadow-dark);
}

.candidate-name {
  padding: 20px 20px 10px;
  color: var(--primary-color);
  font-size: 1.5rem;
}

.candidate-info {
  padding: 0 20px 8px;
  color: var(--primary-dark);
  font-size: 0.85rem;
  font-weight: 600;
}

.candidate-bio {
  padding: 0 20px 20px;
  color: var(--text-light);
  line-height: 1.6;
}

.candidate-card-footer {
  padding: 16px 20px;
  text-align: center;
}

.candidate-more-link {
  display: inline-block;
  background: none;
  border: none;
  padding: 0;
  color: var(--primary-color);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
}

.candidate-more-link:hover {
  color: var(--primary-dark);
}

.candidate-action {
  margin-top: 20px;
}

/* Candidate Detail Section */
.candidate-detail {
  position: relative;
  max-width: 900px;
  margin: 0 auto 40px;
  background: var(--white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px var(--shadow);
  padding: 40px;
}

.candidate-detail[hidden] {
  display: none;
}

.candidate-detail-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--text-light);
  cursor: pointer;
}

.candidate-detail-close:hover {
  color: var(--primary-color);
}

.candidate-detail-header {
  display: flex;
  align-items: center;
  gap: 30px;
}

.candidate-detail-image {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 5px 15px var(--shadow);
}

.candidate-detail-intro .candidate-name {
  padding: 0;
  color: var(--primary-color);
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.candidate-detail-intro .candidate-info {
  padding: 0;
  color: var(--primary-dark);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.candidate-detail-intro .candidate-bio {
  padding: 0;
}

.candidate-detail-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.detail-section h5 {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-light);
}

.detail-section p {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 15px;
}

.experience-list {
  list-style: none;
  list-style-type: disc;
  padding: 0;
  margin: 0 0 0 20px;
}

.priority-list li {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 20px;
  padding-left: 30px;
  position: relative;
}

.priority-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.priority-list li {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 20px;
  padding-left: 30px;
  position: relative;
}

.priority-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
  font-size: 1.3rem;
}

.priority-list li strong {
  color: var(--text-dark);
}

.candidate-detail .candidate-action {
  text-align: center;
  margin-top: 30px;
  padding-top: 30px;
  border-top: 2px solid var(--background-light);
}

.account-box {
  max-width: 600px;
  margin: 0 auto;
  background: var(--white);
  padding: 50px;
  border-radius: 20px;
  box-shadow: 0 10px 30px var(--shadow);
  text-align: center;
}

.account-icon {
  display: inline-block;
  width: 80px;
  height: 80px;
  background: var(--primary-light);
  border-radius: 50%;
  padding: 20px;
  margin-bottom: 20px;
}

.account-icon svg {
  width: 100%;
  height: 100%;
  color: var(--primary-color);
}

.account-box h3 {
  color: var(--secondary-color);
  font-size: 2rem;
  margin-bottom: 15px;
}

.account-number {
  font-size: 1.3rem;
  color: var(--text-dark);
  font-weight: 600;
  margin: 20px 0;
  padding: 15px;
  background: var(--background-light);
  border-radius: 10px;
}

.btn {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  transition: all 0.3s ease;
  margin: 20px 0;
}

.btn-primary {
  background: var(--primary-color);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px var(--shadow-dark);
}

.account-note {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-top: 20px;
}

/* Footer */
.footer {
  background: var(--secondary-color);
  color: var(--white);
  padding: 50px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 30px;
}

.footer-section h3,
.footer-section h4 {
  margin-bottom: 15px;
  color: var(--primary-color);
}

.footer-section p {
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.8);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

/* Nav collapses into hamburger well before the rest of the mobile styles:
   the brand "Spolu dosiahneme viac" plus the five long Slovak menu labels
   only fit on one comfortably-spaced row near the 1200px container width,
   so below that the menu moves into the hamburger. */
@media (max-width: 1200px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 60px;
    flex-direction: column;
    background: var(--white);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px var(--shadow);
    padding: 20px 0;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-menu .nav-link {
    display: block;
    font-size: 1.3rem;
    padding: 14px 0;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .section-title {
    font-size: 2rem;
  }

  .carousel-btn {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
    font-size: 1.5rem;
  }

  .project-card {
    min-width: 100%;
  }

  .plans-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  /* Collapsed goal list: show only the titles, reveal a description on tap. */
  .plan-card {
    padding: 0;
    border-radius: 12px;
  }

  .plan-card:hover {
    transform: none;
  }

  .plan-card-toggle {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 18px;
    cursor: pointer;
  }

  .plan-card .plan-number {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .plan-card-toggle h3 {
    flex: 1;
    margin-bottom: 0;
    font-size: 1.1rem;
  }

  .plan-toggle-chevron {
    display: block;
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    margin-right: 4px;
    border-right: 2px solid var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    transform: rotate(45deg);
    transition: transform 0.3s ease;
  }

  .plan-card.is-open .plan-toggle-chevron {
    transform: rotate(-135deg);
  }

  .plan-card p {
    display: none;
    padding: 0 18px 18px 71px;
  }

  .plan-card.is-open p {
    display: block;
  }

  .mayor-candidate {
    flex-direction: column;
    text-align: center;
    gap: 20px;
    padding: 20px;
  }

  .candidate-detail {
    padding: 25px 20px;
  }

  .candidate-detail-header {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .candidate-detail-image {
    width: 160px;
    height: 160px;
  }

  .detail-section h5 {
    font-size: 1.3rem;
  }

  .priority-list li {
    padding-left: 25px;
    font-size: 0.95rem;
  }

  .account-box {
    padding: 30px 20px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 480px) {
  .year-selector {
    gap: 5px;
  }

  .year-btn {
    padding: 8px 15px;
    font-size: 0.9rem;
  }

  .project-card {
    min-width: 250px;
  }
}
