/* Global Styles for Economics Perspective */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Source+Sans+Pro:wght@300;400;600&display=swap');

:root {
  --primary: rgb(102, 0, 0);
  --primary-hover: rgb(130, 0, 0);
  --accent-gold: #D4AF37;
  --bg-beige: #F5F5DC;
  --bg-white: #FFFFFF;
  --text-main: #1A1A1A;
  --text-muted: #555555;
  --header-bg: rgb(102, 0, 0);
  --footer-bg: rgb(102, 0, 0);
  --transition: all 0.3s ease;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.15);
}

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

body {
  font-family: 'Source Sans Pro', sans-serif;
  background-color: var(--bg-white);
  color: var(--text-main);
  line-height: 1.6;
}

/* Ensure all images are visible */
img {
  max-width: 100%;
  height: auto;
  display: block;
  opacity: 1 !important;
  visibility: visible !important;
}

h1, h2, h3, h4, .headline {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
}

/* Header & Navigation */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.header-top {
  background-color: var(--header-bg);
  color: white;
  padding: 0.8rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: white;
}

.brand-container img {
  height: 40px;
}

.brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.header-auth {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.login-btn {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 1.2rem;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 4px;
  transition: var(--transition);
}

.login-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: white;
}

/* Secondary Navigation Bar */
.header-nav {
  background: white;
  padding: 0.5rem 2rem;
  border-bottom: 1px solid #eee;
}

.header-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.header-nav a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition);
  padding: 0.5rem 0;
}

.header-nav a:hover {
  color: var(--primary);
}

/* Home Featured Podcast */
.home-podcast {
  margin-top: 2rem;
  margin-bottom: 3rem;
}

.podcast-card {
  background: #fdf2f2;
  border: 1px solid #fee2e2;
  border-radius: 12px;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.podcast-label {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--primary);
  color: white;
  padding: 0.5rem 1.5rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  border-bottom-left-radius: 12px;
}

.podcast-text h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.podcast-text p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 800px;
}

.podcast-text audio {
  width: 100%;
  max-width: 600px;
  height: 40px;
}

/* Footer Alignment Tweaks */
footer .footer-container {
  align-items: start;
}

footer .footer-links ul {
  padding-left: 0;
  list-style: none;
}

footer .social-grid {
  justify-content: start;
}

/* Breaking News Ticker */
.ticker-wrapper {
  background: white;
  border-bottom: 2px solid var(--primary);
  padding: 0.8rem 2rem;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(102, 0, 0, 0.05);
}

.ticker-label {
  background: var(--primary);
  color: white;
  padding: 0.4rem 1.2rem;
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  margin-right: 2rem;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  box-shadow: 0 4px 12px rgba(102, 0, 0, 0.3);
}

.live-indicator {
  width: 10px;
  height: 10px;
  background: #ff0000;
  border-radius: 50%;
  box-shadow: 0 0 10px #ff0000;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(255, 0, 0, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); }
}

.ticker-content {
  display: flex;
  white-space: nowrap;
  animation: marquee 45s linear infinite;
}

.ticker-item {
  display: inline-block;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1rem;
  margin-right: 4rem;
  text-decoration: none;
  transition: var(--transition);
  letter-spacing: -0.01em;
}

.ticker-item:hover {
  color: var(--primary);
  text-decoration: underline;
}

@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Featured Article (Lead Story) */
.featured-article {
  margin-bottom: 4rem;
}

.lead-card {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.lead-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(102, 0, 0, 0.15);
}

.lead-img-wrapper {
  height: 450px;
  overflow: hidden;
}

.lead-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lead-content {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.lead-title {
  font-size: 2.5rem;
  line-height: 1.1;
  margin: 1rem 0;
  color: var(--text-main);
}

.lead-excerpt {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

@media (max-width: 992px) {
  .lead-card {
    grid-template-columns: 1fr;
  }
  .lead-img-wrapper {
    height: 300px;
  }
  .lead-content {
    padding: 2rem;
  }
}

/* Main Content Area */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: 4rem 2rem;
  background: white;
  margin-bottom: 2rem;
}

.hero-content {
  padding-right: 2rem;
}

.hero-content h1 {
  font-size: 3rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--primary);
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: var(--text-muted);
}

.hero-image {
  box-shadow: var(--shadow-md);
  border-radius: 8px;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.cta-btn {
  background-color: var(--primary);
  color: white;
  padding: 0.8rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 700;
  display: inline-block;
  transition: var(--transition);
}

.cta-btn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
}

/* Web Stories Scrolling Section */
.webstory-section {
  padding: 3rem 0;
  background: #f9f9f9;
  margin: 2rem 0;
  overflow: hidden;
}

.webstory-header {
  max-width: 1200px;
  margin: 0 auto 1.5rem auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.webstory-container {
  display: flex;
  overflow-x: auto;
  gap: 1.5rem;
  padding: 1rem 2rem;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.webstory-container::-webkit-scrollbar {
  height: 6px;
}
.webstory-container::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

.webstory-card {
  flex: 0 0 280px;
  height: 450px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  cursor: pointer;
}

.webstory-card:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}

.webstory-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.webstory-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  padding: 1.5rem;
  color: white;
}

/* Footer Styles */
footer {
  background-color: rgb(102, 0, 0);
  color: white;
  padding: 4rem 2rem 2rem;
  margin-top: 4rem;
  font-family: 'Source Sans Pro', sans-serif;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 3rem;
}

.footer-brand .footer-logo {
  height: 50px;
  margin-bottom: 1.5rem;
  filter: brightness(0) invert(1); /* Ensure logo is white on maroon if it's dark */
}

.footer-brand p {
  color: rgba(255,255,255,0.8);
  font-size: 0.95rem;
  max-width: 300px;
}

.footer-links h4, .footer-social h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-links h4::after, .footer-social h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30px;
  height: 2px;
  background-color: var(--accent-gold);
}

.footer-links ul {
  list-style: none;
}

.footer-links ul li {
  margin-bottom: 0.8rem;
}

.footer-links ul li a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition);
}

.footer-links ul li a:hover {
  color: var(--accent-gold);
  padding-left: 5px;
}

.footer-social .social-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.social-icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.1);
  color: white;
  border-radius: 50%;
  text-decoration: none;
  transition: var(--transition);
  font-size: 1.2rem;
}

.social-icon-link:hover {
  background: var(--accent-gold);
  color: rgb(102, 0, 0);
  transform: translateY(-3px);
}

.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
}

@media (max-width: 992px) {
  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 600px) {
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-brand p {
    margin: 0 auto;
  }
  
  .footer-links h4::after, .footer-social h4::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .footer-social .social-grid {
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
  }
}

/* Article Cards */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-content {
  padding: 1.5rem;
}

.badge {
  background: var(--primary);
  color: white;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  border-radius: 4px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: inline-block;
}

.card-title {
  font-size: 1.25rem;
  margin: 0.5rem 0;
  color: var(--text-main);
}

/* Article Page Layout */
.standard-article, .premium-article {
  max-width: 800px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}

.category-badge {
  background: var(--primary);
  color: white;
  padding: 0.3rem 0.8rem;
  font-size: 0.8rem;
  border-radius: 4px;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 1rem;
}

.headline {
  font-size: 3rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--text-main);
}

.article-meta {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

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

.featured-image img {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: cover;
}

.share-bar {
  display: flex;
  gap: 1.5rem;
  margin: 2rem 0;
  padding: 1rem 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.share-btn {
  color: var(--text-muted);
  font-size: 1.4rem;
  transition: var(--transition);
  text-decoration: none;
}

.share-btn:hover {
  color: var(--primary);
  transform: translateY(-3px);
}

.article-content {
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--text-main);
}

.article-content p {
  margin-bottom: 1.5rem;
}

.keywords-section {
  margin-top: 3rem;
  padding: 1.5rem;
  background: #f9f9f9;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  header {
    padding: 1rem;
  }
  nav {
    display: none; /* Mobile menu logic to be added */
  }
}

/* EP Prime Gating (NewsMinute Style) */
.premium-content-wrapper {
  position: relative;
  overflow: hidden;
}

.gated-content {
  transition: filter 0.5s ease;
}

.blurred-content {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
}

/* The "Fade Out" effect on the bottom of gated content */
.content-fade-mask {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 400px;
  background: linear-gradient(transparent, white 90%);
  z-index: 10;
  pointer-events: none;
  display: none; /* Shown only when gated */
}

.blurred-content + .content-fade-mask {
  display: block;
}

.prime-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 500px;
  background: white;
  padding: 3rem;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(102, 0, 0, 0.2);
  z-index: 100;
  text-align: center;
  border-top: 5px solid var(--primary);
  display: none; /* Controlled by JS */
  flex-direction: column;
  align-items: center;
}

.prime-overlay i.lock-icon {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.prime-overlay h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.prime-overlay p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.overlay-btns {
  display: flex;
  gap: 1rem;
  width: 100%;
}

.overlay-btns .cta-btn {
  flex: 1;
  text-align: center;
}

.secondary-btn {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 0.8rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 700;
  transition: var(--transition);
}

.secondary-btn:hover {
  background: rgba(102, 0, 0, 0.05);
}

/* Premium Audio Player */
.prime-audio-section {
  background: #fdf2f2;
  padding: 2rem;
  border-radius: 12px;
  margin: 2rem 0;
  border: 1px solid #fee2e2;
}

.audio-track {
  display: flex;
  align-items: center;
  gap: 2rem;
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.audio-info {
  flex-grow: 1;
}

.audio-info h4 {
  margin-bottom: 0.3rem;
  color: var(--primary);
}

.audio-info p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.audio-player-control {
  width: 300px;
}

.audio-player-control audio {
  width: 100%;
  height: 35px;
}

/* Membership Page Fixes */
.maroon-text {
  color: var(--primary);
}

.tier-card.featured {
  border: 2px solid var(--primary);
  transform: scale(1.05);
  position: relative;
}

.featured-badge {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-gold);
  color: rgb(102, 0, 0);
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
}
