/* ============================================================
   Page-specific styles
   ============================================================ */

/* Shared content page utilities */
.page-intro {
  margin-bottom: var(--space-lg);
  max-width: 720px;
}

.page-intro h1 { margin-bottom: var(--space-md); }

.page-intro p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

/* === O mně (about) === */
.about-layout {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: var(--space-xl);
  align-items: start;
}

.about-photo {
  position: sticky;
  top: 130px;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.about-text h1 { margin-bottom: var(--space-lg); }
.about-text p + p { margin-top: 1.25em; }

.about-details { margin-top: var(--space-md); max-width: none; }

@media (max-width: 767px) {
  .about-layout { grid-template-columns: 1fr; gap: var(--space-lg); }
  .about-photo { position: static; aspect-ratio: 4 / 3; max-height: 400px; }
}

/* === Co dělám === */
.services-list {
  max-width: 720px;
}

.service-item {
  padding: var(--space-lg) 0;
  border-bottom: var(--border-thin);
}

.service-item:last-child { border-bottom: none; }

.service-item h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0;
}

.service-item p + p { margin-top: 0.75em; }

.details-list {
  margin-top: 0.75em;
  padding-left: 1.2em;
  list-style: disc;
}

.details-list li {
  padding: 0.3em 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.service-note {
  margin-top: 1em;
  font-size: 1.05rem;
  color: var(--color-text-muted);
  font-style: italic;
}

.service-subtitle {
  margin-top: 0.25em;
  margin-bottom: 0.75em;
  font-size: 1.05rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* === Jak pracuji === */
.jak-content {
  max-width: 720px;
}

.jak-content h2 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  padding-bottom: 0.4em;
  border-bottom: var(--border-thin);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.jak-content h3 {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-sm);
}

.jak-content p { color: var(--color-text-muted); }
.jak-content p + p { margin-top: 1em; }

.jak-content .jak-image {
  display: block;
  width: 100%;
  height: auto;
  margin: var(--space-xl) 0;
  border-radius: var(--radius-sm);
}

/* === Kontakt === */
.kontakt-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--space-xl);
  align-items: start;
  margin-top: var(--space-lg);
}

.kontakt-info h1 { margin-bottom: var(--space-lg); }

.kontakt-info p {
  margin-top: var(--space-sm);
  font-size: 1rem;
  color: var(--color-text-muted);
}

.kontakt-info strong { color: var(--color-text); font-weight: var(--fw-semi); }

.kontakt-info a {
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 1px;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.kontakt-info a:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.kontakt-map {
  width: 100%;
  height: 420px;
  border: var(--border-thin);
  border-radius: var(--radius-sm);
  filter: grayscale(30%);
  transition: filter var(--transition-base);
}

.kontakt-map:hover { filter: grayscale(0%); }

@media (max-width: 767px) {
  .kontakt-layout { grid-template-columns: 1fr; gap: var(--space-lg); }
  .kontakt-map { height: 320px; }
}

/* === Project detail === */
.project-detail-header {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: var(--border-thin);
}

.project-detail-header h1 { margin-bottom: var(--space-md); }

.project-detail-header p {
  max-width: 720px;
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

/* Project detail header with optional head (garden plan) image.
   Default = single column (text only). When JS confirms the head image
   loaded, it adds .project-detail--has-head to switch to two columns. */
.project-detail {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: var(--border-thin);
}

.project-detail__text h1 { margin-bottom: var(--space-md); }

.project-detail__text p {
  max-width: 720px;
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

/* Hidden until JS reveals it (only when <prefix>-head.jpg exists) */
.project-detail__head[hidden] { display: none; }

/* Two-column layout: text ~40%, head image ~60% (default) */
.project-detail--has-head {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: var(--space-xl);
  align-items: center;
}

/* For very tall (portrait-ish) head images, give text more room so the
   image column can be narrower without leaving big empty side gutters. */
.project-detail--has-head.project-detail--head-tall {
  grid-template-columns: 3fr 2fr;
}

.project-detail--has-head .project-detail__text p { max-width: none; }

/* Clickable head image — uncropped, original aspect ratio.
   The button is a flex box so the image (which may be capped by
   max-height and thus narrower than the column) stays centered. */
.project-head__btn {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 0;
}

.project-head__img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  /* --head-max-h is set by JS to 2× the gallery tile height so a tall
     head image never dwarfs the rest of the page. Falls back to a
     viewport-based cap if JS hasn't measured yet. */
  max-height: var(--head-max-h, 80vh);
  border-radius: var(--radius-sm);
  transition: opacity var(--transition-fast);
}

.project-head__btn:hover .project-head__img { opacity: 0.92; }

.project-head__btn:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

@media (max-width: 767px) {
  /* Stack: text above, then the uncropped head image at full width.
     On mobile the head image sits in flow as the first gallery item
     and uses the available column width — no extra height cap needed. */
  .project-detail--has-head,
  .project-detail--has-head.project-detail--head-tall {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  .project-head__img {
    width: 100%;
    max-height: none;
  }
}

.project-back {
  margin-top: var(--space-xl);
}

.project-back a {
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  transition: color var(--transition-fast);
}

.project-back a:hover { color: var(--color-accent); }

/* === Floristika sectioned gallery headings === */
.gallery-section-heading {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: var(--fw-semi);
  color: var(--color-text-muted);
}

.gallery-section-heading:first-of-type {
  margin-top: 0;
}
