/* ==========================================================================
   School of Archaeology — Research Catalog
   University of Oxford
   Stylesheet for internal research portal
   ========================================================================== */

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding: 0;
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
}

/* Header */
.site-header {
  background-color: #002147;
  color: #fff;
  padding: 20px 30px;
  border-bottom: 3px solid #1a3a5c;
}

.site-header .institution {
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin: 0 0 2px 0;
  font-weight: normal;
  color: #c8d8e8;
}

.site-header .department {
  font-size: 1.3rem;
  margin: 0;
  font-weight: normal;
  letter-spacing: 0.3px;
}

/* Navigation breadcrumb */
.breadcrumb {
  background-color: #f5f5f5;
  border-bottom: 1px solid #ddd;
  padding: 8px 30px;
  font-size: 0.8rem;
  color: #666;
}

.breadcrumb a {
  color: #002147;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* Main content */
.content {
  max-width: 900px;
  margin: 0 auto;
  padding: 30px;
}

/* Page titles */
h1.page-title {
  font-size: 1.5rem;
  font-weight: normal;
  color: #002147;
  margin: 0 0 5px 0;
  line-height: 1.3;
}

h2 {
  font-size: 1.2rem;
  font-weight: normal;
  color: #002147;
  margin: 30px 0 15px 0;
  border-bottom: 1px solid #ddd;
  padding-bottom: 5px;
}

h3 {
  font-size: 1rem;
  font-weight: bold;
  color: #333;
  margin: 20px 0 10px 0;
}

.subtitle {
  font-size: 0.95rem;
  color: #555;
  margin: 0 0 5px 0;
  font-style: italic;
}

.meta-line {
  font-size: 0.8rem;
  color: #777;
  margin: 0 0 25px 0;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.9rem;
}

thead th {
  background-color: #002147;
  color: #fff;
  padding: 10px 12px;
  text-align: left;
  font-weight: normal;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #e0e0e0;
  vertical-align: top;
}

tbody tr:hover {
  background-color: #f8f8f8;
}

tbody td a {
  color: #002147;
  text-decoration: none;
}

tbody td a:hover {
  text-decoration: underline;
}

/* Status indicators */
.status-active {
  color: #2e7d32;
  font-size: 0.8rem;
}

.status-pending {
  color: #e65100;
  font-size: 0.8rem;
}

.status-review {
  color: #1565c0;
  font-size: 0.8rem;
}

/* Artifact detail pages */
.artifact-meta {
  margin: 20px 0;
}

.artifact-meta dl {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 6px 15px;
  margin: 0;
  font-size: 0.9rem;
}

.artifact-meta dt {
  font-weight: bold;
  color: #555;
}

.artifact-meta dd {
  margin: 0;
  color: #333;
}

/* Text blocks (inscriptions, translations) */
.inscription-block {
  background-color: #fafafa;
  border: 1px solid #e0e0e0;
  border-left: 3px solid #002147;
  padding: 15px 20px;
  margin: 15px 0;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-x: auto;
}

.translation-block {
  background-color: #fefef8;
  border: 1px solid #e8e4d8;
  padding: 15px 20px;
  margin: 15px 0;
  font-style: italic;
  line-height: 1.7;
}

.translation-block p {
  margin: 0 0 10px 0;
}

.translation-block p:last-child {
  margin-bottom: 0;
}

/* Greek text block */
.greek-block {
  background-color: #fafafa;
  border: 1px solid #e0e0e0;
  border-left: 3px solid #002147;
  padding: 15px 20px;
  margin: 15px 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1rem;
  line-height: 2;
  white-space: pre-wrap;
}

/* Latin text block */
.latin-block {
  background-color: #fafafa;
  border: 1px solid #e0e0e0;
  border-left: 3px solid #002147;
  padding: 15px 20px;
  margin: 15px 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.9rem;
  line-height: 1.8;
  white-space: pre-wrap;
}

/* Ottoman/RTL text block */
.ottoman-block {
  background-color: #fafafa;
  border: 1px solid #e0e0e0;
  border-right: 3px solid #002147;
  border-left: none;
  padding: 15px 20px;
  margin: 15px 0;
  font-size: 1.1rem;
  line-height: 2.2;
  direction: rtl;
  text-align: right;
}

/* Analytical notes */
.analytical-note {
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 15px 0;
  color: #444;
}

/* Supervisor note / internal comment box */
.supervisor-note {
  background-color: #fff9e6;
  border: 1px solid #e6d9a0;
  padding: 12px 15px;
  margin: 20px 0;
  font-size: 0.85rem;
  color: #555;
}

.supervisor-note::before {
  content: "Note from supervisor:";
  display: block;
  font-weight: bold;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
  margin-bottom: 6px;
}

/* Cross-reference footnote */
.cross-ref {
  font-size: 0.8rem;
  color: #666;
  border-top: 1px solid #ddd;
  margin-top: 25px;
  padding-top: 10px;
  font-style: italic;
}

/* Figure/image placeholder */
.figure-box {
  border: 1px solid #ccc;
  background-color: #f9f9f9;
  padding: 20px;
  margin: 20px 0;
  text-align: center;
}

.figure-box .placeholder {
  background-color: #e8e8e8;
  border: 1px dashed #aaa;
  padding: 40px 20px;
  color: #777;
  font-size: 0.85rem;
  font-style: italic;
}

.figure-box .caption {
  font-size: 0.8rem;
  color: #555;
  margin-top: 10px;
  text-align: left;
}

/* Footer disclaimer */
.page-footer {
  margin-top: 40px;
  padding-top: 15px;
  border-top: 1px solid #ddd;
  font-size: 0.75rem;
  color: #999;
  text-align: center;
}

/* Return link */
.return-link {
  display: inline-block;
  margin-top: 30px;
  font-size: 0.85rem;
  color: #002147;
  text-decoration: none;
  border-bottom: 1px solid #002147;
}

.return-link:hover {
  color: #1a3a5c;
  border-color: #1a3a5c;
}

/* Notes page */
.observations-list {
  list-style: none;
  padding: 0;
  margin: 15px 0;
}

.observations-list li {
  padding: 8px 0 8px 20px;
  border-left: 2px solid #ddd;
  margin-bottom: 10px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.personal-note {
  font-size: 0.8rem;
  color: #666;
  margin-top: 30px;
  padding: 12px 15px;
  background-color: #fafafa;
  border: 1px solid #eee;
}

.personal-note::before {
  content: "Personal note (not for inclusion in final submission):";
  display: block;
  font-weight: bold;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #aaa;
  margin-bottom: 6px;
}

.draft-warning {
  font-size: 0.75rem;
  color: #999;
  margin-top: 30px;
  text-align: center;
  font-style: italic;
}

/* Epigraphic note styling */
.epi-note {
  background-color: #f5f5f5;
  border: 1px solid #e0e0e0;
  padding: 12px 15px;
  margin: 15px 0;
  font-size: 0.85rem;
  color: #444;
}

/* Print styles */
@media print {
  .site-header {
    background-color: #fff;
    color: #000;
    border-bottom: 2px solid #000;
  }

  .site-header .institution {
    color: #333;
  }

  .breadcrumb {
    display: none;
  }

  body {
    font-size: 11pt;
  }

  .content {
    max-width: 100%;
    padding: 0;
  }

  a {
    color: #000;
    text-decoration: none;
  }

  .return-link {
    display: none;
  }
}

/* Responsive */
@media screen and (max-width: 768px) {
  .site-header {
    padding: 15px 20px;
  }

  .site-header .department {
    font-size: 1.1rem;
  }

  .breadcrumb {
    padding: 8px 20px;
  }

  .content {
    padding: 20px;
  }

  h1.page-title {
    font-size: 1.2rem;
  }

  table {
    font-size: 0.8rem;
  }

  thead th, tbody td {
    padding: 8px;
  }

  .artifact-meta dl {
    grid-template-columns: 1fr;
    gap: 2px 0;
  }

  .artifact-meta dt {
    margin-top: 8px;
  }

  .inscription-block,
  .greek-block,
  .latin-block {
    font-size: 0.8rem;
    padding: 12px 15px;
  }

  /* Make table scrollable on mobile */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media screen and (max-width: 480px) {
  .site-header .department {
    font-size: 1rem;
  }

  h1.page-title {
    font-size: 1.1rem;
  }

  .content {
    padding: 15px;
  }
}
