* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Hahmlet", serif;
  background: #7d4047;
  color: #d9d9d9;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  background: #d9d9d9;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 72px;
  color: #7d4047;
}

.nav-links {
  display: flex;
  gap: 220px;
  font-size: 22px;
  font-weight: 600;
}

.nav-link {
  color: #7d4047;
  text-decoration: none;
}

.logo {
  width: 70px;
  height: auto;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: stretch;
  padding: 64px 72px;
  flex: 1;
  min-height: calc(100vh - 120px - 65px);
}

.hero-text h1 {
  font-family: "Hahmlet", serif;
  font-size: 29px;
  font-weight: 700;
  margin-bottom: 12px;
}

.subtitle {
  font-family: "Hahmlet", serif;
  font-size: 23px;
  font-weight: 400;
  margin-bottom: 32px;
}

.hero-text p {
  font-family: "Hahmlet", serif;
  font-size: 23px;
  font-weight: 400;
  margin-bottom: 32px;
  max-width: 720px;
}

.primary-button {
  display: inline-block;
  background: #d9d9d9;
  color: #7d4047;
  font-size: 24px;
  font-weight: 600;
  padding: 10px 28px;
  border-radius: 25px;
  text-decoration: none;
}

.hero-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.site-footer {
  background: #1e1e1e;
  color: #d9d9d9;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 72px;
  font-size: 15px;
}

.site-footer p {
  grid-column: 2;
  justify-self: center;
}

.social {
  display: flex;
  align-items: center;
  gap: 12px;
  grid-column: 3;
  justify-self: end;
}

.social img {
  width: 25px;
  height: 25px;
}

.projects {
  flex: 1;
  flex-direction: row;
  overflow: hidden;
  padding: 64px 72px;
  display: flex;
  align-items: center;
  width: 100%;
}

.projects-grid {
  display: grid;
  grid-auto-flow: column;
  height: 420px;
  grid-template-columns: repeat(5, 1fr);
  gap: 28px;
  width: 100%;
  align-items: stretch;
  transition: grid-template-columns 0.4s ease-in-out;
}

.project-card {
  background: #d9d9d9;
  border-radius: 28px;
  padding: 32px;
  color: #7d4047;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transition: all 0.45s ease-in-out;
  cursor: pointer;
  overflow: hidden;
}

.project-card h2 {
  font-size: 28px;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
}

.project-media {
  position: relative;
  height: 300px;
}

.project-media-set {
  position: absolute;
  inset: 0;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;

  opacity: 0;
  transform: translateY(10px) scale(0.98);
  pointer-events: none;

  transition: opacity 0.45s ease-in-out, transform 0.45s ease-in-out;
}

.project-card:not(.active) .project-media-initial {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.project-card.active .project-media-expanded {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.project-card.active .project-media-initial {
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
}

.project-media img {
  max-height: 220px;
  width: auto;
  object-fit: contain;
  transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out;
}

.project-card.active {
  flex-direction: row;
  align-items: center;
  padding: 48px 56px;
}

.project-card.active h2 {
  flex: 0 0 auto;
  max-width: 260px;
  text-align: left;
  font-size: 32px;
  margin: 0;
  margin-right: 32px;
  white-space: normal;
}

.project-card.active .project-media {
  justify-content: space-evenly;
  flex: 1;
  min-width: 0;
}

.project-card.active .project-media img {
  height: 260px;
  width: 180px;
  object-fit: cover;
}

.projects-grid.has-active .project-card.active {

  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.2);
  opacity: 1;
}

.projects-grid.has-active .project-card:not(.active) {
  padding: 0;
  justify-content: center;
  align-items: center;
}

.projects-grid.has-active .project-card:not(.active) .project-media {
  display: none;
}

.projects-grid.has-active .project-card:not(.active) h2 {
  display: none;
}

.projects-grid.has-active:has(.project-card:nth-child(1).active) {
  grid-template-columns: 4fr 0.08fr 0.08fr 0.08fr 0.08fr;
}

.projects-grid.has-active:has(.project-card:nth-child(2).active) {
  grid-template-columns: 0.08fr 4fr 0.08fr 0.08fr 0.08fr;
}

.projects-grid.has-active:has(.project-card:nth-child(3).active) {
  grid-template-columns: 0.08fr 0.08fr 4fr 0.08fr 0.08fr;
}

.projects-grid.has-active:has(.project-card:nth-child(4).active) {
  grid-template-columns: 0.08fr 0.08fr 0.08fr 4fr 0.08fr;
}

.projects-grid.has-active:has(.project-card:nth-child(5).active) {
  grid-template-columns: 0.08fr 0.08fr 0.08fr 0.08fr 4fr;
}

.project-card.active .project-media {
  justify-content: space-evenly;
}

.project-card.active .project-media-expanded {
  display: flex;
  gap: 40px;
  align-items: center;
  justify-content: center;
}

.project-card.active .project-media-expanded img {
  max-height: 300px;
  width: auto;
  object-fit: contain;
}

/* LIGHTBOX */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9999;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* =========================
   ZA MENE PAGE
========================= */

.about {
  flex: 1;
  padding: 80px 72px;
  display: flex;
  justify-content: center;
}

.about-content {
  max-width: 1000px;
  width: 100%;
  color: #d9d9d9;
}

.about-content h1 {
  text-align: center;
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 48px;
  letter-spacing: 1px;
}

.about-content p {
  font-size: 22px;
  line-height: 1.7;
  margin-bottom: 32px;
  text-align: left;
}

/* CONTACT PAGE */
.contact {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 72px;
}

.contact-content {
  width: 100%;
  max-width: 900px;
  background: #b08f93; /* svetlo rozenkasta */
  border-radius: 32px;
  padding: 48px 56px;
}

.contact-content h1 {
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 40px;
  color: #f2f2f2;
}

/* FORM */
#contact-form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 16px;
  font-weight: 600;
  color: #f2f2f2;
  text-transform: uppercase;
}

.form-group input,
.form-group textarea {
  background: #e5e5e5;
  border: none;
  border-radius: 20px;
  padding: 14px 18px;
  font-size: 16px;
  font-family: "Hahmlet", serif;
  color: #7d4047;
  resize: none;
}

.form-group textarea {
  min-height: 120px;
}

/* BUTTON */
#contact-form .primary-button {
  align-self: flex-start;
  margin-top: 12px;
  background: #7d4047;
  color: #f2f2f2;
  font-family: "Hahmlet", serif;
  font-size: 16px;
  padding: 10px 26px;
  border-radius: 20px;
  cursor: pointer;
  border: none;
  transition: background 0.3s ease;
}

#contact-form .primary-button:hover {
  background: #6a343a;
}

/* SUCCESS / ERROR MESSAGE */
.form-message {
  margin-top: 16px;
  font-size: 15px;
  font-weight: 600;
}

.form-note {
  margin-top: 12px;
  font-size: 14px;
  opacity: 0.8;
}