/*========================================
Premium Modern Design System
========================================*/

/* Variables */
:root {
  /* Colors */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);
  
  /* Layout */
  --header-height: 80px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
  
  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Aesthetics */
body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

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

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

/* =======================================
   Header (Glassmorphic)
   ======================================= */
.header-modern {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  transition: var(--transition);
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.header-modern .navbar-brand img {
  height: 40px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.header-modern .navbar-brand:hover img {
  transform: scale(1.05);
}

.header-modern .nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.5rem 1.2rem !important;
  margin: 0 0.2rem;
  border-radius: var(--radius-full);
  position: relative;
  transition: var(--transition);
}

.header-modern .nav-link:hover {
  color: var(--accent);
  background: rgba(99, 102, 241, 0.05);
}

.header-modern .dropdown-menu {
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 1rem;
  min-width: 220px;
  animation: dropdownFade 0.2s ease forwards;
}

@keyframes dropdownFade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.header-modern .dropdown-item {
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  color: var(--text-secondary);
  transition: var(--transition);
  font-weight: 500;
}

.header-modern .dropdown-item:hover {
  background: rgba(99, 102, 241, 0.05);
  color: var(--accent);
  padding-left: 1.3rem; /* Little jump effect */
}

/* Mobile navbar styles */
@media (max-width: 991px) {
  .header-modern {
    height: auto;
    min-height: var(--header-height);
    padding: 1rem 0;
  }

  .header-modern .navbar-collapse {
    margin-top: 1rem;
    padding: 1rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
  }

  .header-modern .navbar-nav {
    width: 100%;
  }

  .header-modern .nav-item {
    width: 100%;
  }

  .header-modern .nav-link {
    padding: 0.75rem 1rem !important;
    margin: 0.25rem 0;
    width: 100%;
    text-align: left;
  }

  .header-modern .dropdown-menu {
    border: none;
    box-shadow: none;
    background: transparent;
    padding: 0 0 0 1rem;
    margin-top: 0;
  }

  .header-modern .dropdown-item {
    padding: 0.5rem 1rem;
    margin: 0.15rem 0;
  }

  .navbar-toggler {
    border: 1px solid rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0.75rem;
    background-color: rgba(255, 255, 255, 0.9);
  }

  .navbar-toggler:hover {
    background-color: rgba(99, 102, 241, 0.05);
  }

  .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
    outline: none;
  }
}

/* =======================================
   Hero Section
   ======================================= */
.hero-premium {
  position: relative;
  padding: 120px 0;
  min-height: 60vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 0;
  margin-bottom: 3rem;
}

.hero-premium-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 1;
  transform: scale(1.05);
  animation: heroZoom 15s infinite alternate ease-in-out;
}

@keyframes heroZoom {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); }
}

.hero-premium-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.6) 100%);
  z-index: 2;
  backdrop-filter: blur(3px);
}

.hero-premium-content {
  position: relative;
  z-index: 3;
  color: #fff;
}

.hero-premium-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(to right, #fff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeUp 0.8s ease backwards;
}

.hero-premium-desc {
  font-size: 1.25rem;
  color: #f1f5f9;
  max-width: 600px;
  margin: 0 auto;
  opacity: 0.9;
  animation: fadeUp 0.8s ease 0.2s backwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =======================================
   Blog Section Details
   ======================================= */
.section-premium {
  padding: 80px 0;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  position: relative;
  display: inline-block;
}

.section-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* Blog Cards */
.card-premium {
  background: var(--bg-secondary);
  border-radius: 0;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.03);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card-premium:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.card-premium-img-wrap {
  position: relative;
  padding-top: 60%; /* 16:9 Aspect Ratio */
  overflow: hidden;
}

.card-premium-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.card-premium-img-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-premium-img-placeholder::before {
  content: '\f03e';
  font-family: 'Font Awesome 5 Free';
  font-weight: 400;
  font-size: 3rem;
  color: #bdbdbd;
  opacity: 0.5;
}

.card-premium:hover .card-premium-img {
  transform: scale(1.08);
}

.card-section-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
}

.card-section-badge i {
  font-size: 0.875rem;
}

.card-premium:hover .card-section-badge {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.5);
}

.card-premium-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-premium-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.card-premium-title a {
  color: var(--text-primary);
}

.card-premium-title a:hover {
  color: var(--accent);
}

.card-premium-desc {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-premium-footer {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0,0,0,0.05);
}

.card-premium-link {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 1px;
}

.card-premium-link i {
  margin-left: 0.5rem;
  transition: transform 0.3s ease;
}

.card-premium-link:hover i {
  transform: translateX(5px);
}

/* =======================================
   Single Blog Post
   ======================================= */
.article-premium {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.article-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  padding: 2rem 3rem 0 3rem;
  color: var(--text-primary);
}

.article-cover {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.article-body {
  padding: 3rem;
}

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

.article-content h2, .article-content h3 {
  color: var(--text-primary);
  margin-top: 2rem;
}

/* Code Styling for Blog Posts */
.article-content pre {
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
  box-shadow: var(--shadow-sm);
  overflow: hidden; /* Ensure rounded corners clip the inner code block */
}

/* Highlight.js Block Code Styling */
.article-content pre code.hljs {
  padding: 1.5rem;
  border-radius: var(--radius-md);
  font-family: 'Fira Code', 'JetBrains Mono', 'Courier New', Courier, monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  overflow-x: auto;
}

/* Inline Code Styling (applies only to code without highlight.js) */
.article-content code:not(.hljs) {
  font-family: 'Fira Code', 'JetBrains Mono', 'Courier New', Courier, monospace;
  background-color: rgba(99, 102, 241, 0.1);
  color: var(--accent);
  padding: 0.2em 0.4em;
  border-radius: var(--radius-sm);
  font-size: 0.875em;
}

/* Table Styling */
.article-content table {
  width: 100%;
  min-width: 600px; /* Minimum width before scrolling kicks in */
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* Make table scrollable on small screens */
.article-content > table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
}

.article-content table th,
.article-content table td {
  padding: 0.875rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  text-align: left;
  white-space: normal;
}

.article-content table thead th {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(99, 102, 241, 0.05) 100%);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 1;
}

.article-content table tbody tr {
  transition: var(--transition);
}

.article-content table tbody tr:hover {
  background: rgba(99, 102, 241, 0.03);
}

.article-content table tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.02);
}

.article-content table tbody tr:nth-child(even):hover {
  background: rgba(99, 102, 241, 0.04);
}

/* Scrollbar styling for tables */
.article-content > table::-webkit-scrollbar {
  height: 8px;
}

.article-content > table::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

.article-content > table::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}

.article-content > table::-webkit-scrollbar-thumb:hover {
  background: var(--accent-hover);
}

/* Share Component */
.article-share {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.875rem;
  transition: var(--transition);
  color: #fff;
}

.share-btn i { margin-right: 0.5rem; }
.share-fb { background: #1877F2; }
.share-fb:hover { background: #166fe5; transform: translateY(-2px); color: #fff;}
.share-tw { background: #1DA1F2; }
.share-tw:hover { background: #1a91da; transform: translateY(-2px); color: #fff;}

/* Sidebar */
.sidebar-widget {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
}

.widget-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.widget-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: var(--radius-full);
}

.related-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related-item {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.related-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.related-item a {
  display: flex;
  align-items: flex-start;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.4;
}

.related-item a i {
  color: var(--accent);
  margin-top: 4px;
  margin-right: 12px;
  font-size: 0.8rem;
}

.related-item a:hover {
  color: var(--accent);
  transform: translateX(4px);
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li {
  display: flex;
  margin-bottom: 1.2rem;
  color: var(--text-secondary);
}

.contact-icon {
  width: 40px;
  height: 40px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  flex-shrink: 0;
}

/* =======================================
   Footer
   ======================================= */
.footer-premium {
  background: #0f172a;
  color: #cbd5e1;
  padding-top: 80px;
}

.footer-logo img {
  height: 45px;
  margin-bottom: 1.5rem;
  filter: brightness(0) invert(1);
}

.footer-desc {
  color: #94a3b8;
  margin-bottom: 2rem;
  max-width: 300px;
}

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

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.social-link:hover {
  background: var(--accent);
  transform: translateY(-3px);
}

.footer-heading {
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.footer-contact li {
  display: flex;
  margin-bottom: 1rem;
  color: #94a3b8;
}

.footer-contact-icon {
  color: var(--accent);
  margin-right: 1rem;
  margin-top: 4px;
}

.footer-bottom {
  margin-top: 60px;
  padding: 24px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  background: #0b0f19;
}

.footer-bottom-links a {
  color: #94a3b8;
  margin-left: 1.5rem;
}

.footer-bottom-links a:hover {
  color: #fff;
}

/* =======================================
   Signature Section
   ======================================= */
.sig-section {
  padding: 80px 0;
}

.sig-photo-wrap {
  position: relative;
  display: inline-block;
}

.sig-photo-wrap .sig-photo {
  border-radius: 12px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  position: relative;
  z-index: 1;
}

.sig-content {
  padding-left: 20px;
}

.sig-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.sig-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.sig-description {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.sig-quote {
  border-left: 3px solid var(--accent);
  padding: 12px 0 12px 20px;
  margin: 0 0 1.5rem;
}

.sig-quote .sig-quote-mark {
  display: none;
}

.sig-quote p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-secondary);
  font-style: italic;
  margin: 0;
}

.sig-signature {
  margin-top: 8px;
}

.sig-signature img {
  max-width: 180px;
  opacity: 0.85;
}

@media (max-width: 991px) {
  .sig-section {
    padding: 60px 0;
  }
  
  .sig-content {
    padding-left: 0;
    margin-top: 32px;
  }
  
  .sig-title {
    font-size: 1.8rem;
  }
}
