/* ============================================================
   GreenStep Platform — platform.css
   Matchmaking / Best Practices / Forum components, in the site
   design language (theme.css defines the tokens).
   ============================================================ */

/* ---------------- Toolbar + layout ---------------- */
.plat-toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin: 0 0 20px; }
.plat-search { flex: 1 1 240px; max-width: 340px; margin-left: auto; }
.plat-search input { width: 100%; padding: 12px 18px; border: 1px solid var(--border); border-radius: var(--r-pill); background: #fff; font-size: 15px; font-family: inherit; }
.plat-search input:focus { outline: 2px solid var(--mint); }
.plat-layout { display: grid; grid-template-columns: 290px minmax(0,1fr); gap: 28px; align-items: start; }
@media (max-width: 900px) { .plat-layout { grid-template-columns: 1fr; } }

/* ---------------- Filters ---------------- */
.filters { background: #fff; border: 1px solid var(--border); border-radius: var(--r-md); padding: 20px; box-shadow: var(--sh-card); position: sticky; top: 92px; }
.filters__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.filters__title { font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.filters__clear { font-size: 13px; font-weight: 600; }
.filters__section { margin-bottom: 14px; }
.filters__label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.filters__select { width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; background: #fff; font-size: 14px; font-family: inherit; transition: border-color .15s ease; }
.filters__select:hover { border-color: var(--mint); }
.filters__select:focus { outline: 2px solid var(--mint); }
.filters__apply { width: 100%; justify-content: center; margin-top: 8px; }

/* ---------------- Results / listing cards ---------------- */
.results-meta { font-size: 14px; color: var(--muted); margin: 0 0 14px; }
.results-meta strong { font-family: var(--font-display); color: var(--ink); font-size: 16px; }
.cards { display: grid; gap: 20px; }

.lcard { display: grid; grid-template-columns: 190px minmax(0,1fr); background: #fff; border: 1px solid var(--border); border-radius: var(--r-md); padding: 28px; box-shadow: var(--sh-card); transition: transform .2s ease, box-shadow .2s ease; }
.lcard:hover { transform: translateY(-4px); box-shadow: var(--sh-card-hover); }
.lcard__side { display: flex; flex-direction: column; gap: 12px; align-items: stretch; padding-right: 26px; margin-right: 26px; border-right: 1px solid var(--border); }
@media (max-width: 720px) {
	.lcard { grid-template-columns: 1fr; }
	.lcard__side { flex-direction: row; flex-wrap: wrap; align-items: center; border-right: 0; border-bottom: 1px solid var(--border); padding: 0 0 18px; margin: 0 0 18px; }
}
.lcard__logo img { width: 100%; border-radius: 14px; display: block; }
.lcard__logo--ph { width: 100%; aspect-ratio: 1/1; display: grid; place-items: center; background: linear-gradient(135deg, var(--mint-soft), #D3ECE0); color: var(--primary); font-family: var(--font-display); font-size: 52px; font-weight: 800; border-radius: 14px; }
@media (max-width: 720px) { .lcard__logo, .lcard__logo--ph { width: 110px; } }
.lcard__connect, .lcard__edit { justify-content: center; padding: 11px 20px; font-size: 14.5px; }
.lcard__site { text-align: center; font-size: 13.5px; font-weight: 600; }
.lcard__files { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 5px; }
.lcard__files a { font-size: 13.5px; font-weight: 600; }
.lcard__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 36px; }
@media (max-width: 640px) { .lcard__grid { grid-template-columns: 1fr; gap: 16px; } }
.lcard__label { margin: 0 0 5px; font-family: var(--font-body); font-size: 14.5px; font-weight: 700; color: var(--ink); }
.lcard__value { margin: 0; color: var(--mid); font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.lcard__value--title { font-family: var(--font-display); font-size: 17.5px; font-weight: 700; color: var(--primary); }
.lcard__desc { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 18px 0; margin: 20px 0; }
.lcard__grid--head + .lcard__grid { margin-top: 20px; }

.empty { background: #fff; border: 1.5px dashed var(--border); border-radius: var(--r-md); padding: 46px 24px; text-align: center; color: var(--muted); }
.empty__title { font-family: var(--font-display); font-weight: 700; color: var(--ink); margin: 0 0 6px; }

/* ---------------- Pagination ---------------- */
.pagination { display: flex; gap: 8px; margin-top: 24px; flex-wrap: wrap; }
.pagination a { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border: 1px solid var(--border); background: #fff; color: var(--ink); border-radius: 11px; font-size: 14px; font-weight: 700; text-decoration: none; transition: background .15s ease, transform .15s ease; }
.pagination a:hover { background: var(--primary); border-color: var(--primary); color: #fff; transform: translateY(-2px); }
.pagination a[aria-current="page"] { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------------- Forms ---------------- */
.form-panel { background: #fff; border: 1px solid var(--border); border-radius: var(--r-md); padding: 30px; box-shadow: var(--sh-card); }
.form-panel__title { margin: 0 0 4px; font-size: 24px; color: var(--primary); }
.form-panel__intro { margin: 0 0 20px; font-size: 13.5px; color: var(--mid); font-weight: 600; }
.f-field { margin-bottom: 18px; }
.f-label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.req { color: var(--danger); }
.form-panel input[type="text"], .form-panel input[type="email"], .form-panel input[type="url"], .form-panel input[type="password"],
.form-panel select, .form-panel textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 11px; background: #fff; font-size: 15px; font-family: inherit; transition: border-color .15s ease, box-shadow .15s ease; }
.form-panel input:focus, .form-panel select:focus, .form-panel textarea:focus { outline: none; border-color: var(--mint); box-shadow: 0 0 0 3px rgba(95,221,168,.28); }
.choice-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 5px 16px; }
.choice-list label { display: flex; gap: 9px; align-items: center; font-size: 14px; cursor: pointer; padding: 3px 0; }
.choice-list input, .f-terms input { accent-color: var(--primary); width: 16px; height: 16px; }
.f-help { font-size: 12.5px; color: var(--muted); margin: 5px 0 0; }
.f-terms { background: var(--bg); border-radius: 12px; padding: 15px 18px; margin-bottom: 18px; }
.f-legal { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.f-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.f-files { list-style: none; margin: 0 0 8px; padding: 0; font-size: 14px; display: grid; gap: 4px; }
.f-files label { color: var(--danger); margin-right: 8px; cursor: pointer; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
[data-field][hidden] { display: none; }

/* ---------------- Auth pages ---------------- */
.auth-wrap { max-width: 620px; margin: 0 auto; }
.auth-links { margin: 16px 0 0; font-size: 14.5px; }

/* ---------------- Fullscreen popup ---------------- */
body.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 9999; }
.modal[hidden] { display: none; }
.modal__overlay { position: absolute; inset: 0; background: rgba(8,48,31,.5); animation: gsFade .25s ease both; }
.modal__dialog { position: absolute; inset: 0; overflow-y: auto; background: var(--bg); padding: 52px 20px 70px; animation: gsPop .35s ease both; }
.modal__dialog .form-panel { margin: 0 auto; max-width: 920px; }
.modal__close { position: fixed; top: 18px; right: 22px; z-index: 2; width: 46px; height: 46px; border: 1px solid var(--border); border-radius: 50%; background: #fff; color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; box-shadow: 0 6px 18px rgba(10,35,26,.18); transition: transform .15s ease, background .15s ease; }
.modal__close:hover { background: var(--mint-soft); color: var(--primary); border-color: var(--mint); transform: rotate(90deg); }

/* ---------------- Forum ---------------- */
.breadcrumb { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.forum-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.forum-cat { margin-bottom: 30px; }
.forum-cat__title { background: var(--grad-panel); color: #fff; border-radius: var(--r-md) var(--r-md) 0 0; margin: 0; padding: 15px 24px; font-size: 17px; }
.forum-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; background: #fff; border: 1px solid var(--border); border-top: 0; padding: 18px 24px; text-decoration: none; color: var(--ink) !important; transition: background .15s ease, padding-left .15s ease; }
.forum-row:last-child { border-radius: 0 0 var(--r-md) var(--r-md); }
.forum-row:hover { background: var(--mint-soft); padding-left: 30px; }
.forum-row__title { display: block; font-family: var(--font-display); font-weight: 700; color: var(--primary); }
.forum-row__desc { display: block; font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.forum-row__meta { font-size: 13px; color: var(--muted); text-align: right; white-space: nowrap; }
.topic-list { background: #fff; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--sh-card); }
.topic-row { display: flex; justify-content: space-between; gap: 16px; padding: 16px 24px; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--ink) !important; flex-wrap: wrap; transition: background .15s ease, padding-left .15s ease; }
.topic-row:last-child { border-bottom: 0; }
.topic-row:hover { background: var(--mint-soft); padding-left: 30px; }
.topic-row__title { font-weight: 700; color: var(--primary); }
.topic-row__meta { font-size: 13px; color: var(--muted); }
.posts { display: grid; gap: 16px; margin-bottom: 26px; }
.post { background: #fff; border: 1px solid var(--border); border-radius: var(--r-md); padding: 20px 24px; box-shadow: var(--sh-card); }
.post__head { display: flex; gap: 10px; align-items: baseline; border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 12px; font-size: 14px; flex-wrap: wrap; }
.post__head time { margin-left: auto; color: var(--muted); font-size: 13px; }
.badge { background: var(--mint-soft); color: var(--primary); font-size: 11px; border-radius: var(--r-pill); padding: 2px 10px; font-weight: 700; }
.post__body { overflow-wrap: anywhere; }
.reply-form, .newtopic-form { max-width: 880px; }
