/* ==========================================================================
   Designer Slack Communities — Static Site Styles
   Exact match to Webflow version
   ========================================================================== */

/* ---- Font Faces ---- */
@font-face {
  font-family: 'Cerabasic';
  src: url('../images/CeraBasic-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cerabasic';
  src: url('../images/CeraBasic-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cerabasic';
  src: url('../images/CeraBasic-Black.woff') format('woff');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ---- CSS Custom Properties ---- */
:root {
  --black: #2b2927;
  --dark-goldenrod: #b7791f;
  --grey: #88827c;
  --blanched-almond: #feebc8;
  --sandy-brown: #f6ad55;
  --dim-grey: #585450;
  --white: white;
  --ghost-white: #faf5ff;
  --dark-slate-blue: #553c9a;
  --dark-olive-green: #276749;
  --honeydew: #f0fff4;
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  font-family: Cerabasic, Verdana, sans-serif;
  color: var(--black);
  background-color: var(--blanched-almond);
  line-height: 1.5;
  cursor: url('../images/cursor-white.svg'), auto;
}

a, button {
  cursor: url('../images/hand-white.svg'), pointer !important;
}

::selection {
  background-color: #F6AD55;
  color: var(--black);
}

::-webkit-scrollbar {
  width: 12px;
}
::-webkit-scrollbar-track {
  background: var(--blanched-almond);
}
::-webkit-scrollbar-thumb {
  background-color: var(--sandy-brown);
  border-radius: 6px;
  border: 3px solid var(--blanched-almond);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

h1, h2, h3, p {
  margin: 0;
}

ul, ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

button, input, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ---- Hidden (SEO headings) ---- */
.hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* ---- Container ---- */
.container {
  max-width: 1288px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Header / Nav ---- */
.container.header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  padding-top: 96px;
  padding-bottom: 48px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.logo-container {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-shrink: 0;
}

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

.logo-text {
  display: none;
  font-size: 32px;
  font-weight: 900;
  line-height: 1.2;
  color: var(--black);
}

.logo {
  height: 56px;
  width: auto;
  object-fit: contain;
}

.text-base.header {
  font-size: 16px;
  font-weight: 700;
  color: var(--black);
}

a.text-lg.header {
  font-size: 16px;
  font-weight: 700;
  color: #444444;
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 3px solid transparent;
  transition: border-color 0.2s;
}

a.text-lg.header:hover {
  border-bottom-color: var(--dark-goldenrod);
}

.button {
  display: inline-block;
  padding: 8px 16px;
  font-size: 16px;
  font-weight: 700;
  color: var(--black);
  border: 3px solid var(--dim-grey);
  border-radius: 4px;
  background: var(--white);
  cursor: pointer;
  transition: background-color 0.2s;
  text-align: center;
}

.button:hover {
  background-color: var(--sandy-brown);
}

.rss {
  display: inline-flex;
  align-items: center;
}

.rss img {
  width: 32px;
  height: 32px;
}

/* ---- Filter Container ---- */
.filter-container {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

/* ---- Search ---- */
.search-container {
  width: 100%;
  max-width: 520px;
  margin-right: 24px;
  flex-shrink: 0;
}

.search-form {
  position: relative;
}

.search-input {
  width: 100%;
  height: 42px;
  border: 3px solid var(--dim-grey);
  border-radius: 4px;
  padding: 10px 10px 10px 34px;
  font-size: 16px;
  color: var(--black);
  background-color: var(--white);
  background-image: url('../images/search.svg');
  background-position: 8px center;
  background-repeat: no-repeat;
  background-size: 20px;
  outline: none;
  transition: border-color 0.2s;
}

.search-input::placeholder {
  color: #999999;
}

.search-input:focus {
  border-color: var(--dark-goldenrod);
}

.search-clear {
  display: none;
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  align-items: center;
  gap: 4px;
  color: var(--grey);
  font-size: 14px;
}

.search-clear.visible {
  display: flex;
}

.search-clear-icon {
  width: 16px;
  height: 16px;
}

/* ---- Dropdown Filters ---- */
.dropdown {
  position: relative;
}

.filter-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border: 3px solid var(--dim-grey);
  border-radius: 2px;
  background: var(--white);
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  color: var(--black);
  transition: background-color 0.2s;
  user-select: none;
}

.filter-button:hover,
.filter-button.active {
  background-color: var(--sandy-brown);
}

.filter-button .arrow {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--black);
  transition: transform 0.2s;
}

.filter-button.active .arrow {
  transform: rotate(180deg);
}

.filter-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  border: 3px solid var(--black);
  background-color: var(--white);
  min-width: 160px;
  max-width: 190px;
  max-height: 360px;
  margin-top: -3px;
  padding: 12px 0;
  overflow-y: auto;
}

.filter-list.open {
  display: block;
}

.filter-link {
  display: block;
  padding: 12px 24px;
  color: var(--black);
  font-size: 16px;
  font-weight: 400;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s;
}

.filter-link:hover {
  background-color: var(--sandy-brown);
  font-weight: 700;
}

.filter-link.active {
  font-weight: 700;
}

/* ---- Community Grid ---- */
.community-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

/* ---- Card ---- */
.community-list-item {
  position: relative;
}

.card {
  border: 4px solid var(--dim-grey);
  background-color: var(--white);
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  width: 100%;
  height: 100%;
  padding: 16px;
  transition: all 0.3s ease-in-out;
  position: relative;
  z-index: 1;
}

.card:hover {
  transform: translate(-14px, -14px);
}

.card-bg {
  z-index: -1;
  border: 4px solid var(--dim-grey);
  background-color: var(--sandy-brown);
  border-radius: 2px;
  position: absolute;
  inset: 0;
}

/* Card inner content */
.card-content {
  flex: 1;
}

.title-link {
  display: block;
  text-decoration: none;
  color: inherit;
  margin-bottom: 8px;
}

.title-link {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.title-link--image {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}

.title-link--initial {
  font-size: 24px;
  font-weight: 900;
  color: var(--white);
  background-color: var(--sandy-brown);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 4px;
  flex-shrink: 0;
}

.text-2xl.title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
  border-bottom: 3px solid transparent;
  display: inline;
  transition: border-color 0.2s;
}

.card:hover .text-2xl.title {
  border-bottom-color: var(--dark-goldenrod);
}

/* Badge */
.badge {
  display: table;
  font-size: 14px;
  font-weight: 400;
  text-transform: capitalize;
  padding: 2px 8px;
  border-radius: 2px;
  margin-top: 16px;
  margin-bottom: 8px;
}

.badge.public {
  color: var(--dark-olive-green);
  background-color: var(--honeydew);
}

.badge.invite-only {
  color: var(--dark-slate-blue);
  background-color: var(--ghost-white);
}

/* Card description */
.card-description {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 12px;
  color: var(--black);
}

/* Location tag */
.location-tag-container {
  margin-bottom: 8px;
}

.location-tag {
  font-size: 14px;
  color: var(--grey);
  display: inline-block;
}

.location-tag + .location-tag::before {
  content: ', ';
}

/* Social links */
.small-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  text-decoration: none;
}

.small-link--image {
  width: 20px;
  height: 20px;
}

.text-base.gray {
  font-size: 16px;
  color: var(--grey);
}

/* Join link */
.small-join-link {
  display: block;
  margin-top: 12px;
  text-decoration: none;
}

.text-base.gold {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark-goldenrod);
  position: relative;
  display: inline;
}

.text-base.gold::before {
  content: '';
  position: absolute;
  z-index: -1;
  bottom: -1px;
  left: -0.04em;
  right: -0.04em;
  height: 2px;
  background-color: transparent;
  transition: background-color 0.2s;
}

.card:hover .text-base.gold::before {
  background-color: var(--dark-goldenrod);
}

/* ---- Pagination ---- */
.pagination-container {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

.pagination-btn {
  display: inline-block;
  padding: 10px 32px;
  font-size: 16px;
  font-weight: 700;
  color: var(--black);
  border: 3px solid var(--dim-grey);
  border-radius: 2px;
  background: var(--white);
  cursor: pointer;
  transition: background-color 0.2s;
}

.pagination-btn:hover {
  background-color: var(--sandy-brown);
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.pagination-btn:disabled:hover {
  background-color: var(--white);
}

/* ---- Modal Overlay ---- */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(183, 121, 31, 0.75);
  z-index: 3000;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.modal-overlay.visible {
  display: flex;
}

.modal-content {
  position: relative;
  background: var(--white);
  border: 4px solid var(--dim-grey);
  border-radius: 4px;
  padding: 40px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.modal-close:hover {
  opacity: 1;
}

/* ---- Form inside Modal ---- */
.form-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
}

.add-form {
  display: grid;
  gap: 8px;
}

.add-form label {
  font-size: 14px;
  font-weight: 700;
  display: block;
  margin-top: 8px;
}

.form-field {
  width: 100%;
  padding: 10px 12px;
  border: 3px solid var(--dim-grey);
  border-radius: 4px;
  font-size: 16px;
  font-family: inherit;
  color: var(--black);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s;
}

.form-field:focus {
  border-color: var(--dark-goldenrod);
}

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

.form-hint {
  font-size: 13px;
  color: var(--grey);
  margin: 4px 0 8px;
}

.form-submit {
  margin-top: 8px;
}

.form-success {
  display: none;
  padding: 24px;
  text-align: center;
}

.form-success.visible {
  display: block;
}

.form-success .text-xl {
  font-size: 20px;
  font-weight: 700;
}

/* Honeypot */
.bot-field {
  display: none;
}

/* ---- Share Section ---- */
.share-container {
  text-align: center;
  margin-top: 96px;
  margin-bottom: 48px;
}

.share-container h2,
.share-container h1 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 24px;
}

.button-container {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 4px;
  color: white;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.2s;
}

.share-btn:hover {
  opacity: 0.85;
}

.share-btn.linkedin { background-color: #0077b5; }
.share-btn.facebook { background-color: #3b5998; }
.share-btn.twitter { background-color: #1da1f2; }
.share-btn.pinterest { background-color: #bd081c; }

.share-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ---- Footer ---- */
.footer {
  margin-top: 32px;
  padding-bottom: 48px;
  text-align: center;
}

.footer .footnote {
  font-size: 16px;
  color: var(--grey);
  margin-bottom: 8px;
}

.footer .link {
  color: var(--dark-goldenrod);
  text-decoration: underline;
}

.footer .link:hover {
  color: var(--sandy-brown);
}

/* ---- No Results ---- */
.no-results {
  text-align: center;
  padding: 48px 24px;
  font-size: 18px;
  color: var(--grey);
  display: none;
}

.no-results.visible {
  display: block;
}

/* ---- Active Filters Display ---- */
.active-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background-color: var(--blanched-almond);
  border-radius: 2px;
  font-size: 14px;
  font-weight: 700;
  color: var(--black);
}

.active-filter-tag .remove {
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

/* ---- Responsive: Tablet (991px) ---- */
@media screen and (max-width: 991px) {
  .container.header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding-top: 48px;
    padding-bottom: 32px;
  }

  .nav-right {
    margin-left: 0;
  }

  .filter-container {
    flex-direction: column;
    align-items: stretch;
  }

  .search-container {
    max-width: 100%;
    margin-right: 0;
    margin-bottom: 16px;
  }

  .community-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .nav-right {
    margin-left: 0;
    justify-content: center;
  }
}

/* ---- Responsive: Mobile (767px) ---- */
@media screen and (max-width: 767px) {
  .container.header {
    padding-top: 32px;
    padding-bottom: 24px;
    flex-direction: column;
    align-items: flex-start;
  }

  .logo-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .logo {
    display: none;
  }

  .logo-text {
    display: block;
  }

  .logo-link {
    display: block;
  }

  .text-base.header {
    font-size: 14px;
  }

  .nav-right {
    margin-left: 0;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 16px;
  }

  .community-list {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .card:hover {
    transform: translate(-8px, -8px);
  }

  .share-container {
    margin-top: 48px;
  }

  .add-community-section {
    margin-top: 48px;
  }
}

/* ---- Responsive: Small Mobile (479px) ---- */
@media screen and (max-width: 479px) {
  .container {
    padding: 0 16px;
  }

  .container.header {
    padding-top: 24px;
    gap: 12px;
  }

  .logo {
    height: 40px;
  }

  .nav-right {
    flex-direction: column;
    gap: 8px;
  }

  .filter-container {
    gap: 8px;
  }

  .filter-button {
    padding: 8px 16px;
    font-size: 14px;
  }

  .button-container {
    flex-direction: column;
    align-items: center;
  }
}
