/* ============================================
   blog.css - MindBridgeClinic Blog Page
   Fully responsive, glassmorphism, dark/light theme
   ============================================ */

/* ----- Reset & Variables ----- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #7c3aed;
  --primary-dark: #6d28d9;
  --primary-light: #a78bfa;
  --secondary-color: #a78bfa;
  --accent-color: #06b6d4;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --text-on-glass: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-highlight: rgba(255, 255, 255, 0.6);
  --star-color: #ffffff;
  --bg-deep: #0b0f14;
  --radius: 18px;
  --radius-sm: 12px;
  --box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  --transition: all 0.3s ease;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: radial-gradient(1200px 800px at 80% 10%, rgba(124, 58, 237, 0.35), transparent 60%),
              radial-gradient(1000px 700px at 10% 90%, rgba(6, 182, 212, 0.25), transparent 55%),
              var(--bg-deep);
  color: var(--text-on-glass);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  font-family: 'Cairo', 'Tajawal', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ----- Skip Link (Accessibility) ----- */
.skip-link {
  position: absolute;
  top: -100%;
  right: 0;
  background: var(--primary-color);
  color: #fff;
  padding: 12px 24px;
  z-index: 99999;
  font-weight: 700;
  border-radius: 0 0 0 12px;
  text-decoration: none;
  transition: top 0.3s;
}
.skip-link:focus {
  top: 0;
}

/* ----- Stars Background ----- */
#star-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  opacity: 0.8;
  animation: twinkle var(--duration, 3s) infinite ease-in-out;
  will-change: transform, opacity;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* SVG Filters (kept for glass effect) */
.svg-filters {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* ----- Reading Progress Bar ----- */
.reading-progress-bar {
  position: fixed;
  top: 0;
  right: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, #7c3aed, #06b6d4);
  z-index: 10000;
  transition: width 0.15s ease-out;
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.7);
  pointer-events: none;
}

/* ----- Page Loader ----- */
.page-loader {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 15, 20, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 10000;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.page-loader .loader-content {
  text-align: center;
  color: white;
}
.page-loader .loader-content i {
  font-size: 3rem;
  color: var(--primary-color);
}
.page-loader .loader-content p {
  margin-top: 15px;
  font-size: 1rem;
  opacity: 0.9;
}

/* ----- Toast Notifications ----- */
.toast-container {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  width: 90%;
  max-width: 400px;
}
.toast {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  color: #fff;
  font-size: 0.95rem;
  text-align: center;
  pointer-events: auto;
  animation: toastIn 0.35s ease, toastOut 0.35s ease 2.5s forwards;
  box-shadow: var(--box-shadow);
}
.toast.success { border-right: 4px solid var(--success-color); }
.toast.error { border-right: 4px solid var(--danger-color); }
.toast.info { border-right: 4px solid var(--accent-color); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-20px); }
}

/* ----- Header (Glass) ----- */
.header {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 10px 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: relative;
}

.logo {
  color: #fff;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo i { font-size: 1.4rem; }
.logo-highlight { color: var(--primary-color); }

.nav-menu {
  display: flex;
  list-style: none;
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
}

.nav-link {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 30px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.9rem;
  white-space: nowrap;
}
.nav-link i { font-size: 0.85rem; }

.nav-link:hover,
.nav-link.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.booking-btn {
  background: var(--primary-color) !important;
  color: white !important;
  box-shadow: 0 0 15px rgba(124, 58, 237, 0.4);
}
.booking-btn:hover {
  background: var(--primary-dark) !important;
}

.nav-extra {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.theme-toggle, .language-select {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  padding: 8px 12px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
  touch-action: manipulation;
}
.language-select {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 6px 10px;
}
.language-select option {
  background: #1e1e2f;
  color: #fff;
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
  touch-action: manipulation;
}
.hamburger .bar {
  display: block;
  width: 24px;
  height: 2.5px;
  margin: 5px auto;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}
.hamburger.active .bar:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.hamburger.active .bar:nth-child(2) {
  opacity: 0;
}
.hamburger.active .bar:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* ----- Blog Page ----- */
.blog-page {
  flex: 1;
  padding: 40px 0 60px;
  position: relative;
  z-index: 1;
}

/* Blog Hero */
.blog-hero {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 50px 30px;
  margin-bottom: 30px;
  text-align: center;
  color: #fff;
  box-shadow: var(--box-shadow), inset 1px 1px 0 var(--glass-highlight);
  position: relative;
  overflow: hidden;
}
.blog-hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: url('21515_0.webp') center/cover no-repeat;
  opacity: 0.05;
  pointer-events: none;
}
.blog-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 12px;
  text-shadow: 0 0 20px rgba(124, 58, 237, 0.6);
  position: relative;
  word-break: break-word;
}
.blog-hero > p {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 20px;
  position: relative;
}

/* Blog Search */
.blog-search {
  display: flex;
  max-width: 600px;
  margin: 25px auto 0;
  position: relative;
}
.blog-search input {
  flex: 1;
  min-width: 0;
  padding: 14px 20px;
  border: 1px solid rgba(255,255,255,0.3);
  border-left: none;
  border-radius: 0 50px 50px 0;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}
.blog-search input::placeholder {
  color: rgba(255,255,255,0.6);
}
.blog-search input:focus {
  background: rgba(255,255,255,0.15);
  border-color: var(--primary-color);
}
.blog-search button {
  padding: 0 22px;
  background: var(--primary-color);
  border: 1px solid rgba(255,255,255,0.3);
  border-right: none;
  border-radius: 50px 0 0 50px;
  color: white;
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition);
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.blog-search button:hover {
  background: var(--primary-dark);
}

/* Filters Bar */
.blog-filters-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 25px;
  box-shadow: var(--box-shadow);
  color: #fff;
}
.blog-filters-bar h3 {
  font-size: 1.1rem;
  white-space: nowrap;
}
.filter-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.filter-select {
  padding: 10px 14px;
  border-radius: 30px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  touch-action: manipulation;
}
.filter-select option {
  background: #1e1e2f;
  color: #fff;
}

/* Blog Container */
.blog-container {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 30px;
  margin-top: 30px;
}

.blog-articles {
  display: grid;
  gap: 25px;
}

/* Blog Card */
.blog-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--box-shadow), inset 1px 1px 0 var(--glass-highlight);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #fff;
}
.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.blog-image {
  position: relative;
  height: 220px;
  overflow: hidden;
}
.blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.blog-card:hover .blog-image img {
  transform: scale(1.05);
}

.blog-date, .blog-category-badge {
  position: absolute;
  padding: 5px 14px;
  border-radius: 30px;
  font-size: 0.78rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  font-weight: 600;
}
.blog-date {
  top: 12px;
  right: 12px;
  background: rgba(124, 58, 237, 0.85);
}
.blog-category-badge {
  bottom: 12px;
  right: 12px;
  background: rgba(6, 182, 212, 0.85);
}

.blog-content {
  padding: 18px 20px 20px;
}
.blog-author {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 8px;
  font-size: 0.85rem;
}
.blog-title {
  font-size: 1.2rem;
  margin-bottom: 8px;
  line-height: 1.5;
  word-break: break-word;
}
.blog-title a {
  color: #fff;
  text-decoration: none;
  transition: color 0.2s;
}
.blog-title a:hover {
  color: var(--primary-light);
}
.blog-excerpt {
  color: rgba(255,255,255,0.65);
  margin-bottom: 14px;
  line-height: 1.7;
  font-size: 0.95rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 14px;
  gap: 10px;
}
.blog-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: color 0.2s;
}
.blog-link:hover {
  color: var(--primary-light);
}
.blog-stats {
  display: flex;
  gap: 12px;
  color: rgba(255,255,255,0.55);
  font-size: 0.82rem;
  flex-shrink: 0;
}

/* Sidebar */
.blog-sidebar {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 22px;
  height: fit-content;
  box-shadow: var(--box-shadow);
  position: sticky;
  top: 80px;
}

.sidebar-widget {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.sidebar-widget:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.sidebar-widget h3 {
  color: #fff;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
}
.sidebar-widget h3 i {
  color: var(--primary-color);
}

.sidebar-search-input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  color: white;
  font-size: 16px;
  font-family: inherit;
  margin-bottom: 10px;
  outline: none;
  transition: var(--transition);
}
.sidebar-search-input::placeholder { color: rgba(255,255,255,0.5); }
.sidebar-search-input:focus {
  border-color: var(--primary-color);
  background: rgba(255,255,255,0.15);
}

.sidebar-search-btn {
  width: 100%;
  background: var(--primary-color);
  border: none;
  padding: 11px;
  border-radius: 10px;
  color: white;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
  touch-action: manipulation;
}
.sidebar-search-btn:hover { background: var(--primary-dark); }

.categories-list {
  list-style: none;
}
.categories-list li { margin-bottom: 6px; }
.categories-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  color: #fff;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  font-size: 0.92rem;
}
.categories-list a:hover {
  background: var(--primary-color);
  transform: translateX(-5px);
}
.categories-list .count {
  background: rgba(0,0,0,0.25);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
}

.recent-posts-list {
  list-style: none;
}
.recent-posts-list li {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  align-items: center;
}
.recent-post-image {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}
.recent-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.recent-post-content { flex: 1; min-width: 0; }
.recent-post-content h4 {
  font-size: 0.9rem;
  line-height: 1.4;
  word-break: break-word;
}
.recent-post-content h4 a {
  color: #fff;
  text-decoration: none;
  transition: color 0.2s;
}
.recent-post-content h4 a:hover { color: var(--primary-light); }
.recent-post-content .date {
  color: rgba(255,255,255,0.55);
  font-size: 0.78rem;
  margin-top: 3px;
}

/* Newsletter Widget */
.newsletter-widget {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.7), rgba(6, 182, 212, 0.7));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius);
  padding: 22px 18px;
  color: white;
  text-align: center;
}
.newsletter-widget h3 { color: white; justify-content: center; }
.newsletter-widget p { font-size: 0.9rem; margin-bottom: 6px; opacity: 0.9; }
.newsletter-widget .nl-form {
  display: flex;
  margin-top: 14px;
  gap: 0;
}
.newsletter-widget .nl-form input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border: none;
  border-radius: 0 10px 10px 0;
  background: rgba(255,255,255,0.2);
  color: white;
  font-size: 16px;
  font-family: inherit;
  outline: none;
}
.newsletter-widget .nl-form input::placeholder { color: rgba(255,255,255,0.6); }
.newsletter-widget .nl-form button {
  padding: 0 18px;
  background: #2c3e50;
  border: none;
  border-radius: 10px 0 0 10px;
  color: white;
  cursor: pointer;
  font-size: 1rem;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.newsletter-widget .nl-form button:hover { background: #34495e; }

/* Resource Link & Pharmacy Tag */
.resource-link {
  background: linear-gradient(135deg, rgba(232,244,253,0.15), rgba(212,234,247,0.1));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-right: 4px solid #2ecc71;
  margin-top: 18px;
  padding: 14px;
  border-radius: 12px;
  text-align: center;
}
.resource-link a {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.resource-link a i { font-size: 1.2rem; }

.pharmacy-tag {
  background: linear-gradient(135deg, #0f4c81, #06315a);
  margin-bottom: 18px;
  border-radius: 16px;
  transition: all 0.3s;
}
.pharmacy-tag a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  font-weight: 800;
  font-size: 1rem;
  color: white;
  text-decoration: none;
}
.pharmacy-tag a i { font-size: 1.6rem; }
.pharmacy-tag:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 20px rgba(15,76,129,0.3);
}

/* Article Detail */
.article-detail {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 35px 30px;
  margin-top: 20px;
  box-shadow: var(--box-shadow);
  color: #fff;
}
.article-detail .article-title {
  font-size: 2rem;
  margin-bottom: 14px;
  word-break: break-word;
  line-height: 1.4;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 20px;
  font-size: 0.9rem;
}
.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.article-detail .article-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 22px;
}
.article-detail .article-content {
  line-height: 1.9;
  color: rgba(255,255,255,0.9);
  font-size: 1.02rem;
}
.article-detail .article-content h2,
.article-detail .article-content h3 {
  color: #fff;
  margin: 1.5rem 0 0.8rem;
}
.article-detail .article-content p {
  margin-bottom: 1rem;
}
.article-detail .article-content ul,
.article-detail .article-content ol {
  margin-bottom: 1rem;
  padding-right: 1.5rem;
}
.article-detail .article-content img {
  max-width: 100%;
  border-radius: 10px;
  margin: 1rem 0;
}

/* Table of Contents */
.table-of-contents {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 22px;
  border: 1px solid rgba(255,255,255,0.1);
}
.toc-title {
  color: #fff;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toc-list {
  list-style: none;
  padding: 0;
}
.toc-list li {
  margin-bottom: 6px;
}
.toc-list a {
  color: var(--primary-light);
  text-decoration: none;
  font-size: 0.93rem;
  transition: color 0.2s;
}
.toc-list a:hover { color: #fff; }
.toc-h3 { padding-right: 18px; }

/* Back to Blog */
.back-to-blog {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-color);
  cursor: pointer;
  margin-bottom: 18px;
  font-weight: bold;
  font-size: 1rem;
  padding: 8px 0;
  touch-action: manipulation;
  transition: color 0.2s;
}
.back-to-blog:hover { color: var(--primary-light); }

/* Like Section */
.like-section {
  margin: 25px 0 10px;
  text-align: center;
}
.like-btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  color: white;
  padding: 10px 28px;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  font-size: 0.95rem;
  touch-action: manipulation;
}
.like-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
}
.like-btn.liked {
  background: #ef4444;
  border-color: #ef4444;
}

/* Share Section */
.share-section {
  margin: 25px 0;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 20px;
}
.share-title {
  color: #fff;
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.share-btn {
  padding: 8px 18px;
  border-radius: 30px;
  color: white;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  font-size: 0.88rem;
  touch-action: manipulation;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.share-btn:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}
.share-btn.facebook:hover { background: rgba(59, 89, 152, 0.6); }
.share-btn.twitter:hover { background: rgba(29, 161, 242, 0.6); }
.share-btn.whatsapp:hover { background: rgba(37, 211, 102, 0.6); }

/* Author Card */
.author-card {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 15px;
  padding: 20px;
  display: flex;
  gap: 18px;
  margin: 25px 0;
  align-items: flex-start;
}
.author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.author-info { flex: 1; min-width: 0; }
.author-info h4 { margin-bottom: 4px; }
.author-bio {
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Related Articles */
.related-articles { margin-top: 30px; }
.related-title {
  color: #fff;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}
.related-card {
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s;
  border: 1px solid rgba(255,255,255,0.1);
}
.related-card:hover { transform: translateY(-3px); }
.related-card img {
  width: 100%;
  height: 130px;
  object-fit: cover;
}
.related-card-content {
  padding: 12px;
}
.related-card-content h4 {
  font-size: 0.92rem;
  line-height: 1.4;
  word-break: break-word;
}
.related-card-content h4 a {
  color: #fff;
  text-decoration: none;
}
.related-card-content h4 a:hover { color: var(--primary-light); }
.related-card-content p {
  color: rgba(255,255,255,0.55);
  font-size: 0.82rem;
  margin-top: 5px;
  line-height: 1.5;
}

/* Loading & Error */
.loading-spinner, .error-message {
  text-align: center;
  padding: 50px 20px;
  color: #fff;
  background: rgba(255,255,255,0.05);
  border-radius: 15px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.loading-spinner i, .error-message i {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
}
.error-message i { color: var(--danger-color); }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 40px 0;
  flex-wrap: wrap;
}
.pagination-btn {
  min-width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  font-size: 0.95rem;
  touch-action: manipulation;
  padding: 0 6px;
}
.pagination-btn.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
}
.pagination-btn:hover:not(.active) {
  background: rgba(255,255,255,0.2);
}

/* Footer */
.footer {
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(255,255,255,0.8);
  padding: 50px 0 30px;
  margin-top: 80px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 35px;
}

.footer-logo {
  font-size: 1.4rem;
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.footer-description {
  margin: 12px 0;
  line-height: 1.7;
  font-size: 0.92rem;
  color: rgba(255,255,255,0.65);
}

.footer-certifications {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.footer-certifications img {
  width: 38px;
  height: 38px;
  opacity: 0.8;
}

.footer-title {
  color: #fff;
  margin-bottom: 16px;
  font-size: 1.05rem;
}

.footer-links {
  list-style: none;
}
.footer-links a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 0;
  transition: var(--transition);
  font-size: 0.9rem;
}
.footer-links a:hover {
  color: #fff;
  transform: translateX(-5px);
}
.footer-links a i { font-size: 0.75rem; }

.newsletter-description {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  margin-bottom: 14px;
  line-height: 1.6;
}

.footer .newsletter-form {
  display: flex;
  margin-bottom: 20px;
}
.footer .newsletter-form input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: none;
  border-radius: 0 10px 10px 0;
  background: rgba(255,255,255,0.12);
  color: white;
  font-size: 16px;
  font-family: inherit;
  outline: none;
}
.footer .newsletter-form input::placeholder { color: rgba(255,255,255,0.5); }
.footer .newsletter-form button {
  padding: 0 16px;
  background: var(--primary-color);
  border: none;
  border-radius: 10px 0 0 10px;
  color: white;
  cursor: pointer;
  touch-action: manipulation;
  display: flex;
  align-items: center;
}

.footer-apps h5 {
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  margin-bottom: 10px;
}
.app-badges {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.app-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  text-decoration: none;
  color: #fff;
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,0.1);
}
.app-badge:hover {
  background: rgba(255,255,255,0.15);
}
.app-badge i {
  font-size: 1.4rem;
}
.app-badge span {
  font-size: 0.7rem;
  opacity: 0.7;
}
.app-badge strong {
  font-size: 0.85rem;
  display: block;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}
.copyright {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
}
.footer-bottom-links {
  display: flex;
  gap: 18px;
}
.footer-bottom-links a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}
.footer-bottom-links a:hover { color: #fff; }

/* Scroll Top Button */
.scroll-top {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  border: none;
  cursor: pointer;
  display: none;
  box-shadow: 0 5px 20px rgba(124,58,237,0.4);
  z-index: 999;
  touch-action: manipulation;
  transition: background 0.2s, transform 0.2s;
  font-size: 1rem;
}
.scroll-top:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
}

/* Cookie Consent */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 18px 20px;
  padding-bottom: calc(18px + var(--safe-bottom));
  z-index: 1000;
  display: none;
}
.cookie-consent.visible { display: block; }
.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.cookie-text h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 4px;
}
.cookie-text p {
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  line-height: 1.5;
}
.cookie-text a { color: var(--primary-light); }
.cookie-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.cookie-actions .btn {
  padding: 10px 22px;
  border-radius: 30px;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  touch-action: manipulation;
  border: none;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3) !important;
  color: rgba(255,255,255,0.8);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); }
.btn-primary {
  background: var(--primary-color);
  color: white;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-small {
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* New Badge */
.new-badge {
  background: #e74c3c;
  color: white;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 20px;
  margin-right: 8px;
  display: inline-block;
  font-weight: 700;
}

/* Mobile Overlay */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.nav-overlay.active {
  display: block;
  opacity: 1;
}

/* Responsive: Tablets (max-width: 992px) */
@media (max-width: 992px) {
  .blog-container {
    grid-template-columns: 1fr;
  }
  .blog-sidebar {
    position: static;
    order: 1;
  }
  .blog-articles {
    order: 0;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Responsive: Mobile (max-width: 768px) */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .header {
    padding: 8px 0;
  }
  .logo {
    font-size: 1.25rem;
  }
  .logo i { font-size: 1.2rem; }

  .hamburger {
    display: block;
    order: 3;
  }

  .nav-extra {
    order: 2;
    gap: 6px;
  }
  .theme-toggle, .language-select {
    padding: 6px 10px;
    font-size: 0.85rem;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100%;
    height: 100dvh;
    background: rgba(11, 15, 20, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 80px 20px 30px;
    z-index: 999;
    overflow-y: auto;
    gap: 4px;
    transform: translateX(100%);
    transition: transform 0.35s ease, display 0.35s ease;
    border-left: 1px solid rgba(255,255,255,0.1);
  }
  .nav-menu.active {
    display: flex;
    transform: translateX(0);
  }
  .nav-menu:not(.active) {
    transform: translateX(100%);
  }

  .nav-link {
    padding: 12px 16px;
    font-size: 1rem;
    border-radius: 12px;
  }
  .nav-link i { width: 20px; text-align: center; }

  .blog-hero {
    padding: 35px 20px;
    border-radius: 14px;
  }
  .blog-hero h1 {
    font-size: 1.75rem;
  }
  .blog-hero > p {
    font-size: 1rem;
  }
  .blog-search {
    flex-direction: row;
  }
  .blog-search input {
    padding: 12px 16px;
    font-size: 16px;
  }
  .blog-search button {
    padding: 0 18px;
  }

  .blog-filters-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border-radius: 14px;
  }
  .blog-filters-bar h3 { text-align: center; }
  .filter-options {
    justify-content: center;
  }
  .filter-select {
    flex: 1;
    min-width: 0;
    text-align: center;
    font-size: 0.85rem;
    padding: 10px 12px;
  }

  .blog-image {
    height: 180px;
  }
  .blog-content {
    padding: 14px 16px 16px;
  }
  .blog-title {
    font-size: 1.05rem;
  }
  .blog-excerpt {
    font-size: 0.9rem;
    -webkit-line-clamp: 2;
  }
  .blog-footer {
    flex-wrap: wrap;
    gap: 8px;
  }
  .blog-link { font-size: 0.85rem; }
  .blog-stats { gap: 10px; font-size: 0.78rem; }

  .blog-sidebar {
    padding: 18px;
    border-radius: 14px;
  }

  .article-detail {
    padding: 22px 18px;
    border-radius: 14px;
  }
  .article-detail .article-title {
    font-size: 1.5rem;
  }
  .article-meta {
    gap: 8px 14px;
    font-size: 0.82rem;
  }
  .article-detail .article-image {
    max-height: 250px;
    border-radius: 12px;
  }
  .article-detail .article-content {
    font-size: 0.97rem;
  }

  .share-buttons {
    gap: 8px;
  }
  .share-btn {
    padding: 8px 14px;
    font-size: 0.82rem;
    flex: 1;
    justify-content: center;
    min-width: calc(50% - 8px);
  }

  .author-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 18px;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .pagination {
    gap: 6px;
    margin: 30px 0;
  }
  .pagination-btn {
    min-width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }

  .footer {
    padding: 40px 0 25px;
    margin-top: 60px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  .footer-bottom-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
  }
  .app-badges {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .app-badge {
    flex: 1;
    min-width: 140px;
    justify-content: center;
  }

  .cookie-content {
    flex-direction: column;
    text-align: center;
  }
  .cookie-actions {
    justify-content: center;
    flex-wrap: wrap;
  }

  .scroll-top {
    bottom: 20px;
    left: 20px;
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 400px) {
  .logo span {
    font-size: 1.05rem;
  }
  .blog-hero h1 {
    font-size: 1.45rem;
  }
  .blog-hero > p {
    font-size: 0.9rem;
  }
  .blog-search input {
    padding: 10px 14px;
  }
  .blog-search button {
    padding: 0 14px;
  }
  .blog-image {
    height: 160px;
  }
  .blog-title {
    font-size: 0.98rem;
  }
  .article-detail .article-title {
    font-size: 1.3rem;
  }
  .filter-select {
    font-size: 0.8rem;
    padding: 8px 10px;
  }
  .share-btn {
    min-width: calc(50% - 4px);
    padding: 7px 10px;
    font-size: 0.78rem;
  }
  .nav-menu {
    width: 100%;
  }
}

@media (max-width: 768px) and (orientation: landscape) {
  .nav-menu {
    padding-top: 60px;
  }
  .blog-hero {
    padding: 25px 20px;
  }
  .blog-hero h1 {
    font-size: 1.5rem;
  }
}

@media (hover: hover) {
  .blog-card:hover {
    transform: translateY(-5px);
  }
}
@media (hover: none) {
  .blog-card:hover {
    transform: none;
  }
  .blog-card:active {
    transform: scale(0.98);
    transition: transform 0.1s;
  }
}

@media print {
  .header, .footer, .scroll-top, .cookie-consent,
  #star-container, .reading-progress-bar, .share-section,
  .like-section, .blog-sidebar, .blog-filters-bar,
  .back-to-blog, .related-articles { display: none !important; }
  body { background: #fff; color: #000; }
  .article-detail { box-shadow: none; border: none; background: #fff; }
  .article-detail .article-content { color: #333; }
}
