:root {
  --primary: #2C5282;
  --primary-light: #3182CE;
  --secondary: #38B2AC;
  --secondary-light: #4FD1C5;
  --dark: #1A202C;
  --dark-blue: #002856;
  --light: #F7FAFC;
  --gray: #718096;
  --gray-light: #E2E8F0;
  --success: #38A169;
  --error: #E53E3E;
  --warning: #DD6B20;
  --info: #3182CE;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--light);
  color: var(--dark);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header styles */
header {
  background-color: var(--dark-blue);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  color: white;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo {
  height: 50px;
  margin-right: 10px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: white;
}

.brand-slogan {
  font-size: 0.9rem;
  color: var(--secondary-light);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: white;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--secondary-light);
}

.contact-btn {
  background-color: var(--secondary);
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 5px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.contact-btn:hover {
  background-color: var(--secondary-light);
}

/* Generator Section */
.generators-section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--gray);
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto;
}

.generator-card {
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 3rem;
  padding: 0;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.generator-header {
  background-color: var(--primary);
  color: white;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.generator-icon {
  font-size: 2.5rem;
  background-color: rgba(255, 255, 255, 0.2);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.generator-title-container {
  flex: 1;
}

.generator-title {
  font-size: 1.5rem;
  margin-bottom: 0.3rem;
}

.generator-subtitle {
  font-size: 1rem;
  opacity: 0.8;
}

.generator-content {
  padding: 2rem;
}

.generator-description {
  margin-bottom: 2rem;
  color: var(--gray);
}

.generator-form {
  display: grid;
  gap: 2rem;
}

.form-section {
  border: 1px solid var(--gray-light);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.form-section-title {
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--gray-light);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

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

.form-group label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.8rem;
  border: 1px solid var(--gray-light);
  border-radius: 5px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

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

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1em;
}

.form-group input:disabled,
.form-group select:disabled {
  background-color: var(--gray-light);
  cursor: not-allowed;
}

.conditional-section {
  display: none;
  border-top: 1px dashed var(--gray-light);
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}

.hallway-type {
  border: 2px solid var(--gray-light);
  border-radius: 10px;
  padding: 1rem;
  width: calc(33.333% - 1rem);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.hallway-type:hover {
  border-color: var(--primary-light);
}

.hallway-type.selected {
  border-color: var(--primary);
  background-color: rgba(49, 130, 206, 0.05);
}

.hallway-type img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 4px;
  display: block;
  margin-bottom: 0.5rem;
}

.hallway-type p {
  font-weight: 600;
  color: var(--dark);
}

.hallway-type-option {
  display: flex;
  flex-direction: column;
  width: calc(33.333% - 1rem);
  gap: 0.5rem;
}

.generator-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
}

.action-btn {
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.calculate-btn {
  background-color: var(--primary);
  color: white;
  border: none;
}

.calculate-btn:hover {
  background-color: var(--primary-light);
}

.reset-btn {
  background-color: transparent;
  color: var(--gray);
  border: 1px solid var(--gray-light);
}

.reset-btn:hover {
  background-color: var(--gray-light);
}

.generator-results {
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: 5px;
  background-color: var(--light);
  display: none;
}

.generator-results.show {
  display: block;
}

.results-title {
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.results-content {
  margin-bottom: 1.5rem;
}

.result-item {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--gray-light);
  padding: 0.7rem 0;
}

.result-label {
  font-weight: 600;
  color: var(--dark);
}

.result-value {
  color: var(--gray);
}

.results-highlight {
  background-color: var(--primary-light);
  color: white;
  padding: 1rem;
  border-radius: 5px;
  font-weight: 600;
  text-align: center;
  margin: 1.5rem 0;
}

.results-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
}

.share-btn {
  background-color: var(--secondary);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.3s ease;
}

.share-btn:hover {
  background-color: var(--secondary-light);
}

.alert {
  padding: 1rem;
  border-radius: 5px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.alert-icon {
  font-size: 1.5rem;
}

.alert-content {
  flex: 1;
}

.alert-title {
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.alert-info {
  background-color: rgba(49, 130, 206, 0.1);
  color: var(--info);
}

.alert-warning {
  background-color: rgba(221, 107, 32, 0.1);
  color: var(--warning);
}

/* Footer */
footer {
  background-color: var(--dark-blue);
  color: white;
  padding: 2rem 0;
  text-align: center;
}

.copyright {
  color: var(--gray);
  font-size: 0.9rem;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  overflow-y: auto;
}

.modal.show {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 0;
}

.modal-content {
  background-color: white;
  border-radius: 10px;
  width: 90%;
  max-width: 700px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  background-color: var(--primary);
  color: white;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 600;
}

.modal-close {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.modal-close:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
  padding: 2rem;
}

.modal-form {
  display: grid;
  gap: 1.5rem;
}

.modal-footer {
  padding: 1.5rem;
  background-color: var(--light);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.modal-btn {
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-cancel {
  background-color: transparent;
  color: var(--gray);
  border: 1px solid var(--gray-light);
}

.modal-cancel:hover {
  background-color: var(--gray-light);
}

.modal-submit {
  background-color: var(--primary);
  color: white;
  border: none;
}

.modal-submit:hover {
  background-color: var(--primary-light);
}

/* Mobile menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.menu-toggle span {
  height: 3px;
  width: 25px;
  background-color: white;
  margin-bottom: 5px;
  border-radius: 3px;
}

/* Responsive styles */
@media (max-width: 992px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .hallway-type {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    flex-direction: column;
    background-color: var(--dark-blue);
    padding: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-150%);
    transition: transform 0.3s ease;
    text-align: center;
    gap: 1.5rem;
  }

  .nav-links.active {
    transform: translateY(0);
  }

  .section-title {
    font-size: 1.8rem;
  }

  .brand-text {
    display: none;
  }

  .generator-header {
    flex-direction: column;
    text-align: center;
  }

  .results-actions {
    flex-direction: column;
    gap: 1rem;
  }

  .share-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Zusätzliche Stile für den neuen dynamischen Raum-Bereich */
.room-item, .hallway-item {
  background-color: var(--light);
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  border: 1px solid var(--gray-light);
  transition: all 0.3s ease;
}

.room-item:hover, .hallway-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Angepasste Stile für die Flurtypen */
.hallway-types {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.hallway-type {
  border: 2px solid var(--gray-light);
  border-radius: 8px;
  padding: 0.75rem;
  width: calc(33.333% - 0.7rem);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.hallway-type:hover {
  border-color: var(--primary-light);
  background-color: rgba(49, 130, 206, 0.02);
}

.hallway-type.selected {
  border-color: var(--primary);
  background-color: rgba(49, 130, 206, 0.05);
}

.hallway-type img {
  width: 100%;
  height: auto;
  max-height: 80px;
  object-fit: contain;
  margin-bottom: 0.5rem;
  border-radius: 4px;
}

.hallway-type p {
  font-weight: 600;
  color: var(--dark);
  font-size: 0.9rem;
}

/* Füge diese Styles am Ende des bestehenden <style>-Blocks in rwm-gen1.html hinzu */

/* Verbesserte Modaldarstellung für Angebote */
.modal-content {
  background-color: white;
  border-radius: 10px;
  width: 90%;
  max-width: 700px;
  padding: 20px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  animation: slideDown 0.3s ease-out;
  position: relative;
}

/* Tabellen-Styles für responsives Verhalten */
@media (max-width: 600px) {
  .responsive-table {
    display: block;
    width: 100%;
  }
  
  .responsive-table thead {
    display: none;
  }
  
  .responsive-table tbody, 
  .responsive-table tr {
    display: block;
    width: 100%;
  }
  
  .responsive-table td {
    display: flex;
    width: 100%;
    text-align: right !important;
    padding: 8px !important;
    border-bottom: 1px solid #ddd;
  }
  
  .responsive-table td:before {
    content: attr(data-label);
    float: left;
    font-weight: bold;
  }
  
  .responsive-table tr {
    margin-bottom: 15px;
    border: 1px solid #ddd;
  }
}

/* Formular-Responsivität verbessern */
@media (max-width: 768px) {
  .offer-form-grid {
    grid-template-columns: 1fr !important;
  }
  
  .offer-action-buttons {
    flex-direction: column !important;
  }
  
  .offer-action-buttons button {
    width: 100% !important;
    margin-bottom: 10px !important;
  }
  
  /* Kleinere Buttons für mobile Ansicht */
  .share-btn {
    width: 100%;
    justify-content: center;
    margin-bottom: 8px;
  }
}

/* Druckspezifische Styles */
@media print {
  body {
    margin: 0;
    padding: 15mm;
    font-size: 12pt;
  }
  
  .no-print {
    display: none !important;
  }
  
  .print-only {
    display: block !important;
  }
  
  header, footer, .generator-actions, .results-actions {
    display: none !important;
  }
  
  .container {
    width: 100%;
    max-width: none;
    padding: 0;
    margin: 0;
  }
  
  .generator-card {
    box-shadow: none;
    border: none;
  }
  
  table {
    width: 100%;
    page-break-inside: avoid;
  }
}

/* Spinner-Animation für Ladeanzeigen */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 8px;
}
