/* styles.css - centralized styles for the Fedora Linux Lab site */

@page { size: 8.5in 11in; margin-left: 0.79in; margin-right: 0.39in; margin-top: 0.39in; margin-bottom: 0.39in }

/* Use a wide, modern system font stack and slightly larger base size */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #06283D;
  background-color: #eceff1;
  margin: 0 auto;
  max-width: 1080px;
  padding: 1rem;
  padding-bottom: 4.5rem;
  overflow-wrap: anywhere;
}

/* Reusable constrained reading width for dense pages */
.readable-flow {
  max-width: 76ch;
}

html {
  -webkit-text-size-adjust: 100%;
}

/* paragraphs: increase line-height for readability */
p { background: transparent; margin-bottom: 0.85em; line-height: 1.6; }

/* Links: darker and bold for better contrast against the light blue */
a:link { color: #002E5D; text-decoration: underline; font-weight: 700 }
a:visited { color: #003f6b; text-decoration: underline; font-weight: 700 }
a:hover, a:focus { text-decoration: none; opacity: 0.95 }

/* Layout classes replacing legacy <font> tags */
.title { font-size: 24pt; text-align: center; margin: 0.5em 0; }
.subtitle { font-size: 20pt; text-align: center; margin: 0.3em 0; }
.lead { font-size: 16pt; text-align: center; margin-bottom: 0.8em; }
.body-text { font-size: 14pt; text-align: left; margin-bottom: 0.6em; }
.section-title { font-size: 14pt; font-weight: bold; margin-top: 0.6em; margin-bottom: 0.3em; text-align:left; }
.small-right-mail { text-align: right; font-size: 12px; margin: 0.8em 6px 0 0; }

/* Fixed corner links requested for all pages */
.fixed-home-link,
.fixed-mail-link {
  position: fixed;
  bottom: 10px;
  z-index: 999;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #c3d3dd;
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  box-shadow: 0 1px 4px rgba(6, 40, 61, 0.12);
  font-size: 12px;
}

.fixed-home-link { left: 10px; }
.fixed-mail-link { right: 10px; }

/* Boxed main navigation links on the homepage */
.links-box-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0.5rem 0 1rem 0;
  justify-items: center;
}

.links-box {
  display: block;
  width: 100%;
  max-width: 290px;
  min-height: 180px;
  padding: 1.35rem 1rem;
  border: 2px solid #0b5d8a;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fcff 0%, #e6f3fa 100%);
  box-shadow: 0 4px 12px rgba(6, 40, 61, 0.12);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  text-align: center;
  line-height: 1.45;
}

.links-box-featured {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}

.links-box-icon {
  width: 52px;
  height: 52px;
  object-fit: contain;
  margin-bottom: 0.75rem;
}

.links-box-icon-fedora {
  width: 62px;
  height: 62px;
}

.links-box-copy {
  display: block;
  text-align: left;
}

.links-box-list {
  display: block;
}

.links-box-copy strong {
  display: block;
  margin-top: 0.85rem;
}

.links-box:link,
.links-box:visited {
  color: #08324b;
  text-decoration: none;
}

.links-box:hover,
.links-box:focus {
  transform: translateY(-2px);
  border-color: #0077b6;
  box-shadow: 0 8px 20px rgba(6, 40, 61, 0.18);
  opacity: 1;
}

@media (max-width: 980px) {
  .links-box-grid { grid-template-columns: 1fr; }
  .links-box {
    max-width: 420px;
    min-height: 150px;
  }
}

/* Images */
img { max-width: 100%; height: auto; }

/* Prevent horizontal scrolling on mobile from wide content */
table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

pre,
code {
  white-space: pre-wrap;
  word-break: break-word;
}

iframe,
video {
  max-width: 100%;
  height: auto;
}

/* Small responsive tweak */
@media (max-width: 480px) {
  body { padding: 0.75rem; padding-bottom: 4.75rem; }
  .title { font-size: 18pt; }
  .subtitle { font-size: 16pt; }
  .lead { font-size: 14pt; }
  .body-text { font-size: 12pt; }
  .links-box {
    max-width: 100%;
    min-height: 140px;
    padding: 1rem 0.9rem;
  }
  .links-box-icon {
    width: 44px;
    height: 44px;
  }
  .links-box-icon-fedora {
    width: 52px;
    height: 52px;
  }
  .fixed-home-link,
  .fixed-mail-link {
    bottom: 8px;
    font-size: 11px;
    padding: 0.2rem 0.4rem;
  }
  .fixed-home-link { left: 8px; }
  .fixed-mail-link { right: 8px; }
}
