:root {
  --logo: #00B8B8;
  --primary: #39a3d4;
  --secondary: #F4F9FB;
  --gray: #fbfbfb;
  --darkgray: #555;
  --wrapper-box-bg: #ffffff;
  --pink: rgb(240, 82, 141);        
  --darkpink: rgb(118, 10, 51);  
  --darklogo: #007474;
  --lightlogo: #deffff;
  --lightgray: #eee;
  --main-font: 'Raleway', sans-serif;
  --font-weight-medium: 500;
  --font-weight-large: 700;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--main-font);
  margin: 0;
  background: var(--secondary);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: 100px; /* místo pro hlavičku */
  max-width: 100%;
  box-sizing: border-box;
}

img.emoji {
  height: 1em;
  width: 1em;
  vertical-align: -0.1em; 
  margin: 0 0.1em;
  display: inline-block;
}

.layout {
  display: flex;
  flex: 1;
  width: 100%;
  max-width: 1200px; 
  margin: 0 auto; 
  padding: 0 1rem; 
}

aside {
  flex: 0 0 120px;
  background: #fafafa;
}

main {
  flex: 1;
  padding: 1rem;
  width: 100%;
  margin: 0 auto;
}

/* Main content inside the layout */
.main-layout {
  flex: 3;
}

.grid {
  display: grid;
  gap: 1rem;
  justify-content: center;
}

h2 {
  text-align: center;
  font-family: var(--main-font);
  color: var(--darkgray);
  font-weight: var(--font-weight-large); 
  font-size: 2rem;   
  margin: 0;   
}

a {
  text-decoration: none;       
  color: inherit;              
  font: inherit;               
}


/* === COOKIE LIŠTA === */

#cookie-bar {
  background-color: #333333 !important; 
  padding: 20px 15px !important; 
}


#cookie-bar > a#cookie-bar-button-no {
  background-color: #a94442; 
  color: #fff;
}

#cookie-bar > a#cookie-bar-button {
  background-color: var(--darklogo); 
  color: #fff !important;
}


/* === HEADER === */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--logo); 
  color: white;
  border-bottom: 1px solid #a0a0a0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Kontejner uvnitř headeru */
.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem 1rem;
}

/* Logo */
.logo {
  font-family: 'Quicksand', var(--main-font);
  font-weight: var(--font-weight-large);
  font-size: 2rem;
  letter-spacing: 1.5px; 
  margin: 0;
}

.logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.logo-icon {
  width: 55px;
  height: auto;
  margin-right: 0.5rem;
}

.logo-text {
  white-space: nowrap;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* === Calculator button === */

.calculator-button {
  display: flex;
  align-items: center;
  background-color: #ef528d; 
  border: none;
  border-radius: 10px; 
  color: white;
  cursor: pointer;
  font-size: 1rem;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  transition: background 0.2s ease;
}

.calculator-button:hover {
  background-color: #f597bb; 
}

.calculator-icon svg {
  width: 20px;
  height: 20px;
  fill: white;
  display: block;
}

@media (max-width: 680px) {
  .calculator-label {
    display: none;
  }

  .calculator-button {
    padding: 0.5rem; 
    border-radius: 50%; 
    justify-content: center;
  }
}

/* === FOOTER === */

.footer {
  font-size: 1rem;           
  padding: 1.2rem 1rem;        /* prostor kolem */
  text-align: center;          
  line-height: 1.4;           
  background-color: var(--lightgray);   
  color: #333;                 
  margin-top: 2rem; 
  width: 100%;
}

.footer a {
  text-decoration: none;
  margin: 0 0.4rem;            /* mezery mezi odkazy */
}

.footer a:hover {
  text-decoration: underline;
}

.footer-separator {
  display: inline-block;
  width: 1rem; 
}


/* ========================= */
/* ====== INDEX SEKCE ====== */
/* ========================= */


/* === INDEX - LIŠTA POJIŠŤOVNY === */
.insurer-section {
  margin-bottom: 2rem;
}

.insurances {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* vycentruje řádky */
  gap: 1.6rem; /* mezery mezi položkami */
}

.insurance-link {
  flex: 0 0 140px;  /* fixní šířka 140px */
  height: 180px;    /* pevná výška */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* jemný stín pod boxem */
  display: flex;  
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;  /* začíná nahoře */
  background: white;
  border-radius: 8px;
  border: 2px solid var(--logo);
  font-family: var(--main-font);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  color: inherit;
  padding: 1rem;
  text-align: center;
  font-size: 1.1rem;
  white-space: normal;
  word-wrap: break-word;
}

.insurance-number {
  font-size: 1.8rem;
  font-weight: var(--font-weight-large);
  color: var(--logo);
  margin-top: 0.3rem; 
}

.insurance-name {
  font-size: 1.1rem;
  color: #333;
  margin-top: 0.7rem; 
}

/* === INDEX - KATEGORIE PŘÍSPĚVKŮ === */
.category-section {
  margin-top: 4rem;
  margin-bottom: 2rem;
}

.categories-wrapper {
  background: white;
  border-radius: 20px;
  border: 2px solid var(--logo);
  padding: 2rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); 
  margin: 2rem 0;
}

.categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 2.5rem; 
  text-align: center;
}

.category {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem; /* větší mezera mezi ikonou a textem */
  font-family: var(--main-font);
  font-size: 1.1rem; /* větší popisek pod ikonou */
  color: rgb(24, 24, 24);
}

.icon {
  width: 75px;
  height: 75px;
  background: white;
  border-radius: 12px; 
  border: 1.5px solid var(--logo);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); 
  font-size: 2rem; /* větší emoji/symbol */
}

.label {
  color: var(--darkgray);
  font-weight: var(--font-weight-medium);
}

/* === INDEX/BLOG SEKCE === */
.blog-section {
  margin-top: 4rem;
}

.blog-wrapper {
  margin: 2rem 0;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
  gap: 2rem;
}

.blog-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  background: white;
  color: #222;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); 
  transition: transform 0.2s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
}

.blog-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: 1px solid var(--lightgray);
}

.blog-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 1rem 1rem 0.5rem;
  line-height: 1.4;
  color: #2b2b2b;
}

.blog-card p {
  margin: 0 1rem 1rem;
  font-size: 0.95rem;
  color: var(--darkgray);
  line-height: 1.6;
}

/* ========================= */
/* ======= 404 SEKCE ======= */
/* ========================= */

.error-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 50px 20px;
  flex-wrap: wrap;
}

.ghost {
  width: 200px;
  height: 200px;
}

.error-message {
  max-width: 500px;
}

.error-message h1 {
  font-size: 48px;
  color: #333;
}

.error-message p {
  font-size: 20px;
  color: var(--darkgray);
  margin-top: 10px;
}

.error-message a {
  color: var(--logo);
  text-decoration: none;
  font-weight: bold;
}

hr {
  margin: 40px 0;
}

.full-width-content {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}


/* ========================= */
/* ===== ARTICLE SEKCE ===== */
/* ========================= */

/* Pozadí a obal pro celý box "Další články" */
.related-box {
  background-color: #F4F4F4;         
  padding: 1rem 1rem 1rem 1.5rem;   
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-top: 2rem;
  flex: 1;                           
  box-sizing: border-box;
}

.related-heading {
  margin-top: 0.5rem;  
  margin-bottom: 1.5rem;
}

/* Jednotlivý článek */
.related-article a {
  display: block;            
  text-decoration: none;
  color: #333;
  font-weight: bold;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

/* Hover efekt */
.related-article a:hover {
  background-color: var(--lightlogo);         
}

/* Čára mezi články */
.related-divider {
  border: none;
  border-top: 1px solid #ddd;
  margin: 0.75rem 0;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  font-family: var(--main-font);
  font-size: 0.9rem;
  font-weight: var(--font-weight-large);
  color: #555;
  margin-bottom: 2rem;
  padding-top: 0.5rem;
}

.article-meta-left,
.article-meta-right {
  margin: 0.25rem 0;
}

/* Custom box v článcích */
.custom-box {
  display: block;              
  margin: 2rem 0;
  padding: 1.5rem 1rem;
  border: 1px solid var(--logo);
  color: var(--darklogo);
  border-radius: 8px;
  background-color: var(--wrapper-box-bg);
  text-align: center;
  font-size: 1.5rem;
  font-weight: var(--font-weight-medium);
  text-decoration: none;        
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 123, 255, 0.1);
  cursor: pointer;             
}

.custom-box:hover {
  background-color: var(--lightlogo);
  border-color: var(--logo);
  box-shadow: 0 4px 10px rgba(0, 123, 255, 0.2);
  color: var(--darkgray);       
}

.custom-box > span {
  display: inline-block;
  margin-right: 0.5rem;
  vertical-align: middle;
}

/* Article */
.article-container {
  max-width: 800px;
  margin: auto;
  padding: 1rem;
  font-family: var(--main-font);
}

.article-title {
  margin-bottom: 1rem;
  line-height: 1.4;
}

.article-image-wrapper {
  position: relative;
  display: inline-block;
}

.article-image {
  display: block;
  width: 100%;
  height: auto;
}

.image-author-label {
  position: absolute;
  bottom: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-top-left-radius: 4px;
  font-family: var(--main-font);
}

.image-author-label a {
  color: white;
  text-decoration: none;
}

.image-author-label a:hover {
  text-decoration: underline;
}

.article-excerpt {
  text-align: justify;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #333;
}

.article-content p {
  line-height: 1.8;
  margin-bottom: 1.2rem;
  text-align: justify;
}

.article-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: var(--darklogo);

}

.article-content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.article-content ol {
  padding-left: 1.5rem;  
  margin-left: 0;        
}

.article-content ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 auto; 
}

.article-content th,
.article-content td {
  border: 1px solid #ddd;
  padding: 6px;
  text-align: center; 
}

.article-content th {
  background-color: #f7f7f7;
  font-weight: bold;
}

.article-content td:last-child,
.article-content th:last-child {
  width: auto;
}

.article-content td:not(:first-child):not(:last-child),
.article-content th:not(:first-child):not(:last-child) {
  min-width: 57px;
}


.article-tags {
  margin-top: 3rem;
  margin-bottom: 1.5rem;  
  font-size: 0.9rem;
  color: var(--darkgray);
  line-height: 1.4;     
}

.article-tags .tag {
  background-color: var(--lightgray);
  color: #2c3e50;
  padding: 0.2rem 0.5rem;
  margin-right: 0.5rem;   
  margin-bottom: 0.4rem; 
  border-radius: 4px;
  display: inline-block;
  white-space: nowrap;    /* aby jeden tag nezlomil slovo uvnitř */
}


/* =========================== */
/* = INSURER & BENEFIT SEKCE = */
/* =========================== */

#insurer-code {
  font-weight: bold;
  margin-bottom: 1rem;
  color: var(--logo);
}

.toggle-box {
  background: var(--wrapper-box-bg);
  border-radius: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  font-family: var(--main-font);
  border: 1px solid var(--logo);
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  cursor: pointer;
}

.toggle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toggle-arrow {
  font-size: 2rem;
  transform: rotate(0deg);
  transition: transform 0.3s ease;
}

.toggle-arrow:hover {
  color: var(--logo);
}

.toggle-box.open .toggle-arrow {
  transform: rotate(90deg);
  color: var(--logo);
}

.toggle-content {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #ccc;
}

.insurer-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#toggle-contact-details {
  font-size: 2rem;
  transition: transform 0.3s ease;
}

#insurer-contact-info {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  justify-content: space-between;
  text-align: center;
  
}

.info-box {
  flex: 1 1 33%;            /* Každý box zabere min 33% šířky a max 100% */
  min-width: 150px; 
  align-items: center;      /* vertikální zarovnání na střed */
  justify-content: center;  /* horizontální zarovnání na střed */
  text-align: center;       /* pro text uvnitř */
}

.app-store-links {
  white-space: nowrap;
}

#insurer-contact-extra {
  display: none;
  margin-top: 0.75rem;
  border-top: 1px solid #ccc;
  padding-top: 0.75rem;
}

.extra-info {
  display: flex;
  justify-content: space-between;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
  width: 100%;
}

.extra-info > div {
  flex: 1;
}

#insurer-description,
#benefit-instruction,
#benefit-deadline,
#benefit-rules-link {
  text-align: justify;
  line-height: 1.7;
  font-size: 1.05rem;
  margin-top: 1em;
  margin-bottom: 1em;
}

#insurer-description{
  margin-top: 3em;
  margin-bottom: 2em;
}

.benefit-tabs {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 0.5rem;
}

.benefit-tab {
  flex: 1;
  padding: 0.5rem;
  background: #e0e0e0;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
}

.benefit-tab.active {
  background: #ccc;
}

.benefit-content {
  font-size: 0.95rem;
  line-height: 1.5;
}

/* === FILTER BOX SEKCE === */
.filters {
  position: relative;
  margin: 2rem 0;
  padding: 1rem;
  background: var(--wrapper-box-bg);
  border-radius: 1rem;
  border: 1px solid var(--darkgray);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  font-family: var(--main-font);
  min-height: 100px;
  box-sizing: border-box;
}

.clear-filters {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--pink);
  transition: color 0.2s;
}

.clear-filters:hover {
  color: var(--darkpink);
}

.filters h3 {
  margin-top: 0;
}


input[type="checkbox"] {
  accent-color: var(--darklogo);
}

input[type="checkbox"][name="age"] {
  accent-color: #666; 
}

/* První řádek - 3 divy na 33.33% šířky, flexbox center uvnitř každého */
.filter-row.first-row {
  display: flex;
  margin-top: 1.6rem;
  margin-bottom: 1.5rem; 
  width: 100%;
}

/* Každá sekce 33.33% šířky a flexboxem center i vertikálně, i horizontálně */
.filter-section {
  flex-basis: 33.33%;
  display: flex;
  justify-content: center;  /* horizontálně vycentrovat obsah */
  align-items: center;      /* vertikálně vycentrovat obsah */
  font-weight: var(--font-weight-large);
  box-sizing: border-box;
}

/* Styl pro label (checkbox + text) */
.filter-section label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 1rem;
}

/* Ostatní řádky */
.filter-row:not(.first-row) {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.filter-row.first-row .filter-section label {
  font-size: 1.2rem;
  color: var(--logo);
}

/* Labely ve všech řádcích */
.filter-row label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.95rem;
}

.benefits-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin-top: 1rem;
  box-sizing: border-box;
}

.benefit-card {
  position: relative;
  max-width: calc(100% - 1rem); /* to prevent overflow */
  padding: 1rem 1rem 3rem 1rem; /* padding: top right bottom left */
  display: grid;
  grid-template-columns: minmax(40px, 60px) 1fr;
  grid-template-rows: auto auto;
  gap: 0.5rem 1rem;
  align-items: start;
  border: 1px solid #ccc;
  border-radius: 1rem;
  background-color: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  overflow: hidden;
  box-sizing: border-box;
  margin: 0; /* remove margins */
}

/* Ikona v prvním sloupci, první řádek */
.benefit-icon {
  max-width: 100%;
  height: auto;
  grid-row: 1 / 2;
  grid-column: 1 / 2;
  font-size: 2rem;
  flex-shrink: 0;
  margin-top: 0.5rem;
  display: inline-block;
  margin-left: 1rem;
}

.benefit-icon img {
  margin-top: 0.8rem; 
  width: 2rem;     
  height: 2rem;
  display: block; 
}

/* Header (název a max příspěvek) vedle ikony */
.benefit-header {
  grid-row: 1 / 2;
  grid-column: 2 / 3;
  margin-top: 0.5rem;
}

.benefit-header h3,
.benefit-header .max-contribution {
  margin: 0.25rem 0;
}

/* Popisek přes celý spodní řádek */
.benefit-note {
  grid-row: 2 / 3;
  grid-column: 1 / 3;
  margin-top: 0.5rem;
  padding-left: 1rem; 
}

/* Šipka */
.benefit-arrow {
  position: absolute;
  bottom: 0.75rem;
  right: 1rem;
  font-size: 3rem;
  color: var(--logo);
  text-decoration: none;
}

/* Ikonka appendixu v levém dolním rohu */
.appendix-icon-bottom-left {
  position: absolute;
  bottom: 1.4rem; 
  left: 1rem;       
  font-size: 1.2rem;
  color: var(--pink);
  cursor: help;
  user-select: none;
}

.appendix-icon-bottom-left {
  font-size: 24px;
}

.appendix-icon-bottom-left:hover {
  color:  var(--darkpink);
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-variation-settings: 
    'FILL' 1, 
    'wght' 600,  
    'GRAD' 0, 
    'opsz' 40;
}

.custom-tooltip {
  position: absolute;
  bottom: 2.5rem; /* výše než ikonka */
  left: 1rem;
  background-color: #fff;
  color: #333;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 0.5rem;
  max-width: 200px;
  font-size: 0.85rem;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.age-badge {
  position: absolute;
  top: 0;
  right: 0;
  margin: 0;
  padding: 0.3rem 0.6rem;
  border-radius: 0 0 0 0.5rem;
  font-size: 0.7rem;
  font-weight: bold;
  color: white;
  text-transform: uppercase;
  pointer-events: none;
}

/* Barvy podle skupin */
.age-badge.women {
  background-color: #e91e63;
}
.age-badge.men {
  background-color: #0d47a1;
}
.age-badge.pregnant {
  background-color: #9c27b0;
}
.age-badge.senior {
  background-color: #6d4c41;
}
.age-badge.children {
  background-color: #388e3c;
}
.age-badge.adult {
  background-color: #fbc02d;
  color: black;
}

.insurer-badge {
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
  padding: 0.3rem 0.6rem;
  border-radius: 0 0 0.5rem 0;
  font-size: 0.7rem;
  font-weight: bold;
  color: white;
  text-transform: uppercase;
  pointer-events: none;
  background-color: #333;
  z-index: 10;
}

/* Barevné varianty podle pojišťovny */
.insurer-badge.vzp { background-color: #d22d0f; }
.insurer-badge.ozp { background-color: #702083; }
.insurer-badge.zpmv { background-color: #283796; }
.insurer-badge.vozp { background-color: #146335; } 
.insurer-badge.czp { background-color: #1176a4; }
.insurer-badge.rbp { background-color: #00a2e0; }
.insurer-badge.zps { background-color: #795548; }

.insurer-badge a:hover {
  cursor: pointer;
}

#benefit-rules-link {
  text-decoration: none;
  font-weight: bold;
  color: var(--logo);
}

#benefit-rules-link .link-text:hover {
  text-decoration: underline;
}

#benefit-rules-link .link-icon {
  margin-left: 0.3em;
  font-size: 0.9em;
}

.digital-box {
  display: flex;
  flex-wrap: wrap;
  gap: 2em;
  align-items: center;
  font-size: 1em;
  margin-top: 2em;
  margin-bottom: 2em;
}

.digital-item {
  display: flex;
  align-items: center;
  gap: 0.4em;
  flex-wrap: wrap;
}

.digital-item.align-right {
  margin-left: auto;
}

.external-icon {
  font-size: 0.85em;
  margin-left: 0.2em;
  vertical-align: middle;
}

.external-link::after {
  content: "↗";
  margin-left: 0.3em;
  font-size: 0.9em;
}


/* ============================ */
/* ======== KALKULAČKA ======== */
/* =========================== */

.calculator-title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: bold;
  margin-bottom: 2rem;
}

/* Age slider */
.precise-age-container {
  margin-top: 2rem;
  text-align: center;
}

.age-label {
  display: block;
  font-weight: bold;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.slider-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

#age-range {
  width: 100%;
  max-width: 500px;
  appearance: none;
  height: 8px;
  background: var(--logo);
  outline: none;
  border-radius: 5px;
}

#age-range::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--logo);
  cursor: pointer;
}

#age-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--logo);
  cursor: pointer;
}

#age-number {
  width: 80px;
  padding: 0.4rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #f9f9f9;
  text-align: center;
}

/* Gender selection */

.gender-selection {
  display: flex;
  justify-content: center; 
  gap: 1rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.gender-selection label {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f1f1f1;
  font-weight: bold;
  border: 2px solid transparent;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 100px;
  text-align: center;
}

.gender-selection input[type="checkbox"] {
  display: none;
}

.gender-selection label:has(input[type="checkbox"]:checked) {
  background-color: var(--logo);
  color: white;
  font-weight: bold;
  border-color: var(--darklogo);
}


/* Search button */
.btn-primary {
  font-size: 1.2rem;
  padding: 1rem 2rem;
  background-color: var(--logo);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}


.btn-primary:hover {
  background-color: var(--darklogo);
}
 
.benefit-results-section {
  display: block;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  margin-top: 3rem;
}

/* Search animation*/

.calculator-title,
.search-title {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.calculator-title.visible,
.search-title.visible {
  opacity: 1;
}

.visible {
  opacity: 1 !important;
}

.circular-motion-container {
  width: 0;
  height: 0;
  margin: 0 auto; /* Only horizontal centering */
  position: relative;
  animation: orbit 5s linear infinite;
}

.circular-motion-icon {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top center;
  animation: spin-back 5s linear infinite;
}

@keyframes orbit {
  0% {
    transform: rotate(0deg) translateX(30px) rotate(0deg);
  }
  100% {
    transform: rotate(360deg) translateX(30px) rotate(0deg);
  }
}

@keyframes spin-back {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(-360deg);
  }
}

/* === AFTER SEARCH LAYOUT === */

#benefit-results {
  margin-top: 2rem;
  background: #f9f9f9;
  border-radius: 10px;
}

#benefit-results:empty {
  display: none;
}

.layout.calculator-layout.loaded .filters {
  display: none;
}

.btn-secondary {
  padding: 1rem 1rem;
  border: none;
  background-color: var(--logo);
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-radius: 0.75rem;
  box-sizing: border-box;
}

/* === WRAPPER LAYOUT === */
.offers-wrapper {
  display: flex;
  position: relative; 
  width: 100%;
  border: 1px solid var(--lightgray);
  border-radius: 1rem;
  overflow: hidden;
  background-color: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

/* === LEFT COLUMN (STICKY CATEGORY LABELS) === */
.first-column {
  flex-shrink: 0;
  width: 200px;
  background-color: #fff;
  border-right: 1px solid var(--lightgray);
  z-index: 2;
  display: flex;
  flex-direction: column;
  position: sticky;
  left: 0;
}

.first-column .header-cell,
.first-column .category-cell {
  padding: 1rem;
  border-bottom: 1px solid var(--lightgray);
  font-weight: 600;
  background-color: #f6f8fa;
}

.first-column .category-cell {
  font-weight: 500;
  color: #333;
  background-color: #fff;
}

.offer-column .amount-cell.total-cell {
  border-bottom: none;
  min-height: 70px; 
  padding-top: 1.25rem;    
  padding-bottom: 1.25rem; 
  display: flex;
  align-items: center;   
  justify-content: center; 
  box-sizing: border-box;
}

/* === RIGHT SCROLLABLE COLUMNS === */
.scrollable-offers {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  gap: 12px;
  padding: 0.5rem 1rem 1rem 1rem;
  position: relative;
  width: 100%;
}

.offers-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 48px;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(to left, rgba(255,255,255,0.9), rgba(255,255,255,0));
  z-index: 5;
}

/* === EACH INSURER COLUMN === */
.offer-column {
  background: white;  
  min-width: 240px; 
  flex: 0 0 auto;
  border-radius: 0.75rem;
  border: 1px solid var(--lightgray);
  min-width: 150px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  overflow: hidden;
}

.offer-column .header-cell {
  padding: 1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--lightgray);
  text-align: center;
  background-color: var(--lightlogo);
  color: var(--darkgray)
}

.first-column .header-cell:first-child {
  min-height: 60px;  
}

.offer-column .amount-cell {
  padding: 1rem;
  border-bottom: 1px solid #eee;
  text-align: center;
  color: #333;
  font-weight: 500;
  background-color: #fff;
}

.offer-column .amount-cell:last-child {
  border-bottom: none;
}

.benefit-tooltip {
  background-color: white;
  position: absolute;
  z-index: 10000;
  border: 1px solid #ccc;
  padding: 10px 14px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  font-size: 14px;
  max-width: 300px;
  max-height: 400px;
  overflow-y: auto;
  line-height: 1.4;
  word-break: break-word;
  white-space: normal;
}

.amount-cell {
  position: relative;
  cursor: pointer;
}

.insurer-action-button {
  padding: 0.75rem 1rem;
  border: none;
  background-color: var(--logo);
  color: white;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin: 0; /* no gap */
  border-top: none; /* so no double border between total cell and button */
  border-radius: 0 0 0.75rem 0.75rem; /* match total cell border radius at bottom */
  width: 100%; /* full width to align perfectly */
  box-sizing: border-box;
}

.insurer-action-button:hover {
  background-color: var(--darklogo);
}

.first-column .header-cell,
.first-column .category-cell,
.offer-column .header-cell,
.offer-column .amount-cell {
  min-height: 48px;      /* or a height that fits your design */
  overflow-wrap: break-word;  /* allow text to wrap nicely */
  white-space: normal;        /* prevent nowrap */
}

/* === SCROLL BUTTONS === */
#benefit-results {
  position: relative; 
}

#container {
  position: relative;
}

.scroll-buttons {
  position: absolute;
  top: 40%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 10;
  display: block;
}

.scroll-button {
  position: absolute;
  pointer-events: auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--logo);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.scroll-left {
  left: 185px; 
}

.scroll-right {
  right: 10px; 
}

/* === Small screen override === */
@media (max-width: 800px) {
  .scroll-buttons {
    position: static;
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
    transform: none;
    width: auto;
  }

  .scroll-button {
    position: static;
    width: 44px;
    height: 44px;
    transform: none;
  }

  .scroll-left,
  .scroll-right {
    left: auto;
    right: auto;
  }
}

@media (max-width: 600px) {
  .first-column {
    width: 150px;      /* shrink width to 100px or whatever fits */
    flex-shrink: 1;    /* allow shrinking */
    min-width: 80px;   /* optionally set a min width */
  }
  
  .offer-column {
    min-width: 120px;  /* reduce width of other columns */
    flex-shrink: 1;    /* allow shrinking */
  }
  
  .offer-column .header-cell,
  .offer-column .amount-cell,
  .first-column .header-cell,
  .first-column .category-cell {
    padding: 0.5rem 0.75rem;
    min-height: 55px; 
  }

  .offer-column .amount-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;    /* horizontal padding */
    box-sizing: border-box;
  }

  .first-column .header-cell:first-child {
    min-height: 64px;  
  }
  
  /* Optional: adjust scrollable area padding */
  .scrollable-offers {
    padding-left: 0.5rem;
    gap: 8px;
  }

  .scroll-left {
    left: 85px;
  }
  .offer-column .amount-cell.total-cell {
    min-height: 75px; 
  }
}

@media (max-width: 458px) {

  .offer-column .amount-cell.total-cell {
    min-height: 95px; 
  }

}

/* Make total row distinct */
.category-cell.total-label,
.amount-cell.total-cell {
  background-color: #f9fbfc;
  border-top: 2px solid var(--gray);
  font-weight: 600;
}

/* Optional: stronger bottom border */
.amount-cell.total-cell {
  border-bottom: none;
}

/* ========================= */
/* ==== ABOUT/OOU SEKCE ==== */
/* ========================= */

body.about, .oou {
  padding-top: 60px;
}

.about-page, .oou-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem 0;
  line-height: 1.7;
  font-size: 1.05rem;
  text-align: justify;
}

.content-block {
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.about-page h3, .oou-page h3 {
  text-align: center;
  font-family: var(--main-font);
  color: var(--darkgray); 
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.cookie-link {
  text-decoration: none;
  font-weight: bold;
  color: var(--logo);
}

.cookie-link::after {
  content: "↗";
  margin-left: 0.3em;
  font-size: 0.9em;
}

hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 3rem 0 1.5rem;
}


/* ========================= */
/* ===== MEDIA QUERIES ===== */
/* ========================= */


@media (max-width: 560px) {
  body {
    padding-top: 60px; 
  }

  body.about, .oou {
    padding-top: 30px;
  }

  .logo {
    font-size: 1.5rem; 
  }

  .logo-icon {
    width: 35px; 
    margin-right: 0.4rem;
  }

  .calculator-button svg {
    width: 19px;
    height: 19px;
  }
}

@media (max-width: 435px) {
  .logo {
    font-size: 1.45rem;
    letter-spacing: 1.4px; 
  }
}

@media (max-width: 425px) {
  .logo {
    font-size: 1.4rem;
    letter-spacing: 1.3px; 
  }
  .header .container {
    padding: 0.5rem 0.5rem;
  }
}

@media (max-width: 390px) {
  .logo {
    font-size: 1.1rem;
    letter-spacing: 0.95px; 
  }
  .header .container {
    padding: 0.5rem 0.5rem;
  }
}

@media (max-width: 335px) {
  .logo {
    font-size: 1rem;
    letter-spacing: 1px; 
  }
}

/* === .index RESPONSIVE === */

/* Kontejner pojišťovny - širší a nižší */
@media (max-width: 375px) {
  .insurance-link {
    flex: 0 0 200px; 
    height: 130px;    
    
  }
}

/* Na velkých obrazovkách skrýváme 4. článek blogu */
@media (min-width: 983px) {
  .blog-card:nth-child(4) {
    display: none;
  }
}

/* Menší než 983px → změna layoutu blogu */
@media (max-width: 982px) {
  .blog-card:nth-child(4) {
    display: block;
  }
  .blog-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* flexibilní: 1–2 vedle sebe */
  }
}

/* === .article RESPONSIVE === */
@media (max-width: 900px) {
  .layout {
    flex-direction: column; /* sloupec místo řádku */
  }
  
  .related-box {
    flex: none;            /* zruší flexibilní šířku */
    width: 100%;           /* zabere celou šířku */
    margin-top: 2rem;      
    padding-left: 1rem;    
  }
  
  .article-container {
    flex: none;           
    width: 100%;
  }
}

/* === .insurer RESPONSIVE === */

/* Pod 560px uděláme telefon na řádek a mail+web pod něj */
@media (max-width: 560px) {
  #insurer-contact-info {
    justify-content: center;
  }
  /* Telefon zabere 100% šířky */
  #insurer-contact-info > .info-box:nth-child(1) {
    flex-basis: 100%;
    max-width: 100%;
    margin-bottom: 0.8rem;   
  }
  /* Mail a web - každý zabere cca polovinu */
  #insurer-contact-info > .info-box:nth-child(2),
  #insurer-contact-info > .info-box:nth-child(3) {
    flex-basis: 45%;
    max-width: 45%;
  }
}

@media (max-width: 420px) {
  #insurer-contact-info > .info-box {
    flex-basis: 100%;
    max-width: 100%;
    margin-bottom: 0.8rem;  /* mezera mezi všemi řádky */
  }
}

@media (max-width: 400px) {
  .filter-row.first-row .filter-section label {
    font-size: 1rem;
  }
}

@media (max-width: 355px) {
  .filter-row.first-row .filter-section label {
    font-size: 0.9rem;
  }
}

@media (min-width: 600px) {
  .benefits-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Pod 844px změna layoutu na sloupcový */
@media (max-width: 844px) {
  .digital-box {
    flex-direction: column;
    align-items: flex-start; /* zarovná položky vlevo */
  }
  .digital-item.align-right {
    margin-left: 0; /* zrušíme zarovnání doprava */
  }
}

/* === .insurances RESPONSIVE === */

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

@media (min-width: 600px) and (max-width: 1023px) {
  .insurances {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 599px) {
  .ad-box {
    display: none;
  }

  .related-box {
    display: block;
  }

  .insurances {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* === .about/oou RESPONSIVE === */
@media (max-width: 600px) {
  .layout,main,
  .about-page {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}