/* Modern Newspaper Design for Oulla.cy */

/* Import Google Fonts for newspaper-style typography */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,500;1,600;1,700;1,800;1,900&family=Crimson+Text:ital,wght@0,400;0,600;1,400;1,600&family=Source+Sans+Pro:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400;1,600;1,700&display=swap');

/* CSS Custom Properties for consistent theming */
:root {
  --newspaper-primary: #1a1a1a;
  --newspaper-secondary: #4a4a4a;
  --newspaper-accent: #2563eb;
  --newspaper-light-gray: #f8f9fa;
  --newspaper-border: #e5e7eb;
  --newspaper-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --newspaper-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Base typography overrides */
body {
  font-family: 'Crimson Text', Georgia, serif;
  line-height: 1.7;
  color: var(--newspaper-primary);
  background-color: #fefefe;
}

/* Heading typography with newspaper-style fonts */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--newspaper-primary);
}

/* Masthead styling */
.newspaper-masthead h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900;
  font-size: 3.5rem;
  letter-spacing: -0.02em;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.newspaper-masthead .tagline {
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.875rem;
  color: var(--newspaper-secondary);
}

.newspaper-masthead .date {
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--newspaper-primary);
}

/* Navigation styling */
.newspaper-nav {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--newspaper-primary);
  box-shadow: var(--newspaper-shadow);
}

.newspaper-nav .nav-link {
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
  position: relative;
}

.newspaper-nav .nav-link:hover {
  color: var(--newspaper-accent);
  transform: translateY(-1px);
}

.newspaper-nav .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 3px;
  background: var(--newspaper-accent);
}

/* Logo styling */
.newspaper-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--newspaper-primary);
  text-decoration: none;
  letter-spacing: -0.01em;
}

/* Article cards with newspaper-style design */
.newspaper-article-card {
  background: white;
  border: 1px solid var(--newspaper-border);
  border-radius: 8px;
  box-shadow: var(--newspaper-shadow);
  transition: all 0.3s ease;
  overflow: hidden;
}

.newspaper-article-card:hover {
  box-shadow: var(--newspaper-shadow-lg);
  transform: translateY(-2px);
  border-color: var(--newspaper-accent);
}

.newspaper-article-card .article-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--newspaper-primary);
  margin-bottom: 0.75rem;
}

.newspaper-article-card .article-title:hover {
  color: var(--newspaper-accent);
}

.newspaper-article-card .article-meta {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 0.875rem;
  color: var(--newspaper-secondary);
  font-weight: 500;
}

.newspaper-article-card .article-description {
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--newspaper-secondary);
}

/* Sidebar styling */
.newspaper-sidebar {
  background: var(--newspaper-light-gray);
  border: 1px solid var(--newspaper-border);
  border-radius: 12px;
  box-shadow: var(--newspaper-shadow);
}

.newspaper-sidebar h2, .newspaper-sidebar h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  color: var(--newspaper-primary);
  border-bottom: 2px solid var(--newspaper-accent);
  padding-bottom: 0.5rem;
}

/* Button styling */
.newspaper-btn {
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--newspaper-primary);
  color: white;
  border: none;
  border-radius: 25px;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
  box-shadow: var(--newspaper-shadow);
}

.newspaper-btn:hover {
  background: var(--newspaper-accent);
  transform: translateY(-1px);
  box-shadow: var(--newspaper-shadow-lg);
}

.newspaper-btn-outline {
  background: transparent;
  color: var(--newspaper-primary);
  border: 2px solid var(--newspaper-primary);
}

.newspaper-btn-outline:hover {
  background: var(--newspaper-primary);
  color: white;
}

/* Filter buttons */
.newspaper-filter-btn {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 20px;
  transition: all 0.3s ease;
  border: 1px solid var(--newspaper-border);
}

.newspaper-filter-btn.active {
  background: var(--newspaper-accent);
  color: white;
  border-color: var(--newspaper-accent);
}

.newspaper-filter-btn:not(.active):hover {
  background: var(--newspaper-light-gray);
  border-color: var(--newspaper-secondary);
}

/* Stories circles enhancement */
.story-circle {
  transition: all 0.3s ease;
}

.story-circle:hover {
  transform: scale(1.05);
  box-shadow: var(--newspaper-shadow-lg);
}

/* Word cloud container */
.newspaper-wordcloud {
  background: white;
  border: 1px solid var(--newspaper-border);
  border-radius: 12px;
  box-shadow: var(--newspaper-shadow);
  overflow: hidden;
}

/* Footer styling */
.newspaper-footer {
  background: var(--newspaper-primary);
  color: white;
  font-family: 'Source Sans Pro', sans-serif;
  border-top: 4px solid var(--newspaper-accent);
}

/* Responsive typography adjustments */
@media (max-width: 768px) {
  .newspaper-masthead h1 {
    font-size: 2.5rem;
  }
  
  .newspaper-article-card .article-title {
    font-size: 1.125rem;
  }
}

@media (max-width: 640px) {
  .newspaper-masthead h1 {
    font-size: 2rem;
  }
  
  .newspaper-masthead .tagline {
    font-size: 0.75rem;
  }
}

/* Print styles for newspaper-like printing */
@media print {
  body {
    font-family: 'Crimson Text', Georgia, serif;
    color: black;
    background: white;
  }
  
  .newspaper-masthead h1 {
    color: black;
    text-shadow: none;
  }
  
  .newspaper-article-card {
    border: 1px solid #ccc;
    box-shadow: none;
    break-inside: avoid;
  }
}

/* Enhanced focus states for accessibility */
.newspaper-btn:focus,
.newspaper-filter-btn:focus,
.nav-link:focus {
  outline: 2px solid var(--newspaper-accent);
  outline-offset: 2px;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Loading animation for images */
.newspaper-article-card img {
  transition: opacity 0.3s ease;
}

.newspaper-article-card img[loading] {
  opacity: 0.7;
}