/* ==========================================================================
   Manifesto for Generative AI in Higher Education — main page styles
   Extracted from index.html; theme colours and fonts come from base.css
   ========================================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: #2c2c2c;
  background-color: #f5f5f5;
}

/* Sticky header */
.sticky-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #1b4f5c 0%, #0f2f37 100%);
  color: white;
  padding: 12px 20px;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 999;
  font-size: 1.3em;
  font-weight: 600;
}

.sticky-header.active {
  display: block;
}

body.has-sticky-header {
  padding-top: 50px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
header {
  background: linear-gradient(135deg, #1b4f5c 0%, #0f2f37 100%);
  color: white;
  padding: 40px 20px 20px 20px;
  text-align: center;
  margin-bottom: 40px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
  font-size: 2.5em;
  margin-bottom: 8px;
  line-height: 1.2;
}

header .tagline {
  font-size: 1.2em;
  font-style: italic;
  opacity: 1;
  margin-bottom: 6px;
  margin-top: 6px;
}

header .authors {
  font-size: 0.95em;
  opacity: 1;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
  line-height: 1.3;
}

/* Controls */
.controls {
  display: flex;
  gap: 14px;
  margin-bottom: 40px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.search-box {
  flex: 1;
  min-width: 200px;
  max-width: 360px;
}

.search-box input {
  width: 100%;
  padding: 12px 16px;
  font-size: 1em;
  border: 2px solid #ddd;
  border-radius: 6px;
  transition: border-color 0.3s;
}

.search-box input:focus {
  outline: 2px solid #1b4f5c;
  outline-offset: 2px;
  border-color: #1b4f5c;
}

.filter-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 14px;
  border: 2px solid #ddd;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88em;
  transition: all 0.3s;
}

.filter-btn:hover {
  transform: translateY(-2px);
}

.explore-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 2px solid #1b4f5c;
  background-color: #1b4f5c;
  color: white;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.88em;
  text-decoration: none;
  transition: all 0.3s;
}

.explore-btn:hover {
  transform: translateY(-2px);
  background-color: #0f2f37;
  border-color: #0f2f37;
}

.filter-btn.all {
  border-color: #2c2c2c;
  color: #2c2c2c;
}

.filter-btn.theme1 {
  border-color: var(--theme-1);
  color: var(--theme-1);
}

.filter-btn.theme1.active {
  background-color: var(--theme-1);
  color: white;
}

.filter-btn.theme2 {
  border-color: var(--theme-2);
  color: var(--theme-2);
}

.filter-btn.theme2.active {
  background-color: var(--theme-2);
  color: white;
}

.filter-btn.theme3 {
  border-color: var(--theme-3);
  color: var(--theme-3);
}

.filter-btn.theme3.active {
  background-color: var(--theme-3);
  color: white;
}

.filter-btn.all.active {
  background-color: #2c2c2c;
  color: white;
}

/* Statements Grid */
.statements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.statement-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  border-left: 6px solid;
  opacity: 1;
  max-height: 500px;
  display: flex;
  flex-direction: column;
}

.statement-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.statement-card.hidden {
  display: none;
}

.statement-card.theme1 {
  border-left-color: var(--theme-1);
}

.statement-card.theme2 {
  border-left-color: var(--theme-2);
}

.statement-card.theme3 {
  border-left-color: var(--theme-3);
}

.statement-header {
  padding: 20px;
  color: white;
  font-weight: 600;
  font-size: 0.9em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.statement-card.theme1 .statement-header {
  background-color: var(--theme-1);
}

.statement-card.theme2 .statement-header {
  background-color: var(--theme-2);
}

.statement-card.theme3 .statement-header {
  background-color: var(--theme-3);
}

.statement-number {
  font-size: 1.1em;
  font-weight: bold;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.statement-card.theme1 .statement-number {
  background-color: var(--theme-1-light);
}

.statement-card.theme2 .statement-number {
  background-color: var(--theme-2-light);
}

.statement-card.theme3 .statement-number {
  background-color: var(--theme-3-light);
}

.modal-statement-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-right: 10px;
  flex-shrink: 0;
}

.statement-theme {
  font-size: 0.85em;
  opacity: 0.9;
}

.statement-body {
  padding: 24px;
  flex-grow: 1;
}

.statement-text {
  font-size: 1.1em;
  line-height: 1.6;
  color: #2c2c2c;
  font-weight: 400;
}

.statement-footer {
  padding: 16px 24px;
  background-color: #f9f9f9;
  border-top: 1px solid #eee;
  font-size: 0.85em;
  color: #595959;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9em;
  font-weight: 600;
  transition: all 0.3s;
  padding: 10px 16px;
  border-radius: 4px;
  color: white;
}

.statement-card.theme1 .copy-btn {
  background-color: var(--theme-1);
}

.statement-card.theme1 .copy-btn:hover {
  background-color: #003d82;
}

.statement-card.theme2 .copy-btn {
  background-color: var(--theme-2);
}

.statement-card.theme2 .copy-btn:hover {
  background-color: #d64a2f;
}

.statement-card.theme3 .copy-btn {
  background-color: var(--theme-3);
}

.statement-card.theme3 .copy-btn:hover {
  background-color: #005955;
}

.statement-icon {
  font-size: 1.3em;
  margin-right: 8px;
}

.statement-card.theme1 .statement-icon {
  color: var(--theme-1);
}

.statement-card.theme2 .statement-icon {
  color: var(--theme-2);
}

.statement-card.theme3 .statement-icon {
  color: var(--theme-3);
}

/* Theme Sections */
.theme-section {
  margin-bottom: 60px;
}

.theme-title {
  font-size: 2em;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 3px solid;
  display: flex;
  align-items: center;
  gap: 15px;
}

.theme-title.theme1 {
  color: var(--theme-1);
  border-bottom-color: var(--theme-1);
}

.theme-title.theme2 {
  color: var(--theme-2);
  border-bottom-color: var(--theme-2);
}

.theme-title.theme3 {
  color: var(--theme-3);
  border-bottom-color: var(--theme-3);
}

.theme-icon {
  font-size: 1.5em;
}

.theme-subtitle {
  font-size: 1.1em;
  color: #595959;
  font-style: italic;
  margin-top: 8px;
}

/* Results info */
.results-info {
  text-align: center;
  margin-bottom: 20px;
  color: #595959;
  font-size: 0.95em;
}

/* Footer */
footer {
  background-color: #2c2c2c;
  color: white;
  text-align: center;
  padding: 30px 20px;
  margin-top: 60px;
  border-radius: 8px;
}

footer p {
  margin: 0;
  padding: 4px 0;
}

footer a {
  color: #e85d5d;
  text-decoration: none;
}

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

/* Modal for full statement */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s;
}

.modal.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 40px;
  max-width: 600px;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  animation: slideIn 0.3s;
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-close {
  float: right;
  font-size: 2em;
  font-weight: bold;
  color: #595959;
  cursor: pointer;
  transition: color 0.3s;
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
}

.modal-close:hover {
  color: #2c2c2c;
}

.modal-close:focus {
  outline: 2px solid #1b4f5c;
  outline-offset: 2px;
}

.modal-header {
  margin-top: 20px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #eee;
}

.modal-statement {
  font-size: 1.3em;
  line-height: 1.6;
  color: #2c2c2c;
}

.modal-footer {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 2px solid #eee;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.copy-btn-modal {
  background-color: var(--theme-1);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95em;
  font-weight: 600;
  transition: all 0.3s;
}

.copy-btn-modal:hover {
  background-color: #003d82;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.copy-btn-modal:active {
  transform: translateY(0);
}

.explore-btn-modal {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  border-radius: 6px;
  color: white;
  text-decoration: none;
  font-size: 1em;
  font-weight: 600;
  transition: opacity 0.2s;
  margin-right: 10px;
}

.explore-btn-modal:hover {
  opacity: 0.85;
}

/* Responsive */
@media (max-width: 768px) {
  header h1 {
    font-size: 1.8em;
  }

  .sticky-header {
    font-size: 1.1em;
    padding: 10px 15px;
  }

  .controls {
    flex-direction: column;
  }

  .search-box {
    max-width: 100%;
  }

  .filter-buttons {
    justify-content: center;
  }

  .statements-grid {
    grid-template-columns: 1fr;
  }

  .theme-title {
    font-size: 1.5em;
  }

  .modal-content {
    margin: 20% auto;
    padding: 30px 20px;
    max-width: 90%;
  }
}

/* Animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.statement-card {
  animation: slideUp 0.5s ease forwards;
}

.statement-card.hidden {
  animation: none;
}

/* No results */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: #888;
}

.no-results p {
  font-size: 1.1em;
  margin-bottom: 20px;
}

.highlight {
  background-color: #fffacd;
  padding: 2px 4px;
  border-radius: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Typographic identity (shared with the statement detail pages) --- */
header h1,
.sticky-header,
.theme-title,
.statement-text,
.modal-statement {
  font-family: var(--font-display);
}
header h1 { font-weight: 600; }
.theme-title { font-weight: 600; }
.statement-text { font-weight: 500; }
.modal-statement { font-weight: 550; }
