/* The Crimson Don - Authoritative IU Athletics Intelligence */
:root {
  --color-crimson: #990000; /* Deep IU Crimson */
  --color-crimson-dark: #660000; /* Darker accent */
  --color-background-dark: #0a0a0a; /* Near-black background */
  --color-surface: #1a1a1a; /* Slightly lighter panels */
  --color-surface-elevated: #2a2a2a; /* Even lighter for nested content */
  --color-text-light: #e8e8e8; /* Off-white for readability */
  --color-text-muted: #999999; /* Grey for metadata */
  --color-accent: var(--color-crimson);
  --color-border: #333333;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Georgia', serif;
  background-color: var(--color-background-dark);
  color: var(--color-text-light);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

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

/* Header - Compact Horizontal Layout */
header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}

.don-portrait {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid var(--color-crimson);
  box-shadow: 0 2px 10px rgba(153, 0, 0, 0.4);
  flex-shrink: 0;
  object-fit: cover;
}

.header-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

h1 {
  font-size: 1.8em;
  color: var(--color-accent);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: 700;
  line-height: 1;
}

.subtitle {
  color: var(--color-text-muted);
  font-style: italic;
  font-size: 0.9em;
  margin: 0;
  line-height: 1.2;
}

/* Summary Section - The Don's Word */
#summary {
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-surface-elevated) 100%);
  border: 2px solid var(--color-crimson);
}

/* Crimson Don Videos Section - Special Highlight */
#crimson-don-videos {
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-surface-elevated) 100%);
  border: 2px solid var(--color-crimson);
  box-shadow: 0 4px 20px rgba(153, 0, 0, 0.4);
}

/* Collapsible Lists */
.collapsible-list {
  transition: max-height 0.3s ease;
  overflow: hidden;
  display: grid;
  gap: 15px;
}

.articles-list.collapsible-list {
  gap: 20px;
}

/* When collapsed, hide all children except the first */
.videos-list.collapsible-list.collapsed .video:not(:first-child),
.articles-list.collapsible-list.collapsed .article:not(:first-child) {
  display: none !important;
}

.expand-toggle {
  margin-top: 12px;
  padding: 8px 20px;
  background-color: var(--color-crimson);
  color: var(--color-text-light);
  border: none;
  border-radius: 4px;
  font-size: 0.9em;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  font-family: 'Georgia', serif;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.expand-toggle:hover {
  background-color: var(--color-crimson-dark);
  transform: translateY(-2px);
}

.expand-toggle:active {
  transform: translateY(0);
}

.summary-content {
  font-size: 1.1em;
  line-height: 1.8;
  color: var(--color-text-light);
  padding: 20px;
  background-color: var(--color-background-dark);
  border-radius: 4px;
  border-left: 4px solid var(--color-accent);
  font-style: italic;
  transition: max-height 0.3s ease;
  overflow: hidden;
  word-wrap: break-word;
  white-space: normal;
}

.summary-content.collapsed {
  max-height: 5.4em; /* Approximately 3 lines at 1.8 line-height */
  position: relative;
}

.summary-content.collapsed::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2em;
  background: linear-gradient(to bottom, transparent, var(--color-background-dark));
  pointer-events: none;
}

.summary-content p {
  margin: 0 0 1em 0;
}

.summary-content p:last-child {
  margin-bottom: 0;
}

.summary-toggle {
  margin-top: 12px;
  padding: 8px 20px;
  background-color: var(--color-crimson);
  color: var(--color-text-light);
  border: none;
  border-radius: 4px;
  font-size: 0.9em;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  font-family: 'Georgia', serif;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.summary-toggle:hover {
  background-color: var(--color-crimson-dark);
  transform: translateY(-2px);
}

.summary-toggle:active {
  transform: translateY(0);
}

/* Section Headers - Authority and Organization */
h2 {
  font-size: 2em;
  color: var(--color-text-light);
  margin: 0 0 20px 0;
  padding-left: 15px;
  border-left: 6px solid var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 1px;
}

h3 {
  font-size: 1.5em;
  color: var(--color-accent);
  margin: 0 0 15px 0;
  font-weight: 600;
}

section {
  background-color: var(--color-surface);
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 40px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  border: 1px solid var(--color-border);
}

.meta-info {
  color: var(--color-accent);
  font-weight: bold;
  font-size: 0.95em;
  margin: 0 0 20px 0;
  padding: 8px 12px;
  background-color: var(--color-background-dark);
  border-radius: 4px;
  display: inline-block;
}

/* Channels Section - Trusted Sources */
#channels {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.channel-group {
  background-color: var(--color-surface-elevated);
  padding: 20px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
}

.channel-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

.channel {
  display: flex;
  align-items: center;
  background-color: var(--color-background-dark);
  padding: 15px;
  border-left: 4px solid var(--color-accent);
  border-radius: 4px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.channel:hover {
  transform: translateX(5px);
  box-shadow: 0 2px 8px rgba(153, 0, 0, 0.3);
}

.channel img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin-right: 15px;
  border: 3px solid var(--color-accent);
  object-fit: cover;
  flex-shrink: 0;
}

.channel a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.channel a:hover strong {
  color: var(--color-accent);
  text-decoration: underline;
}

.channel strong {
  color: var(--color-text-light);
  display: block;
  margin-bottom: 3px;
  font-size: 1.05em;
  transition: color 0.2s;
}

.channel small {
  color: var(--color-text-muted);
  display: block;
  line-height: 1.4;
}

/* Articles - The Dossier */
.article {
  background-color: var(--color-background-dark);
  padding: 20px;
  border-radius: 4px;
  border-left: 5px solid var(--color-accent);
  transition: border-left-width 0.2s, padding-left 0.2s;
}

.article:hover {
  border-left-width: 8px;
  padding-left: 23px;
}

.article a {
  color: var(--color-text-light);
  text-decoration: none;
  font-weight: bold;
  font-size: 1.15em;
  transition: color 0.2s;
  display: inline-block;
  margin-bottom: 8px;
}

.article a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.article small {
  display: block;
  color: var(--color-text-muted);
  margin-bottom: 10px;
  font-size: 0.85em;
}

.article p {
  margin: 10px 0 0 0;
  color: var(--color-text-light);
  font-size: 0.95em;
  line-height: 1.6;
}

/* Videos - Visual Evidence (List Format) */
.video {
  background-color: var(--color-background-dark);
  border-radius: 4px;
  border-left: 4px solid var(--color-accent);
  transition: border-left-width 0.2s, padding-left 0.2s;
  overflow: hidden;
}

.video:hover {
  border-left-width: 8px;
}

.video-link {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 15px;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.2s;
}

.video-link:hover {
  background-color: rgba(153, 0, 0, 0.1);
}

.video-thumbnail {
  width: 120px;
  height: 68px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  border: 2px solid var(--color-accent);
}

.video-content {
  flex: 1;
  min-width: 0;
}

.video-content strong {
  display: block;
  color: var(--color-text-light);
  font-size: 1.05em;
  line-height: 1.3;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-content strong:hover {
  color: var(--color-accent);
}

.video-content small {
  color: var(--color-text-muted);
  font-size: 0.85em;
}

/* Responsive Design */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    text-align: center;
  }

  .don-portrait {
    width: 80px;
    height: 80px;
  }

  .header-text {
    align-items: center;
  }

  h1 {
    font-size: 1.5em;
    letter-spacing: 2px;
  }

  h2 {
    font-size: 1.5em;
  }

  section {
    padding: 20px;
  }

  .channel-list {
    grid-template-columns: 1fr;
  }

  .video-link {
    flex-direction: column;
    align-items: flex-start;
  }

  .video-thumbnail {
    width: 100%;
    height: auto;
  }
}

/* Loading and Error States */
.articles-list:empty::before,
.videos-list:empty::before,
.channel-list:empty::before {
  content: attr(data-loading);
  color: var(--color-text-muted);
  font-style: italic;
}
