/* ==========================================================
   aInfoEra — Modern Editorial Theme
   ========================================================== */

/* --- Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,600;0,700;0,800;1,400&display=swap');

:root {
  --primary: #0f766e;      /* Muted Teal */
  --primary-hover: #115e59;
  --secondary: #64748b;
  --dark: #0f172a;         /* Deep Slate */
  --light: #fafaf9;        /* Soft Cream/Warm Gray */
  --border-color: #e7e5e4;
  --text-main: #292524;
  --text-muted: #78716c;
  
  --font-sans: 'Inter', sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  
  --radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

/* --- Base & Reset --- */
body {
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: var(--light);
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--dark);
  font-weight: 700;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

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

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--light);
}
::-webkit-scrollbar-thumb {
  background: #d6d3d1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a8a29e;
}

/* --- Navbar Styling --- */
.navbar {
  background-color: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.8rem 0;
  transition: var(--transition);
}

.navbar-brand {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--dark) !important;
}

.navbar-brand span {
  color: var(--primary);
}

.navbar-nav .nav-link {
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--secondary) !important;
  padding: 0.5rem 1rem !important;
  border-radius: 6px;
  transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--primary) !important;
  background-color: #f5f5f4;
}

.navbar-toggler {
  border: none;
  padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* --- Hero Sections --- */
.hero-home, .hero-blog, .hero-article {
  min-height: 400px;
  display: flex;
  align-items: center;
  position: relative;
  background-size: cover;
  background-position: center;
  margin-bottom: 3rem;
  border-radius: 0 0 24px 24px;
  overflow: hidden;
}

.hero-home {
  background-image: url('/images/pic-1.png');
}

.hero-blog {
  background-image: url('/images/pic-2.png');
}

.hero-article {
  background-image: url('/images/pic-3.png');
}

.hero-home .overlay,
.hero-blog .overlay,
.hero-article .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.45), rgba(15, 23, 42, 0.75));
  z-index: 1;
}

.hero-home .container,
.hero-blog .container,
.hero-article .container {
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-home h1, .hero-blog h1, .hero-article h1 {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
}

.hero-home p {
  font-size: 1.25rem;
  max-width: 600px;
  font-weight: 300;
  opacity: 0.9;
}

.hero-home .btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.3);
  transition: var(--transition);
}

.hero-home .btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.4);
}

/* --- Content Container & Cards --- */
#index {
  list-style: none;
  padding-left: 0;
}

#index li {
  margin-bottom: 2.5rem;
}

.blog-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #d6d3d1;
}

.blog-card h2 {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.blog-card h2 a {
  color: var(--dark);
}

.blog-card h2 a:hover {
  color: var(--primary);
}

.blog-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.blog-meta time {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.category-badge {
  background-color: #f1f5f9;
  color: var(--primary);
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition);
}

.category-badge:hover {
  background-color: var(--primary);
  color: #fff;
}

.blog-excerpt {
  color: var(--text-main);
  font-size: 1rem;
  margin-bottom: 1.25rem;
}

.read-more-link {
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.read-more-link::after {
  content: '→';
  transition: var(--transition);
}

.read-more-link:hover::after {
  transform: translateX(4px);
}

/* --- Single Article View --- */
.article-container {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.article-container h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.article-image-wrapper {
  margin: 1.5rem 0 2.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.article-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #1c1917;
}

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

/* --- Sidebar Widgets --- */
.sidebar-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.sidebar-card .card-header {
  background: transparent;
  border-bottom: 2px solid var(--primary);
  padding: 0 0 0.75rem 0;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1.25rem;
}

.sidebar-card .card-body {
  padding: 0;
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.6;
}

.top-articles-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.top-article-item {
  border-bottom: 1px solid #f5f5f4;
  padding-bottom: 0.75rem;
}

.top-article-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.top-article-link {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--dark);
  font-size: 1.05rem;
  display: block;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.top-article-link:hover {
  color: var(--primary);
}

.top-article-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.categories-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* --- Pagination --- */
.pagination {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.pagination a, .pagination span {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: #fff;
  color: var(--text-main);
  font-weight: 500;
  transition: var(--transition);
}

.pagination a:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.pagination .active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* --- Footer --- */
footer {
  background-color: var(--dark) !important;
  color: #94a3b8;
  padding: 4rem 0 2rem;
  border-top: 1px solid #1e293b;
  font-size: 0.9rem;
  margin-top: 5rem;
}

footer h5 {
  color: #f8fafc;
  font-family: var(--font-sans);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
}

footer a {
  color: #cbd5e1;
  transition: var(--transition);
}

footer a:hover {
  color: #fff;
}

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

footer ul li {
  margin-bottom: 0.75rem;
}

.footer-copyright {
  border-top: 1px solid #1e293b;
  padding-top: 2rem;
  margin-top: 3rem;
  text-align: center;
}

.footer-copyright a {
  color: var(--primary);
  font-weight: 600;
}

/* --- Tag Cloud Footer (SEO tags) --- */
.seo-tags-box {
  background-color: #f5f5f4;
  padding: 1.5rem;
  border-radius: var(--radius);
  margin-top: 3rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  border: 1px solid var(--border-color);
}

/* --- Responsive Adjustments --- */
@media (max-width: 991.98px) {
  .hero-home h1, .hero-blog h1, .hero-article h1 {
    font-size: 2.25rem;
  }
  .article-container {
    padding: 1.5rem;
  }
}

@media (max-width: 575.98px) {
  .hero-home, .hero-blog, .hero-article {
    min-height: 300px;
    border-radius: 0;
  }
  .hero-home h1, .hero-blog h1, .hero-article h1 {
    font-size: 1.75rem;
  }
  .blog-card {
    padding: 1.25rem;
  }
  .article-container h1 {
    font-size: 1.8rem;
  }
}
