/* =========================================================
   KKF Travel Albums
   Version: 1.0.0
   Loads after kkf-trip-basket.css and reuses its tokens.
   ========================================================= */

.kkf-albums,
.kkf-profile,
.kkf-album-page {
  --a-sun: var(--kkf-sun, #f0522b);
  --a-mango: var(--kkf-mango, #f7941d);
  --a-ink: var(--kkf-ink, #17211f);
  --a-soft: var(--kkf-ink-soft, #5f6f6a);
  --a-line: var(--kkf-line, #ecdfd3);
  --a-sand: var(--kkf-sand, #fbf6f0);
  --a-teal: var(--kkf-teal, #0e6e63);
  --a-ease: 0.22s cubic-bezier(0.32, 0.72, 0.35, 1);

  max-width: 1100px;
  margin: 0 auto;
  font-family: var(--kkf-font-body, "Plus Jakarta Sans", system-ui, sans-serif);
  color: var(--a-ink);
  line-height: 1.65;
}

.kkf-albums *,
.kkf-profile *,
.kkf-album-page * {
  box-sizing: border-box;
}

/* ---------------------------------------- hero */

.kkf-albums-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 24px;
  padding: 30px 32px;
  border-radius: 24px;
  background:
    radial-gradient(120% 150% at 100% 0%, #ffb347 0%, rgba(255,179,71,0) 55%),
    linear-gradient(115deg, #f7941d 0%, #f0522b 52%, #d63e1c 100%);
  color: #fff;
  box-shadow: 0 14px 40px -18px rgba(23, 33, 31, 0.28);
}

.kkf-albums .kkf-eyebrow,
.kkf-profile .kkf-eyebrow,
.kkf-album-page .kkf-eyebrow {
  display: block;
  margin-bottom: 8px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.86;
}

.kkf-albums-hero h2 {
  margin: 0 0 8px;
  font-family: var(--kkf-font-display, "Fraunces", Georgia, serif);
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #fff;
}

.kkf-albums-hero p {
  margin: 0;
  max-width: 48ch;
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
}

.kkf-albums-hero .kkf-modal-primary {
  background: #fff;
  color: var(--kkf-sun-deep, #c33b16) !important;
}

/* ---------------------------------------- album cards (owner) */

.kkf-albums-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}

.kkf-albums-loading {
  grid-column: 1 / -1;
  padding: 40px;
  color: var(--a-soft);
  text-align: center;
}

.kkf-album-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--a-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(23, 33, 31, 0.05);
  transition: transform var(--a-ease), box-shadow var(--a-ease);
}

.kkf-album-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 44px -24px rgba(23, 33, 31, 0.5);
}

.kkf-album-card-cover {
  position: relative;
  aspect-ratio: 1200 / 630;
  background: var(--a-sand);
  overflow: hidden;
}

.kkf-album-card-cover img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  margin: 0;
  object-fit: cover;
  display: block;
}

.kkf-album-card-blank {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a9b4b0;
  font-size: 13.5px;
}

.kkf-album-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--a-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.kkf-album-badge.is-public {
  background: var(--kkf-teal-wash, #eaf5f3);
  color: var(--a-teal);
}

.kkf-album-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
  padding: 15px 16px 16px;
}

.kkf-album-card-body h3 {
  margin: 0;
  font-family: var(--kkf-font-display, Georgia, serif);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
}

.kkf-album-card-meta {
  color: var(--a-soft);
  font-size: 13px;
}

.kkf-album-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
}

.kkf-album-card-actions .kkf-modal-ghost {
  min-height: 38px;
  padding: 9px 16px;
  font-size: 13px;
}

.kkf-album-delete {
  min-height: 38px;
  padding: 9px 14px;
  border: 0;
  background: none;
  color: var(--a-soft);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.kkf-album-delete:hover { color: #b42318; }

/* ---------------------------------------- editor */

.kkf-album-editor {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
  background: rgba(23, 33, 31, 0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.kkf-album-editor[hidden] { display: none; }

.kkf-album-editor-inner {
  width: 100%;
  max-width: 720px;
  padding: 26px 28px 30px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.6);
}

.kkf-album-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.kkf-album-editor-head h3 {
  margin: 0;
  font-family: var(--kkf-font-display, Georgia, serif);
  font-size: 23px;
  font-weight: 600;
}

.kkf-album-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: var(--a-sand);
  color: var(--a-ink);
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.kkf-albums .kkf-field { display: block; margin-bottom: 16px; }

.kkf-albums .kkf-field > span,
.kkf-albums .kkf-field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--a-soft);
}

.kkf-albums .kkf-field input,
.kkf-albums .kkf-field select,
.kkf-albums .kkf-field textarea {
  width: 100%;
  min-height: 52px;
  padding: 13px 16px;
  border: 1.5px solid var(--a-line);
  border-radius: 14px;
  background: var(--a-sand);
  font-family: inherit;
  font-size: 16px;
  color: var(--a-ink);
}

.kkf-albums .kkf-field textarea {
  min-height: 150px;
  line-height: 1.7;
  resize: vertical;
}

.kkf-albums .kkf-field input:focus,
.kkf-albums .kkf-field select:focus,
.kkf-albums .kkf-field textarea:focus {
  outline: none;
  border-color: var(--a-sun);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(240, 82, 43, 0.13);
}

.kkf-album-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 26px 20px;
  margin-bottom: 14px;
  border: 2px dashed var(--a-line);
  border-radius: 18px;
  background: var(--a-sand);
  text-align: center;
}

.kkf-album-drop.is-over {
  border-color: var(--a-sun);
  background: var(--kkf-sun-wash, #fff1ea);
}

.kkf-album-drop strong { font-size: 16px; }

.kkf-album-drop span { color: var(--a-soft); font-size: 13px; }

.kkf-album-drop em {
  color: var(--a-soft);
  font-size: 12px;
  font-style: normal;
}

.kkf-album-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.kkf-album-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--a-sand);
}

.kkf-album-thumb img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  margin: 0;
  object-fit: cover;
  display: block;
}

.kkf-album-thumb-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(23, 33, 31, 0.72);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.kkf-album-thumb-remove:hover { background: #b42318; }

.kkf-album-thumb-first,
.kkf-album-thumb-first-btn {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 3px 10px;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
}

.kkf-album-thumb-first {
  background: linear-gradient(120deg, var(--a-mango), var(--a-sun));
  color: #fff;
}

.kkf-album-thumb-first-btn {
  background: rgba(255, 255, 255, 0.92);
  color: var(--a-ink);
  opacity: 0;
  transition: opacity var(--a-ease);
}

.kkf-album-thumb:hover .kkf-album-thumb-first-btn { opacity: 1; }

/* privacy */

.kkf-album-privacy {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.kkf-album-choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 16px;
  border: 1.5px solid var(--a-line);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  transition: border-color var(--a-ease), background var(--a-ease);
}

.kkf-album-choice:hover { border-color: #f6c9b6; }

.kkf-album-choice input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--a-sun);
}

.kkf-album-choice:has(input:checked) {
  border-color: var(--a-sun);
  background: var(--kkf-sun-wash, #fff1ea);
}

.kkf-album-choice-body { display: flex; flex-direction: column; gap: 2px; }
.kkf-album-choice-body strong { font-size: 15.5px; }

.kkf-album-choice-body span {
  color: var(--a-soft);
  font-size: 13.5px;
  line-height: 1.5;
}

.kkf-album-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------------------------------------- the shelf */

.kkf-album-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 30px 26px;
}

.kkf-book { display: flex; flex-direction: column; gap: 10px; }

.kkf-book-link {
  position: relative;
  display: block;
  text-decoration: none;
  perspective: 1200px;
}

/* The cover, tipped slightly like a book on a shelf. */
.kkf-book-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 6px 14px 14px 6px;
  overflow: hidden;
  background: linear-gradient(140deg, #d9a05f, #b06f34);
  box-shadow: 0 18px 34px -18px rgba(23, 33, 31, 0.7),
    0 2px 0 rgba(255, 255, 255, 0.4) inset;
  transform: rotateY(-6deg);
  transform-origin: left center;
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0.35, 1),
    box-shadow 0.4s ease;
}

.kkf-book-link:hover .kkf-book-cover {
  transform: rotateY(-1deg) translateY(-4px);
  box-shadow: 0 30px 50px -22px rgba(23, 33, 31, 0.75);
}

.kkf-book-cover img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  margin: 0;
  object-fit: cover;
  display: block;
}

/* the spine */
.kkf-book-spine {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: 12px;
  border-radius: 6px 0 0 6px;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.38) 0%,
    rgba(0, 0, 0, 0.12) 55%,
    rgba(255, 255, 255, 0.22) 100%
  );
  pointer-events: none;
}

.kkf-book-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(23, 33, 31, 0) 45%,
    rgba(23, 33, 31, 0.78) 100%
  );
}

.kkf-book-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 16px 16px 16px 22px;
  color: #fff;
}

.kkf-book-title {
  font-family: var(--kkf-font-display, "Fraunces", Georgia, serif);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.kkf-book-meta {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.kkf-book-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--a-soft) !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.kkf-book-author img {
  width: 26px !important;
  height: 26px !important;
  margin: 0;
  border-radius: 50%;
  object-fit: cover;
}

.kkf-book-author:hover { color: var(--a-sun) !important; }

/* ---------------------------------------- profile */

.kkf-profile-head {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
  padding: 26px 28px;
  border: 1px solid var(--a-line);
  border-radius: 24px;
  background: #fff;
}

.kkf-profile-avatar {
  width: 84px !important;
  height: 84px !important;
  flex: 0 0 auto;
  margin: 0;
  border: 3px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 22px -10px rgba(23, 33, 31, 0.6);
}

.kkf-profile-copy h2 {
  margin: 0 0 8px;
  font-family: var(--kkf-font-display, Georgia, serif);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.kkf-profile .kkf-eyebrow { color: var(--a-sun); opacity: 1; }

.kkf-profile-stats { display: flex; flex-wrap: wrap; gap: 16px; }

.kkf-profile-stats span {
  color: var(--a-soft);
  font-size: 14px;
}

.kkf-profile-stats strong {
  font-family: var(--kkf-font-display, Georgia, serif);
  font-size: 19px;
  color: var(--a-ink);
}

/* ---------------------------------------- single album */

.kkf-album-page { max-width: 960px; }

.kkf-album-hero {
  position: relative;
  margin-bottom: 30px;
  border-radius: 24px;
  overflow: hidden;
  background: var(--a-sand);
}

.kkf-album-hero-image {
  width: 100% !important;
  height: auto !important;
  max-width: none;
  margin: 0;
  display: block;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}

.kkf-album-hero-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 30px 32px;
  background: linear-gradient(
    180deg,
    rgba(23, 33, 31, 0) 0%,
    rgba(23, 33, 31, 0.82) 100%
  );
  color: #fff;
}

.kkf-album-hero-body h1 {
  margin: 0 0 8px;
  font-family: var(--kkf-font-display, "Fraunces", Georgia, serif);
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: #fff;
}

.kkf-album-places {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14.5px;
}

.kkf-album-byline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.9);
}

.kkf-album-byline a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
}

.kkf-album-byline img {
  width: 30px !important;
  height: 30px !important;
  margin: 0;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  object-fit: cover;
}

.kkf-album-private {
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-weight: 700;
}

.kkf-album-story {
  max-width: 68ch;
  margin: 0 auto 34px;
  font-size: 17.5px;
  line-height: 1.85;
  color: #2c3a37;
}

.kkf-album-story p { margin: 0 0 20px; }

.kkf-album-story p:first-of-type::first-letter {
  float: left;
  margin: 6px 10px 0 0;
  font-family: var(--kkf-font-display, Georgia, serif);
  font-size: 62px;
  line-height: 0.82;
  color: var(--a-sun);
}

/* gallery */

.kkf-album-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  margin-bottom: 34px;
}

.kkf-album-photo { margin: 0; }

.kkf-album-photo.is-wide { grid-column: span 2; }

.kkf-album-photo-btn {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--a-sand);
  cursor: zoom-in;
}

.kkf-album-photo-btn img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  margin: 0;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.32, 0.72, 0.35, 1);
}

.kkf-album-photo-btn:hover img { transform: scale(1.05); }

.kkf-album-photo figcaption {
  padding: 7px 4px 0;
  color: var(--a-soft);
  font-size: 13px;
  line-height: 1.5;
}

/* share */

.kkf-album-share {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 22px;
  border: 1px solid var(--a-line);
  border-radius: 18px;
  background: var(--a-sand);
}

.kkf-album-share > span {
  margin-right: 4px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--a-soft);
}

.kkf-share-btn {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 11px 20px;
  border: 1.5px solid var(--a-line);
  border-radius: 999px;
  background: #fff;
  color: var(--a-ink) !important;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--a-ease), background var(--a-ease),
    color var(--a-ease);
}

.kkf-share-btn.is-facebook:hover {
  border-color: #1877f2;
  background: #1877f2;
  color: #fff !important;
}

.kkf-share-btn.is-whatsapp:hover {
  border-color: #25d366;
  background: #25d366;
  color: #fff !important;
}

.kkf-share-btn.is-x:hover {
  border-color: #17211f;
  background: #17211f;
  color: #fff !important;
}

.kkf-share-btn.is-copy:hover {
  border-color: var(--a-sun);
  background: var(--a-sun);
  color: #fff !important;
}

.kkf-album-instagram {
  margin: 10px 0 0;
  color: var(--a-soft);
  font-size: 13px;
}

/* lightbox */

.kkf-album-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 60px;
  background: rgba(12, 18, 17, 0.94);
}

.kkf-album-lightbox[hidden] { display: none; }

.kkf-album-lightbox img {
  max-width: 100%;
  max-height: 84vh;
  margin: 0;
  border-radius: 12px;
  object-fit: contain;
}

.kkf-album-lightbox-close,
.kkf-album-nav {
  position: absolute;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  line-height: 1;
}

.kkf-album-lightbox-close {
  top: 20px;
  right: 22px;
  width: 46px;
  height: 46px;
  font-size: 26px;
}

.kkf-album-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  font-size: 30px;
}

.kkf-album-nav.is-prev { left: 16px; }
.kkf-album-nav.is-next { right: 16px; }

.kkf-album-lightbox-close:hover,
.kkf-album-nav:hover { background: rgba(255, 255, 255, 0.3); }

.kkf-album-lightbox-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  margin: 0;
  padding: 0 60px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  text-align: center;
}

/* ---------------------------------------- responsive */

@media (max-width: 780px) {
  .kkf-albums-hero {
    flex-direction: column;
    align-items: stretch;
    padding: 24px 20px;
    border-radius: 18px;
  }

  .kkf-album-shelf {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 16px;
  }

  .kkf-book-cover { transform: none; }
  .kkf-book-link:hover .kkf-book-cover { transform: translateY(-3px); }
  .kkf-book-title { font-size: 15px; }

  .kkf-profile-head {
    flex-direction: column;
    text-align: center;
    padding: 22px 18px;
  }

  .kkf-profile-stats { justify-content: center; }

  .kkf-album-hero-body { padding: 20px 18px; }

  .kkf-album-story {
    font-size: 16.5px;
    padding: 0 2px;
  }

  .kkf-album-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .kkf-album-photo.is-wide { grid-column: span 2; }

  .kkf-album-editor-inner { padding: 20px 18px 24px; border-radius: 18px; }

  .kkf-album-lightbox { padding: 60px 12px; }
  .kkf-album-nav { width: 42px; height: 42px; font-size: 26px; }
  .kkf-album-lightbox-caption { padding: 0 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .kkf-albums *, .kkf-profile *, .kkf-album-page * {
    transition: none !important;
  }
}
