/* pm-theme.css — Übernimmt das Look&Feel von start.html projektweit.
   Wichtig: enthält Fallback-Variablen, falls app.css (Tailwind-Build) fehlt.
*/

/* ===== Variablen (Fallback, falls app.css nicht geladen ist) ===== */
:root{
  --pm-green:#25a034;
  --pm-green-dark:#0a7a25;
  --pm-green-verydark:#0c2b0f;
  --pm-ink:#0b0b0b;

  --pm-radius: 16px;
  --pm-shadow: 0 10px 0 rgba(0,0,0,.2);
  --pm-shadow-soft: 0 8px 22px rgba(0,0,0,.25);
}

/* ===== Basis ===== */
body.page {
  min-height: 100vh;
  background: var(--pm-green-dark);
  color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: "Nunito Sans", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Apple Color Emoji","Segoe UI Emoji";
}

a { color: #d1fae5; text-decoration: none; }
a:hover { text-decoration: underline; }

.content, main {
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.25rem;
}
@media (min-width: 640px){ .content, main { padding: 1.5rem; } }
@media (min-width: 1024px){ .content, main { padding: 2rem; } }

/* ===== Header / Nav ===== */
.nav-bar{
  position: sticky; top:0; z-index:50;
  display:flex; align-items:center; justify-content:space-between;
  padding: .75rem 1rem;
  background: var(--pm-green-verydark);
  border-bottom: 8px solid var(--pm-ink);
  box-shadow: var(--pm-shadow);
}
.nav-brand a{
  font-family: "Bangers", system-ui, -apple-system, Segoe UI;
  font-size: clamp(22px, 4vw, 32px);
  letter-spacing:.5px;
  color:#fff; text-decoration:none;
}
.nav-links{ display:flex; gap:.75rem; align-items:center; flex-wrap:wrap;}
.nav-links a{
  color:#052e16;
  background: #a7f3d0;
  padding:.4rem .8rem;
  border:4px solid var(--pm-ink);
  border-radius: 9999px;
  box-shadow: 0 3px 0 rgba(0,0,0,.35);
  font-weight:700;
}
.nav-links a:hover{ transform: translateY(-1px); }

/* ===== Footer ===== */
.footer{
  background: var(--pm-green-verydark);
  border-top: 8px solid var(--pm-ink);
  color: #d1fae5;
  text-align:center;
  padding: 1.25rem;
}

/* ===== Karten / Panels ===== */
.card, .panel, .tent-card, .pm-card{
  background:#fff;
  color:#052e16;
  border: 4px solid var(--pm-ink);
  border-radius: 20px;
  box-shadow: var(--pm-shadow-soft);
  padding: 1rem;
}
.card h1, .card h2, .card h3, .panel h1, .panel h2, .panel h3{
  font-weight:900;
}

/* ===== Buttons ===== */
.btn{
  appearance: none;
  display:inline-flex; align-items:center; justify-content:center;
  gap:.5rem;
  font-weight:800;
  border:4px solid var(--pm-ink);
  border-radius: 9999px;
  padding:.55rem 1rem;
  box-shadow: 0 3px 0 rgba(0,0,0,.35);
  background: #a7f3d0; color:#052e16;
  cursor:pointer; text-decoration:none;
}
.btn:hover{ transform: translateY(-1px); }
.btn:active{ transform: translateY(0); box-shadow: 0 0 0 rgba(0,0,0,0.25); }
.btn--primary{ background: #34d399; color:#052e16; }
.btn.ghost, .btn--ghost{
  background: transparent; color:#d1fae5;
  border-color:#d1fae5;
}

/* ===== Formulare ===== */
.form { display:block; }
.form .form-head{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:.75rem;
}
.form input[type="text"],
.form input[type="number"],
.form input[type="email"],
.form input[type="password"],
.form input[type="date"],
.form select,
.form textarea{
  width:100%;
  background:#ffffff8f;
  border:2px solid #064e3b;
  border-radius: 14px;
  padding:.6rem .8rem;
  color:#052e16;
  box-sizing:border-box;
}
.form input:focus, .form select:focus, .form textarea:focus{
  outline: none; border-color:#10b981; box-shadow: 0 0 0 4px rgba(16,185,129,.25);
}
.form label{ display:block; font-weight:700; margin:.5rem 0 .35rem; color:#022c22; }
.form .btn-row{ display:flex; gap:.5rem; flex-wrap:wrap; margin-top:.75rem; }

/* ===== Tabs ===== */
.tabs { margin-top:.5rem; }
.tablist{ display:flex; flex-wrap:wrap; gap:.5rem; border-bottom:4px solid var(--pm-ink); padding-bottom:.25rem; }
.tab{
  background:#ecfccb;
  color:#052e16;
  border:3px solid var(--pm-ink);
  border-bottom-width: 4px;
  border-radius: 12px 12px 0 0;
  padding:.5rem .75rem;
  font-weight:800;
}
.tab[aria-selected="true"], .tab.is-active{
  background:#a7f3d0;
}

/* ===== Dashboard-Komponenten ===== */
.tent-grid{
  display:grid; gap:1rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.tent-card{ cursor:pointer; }
.tent-name{ font-weight:900; font-size:1.1rem; margin:.25rem 0 .5rem; }
.plant-list{ list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:.25rem; }
.plant-item{
  background:#ecfccb;
  border:2px solid var(--pm-ink);
  border-radius:10px;
  padding:.15rem .45rem;
  font-weight:700; font-size:.9rem;
}

/* ===== Django Messages ===== */
.messages{ margin: 1rem 0; display:grid; gap:.5rem; }
.message{ border: 3px solid var(--pm-ink); border-radius: 12px; padding:.6rem .8rem; }
.message.tags.success{ background:#dcfce7; color:#052e16; }
.message.tags.error{ background:#fee2e2; color:#7f1d1d; }
.message.tags.info{ background:#e0f2fe; color:#082f49; }

/* ===== Utilities ===== */
.container{ max-width: 80rem; margin:0 auto; padding: 0 1rem; }
.hidden{ display:none !important; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.community-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0;
}
.community-stats p {
  margin: 0;
}

/* --- Community Feature Cards --- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

/* Basissyle für Karten – baut auf pm-card auf */
.feature-card {
  position: relative;
  overflow: hidden;
  transition:
    transform 160ms ease-out,
    box-shadow 160ms ease-out,
    border-color 160ms ease-out,
    background-color 160ms ease-out;

  /* NEU: Flex-Layout, damit Text und Button sich nicht überlappen */
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Button in Feature-Karten sauber unter den Text setzen */
.feature-card .pm-btn {
  margin-top: 0.5rem;
  align-self: flex-start; /* Button bleibt links, nicht volle Breite */
  position: relative;
  z-index: 1; /* liegt sicher über dem Hintergrund-Glow */
}


/* Leichter Hover-Lift + stärkerer Schatten */
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
  border-color: #16a34a; /* zartes Grün-Highlight */
}

/* Kleiner „Glow“-Effekt oben */
.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.12), transparent 55%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease-out;
}

.feature-card:hover::before {
  opacity: 1;
}

/* Disabled-Karte: etwas matter, kein Hover-Lift */
.feature-card--disabled {
  opacity: 0.7;
  cursor: default;
}

.feature-card--disabled:hover {
  transform: none;
  box-shadow: none;
  border-color: rgba(0, 0, 0, 0.08);
}

.feature-card--disabled .pm-btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}


/* Auf sehr kleinen Screens lieber einspaltig */
@media (max-width: 640px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

/* Auf mittleren Screens (Tablets) schön 2-spaltig */
@media (min-width: 641px) and (max-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Auf größeren Screens kann auto-fit übernehmen,
   oder du erzwingst z.B. max. 3 Spalten: */
/*
@media (min-width: 1025px) {
  .feature-grid {
    grid-template-columns: repeat(3, minmax(260px, 1fr));
  }
}
*/
