/* ==============================
   GLOBAL STYLES
============================== */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Arial, sans-serif;
  color: #222;
  background-color: #f4f4f4;
}

/* ==============================
   HEADER / LOGIN
============================== */
.header {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  background-color: #FFFFFF;
  color: #0c0c0c;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  border-bottom: 1px solid #ccc;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
  margin: 0;
  font-size: 1.5rem;
}

.logo img {
    height: 50px; /* feste Höhe, proportional */
    width: auto;
}

.hidden { display: none; }

#auth-container {
  display: flex;
  gap: 25px; /* Abstand zwischen Login/Logout */
  align-items: center;
}

#login-form input {
  margin-right: 5px;
  padding: 5px;
  border-radius: 3px;
  border: none;
}

#login-form button {
  margin-left: 5px;
  padding: 5px 8px;
  border: none;
  background-color: #0077cc;
  color: white;
  border-radius: 3px;
  cursor: pointer;
}

#login-form button:hover {
  background-color: #005fa3;
}

#welcome-msg {
  display: flex;
  align-items: center;
  gap: 10px;
}

#welcome-msg button {
  padding: 5px 8px;
  border: none;
  background-color: #0077cc;
  color: white;
  border-radius: 3px;
  cursor: pointer;
}

#welcome-msg button:hover {
  background-color: #005fa3;
}

/* ==============================
   LAYOUT GRID
============================== */
#layout {
  display: grid;
  grid-template-columns: 300px 1fr 300px;
  height: calc(100vh - 60px); /* Höhe minus Header */
}

/* ==============================
   KARTE
============================== */
#map-container {
  position: relative;
  background-color: #ddd;
}

#map-container #map {
  width: 100%;
  height: 100%;
}

/* ==============================
   SEITEN-PANELS
============================== */
aside {
  overflow-y: auto;
  background-color: #fff;
  border-right: 1px solid #ccc;
  padding: 10px;
}

#right-panel {
  border-left: 1px solid #ccc;
}

/* ==============================
   CARD PANELS
============================== */
.card {
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 12px;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  margin-bottom: 15px;
}

/* Grundkarte */
.card-item {
  background-color: #a8c4e0; /* blau wie Tailwind bg-blue */
  border-radius: 1rem;        /* rounded-xl */
  box-shadow: 0 4px 6px rgba(0,0,0,0.1); /* shadow-md */
  padding: 0.5rem;              /* p-4 */

  display: flex;
  flex-direction: column;     /* flex-col */
  align-items: center;        /* items-center */
  justify-content: flex-start;    /* justify-center */
  text-align: center;         /* Zentrieren für Text */
  color: #000;                /* Text weiß */
  with: 100%;
  max-height: 130px;
  box-sizing: border-box;
}

/* Titel kleiner */
.card-title {
  font-size: 0.875rem; /* text-sm */
  color: #333;      /* text-gray-500 */
  margin-bottom: 0.25rem;
}

/* Wert größer */
.card-value {
  font-size: 1.25rem;    /* text-2xl */
  font-weight: bold;
}

.card p {
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.card.collapsed p {
  max-height: 100px; /* Vorschauhöhe */
}

.card h2 {
  font-size: 1.1em;
  margin-top: 0;
  border-bottom: 1px solid #ddd;
  padding-bottom: 4px;
}

.more-link {
  display: inline-block;
  margin-top: 6px;
  text-align: right;
  color: #0077cc;
  text-decoration: none;
  font-size: 0.9em;
}

.more-link:hover {
  text-decoration: underline;
}

/* ==============================
   CHAT
============================== */
.chat-section {
  display: flex;
  flex-direction: column;
  height: 220px;
}

#chat-box {
  flex: 1;
  overflow-y: auto;
  background-color: #f8f8f8;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 5px;
  margin-bottom: 5px;
}

.chat-message {
  margin-bottom: 4px;
}

.chat-input {
  display: flex;
}

.chat-input input {
  flex: 1;
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 4px 0 0 4px;
}

.chat-input button {
  background-color: #004b8d;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

.chat-input button:hover {
  background-color: #002f5c;
}

/* ==============================
   TABELLEN
============================== */
table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  width: 60%;
}

td, th {
  padding: 4px;
  border-bottom: 1px solid #eee;
}

/* ==============================
   BUTTONS
============================== */
button#open-planner {
  width: 100%;
  padding: 10px;
  background-color: #0077cc;
  border: none;
  color: white;
  font-size: 1em;
  border-radius: 4px;
  cursor: pointer;
}

button#open-planner:hover {
  background-color: #005fa3;
}

#right-panel button {
  background-color: #0077cc;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95em;
  transition: background 0.3s ease;
}

#right-panel button:hover {
  background-color: #005fa3;
}

#map-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#map {
  width: 80%;       /* Karte nimmt 80 % der Breite */
  height: 400px;    /* Höhe reduziert */
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  margin: 0 auto;
}
#dashboard {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr; /* 1 große + 2 normale Karten */
  gap: 20px;
  background-color: #dcdcdc;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  /* justify-content: center;
  flex-wrap: wrap; /* damit es bei kleinen Bildschirmen umbrechen darf */
  width: 100%; */
}

#dashboard .card {
 /* min-width: 250px; */
  background-color: #fff;
  padding: 12px;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  /* max-width: 320px; */
  width: 100%;
  box-sizing: border-box;
}

.readiness-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.readiness-legend ul {
  display: flex;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}
#left-panel,
#right-panel {
  background-color: #cfd4da; /* dunkleres Grau */
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

#left-panel .card,
#right-panel .card {
  background-color: #ffffff; /* hell für jede Card */
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 15px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.btn-register {
    padding: 5px 12px;
    border: 1px solid #28a745;
    border-radius: 4px;
    background-color: #fff;
    text-decoration: none;
    color: #28a745;
}

.btn-register:hover {
    background-color: #e6f4ea;
}

.community-name {
    flex: 1;             /* Nimmt den gesamten freien Platz zwischen Logo und Auth ein */
    text-align: center;  /* Zentriert den Text innerhalb des freien Platzes */
    margin: 0 20px;      /* Optional: minimaler Abstand zu Logo und Auth */
}

.layer-button-container {
  display: flex;
  flex-direction: column;
  gap: 10px; /* gleichmäßiger Abstand zwischen Buttons */
  align-items: stretch; /* Buttons gleich breit */
}

.reference-projects {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
    justify-content: space-between;
}

.project-card {
    flex: 1 1 calc(33% - 20px);
    background-color: #f5f5f5;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    text-align: center;
}

.project-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.project-card h3 {
    margin: 8px 0;
    font-size: 1.1rem;
    color: #333;
}

.project-card p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 12px;
}

.project-link {
    display: inline-block;
    padding: 6px 12px;
    background-color: #007BFF;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
}

.project-link:hover {
    background-color: #0056b3;
}

/* Container „Mein Haus“ breiter machen */
.house-card {
}

#featured-results-section {
    width: 100%; /* etwa 2/3 Breite, passt sich an */
    min-width: 300px;
}
.featured-results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 Spalten */
    gap: 12px; /* Abstand zwischen den Karten */
    margin-top: 16px;
}


/* Abgesetzte Karten für jedes Ergebnis */
.featured-result-card {
    background-color: #eef6ff;  /* hellblauer Hintergrund, vom weißen Hintergrund abgesetzt */
    border: 1px solid #cbd5e1;  /* dezenter Rand */
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08); /* leichter Schatten für "abgehobenes" Gefühl */
}
.featured-result-card .title {
    font-size: 0.6rem;
    color: #555;
    margin-bottom: 6px;
}

.featured-result-card .value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #111;
}

#featured-results-container.featured-results-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
    margin-top: 16px !important;
}

.calc-button-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 10px;
}

.blue-button {
    background: #1e90ff;
    color: white;
    padding: 12px 20px;  /* ↑↑ macht den Button höher ↑↑ */
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    font-weight: 600;
}
