/*
==========================================================
Random Gallery
==========================================================
*/

@font-face {
  font-family: 'CorbelBoldItalic';
  src: url('fonts/Corbel Bold Italic.ttf') format('truetype');
  src: local('Ø'), url('fonts/Corbel Bold Italic.ttf') format('truetype');
}

@font-face {
  font-family: 'CorbelItalic';
  src: url('fonts/Corbel.ttf') format('truetype');
  src: local('Ø'), url('fonts/Corbel.ttf') format('truetype');
}

#randomgallery {
  box-sizing: border-box;
  margin: 0;
  padding: 50px 20px;
  text-align: center;
  line-height: 1.6;
  font-family: Arial, sans-serif;
  color: #fff;
}

/* ---------- Stacked (default) ---------- */

#randomgallery .rg-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

#randomgallery .rg-phone {
  flex: 0 0 auto;
  width: clamp(160px, 28vw, 220px);
  height: auto;
  margin: 6px 0;
}

#randomgallery .rg-content {
  flex: 0 0 auto;
  width: 100%;
  max-width: 520px;
}

/* ---------- Text block ---------- */

#randomgallery .rg-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

#randomgallery .rg-icon {
  width: 55px;
  margin: 6px 0;
  border-radius: 16px;
  border: 1px solid #bababa;
}

#randomgallery .rg-title,
#randomgallery .rg-claim {
  background: linear-gradient(90deg, #784cff 0%, #964def 35%, #ff4b4c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

#randomgallery .rg-title {
  margin: 0;
  padding: 0 10px;
  font-family: 'CorbelBoldItalic', Arial, sans-serif;
  font-size: clamp(1.5em, 7vw, 3em);
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.08em;
  text-transform: none;
  position: relative;
  top: 0.1em; /* optical alignment of the Corbel font with the icon */
}

#randomgallery .rg-claim {
  display: block;
  width: fit-content;
  max-width: 600px;
  margin: 14px auto 10px;
  font-family: 'CorbelItalic', Arial, sans-serif;
  font-size: 1.25em;
  font-weight: normal;
  font-style: italic;
}

#randomgallery .rg-text {
  max-width: 600px;
  margin: 20px auto;
  font-family: inherit;
  color: #fff;
}

#randomgallery .rg-badges {
  margin-top: 12px;
  white-space: nowrap;
  container-type: inline-size;
  container-name: rg-badges;
}

#randomgallery .rg-badges a {
  display: inline-block;
}

#randomgallery .rg-badges img {
  height: 45px;
  margin: 8px;
  transition: transform 0.2s ease;
}

#randomgallery .rg-badges a:hover img {
  transform: scale(1.04);
}

@container rg-badges (max-width: 440px) {
  #randomgallery .rg-badges a {
    display: block;
    width: min(100%, 180px);
    margin: 16px auto;
  }
  #randomgallery .rg-badges img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
  }
}

#randomgallery .rg-links {
  margin-top: 24px;
}

#randomgallery .rg-links a {
  display: inline-block;
  margin: 0 6px;
  font-size: 0.9em;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
}

/* ---------- Side by side (wide screens, not embedded) ---------- */

@media (min-width: 901px) {
  #randomgallery:not(.rg-compact) .rg-card {
    flex-direction: row;
  }
  #randomgallery:not(.rg-compact) .rg-phone {
    width: 240px;
  }
  #randomgallery:not(.rg-compact) .rg-content {
    flex: 0 1 520px;
    width: auto;
  }
}

/* ---------- Embedded half-width on the main page (always stacked) ---------- */

@media (min-width: 901px) {
  #randomgallery.rg-compact {
    padding: 40px 20px;
  }
  #randomgallery.rg-compact .rg-title {
    font-size: clamp(1.6em, 2.4vw, 2.4em);
  }
  #randomgallery.rg-compact .rg-title-row {
    flex-wrap: wrap;
  }
}

/* ---------- Standalone page ---------- */

body.rg-page {
  margin: 0;
  background: #000;
}

body.rg-page #randomgallery {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
}

/*
==========================================================
Subpages (privacy.html, about.html)
==========================================================
*/

body.rg-doc,
body.rg-doc * {
  box-sizing: border-box;
}

body.rg-doc {
  margin: 0;
  min-height: 100vh;
  background: #000 url('background_low.jpg') center center / cover fixed no-repeat;
  color: #fff;
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

body.rg-doc .rg-doc-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

body.rg-doc .rg-doc-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

body.rg-doc .rg-doc-icon {
  width: 60px;
  border-radius: 20px;
  border: 1px solid #bababa;
}

body.rg-doc h1 {
  margin: 0;
  padding: 0 10px;
  font-family: 'CorbelBoldItalic', Arial, sans-serif;
  font-size: 3em;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.08em;
  position: relative;
  top: 0.1em;
  background: linear-gradient(90deg, #784cff 0%, #964def 35%, #ff4b4c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Page heading ("Legal Information", "Privacy Policy") */
body.rg-doc .rg-doc-heading {
  margin: 32px 0 20px;
  font-family: 'CorbelBoldItalic', Arial, sans-serif;
  font-size: 1.6em;
  font-weight: 700;
  font-style: italic;
  text-align: center;
}

body.rg-doc .rg-doc-panel {
  padding: 12px 8px 28px;
}

body.rg-doc h2 {
  margin: 28px 0 6px;
  font-family: 'CorbelBoldItalic', Arial, sans-serif;
  font-size: 1.4em;
  font-weight: 700;
  font-style: italic;
}

body.rg-doc p,
body.rg-doc li {
  margin: 8px 0;
}

body.rg-doc ul {
  padding-left: 22px;
}

body.rg-doc a {
  color: #b79bff;
}

body.rg-doc a:hover {
  color: #fff;
}

body.rg-doc .rg-doc-updated {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9em;
}

body.rg-doc .rg-doc-nav {
  margin-top: 28px;
  text-align: center;
  font-size: 0.9em;
}

body.rg-doc .rg-doc-nav a {
  display: inline-block;
  margin: 0 8px;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
}

body.rg-doc .rg-doc-nav a:hover {
  color: #fff;
}

@media (max-width: 520px) {
  body.rg-doc h1 { font-size: 2em; }
  body.rg-doc .rg-doc-panel { padding: 8px 0 22px; }
}
