@import url("https://fonts.googleapis.com/css2?family=Karla:wght@400;500;600;700&family=Work+Sans:wght@400;500;600;700&display=swap");

:root {
  --color-bg: #ffffff;
  --color-bg-tint: #ffffff;
  --color-surface: #ffffff;
  --color-text: #203851;
  --color-text-muted: #8999af;
  --color-accent: #ff9000;
  --color-accent-dark: #e07d00;
  --color-navy: #203851;
  --color-border: #e3e8ef;
  --color-success: #4c7a5e;
  --color-danger: #b3453a;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(32, 56, 81, 0.08);
  --font-heading: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--color-bg-tint);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.5s ease;
}

/* Jemný farebný nádych pozadia podľa zvolenej kategórie fotenia */
body[data-typ="newborn"] {
  --color-bg-tint: #fdf1e7;
}

body[data-typ="tehotenske"] {
  --color-bg-tint: #fdeae7;
}

body[data-typ="portret"] {
  --color-bg-tint: #eef3f8;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  color: var(--color-text);
  line-height: 1.2;
}

a {
  color: var(--color-accent-dark);
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}

.card.clickable {
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.card.clickable:hover,
.card.clickable:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(44, 38, 34, 0.12);
}

.card.selected {
  border-color: var(--color-accent);
  outline: 2px solid var(--color-accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--color-accent);
  color: #fff;
  transition: background 0.15s ease;
}

.btn:hover {
  background: var(--color-accent-dark);
}

.btn:disabled {
  background: #cbbfae;
  cursor: not-allowed;
}

.btn.secondary {
  background: transparent;
  color: var(--color-accent-dark);
  border: 1px solid var(--color-border);
}

.btn.danger {
  background: var(--color-danger);
}

.btn.small {
  padding: 8px 14px;
  font-size: 0.85rem;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: 1rem;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  width: 100%;
  background: #fff;
  color: var(--color-text);
}

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-text-muted);
}

.field {
  margin-bottom: 16px;
}

.price-tag {
  font-weight: 700;
  color: var(--color-accent-dark);
}

.muted {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge.free {
  background: #e4efe8;
  color: var(--color-success);
}

.badge.booked {
  background: #f5e7e5;
  color: var(--color-danger);
}

.badge.closed {
  background: #eee;
  color: var(--color-text-muted);
}

.steps {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.step-dot {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--color-border);
}

.step-dot.active {
  background: var(--color-accent);
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

.top-nav .brand {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  text-decoration: none;
  color: var(--color-text);
}

.instructions summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--color-accent-dark);
  list-style: none;
}

.instructions summary::-webkit-details-marker {
  display: none;
}

.instructions summary::before {
  content: "▸ ";
}

.instructions[open] summary::before {
  content: "▾ ";
}

.instructions p {
  margin-top: 12px;
  margin-bottom: 0;
  color: var(--color-text);
  font-size: 0.9rem;
  line-height: 1.6;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  min-width: 240px;
  padding: 6px;
  z-index: 20;
}

.nav-dropdown-menu[hidden] {
  display: none;
}

.nav-dropdown-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.9rem;
}

.nav-dropdown-menu a:hover {
  background: var(--color-bg-tint);
  color: var(--color-accent-dark);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 480px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.alert {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.alert.error {
  background: #f5e7e5;
  color: var(--color-danger);
}

.alert.success {
  background: #e4efe8;
  color: var(--color-success);
}

.hero {
  position: relative;
  text-align: center;
  padding: 90px 20px;
  background-image: linear-gradient(180deg, rgba(32, 56, 81, 0.55), rgba(32, 56, 81, 0.72)), url("/assets/img/hero.jpg");
  background-size: cover;
  background-position: center 30%;
  color: #fff;
}

.hero h1 {
  font-size: 2.4rem;
  margin-bottom: 10px;
  color: #fff;
}

.hero .muted {
  color: rgba(255, 255, 255, 0.85);
  max-width: 480px;
  margin: 0 auto;
}

@media (max-width: 480px) {
  .hero {
    padding: 60px 20px;
  }

  .hero h1 {
    font-size: 1.7rem;
  }
}

footer {
  text-align: center;
  padding: 30px 20px;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cal-month-label {
  text-transform: capitalize;
  font-family: var(--font-heading);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-grid-header {
  margin-bottom: 4px;
}

.cal-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.cal-cell-label {
  font-weight: 600;
  color: var(--color-text-muted);
  aspect-ratio: auto;
  font-size: 0.75rem;
}

.cal-cell-has-data {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  cursor: pointer;
}

.cal-cell-has-data:hover {
  border-color: var(--color-accent);
}

.cal-cell-today .cal-daynum {
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: 2px;
}

.cal-cell-selected {
  border-color: var(--color-accent);
  outline: 2px solid var(--color-accent);
}

.cal-daynum {
  line-height: 1;
}

.cal-dots {
  display: flex;
  gap: 2px;
  margin-top: 2px;
}

.cal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.cal-dot-free {
  background: var(--color-success);
}

.cal-dot-booked {
  background: var(--color-danger);
}

.cal-dot-closed {
  background: var(--color-text-muted);
}

.cal-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}

.loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 0;
  color: var(--color-text-muted);
}

.spinner {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2.5px solid var(--color-border);
  border-top-color: var(--color-accent);
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.success-check {
  width: 64px;
  height: 64px;
  margin: 4px auto 16px;
}

.success-check circle {
  fill: none;
  stroke: var(--color-success);
  stroke-width: 3;
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: success-circle 0.5s ease-out forwards;
}

.success-check path {
  fill: none;
  stroke: var(--color-success);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: success-check 0.35s ease-out 0.45s forwards;
}

@keyframes success-circle {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes success-check {
  to {
    stroke-dashoffset: 0;
  }
}

.success-card {
  text-align: center;
  opacity: 0;
  animation: success-fade-in 0.4s ease-out forwards;
}

@keyframes success-fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
