/* =========================================================
   MARTIE GALLERY - stilark
   Cream / VSCO / Instagram hybrid
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@600;700&family=Inter:wght@300;400;500;600&family=Cormorant+Garamond:ital,wght@0,400;0,500;1,400&display=swap');

:root {
  --bg:        #f7f4e9;
  --bg-soft:   #efece1;
  --ink:       #2b2724;
  --muted:     #7e766c;
  --line:      #d8d2c4;
  --accent:    #8b1a1a;
  --accent-soft: #a4423d;
  --shadow:    0 8px 30px rgba(30, 25, 20, 0.12);
  --shadow-sm: 0 2px 12px rgba(30, 25, 20, 0.08);
  --radius:    6px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

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

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

/* ---------- HEADER / LOGO ---------- */
.site-header {
  text-align: center;
  padding: 56px 24px 24px;
  position: relative;
}

.logo {
  font-family: 'Caveat', cursive;
  font-size: 88px;
  line-height: 1;
  color: var(--accent);
  margin: 0;
  letter-spacing: -1px;
  display: inline-block;
}
.logo a { color: inherit; }
.logo a:hover { opacity: 1; }

.tagline {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 22px;
  color: var(--muted);
  margin: 8px 0 0;
  letter-spacing: 0.2px;
}

.subtagline {
  color: var(--muted);
  font-size: 15px;
  margin: 22px auto 0;
  max-width: 480px;
  line-height: 1.5;
}

.divider-dots {
  border: 0;
  border-top: 2px dotted var(--line);
  max-width: 720px;
  margin: 26px auto;
}

/* ---------- NAVIGATION ---------- */
.nav {
  display: flex;
  justify-content: center;
  gap: 28px;
  padding: 6px 16px 20px;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.nav a {
  color: var(--muted);
  font-weight: 500;
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
}
.nav a.active,
.nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--accent);
  opacity: 1;
}

/* ---------- LAYOUT WRAPPERS ---------- */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- IMAGE GRID (FORSIDEN) ---------- */
.image-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px 12px 60px;
}
@media (max-width: 1000px) { .image-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .image-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px)  { .image-grid { grid-template-columns: 1fr; } }

.tile {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--bg-soft);
  aspect-ratio: 2 / 3;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(.25,.8,.25,1);
}
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(.25,.8,.25,1), filter 0.3s;
  filter: saturate(0.95);
}
.tile:hover img { transform: scale(1.04); filter: saturate(1.05); }

.tile-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px 14px 12px;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.62) 100%);
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s;
}
.tile:hover .tile-overlay { opacity: 1; }
.tile-overlay h3 {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.2px;
}
.tile-overlay .meta {
  font-size: 11px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  opacity: 0.85;
  margin-top: 2px;
}

/* ---------- COLLECTIONS LIST ---------- */
.collections-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  padding: 16px 24px 64px;
}
@media (max-width: 720px) { .collections-grid { grid-template-columns: 1fr; } }

.collection-card {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-soft);
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s, box-shadow 0.4s;
}
.collection-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.collection-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s;
}
.collection-card:hover img { transform: scale(1.05); }
.collection-card .label {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.5) 80%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px 26px;
  color: #fff;
}
.collection-card .label h3 {
  margin: 0;
  font-family: 'Caveat', cursive;
  font-size: 44px;
  line-height: 1;
  font-weight: 700;
}
.collection-card .label .sub {
  font-size: 13px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  margin-top: 6px;
  opacity: 0.9;
}

/* ---------- SECTION TITLES ---------- */
.section-title {
  text-align: center;
  margin: 30px 0 14px;
}
.section-title h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-style: italic;
  font-size: 32px;
  color: var(--ink);
  margin: 0;
}
.section-title .sub {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ---------- BILDESIDE (IMAGE DETAIL) ---------- */
.image-page {
  padding: 0 0 80px;
}
.image-hero {
  width: 100%;
  background: #f7f4e9;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  max-height: 88vh;
  overflow: hidden;
}
.image-hero img {
  max-height: 84vh;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0,0,0,0);
}

.image-meta {
  max-width: 760px;
  margin: 40px auto 0;
  padding: 0 24px;
}
.image-meta h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 38px;
  margin: 0 0 6px;
  line-height: 1.15;
}
.image-meta .date {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}
.image-meta .description {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  line-height: 1.6;
  margin: 22px 0 24px;
  color: #3a3530;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  align-items: center;
}
.tag-row .label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 6px;
}

.tag, .location-tag {
  display: inline-block;
  padding: 5px 12px;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: var(--bg-soft);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: all 0.2s;
}
.tag:hover, .location-tag:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  opacity: 1;
}
.location-tag {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
}
.location-tag::before { content: "◉ "; font-size: 10px; }

/* --- Stedshierarki: interaktiv accordion på filter-siden --- */
.loc-accordion {
  margin-top: 8px;
  border-top: 1px solid var(--line);
}
.loc-acc-item {
  border-bottom: 1px solid var(--line);
}
.loc-acc-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  padding: 13px 2px;
  color: var(--ink);
  transition: color 0.15s;
  gap: 8px;
}
.loc-acc-btn:hover,
.loc-acc-btn.active { color: var(--accent); }
.loc-acc-country-btn {
  font-size: 12px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
  padding: 15px 2px;
}
.loc-acc-arrow {
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  flex-shrink: 0;
  color: var(--muted);
}
.loc-acc-btn.active .loc-acc-arrow,
.loc-acc-btn:hover .loc-acc-arrow { color: var(--accent); }
.loc-acc-children {
  display: none;
  padding: 2px 0 6px 18px;
}
.loc-acc-item.open > .loc-acc-children { display: block; }
.loc-acc-town-btn {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 10px 2px;
}
.loc-acc-place-btn {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 8px 2px;
  color: var(--muted);
}
.loc-acc-place-btn:hover,
.loc-acc-place-btn.active { color: var(--accent); }
.loc-results { margin-top: 0; }
.loc-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 24px 20px;
  margin-top: -8px;
}
.loc-breadcrumb-link {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.loc-breadcrumb-link:hover { opacity: 1; }
.loc-breadcrumb-sep {
  font-size: 12px;
  color: var(--muted);
  line-height: 1;
}
.loc-results-places {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 8px;
}
.loc-results-places .location-tag.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.loc-results-places--sub:empty {
  display: none;
}
.loc-results-places--sub:not(:empty) {
  padding-top: 18px;
  padding-bottom: 16px;
  margin-top: 6px;
  border-top: 1px solid var(--line);
}
.loc-tag-sub {
  font-size: 11px;
  padding: 5px 12px;
  letter-spacing: 0.8px;
  opacity: 0.85;
}
@media (max-width: 720px) {
  .loc-results-places:not(.loc-results-places--sub) { padding-bottom: 12px; }
  .loc-tag-sub { padding: 8px 13px; }
}
.loc-results-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px 2px;
  font-size: 10px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}
.loc-bc-link {
  color: var(--accent);
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.loc-bc-link:hover { opacity: 1; }
.loc-bc-current { color: var(--ink); font-weight: 500; }
.loc-bc-sep { color: var(--muted); }

.location-pill {
  display: inline-flex;
  flex-direction: column;
  padding: 7px 14px;
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 18px;
  gap: 3px;
  text-decoration: none;
}
.location-pill-place {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  line-height: 1.3;
}
.location-pill-place::before { content: "◉ "; font-size: 10px; }
.location-pill-place:hover { opacity: 0.7; }
.location-pill-sub {
  font-size: 10px;
  letter-spacing: 0.5px;
  color: var(--muted);
  padding-left: 15px;
  line-height: 1.3;
}
.location-pill-sub a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
.location-pill-sub a:hover { color: var(--accent); }

.back-link {
  display: inline-block;
  margin: 24px 0 8px;
  padding: 0 24px;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}
.back-link:hover { color: var(--ink); opacity: 1; }

/* ---------- COLLECTION PAGE ---------- */
.collection-hero {
  text-align: center;
  padding: 40px 24px 20px;
}
.collection-hero h1 {
  font-family: 'Caveat', cursive;
  color: var(--accent);
  font-size: 84px;
  line-height: 1;
  margin: 0;
}
.collection-hero .meta {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 8px;
}
.collection-hero .description {
  max-width: 580px;
  margin: 18px auto 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px;
  font-style: italic;
  color: #4a4540;
  line-height: 1.55;
}

/* ---------- COLLECTION BANNER IMAGE ---------- */
.collection-banner {
  max-width: 1400px;
  margin: 0 auto 16px;
  padding: 0 24px;
}
.collection-banner img {
  width: 100%;
  max-height: 80vh;
  object-fit: cover;
  display: block;
  border-radius: var(--radius);
}
@media (max-width: 720px) {
  .collection-banner { padding: 0 14px; }
  .collection-banner img { max-height: 60vh; }
}

/* ---------- FILTER PAGE ---------- */
.filter-header {
  text-align: center;
  padding: 40px 24px 10px;
}
.filter-header .kind {
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
}
.filter-header h1 {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 48px;
  margin: 6px 0 0;
}
.filter-header .count {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}
.filter-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
  max-width: 900px;
  margin: 0 auto;
}
.filter-nav-back {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}
.filter-nav-back:hover { color: var(--ink); }

/* ---------- FOOTER ---------- */
.site-footer {
  text-align: center;
  padding: 40px 24px 60px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-top: 1px solid var(--line);
  margin-top: 40px;
}
.site-footer .logo-small {
  font-family: 'Caveat', cursive;
  text-transform: none;
  letter-spacing: 0;
  font-size: 28px;
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
}

/* ---------- ADMIN MODAL ---------- */
.admin-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 15, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.admin-overlay.open { display: flex; }
.admin-modal {
  background: var(--bg);
  border-radius: 8px;
  padding: 32px;
  max-width: 640px;
  width: calc(100% - 32px);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 40px 100px rgba(0,0,0,0);
}
.admin-modal h2 {
  font-family: 'Caveat', cursive;
  color: var(--accent);
  font-size: 44px;
  margin: 0 0 4px;
}
.admin-modal .hint {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 22px;
}
.admin-modal label {
  display: block;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 14px 0 6px;
}
.admin-modal input[type=text],
.admin-modal input[type=password],
.admin-modal input[type=date],
.admin-modal input[type=url],
.admin-modal textarea,
.admin-modal select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
}
.admin-modal textarea { min-height: 80px; resize: vertical; }
.admin-modal .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 540px) { .admin-modal .row { grid-template-columns: 1fr; } }

.btn {
  display: inline-block;
  padding: 10px 22px;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 4px;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}
.btn:hover { background: var(--accent-soft); }
.btn.secondary { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.btn.secondary:hover { color: var(--ink); background: var(--bg-soft); }
.btn-row { display: flex; gap: 8px; margin-top: 22px; justify-content: flex-end; }

.folder-section { margin: 12px 0 4px; }
.folder-pick-btn { width: 100%; justify-content: center; }
.folder-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.folder-thumb {
  position: relative;
  width: 86px;
  height: 86px;
  border-radius: 5px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s, opacity 0.15s;
}
.folder-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.folder-thumb-name {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 9px;
  padding: 2px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.folder-thumb:hover { border-color: var(--accent); opacity: 0.85; }
.folder-thumb.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); opacity: 1; }
.folder-thumb.selected::after {
  content: '✓';
  position: absolute;
  top: 4px; right: 5px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
}

.dropzone {
  border: 2px dashed var(--line);
  border-radius: 6px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); color: var(--accent); background: var(--bg-soft); }
.dropzone .small { font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; opacity: 0.6; display: block; margin-top: 6px; }
.preview-img { max-height: 200px; margin: 12px auto 0; display: block; border-radius: 4px; }

.json-output {
  background: #1f1d1a;
  color: #e7decf;
  padding: 16px;
  border-radius: 6px;
  font-family: 'Menlo', monospace;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 280px;
  overflow-y: auto;
  margin-top: 18px;
  line-height: 1.5;
}

.admin-badge {
  position: fixed;
  top: 16px;
  right: 16px;
  background: var(--accent);
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  z-index: 999;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  display: none;
}
.admin-badge.show { display: inline-block; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 1px;
  z-index: 1100;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.toast.show { opacity: 1; }

/* ---------- ALBUM (FLERE BILDER PÅ ÉN POST) ---------- */
.album-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1;
}
.album-badge svg { width: 14px; height: 14px; }

.album-stack {
  max-width: 1100px;
  margin: 0 auto;
}
.album-stack .image-hero {
  max-height: none;
  padding: 14px 24px;
}
.album-stack .image-hero img {
  max-height: 78vh;
}
.album-stack .image-hero + .image-hero {
  padding-top: 0;
}

.container2 {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 50px 32%;
}

.gallery2 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 30px;
}

.dotted2 {
  border: 3px dotted #999; 
  border-style: none none dotted; 
  color: #fff; 
  background-color: #fff; 
}

.image-caption {
  max-width: 760px;
  margin: -2px auto 18px;
  padding: 0 24px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  font-style: italic;
  color: #d9d3c7;
  text-align: center;
  line-height: 1.5;
}
.album-stack .image-hero + .image-caption {
  background: #f7f4e9;
  margin: 0;
  padding: 8px 24px 18px;
  max-width: none;
}

@media (max-width: 720px) {
  .album-stack .image-hero { padding: 6px 8px; }
  .album-stack .image-hero img { max-height: 60vh; }
  .image-caption { font-size: 15px; padding: 0 16px; }
  .album-stack .image-hero + .image-caption { padding: 6px 16px 14px; }
}

/* ---------- INSTAGRAM-LIKE INFO BAR ---------- */
.image-info-bar {
  max-width: 760px;
  margin: 18px auto 0;
  padding: 0 24px;
  display: flex;
  gap: 18px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.4px;
}
.image-info-bar a { color: var(--accent); }
.image-info-bar .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line); display: inline-block; }

/* ---------- COMMING SOON ---------- */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--muted);
  font-style: italic;
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
}

/* responsive logo */
@media (max-width: 540px) {
  .logo { font-size: 64px; }
  .tagline { font-size: 18px; }
  .collection-hero h1 { font-size: 56px; }
  .image-meta h1 { font-size: 28px; }
}

/* =========================================================
   MOBILE / TOUCH FORBEDRINGER
   ========================================================= */

/* På touch-skjermer kan man ikke hover — vis alltid bildetittel litt */
@media (hover: none), (pointer: coarse) {
  .tile-overlay {
    opacity: 1;
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.55) 100%);
    padding: 10px 12px 10px;
  }
  .tile-overlay h3 { font-size: 14px; }
  .tile-overlay .meta { font-size: 9px; letter-spacing: 1.4px; }
  .tile:hover img { transform: none; }
}

/* Smalere skjermer — mindre padding og luftigere lesing */
@media (max-width: 720px) {
  .site-header { padding: 36px 16px 16px; }
  .nav { gap: 18px; font-size: 11px; letter-spacing: 1.6px; padding-bottom: 14px; }
  .container, .container-narrow { padding: 0 14px; }
  .image-grid { gap: 5px; padding: 6px 6px 40px; }
  .collections-grid { padding: 12px 14px 40px; gap: 18px; }
  .section-title h2 { font-size: 26px; }
  .section-title .sub { font-size: 11px; letter-spacing: 1.8px; }
  .collection-hero { padding: 28px 16px 14px; }
  .collection-hero .description { font-size: 17px; }
  .image-hero { padding: 12px; max-height: 70vh; }
  .image-hero img { max-height: 65vh; }
  .image-meta { padding: 0 16px; margin-top: 26px; }
  .image-meta .description { font-size: 18px; }
  .back-link { padding: 0 16px; }
  /* Større tap targets for tagger */
  .tag, .location-tag {
    padding: 9px 14px;
    font-size: 12px;
  }
  .location-pill { padding: 9px 14px; }
  .tag-row { gap: 6px; }
  .image-info-bar { padding: 0 16px; }
  .collection-card .label h3 { font-size: 34px; }
}

/* Veldig små skjermer */
@media (max-width: 400px) {
  .logo { font-size: 56px; }
  .tagline { font-size: 16px; }
  .nav { gap: 14px; }
  .collection-hero h1 { font-size: 46px; }
  .filter-header h1 { font-size: 32px; }
  .image-meta h1 { font-size: 24px; }
}

/* Trygg-zone for telefoner med notch (iPhone X+) */
@supports (padding: max(0px)) {
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  .site-footer { padding-bottom: max(60px, env(safe-area-inset-bottom)); }
}

/* Admin-modal må håndtere telefon-tastatur */
@media (max-width: 540px) {
  .admin-modal { padding: 22px 18px; max-height: 92vh; }
  .admin-modal h2 { font-size: 36px; }
  .btn-row { flex-wrap: wrap; justify-content: stretch; }
  .btn-row .btn { flex: 1 1 auto; min-width: 0; }
  .json-output { font-size: 11px; padding: 12px; }
}

/* Tøm hover-skygger på mobil for snappere rendering */
@media (max-width: 720px) {
  .collection-card { box-shadow: none; }
  .collection-card:hover { transform: none; box-shadow: var(--shadow-sm); }
}
