:root {
  --font-family: "MZ UI Gothic", "Yu Gothic", Arial, sans-serif;

  --color-bg: #ffffff;
  --color-text: #111111;
  --color-muted: #7a7a7a;
  --color-line: #eeeeee;

  --container-width: 1500px;
  --container-padding: 40px;

  --header-height: 120px;

  --radius: 0px;

  --transition: 0.35s ease;
}

html {
  scroll-behavior: smooth;
}

#projects {
  scroll-margin-top: 170px;
}

#about {
  scroll-margin-top: 80px;
}

#contact {
  scroll-margin-top: 50px;
}

/* zvýraznění menu */
.site-nav a.active {
  font-weight: 600;
}

.site-nav a.active::after {
  width: 100%;
}

.site-nav a {
  transition: all 0.25s ease;
}

/* RESET */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-family);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  font-size: 16px;
}

img {
  max-width: 100%;
  display: block;
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

/* CONTAINER */

.container {
  max-width: var(--container-width);
  margin: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

/* HEADER */

.site-header {
  position: sticky;
  top: 0;
  background: white;
  border-bottom: 1px solid transparent;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
}

.site-logo {
  height: 128px;
  width: auto;
}

.site-nav {
  display: flex;
  gap: 32px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-nav a {
  position: relative;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  height: 1px;
  width: 0;
  background: black;
  transition: var(--transition);
}

.site-nav a:hover::after {
  width: 100%;
}

/* MOBILE MENU */

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: black;
}

/* PROJECT GRID */

.projects-section {
  padding: 40px 0 90px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.project-card {
  display: block;
}

.project-card-image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: transparent;
}

.project-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-card:hover .project-card-image {
  transform: scale(1.05);
}

.project-card-content {
  padding-top: 14px;
}

.project-card-title {
  font-size: 22px;
  margin: 0;
  font-weight: 500;
}

.project-card-location {
  font-size: 15px;
  color: var(--color-muted);
  margin-top: 4px;
}

/* ABOUT */

.content-section {
  padding: 100px 0;
}

.content-section--bordered {
  border-top: 1px solid var(--color-line);
}

.content-section-inner {
  max-width: 880px;
}

.content-section h2 {
  margin: 0 0 32px 0;
  font-size: 32px;
  font-weight: 500;
}

.about-text {
  display: grid;
  gap: 22px;
  font-size: 17px;
}

.about-text p {
  margin: 0;
}

.about-photo{
  margin-top:60px;
  width:100%;
  max-width:900px;
  height:auto;
  display:block;
}

/* CONTACT */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}

.contact-card {
  border: 1px solid var(--color-line);
  padding: 26px;
  border-radius: var(--radius);
  background: white;
}

.contact-card--wide {
  grid-column: 1 / -1;
}

.contact-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.contact-card p {
  margin: 0 0 8px;
}

.contact-card p:last-child {
  margin-bottom: 0;
}

.contact-role {
  color: var(--color-muted);
  margin-bottom: 8px;
}

.contact-card a:hover {
  text-decoration: underline;
}

.contact-social a{
display:flex;
align-items:center;
gap:8px;
}

.instagram-icon{
width:18px;
height:18px;
fill:currentColor;
transition:opacity .25s ease;
}

.contact-card a:hover .instagram-icon{
opacity:.6;
}
/* PROJECT PAGE */

.project-hero {
  padding: 60px 0 40px;
}

.project-title {
  font-size: 48px;
  margin: 0 0 10px;
  font-weight: 500;
  line-height: 1.15;
}

.project-location {
  color: var(--color-muted);
  margin: 0 0 20px;
}

.project-description {
  max-width: 720px;
  font-size: 17px;
  margin: 0;
}

/* galerie téměř přes celou stránku */
.project-gallery-section .container {
  max-width: none;
  width: 100%;
  padding-left: 18px;
  padding-right: 18px;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
}

.project-gallery-item {
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.project-gallery-button {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  outline: none;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
  box-shadow: none;
}

.project-gallery-button:focus,
.project-gallery-button:focus-visible {
  outline: none;
  box-shadow: none;
}

.project-gallery-image {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  border: 0;
}

/* první obrázek přes celou šířku */
.project-gallery-item:first-child {
  grid-column: span 6;
}

/* poté se opakuje sekvence 3, 2, 3, 2... */
/* 2.-4., 7.-9., 12.-14. ... = 3 vedle sebe */
.project-gallery-item:not(:first-child):nth-child(5n + 2),
.project-gallery-item:not(:first-child):nth-child(5n + 3),
.project-gallery-item:not(:first-child):nth-child(5n + 4) {
  grid-column: span 2;
}

/* 5.-6., 10.-11., 15.-16. ... = 2 vedle sebe */
.project-gallery-item:not(:first-child):nth-child(5n),
.project-gallery-item:not(:first-child):nth-child(5n + 1) {
  grid-column: span 3;
}

/* FOOTER */

.site-footer {
  border-top: 1px solid var(--color-line);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 80px;
}

.footer-top-link {
  color: var(--color-muted);
}

.footer-top-link:hover {
  color: black;
}

/* LIGHTBOX */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-image {
  max-width: 90vw;
  max-height: 85vh;
}

.lightbox-close {
  position: absolute;
  top: 25px;
  right: 30px;
  background: none;
  border: none;
  color: white;
  font-size: 34px;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 40px;
  background: none;
  border: none;
  color: white;
}

.lightbox-prev {
  left: 40px;
}

.lightbox-next {
  right: 40px;
}

/* RESPONSIVE */

@media (max-width: 1100px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-gallery-section .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .project-gallery {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
  }
}

@media (max-width: 760px) {
  .site-logo {
    height: 48px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .menu-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 20px;
    border-bottom: 1px solid var(--color-line);
  }

  .site-nav.is-open {
    display: flex;
  }

  .content-section {
    padding: 70px 0;
  }

  .project-title {
    font-size: 36px;
  }

  .project-gallery-section .container {
    padding-left: 10px;
    padding-right: 10px;
  }

  .project-gallery {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .project-gallery-item,
  .project-gallery-item:first-child,
  .project-gallery-item:not(:first-child):nth-child(5n + 2),
  .project-gallery-item:not(:first-child):nth-child(5n + 3),
  .project-gallery-item:not(:first-child):nth-child(5n + 4),
  .project-gallery-item:not(:first-child):nth-child(5n),
  .project-gallery-item:not(:first-child):nth-child(5n + 1) {
    grid-column: span 1;
  }
}