/* ==========================================================================
   AME Sadrokartony – doplnkové štýly
   Väčšina dizajnu je v Tailwind triedach; tu sú iba veci, ktoré
   sa utility triedami robia nepohodlne (glass, vzory, range slider…).
   ========================================================================== */

:root {
  --header-h: 88px;
  --brand-300: #8ECCE4;
  --brand-500: #359CCB;
  --brand-800: #1F4E66;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-tap-highlight-color: transparent;
  /* Vypne zoom dvojitým ťuknutím (a 300ms oneskorenie kliknutia) na mobile.
     Zoom dvoma prstami ostáva povolený kvôli prístupnosti. */
  touch-action: manipulation;
}

a, button, input, select, textarea, label, [role="button"] {
  touch-action: manipulation;
}

body {
  background-color: #FAFCFE;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--brand-300); color: #0B0F14; }

[x-cloak] { display: none !important; }

/* Prístupný focus */
:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 3px;
  border-radius: 8px;
}

/* --- Glassmorphism -------------------------------------------------------- */
.glass {
  background: rgba(255, 255, 255, .68);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border: 1px solid rgba(255, 255, 255, .75);
}

.glass-dark {
  background: rgba(14, 38, 51, .55);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, .14);
}

/* --- Gradient text a okraje ---------------------------------------------- */
.text-gradient {
  background: linear-gradient(100deg, #5BB3D7 0%, #359CCB 40%, #1F4E66 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gradient-border {
  position: relative;
  background: linear-gradient(#fff, #fff) padding-box,
              linear-gradient(135deg, rgba(142,204,228,.9), rgba(53,156,203,.35) 45%, rgba(31,78,102,.6)) border-box;
  border: 1px solid transparent;
}

/* --- Pozadia ------------------------------------------------------------- */
.bg-grid {
  background-image:
    linear-gradient(to right, rgba(31,78,102,.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(31,78,102,.07) 1px, transparent 1px);
  background-size: 48px 48px;
}

.bg-dots {
  background-image: radial-gradient(rgba(31,78,102,.16) 1px, transparent 1px);
  background-size: 22px 22px;
}


/* --- Galéria ------------------------------------------------------------- */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* --- Pred / po posuvník -------------------------------------------------- */
.ba-range {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: ew-resize;
}
.ba-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 48px;
  height: 100vh;
  background: transparent;
}
.ba-range::-moz-range-thumb {
  width: 48px;
  height: 100vh;
  background: transparent;
  border: 0;
}
.ba-range:focus-visible + .ba-handle .ba-knob {
  box-shadow: 0 0 0 4px rgba(53,156,203,.45);
}

/* --- Formulár ------------------------------------------------------------ */
.field {
  width: 100%;
  border-radius: 14px;
  border: 1px solid #DCE6EC;
  background: rgba(255,255,255,.9);
  padding: .8rem 1rem;
  font-size: 16px; /* min. 16px – inak iPhone pri kliknutí do poľa priblíži stránku */
  color: #0B0F14;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field::placeholder { color: #9AA6B1; }
.field:hover { border-color: #BCE1F0; }
.field:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 4px rgba(53,156,203,.15);
  background: #fff;
}
.field[aria-invalid="true"] {
  border-color: #E5484D;
  box-shadow: 0 0 0 4px rgba(229,72,77,.10);
}
select.field {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6772' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .9rem center;
  background-size: 1.1rem;
  padding-right: 2.5rem;
}

/* --- Pohyb – rešpektujeme nastavenie systému ----------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* --- Právne stránky (ochrana osobných údajov) ---------------------------- */
.legal > h2 {
  margin-top: 3.5rem;
  margin-bottom: 1rem;
  font-family: Sora, "Plus Jakarta Sans", sans-serif;
  font-size: 1.5rem;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #0B0F14;
  scroll-margin-top: 7rem;
}
.legal > p:not(.not-legal) {
  margin: 1rem 0;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: #3A4651;
}
.legal > ul {
  margin: 1rem 0;
  padding-left: 1.25rem;
  list-style: disc;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: #3A4651;
}
.legal > ul li { margin: .35rem 0; padding-left: .25rem; }
.legal > ul li::marker { color: #359CCB; }
.legal strong { color: #0B0F14; font-weight: 600; }
.legal > p a, .legal > ul a, .legal td a {
  color: #1F678D;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: #BCE1F0;
  text-underline-offset: 3px;
  transition: text-decoration-color .2s;
}
.legal > p a:hover, .legal > ul a:hover, .legal td a:hover { text-decoration-color: #359CCB; }
#cookies { scroll-margin-top: 7rem; }

/* Hlavička – takmer nepriehľadné sklo, aby dobre vyzerala aj nad tmavou pätičkou */
.glass-solid {
  background: rgba(255, 255, 255, .9);
}

/* Tabuľky v zásadách – na mobile ako karty pod sebou (bez posúvania do strany) */
@media (max-width: 639px) {
  .legal-table thead { display: none; }
  .legal-table, .legal-table tbody, .legal-table tr, .legal-table td { display: block; width: 100%; }
  .legal-table tr { padding: .75rem 0; }
  .legal-table td { padding: .35rem 1rem !important; }
  .legal-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: .1rem;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #8A95A0;
  }
}
