/* Blog-Specific Styles for Unsupervised Learning */

/* Variables (should be defined in :root or styles.css) */
/* Example:
:root {
  --ocean-blue: #155e75;
  --pacific-teal: #0e9488;
  --sunset-orange: #f97316;
  --soft-white: #f8fafc;
  --sand: #e5e7eb;
  --slate-gray: #334155;
  --mono-font: 'Fira Mono', 'Menlo', 'Monaco', monospace;
  --spacing-unit: 1rem;
}
*/

/* Base Typography */
body {
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  background: var(--soft-white);
  color: var(--slate-gray);
  line-height: 1.7;
  font-size: 1.05rem;
  font-weight: 400;
}

h1, h2, h3, h4 {
  font-family: inherit;
  font-weight: 700;
  color: var(--ocean-blue);
  margin-top: 0;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

h2 {
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
  line-height: 1.3;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

h4 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

p {
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
  color: var(--slate-gray);
}

ul, ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

li {
  margin-bottom: 0.5rem;
}

a {
  color: var(--ocean-blue);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover, a:focus {
  color: var(--pacific-teal);
  text-decoration: underline;
}

/* Container */
.container, .container-sm {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navbar */
.navbar {
  background: #fff;
  border-bottom: 1px solid var(--sand);
  padding: 1.5rem 0;
  margin-bottom: 2rem;
  font-size: 1rem;
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo img {
  height: 40px;
  border-radius: 6px;
}

.main-menu ul {
  display: flex;
  gap: 2rem;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-menu a {
  font-weight: 500;
  color: var(--ocean-blue);
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
}

.main-menu a.active, .main-menu a:hover {
  background: var(--pacific-teal);
  color: #fff;
}

.btn-light {
  background: var(--pacific-teal);
  color: #fff !important;
  border-radius: 6px;
  padding: 0.5em 1.2em;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(14, 148, 136, 0.08);
  border: none;
  transition: background 0.2s;
}

.btn-light:hover {
  background: var(--ocean-blue);
}

/* Blog Hero */
.blog-hero {
  padding-top: 80px;
  min-height: 60vh;
  background: var(--soft-white);
}

.hero-heading {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--ocean-blue), var(--pacific-teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.hero-text {
  font-size: 1.15rem;
  color: var(--slate-gray);
  margin-bottom: 2rem;
}

.hero-strong-text {
  font-weight: 700;
  color: var(--pacific-teal);
}

.blog-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0;
}

.blog-nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #fff;
  border: 2px solid var(--ocean-blue);
  border-radius: 25px;
  color: var(--ocean-blue);
  font-weight: 600;
}

.blog-nav-link.active, .blog-nav-link:hover {
  background: var(--ocean-blue);
  color: #fff;
  box-shadow: 0 4px 12px rgba(27, 108, 168, 0.1);
}

/* Featured Content */
.featured-content {
  background: var(--soft-white);
  padding: 3rem 0;
}

.featured-article {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.featured-article .article-image {
  position: relative;
  overflow: hidden;
  height: 260px;
}

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

.featured-article:hover .article-image img {
  transform: scale(1.03);
}

.article-type {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--sunset-orange);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.featured-article .article-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: var(--slate-gray);
}

.article-category {
  background: var(--pacific-teal);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-weight: 600;
}

.article-date, .article-read-time {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.featured-article h3 {
  font-size: 1.5rem;
  color: var(--ocean-blue);
  margin-bottom: 1rem;
  font-weight: 700;
}

.featured-article p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  color: var(--slate-gray);
}

/* Articles Grid */
.latest-articles {
  padding: 3rem 0;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.article-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.2s;
  border: 2px solid transparent;
}

.article-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-color: var(--pacific-teal);
}

.article-card .article-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

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

.article-card:hover .article-image img {
  transform: scale(1.03);
}

.article-card .article-content {
  padding: 1.5rem;
}

.article-card h3 {
  font-size: 1.15rem;
  color: var(--ocean-blue);
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.article-card p {
  color: var(--slate-gray);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.article-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ocean-blue);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.article-link:hover {
  color: var(--pacific-teal);
}

/* Video & Podcast Cards */
.video-card .article-image,
.podcast-card .article-image {
  position: relative;
}

.video-play-button,
.podcast-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--ocean-blue);
  transition: all 0.2s;
  backdrop-filter: blur(5px);
}

.video-card:hover .video-play-button,
.podcast-card:hover .podcast-play-button {
  background: var(--ocean-blue);
  color: #fff;
  transform: translate(-50%, -50%) scale(1.08);
}

.video-duration,
.podcast-duration {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Newsletter Signup */
.newsletter-signup {
  background: var(--soft-white);
  padding: 3rem 0;
}

.newsletter-content {
  text-align: center;
  margin-bottom: 2rem;
}

.newsletter-content h2 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.newsletter-content p {
  font-size: 1.1rem;
  color: var(--slate-gray);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.newsletter-form {
  max-width: 500px;
  margin: 0 auto;
}

/* Breadcrumb */
.breadcrumb {
  background: var(--soft-white);
  padding: 1rem 0;
  border-bottom: 1px solid var(--sand);
}

.breadcrumb-list {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.95rem;
}

.breadcrumb-list li:not(:last-child)::after {
  content: ">";
  margin-left: 0.5rem;
  color: var(--slate-gray);
}

.breadcrumb-list a {
  color: var(--ocean-blue);
}

.breadcrumb-list a:hover {
  text-decoration: underline;
}

/* Article Page */
.article-page {
  padding-top: 80px;
}

.article-header {
  background: var(--soft-white);
  padding: 2.5rem 0;
}

.article-title {
  font-size: 2.25rem;
  color: var(--ocean-blue);
  margin-bottom: 1rem;
  font-weight: 800;
}

.article-subtitle {
  font-size: 1.15rem;
  color: var(--slate-gray);
  margin-bottom: 2rem;
  line-height: 1.4;
  font-weight: 500;
}

.article-meta-full {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  padding: 1rem 0;
  border-top: 1px solid var(--sand);
  border-bottom: 1px solid var(--sand);
}

.article-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.author-info h4 {
  font-size: 0.95rem;
  color: var(--ocean-blue);
  margin-bottom: 0.25rem;
  font-weight: 700;
}

.author-info p {
  font-size: 0.85rem;
  color: var(--slate-gray);
  margin: 0;
}

.article-featured-image {
  padding: 2rem 0;
}

.article-featured-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.article-content {
  padding: 2.5rem 0;
}

.article-body {
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--slate-gray);
}

.article-body .lead {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--ocean-blue);
  margin-bottom: 2rem;
  padding: 1rem 0;
  border-bottom: 2px solid var(--sand);
}

.article-body h2 {
  color: var(--ocean-blue);
  margin: 2rem 0 1rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.article-body h3 {
  color: var(--pacific-teal);
  margin: 1.5rem 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.article-body h4 {
  color: var(--slate-gray);
  margin: 1.25rem 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
}

.article-body p {
  margin-bottom: 1.25rem;
}

.article-body ul, .article-body ol {
  margin-bottom: 1.25rem;
  padding-left: 2rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-body blockquote {
  border-left: 4px solid var(--pacific-teal);
  padding: 1.25rem 2rem;
  margin: 2rem 0;
  background: var(--soft-white);
  font-style: italic;
  font-size: 1.1rem;
}

.article-body code {
  background: var(--soft-white);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: var(--mono-font);
  font-size: 0.95rem;
}

.article-body pre {
  background: var(--slate-gray);
  color: #fff;
  padding: 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 2rem 0;
}

.article-body pre code {
  background: none;
  padding: 0;
}

/* Social Sharing */
.social-sharing {
  margin: 2rem 0;
  padding: 1rem 0;
  border-top: 1px solid var(--sand);
  border-bottom: 1px solid var(--sand);
}

.social-sharing h4 {
  margin-bottom: 1rem;
  color: var(--ocean-blue);
  font-size: 1.1rem;
  font-weight: 700;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--soft-white);
  border: 1px solid var(--sand);
  border-radius: 6px;
  color: var(--slate-gray);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.social-link:hover {
  background: var(--ocean-blue);
  color: #fff;
  border-color: var(--ocean-blue);
}

/* Related Articles */
.related-articles {
  background: var(--soft-white);
  padding: 2.5rem 0;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* Author Bio */
.author-bio {
  margin: 2.5rem 0;
  padding: 2rem;
  background: var(--soft-white);
  border-radius: 12px;
  border: 1px solid var(--sand);
}

.author-info-expanded {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.author-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-details h4 {
  color: var(--ocean-blue);
  margin-bottom: 1rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.author-details p {
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.author-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.author-links a {
  color: var(--ocean-blue);
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border: 1px solid var(--ocean-blue);
  border-radius: 6px;
  transition: all 0.2s;
}

.author-links a:hover {
  background: var(--ocean-blue);
  color: #fff;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
  .featured-article {
    grid-template-columns: 1fr;
  }
  .featured-article .article-image {
    height: 200px;
  }
  .articles-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
  }
}

@media screen and (max-width: 768px) {
  .container, .container-sm {
    padding: 0 0.5rem;
  }
  .hero-heading {
    font-size: 2rem;
  }
  .featured-article .article-content {
    padding: 1.25rem;
  }
  .featured-article h3 {
    font-size: 1.15rem;
  }
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .article-meta {
    gap: 0.5rem;
    font-size: 0.85rem;
  }
  .newsletter-content p {
    font-size: 1rem;
  }
  .author-info-expanded {
    flex-direction: column;
    gap: 1rem;
  }
  .author-avatar-large {
    align-self: center;
  }
  .social-links {
    justify-content: center;
  }
}

@media screen and (max-width: 480px) {
  .hero-heading {
    font-size: 1.5rem;
  }
  .blog-nav {
    flex-direction: column;
    align-items: center;
  }
  .blog-nav-link {
    width: 100%;
    justify-content: center;
    max-width: 200px;
  }
  .featured-article .article-image {
    height: 120px;
  }
  .article-card .article-image {
    height: 120px;
  }
  .video-play-button,
  .podcast-play-button {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}