/*
Theme Name: المجد التعليمي
Theme URI: https://elmagdeltalemy.com
Author: المجد التعليمي
Author URI: https://elmagdeltalemy.com
Description: قالب المجد التعليمي - منصة متكاملة للمذكرات والملخصات الدراسية لجميع المراحل التعليمية في مصر. يدعم المنصة العامة والأزهرية مع لوحة إدارة متقدمة وSEO محسّن.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: Proprietary
License URI: https://elmagdeltalemy.com/privacy
Text Domain: elmagdeltalemy
Tags: rtl-language, arabic, education, custom-menu, custom-logo, featured-images, full-width-template, post-formats, sticky-post, theme-options
*/

/* ===========================
   CSS VARIABLES (Theme Colors)
   =========================== */
:root {
  --primary: 221 83% 26%;
  --primary-foreground: 0 0% 100%;
  --secondary: 210 40% 96%;
  --secondary-foreground: 222 47% 11%;
  --accent: 38 92% 50%;
  --accent-foreground: 0 0% 10%;
  --background: 0 0% 100%;
  --foreground: 222 47% 11%;
  --card: 0 0% 100%;
  --card-foreground: 222 47% 11%;
  --border: 214 32% 91%;
  --input: 214 32% 91%;
  --ring: 221 83% 26%;
  --muted: 210 40% 96%;
  --muted-foreground: 215 16% 47%;
  --destructive: 0 84% 60%;
  --radius: 0.75rem;
  --gold: 38 92% 50%;
  --gold-light: 45 93% 65%;

  --color-primary: hsl(var(--primary));
  --color-accent: hsl(var(--accent));
  --color-bg: hsl(var(--background));
  --color-fg: hsl(var(--foreground));
  --color-card: hsl(var(--card));
  --color-border: hsl(var(--border));
  --color-muted: hsl(var(--muted));
  --color-muted-fg: hsl(var(--muted-foreground));
}

.dark {
  --primary: 213 94% 68%;
  --primary-foreground: 222 47% 11%;
  --background: 222 47% 7%;
  --foreground: 210 40% 98%;
  --card: 222 47% 10%;
  --card-foreground: 210 40% 98%;
  --border: 217 33% 17%;
  --muted: 217 33% 17%;
  --muted-foreground: 215 20% 65%;
  --secondary: 217 33% 17%;
  --secondary-foreground: 210 40% 98%;
}

/* ===========================
   RESET & BASE
   =========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.7;
  direction: rtl;
  text-align: right;
  transition: background 0.3s, color 0.3s;
}

a { color: hsl(var(--primary)); text-decoration: none; transition: color 0.2s; }
a:hover { color: hsl(var(--accent)); }

img { max-width: 100%; height: auto; display: block; }

/* ===========================
   LAYOUT
   =========================== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1; }

/* ===========================
   GRADIENTS & UTILITIES
   =========================== */
.bg-gradient-hero {
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(221 70% 18%) 60%, hsl(38 60% 25%) 100%);
}
.bg-gradient-primary {
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(221 70% 18%));
}
.bg-gradient-accent {
  background: linear-gradient(135deg, hsl(var(--accent)), hsl(38 80% 40%));
}
.bg-gradient-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
}
.text-gradient-gold {
  background: linear-gradient(135deg, hsl(var(--gold)), hsl(var(--gold-light)));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Islamic Pattern */
.islamic-pattern {
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.4'%3E%3Cpath d='M20 0L0 20L20 40L40 20L20 0zM20 5L35 20L20 35L5 20L20 5z'/%3E%3C/g%3E%3C/svg%3E");
}

/* Glass effect */
.glass {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
}

/* Animations */
@keyframes blob {
  0%, 100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(30px,-50px) scale(1.1); }
  66% { transform: translate(-20px,20px) scale(0.9); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.animate-blob { animation: blob 7s infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-spin { animation: spin 1s linear infinite; }
.animate-fade-in { animation: fadeIn 0.4s ease-out; }
.animation-delay-2000 { animation-delay: 2s; }

/* ===========================
   HEADER
   =========================== */
.site-header {
  background: hsl(var(--card));
  border-bottom: 1px solid hsl(var(--border));
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo img {
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  object-fit: cover;
}
.site-logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: hsl(var(--primary));
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.2;
  word-break: break-word;
  max-width: 200px;
}
.header-search {
  flex: 1;
  max-width: 400px;
  position: relative;
}
.header-search input {
  width: 100%;
  padding: 0.5rem 2.5rem 0.5rem 1rem;
  border: 1px solid hsl(var(--border));
  border-radius: 9999px;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: inherit;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
}
.header-search input:focus { border-color: hsl(var(--primary)); }
.header-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: hsl(var(--muted-foreground));
  pointer-events: none;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: auto;
}
.header-btn {
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 1rem;
}
.header-btn:hover { background: hsl(var(--muted)); }
.header-btn-primary {
  background: hsl(var(--primary));
  color: white;
  border-color: hsl(var(--primary));
}
.header-btn-primary:hover { opacity: 0.9; }

/* زر تسجيل الدخول وإنشاء الحساب في الهيدر */
.header-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  border: 1.5px solid hsl(var(--primary));
  background: transparent;
  color: hsl(var(--primary));
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.22s;
  white-space: nowrap;
  font-family: inherit;
}
.header-login-btn:hover {
  background: hsl(var(--primary) / 0.08);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px hsl(var(--primary) / 0.2);
}
.header-register-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  border: 1.5px solid hsl(var(--primary));
  background: hsl(var(--primary));
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.22s;
  white-space: nowrap;
  font-family: inherit;
  box-shadow: 0 2px 8px hsl(var(--primary) / 0.25);
}
.header-register-btn:hover {
  background: hsl(221 70% 18%);
  border-color: hsl(221 70% 18%);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px hsl(var(--primary) / 0.35);
}

/* Main Nav */
.main-nav { display: flex; align-items: center; gap: 0.25rem; }
.nav-item {
  padding: 0.4rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  transition: all 0.2s;
  white-space: nowrap;
}
.nav-item:hover, .nav-item.active {
  background: hsl(var(--primary));
  color: white;
}
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  min-width: 200px;
  z-index: 200;
  display: none;
  padding: 0.5rem;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-item {
  display: block;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: hsl(var(--foreground));
  transition: background 0.15s;
}
.nav-dropdown-item:hover { background: hsl(var(--muted)); color: hsl(var(--primary)); }

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: hsl(var(--foreground));
  padding: 0.25rem;
  font-size: 1.5rem;
}
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 85%;
  max-width: 320px;
  height: 100vh;
  background: hsl(var(--card));
  border-left: 1px solid hsl(var(--border));
  z-index: 1000;
  overflow-y: auto;
  padding: 1.5rem;
  box-shadow: -8px 0 30px rgba(0,0,0,0.15);
}
.mobile-menu.open { display: block; }
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
}
.mobile-overlay.open { display: block; }
.mobile-menu-close {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}
.mobile-nav-item {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin-bottom: 0.25rem;
  transition: all 0.2s;
}
.mobile-nav-item:hover {
  background: hsl(var(--primary));
  color: white;
}

@media (max-width: 768px) {
  .main-nav, .header-search { display: none; }
  .mobile-menu-btn { display: flex; align-items: center; }
}

/* ===========================
   HERO SECTION
   =========================== */
.hero-section {
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(221 70% 18%) 60%, hsl(38 60% 25%) 100%);
  color: white;
  padding: 4rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M20 0L0 20L20 40L40 20L20 0zM20 5L35 20L20 35L5 20L20 5z'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-blob-1, .hero-blob-2 {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}
.hero-blob-1 {
  width: 300px; height: 300px;
  background: rgba(245,158,11,0.15);
  top: -100px; right: -100px;
  animation: blob 7s infinite;
}
.hero-blob-2 {
  width: 300px; height: 300px;
  background: rgba(30,58,138,0.2);
  bottom: -100px; left: -100px;
  animation: blob 7s infinite 2s;
}
.hero-content { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 9999px;
  padding: 0.375rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.hero-subtitle {
  font-size: 1.125rem;
  opacity: 0.85;
  max-width: 600px;
  margin: 0 auto 2rem;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
  padding: 0.875rem 2rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(245,158,11,0.4);
}
.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(245,158,11,0.5);
  color: hsl(var(--accent-foreground));
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}
.hero-stat {
  text-align: center;
}
.hero-stat-num {
  font-size: 1.75rem;
  font-weight: 800;
  color: hsl(var(--gold));
}
.hero-stat-label {
  font-size: 0.8rem;
  opacity: 0.75;
}

/* ===========================
   SECTION HEADERS
   =========================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: hsl(var(--foreground));
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.section-title::before {
  content: '';
  width: 4px;
  height: 1.5rem;
  background: hsl(var(--accent));
  border-radius: 2px;
  display: inline-block;
}
.section-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(var(--primary));
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.section-link:hover { color: hsl(var(--accent)); }

/* ===========================
   MEMO CARDS
   =========================== */
.memos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.memo-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.2s;
  position: relative;
}
.memo-card:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}
.memo-card-img {
  position: relative;
  overflow: hidden;
}
.memo-card-img img {
  width: 100%;
  height: 176px;
  object-fit: cover;
  transition: transform 0.7s;
}
.memo-card:hover .memo-card-img img { transform: scale(1.08); }
.memo-card-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(221 70% 18%));
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.memo-card-fav {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 2;
}
.memo-card-fav:hover { background: white; transform: scale(1.1); }
.memo-card-fav.active { color: #ef4444; }
.memo-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(30,58,138,0.4), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.memo-card:hover .memo-card-overlay { opacity: 1; }
.memo-card-body { padding: 1rem; }
.memo-card-subject-label {
  font-size: 0.7rem;
  color: hsl(var(--accent));
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.memo-card-title {
  font-size: 0.975rem;
  font-weight: 700;
  color: hsl(var(--card-foreground));
  margin-bottom: 0.25rem;
  line-height: 1.4;
}
.memo-card-subject {
  font-size: 0.75rem;
  color: hsl(var(--primary));
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.memo-card-desc {
  font-size: 0.8rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.5;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.memo-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}
.memo-card-meta-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.memo-card-meta-item {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}
.memo-views-badge {
  color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.08);
  border-radius: 9999px;
  padding: 0.1rem 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  border: 1px solid hsl(var(--primary) / 0.15);
}

/* ===========================
   ANNOUNCEMENT BANNER
   =========================== */
.announcement-bar {
  background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--accent)));
  color: white;
  padding: 0.75rem 0;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
}
.announcement-bar a { color: white; text-decoration: underline; }

/* ===========================
   CATEGORIES / SUBJECTS
   =========================== */
.subjects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}
.subject-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  padding: 1.25rem 1rem;
  text-align: center;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.subject-card:hover {
  border-color: hsl(var(--primary));
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(30,58,138,0.1);
}
.subject-card img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 0.5rem;
}
.subject-card-name {
  font-weight: 700;
  font-size: 0.875rem;
  color: hsl(var(--foreground));
}

/* ===========================
   ARTICLES GRID
   =========================== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.article-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.2s;
}
.article-card:hover {
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}
.article-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  transition: transform 0.5s;
}
.article-card:hover img { transform: scale(1.04); }
.article-card-body { padding: 1rem; }
.article-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: hsl(var(--card-foreground));
  margin-bottom: 0.5rem;
  line-height: 1.4;
}
.article-card-excerpt {
  font-size: 0.8rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.article-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  flex-wrap: wrap;
}
.article-views-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.08);
  border: 1px solid hsl(var(--primary) / 0.15);
  border-radius: 9999px;
  padding: 0.15rem 0.55rem;
  transition: all 0.2s;
  animation: viewsPulse 3s ease-in-out infinite;
}
@keyframes viewsPulse {
  0%, 100% { box-shadow: 0 0 0 0 hsl(var(--primary) / 0.15); }
  50% { box-shadow: 0 0 0 4px hsl(var(--primary) / 0); }
}

/* ===========================
   SINGLE MEMO PAGE
   =========================== */
.memo-header {
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(221 70% 18%));
  color: white;
  padding: 2.5rem 0;
}
.memo-breadcrumb {
  font-size: 0.8rem;
  opacity: 0.75;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.memo-breadcrumb a { color: rgba(255,255,255,0.8); }
.memo-breadcrumb a:hover { color: white; }
.memo-main-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
}
.memo-subject-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.memo-stats-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.875rem;
  opacity: 0.85;
  flex-wrap: wrap;
}
.memo-stat-item { display: flex; align-items: center; gap: 0.35rem; }
.memo-content-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  padding: 2rem 0;
}
.memo-description {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.8;
  font-size: 0.95rem;
}
.memo-pdf-embed {
  width: 100%;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid hsl(var(--border));
  margin-bottom: 1.5rem;
}
.memo-pdf-embed iframe {
  width: 100%;
  height: 600px;
  display: block;
}
.memo-sidebar-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.memo-sidebar-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: hsl(var(--foreground));
  padding-bottom: 0.5rem;
  border-bottom: 2px solid hsl(var(--accent));
}
.download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.875rem;
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(221 70% 18%));
  color: white;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.download-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  color: white;
}
.quiz-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem;
  background: hsl(var(--accent));
  color: white;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  margin-top: 0.75rem;
  text-decoration: none;
}
.quiz-btn:hover { opacity: 0.9; color: white; }
.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tag-pill {
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.2s;
}
.tag-pill:hover {
  background: hsl(var(--primary));
  color: white;
}
.star-rating { display: flex; gap: 0.2rem; color: hsl(var(--accent)); }

@media (max-width: 768px) {
  .memo-content-grid { grid-template-columns: 1fr; }
  .memo-pdf-embed iframe { height: 400px; }
}

/* ===========================
   SEARCH PAGE
   =========================== */
.search-hero {
  background: hsl(var(--muted));
  padding: 2rem 0;
  text-align: center;
  margin-bottom: 2rem;
}
.search-box-large {
  display: flex;
  max-width: 600px;
  margin: 0 auto;
  border: 2px solid hsl(var(--primary));
  border-radius: 9999px;
  overflow: hidden;
  background: hsl(var(--card));
}
.search-box-large input {
  flex: 1;
  padding: 0.875rem 1.5rem;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 1rem;
  color: hsl(var(--foreground));
  outline: none;
}
.search-box-large button {
  padding: 0 1.5rem;
  background: hsl(var(--primary));
  color: white;
  border: none;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  transition: opacity 0.2s;
}
.search-box-large button:hover { opacity: 0.9; }
.search-filters {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.filter-select {
  padding: 0.5rem 1rem;
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  font-family: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  outline: none;
}
.filter-select:focus { border-color: hsl(var(--primary)); }

/* ===========================
   AUTH PAGE
   =========================== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(221 70% 18%) 100%);
  padding: 2rem;
}
.auth-card {
  background: hsl(var(--card));
  border-radius: 1.5rem;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.auth-logo {
  text-align: center;
  margin-bottom: 1.5rem;
}
.auth-title {
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
}
.auth-subtitle {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  text-align: center;
  margin-bottom: 1.75rem;
}
.form-group { margin-bottom: 1rem; }
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: hsl(var(--foreground));
}
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus { border-color: hsl(var(--primary)); }
.btn-primary {
  width: 100%;
  padding: 0.875rem;
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(221 70% 18%));
  color: white;
  border: none;
  border-radius: 0.75rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.auth-divider {
  text-align: center;
  margin: 1rem 0;
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  position: relative;
}
.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: hsl(var(--border));
}
.auth-divider span {
  background: hsl(var(--card));
  padding: 0 1rem;
  position: relative;
}
.auth-link {
  display: block;
  text-align: center;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}
.auth-link a { color: hsl(var(--primary)); font-weight: 600; }

/* ===========================
   FOOTER
   =========================== */
.site-footer {
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(221 70% 18%) 60%, hsl(38 60% 25%) 100%);
  color: white;
  margin-top: 4rem;
  position: relative;
  overflow: hidden;
}
.footer-pattern {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M20 0L0 20L20 40L40 20L20 0zM20 5L35 20L20 35L5 20L20 5z'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.footer-inner {
  position: relative;
  z-index: 1;
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-brand-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.footer-brand-logo img {
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  object-fit: cover;
}
.footer-brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.2;
  word-break: break-word;
}
.footer-about {
  font-size: 0.85rem;
  opacity: 0.75;
  line-height: 1.7;
  margin-bottom: 1rem;
}
.footer-socials {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.footer-social-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 0.9rem;
  color: white;
}
.footer-social-btn:hover {
  background: hsl(var(--accent));
  transform: scale(1.1);
  color: white;
}
.footer-col-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: hsl(var(--gold));
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 0.875rem;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.footer-links a:hover { color: white; }
.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.5rem;
}
.footer-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 1.25rem;
}
/* === Footer IP Notice === */
.footer-ip-notice {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 1rem;
  padding: 1rem 1.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
  animation: footerIpIn 0.7s ease forwards;
}
@keyframes footerIpIn {
  from { opacity:0; transform: translateY(8px); }
  to   { opacity:1; transform: translateY(0); }
}
.footer-ip-notice::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.02), transparent);
  background-size: 300% 100%;
  animation: footerIpShimmer 5s ease infinite;
  pointer-events: none;
}
@keyframes footerIpShimmer {
  0% { background-position: -300% 0; }
  100% { background-position: 300% 0; }
}
.footer-ip-icons {
  display: flex;
  gap: 0.3rem;
  flex-shrink: 0;
  font-size: 1.3rem;
  animation: footerIconBounce 3s ease-in-out infinite;
}
@keyframes footerIconBounce {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-3px); }
}
.fip-icon { filter: drop-shadow(0 1px 4px rgba(255,255,255,0.2)); }
.footer-ip-text {
  flex: 1;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.7;
  margin: 0;
  min-width: 200px;
}
.footer-ip-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.12);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 0.65rem;
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s;
  flex-shrink: 0;
  white-space: nowrap;
}
.footer-ip-link:hover {
  background: rgba(255,255,255,0.22);
  transform: translateY(-1px);
}
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
  opacity: 0.65;
}
.footer-developer {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.footer-developer img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ===========================
   PROFILE PAGE
   =========================== */
.profile-header {
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(221 70% 18%));
  color: white;
  padding: 2.5rem 0;
  text-align: center;
}
.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  margin: 0 auto 1rem;
  border: 3px solid rgba(255,255,255,0.4);
}
.profile-name { font-size: 1.5rem; font-weight: 800; }
.profile-email { opacity: 0.75; font-size: 0.9rem; }
.profile-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid hsl(var(--border));
  margin-bottom: 1.5rem;
  overflow-x: auto;
}
.profile-tab {
  padding: 0.75rem 1.25rem;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  color: hsl(var(--muted-foreground));
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  white-space: nowrap;
}
.profile-tab.active {
  color: hsl(var(--primary));
  border-bottom-color: hsl(var(--primary));
}

/* ===========================
   ADMIN DASHBOARD
   =========================== */
.admin-layout {
  display: flex;
  min-height: 100vh;
  background: hsl(var(--background));
}
.admin-sidebar {
  width: 260px;
  background: hsl(var(--card));
  border-left: 1px solid hsl(var(--border));
  padding: 1.5rem 1rem;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.admin-sidebar-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  padding: 0 0.5rem;
}
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin-bottom: 0.25rem;
  transition: all 0.2s;
}
.admin-nav-item:hover, .admin-nav-item.active {
  background: hsl(var(--primary));
  color: white;
}
.admin-main { flex: 1; padding: 2rem; overflow-x: auto; }
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.admin-page-title { font-size: 1.5rem; font-weight: 800; }
.stat-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(221 70% 18%));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  color: white;
}
.stat-num { font-size: 1.75rem; font-weight: 800; }
.stat-label { font-size: 0.8rem; color: hsl(var(--muted-foreground)); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: hsl(var(--card));
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid hsl(var(--border));
}
.data-table th {
  background: hsl(var(--muted));
  padding: 0.75rem 1rem;
  text-align: right;
  font-size: 0.8rem;
  font-weight: 700;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
}
.data-table td {
  padding: 0.75rem 1rem;
  border-top: 1px solid hsl(var(--border));
  font-size: 0.875rem;
}
.data-table tr:hover td { background: hsl(var(--muted)); }
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef9c3; color: #854d0e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }

@media (max-width: 900px) {
  .admin-sidebar { display: none; }
}

/* ===========================
   QUIZ / BATTLE
   =========================== */
.quiz-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 0;
}
.quiz-progress {
  background: hsl(var(--muted));
  height: 8px;
  border-radius: 4px;
  margin-bottom: 2rem;
  overflow: hidden;
}
.quiz-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--accent)));
  border-radius: 4px;
  transition: width 0.3s;
}
.quiz-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 1.25rem;
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.quiz-question {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}
.quiz-options { display: flex; flex-direction: column; gap: 0.75rem; }
.quiz-option {
  padding: 1rem 1.25rem;
  border: 2px solid hsl(var(--border));
  border-radius: 0.75rem;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
  text-align: right;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
}
.quiz-option:hover { border-color: hsl(var(--primary)); background: hsl(var(--muted)); }
.quiz-option.correct { border-color: #16a34a; background: #dcfce7; color: #166534; }
.quiz-option.wrong { border-color: #dc2626; background: #fee2e2; color: #991b1b; }
.quiz-option.selected { border-color: hsl(var(--primary)); background: hsl(var(--primary)); color: white; }

/* ===========================
   LOADING / SPINNER
   =========================== */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid hsl(var(--border));
  border-top-color: hsl(var(--primary));
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ===========================
   PAGINATION
   =========================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 2rem;
}
.page-btn {
  width: 38px;
  height: 38px;
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-btn:hover, .page-btn.active {
  background: hsl(var(--primary));
  color: white;
  border-color: hsl(var(--primary));
}

/* ===========================
   GRADE / TOPIC PAGES
   =========================== */
.page-hero {
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(221 70% 18%));
  color: white;
  padding: 2.5rem 0;
  margin-bottom: 2rem;
}
.page-hero-title { font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; }
.page-hero-desc { opacity: 0.8; font-size: 0.95rem; }

/* ===========================
   TRACK SELECTOR (Platform Choice)
   =========================== */
.track-selector {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(221 70% 18%) 100%);
  padding: 2rem;
}
.track-selector-inner { text-align: center; color: white; max-width: 700px; }
.track-selector-title { font-size: clamp(1.75rem, 4vw, 3rem); font-weight: 800; margin-bottom: 0.75rem; }
.track-selector-sub { font-size: 1rem; opacity: 0.8; margin-bottom: 2.5rem; }
.track-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.track-card {
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 1.5rem;
  padding: 2.5rem 1.5rem;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
  color: white;
  display: block;
}
.track-card:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.5);
  transform: translateY(-4px);
  color: white;
}
.track-card-icon { font-size: 3rem; margin-bottom: 1rem; display: block; }
.track-card-name { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.5rem; }
.track-card-desc { font-size: 0.875rem; opacity: 0.75; }
@media (max-width: 500px) {
  .track-cards { grid-template-columns: 1fr; }
}

/* ===========================
   FAVORITES / MESSAGES
   =========================== */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: hsl(var(--muted-foreground));
}
.empty-state-icon { font-size: 4rem; margin-bottom: 1rem; opacity: 0.4; }
.empty-state-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.empty-state-desc { font-size: 0.9rem; }
.messages-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1rem;
  height: 70vh;
}
.conversations-list {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  overflow-y: auto;
}
.conversation-item {
  padding: 1rem;
  border-bottom: 1px solid hsl(var(--border));
  cursor: pointer;
  transition: background 0.15s;
}
.conversation-item:hover, .conversation-item.active { background: hsl(var(--muted)); }
.message-area {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
}
.message-bubble {
  max-width: 75%;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  font-size: 0.9rem;
  margin: 0.25rem 0;
}
.message-bubble.sent {
  background: hsl(var(--primary));
  color: white;
  margin-right: auto;
  border-bottom-right-radius: 0.2rem;
}
.message-bubble.received {
  background: hsl(var(--muted));
  margin-left: auto;
  border-bottom-left-radius: 0.2rem;
}

/* ===========================
   SHARE BUTTONS
   =========================== */
.share-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.share-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
  color: white;
}
.share-btn:hover { opacity: 0.85; }
.share-fb { background: #1877f2; }
.share-wa { background: #25d366; }
.share-tw { background: #1da1f2; }
.share-tg { background: #0088cc; }
.share-copy { background: hsl(var(--muted)); color: hsl(var(--foreground)); }

/* ===========================
   RESPONSIVE FIXES
   =========================== */
@media (max-width: 640px) {
  .memos-grid { grid-template-columns: 1fr; }
  .articles-grid { grid-template-columns: 1fr; }
  .subjects-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-stats { gap: 1.25rem; }
  .messages-layout { grid-template-columns: 1fr; height: auto; }
  .track-selector-inner { padding: 1rem; }
}

/* ===========================
   WORDPRESS EDITOR COMPATIBILITY
   =========================== */
.wp-block-image img { border-radius: 0.5rem; }
.wp-block-quote {
  border-right: 4px solid hsl(var(--accent));
  padding-right: 1.5rem;
  color: hsl(var(--muted-foreground));
  font-style: italic;
}
.entry-content h2, .entry-content h3, .entry-content h4 {
  font-weight: 800;
  color: hsl(var(--foreground));
  margin: 1.5rem 0 0.75rem;
}
.entry-content p { margin-bottom: 1rem; line-height: 1.8; }
.entry-content ul, .entry-content ol {
  padding-right: 1.5rem;
  margin-bottom: 1rem;
}
.entry-content li { margin-bottom: 0.35rem; }

/* ===========================
   PRINT
   =========================== */
@media print {
  .site-header, .site-footer, .memo-sidebar-card { display: none; }
  .memo-content-grid { grid-template-columns: 1fr; }
}

/* ===========================
   NAV DROPDOWN HOVER (CSS)
   =========================== */
.nav-has-dropdown:hover .dd-menu { display: block !important; }
.nav-has-dropdown .dd-menu { position: absolute; }
.nav-item-link:hover {
  background: hsl(var(--muted)) !important;
  color: hsl(var(--foreground)) !important;
}