@import url('https://fonts.googleapis.com/css2?family=Circular+Std:wght@400;500;600&display=swap');

:root {
  --bg: #FFFFFF;            /* page background */
  --surface: #FFFFFF;       /* cards & header */
  --on-surface: #333333;    /* main text */
  --muted: #888888;         /* secondary text */
  --accent: #b8d1d1;        /* coral/orange */
  --hover-bg: #b8d1d1;       /* light hover */
  --border: #E0E0E0;        /* light grey border */

  --gap: 1rem;
  --radius: 12px;
  --max-width: 1200px;

  --font-body: 'Circular Std', system-ui, sans-serif;
  --fs-sm: 1rem;
  --fs-lg: 1.5rem;
}

html {
  scroll-behavior: smooth;  /* global smooth scrolling */
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--on-surface);
  font-family: var(--font-body);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* HEADER: sticky at top */
.page-header {
  position: sticky;
  top: 0; left: 0;
  width: 100%;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.page-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--gap);
  text-align: center;
}
.page-header__title {
  font-size: var(--fs-lg);
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.page-header__subtitle {
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-bottom: var(--gap);
}
.page-header__nav {
  display: flex;
  justify-content: center;
  overflow-x: auto;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
  position: relative; /* for underline */
}
.nav__btn {
  flex: 0 0 auto;
  padding: 0.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--on-surface);
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s, color 0.2s;
  position: relative;
}
.nav__btn:hover {
  background: var(--hover-bg);
}
.nav__btn--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

/* Animated nav underline */
.nav__btn::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s ease;
}
.nav__btn:hover::after,
.nav__btn--active::after {
  transform: scaleX(1);
}

/* MAIN CONTENT */
.page-content {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gap);
  /* Uncomment for scroll‑snap effect:
  scroll-snap-type: y mandatory;
  overflow-y: auto;
  */
}
.category {
  margin-bottom: calc(var(--gap) * 2);
  /* Uncomment for scroll‑snap:
  scroll-snap-align: start;
  */
}
.category h2 {
  font-size: var(--fs-lg);
  font-weight: 500;
  margin-bottom: var(--gap);
}

/* MASONRY-STYLE LAYOUT */
.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  column-count: 1;
  column-gap: var(--gap);
}
@media (min-width: 600px) {
  .post-list { column-count: 2; }
}
@media (min-width: 900px) {
  .post-list { column-count: 3; }
}

/* Fade‑in + slide up animation */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.post-list__item {
  display: inline-block;
  width: 100%;
  position: relative;  /* for share button & gradient */
  max-height: 775px;   /* control visible height */
  overflow: hidden;    /* crop overflow */
  background: var(--surface);
  padding: var(--gap);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: transform 0.3s cubic-bezier(.25,.8,.25,1),
              box-shadow 0.3s cubic-bezier(.25,.8,.25,1);
  margin-bottom: var(--gap);
  opacity: 0;
  animation: fadeInUp 0.5s ease-out forwards;
}
/* Staggered delays for first batch */
.post-list__item:nth-child(1) { animation-delay: 0ms; }
.post-list__item:nth-child(2) { animation-delay: 50ms; }
.post-list__item:nth-child(3) { animation-delay: 100ms; }
.post-list__item:nth-child(4) { animation-delay: 150ms; }
.post-list__item:nth-child(5) { animation-delay: 200ms; }
.post-list__item:nth-child(6) { animation-delay: 250ms; }

.post-list__item:hover {
  transform: translateY(-6px) rotateX(2deg);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
  background: var(--hover-bg);
}

/* fade-out at bottom to hint more text */
.post-list__item::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3rem;
  background: linear-gradient(transparent, var(--surface));
  pointer-events: none;
}

/* FORCE IG EMBED TO FILL */
.instagram-media,
.instagram-media-rendered,
.instagram-media-rendered iframe {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
}

.post-list__item figcaption {
  margin-top: 0.5rem;
}
.post-list__item a {
  color: var(--accent);
  text-decoration: none;
  font-size: var(--fs-sm);
}
.post-list__item a:hover {
  text-decoration: underline;
}

/* LOAD MORE BUTTON */
.load-more-container {
  text-align: center;
  margin-top: var(--gap);
}
.load-more-btn {
  padding: 0.5rem 1rem;
  font-size: var(--fs-sm);
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}
.load-more-btn:hover {
  background: #e14c51;
}

/* SHARE BUTTON */
.share-btn {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: var(--accent);
  border: 4px solid var(--accent);
  border-radius: 50%;
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  z-index: 10;
}
@keyframes pulse {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}
.share-btn:hover {
  background: #b8d1d1;
  animation: pulse 1s infinite;
  transform-origin: center;
}

/* FOOTER */
.footer-nav {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
.footer-nav__link {
  color: var(--muted);
  text-decoration: none;
  padding: 0 0.25rem;
}
.footer-nav__link:hover {
  color: var(--accent);
  text-decoration: underline;
}
.page-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.page-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--gap);
  text-align: center;
}
.page-footer small {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}
