/* Globálna náhrada fontu */
html, body {
    font-family: "Inter", "Helvetica Neue", Arial, sans-serif !important;
}

/* Heading rendering normalization */
h1, h2, h3, h4, h5, h6 {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-synthesis: none; /* prevent synthetic bold/italic differences */
}

/* Pre istotu pre nadpisy a hero */
h1, h2, h3, h4, h5, h6,
.hero, .t4-hero, .masthead,
.page-title, .site-title, .logo-text {
    font-family: "Inter", "Helvetica Neue", Arial, sans-serif !important;
}

/* ----------- */

/* Fix MastHead */
.t4-masthead {
    padding-left: 0px;
    padding-right: 0px;
}


/* --- Štýly pre výpis výziev --- */

/* Header sekcia */
.ed-head {
  margin: 2rem 0 1.5rem 0;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e5e5e5;
}

/* Filter sekcia */
.ed-filter {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 250px;
}

.filter-group label {
  font-weight: 600;
  color: #2c3e50;
  font-size: 1rem;
  margin: 0;
  white-space: nowrap;
}

.filter-group select {
  padding: 0.5rem 2rem 0.5rem 1rem;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  background: #fff;
  color: #495057;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
  min-width: 180px;
}

.filter-group select:hover {
  border-color: #3f7e9d;
}

.filter-group select:focus {
  outline: none;
  border-color: #3f7e9d;
  box-shadow: 0 0 0 3px rgba(63, 126, 157, 0.1);
}

@media (max-width: 768px) {
  .ed-filter {
    gap: 1rem;
  }
  
  .filter-group {
    flex-direction: column;
    align-items: flex-start;
    min-width: 100%;
  }
  
  .filter-group select {
    width: 100%;
  }
}

.page-header {
  margin: 0 0 0.5rem 0;
  font-size: 2rem;
  font-weight: 700;
  color: #2c3e50;
}

.muted {
  color: #6c757d;
  font-size: 0.9rem;
  font-weight: 400;
}

/* Grid layout pre karty - vždy 1 karta na riadok */
.ed-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  width: 100%;
  margin: 0 auto;
  padding: 1rem 0;
}

/* Väčšie medzery na veľkých obrazovkách */
@media (min-width: 1200px) {
  .ed-cards {
    gap: 2rem;
  }
}

/* Karta výzvy */
.ed-card {
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 1.5rem;
  background: #fff;
  width: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.ed-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
  border-color: #3f7e9d;
}

/* Status ribbon pre ukončené výzvy */
.ed-card.expired::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #dc3545 0%, #c82333 100%);
}

.ed-card.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #28a745 0%, #218838 100%);
}

/* Header karty s badges */
.ed-card > div:first-child {
  margin-bottom: 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Nadpis výzvy */
.ed-card h2.ed-title, 
.ed-card h3.ed-title,
.ed-title {
  margin: 0.5rem 0 1rem 0;
  font-size: 1.4rem;
  line-height: 1.4;
  font-weight: 700 !important;
  color: #2c3e50;
  transition: color 0.2s ease;
}

.ed-card:hover .ed-title {
  color: #3f7e9d;
}

.ed-title a {
  color: inherit;
  text-decoration: none;
}

.ed-title a:hover,
.ed-title a:focus {
  text-decoration: none;
  color: #3f7e9d;
}

/* Meta informácie */
.ed-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  row-gap: 0.75rem;
}

.ed-meta li {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.ed-meta li:last-child {
  border-bottom: none;
}

.ed-meta .label {
  min-width: 10rem;
  color: #6c757d;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.ed-meta li > span:last-child {
  color: #2c3e50;
  font-weight: 500;
  flex: 1;
  word-break: break-word;
}

/* Zvýraznenie dôležitých polí */
.ed-meta li.highlight {
  background: #f8f9fa;
  padding: 0.75rem;
  margin: 0 -0.5rem;
  border-radius: 6px;
  border: none;
}

.ed-meta li.highlight .label {
  color: #3f7e9d;
}

/* Grid pre dátumy - jeden riadok, dva stĺpce */
.ed-meta li.ed-dates-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 0;
  border: none;
  margin: 0 -0.5rem;
}

.ed-date-col {
  background: #f8f9fa;
  padding: 0.75rem;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ed-date-col .label {
  color: #3f7e9d;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: auto;
}

.ed-date-col .value {
  color: #2c3e50;
  font-weight: 600;
  font-size: 1.1rem;
}

/* Responzívne zobrazenie pre mobily */
@media (max-width: 768px) {
  .ed-meta li.ed-dates-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

/* Badge štýly */
.badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #fff;
  transition: all 0.2s ease;
}

.badge.badge-primary {
  background: #3f7e9d;
  color: #fff;
  border-color: #3f7e9d;
}

.badge.badge-success {
  background: #28a745;
  color: #fff;
  border-color: #28a745;
}

.badge.badge-danger {
  background: #dc3545;
  color: #fff;
  border-color: #dc3545;
}

.badge.badge-warning {
  background: #ffc107;
  color: #000;
  border-color: #ffc107;
}

.ed-card:hover .badge {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* --- Stránkovanie --- */
.paginator {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  margin: 2rem 0;
  padding: 1.5rem 1rem;
  background: #f8f9fa;
  border-radius: 12px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;
}

.paginator .info {
  width: 100%;
  text-align: center;
  margin-bottom: 1rem;
  color: #6c757d;
  font-size: 0.9rem;
  font-weight: 500;
}

@media (min-width: 768px) {
  .paginator {
    justify-content: space-between;
  }
  
  .paginator .info {
    width: auto;
    margin-bottom: 0;
    margin-right: auto;
  }
}

.paginator a,
.paginator span {
  border: 1px solid #dee2e6;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  border-radius: 6px;
  min-width: 2.5rem;
  text-align: center;
  font-weight: 500;
  color: #495057;
  background: #fff;
  transition: all 0.2s ease;
}

.paginator a:hover {
  background: #3f7e9d;
  color: #fff;
  border-color: #3f7e9d;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.paginator .active {
  background: #3f7e9d;
  color: #fff;
  border-color: #3f7e9d;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(63, 126, 157, 0.3);
}

.paginator .disabled {
  opacity: 0.4;
  pointer-events: none;
  background: #f8f9fa;
}

/* Mobile responzívnosť pre pagináciu */
@media (max-width: 576px) {
  .paginator a,
  .paginator span {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    min-width: 2rem;
  }
  
  .paginator {
    gap: 0.3rem;
    padding: 1rem 0.5rem;
  }
}

/* --- Štýlizovaný zoznam pre polia v meta údajoch --- */
.ed-meta .ed-list {
  list-style: none;
  margin: 0.5rem 0 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ed-meta .ed-list li {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  color: #495057;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.ed-meta .ed-list li::before {
  content: "📍";
  margin-right: 0.4rem;
  font-size: 0.85rem;
}

.ed-meta .ed-list li:hover {
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
  border-color: #3f7e9d;
  color: #3f7e9d;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(63, 126, 157, 0.2);
}

/* Pre prázdny zoznam */
.ed-meta .ed-list:empty::after {
  content: "Nie je špecifikované";
  color: #adb5bd;
  font-style: italic;
}

/* Mobile responzívnosť pre zoznam */
@media (max-width: 576px) {
  .ed-meta .ed-list li {
    font-size: 0.85rem;
    padding: 0.35rem 0.65rem;
  }
}

/* --- Štýly pre badge chipy (Žiadatelia) --- */
.ed-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.ed-badge-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #424242;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.ed-badge-chip:hover {
  background: #eeeeee;
  border-color: #bdbdbd;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Responzívne zobrazenie pre badge chipy */
@media (max-width: 576px) {
  .ed-badge-chip {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
}

/* --- Štýly pre detail výzvy --- */

.vyzva-detail {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Navigácia späť */
.back-navigation {
  margin-bottom: 2rem;
}

.back-navigation.bottom {
  margin-top: 3rem;
  margin-bottom: 0;
  padding-top: 2rem;
  border-top: 2px solid #e5e5e5;
}

/* Hero sekcia */
.vyzva-hero {
  margin-bottom: 3rem;
  padding: 2rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
}

.vyzva-badges {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.vyzva-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
  line-height: 1.3;
}

@media (max-width: 768px) {
  .vyzva-title {
    font-size: 1.8rem;
  }
}

/* Sekcie */
.vyzva-section {
  margin-bottom: 3rem;
  padding: 2rem;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 1.5rem 0;
  padding-bottom: 1rem;
  border-bottom: 3px solid #3f7e9d;
}

/* Základné informácie - grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.info-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6c757d;
}

.info-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
}

/* Text obsah */
.content-text {
  font-size: 1rem;
  line-height: 1.7;
  color: #495057;
}

.content-text p {
  margin-bottom: 1rem;
}

/* Zoznamy */
.simple-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.simple-list li {
  padding: 0.5rem 0 0.5rem 1.5rem;
  position: relative;
  line-height: 1.6;
}

.simple-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #3f7e9d;
  font-weight: bold;
  font-size: 1.2rem;
}

/* Podmienky poskytnutia */
.conditions-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.condition-item {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #3f7e9d;
}

.condition-number {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #3f7e9d;
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1rem;
}

.condition-content {
  flex: 1;
}

.condition-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 0.75rem 0;
}

.condition-description {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #495057;
}

/* Responzívne zobrazenie */
@media (max-width: 768px) {
  .vyzva-detail {
    padding: 1rem 0.5rem;
  }
  
  .vyzva-section {
    padding: 1.5rem 1rem;
  }
  
  .section-title {
    font-size: 1.4rem;
  }
  
  .condition-item {
    flex-direction: column;
    padding: 1rem;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Štýly pre tlačidlá akcií výzvy --- */
.ed-card-actions {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e5e5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.ed-card-actions .btn-primary {
  background-color: #3f7e9d !important;
  border-color: #3f7e9d !important;
  color: #fff !important;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(63, 126, 157, 0.2);
}

.ed-card-actions .btn-primary:hover {
  background-color: #2f5f7d !important;
  border-color: #2f5f7d !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(63, 126, 157, 0.3);
}

.ed-card-actions .btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(63, 126, 157, 0.2);
}

/* Tlačidlo Mám záujem */
.ed-card-actions .btn-interest {
  background-color: #c9302c !important;
  border-color: #c9302c !important;
  color: #fff !important;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(201, 48, 44, 0.2);
}

.ed-card-actions .btn-interest:hover {
  background-color: #ac2925 !important;
  border-color: #ac2925 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(201, 48, 44, 0.3);
}

.ed-card-actions .btn-interest:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(201, 48, 44, 0.2);
}

/* Responzívne zobrazenie pre tlačidlá */
@media (max-width: 768px) {
  .ed-card-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .ed-card-actions .btn-primary,
  .ed-card-actions .btn-interest {
    width: 100%;
    text-align: center;
  }
}
