/* Craft Club of Sebastian - Color scheme from logo */
:root {
  --teal: #0A6A78;
  --teal-dark: #0A4F59;
  --teal-deep: #00333D;
  --cream: #FBF5E5;
  --cream-light: #FFF8E6;
  --golden: #F29E2E;
  --golden-light: #FFB74D;
  --sandy: #B48E6B;
  --sandy-light: #C6A386;
  --white: #ffffff;
  --text: #2d2d2d;
  --text-muted: #5a5a5a;
  /* Theme overrides (set via admin) */
  --heading-color: var(--teal-dark);
  --body-color: var(--text);
  --link-color: var(--teal);
  --link-hover-color: var(--golden);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--cream);
  color: var(--body-color);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--heading-color);
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--link-hover-color);
}

/* Header */
.site-header {
  background: var(--teal);
  color: var(--cream);
  padding: 0.15rem 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
}
.logo-link:hover { color: var(--golden-light); }
.logo-link .logo-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 274px;
  height: 274px;
  overflow: hidden;
  flex-shrink: 0;
}
.logo-link .logo-circle img {
  width: 273px;
  height: 273px;
  object-fit: contain;
  border-radius: 50%;
}

.nav-main {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-main a {
  color: var(--cream);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 500;
}
.nav-main a:hover {
  background: rgba(255,255,255,0.15);
  color: var(--cream);
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 50%, var(--teal-deep) 100%);
  color: var(--cream);
  padding: 4rem 1.5rem;
  text-align: center;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.hero.hero-with-image {
  min-height: 480px;
}
.hero.hero-guest-vendor {
  min-height: 280px;
  padding: 2rem 1.5rem;
}
.hero.hero-gallery,
.hero.hero-membership,
.hero.hero-charities,
.hero.hero-vendors,
.hero.hero-events,
.hero.hero-members,
.hero.hero-about {
  min-height: 280px !important;
  padding: 2rem 1.5rem !important;
}
.hero-about .hero-content-lower {
  margin-top: 3rem;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}
.hero-content {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--cream);
  margin: 0 0 0.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.hero p {
  font-size: 1.2rem;
  opacity: 0.95;
  margin: 0;
}

/* Section blocks */
.section {
  padding: 10px 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-alt {
  background: var(--cream-light);
}

.section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 1rem;
}

/* Stats grid (Medidata-style) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  padding: 10px 0;
}

.stat-card {
  background: var(--white);
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(10, 106, 120, 0.1);
  border: 2px solid rgba(10, 106, 120, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(10, 106, 120, 0.15);
}

.stat-card .number {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--teal);
  display: block;
  white-space: nowrap;
}
.stat-card .label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.stat-card-photo {
  padding: 0;
  overflow: hidden;
}
.stat-card-photo img {
  width: 100%;
  height: 100%;
  min-height: 140px;
  object-fit: cover;
  display: block;
}

/* Market Moments - creative masonry-style grid */
.moments-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 140px;
  gap: 0.75rem;
  max-width: 1000px;
  margin: 0 auto;
}
.moment-item {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}
.moment-item:hover {
  transform: scale(1.03);
}
.moment-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.moment-1 { grid-column: span 2; grid-row: span 2; }
.moment-2 { grid-row: span 2; }
.moment-3 { grid-column: span 2; }
.moment-4 { }
.moment-5 { grid-row: span 2; }
@media (max-width: 768px) {
  .moments-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 120px;
  }
  .moment-1, .moment-2, .moment-3, .moment-4, .moment-5 {
    grid-column: span 1;
    grid-row: span 1;
  }
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(10, 106, 120, 0.12);
}

.card-img {
  aspect-ratio: 16/10;
  object-fit: cover;
  width: 100%;
}
.card-body {
  padding: 1.25rem;
}
.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}
.card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Vendors grid - image/logo only */
.vendors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
}
.vendor-tile {
  display: block;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(10, 106, 120, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  aspect-ratio: 1;
}
.vendor-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(10, 106, 120, 0.15);
}
.vendor-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.vendor-tile-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--teal), var(--sandy));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  font-size: 3rem;
}
.vendor-tile-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: var(--cream);
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s;
}
.vendor-tile:hover .vendor-tile-name {
  opacity: 1;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-align: center;
}

.btn-primary {
  background: var(--golden);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--golden-light);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--teal);
  color: var(--cream);
}
.btn-secondary:hover {
  background: var(--teal-dark);
  color: var(--cream);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--teal);
  color: var(--teal);
}
.btn-outline:hover {
  background: var(--teal);
  color: var(--cream);
}

/* Photo carousel */
.carousel {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.carousel-inner {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-item {
  min-width: 100%;
}
.carousel-item img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.carousel-controls {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}
.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.2s;
}
.carousel-dot.active {
  background: var(--golden);
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 700;
  color: var(--teal-dark);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 2px solid rgba(10, 106, 120, 0.2);
  border-radius: 8px;
  font-size: 1rem;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--teal);
}

/* Auth pages */
.auth-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.auth-box {
  background: var(--white);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
  max-width: 400px;
  width: 100%;
}
.auth-box h1 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}
.auth-box .btn {
  width: 100%;
  padding: 0.75rem;
  margin-top: 0.5rem;
}
.auth-box .error {
  background: #fee;
  color: #c00;
  padding: 0.5rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

/* Admin */
.admin-header {
  background: var(--teal);
  color: var(--cream);
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
}
.admin-header h1 {
  margin: 0;
  color: var(--cream);
  font-size: 1.5rem;
}
.admin-nav {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}
.admin-nav a {
  color: var(--cream);
  opacity: 0.9;
}
.admin-nav a:hover { opacity: 1; color: var(--golden-light); }

/* Footer */
.site-footer {
  background: var(--teal-dark);
  color: var(--cream);
  padding: 2rem 1.5rem;
  margin-top: 4rem;
  text-align: center;
}
.site-footer a {
  color: var(--golden-light);
}
.site-footer a:hover {
  color: var(--cream);
}

/* Utilities */
.text-center { text-align: center; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* Chat */
.chat-messages {
  max-height: 400px;
  overflow-y: auto;
  background: var(--white);
  padding: 1rem;
  border-radius: 8px;
  border: 2px solid rgba(10, 106, 120, 0.2);
}
.chat-message {
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background: var(--cream);
  border-radius: 8px;
  border-left: 4px solid var(--teal);
}
.chat-message .author {
  font-weight: 700;
  color: var(--teal);
  font-size: 0.9rem;
}
.chat-message .time {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.chat-message-pinned {
  border-left-color: var(--golden) !important;
  background: rgba(242, 158, 46, 0.08);
}
.chat-pin-badge {
  display: inline-block;
  background: var(--golden);
  color: var(--white);
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-right: 0.5rem;
}
.chat-replies {
  margin-top: 0.75rem;
  margin-left: 1.5rem;
  border-left: 3px solid rgba(10, 106, 120, 0.25);
  padding-left: 1rem;
}
.chat-reply {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

/* Events calendar */
.events-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.events-list li {
  padding: 1rem;
  margin-bottom: 0.5rem;
  background: var(--white);
  border-radius: 8px;
  border-left: 4px solid var(--golden);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.events-list .date {
  font-weight: 700;
  color: var(--teal);
  min-width: 120px;
}
.events-list .title {
  font-weight: 600;
  flex: 1;
}

/* Vendor profile */
.vendor-profile {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 768px) {
  .vendor-profile { grid-template-columns: 1fr; }
}
.vendor-profile img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.vendor-featured-img {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
}
.vendor-featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.vendor-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.vendor-gallery img {
  aspect-ratio: 1;
  object-fit: cover;
}
.vendor-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.vendor-socials a {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  background: var(--teal);
  color: var(--cream);
  border-radius: 8px;
  font-size: 0.9rem;
}
.vendor-socials a:hover {
  background: var(--golden);
  color: var(--white);
}

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.gallery-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.2s;
}
.gallery-grid img:hover {
  transform: scale(1.02);
}

/* Charities */
.charities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}
.charity-card {
  background: var(--white);
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}
.charity-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(10, 106, 120, 0.12);
}
.charity-logo-wrap {
  display: block;
  margin-bottom: 1rem;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.charity-card img {
  max-height: 80px;
  max-width: 160px;
  object-fit: contain;
}
.charity-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}
.charity-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Markdown-rendered content (lists, paragraphs) */
.md-content ul,
.md-content ol {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}
.md-content li {
  margin-bottom: 0.25rem;
}
.md-content p {
  margin: 0.75rem 0;
}
.md-content p:first-child {
  margin-top: 0;
}
.md-content p:last-child {
  margin-bottom: 0;
}

/* About page - improved readability and visual hierarchy */
.about-content .about-inner {
  max-width: 720px;
  margin: 0 auto;
}
.about-content .about-block {
  margin-bottom: 3rem;
}
.about-content .about-block:last-child {
  margin-bottom: 0;
}
.about-content .about-block h2 {
  text-align: left;
  font-size: 1.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(10, 106, 120, 0.2);
}
.about-content .about-prose {
  font-size: 1.05rem;
  line-height: 1.15;
  color: var(--text);
}
.about-content .about-block-highlight h2 {
  border-bottom-color: rgba(10, 106, 120, 0.15);
}
.about-content .about-list ul,
.about-content .about-list ol {
  margin: 1rem 0 0;
  padding-left: 1.75rem;
  list-style-position: outside;
}
.about-content .about-list ul {
  list-style-type: disc;
}
.about-content .about-list li {
  margin-bottom: 0.35rem;
  padding-left: 0.25rem;
}
.about-content .about-block-image {
  margin: 2.5rem 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,0.1);
}
.about-content .about-block-image img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 320px;
  object-fit: cover;
}
