/* =========================
   PUBLIC HOME PAGE (index.html)
   ========================= */

/* Cards grid */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: 8px; max-width: 1200px; margin: 0 auto; padding: 0 20px;
}
@media (max-width: 1200px) { .grid-cards { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px)  { .grid-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .grid-cards { grid-template-columns: 1fr; } }

.card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: 0 1px 3px var(--shadow); text-decoration: none; color: inherit; }
.card-image { aspect-ratio: 4 / 3; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 12px; }
.card-title { font-weight: 600; margin: 0 0 4px; }
.card-meta { color: var(--muted); font-size: .9rem; }

/* Hero */
.hero {
  background-image: url('');
  background-size: cover; background-position: center;
  background-blend-mode: overlay; animation: kenburns 10s ease-in-out;
  filter: blur(0); color: #fff;
  position: relative; margin: 60px 0 0;
  height: 40vh; min-height: 320px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 0 20px;
}
@keyframes kenburns { 0% { background-size: 110%; } 100% { background-size: 100%; } }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle, transparent 10%, rgba(0,0,0,.55) 70%); z-index: 0;
}
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-size: 3rem; font-weight: 700; margin: 40px 0 20px; text-shadow: 3px 3px 5px rgba(0,0,0,.7); }
.hero p { font-size: 1.2rem; font-weight: 600; margin-bottom: 40px; max-width: 700px; text-shadow: 2px 2px 4px rgba(0,0,0,.6); }
@media (max-width: 800px) {
  .hero { height: clamp(240px, 38svh, 360px); min-height: 0; padding: 10px 20px; }
  .hero h1 { font-size: clamp(1.6rem, 5.2vw, 2.2rem); margin: 18px 0 10px; }
  .hero p { font-size: clamp(1rem, 3.4vw, 1.15rem); margin-bottom: 14px; max-width: 640px; }
}
@media (max-width: 600px) {
  .hero { height: clamp(120px, 24svh, 220px); min-height: 0; padding: 8px 14px; }
  .hero h1 { font-size: clamp(1.3rem, 6vw, 1.8rem); margin: 12px 0 8px; }
  .hero p { font-size: clamp(.9rem, 3.6vw, 1rem); margin-bottom: 10px; }
}
@media (max-width: 380px) {
  .hero { height: clamp(110px, 18svh, 160px); }
  .hero p { display: none; }
}

/* Text sections */
.text-section { padding: 60px 20px; text-align: center; margin: 0 auto; background: var(--card); }
.text-section h2 { font-size: 2rem; font-weight: 600; color: var(--text); margin-bottom: 16px; }
.text-section p { font-size: 1rem; line-height: 1.2; color: var(--muted); max-width: 1200px; margin: 0 auto; }
.text-section.is-muted { background: var(--bg-soft); }
.text-section.is-plain { background: var(--card); }
.text-section a { color: var(--link); text-decoration: none; }
.text-section a:hover { color: var(--link-hover); }
@media (max-width: 800px) {
  .text-section { padding: 40px 18px; }
  .text-section h2 { font-size: clamp(1.4rem, 4.6vw, 1.8rem); margin-bottom: 12px; text-align: center; }
  .text-section p { font-size: clamp(1rem, 3.2vw, 1.1rem); line-height: 1.65; max-width: 820px; margin: 0 auto; }
  .text-section p + p { margin-top: 0.8em; }
}
@media (max-width: 600px) {
  .text-section { padding: 28px 16px; }
  .text-section h2 { font-size: clamp(1.25rem, 6vw, 1.5rem); margin-bottom: 10px; }
  .text-section p { font-size: clamp(.95rem, 3.8vw, 1rem); line-height: 1.2; max-width: 640px; margin: 0 auto; }
  .text-section p + p { margin-top: 0.7em; }
}

/* CTA buttons */
.cta-buttons { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.cta-buttons a { display: inline-block; padding: 12px 22px; background: var(--brand); color: #fff; font-size: 1rem; font-weight: 700; border-radius: 6px; text-decoration: none; transition: background-color .2s ease, transform .1s ease; }
.cta-buttons a:hover { background: var(--brand-strong); }
.cta-buttons a:active { transform: translateY(1px); }

/* City buttons */
.city-buttons-container {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: 8px; max-width: 1200px; margin: 0 auto; padding: 0 20px;
}
@media (max-width: 400px) { .city-buttons-container { grid-template-columns: 1fr; } }
@media (min-width: 401px) and (max-width: 699px) { .city-buttons-container { grid-template-columns: repeat(2, 1fr); } }
.city-button {
  position: relative; display: block; height: 150px;
  background-size: cover; background-position: center;
  border-radius: 4px; overflow: hidden; text-decoration: none;
  transform: translateZ(0);
}
.city-button::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.35); transition: background .3s ease; }
.city-button:hover { transform: scale(1.02); filter: brightness(1.12); box-shadow: 0 6px 16px rgba(0,0,0,0.25); }
.city-button:hover::after { background: rgba(0,0,0,0.18); }
.city-button span { position: absolute; left: 10px; bottom: 10px; font-size: 1.2rem; font-weight: 700; color: #fff; z-index: 1; }

/* Social icons */
.social-icons { display: flex; justify-content: center; gap: 14px; margin: 20px 0; }
.social-icons .icon { width: 40px; height: auto; opacity: .9; transition: transform .2s ease, opacity .2s ease; }
:root.theme-dark .social-icons img { filter: brightness(0) invert(1); transition: filter 0.3s ease; }
:root.theme-dark .social-icons img.facebook-icon:hover { filter: brightness(0) saturate(100%) invert(34%) sepia(99%) saturate(607%) hue-rotate(182deg) brightness(92%) contrast(94%); }
:root.theme-dark .social-icons img.instagram-icon:hover { filter: brightness(0) saturate(100%) invert(30%) sepia(71%) saturate(6172%) hue-rotate(316deg) brightness(96%) contrast(89%); }
:root.theme-dark .social-icons img.medium-icon:hover { filter: brightness(0) invert(78%) sepia(0%) saturate(0%) hue-rotate(178deg) brightness(98%) contrast(97%); }
:root.theme-dark img.medium-icon { filter: invert(1) hue-rotate(180deg); }
.social-icons .icon:hover { transform: scale(1.07); opacity: 1; }
@media (max-width: 768px) { .social-icons .icon { width: 30px; } }
@media (max-width: 480px) { .social-icons .icon { width: 26px; } }

/* Artwork feeds */
.artworks-section { width: 90%; max-width: 1200px; margin: 0 auto; padding: 40px 0; }
.artworks-section h2 { font-size: 1.8rem; margin-bottom: 16px; color: var(--text); }
.artworks-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 32px; }
@media (min-width: 600px) { .artworks-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; } }
@media (min-width: 900px) { .artworks-grid { grid-template-columns: repeat(4, 1fr); } }
.artworks-grid .artwork-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 4px 10px var(--shadow); overflow: hidden; position: relative; cursor: pointer; transition: transform .2s ease-in-out; margin: 0; }
.artworks-grid .artwork-card:hover { transform: translateY(-4px); }
.artworks-grid .artwork-card img { width: 100%; height: 200px; object-fit: cover; display: block; }
.artworks-grid .artwork-card-content { padding: 10px 10px 2px 10px; position: relative; }
.artworks-grid .artwork-description { font-size: .9rem; color: var(--text); margin: -3px 0 5px; }

/* Recent painted/updated grids */
#recent-painted-grid,
#recent-updated-grid {
  display: grid; margin-left: auto; margin-right: auto; width: 100%; max-width: 1200px;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px;
}
@media (min-width: 1100px) {
  #recent-painted-grid,
  #recent-updated-grid { grid-template-columns: repeat(4, 1fr); }
}
#recent-painted-grid .artwork-card,
#recent-updated-grid .artwork-card { margin: 0; }
.home-feed { margin: 24px 0; }
.home-feed:last-of-type { margin-bottom: 0; }

/* Dropdown (tokenized) */
.dropdown-btn {
  font: 600 16px/1 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: var(--bg-soft); color: var(--text); border: 1px solid var(--border);
  width: 100%; padding: 10px; text-align: left; cursor: pointer; margin: 6px 0;
  border-radius: 6px; transition: background-color .2s ease, border-color .2s ease;
}
.dropdown-btn:hover { background: color-mix(in srgb, var(--bg-soft) 90%, var(--text)); }
.dropdown-content { display: none; background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 10px; margin-top: 6px; font-family: 'Source Sans Pro', system-ui, -apple-system, Segoe UI, Roboto, Arial; }
.dropdown-content p { margin: 0; }
.dropdown.open .dropdown-content { display: block; }

/* Instagram widget */
.lightwidget-wrap { display: flex; justify-content: center; width: 100%; padding-inline: 16px; min-height: 340px; overflow: hidden; border: 0; }
.lightwidget-widget { display: block; width: clamp(320px, 95vw, 1080px); max-width: 1200px; border: 0; overflow: hidden; }
