/* css/style.css */

:root {
  /* Brand Palette */
  --brand-dark: #1e293b;   /* Slate 800 - Navbar/Footer */
  --brand-darker: #0f172a; /* Slate 900 - Headings */
  
  /* Accents */
  --accent: #334155;       /* Blue-Grey (Requested) */
  --accent-light: #f1f5f9; /* Slate 100 */
  --highlight: #f59e0b;    /* Gold */
  
  /* Backgrounds */
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  
  /* Typography */
  --font-heading: 'Merriweather', serif;
  --font-body: 'Inter', sans-serif;
}

body {
  background-color: var(--bg-body);
  color: var(--brand-darker);
  font-family: var(--font-body);
  padding-top: 72px; 
  -webkit-font-smoothing: antialiased;
}

/* ===== NAVBAR ===== */
.navbar {
  background-color: var(--brand-dark) !important;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  padding: 0.8rem 0;
}

.navbar-brand {
  font-family: var(--font-heading);
  font-weight: 900;
  color: white !important;
  font-size: 1.4rem;
  letter-spacing: -0.5px;
}

.nav-link {
  font-weight: 500;
  color: #cbd5e1 !important; /* Light Grey */
  font-size: 0.9rem;
  margin: 0 8px;
  transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
  color: white !important;
}

/* User Avatar */
#user-button { margin-left: 15px; min-width: 32px; min-height: 32px; }

/* Dropdowns */
.dropdown-menu {
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 0.5rem 0;
}
.dropdown-item { font-size: 0.9rem; color: var(--brand-dark); padding: 8px 20px; }
.dropdown-item:hover { background: var(--accent-light); color: var(--brand-dark); }
.dropdown-divider { margin: 0.5rem 0; border-color: var(--border); }

/* ===== HERO CAROUSEL ===== */


/* Carousel Refinement */
.hero-section {
  border-radius: 16px; /* Softer corners */
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); /* Deep shadow */
  border: 1px solid rgba(255,255,255,0.1); /* Subtle border for dark slides */
}

.carousel-item {
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1); /* Apple-like ease */
}

.carousel-caption {
  /* Reset default bootstrap caption positioning to allow our flexbox layout */
  position: static; 
  padding: 0;
}

/* Adjust button hover states for dark backgrounds */
.btn-outline-light:hover {
  background-color: white;
  color: var(--brand-darker);
}

/* ===== MAIN LAYOUT ===== */
.main-grid {
  padding-bottom: 4rem;
}

/* Article Cards */
.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.05);
  border-color: #cbd5e1;
}

/* Badges & Meta */
.meta-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  border-radius: 4px;
  text-decoration: none;
  transition: 0.2s;
  margin-right: 8px;
  border: 1px solid transparent;
  vertical-align: middle;
}

.badge-type {
  background: #eff6ff; /* Very light blue */
  color: #2563eb;      /* Keeping type badge blue for contrast */
  border-color: #dbeafe;
}
.badge-type:hover { background: #2563eb; color: white; border-color: #2563eb; }

.badge-source {
  background: #f1f5f9; 
  color: var(--accent); /* Blue-Grey */
  border-color: #e2e8f0;
}
.badge-source:hover { background: var(--accent); color: white; border-color: var(--accent); }

.meta-date {
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 500;
  vertical-align: middle;
}

/* Titles (WITH LINE ANIMATION) */
.article-card h3 a {
  font-family: var(--font-heading);
  color: var(--brand-darker);
  font-weight: 800;
  text-decoration: none;
  font-size: 1.45rem;
  line-height: 1.35;
  display: inline; /* Needed for background transition */
  
  /* Line Animation Logic */
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 2px;
  background-position: left bottom;
  background-repeat: no-repeat;
  transition: background-size 0.3s ease;
  padding-bottom: 2px;
}

.article-card h3 a:hover {
  background-size: 100% 2px;
  color: var(--accent);
}

/* Wrapper to ensure title block spacing */
.article-card h3 { margin: 0.8rem 0 0.6rem; }

.article-excerpt {
  color: #475569;
  line-height: 1.6;
  font-size: 1rem;
  margin-bottom: 0;
  margin-top: 0.5rem;
}

/* Tags */
.tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: white;
  color: #64748b;
  text-decoration: none;
  margin-right: 6px;
  font-weight: 500;
  transition: 0.2s;
}
.tag:hover { border-color: var(--accent); color: var(--accent); background: #f8fafc; }

/* ===== SIDEBAR ===== */
.sidebar-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  position: sticky;
  top: 90px; 
}

.sidebar-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--bg-body);
}

.cat-link {
  display: block;
  padding: 8px 12px;
  margin-bottom: 6px;
  background: #f8fafc;
  border-radius: 6px;
  color: var(--brand-dark);
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  transition: 0.2s;
  border: 1px solid transparent;
}

.cat-link:hover {
  background: var(--accent-light);
  color: var(--accent);
  border-color: #cbd5e1;
  padding-left: 16px;
}

/* ===== FOOTER ===== */
footer {
  background: var(--brand-dark);
  color: #94a3b8;
  padding: 4rem 0;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: auto;
}


/* ===== ARTICLE CONTENT TYPOGRAPHY ===== */
.content-typography {
  font-family: 'Inter', sans-serif; /* Using clean sans-serif for readability on screens */
  color: #334155; /* Slate 700 */
  font-size: 1.1rem;
  line-height: 1.8;
}

/* Headings inside the article */
.content-typography h2 {
  font-family: 'Merriweather', serif;
  color: var(--brand-darker);
  font-weight: 800;
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #f1f5f9;
}

.content-typography h3 {
  font-family: 'Merriweather', serif;
  color: var(--brand-dark);
  font-weight: 700;
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
}

/* Lists */
.content-typography ul, .content-typography ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.content-typography li {
  margin-bottom: 0.8rem;
}

/* Paragraphs */
.content-typography p {
  margin-bottom: 1.5rem;
}

/* Strong/Bold emphasis */
.content-typography strong {
  color: var(--brand-darker);
  font-weight: 700;
}

/* Links inside text */
.content-typography a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.content-typography a:hover {
  color: var(--brand-darker);
  background-color: var(--accent-light);
}

/* Callout Box (Value Addition) */
.content-typography blockquote {
  background: #f8fafc;
  border-left: 4px solid var(--accent);
  margin: 2rem 0;
  padding: 1.5rem;
  font-style: italic;
  color: var(--brand-dark);
  border-radius: 0 8px 8px 0;
}