/* IBZ Göttingen — Main Stylesheet */

/* -------------------------------------------------------
   Reset & base
------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green-dark:   #1B4332;
  --green-mid:    #2D6A4F;
  --green-light:  #40916C;
  --gold:         #B8933F;
  --gold-light:   #E9C46A;
  --cream:        #F8F4EE;
  --cream-dark:   #F0EBE1;
  --white:        #FFFFFF;
  --text:         #1C1C1C;
  --text-muted:   #5A5A5A;
  --border:       #E3DDD5;
  --shadow-sm:    0 1px 4px rgba(0,0,0,.07);
  --shadow-md:    0 4px 16px rgba(0,0,0,.10);
  --radius:       8px;
  --max-width:    1100px;
  --header-h:     64px;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-dark); }
a:hover { color: var(--green-light); }

/* -------------------------------------------------------
   Header / nav
------------------------------------------------------- */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: var(--green-dark);
  color: #fff;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}

.header-inner {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-logo {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: -.3px;
  line-height: 1.2;
  flex-shrink: 0;
}

.site-logo span {
  display: block;
  font-size: 11px;
  font-weight: 400;
  opacity: .7;
  letter-spacing: .2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.main-nav a {
  color: rgba(255,255,255,.8);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 5px;
  transition: background .15s, color .15s;
}

.main-nav a:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.lang-toggle {
  display: flex;
  border: 1.5px solid rgba(255,255,255,.3);
  border-radius: 6px;
  overflow: hidden;
}

.lang-toggle button {
  background: transparent;
  border: none;
  color: rgba(255,255,255,.6);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  cursor: pointer;
  transition: background .15s, color .15s;
  letter-spacing: .5px;
}

.lang-toggle button.active {
  background: rgba(255,255,255,.18);
  color: #fff;
}

.lang-toggle button:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}

.btn-inquiry {
  background: var(--gold);
  color: #fff;
  text-decoration: none;
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  transition: background .15s;
  white-space: nowrap;
}

.btn-inquiry:hover { background: #a07b30; color: #fff; }

/* Hamburger for mobile */
.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}

/* -------------------------------------------------------
   Main content offset
------------------------------------------------------- */
main { padding-top: var(--header-h); }

/* -------------------------------------------------------
   Hero
------------------------------------------------------- */
#hero {
  background:
    linear-gradient(160deg, rgba(27,67,50,.82) 0%, rgba(45,106,79,.76) 60%, rgba(64,145,108,.68) 100%),
    url('/assets/images/banner.jpg') center center / cover no-repeat;
  color: #fff;
  padding: 96px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Ccircle cx='30' cy='30' r='1' fill='rgba(255,255,255,.04)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-inner {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}

#hero h1 {
  font-size: clamp(22px, 4vw, 38px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -.5px;
}

#hero .subtitle {
  font-size: clamp(15px, 2.5vw, 19px);
  opacity: .85;
  margin-bottom: 36px;
  line-height: 1.5;
}

.btn-primary {
  display: inline-block;
  background: var(--gold);
  color: #fff;
  text-decoration: none;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  transition: background .15s, transform .1s;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}

.btn-primary:hover {
  background: #a07b30;
  color: #fff;
  transform: translateY(-1px);
}

/* -------------------------------------------------------
   Sections
------------------------------------------------------- */
section {
  padding: 72px 24px;
}

section:nth-of-type(even) {
  background: var(--white);
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-banner {
  height: 150px;
  background-size: cover;
  background-position: center 40%;
  margin: -72px -24px 56px;
  opacity: .88;
}

.section-header {
  margin-bottom: 40px;
}

.section-header h2 {
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 12px;
  letter-spacing: -.3px;
}

.section-header p {
  color: var(--text-muted);
  max-width: 640px;
  font-size: 15px;
}

/* -------------------------------------------------------
   About
------------------------------------------------------- */
#about .about-text p {
  margin-bottom: 16px;
  color: var(--text);
  font-size: 15.5px;
  max-width: 760px;
}

#about .about-text p:last-child { margin-bottom: 0; }

/* -------------------------------------------------------
   Apartments — pricing cards
------------------------------------------------------- */
.apt-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.apt-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}

.apt-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.apt-card-header {
  background: var(--green-dark);
  color: #fff;
  padding: 16px 18px 14px;
}

.apt-card-header h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 3px;
}

.apt-card-header .size-meta {
  font-size: 12px;
  opacity: .75;
}

.apt-card-body {
  padding: 16px 18px;
}

.apt-plan {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.apt-plan img {
  max-height: 130px;
  width: auto;
  opacity: .9;
}

.apt-plan-clickable {
  cursor: zoom-in;
}

.apt-plan-clickable img {
  transition: opacity .2s, transform .2s;
}

.apt-plan-clickable:hover img {
  opacity: 1;
  transform: scale(1.03);
}

.apt-description {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

.apt-price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.apt-price-table td {
  padding: 4px 0;
  border-bottom: 1px solid #f0ede7;
}

.apt-price-table td:first-child { color: var(--text-muted); }
.apt-price-table td:last-child  { text-align: right; font-weight: 500; }

.apt-price-table tr.total td {
  padding-top: 8px;
  font-weight: 700;
  font-size: 14px;
  color: var(--green-dark);
  border-bottom: 2px solid var(--green-light);
}

.apt-card-footer {
  padding: 12px 18px 16px;
}

.btn-apt {
  display: inline-block;
  background: var(--green-dark);
  color: #fff;
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  transition: background .15s;
}

.btn-apt:hover { background: var(--green-mid); color: #fff; }

/* Sizes note */
.sizes-note {
  background: var(--cream-dark);
  border-left: 4px solid var(--green-light);
  padding: 14px 18px;
  font-size: 13.5px;
  color: var(--text-muted);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 36px;
}

/* -------------------------------------------------------
   Gallery
------------------------------------------------------- */
.gallery-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--green-dark);
  margin-bottom: 16px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}

.gallery-item {
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 6px;
  cursor: pointer;
  background: var(--border);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}

.gallery-item:hover img { transform: scale(1.04); }

/* Lightbox */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.lightbox-overlay.open { display: flex; }

.lightbox-img {
  max-width: 90vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-caption {
  color: rgba(255,255,255,.6);
  font-size: 13px;
  margin-top: 10px;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  opacity: .7;
}

.lightbox-close:hover { opacity: 1; }

.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.1);
  border: none;
  color: #fff;
  font-size: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,.2); }

/* -------------------------------------------------------
   Forms
------------------------------------------------------- */
#inquiry, #contact {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.form-wrapper {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  box-shadow: var(--shadow-sm);
  max-width: 760px;
}

.form-intro {
  margin-bottom: 24px;
  color: var(--text-muted);
  font-size: 14.5px;
}

.form-intro p { margin-bottom: 8px; }
.form-intro p:last-child { margin-bottom: 0; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-grid .full { grid-column: 1 / -1; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--cream);
  outline: none;
  transition: border-color .15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--green-light);
  background: var(--white);
}

.form-group textarea { resize: vertical; min-height: 90px; }

.form-group.radio-group {
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.form-group.radio-group label:first-child {
  width: 100%;
  margin-bottom: -8px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
}

.radio-option input { width: auto; }

.form-fieldset {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  grid-column: 1 / -1;
}

.form-fieldset legend {
  font-size: 12px;
  font-weight: 600;
  color: var(--green-dark);
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 0 8px;
}

.form-fieldset .form-grid {
  margin-top: 0;
}

.honeypot { display: none !important; }

.form-submit-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.btn-submit {
  background: var(--green-dark);
  color: #fff;
  border: none;
  padding: 11px 28px;
  border-radius: 7px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s;
  font-family: inherit;
}

.btn-submit:hover {
  background: var(--green-mid);
  transform: translateY(-1px);
}

.btn-submit:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

.form-msg {
  display: none;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  margin-top: 16px;
}

.form-msg.success { display: block; background: #e6f4ee; color: #1B4332; }
.form-msg.error   { display: block; background: #fde8e6; color: #c0392b; }

.required-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
}

/* -------------------------------------------------------
   Contact section layout
------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
}

.contact-info h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--green-dark);
  margin-bottom: 16px;
}

.contact-detail {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14.5px;
  align-items: flex-start;
}

.contact-detail .icon {
  color: var(--green-light);
  flex-shrink: 0;
  margin-top: 2px;
}

.map-wrap {
  margin-top: 24px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1.5px solid var(--border);
}

.map-wrap iframe {
  width: 100%;
  height: 220px;
  border: none;
  display: block;
}

.map-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--green-dark);
  margin-bottom: 8px;
}

/* -------------------------------------------------------
   Leisure
------------------------------------------------------- */
#leisure .leisure-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 32px;
}

.leisure-section h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--green-dark);
  margin-bottom: 12px;
}

.leisure-section p {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.7;
}

.leisure-section a { color: var(--green-light); }

/* -------------------------------------------------------
   Footer
------------------------------------------------------- */
footer {
  background: var(--green-dark);
  color: rgba(255,255,255,.7);
  padding: 28px 24px;
  text-align: center;
  font-size: 13px;
}

footer a {
  color: rgba(255,255,255,.65);
  text-decoration: none;
}

footer a:hover { color: #fff; }

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* -------------------------------------------------------
   Imprint modal
------------------------------------------------------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
  box-shadow: var(--shadow-md);
}

.modal h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 24px;
}

.modal h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--green-dark);
  margin: 20px 0 8px;
}

.modal p, .modal pre {
  font-size: 14px;
  color: var(--text-muted);
  white-space: pre-wrap;
  font-family: inherit;
  line-height: 1.7;
  margin-bottom: 12px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
}

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

/* -------------------------------------------------------
   Scroll-to-top
------------------------------------------------------- */
#back-to-top {
  display: none;
  position: fixed;
  bottom: 28px;
  right: 24px;
  background: var(--green-dark);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 18px;
  cursor: pointer;
  z-index: 99;
  box-shadow: var(--shadow-md);
  align-items: center;
  justify-content: center;
  transition: background .15s;
}

#back-to-top.visible { display: flex; }
#back-to-top:hover   { background: var(--green-mid); }

/* -------------------------------------------------------
   Turnstile wrapper
------------------------------------------------------- */
.turnstile-wrap {
  margin: 4px 0;
}

/* -------------------------------------------------------
   Responsive
------------------------------------------------------- */
@media (max-width: 768px) {
  .main-nav    { display: none; }
  .btn-inquiry { display: none; }

  .menu-toggle { display: flex; }

  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--green-dark);
    padding: 12px 20px 20px;
    border-top: 1px solid rgba(255,255,255,.1);
    z-index: 99;
  }

  .main-nav.open a {
    padding: 10px 4px;
    font-size: 15px;
  }

  #hero { padding: 64px 20px 56px; }

  section { padding: 52px 20px; }

  .section-banner { margin: -52px -20px 44px; height: 120px; }

  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: 1; }

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

  #leisure .leisure-sections { grid-template-columns: 1fr; gap: 24px; }

  .apt-cards { grid-template-columns: 1fr 1fr; }

  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }

  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  :root { --header-h: 56px; }

  .site-logo { font-size: 14px; }
  .site-logo span { display: none; }

  .apt-cards { grid-template-columns: 1fr; }

  .form-wrapper { padding: 20px 16px; }
}
