/* 
 * Plik: style.css
 * Opis: Style CSS dla systemu weryfikacji dyplomów Akademii VCA
 */

:root {
  --primary-color: #242070; /* Kolor główny Akademia VCA */
  --secondary-color: #e2e8f0; /* Jasny szary */
  --accent-color: #FCE117; /* Żółty kolor Akademia VCA */
  --dark-bg: #343434; /* Ciemny szary do nagłówka */
  --text-color: #333333;
  --light-bg: #f8f9fa;
  --table-header-color: #407DD4; /* Niebieski kolor dla nagłówków tabeli */
  --search-button-color: #DE6E2C; /* Pomarańczowy kolor dla przycisku wyszukiwania */
}

/* Podstawowe style */
body {
  font-family: 'Roboto', sans-serif;
  font-weight: 300;
  background-color: var(--light-bg);
  color: var(--text-color);
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

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

/* Typografia */
h1 {
  font-size: 44px;
  font-weight: 300;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

h2 {
  font-size: 30px;
  font-weight: 300;
  margin: 0;
}

h3 {
  font-size: 26px;
  font-weight: 300;
}

/* Nagłówek */
.header-container {
  background-color: var(--dark-bg);
  width: 100%;
  padding: 15px 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.logo img {
  max-height: 70px;
}

/* Przełącznik języków */
.language-switcher {
  display: flex;
  gap: 5px;
}

.language-switcher a {
  color: white;
  padding: 6px 12px;
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 300;
  border-radius: 4px;
}

.language-switcher a:hover:not(.active) {
  background-color: rgba(255, 255, 255, 0.1);
}

.language-switcher a.active {
  background-color: #F5CD46;
  color: #343434;
  font-weight: 400;
}

/* Karty */
.card {
  border: none;
  border-radius: 6px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  margin-bottom: 2rem;
  overflow: hidden;
}

.card:hover {
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.card-header {
  background-color: var(--table-header-color);
  color: white;
  font-weight: 300;
  padding: 1rem 1.5rem;
  border-bottom: none;
}

.card-body {
  padding: 1.5rem;
  background-color: white;
}

/* Przyciski */
.btn-primary {
  background-color: var(--search-button-color);
  border-color: var(--search-button-color);
}

.btn-primary:hover {
  background-color: #c25521;
  border-color: #c25521;
}

.btn-secondary {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  color: var(--text-color);
}

/* Tabele */
.table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

.table th {
  background-color: var(--table-header-color);
  color: white;
  font-weight: 400;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.table td, .table th {
  padding: 1rem;
  border: 1px solid #e2e8f0;
}

.table tr:nth-child(even) {
  background-color: var(--light-bg);
}

/* Zakładki */
.search-tabs .nav-tabs {
  border-bottom: 1px solid var(--secondary-color);
}

.search-tabs .nav-link {
  color: var(--text-color);
  border: none;
  border-bottom: 3px solid transparent;
  padding: 0.75rem 1.25rem;
  font-weight: 300;
  transition: all 0.2s ease;
}

.search-tabs .nav-link.active {
  color: var(--table-header-color);
  border-bottom-color: var(--table-header-color);
  background-color: transparent;
}

.search-tabs .nav-link:hover:not(.active) {
  border-bottom-color: var(--secondary-color);
}

.search-tabs .nav-link i {
  margin-right: 0.5rem;
}

/* Wyniki wyszukiwania */
.search-params {
  font-weight: 400;
  display: inline-block;
  margin-left: 0.5rem;
}

.results-card {
  animation: fadeIn 0.5s ease forwards;
}

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

.results-card .table tr {
  animation: fadeIn 0.3s ease forwards;
  opacity: 0;
}

.results-card .table tr:nth-child(1) { animation-delay: 0.05s; }
.results-card .table tr:nth-child(2) { animation-delay: 0.1s; }
.results-card .table tr:nth-child(3) { animation-delay: 0.15s; }
.results-card .table tr:nth-child(4) { animation-delay: 0.2s; }
.results-card .table tr:nth-child(5) { animation-delay: 0.25s; }

/* Stopka */
footer {
  padding: 1.5rem 0;
  color: #718096;
  font-size: 0.9rem;
}

/* Style dla tooltipów z efektem rozmywania */
.tooltip {
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .tooltip.show {
    opacity: 1;
  }
  
  .tooltip-inner {
    max-width: 400px; /* Zwiększona szerokość */
    padding: 0.75rem 1rem;
    background-color: rgba(0, 0, 0, 0.85);
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    text-align: left;
    line-height: 1.5;
    transform: translateY(0);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  
  .tooltip.show .tooltip-inner {
    opacity: 1;
    transform: translateY(0);
  }
  
  .tooltip.fade-in .tooltip-inner {
    animation: tooltipFadeIn 0.3s forwards;
  }
  
  .tooltip.fade-out .tooltip-inner {
    animation: tooltipFadeOut 0.3s forwards;
  }
  
  .external-link {
    display: block;
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--text-color);
}

.external-link:hover {
    background-color: rgba(0, 0, 0, 0.03);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: var(--primary-color);
}

.external-link p {
    margin-top: 0.5rem;
    margin-bottom: 0;
    font-weight: 500;
}
/* Style dla wygasłych certyfikatów */
.expired-certificate {
  background-color: #ffebee !important; /* Jasny czerwony */
  transition: background-color 0.3s ease;
}

.expired-certificate:hover {
  background-color: #ffcdd2 !important; /* Nieco ciemniejszy odcień przy najechaniu */
}

.expired-notice {
  color: #d32f2f;
  font-size: 0.85rem;
  margin-top: 0.25rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.expired-notice i {
  font-size: 0.95rem;
}

/* Zapewnienie, że wygasłe certyfikaty zachowują kolor tła */
.table tr.expired-certificate:nth-child(even) {
  background-color: #ffebee !important;
}

  @keyframes tooltipFadeIn {
    from {
      opacity: 0;
      transform: translateY(10px);
      filter: blur(5px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
      filter: blur(0);
    }
  }
  
  @keyframes tooltipFadeOut {
    from {
      opacity: 1;
      transform: translateY(0);
      filter: blur(0);
    }
    to {
      opacity: 0;
      transform: translateY(-10px);
      filter: blur(5px);
    }
  }
  
  /* Style dla linków w tabeli */
  .table a {
    color: var(--table-header-color);
    text-decoration: none;
    transition: color 0.2s;
  }
  
  .table a:hover {
    color: var(--primary-color);
    text-decoration: underline;
  }


/* Responsywność */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    text-align: center;
  }
  
  .language-switcher {
    margin-top: 15px;
    justify-content: center;
  }
  
  h1 {
    font-size: 36px;
  }
  
  h2 {
    font-size: 24px;
  }
  
  h3 {
    font-size: 20px;
  }
  
  .card-header {
    padding: 1rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .table th {
    font-size: 0.75rem;
  }
  
  .table td, .table th {
    padding: 0.75rem;
  }
}