:root {
  --pw-bg: #f4f8fc;
  --pw-bg-accent: #e8f4ff;
  --pw-surface: rgba(255, 255, 255, 0.82);
  --pw-surface-solid: #ffffff;
  --pw-text: #0f172a;
  --pw-text-muted: #64748b;
  --pw-border: rgba(148, 163, 184, 0.22);
  --pw-accent: #0ea5e9;
  --pw-accent-2: #6366f1;
  --pw-accent-soft: #e0f2fe;
  --pw-radius: 18px;
  --pw-radius-sm: 12px;
  --pw-shadow: 0 8px 32px rgba(15, 23, 42, 0.06);
  --pw-shadow-hover: 0 16px 40px rgba(14, 165, 233, 0.14);
  --pw-font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--pw-font);
  color: var(--pw-text);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(56, 189, 248, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 95% 0%, rgba(129, 140, 248, 0.14), transparent 50%),
    linear-gradient(180deg, var(--pw-bg-accent) 0%, var(--pw-bg) 45%, #f8fafc 100%);
}

.pw-page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.pw-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1rem 1.25rem;
  background: var(--pw-surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius);
  box-shadow: var(--pw-shadow);
}

.pw-logo {
  height: 32px;
  width: auto;
  flex-shrink: 0;
}

.pw-header-text h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.pw-header-text p {
  margin: 0.2rem 0 0;
  font-size: 0.92rem;
  color: var(--pw-text-muted);
}

.pw-message {
  margin: 0 0 1.5rem;
  padding: 1rem 1.15rem;
  background: var(--pw-surface);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius-sm);
  color: var(--pw-text-muted);
  line-height: 1.55;
  box-shadow: var(--pw-shadow);
}

.pw-message--error {
  background: #fff5f5;
  border-color: rgba(248, 113, 113, 0.35);
  color: #b91c1c;
}

.pw-message--compact {
  margin: 0 0 1rem;
  padding: 0.7rem 0.9rem;
  font-size: 0.9rem;
}

/* Access form (ticket + PIN) */
.pw-access-form-wrap {
  display: flex;
  justify-content: center;
  padding: 1rem 0;
}

.pw-access-card {
  width: 100%;
  max-width: 420px;
  padding: 2rem 1.75rem;
  background: var(--pw-surface-solid);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius);
  box-shadow: var(--pw-shadow);
  text-align: center;
}

.pw-access-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--pw-accent-soft), #ede9fe);
  display: grid;
  place-items: center;
}

.pw-access-icon svg {
  width: 28px;
  height: 28px;
}

.pw-access-card h2 {
  margin: 0 0 0.4rem;
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.pw-lockout-card {
  border-color: #fcd34d;
}

.pw-lockout-icon {
  background: linear-gradient(135deg, #fef3c7, #ffedd5);
}

.pw-access-lead {
  margin: 0 0 1.25rem;
  font-size: 0.92rem;
  color: var(--pw-text-muted);
  line-height: 1.5;
}

.pw-access-form {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
}

.pw-access-form label {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--pw-text);
}

.pw-access-form input {
  padding: 0.75rem 0.9rem;
  font-size: 1.05rem;
  font-family: inherit;
  border: 1.5px solid var(--pw-border);
  border-radius: var(--pw-radius-sm);
  background: #fbfdff;
  color: var(--pw-text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pw-access-form input:focus {
  border-color: var(--pw-accent);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.pw-access-submit {
  margin-top: 1.1rem;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(135deg, var(--pw-accent), var(--pw-accent-2));
  border: none;
  border-radius: var(--pw-radius-sm);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pw-access-submit:hover {
  transform: translateY(-1px);
  box-shadow: var(--pw-shadow-hover);
}

.pw-access-hint {
  margin: 1.25rem 0 0;
  font-size: 0.8rem;
  color: var(--pw-text-muted);
}

/* Gallery toolbar + notes */
.pw-gallery-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 0.9rem 1.15rem;
  background: var(--pw-surface);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius-sm);
  box-shadow: var(--pw-shadow);
}

.pw-gallery-info {
  margin: 0;
  font-size: 0.92rem;
  color: var(--pw-text-muted);
}

.pw-gallery-info strong {
  color: var(--pw-text);
  font-size: 1.05rem;
}

.pw-btn-download-all {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--pw-accent), var(--pw-accent-2));
  border-radius: var(--pw-radius-sm);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pw-btn-download-all:hover {
  transform: translateY(-1px);
  box-shadow: var(--pw-shadow-hover);
}

.pw-btn-download-all svg {
  width: 16px;
  height: 16px;
}

.pw-gallery-note {
  margin: 1.5rem 0 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--pw-text-muted);
}

.pw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 1rem;
}

.pw-photo-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 148px;
  padding: 1.25rem 1rem;
  background: var(--pw-surface-solid);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius);
  box-shadow: var(--pw-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  text-decoration: none;
  color: inherit;
}

.pw-photo-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08), rgba(129, 140, 248, 0.06));
  opacity: 0;
  transition: opacity 0.22s ease;
}

.pw-photo-card:hover {
  transform: translateY(-3px);
  border-color: rgba(14, 165, 233, 0.35);
  box-shadow: var(--pw-shadow-hover);
}

.pw-photo-card:hover::before {
  opacity: 1;
}

/* Photo card with real preview image */
.pw-photo-card--preview {
  padding: 0;
  min-height: 0;
  overflow: hidden;
  aspect-ratio: 3 / 4;
}

.pw-photo-card--preview .pw-photo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--pw-accent-soft), #ede9fe);
}

.pw-photo-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.72));
  opacity: 0.95;
  transition: opacity 0.2s ease;
}

.pw-photo-overlay svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.pw-photo-icon {
  position: relative;
  width: 44px;
  height: 44px;
  margin-bottom: 0.75rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--pw-accent-soft), #ede9fe);
  display: grid;
  place-items: center;
}

.pw-photo-icon svg {
  width: 22px;
  height: 22px;
}

.pw-photo-label {
  position: relative;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--pw-text);
}

.pw-photo-hint {
  position: relative;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--pw-accent);
  font-weight: 500;
}

.pw-footer {
  margin-top: 2.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--pw-text-muted);
  opacity: 0.85;
}

@media (max-width: 560px) {
  .pw-page {
    padding: 1.25rem 1rem 2rem;
  }

  .pw-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

/* ── Photo theme: Tatra panorama with mt7.tech & PKL logos ── */

body.pw-photo-bg {
  background: #27435f;
}

body.pw-photo-bg::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url("/images/tlo.jpg") center top / cover no-repeat;
}

body.pw-photo-bg::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0) 0%,
    rgba(15, 23, 42, 0.08) 35%,
    rgba(15, 23, 42, 0.38) 100%);
}

.pw-page--photo {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Leaves the mt7.tech and PKL logos in the sky visible above the content. */
  padding-top: clamp(7rem, 16vh, 11rem);
}

.pw-hero {
  text-align: center;
  margin-bottom: 1.75rem;
  color: #fff;
}

.pw-hero h1 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 18px rgba(15, 23, 42, 0.55);
}

.pw-hero p {
  margin: 0.4rem 0 0;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 12px rgba(15, 23, 42, 0.6);
}

.pw-page--photo .pw-access-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
}

.pw-page--photo .pw-gallery-bar {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: rgba(255, 255, 255, 0.5);
}

.pw-page--photo .pw-message {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--pw-text);
}

.pw-page--photo .pw-message--error {
  background: rgba(255, 245, 245, 0.95);
  color: #b91c1c;
}

.pw-page--photo .pw-photo-card {
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.3);
}

.pw-page--photo .pw-gallery-note {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 10px rgba(15, 23, 42, 0.6);
}

.pw-footer--photo {
  margin-top: auto;
  padding-top: 2.5rem;
  color: rgba(255, 255, 255, 0.85);
  opacity: 1;
  text-shadow: 0 1px 10px rgba(15, 23, 42, 0.6);
}

.pw-footer--photo a {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.pw-footer--photo a:hover {
  text-decoration: underline;
}

@media (max-width: 560px) {
  .pw-page--photo {
    padding-top: clamp(5rem, 14vh, 8rem);
  }
}
