/* RESET PREDVOLENÝCH MARGINS A PADDINGU */
html, body {
  margin: 0;
  padding: 0;
}

/* GLOBAL */
body {
  font-family: "Segoe UI", sans-serif;
  margin: 0;
  background: #f4f4f4;
  color: #222;
}

/* HEADER */
.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  color: #000;
  padding: 1rem 2rem;
  flex-wrap: wrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-left .logo {
  height: 35px;
  width: auto;
  cursor: pointer;
}

.subtitle {
  font-family: "Segoe UI Italic", sans-serif;
  color: #0e276a;
  font-weight: 700;
  font-style: italic;
  font-size: 1rem;
  white-space: nowrap;
}

.header-right button {
  min-width: 150px;       /* rovnaká šírka ako ostatné tlačidlá */
  padding: 0.6rem 1.2rem; /* zachovanie rovnakého paddingu */
  background:#1e3a8a;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  color: white;
  transition: color 0.3s ease, background 0.3s ease;
}

.header-right button:hover {
  background: gold;
  color: #1e3a8a;
}

.logged-user-email {
  font-weight: 600;
  color: #1e3a8a;      /* tmavomodrá farba */
  margin-right: 1rem;   /* medzera medzi emailom a tlačidlom Pridať servis */
  white-space: nowrap;   /* email sa nezalamuje */
}


/* FILTER FORM */
#filter-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem 2rem;
  overflow-x: auto;
  padding: 1rem;
  border-radius: 12px;
  background-color: #1e3a8a;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

#filter-form input,
#filter-form select {
  flex: 1 1 150px;  /* pevná vizuálna šírka, ale dovolí zalomenie */
  min-width: 150px; 
  max-width: 250px; 
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: white;
  color: #222;
}


#filter-form input::placeholder {
  color: #888;
  opacity: 1;
}

#filter-btn {
  padding: 0.6rem 1.2rem;
  border-radius: 8px;       /* zaoblené rohy ako polia */
  border: none;
  background-color: gold;   /* pozadie */
  color: white;           /* modré písmo */
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

#filter-btn:hover {
  background-color: #ffd700; /* trošku tmavší odtieň gold pri hover */
  color: #000080;            /* tmavomodrá pri hover */
}



/* PREMIUM SERVISY */
.premium-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin: 2rem;
}

.card {
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 0.6rem 0.4rem;
  background: white;
  border: 2px solid gold;
  cursor: pointer;
  line-height: 1.6;
}

.card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6; 
}

.card p {
  font-weight: normal; 
  margin: 0;
  line-height: 1.6;
}

.card strong {
  font-weight: normal;
}

.card a[href^="tel:"] {
  font-weight: normal;
  text-decoration: none;
  color: inherit;
}

.card a[href^="mailto:"],
.card a[href^="http"] {
  font-weight: normal;
  text-decoration: underline;
  color: #1e3a8a;
}

.card .adresa strong,
.card .email strong,
.card .web strong {
  display: none;
}

.card:hover {
  background: #fffbe0;
}

/* PREMIUM CARD LINKY */
.card a[href^="tel:"] {
  text-decoration: none; /* telefón bez podčiarknutia */
  color: inherit;
}

.card a[href^="tel:"]:hover {
  color: inherit; /* žiadny hover efekt */
  text-decoration: none;
}

/* Email a web - bez podčiarknutia, modrá farba, hover červená */
.card a[href^="mailto:"],
.card a[href^="http"] {
  text-decoration: none;
  color: #1e3a8a; /* modrá farba */
  transition: color 0.2s ease;
}

.card a[href^="mailto:"]:hover,
.card a[href^="http"]:hover {
  color: red; /* farba pri hover */
}

/* MODAL LINKY */
#servis-modal a {
  text-decoration: none;
  color: #1e3a8a; /* modrá farba */
  transition: color 0.2s ease;
}

#servis-modal a:hover {
  color: red;
}



/* NORMÁLNE SERVISY */
.normal-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0 2rem 2rem 2rem;
  overflow-x: auto; /* pridáme, aby sa horizontálne scrollovalo, ak treba */
}

/* Hlavička tabuľky */
.normal-header {
  display: grid;
  grid-template-columns: 2fr 3fr 1.2fr 1fr 0.8fr; /* flexibilné pomery */
  font-weight: bold;
  padding: 1rem;
  background: #e6e6e6;
  border-radius: 8px;
  margin: 0 2rem 0.2rem 2rem;
  cursor: pointer;
  align-items: center;
}

/* Každý riadok tabuľky */
.card-normal {
  display: grid;
  grid-template-columns: 2fr 3fr 1.2fr 1fr 0.8fr; /* flexibilné pomery */
  padding: 1rem;
  border-bottom: 1px solid #ddd;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.card-normal:hover {
  background: #fffbe0;
}

/* Text v stĺpcoch */
.normal-header span,
.card-normal span {
  text-align: left;
  display: block;
  padding: 0 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* FORMULÁR */
#pridat-servis {
  background: white;
  margin: 2rem;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

#pridat-servis input,
#pridat-servis button {
  display: block;
  margin: 0.5rem 0;
  padding: 0.5rem;
  width: 100%;
  border-radius: 5px;
  border: 1px solid #ccc;
}

/* 🔹 Jednotné medzery a zarovnanie pre všetky polia */
#pridat-servis input {
  width: 100%;
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.8rem; /* rovnaké medzery medzi všetkými poľami */
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
  box-sizing: border-box;
}

/* každý riadok so 2 poľami (auto/cena, mesto/kraj, tel/email) */
#pridat-servis .form-row {
  display: flex;
  gap: 1rem; /* rovnaká medzera medzi dvoma poľami */
  margin-bottom: 0.8rem; /* rovnaká medzera ako pri single inpute */
}

#pridat-servis .form-row input {
  flex: 1;
  margin-bottom: 0; /* aby sa nepričítal dvojnásobný odstup */
}


#pridat-servis button {
  background: #1e3a8a;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease, background 0.3s ease;
}

#pridat-servis button:hover {
  background: gold;
  color: #1e3a8a;
}

.hidden {display: none !important;}


#pridat-servis {
  position: relative;
}

/* --- DVE POLIA V JEDNOM RIADKU --- */
#pridat-servis .form-row {
  display: flex;
  gap: 1rem;              /* medzera medzi poliami */
  flex-wrap: wrap;        /* na mobile sa zalomia pod seba */
}

#pridat-servis .form-row input {
  flex: 1;                /* rovnaká šírka pre obe polia */
  min-width: 120px;       /* aby sa na mobile nelámali príliš skoro */
}

#pridat-servis .close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.6rem;
  cursor: pointer;
  font-weight: bold;
  color: #1e3a8a;
  background: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: 1;
  transition: color 0.2s ease;
}

#pridat-servis .close-btn:hover {
  color: gold;
}

/* MODAL */
#servis-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;

  /* pre fade efekt */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Trieda pre zobrazenie modalu */
#servis-modal.show {
  opacity: 1;
  visibility: visible;
}

/* Obsah modalu */
#servis-modal .modal-content {
  position: relative;
  background: white;
  padding: 1.5rem 2rem;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-sizing: border-box;
  overflow-y: auto;
  max-height: 90vh;
}

/* ✅ Text v modale sa pekne zalamuje, ale šírka ostáva zachovaná */
#servis-modal .modal-content {
  word-wrap: break-word;      /* staršie prehliadače */
  overflow-wrap: anywhere;    /* moderné prehliadače – zalamuje kdekoľvek */
  white-space: normal;        /* text sa bude normálne zalamovať */
}

/* ✅ Odkazy v modale sa nezalomujú mimo okno */
#servis-modal a {
  word-break: break-all;
  overflow-wrap: anywhere;
}


#servis-modal .ikonka {
  text-decoration: none;
  margin-right: 0.3rem;
  font-size: 1.1rem;
}

#servis-modal a[href^="mailto:"],
#servis-modal a[href^="http"] {
  text-decoration: none;
  color: #1e3a8a;
  transition: color 0.2s ease;
}

#servis-modal a {
  text-decoration: none;
  color: #1e3a8a;
}

#servis-modal a:hover {
  color: red;
}

#servis-modal a[href^="tel:"] {
  text-decoration: none; /* žiadne podčiarknutie */
  color: inherit;        /* zachová farbu textu */
  cursor: default;       /* optional: ukazovateľ zostane normálny */
}

#servis-modal a[href^="tel:"]:hover {
  color: inherit;        /* zruší efekt hover */
  text-decoration: none;
}


#servis-modal .close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.6rem;
  cursor: pointer;
  font-weight: bold;
  color: #1e3a8a;
  z-index: 10;
  background: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: 1;
  transition: color 0.2s ease;
}

#servis-modal .close-btn:hover {
  color: gold;
}

#servis-modal .modal-content p {
  word-wrap: break-word;
  overflow-wrap: break-word;
  margin: 0.4rem 0;
  line-height: 1.5;
  font-weight: normal;
  font-size: 0.95rem;
}

#servis-modal .modal-content h2 {
  margin: 0 0 1rem 0;
  font-size: 1.2rem;
  color: #0e276a;
}

/* ODDEĽOVACIE ČIARY LEN NA URČITÝCH MIESTACH V MODALE */
#servis-modal .modal-content p {
  padding-bottom: 0.5rem;
  margin-bottom: 0.6rem;
  border-bottom: none; /* predvolene žiadna čiara */
}

/* Čiara medzi SLUŽBY a ADRESA */
#modal-meno::after {
  content: "";
  display: block;
  border-bottom: 1px solid #eee;
  margin-top: 0.6rem;
}

/* Čiara medzi SLUŽBY a ADRESA */
#modal-sluzby::after {
  content: "";
  display: block;
  border-bottom: 1px solid #eee;
  margin-top: 0.6rem;
}

.mesto-kraj {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 10px 40px;
  margin: 0;
  padding: 0;
  position: relative;
}

.mesto-kraj::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  border-bottom: 1px solid #eee;
}

.mesto-kraj p {
  margin: 0;
  padding: 0;
  font-size: 1rem;
  line-height: 1.3;
}

.mesto-kraj strong {
  color: #222;
}

/*Tlacitka na editovanie*/

.modal-actions {
  margin-top: 15px;
  display: flex;
  gap: 10px;
  justify-content: center; /* vycentruje tlačidlá */
}

.modal-actions .edit-btn,
.modal-actions .delete-btn {
  padding: 0.4rem 0.8rem;   /* menší padding */
  font-size: 0.8rem;        /* menší text */
  border: none;                 /* rovnaké ako pridat servis */
  border-radius: 8px;           /* rovnaké ako pridat servis */
  background: #1e3a8a;          /* pôvodná modrá farba */
  color: white;                 /* text biely */
  font-weight: normal;
  display: flex;                /* aby ikona aj text sedeli v riadku */
  align-items: center;
  gap: 5px;                     /* medzera medzi ikonou a textom */
  transition: color 0.3s ease, background 0.3s ease;
}

.modal-actions .edit-btn:hover,
.modal-actions .delete-btn:hover {
  background: gold;
  color: #1e3a8a;
}


/* --- Značka auta + cena vedľa seba --- */
.auto-cena {
  display: flex;
  justify-content: space-between;  /* oddelí ich na ľavý a pravý okraj */
  align-items: center;
  gap: 80px; /* väčšia medzera medzi značkou auta a cenou */
  margin: 10px 0 15px;
}

.auto-cena p {
  margin: 0;
  font-size: 1rem;
}

.auto-cena strong {
  color: #222;
}

/* --- Mesto / Obec + Kraj vedľa seba --- */
.mesto-kraj {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 80px; /* medzera medzi mestom a krajom */
  margin: 10px 0 15px;
}

.mesto-kraj p {
  margin: 0;
  font-size: 1rem;
}

.mesto-kraj strong {
  color: #222;
}

/* --- Rovnaká mriežka pre auto/cenu aj mesto/kraj --- */
.auto-cena,
.mesto-kraj {
  display: grid;
  grid-template-columns: 1fr 1fr; /* dve rovnaké stĺpce */
  align-items: start;
  gap: 10px 40px; /* vertikálna a horizontálna medzera */
  margin: 10px 0 15px;
}

.auto-cena p,
.mesto-kraj p {
  margin: 0;
  font-size: 1rem;
  white-space: normal;        /* ✅ POVOLÍ ZALAMOVANIE */
  word-break: break-word;
  overflow-wrap: anywhere;
}

.auto-cena strong,
.mesto-kraj strong {
  color: #222;
}

/* Text vpravo zarovnáme doprava */
.auto-cena p:nth-child(2),
.mesto-kraj p:nth-child(2) {
  text-align: right;
}

/* ✅ Hláška vedľa tlačidla „Pridať servis“ */
.header-right {
  display: flex;
  align-items: center;
  gap: 1rem; /* medzera medzi hláškou a tlačidlom */
  position: relative;
}

.success-msg {
  background: #fff8dc;          /* jemné zlaté pozadie */
  color: #1e3a8a;               /* tmavomodrý text */
  border: 1px solid gold;
  border-radius: 12px;
  padding: 0.6rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  white-space: nowrap;          /* nezalamuje text */
  pointer-events: none;         /* nezasahuje do klikov */
}

.success-msg i {
  color: gold;
  font-size: 1.2rem;
}

/* ✅ keď sa zobrazí */
.success-msg.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto; /* po zobrazení interaktívne */
}

.normal-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0 2rem 2rem 2rem;
  overflow-x: auto; /* pridať */
}


#gdpr-toggle,
#kontakt-toggle {
  color: white;             /* predvolená farba */
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.3s ease; /* hladký prechod farby */
}

#gdpr-toggle:hover,
#kontakt-toggle:hover {
  color: gold;              /* farba pri hover */
}


/* stránkovanie */
.page-btn {
  padding: 3px 6px;
  font-size: 0.75rem;
  border-radius: 6px;
  margin: 0 2px;
  border: 1px solid #ccc;
  background-color: white;
  color: #1e3a8a;
  cursor: pointer;
  }

.page-btn:hover {
  background-color: #ffd700;
}

.page-btn.active {
  background-color: gold;
  color: #1e3a8a;
  font-weight: bold;
  border: 1px solid #1e3a8a;
}



/* --- FOOTER --- */

#main-footer p {
  margin: 0;
  padding: 0;
}

.footer-logo-servis {
  color: white;   /* biela farba pre "Servis" */
}

.footer-logo-go {
  color: #ffd700; /* zlatá farba pre "GO" */
  font-weight: normal; /* voliteľne, aby GO viac vyniklo */
}


#main-footer .footer-copyright {
  margin-bottom: 0.5rem; /* zväčší medzeru pod © 2025 ServisGO.sk */
}

/* Footer wrapper (celá šírka stránky) */
#main-footer {
  width: 100%;
  text-align: center;
  padding: 1rem 0; /* len zhora a zdola */
  box-sizing: border-box;
}

/* Container rovnakej šírky ako filter + vizuálny panel */
.footer-container {
  max-width: 95%;
  margin: 0 auto;
  padding: 0.5rem;
  background-color: #1e3a8a;
  color: white;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  text-align: center;
}


.footer-links {
  display: inline-block;  /* všetko v jednom riadku */
  gap: 0.5rem;
  align-items: center;
  cursor: pointer;
}

.footer-links span {
  color: #ffd700;        /* zlatá farba */
  text-decoration: underline; /* rovnaké ako predtým */
}

.footer-links span:hover {
  color: white;          /* efekt hover */
}


/* ---- LOGIN MODAL ---- */
#login-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none; /* keď je hidden */
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* keď JS pridá triedu .show → modal sa zobrazí */
#login-modal.show {
  display: flex;
}

#login-modal .modal-content {
  background: #fff;
  padding: 2rem;
  border-radius: 10px;
  z-index: 10000;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  position: relative;
}

#login-modal .login-backdrop {
  position: absolute;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background: rgba(0,0,0,0.5);
  z-index: 9998;
}

#login-modal .close-login {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  cursor: pointer;
}
#login-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000; /* zvýšené pre istotu */
}

#login-modal.show {
  display: flex;
}

#login-modal .modal-content {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  z-index: 10001; /* musí byť vyššie ako backdrop */
  max-width: 400px;
  width: 90%;
  position: relative;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

#login-modal .login-backdrop {
  position: absolute;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
}

#login-modal .close-login {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.6rem;
  cursor: pointer;
  color: #1e3a8a;
  background: white;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: 1;
  transition: color 0.2s ease;
}

#login-modal .close-login:hover {
  color: gold;
}

/*chybová hláška*/
.login-error {
  color: red;
  background: #ffe5e5;
  border: 1px solid #ffb3b3;
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
  display: none;
}

.login-error.show {
  display: block;
}


/* krížik zatvorenia modalu */
#login-modal .close-login {
  position: absolute;
  top: 10px;
  right: 10px;          /* trošku posunuté od okraja */
  font-size: 1.6rem;
  cursor: pointer;
  color: #1e3a8a;
  background: white;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: 1;
  transition: color 0.2s ease;
  z-index: 10;           /* aby bol nad modal-content */
}


/* modal content odsadenie, aby inputy neboli pod krížikom */
#login-modal .modal-content {
  padding: 2.5rem 2rem 2rem 2rem; /* viac paddingu hore */
  position: relative;
  border-radius: 12px;
  max-width: 400px;
  width: 90%;
  background: white;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}


/* login inputy štýl ako filter */
#login-email,
#login-modal-heslo {
  width: 100%;
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #222;             /* farba textu, keď je napísaný */
  background-color: #fff;  /* biele pozadie */
  box-sizing: border-box;
}

/* placeholder svetlošedý + kurzíva */
#login-email::placeholder,
#login-modal-heslo::placeholder {
  color: #888;             /* svetlošedá farba */
  font-style: normal
}


/*tlačidlo na prihlasenie */
.login-form-actions {
  display: flex;
  justify-content: center; /* stredové zarovnanie */
  margin-top: 0.5rem;        /* medzera medzi inputmi a tlačidlom */
}

.logged-user-email {
  font-style: italic;
  color: #1e3a8a; /* základná farba emailu */
  transition: color 0.3s ease;
}



/* --- UNIFIKOVANÉ INPUTY FOCUS --- */
#pridat-servis input:focus,
#login-form input:focus {
  border-color: #1e3a8a; /* modrá farba ako vo filtri */
  box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.2); /* jemný tieň */
  outline: none;
}

/* --- PLACEHOLDER ŠEDO --- */
#pridat-servis input::placeholder,
#login-form input::placeholder {
  color: #888;
  font-size: 0.95rem; /* menšie písmo */
}

/* COOKIE BANNER */
#cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90vw;      /* prispôsobí sa šírke okna */
  width: auto;
  background: #1e3a8a;
  color: white;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;      /* text a tlačidlá na jednom riadku */
  box-shadow: 0 3px 6px rgba(0,0,0,0.2);
  font-size: 0.9rem;
  z-index: 10000;
}

#cookie-banner p {
  margin: 0;
  padding-right: 1rem;
  white-space: nowrap;    /* text v jednom riadku */
  overflow: hidden;       /* skryje text, ktorý sa nezmestí */
  text-overflow: ellipsis; /* ak sa text nezmestí, zobrazí ... */
}

.cookie-buttons {
  display: flex;
  gap: 0.5rem;            /* malé medzery medzi tlačidlami */
}


.cookie-buttons button {
  background: gold;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  margin-left: 0.5rem;
  cursor: pointer;
  border-radius: 5px;
  font-weight: bold;
  transition: background 0.3s ease;
}
.cookie-buttons button:hover { 
  background: gold;
  color: #1e3a8a; }


/* stránkovanie */
.page-btn {
  padding: 3px 6px;
  font-size: 0.75rem;
  border-radius: 6px;
  margin: 0 2px;
  border: 1px solid #ccc;
  background-color: white;
  color: #1e3a8a;
  cursor: pointer;
  }

.page-btn:hover {
  background-color: #ffd700;
}

.page-btn.active {
  background-color: gold;
  color: #1e3a8a;
  font-weight: bold;
  border: 1px solid #1e3a8a;
}



/* --- BODY PADDING PRE COOKIE BANER --- */
body {
  padding-bottom: 100px; /* miesto pre cookie lištu, aby nezakrývala footer */
}


/* FOOTER */
.footer-text {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  max-width: 90%;
  margin: 1rem auto 0 auto;
  color: #fff;
  text-align: left;
  line-height: 1.5;
}

.footer-text.show {
  display: block;
  opacity: 1;
}

#ostranke-toggle,
#kontakt-toggle,
#gdpr-toggle {
  color: #fff;          /* explicitná farba */
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s ease;
}

#ostranke-toggle:hover,
#kontakt-toggle:hover,
#gdpr-toggle:hover {
  color: gold;
}

/* Desktop */
@media(min-width: 768px) {
  .footer-text {
    max-width: 900px;
  }
}


/* --- NORMAL LIST HLAVIČKA – ELLIPSIS + TOOLTIP --- */
.normal-header span,
.card-normal span {
    display: block;          /* nutné pre ellipsis */
    white-space: nowrap;     /* nezalamovať */
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;            /* dôležité pri flex/grid */
    position: relative;      /* pre tooltip */
    cursor: default;         /* aby bolo jasné, že sa dá hovernúť */
}


/* Tooltip pri hover */
.normal-header span:hover::after,
.card-normal span:hover::after {
    content: attr(title);      /* zobrazí text z title */
    position: absolute;
    left: 0;
    top: 100%;
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    white-space: normal;
    z-index: 100;
    width: max-content;
    max-width: 300px;         /* prípadne upraviť podľa potreby */
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    font-size: 0.85rem;
}



/* --- ------------------------ --- */
/* --- PRISPOSOBENIE OBRAZOVIEK --- */
/* --- ------------------------ --- */

/* --- RESPONSIVE: TABLET --- */
@media (max-width: 1024px) {

  .header-row {
    flex-direction: column;
    align-items: flex-start;
  }

  #filter-form input,
  #filter-form select,
  #filter-form button {
    width: 100%;
  }

  #pridat-servis .form-row {
    flex-direction: column;
  }
}


/* --- TABLET (768–1024px) – 3 STĹPCE --- */
@media (min-width: 768px) and (max-width: 1024px) {

  #filter-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 1.1rem;
    row-gap: 0.75rem;
    padding: 1rem;
    align-items: start;
  }

  #filter-form input,
  #filter-form select {
    width: 100%;
    min-width: 0;          /* 🔑 najdôležitejšie proti prekrývaniu */
    box-sizing: border-box;
    font-size: 0.9rem;
  }

  #filter-form button {
    grid-column: 1 / -1;  /* vždy celý riadok */
    width: 100%;
  }
}



/* --- RESPONSIVE: MOBILE --- */
@media (max-width: 767px) {

  /* HEADER */
  .header-row {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .header-left,
  .header-right {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.4rem;
  }

  .logged-user-email {
    white-space: normal;
    margin-right: 0;
    font-size: 0.9rem;
  }

  .header-right button {
    width: 100%;
    max-width: 280px;
    min-width: unset;
  }

  /* FILTER – MOBILE */
  #filter-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    padding: 0.8rem;
  }

  #filter-form input,
  #filter-form select {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  #filter-form button {
    grid-column: 1 / -1;
    width: 100%;
  }

  body {
    font-size: 14px;
  }

  /* PREMIUM */
  .premium-grid {
    margin: 1rem;
    gap: 0.8rem;
  }

  .card {
    padding: 0.8rem;
  }

  /* NORMAL LIST */
  .normal-list {
    margin: 0 1rem 1rem 1rem;
  }

  .normal-header,
  .card-normal {
    grid-template-columns: 1fr 2fr 1fr 1fr 1fr;
    font-size: 0.9rem;
  }

}


/* --- EXTRA SMALL MOBILE (320px) --- */
@media (max-width: 360px) {
  #filter-form {
    grid-template-columns: 1fr;
  }
}

/* PREMIUM GRID – MALÉ MOBILY */
@media (max-width: 400px) {
  .premium-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    margin: 1rem;
  }

  .card {
    padding: 0.8rem;
  }
}

@media (max-width: 360px) {
    .normal-header span,
    .card-normal span {
        white-space: normal; /* povoliť zalamovanie */
    }
}

/* --- Obrázok --- */
img, .logo {
  max-width: 100%;
  height: auto;
}
