/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Unified blue palette based on #59b1e5 */
  --dark-blue: #59b1e5;        /* primary brand blue */
  --accent-blue: #2a86c5;      /* highlight/hover blue */
  --light-blue: #d7ecfb;       /* page background */
  --card-blue: #eaf5fd;        /* card chrome background */
  --border-color: #9ed3f2;     /* subtle borders derived from primary */

  --text-dark: #212121;
  --text-light: #757575;
  --white: #ffffff;
  --shadow: rgba(0, 0, 0, 0.1);
  --card-shadow: rgba(0, 0, 0, 0.15);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--light-blue);
  min-height: 100vh;
}

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

/* Header */
.site-header {
  background-color: var(--dark-blue);
  border-bottom: 3px solid var(--accent-blue);
  padding: 1.5rem 0;
  box-shadow: 0 2px 8px var(--shadow);
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.site-logo {
  height: 60px;
  width: auto;
  display: block;
}

.site-title {
  font-size: 2.5rem;
  margin-bottom: 0;
}

.site-title a {
  color: #000000;
  text-decoration: none;
  font-weight: 700;
}

.site-title a:hover {
  color: #000000;
}

.site-nav {
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
}

.site-nav a {
  color: var(--white);
  background-color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.site-nav a:hover,
.site-nav a.active {
  background-color: var(--dark-blue);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Main Content */
.site-content {
  padding: 3rem 0;
  min-height: calc(100vh - 200px);
}

.page-title {
  font-size: 2rem;
  color: var(--dark-blue);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

/* Story Grid */
.stories-grid,
.stories-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.story-card {
  background-color: var(--card-blue);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px var(--card-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(25, 118, 210, 0.1);
}

.story-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px var(--card-shadow);
}

.story-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--light-blue) 0%, var(--dark-blue) 100%);
  position: relative;
}

.story-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.1) 100%);
  pointer-events: none;
}

.story-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.story-card:hover .story-image img {
  transform: scale(1.08);
}

.story-content {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--white);
  justify-content: center;
}

.story-title {
  font-size: 1.35rem;
  margin-bottom: 0;
  line-height: 1.4;
  font-weight: 700;
}

.story-title a {
  color: var(--dark-blue);
  text-decoration: none;
  transition: color 0.3s ease;
}

.story-title a:hover {
  color: var(--accent-blue);
}

.story-meta {
  color: var(--text-light);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.story-source-name {
  display: block;
  margin-top: 0.5rem;
  color: var(--text-dark);
  font-size: 0.95rem;
}

.story-source-name strong {
  color: var(--dark-blue);
}

.story-source-name a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.3s ease;
}

.story-source-name a:hover {
  color: var(--dark-blue);
  text-decoration: underline;
}

.story-summary-section {
  background-color: var(--card-blue);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  border-left: 4px solid var(--accent-blue);
}

.story-summary-text {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-dark);
  margin: 0;
  font-style: italic;
}

.story-summary {
  color: var(--text-dark);
  margin-bottom: 1rem;
  flex: 1;
  line-height: 1.6;
  font-size: 0.95rem;
}

.read-more {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.read-more:hover {
  color: var(--dark-blue);
  gap: 0.5rem;
}

/* Full Story Page */
.story-full {
  background-color: var(--white);
  border-radius: 8px;
  padding: 3rem;
  box-shadow: 0 4px 6px var(--shadow);
  max-width: 900px;
  margin: 0 auto;
}

.story-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.story-full .story-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--dark-blue);
}

.story-full .story-meta {
  font-size: 1rem;
}

.story-featured-image {
  margin-bottom: 2rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow);
}

.story-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

.story-body {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.story-body p {
  margin-bottom: 1.5rem;
}

.story-body h2,
.story-body h3 {
  color: var(--dark-blue);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.story-body img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 1.5rem 0;
}

.story-source {
  background-color: var(--light-blue);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  border-left: 4px solid var(--accent-blue);
}

.source-link {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s ease;
}

.source-link:hover {
  color: var(--dark-blue);
}

.story-navigation {
  text-align: center;
}

/* Buttons */
.btn,
.btn-secondary {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn {
  background-color: var(--accent-blue);
  color: var(--white);
}

.btn:hover {
  background-color: var(--dark-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px var(--shadow);
}

.btn-secondary {
  background-color: var(--white);
  color: var(--accent-blue);
  border: 2px solid var(--accent-blue);
}

.btn-secondary:hover {
  background-color: var(--accent-blue);
  color: var(--white);
}

.more-stories-link {
  text-align: center;
  margin-top: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .stories-grid,
  .stories-list {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
  }

  .site-logo {
    height: 50px;
  }

  .site-title {
    font-size: 2rem;
  }

  .site-nav {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .story-full {
    padding: 2rem 1.5rem;
  }

  .story-full .story-title {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

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

  .site-logo {
    height: 40px;
  }

  .site-branding {
    gap: 0.5rem;
  }

  .site-title {
    font-size: 1.75rem;
  }

  .story-full {
    padding: 1.5rem 1rem;
  }
}
