/* ImagicX: oeffentliche Seiten (Startseite mit Upload, Login, Bildseite) */

/* Kopfbereich der Startseite */
header.bg-dark { background-color: transparent !important; }

header.bg-dark.py-5 {
  position: relative;
  padding-top: 3.5rem !important;
  padding-bottom: 0 !important;
}

header .my-5 { margin-top: 1rem !important; margin-bottom: 2rem !important; }
header .row.align-items-center { align-items: start !important; }
header .lead { margin-top: 1.1rem; font-size: 1.15rem; }
header .d-grid { margin-top: 2rem; }

@keyframes ix-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

header .col-lg-8 > div > * {
  animation: ix-rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}

header .col-lg-8 > div > h1 { animation-delay: 0.05s; }
header .col-lg-8 > div > p { animation-delay: 0.16s; }
header .col-lg-8 > div > div { animation-delay: 0.27s; }

@media (max-width: 767.98px) {
  header.bg-dark.py-5 { padding-top: 2rem !important; }
  header .lead { font-size: 1.05rem; }
  header .d-grid { margin-top: 1.5rem; }
}

@media (max-width: 575.98px) {
  /* Knoepfe nebeneinander, damit das Upload-Formular frueher sichtbar ist */
  header .d-grid.d-sm-flex { display: flex !important; gap: 0.6rem !important; }
  header .d-grid.d-sm-flex > .btn {
    flex: 1 1 auto;
    margin: 0 !important;
    padding-inline: 0.9rem;
    font-size: 0.88rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
  }
}

/* Abschnitte */
section.py-5:not(:first-of-type) { border-top: 1px solid var(--ix-line-soft); }

main > section.py-5 { padding-top: 0 !important; padding-bottom: 4rem !important; }
main > section.py-5 > .container.my-5 { margin-top: 0 !important; margin-bottom: 0 !important; padding-top: 5.5rem; }

main section p.text-white { color: var(--ix-muted) !important; font-size: 0.99rem; }

@media (max-width: 767.98px) {
  main > section.py-5 > .container.my-5 { padding-top: 3.5rem; }
  main > section.py-5 { padding-bottom: 2.5rem !important; }
}

@media (max-width: 575.98px) {
  /* Gleiche Innenabstaende wie der Container, sonst ragen Zeilen seitlich heraus */
  .row.gx-5 { --bs-gutter-x: 1.5rem; }

  /* Schmalerer Seitenrand, mehr Platz fuer Inhalt */
  header .container.px-5,
  main .container.px-5,
  footer .container.px-5 { padding-inline: 1.25rem !important; }
}

/* Upload-Formular */
.upload_form {
  position: relative;
  display: block;
  overflow: hidden;
  text-align: center;
  background-color: var(--ix-raised);
  border-color: var(--ix-line);
  box-shadow: 0 30px 80px -40px rgba(53, 200, 240, 0.4), 0 0 0 1px rgba(53, 200, 240, 0.07);
  margin-bottom: -3.5rem;
  z-index: 2;
}

.upload_form::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--ix-prism);
  opacity: 0.75;
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.upload_form:hover::before, .upload_form:focus-within::before { opacity: 1; filter: saturate(1.3); }

.upload_form .card-header {
  background-color: transparent;
  border-bottom: 1px solid var(--ix-line-soft);
  font-family: Chivo, sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--ix-muted);
}

.upload-area-inner {
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.35);
  border: 1px dashed var(--ix-line) !important;
  border-radius: var(--ix-radius);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.upload-area-inner:hover, .upload-area-inner.border-primary {
  border-color: var(--ix-safelight) !important;
  background-color: var(--ix-safelight-soft);
}

.upload-icon { transition: transform 0.2s ease; }
.upload-icon i { color: var(--ix-safelight) !important; }
.upload-area-inner:hover .upload-icon { transform: translateY(-5px); }

.retention-settings {
  background-color: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid var(--ix-line-soft);
  border-radius: var(--ix-radius);
  color: var(--ix-paper);
  font-size: 0.9rem;
}

@media (max-width: 767.98px) {
  .upload_form { margin-bottom: -2rem; }
  .retention-settings .form-control { max-width: 5.5rem; }
}

/* Funktionen unter dem Upload */
.feature {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3rem;
  width: 3rem;
  font-size: 1.5rem;
}

.feature.bg-primary {
  background-color: transparent !important;
  background-image: none !important;
  border: 1px solid var(--ix-line);
  color: var(--ix-safelight) !important;
  border-radius: var(--ix-radius);
}

.feature.bg-primary i { color: var(--ix-safelight) !important; }

main .feature.bg-primary {
  width: 2.6rem;
  height: 2.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent !important;
  font-size: 1.35rem;
  margin-bottom: 0.9rem !important;
}

main h2.h4 {
  font-family: Chivo, sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

main .row.gx-5 > [class*="col-lg-4"] { position: relative; }

@media (min-width: 992px) {
  main .row.gx-5 > [class*="col-lg-4"] + [class*="col-lg-4"]::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.35rem;
    bottom: 0.35rem;
    width: 1px;
    background: var(--ix-line-soft);
  }
  main .row.gx-5 > [class*="col-lg-4"] + [class*="col-lg-4"] { padding-left: 2.75rem; }
}

@media (max-width: 991.98px) {
  /* Als Liste mit Icon neben dem Text */
  #features .row > [class*="col-lg-4"] {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 1rem;
    align-items: start;
    margin-bottom: 1.75rem !important;
  }
  #features .row > [class*="col-lg-4"]:last-child { margin-bottom: 0 !important; }
  #features .feature { grid-row: span 2; margin-bottom: 0 !important; }
  #features h2 { margin-bottom: 0.35rem; }
  #features p { margin-bottom: 0; }
}

/* Login, Registrierung, Passwort */
.login h3.text-primary, .login h5.text-primary { color: var(--ix-paper) !important; }

@media (max-width: 575.98px) {
  .login { padding: 1.25rem !important; }
}

/* Bildseite */
.info-panel {
  margin-top: 5%;
  margin-bottom: 10px;
  padding: 10px 0;
  position: relative;
}

form.img-share input[type="text"] {
  max-width: 80%;
}

#protected-image-container {
  position: relative;
  max-width: 100%;
  overflow: hidden;
  background-color: #222;
  border: 1px solid #333;
  border-radius: 4px;
  margin-bottom: 20px;
}

#protected-image-container .protected-image {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
  user-select: none;
}

#protected-image-container .image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 10;
  cursor: default;
}

#protected-image-container .copy-protection {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.01);
  z-index: 20;
  pointer-events: auto;
}
