/* mnav.html page - matches mnav-frontend, no auth buttons */
:root,
body.theme-light {
  --primary: #00703c;
  --paper: #ffffff;
  --text-primary: rgba(0, 0, 0, 0.87);
  --text-secondary: rgba(0, 0, 0, 0.6);
  --frame-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  --frame-border: linear-gradient(45deg, rgb(0, 7, 105) 30%, #ff8e53 90%);
  --body-bg: #e8e8e8;
  --body-bg-overlay: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.9),
    rgba(255, 255, 255, 0.5)
  );
}

body.theme-dark {
  --paper: #1d1d1d;
  --text-primary: rgba(255, 255, 255, 0.87);
  --text-secondary: rgba(255, 255, 255, 0.6);
  --frame-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --body-bg: #121212;
  --body-bg-overlay: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.9),
    rgba(0, 0, 0, 0.5)
  );
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Roboto", "Helvetica", "Arial", sans-serif;
  min-height: 100vh;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: 24px;
  display: flex;
  flex-direction: column;
  background-color: var(--body-bg);
}

body.has-bg {
  background-image: var(--body-bg-overlay), url("Images/way-background.avif");
}

.home-inner {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.decommission-banner {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  padding: 14px 20px;
  margin-bottom: 24px;
  background-color: #b71c1c;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.decommission-banner-text {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.decommission-banner-text a {
  color: #ffcdd2;
  text-decoration: underline;
}

.decommission-banner-text a:hover {
  color: #fff;
}

.home-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 32px;
}

.home-title {
  font-size: 2rem;
  font-weight: 500;
  text-align: center;
  color: var(--text-primary);
  margin: 0 0 24px 0;
}

.frames-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  justify-content: center;
  align-items: start;
  flex: 1;
}

@media (min-width: 600px) {
  .frames-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .frames-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.frame-card {
  position: relative;
  width: 100%;
  max-width: 250px;
  margin: 2rem auto;
  padding: 16px;
  background-color: var(--paper);
  border-radius: 12px;
  box-shadow: var(--frame-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: var(--frame-shadow);
}

.frame-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  padding: 2px;
  background: linear-gradient(45deg, rgb(0, 7, 105) 30%, #ff8e53 90%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.frame-img-wrap {
  width: 100%;
  max-height: 250px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  border-radius: 8px;
  margin-bottom: 12px;
}

.frame-img-wrap img {
  width: 100%;
  height: auto;
  object-fit: contain;
  max-height: 250px;
}

.frame-text {
  position: absolute;
  bottom: -24px;
  left: 20px;
  right: 20px;
  margin: 0 auto;
  padding: 8px 12px;
  background: var(--paper);
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  font-weight: bold;
  color: var(--text-primary);
  transform: rotate(3deg);
  font-size: 0.8rem;
  max-width: 80%;
  line-height: 1.4;
  text-align: center;
  word-break: break-word;
  white-space: pre-line;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  pointer-events: auto;
}

.frame-text:hover {
  -webkit-line-clamp: unset;
  overflow: visible;
  z-index: 1;
}

.home-footer {
  max-width: 1400px;
  margin: 24px auto 0;
  width: 100%;
  padding-bottom: 24px;
}

.footer-settings {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  padding: 20px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 24px;
  color: var(--text-primary);
}

.footer-setting-label {
  font-size: 0.875rem;
  margin-right: 8px;
  font-weight: 500;
}

.footer-theme {
  display: flex;
  align-items: center;
}

.theme-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
}

.theme-icon-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

body.theme-dark .theme-icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.theme-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-icon-hidden {
  display: none;
}

.footer-lang {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.footer-lang-select {
  min-width: 140px;
  padding: 6px 28px 6px 10px;
  font-family: inherit;
  font-size: 0.875rem;
  border: 1px solid var(--text-secondary);
  border-radius: 8px;
  background: var(--paper);
  color: var(--text-primary);
  cursor: pointer;
  appearance: auto;
}

.footer-lang-select:hover,
.footer-lang-select:focus {
  outline: none;
  border-color: var(--primary);
}

.home-bottom {
  padding-top: 8px;
  padding-bottom: 24px;
}

.footer-links {
  text-align: center;
  margin: 0 0 8px 0;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.footer-links a {
  color: var(--primary);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-copyright {
  text-align: center;
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.mob-apps-title {
  text-align: center;
  padding-top: 16px;
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--text-primary);
}

.mob-apps-links {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  width: 100%;
}

.mob-apps-links a {
  display: block;
}

.mob-apps-links img {
  width: 170px;
  height: auto;
  max-width: 100%;
}

.mob-apps-links img.amazon {
  width: 150px;
}

@media (max-width: 600px) {
  .mob-apps-links {
    flex-direction: column;
  }
  .mob-apps-links img {
    width: 100%;
    max-width: 170px;
  }
  .mob-apps-links img.amazon {
    max-width: 150px;
  }
}
