/* ============================================================================
   PropStack Listing - Styles
   Angepasst an sic-immobilien.de Website Theme
   ============================================================================ */

:root {
  --primary-color: #012060;
  --primary-hover: #000000;
  --text-dark: #2c2c2c;
  --text-body: #5A5E67;
  --text-light: #999999;
  --border-color: #e0e0e0;
  --bg-light: #f8f9fa;
}

/* === CONTAINER === */
.propstack-container {
  max-width: 100%;
  margin: 30px auto;
  padding: 20px;
  font-family: "Source Sans 3", sans-serif;
  font-size: 18px;
  color: var(--text-body);
}

.propstack-loading {
  text-align: center;
  padding: 60px 20px;
  font-size: 18px;
  color: var(--text-body);
}

.propstack-error {
  background: #fee;
  border-left: 4px solid #c00;
  padding: 20px;
  border-radius: 4px;
  color: #c00;
  margin: 20px 0;
}

/* === ÜBERSICHT GRID === */
.propstack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 30px;
}

/* === PROPERTY CARD === */
.property-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.property-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(1,32,96,0.15);
  border-color: var(--primary-color);
}

.card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center;
  background: #f5f5f5;
  display: block;
  aspect-ratio: 4 / 3;
}

.card-content {
  padding: 20px;
}

.card-title {
  font-family: "Source Serif 4", serif;
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: var(--text-dark);
  line-height: 1.3;
  min-height: 50px;
}

.card-location {
  display: flex;
  align-items: center;
  color: var(--text-body);
  font-size: 16px;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
  padding-left: 0;
}

.card-location::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23012060'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

.card-meta-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-meta-item {
  font-size: 16px;
  color: var(--text-body);
  line-height: 1.6;
}

.card-meta-item strong {
  color: var(--primary-color);
  font-weight: 600;
}

/* === DETAILSEITE === */
.property-detail {
  background: white;
  padding: 0px;
  border-radius: 8px;
  margin-top: 30px;
}

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary-color);
  text-decoration: none;
  font-size: 16px;
  margin-bottom: 25px;
  padding: 8px 16px;
  border: 1px solid var(--primary-color);
  border-radius: 4px;
  transition: all 0.2s;
}

.detail-back:hover {
  background: var(--primary-color);
  color: white;
}

.detail-title {
  font-family: "Source Serif 4", serif;
  font-size: 48px;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: var(--text-dark);
  line-height: 1.3;
}

.detail-location {
  display: flex;
  align-items: center;
  color: var(--text-body);
  font-size: 18px;
  margin-bottom: 25px;
}

.detail-location::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23012060'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

.detail-price {
  font-size: 38px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 35px;
}

/* === BILDERGALERIE === */
.gallery-section {
  margin: 30px 0;
}

.gallery-main {
  position: relative;
  width: 100%;
  height: 500px;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 15px;
}

.gallery-main-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.95);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10;
}

.gallery-nav:hover {
  background: white;
  transform: translateY(-50%) scale(1.1);
}

.gallery-nav.prev {
  left: 15px;
}

.gallery-nav.next {
  right: 15px;
}

.gallery-counter {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.75);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

.gallery-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 0;
}

.gallery-thumb {
  width: 100px;
  height: 75px;
  object-fit: cover;
  cursor: pointer;
  border: 3px solid transparent;
  border-radius: 6px;
  flex-shrink: 0;
  transition: all 0.2s;
}

.gallery-thumb:hover {
  opacity: 0.8;
}

.gallery-thumb.active {
  border-color: var(--primary-color);
}

/* === DATEN-SEKTION === */
.data-section {
  margin: 40px 0;
}

.section-title {
  font-family: "Source Serif 4", serif;
  font-size: 26px;
  font-weight: 600;
  margin: 0 0 20px 0;
  color: var(--text-dark);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fafafa;
  border-radius: 8px;
  overflow: hidden;
}

.data-table tr {
  border-bottom: 1px solid #e8e8e8;
}

.data-table tr:last-child {
  border-bottom: none;
}

.data-table td {
  padding: 14px 20px;
  font-size: 16px;
}

.data-table td:first-child {
  color: var(--text-body);
  width: 45%;
  font-weight: 500;
}

.data-table td:last-child {
  font-weight: 600;
  color: var(--text-dark);
}

/* === BESCHREIBUNG === */
.description-text {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-body);
  white-space: pre-wrap;
}

/* === KARTE === */
.map-container {
  margin: 40px 0;
}

.map-iframe {
  width: 100%;
  height: 450px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

/* === KONTAKT === */
.contact-section {
  margin: 40px 0;
  padding: 35px;
  background: var(--bg-light);
  border-radius: 8px;
}

.contact-subtitle {
  font-size: 16px;
  color: var(--text-body);
  margin-bottom: 20px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  margin-top: 25px;
}

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

.contact-avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 18px;
  border: 4px solid white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.contact-name {
  font-family: "Source Serif 4", serif;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-dark);
}

.contact-position {
  font-size: 16px;
  color: var(--text-body);
  margin-bottom: 18px;
}

.contact-info {
  text-align: left;
  font-size: 16px;
  color: var(--text-body);
  line-height: 1.8;
}

.contact-info-item {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.contact-info a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s;
}

.contact-info a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* === KONTAKTFORMULAR === */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.form-label {
  font-size: 14px;
  color: var(--text-body);
  margin-bottom: 6px;
  font-weight: 500;
}

.form-label .required {
  color: #c00;
}

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

.form-input,
.form-textarea,
select.form-input {
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 16px;
  font-family: "Source Sans 3", sans-serif;
  transition: border-color 0.2s;
  color: var(--text-body);
  background: white;
}

.form-input:focus,
.form-textarea:focus,
select.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

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

.form-privacy,
.form-consumer-info {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.6;
  margin-top: 10px;
}

.form-privacy p,
.form-consumer-info p {
  margin: 8px 0;
}

.form-privacy strong {
  font-weight: 600;
}

.form-privacy a {
  color: var(--primary-color);
  text-decoration: underline;
}

.form-submit {
  background: #012060;
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 6px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-family: "Source Sans 3", sans-serif;
  margin-top: 10px;
}

.form-submit:hover {
  background: #000000;
}

.form-message {
  padding: 12px 18px;
  border-radius: 6px;
  margin-top: 12px;
  display: none;
}

.form-message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: block;
}

.form-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: block;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .propstack-container {
    padding: 15px;
  }
  
  .propstack-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .detail-title {
    font-size: 32px;
  }
  
  .detail-price {
    font-size: 28px;
  }
  
  .gallery-main {
    height: 400px;
  }
}

@media (max-width: 767px) {
  .propstack-container {
    font-size: 16px;
  }
  
  .card-title {
    font-size: 18px;
  }
  
  .card-meta-item {
    font-size: 14px;
  }
  
  .property-detail {
    padding: 20px;
  }
  
  .detail-title {
    font-size: 28px;
  }
  
  .detail-price {
    font-size: 24px;
  }
  
  .gallery-main {
    height: 300px;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .data-table td {
    padding: 10px 15px;
    font-size: 14px;
  }
  
  .data-table td:first-child {
    width: 50%;
  }
  
  .description-text {
    font-size: 16px;
  }
  
  .section-title {
    font-size: 22px;
  }
  
  .contact-info {
    text-align: center;
  }
}