/* =========================
   ZÁKLADNÍ NASTAVENÍ
========================= */
/*
:root {
  --brand: #00c4cc;        /* tyrkys z loga */
 /*
  --brand-dark: #0295a0;
  --ink: #111827;
  
   --itd-container: 1280px; /* default jako teď */
  /*
   --itd-gutter: 16px;      /* default jako teď */
/*
  }
*/

:root{
  --brand: #00c4cc;
  --brand-dark: #0295a0;

  /* layout */
  /* P3: 1280px na velkých monitorech (1440px+) nechávalo ~600-650px
     nevyužitého prostoru po stranách (viz audit). Změřeno a ověřeno, že
     1440px dává na 1440-1920px rozumně široké produktové karty (216-245px,
     5 v řadě) i čitelný detail produktu, a na 1024-1280px nemá žádný efekt
     (tam je container tak jako tak užší, protože ho omezuje šířka
     viewportu, ne tato proměnná). */
  --itd-container: 1440px;
  --itd-gutter: 16px;

  --bg-dark: #293948;
  /* MAP: katalog/CTA proměnné -> brand */
  --itd-accent: var(--brand);
  --itd-accent-strong: var(--brand-dark);
  --itd-accent-strong-hover: color-mix(in srgb, var(--brand-dark) 92%, #000 8%);
  --itd-accent-soft: color-mix(in srgb, var(--brand) 14%, #fff 86%);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  color: #333;
  padding: 0;
  margin: 0;
  font-weight: 400;
  background: #f3f4f6;
}

/* Obecný container */
.page {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
}

/* =========================
   TOP BAR
========================= */
.topbar {
  background: #f9fafb;
  color: #4b5563;
  border-bottom: 1px solid #e5e7eb;
}
.topbar-inner{
  max-width: var(--itd-container);
  margin: 0 auto;
  padding: 6px var(--itd-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar-pill {
  padding: 3px 8px;
  color: #022c22;
  font-weight: 600;
}
.topbar-center {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.topbar-right a {
  color: #4b5563;
  text-decoration: none;
  font-size: 14px;
}
.topbar-right a:hover {
  color: var(--brand-dark);
}
.topbar-sep {
  opacity: 0.6;
  margin: 0 4px;
}
.authform-sep {
  opacity: 0.6;
  margin: 0 4px;
}

/* =========================
   HLAVNÍ HLAVIČKA
========================= */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}
.site-header-inner{
  max-width: var(--itd-container);
  margin: 0 auto;
  padding: 12px var(--itd-gutter);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-logo img {
  height: 40px;
  display: block;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}
.site-nav a {
  color: #111827;
  text-decoration: none;
  font-size: 14px;
}
.site-nav a:hover {
  color: var(--brand);
}
.site-nav .nav-cta {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--brand);
  color: #ffffff;
  font-weight: 600;
  border: 1px solid transparent;
}
.site-nav .nav-cta:hover {
  background: var(--brand-dark);
}

/* =========================
   LAYOUTY
========================= */
.layout-narrow .content {
  max-width: 760px;
  margin: 0 auto;
  padding: 12px 16px;
}

.layout-wide .content-wide{
  max-width: var(--itd-container);
  margin: 0 auto;
  padding: 12px var(--itd-gutter);
}

/* =========================
   TLAČÍTKA
========================= */
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  font-size: 14px;
}
.btn-primary {
  background: var(--brand);
  color: #ffffff;
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--brand-dark);
}
.btn-secondary {
  background: #111827;
  color: #e5e7eb;
  border-color: #4b5563;
}
.btn-secondary:hover {
  background: transparent;
}
/* „success“ varianta v barvách ITDelivery */
.btn-success {
  background: var(--itd-accent, #13b6c7);
  color: #ffffff;
   text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
}

.btn-success:hover {
  background: var(--itd-accent-hover, #11a1b0);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.16);
  transform: translateY(-1px);
}

.btn-success:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

/* =========================
   HERO (HOME vs LP)
========================= */
/* HOME – tmavý hero */

.home-hero {
  background: var(--bg-dark);
  color: #e5e7eb;
  padding-top: 20px;
  padding-bottom: 12px;
}
  
/*
  .home-hero {
  background:
    radial-gradient(1200px 500px at 90% 10%, rgba(59,130,246,.18), transparent 60%),
    radial-gradient(900px 430px at 0% 100%, rgba(16,185,129,.16), transparent 55%),
    linear-gradient(180deg, #FFFFFF 0%, #F7FAFF 100%);
  border-bottom: 1px solid #E6ECF5;
  padding: 24px 15px; 
}
  */


.home-hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand);
  margin-bottom: 8px;
}
.home-hero h1 {
  font-size: 28px;
  line-height: 1.2;
  margin-bottom: 12px;
}
.home-hero .hero-text {
  line-height: 1.5;
  margin-bottom: 16px;
  color: #e5e7eb;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.hero-mini {
  font-size: 13px;
  color: #9ca3af;
}

/* LP – světlý hero */
.lp-hero {
  background: #ffffff;
  padding-top: 32px;
  padding-bottom: 24px;
}
.lp-hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand);
  margin-bottom: 8px;
  font-size: 12px;
}
.lp-hero h1 {
  font-size: 28px;
  line-height: 1.2;
  margin: 0 0 8px;
}
.lp-perex {
  font-size: 15px;
  color: #4b5563;
  margin-bottom: 18px;
}
.lp-video {
  margin: 16px 0 20px;
}
.lp-video iframe {
  width: 100%;
  min-height: 320px;
  border-radius: 12px;
}
.lp-content {
  font-size: 15px;
  line-height: 1.6;
}
.lp-content h2,
.lp-content h3 {
  margin-top: 24px;
  margin-bottom: 8px;
}
.lp-content ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

/* =========================
   SEGMENTY (HOME)
========================= */
.home-segments {
  background: #f9fafb;
}
.segments-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.segment-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 18px;
  border: 1px solid #e5e7eb;
}
.segment-card h2 {
  font-size: 20px;
  margin-bottom: 6px;
}
.segment-card p {
  margin-bottom: 10px;
}
.segment-link {
  color: var(--brand-dark);
  text-decoration: none;
}
.segment-link:hover {
  text-decoration: underline;
}

/* =========================
   KATALOG (HOME)
========================= */
.home-catalog .section-header h2 {
  font-size: 20px;
  margin-bottom: 4px;
}
.home-catalog .section-header p {
  color: #4b5563;
  margin-bottom: 16px;
}
.home-catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.product-card {
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 14px;
  background: #ffffff;
}
.product-card a {
  text-decoration: none;
  color: inherit;
}
.product-title {
  font-weight: 600;
  margin-bottom: 4px;
}
.product-meta {
  color: #6b7280;
  margin-bottom: 8px;
}
.product-price {
  font-weight: 600;
  margin-bottom: 6px;
}
.product-cta {
  color: var(--brand-dark);
}
.home-catalog-more {
  margin-top: 16px;
}
.link-more {
  color: var(--brand-dark);
  text-decoration: none;
}
.link-more:hover {
  text-decoration: underline;
}

/* =========================
   JAK TO FUNGUJE, ZNAČKY, VIDEO
========================= */
.home-how h2 {
  font-size: 20px;
  margin-bottom: 10px;
}
.how-steps {
  padding-left: 18px;
}
.how-steps li {
  margin-bottom: 8px;
}

.home-brands {
  background: #f3f4f6;
}
.home-brands h2 {
  font-size: 18px;
  margin-bottom: 12px;
}
.brands-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}
.brands-row span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
}
.brands-note {
  color: #4b5563;
}

.home-video h2 {
  font-size: 18px;
  margin-bottom: 6px;
}
.video-wrapper {
  margin-top: 10px;
}
.yt-lazy {
  position: relative;
  padding-top: 56.25%;
  background: #000;
}
.yt-lazy iframe,
.yt-lazy .yt-thumb {
  position: absolute;
  inset: 0;
}
.yt-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
}
.yt-play {
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
}

/* =========================
   ČLÁNKY NA HOME
========================= */
.home-articles h2 {
  font-size: 18px;
  margin-bottom: 8px;
}
.article-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.article-list li {
  margin-bottom: 6px;
}
.article-list a {
  color: #111827;
  text-decoration: none;
}
.article-list a:hover {
  color: var(--brand);
}
.articles-more {
  margin-top: 8px;
}

/* =========================
   SEO TEXT HOME
========================= */
.home-seo h2 {
  font-size: 18px;
  margin-bottom: 8px;
}
.home-seo p {
  line-height: 1.6;
  margin-bottom: 8px;
}



@media (max-width: 768px) {
  .site-footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .segments-grid,
  .home-catalog-grid {
    grid-template-columns: 1fr;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .site-footer-inner {
    grid-template-columns: 1fr;
  }
}










/* Obecný box pro alerty */
.alert {
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 18px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
}

/* Text uvnitř alertu */
.alert-text {
  display: inline-block;
}

/* Zelený – success */
.alert-success {
  background-color: #ecfdf3;   /* světlá zelená */
  border-color: #bbf7d0;       /* světlejší okraj */
  color: #166534;              /* tmavší zelený text */
}

/* Červený – error / danger */
.alert-danger {
  background-color: #fef2f2;   /* světlá červená */
  border-color: #fecaca;
  color: #991b1b;
}

/* Modrý – info */
.alert-info {
  background-color: #eff6ff;   /* světlá modrá */
  border-color: #bfdbfe;
  color: #1d4ed8;
}



/********************************************
 *  Breadcrumb
 ********************************************/

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--itd-muted);
  margin-bottom: 24px;
}

.breadcrumb__item a {
  color: var(--itd-muted);
  text-decoration: none;
}

.breadcrumb__item a:hover {
  color: var(--itd-accent);
  text-decoration: underline;
}

.breadcrumb__sep {
  color: #9ca3af;
}

.contact-breadcrumb__item--current {
  font-weight: 600;
  color: #111827;
}

/* Na mobilech schovej slogan + e-mail,
   nech jen ITDelivery + přihlášení/registraci */
@media (max-width: 640px) {
  /* schovat slogan vedle pilulky */

  .topbar-left span:nth-child(2) {
    display: none;
  }

  /* schovat blok s e-mailem (telefon byl odstraněn z topbaru úplně) */
  .topbar-center {
    display: none;
  }

  /* trochu srovnat zarovnání zbylých věcí */
  .topbar-inner {
    justify-content: space-between;
    gap: 8px;
  }
}


/* MOBIL: v hlavičce jen logo + tlačítko "Poslat poptávku" vpravo */
@media (max-width: 640px) {

  /* zarovnat navigaci doprava (řádek logo|nav dává @media max-width:900px) */
  .site-nav {
    margin-left: auto;
    flex-wrap: nowrap;
  }

  /* schovat běžné odkazy, nechat jen CTA */
  .site-nav a:not(.nav-cta) {
    display: none;
  }

  /* trošku kompaktnější tlačítko na mobilu */
  .site-nav .nav-cta {
    padding: 6px 12px;
    font-size: 14px;
  }
}





/* desktop: logo | search (center) | nav */
.site-header-inner{
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}

/* search uprostřed, ne přes celou stránku */
.header-search{
  justify-self: center;
  width: min(620px, 100%);
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 280px;
}

/* mobil/tablet override MUSÍ být textově AŽ PO desktopovém pravidle výše --
   obě mají stejnou specificitu (0,1,0) a beze media query k dřívějšímu bloku
   by ho "auto 1fr auto" z desktopového pravidla přebilo pořadím v souboru
   (to byl původní bug: media query stála před nepodmíněným pravidlem). */
@media (max-width: 900px){
  /* .site-header-inner je display:grid -- flex-direction by tu neměl žádný
     účinek, proto layout na mobilu/tabletu řešíme přes grid-template-*  */
  .site-header-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "logo nav"
      "search search";
    row-gap: 10px;
    align-items: center;
  }
  .site-logo{ grid-area: logo; justify-self: start; }
  .site-nav{ grid-area: nav; justify-self: end; }
  .header-search{
    grid-area: search;
    justify-self: stretch;
    width: 100%;
    min-width: 0;
  }
}

/* input ať se hezky vejde do formu */
.header-search__input{
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 14px;

  border: 1px solid rgba(0,0,0,.14);
  border-radius: 10px;
  background: #fff;
  outline: none;
  box-sizing: border-box;
}

.header-search__input:focus{
  border-color: rgba(0,196,204,.7);
  box-shadow: 0 0 0 4px rgba(0,196,204,.16);
}


.header-search__btn{
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;

  border: 1px solid var(--brand-dark);
  background: var(--brand-dark);
  color: #fff;

  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}

.header-search__btn:hover{
  filter: brightness(0.96);
}

.header-search__btn:active{
  transform: translateY(1px);
}




/* ========= HLAVNI KATEGORIE: LIŠTA VEDLE SEBE NAD MEGA NAVIGACI JS ========= */
.catalog-catbar{
  width: 100%;
  margin: 0;
  background:#fff;
  border-bottom: 1px solid rgba(0,0,0,.08);
  z-index: 50;
}

.catalog-catbar__inner{
  max-width: var(--itd-container);
  margin: 0 auto;
  padding: 0 var(--itd-gutter);
  box-sizing: border-box;
}

.catitem{
  display:inline-flex;
  align-items:center;
  padding: 10px 12px ;
  text-decoration:none;
  color:#111827;
  font-weight: 500;
  font-size: 13px;
  border-right: 1px solid #e5e7eb;
  white-space: nowrap;
  position: relative;
}

.catitem:last-child{ border-right: 0; }
.catitem:hover{ background:#f3f4f6; }
.catitem.is-active{
  background: var(--itd-accent-soft);
  color: var(--itd-accent-strong);
  box-shadow: inset 0 -2px 0 0px;
}

/* Mobilní přepínač kategorií: na desktopu skrytý, lišta beze změny. */
.catbar-toggle{ display: none; }

@media (max-width: 640px){
  .catbar-toggle{
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    background: #fff;
    border: 0;
    font: inherit;
    font-weight: 600;
    font-size: 14px;
    color: #111827;
    cursor: pointer;
    text-align: left;
  }
  .catbar-toggle__label{
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .catbar-toggle__icon{
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    margin-left: 10px;
    border-right: 2px solid #6b7280;
    border-bottom: 2px solid #6b7280;
    transform: rotate(45deg);
    transition: transform .15s ease;
  }
  .catbar-toggle[aria-expanded="true"] .catbar-toggle__icon{
    transform: rotate(-135deg);
  }

  /* Kategorie jsou defaultně sbalené -- na mobilu nezabírají několik řádků
     nad obsahem. Rozbalí se kliknutím na .catbar-toggle (viz katalog-catbar-toggle.js). */
  .catalog-catbar__inner{
    display: none;
    flex-direction: column;
    padding: 0;
  }
  .catalog-catbar__inner.is-open{
    display: flex;
  }
  .catitem{
    width: 100%;
    box-sizing: border-box;
    border-right: 0;
    border-bottom: 1px solid #e5e7eb;
  }
  .catitem:last-child{ border-bottom: 0; }
}

/* ===== Mega menu – FIXED (neposkakuje dole) ===== */
.catalog-catwrap{
  position: relative;
  margin: 0px 0 12px;
}

/* tohle je ta klíčová věc: obsah dropdownu je jako container */
.catalog-mega__inner{
  max-width: var(--itd-container);
  margin: 0 auto;
  padding: 18px var(--itd-gutter);
  box-sizing: border-box;
}

/* dropdown (pozici a šířku mu dá JS přes inline style) */
.catalog-mega{
  position: fixed;
  left: 0;
  top: 0;
  width: 0;

  z-index: 40;     /* dropdown pod lištou */
  pointer-events: auto;

  border: 1px solid #e5e7eb;
  border-top: 0;
  border-radius: 0 0 12px 12px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);

  overflow: auto;         /* ať max-height funguje */
}

.catalog-mega[hidden]{ display:none; }

/* OPEN: opticky spoj lištu + dropdown bez změny výšky */
.catalog-catwrap.is-open .catalog-catbar{
  border-bottom-color: transparent;
}

/* 5 sloupců jako Synnex */
.mega-groups{
  columns: 5 190px;
  column-gap: 18px;
  padding: 6px;
}

.mega-group{
  break-inside: avoid;
  padding: 8px 8px;
}

.mega-title{
  display:block;
  font-weight: 700;
  font-size: 13px;
  color:#111827;
  text-decoration:none;
  margin-bottom: 6px;
}

.mega-title:hover{
  text-decoration: underline;
}

.mega-link{
  display:block;
  padding: 3px 0;
  font-size: 13px;
  color:#111827;
  text-decoration:none;
}

.mega-link:hover{
  color: var(--itd-accent-strong);
  text-decoration: underline;
}

.mega-link--sub{
  padding-left: 12px;
  font-size: 12px;
  color:#4b5563;
}

/* responsive: z 5 na míň */
@media (max-width: 1250px){ .mega-groups{ columns: 4 190px; } }
@media (max-width: 980px){  .mega-groups{ columns: 3 190px; } }
@media (max-width: 720px){  .mega-groups{ columns: 2 190px; } }
@media (max-width: 520px){  .mega-groups{ columns: 1 190px; } }
