:root {
  --bg: #f7f7f7;
  --surface: #ffffff;
  --primary: #1f4e79;
  --accent: #f39c12;
  --text: #333333;
  --muted: #666666;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container {
  width: min(1100px, 90%);
  margin: 0 auto;
  padding: 2rem 0;
}

.site-header {
  background: linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)), url("../images/Fasade.jpg") center/cover no-repeat;
  color: #ffffff;
  padding: 3rem 0;
  text-align: center;
}

.site-header h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2.5rem, 4vw, 4rem);
}

.site-header p {
  margin: 0 0 2rem;
  font-size: 1.1rem;
}

/* Navigation */
.main-nav {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.nav-button {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid transparent;
  padding: 0.8rem 1.5rem;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-button:hover {
  background: rgba(255, 255, 255, 0.3);
}

.nav-button.active {
  background: var(--accent);
  border-color: var(--accent);
}

/* Page visibility */
.page {
  display: none;
}

.page.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

section {
  margin-top: 3rem;
}

section h2 {
  margin-bottom: 1rem;
  color: var(--primary);
}

section h3 {
  color: var(--primary);
}

/* Image Gallery */
.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.image-gallery img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.image-placeholder,
.person-image-placeholder {
  background: var(--surface);
  border: 2px dashed var(--muted);
  border-radius: 12px;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 1rem;
  text-align: center;
  padding: 1rem;
}

.floorplan-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  border-radius: 12px;
  background: #eef2f7;
}

.person-image {
  width: 180px;
  height: 220px;
  flex: 0 0 180px;
  object-fit: cover;
  object-position: center 38%;
  border-radius: 12px;
  display: block;
}

.contact-info {
  background: var(--surface);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.persons-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.person-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.person-info {
  flex: 1;
}

.person-info p {
  margin: 0.4rem 0;
}

@media (max-width: 700px) {
  .person-card {
    flex-direction: column;
    text-align: center;
  }

  .person-image {
    width: 160px;
    height: 190px;
    flex-basis: 190px;
  }

  .person-info {
    width: 100%;
  }
}

.info-section {
  background: var(--surface);
  padding: 2rem;
  border-radius: 12px;
  margin-top: 2rem;
  border: 1px solid #e2e8f0;
}

.info-bottom-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.floorplan-card,
.map-card {
  background: var(--surface);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
}

.floorplan-placeholder {
  min-height: 300px;
  height: 300px;
  border-radius: 12px;
  background: #eef2f7;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.95rem;
}

#map {
  position: relative;
  min-height: 300px;
  height: 300px;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #eef2f7;
}

#map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

@media (min-width: 900px) {
  #map {
    min-height: 360px;
    height: 360px;
  }
}

@media (max-width: 900px) {
  .info-bottom-grid {
    grid-template-columns: 1fr;
  }
}

/* Offices Grid */
.offices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.office-card {
  background: var(--surface);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.office-card:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  transform: translateY(-4px);
  border-color: var(--accent);
}

.office-card h3 {
  margin-top: 0;
  color: var(--primary);
}

.office-card-image {
  display: block;
  width: calc(100% + 3rem);
  height: 190px;
  margin: -1.5rem -1.5rem 1rem;
  object-fit: cover;
}

.office-image-missing {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef2f7;
  color: var(--muted);
}

.office-info {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.office-info p {
  margin: 0;
  font-size: 0.95rem;
}

.office-status {
  padding: 0.6rem 1rem;
  border-radius: 6px;
  font-weight: bold;
  text-align: center;
  margin-top: 1rem;
}

.status-available {
  background: #d4edda;
  color: #155724;
}

.status-occupied {
  background: #f8d7da;
  color: #721c24;
}

.status-unknown {
  background: #fff3cd;
  color: #664d03;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s ease;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--surface);
  padding: 2rem;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.close {
  position: absolute;
  right: 1.5rem;
  top: 1.5rem;
  font-size: 2rem;
  font-weight: bold;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.3s ease;
}

.close:hover {
  color: var(--primary);
}

.modal-body {
  margin-top: 1.5rem;
}

.office-image-placeholder {
  background: var(--bg);
  border: 2px dashed var(--muted);
  border-radius: 12px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.office-detail-image {
  display: block;
  width: 100%;
  height: 300px;
  border-radius: 10px;
  object-fit: cover;
}

#officeDetails {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#officeDetails p {
  margin: 0;
}

/* Contact Page */
.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.contact-details {
  background: var(--surface);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.contact-details p {
  margin: 1rem 0;
}

.contact-persons {
  background: var(--surface);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.persons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.person-card {
  text-align: center;
}

.person-image-placeholder {
  background: var(--bg);
  border: 2px dashed var(--muted);
  border-radius: 12px;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  margin-bottom: 1rem;
}

.person-info {
  text-align: left;
}

.person-info p {
  margin: 0.5rem 0;
  font-size: 0.95rem;
}

.site-footer {
  text-align: center;
  padding: 2rem 0;
  color: var(--muted);
}

@media (max-width: 640px) {
  .site-header {
    padding: 2rem 1rem;
  }

  .main-nav {
    flex-direction: column;
  }

  .nav-button {
    width: 100%;
  }

  .offices-grid {
    grid-template-columns: 1fr;
  }

  .persons-grid {
    grid-template-columns: 1fr;
  }

  .contact-info {
    grid-template-columns: 1fr;
  }
}
