/* 
   Dakour V2 - SUPER Premium Design (The "Living" Edition)
   Focus: Immersion, Depth, Fluidity
*/

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600&family=Outfit:wght@400;700;900&family=Fraunces:opsz,wght@9..144,400;9..144,600&display=swap');

:root {
  /* Ultra-Modern Palette */
  --primary: #0f172a;
  --primary-light: #1e293b;
  --accent: #00dc82;
  /* Vue-like Green */
  --accent-glow: #00dc8280;
  --accent-gradient: linear-gradient(135deg, #00dc82 0%, #36e4da 50%, #0047e1 100%);
  --surface: #ffffff;
  --bg-main: #f8fafc;
  --text-main: #0f172a;
  --text-muted: #64748b;

  /* Deep Glass */
  --glass: rgba(255, 255, 255, 0.7);
  --glass-high: rgba(255, 255, 255, 0.9);
  --glass-border: 1px solid rgba(255, 255, 255, 0.6);
  --blur: blur(20px) saturate(180%);

  /* Elevation */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
  --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  --shadow-glow: 0 0 20px var(--accent-glow);

  /* Shape */
  --radius-md: 0.75rem;
  --radius-lg: 1.25rem;
  --radius-xl: 2rem;

  /* Layout */
  --container-width: 1400px;
}

/* Base Reset & Typography */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(at 0% 0%, rgba(0, 220, 130, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(0, 71, 225, 0.05) 0px, transparent 50%);
  background-attachment: fixed;
  position: relative;
}

/* Tactile Grain Texture Layer */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3%3Cfilter id='noiseFilter'%3%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3%3C/filter%3%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3%3C/svg%3");
  opacity: 0.04;
  pointer-events: none;
  z-index: 9999;
}

h1,
h2,
h3,
h4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--primary);
  line-height: 1.1;
}

/* Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.grid {
  display: grid;
  gap: 2.5rem;
}

.grid-cols-3 {
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
}

.flex {
  display: flex;
}

.justify-between {
  justify-content: space-between;
}

.items-center {
  align-items: center;
}

.gap-4 {
  gap: 1rem;
}

.mt-4 {
  margin-top: 1.5rem;
}

.mb-8 {
  margin-bottom: 3rem;
}

.hidden {
  display: none;
}

@media(min-width: 768px) {
  .hidden.md\:flex {
    display: flex;
  }
}

/* UI Components */

/* Ultra-Premium Glass Header 3.0 */
.site-header {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 3rem);
  max-width: 1200px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px) saturate(200%);
  -webkit-backdrop-filter: blur(16px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2rem;
  padding: 0.75rem 2.5rem;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-header:hover {
  background: rgba(255, 255, 255, 0.8);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transform: translateX(-50%) translateY(-3px);
}

.logo {
  position: relative;
  letter-spacing: -0.05em;
  font-weight: 900;
  transition: all 0.3s;
}

.logo:hover {
  letter-spacing: -0.02em;
}

/* Interactive Navigation Links */
.nav-link {
  position: relative;
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.95rem;
  padding: 0.6rem 1.2rem;
  border-radius: 99px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent), #36e4da);
  opacity: 0;
  border-radius: 99px;
  transition: opacity 0.3s;
  z-index: -1;
}

.nav-link:hover {
  color: white;
  transform: translateY(-2px);
}

.nav-link:hover::before {
  opacity: 1;
}

/* Buttons with Glow */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 2rem;
  border-radius: 99px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  letter-spacing: -0.01em;
}

.btn-primary {
  background: var(--text-main);
  color: white;
  position: relative;
  overflow: hidden;
  will-change: transform;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.5);
}

/* Magnetic effect (lightweight, GPU-accelerated) */
@media (hover: hover) and (pointer: fine) {
  .btn-primary {
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-100%);
  transition: 0.5s;
}

.btn-primary:hover::after {
  transform: translateX(100%);
}

/* Modern Cards */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(255, 255, 255, 0.5);
  /* Subtle border */
  display: flex;
  flex-direction: column;
  position: relative;
  height: 100%;
}

.card a,
.card a:visited,
.card a:focus,
.card a:hover,
.card a:active {
  color: inherit;
  text-decoration: none;
}

.card h3 a {
  color: inherit;
  text-decoration: none;
}

.card:hover {
  transform: translateY(-10px) scale(1.01);
  box-shadow: var(--shadow-lg);
  z-index: 10;
}

/* 3D Card Tilt Effect */
.card {
  transform-style: preserve-3d;
  perspective: 1000px;
}

.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  border-radius: var(--radius-lg);
}

.card:hover::after {
  opacity: 1;
}

.card-image-wrapper {
  overflow: hidden;
  height: 280px;
  /* Taller images */
  position: relative;
}

.swimlane .card-image-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.45) 0%, rgba(15, 23, 42, 0.05) 60%, transparent 100%);
  pointer-events: none;
}

.card-image {
  height: 100%;
  width: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card:hover .card-image {
  transform: scale(1.1);
}

.card-content {
  padding: 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  /* Standard property */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 0.5rem 1.2rem;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  z-index: 20;
}

/* Immersive Hero */
.hero {
  position: relative;
  min-height: 85vh;
  /* Taller hero */
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  overflow: hidden;
  margin-bottom: 5rem;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('https://cdn.dakour.net/2020/03/dakour_reunion.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.6;
  transform: scale(1);
  animation: slowZoom 20s infinite alternate;
}

@keyframes slowZoom {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.1);
  }
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  color: white;
  max-width: 900px;
  padding: 2rem;
}

.hero-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: #ffffff !important;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  font-weight: 600;
  font-optical-sizing: auto;
}

.hero-subtitle {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  opacity: 0.95;
  margin-bottom: 3rem;
  font-weight: 500;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  letter-spacing: 0.01em;
}

.section-title {
  font-size: 3rem;
  margin-bottom: 4rem;
  text-align: center;
}

.section-title span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Ambient Glow Effects */
.ambient-glow {
  position: relative;
}

.ambient-glow::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 220, 130, 0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

/* Bento Grid Layout */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.bento-large {
  grid-column: span 2;
  grid-row: span 2;
}

.bento-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-height: 280px;
}

.bento-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.55) 0%, rgba(15, 23, 42, 0.1) 60%, transparent 100%);
  pointer-events: none;
}

.bento-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.bento-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.bento-card:hover img {
  transform: scale(1.1);
}

.bento-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
  color: white;
}

.bento-overlay h3,
.bento-overlay h4,
.bento-overlay p,
.bento-overlay span {
  color: #ffffff;
  text-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
}

.bento-overlay p {
  opacity: 0.9;
}

.bento-large .bento-overlay {
  padding: 3rem;
}

/* Scroll Reveal Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

.reveal-delay-1 {
  animation-delay: 0.1s;
}

.reveal-delay-2 {
  animation-delay: 0.2s;
}

.reveal-delay-3 {
  animation-delay: 0.3s;
}

/* Detail Page */
.prose {
  font-size: 1.1rem;
  color: var(--text-main);
}

.sidebar-sticky {
  position: sticky;
  top: 100px;
}

.info-list li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.info-list i {
  font-size: 1.4rem;
  color: var(--accent);
}

/* UX POWER FEATURES */

/* Smart Filter Pills */
.filter-container {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
}

.filter-pill {
  padding: 0.6rem 1.5rem;
  border-radius: 99px;
  background: white;
  border: 2px solid #e2e8f0;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.filter-pill:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.filter-pill.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* Favorites Button */
.fav-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  transition: all 0.2s;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.fav-btn:hover {
  transform: scale(1.1);
  background: white;
}

.fav-btn.active {
  color: #ef4444;
}

.fav-btn i {
  transition: all 0.2s;
}

#fav-counter {
  position: fixed;
  top: 1.5rem;
  right: 2rem;
  background: var(--accent);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  z-index: 101;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Swimlanes */
.swimlane {
  position: relative;
  margin-bottom: 3rem;
}

.swimlane-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--primary);
}

.swimlane-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 1rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.swimlane-track::-webkit-scrollbar {
  display: none;
}

.swimlane-track .card {
  min-width: 320px;
  flex-shrink: 0;
}

.swimlane-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
  opacity: 0;
}

.swimlane-nav:hover {
  background: white;
  transform: translateY(-50%) scale(1.1);
}

.swimlane-nav.prev {
  left: -24px;
}

.swimlane-nav.next {
  right: -24px;
}

/* Reading Progress */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
  width: 0%;
  z-index: 1000;
  transition: width 0.1s;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Ultra-Premium Architectural Footer 3.0 */
footer {
  background: linear-gradient(to bottom, #0a0e17 0%, #050810 100%);
  color: #8b96a8;
  padding: 8rem 0 4rem;
  margin-top: 8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 220, 130, 0.3), transparent);
}

footer h4 {
  color: #ffffff !important;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.9;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: inherit;
  padding: 0.5rem 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.footer-links a::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s;
}

.footer-links a:hover {
  color: #ffffff;
  padding-left: 0.5rem;
}

.footer-links a:hover::before {
  width: 100%;
}

.footer-links a i {
  font-size: 0.75rem;
  opacity: 0.5;
  transition: opacity 0.3s;
}

.footer-links a:hover i {
  opacity: 1;
  color: var(--accent);
}

.footer-bottom {
  margin-top: 6rem;
  padding-top: 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  opacity: 0.6;
}

.footer-bottom a {
  color: inherit;
  transition: all 0.2s;
}

.footer-bottom a:hover {
  color: var(--accent);
  opacity: 1;
}

/* Detail Page Layout Fixes */
.page-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}

@media(min-width: 1024px) {
  .detail-grid {
    grid-template-columns: 2fr 1fr;
  }
}

/* 
   Dakour V2 - SUPER Premium Design (The "Living" Edition)
   Focus: Immersion, Depth, Fluidity
*/

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600&family=Outfit:wght@400;700;900&family=Fraunces:opsz,wght@9..144,400;9..144,600&display=swap');

:root {
  /* Ultra-Modern Palette */
  --primary: #0f172a;
  --primary-light: #1e293b;
  --accent: #00dc82;
  /* Vue-like Green */
  --accent-glow: #00dc8280;
  --accent-gradient: linear-gradient(135deg, #00dc82 0%, #36e4da 50%, #0047e1 100%);
  --surface: #ffffff;
  --bg-main: #f8fafc;
  --text-main: #0f172a;
  --text-muted: #64748b;

  /* Deep Glass */
  --glass: rgba(255, 255, 255, 0.7);
  --glass-high: rgba(255, 255, 255, 0.9);
  --glass-border: 1px solid rgba(255, 255, 255, 0.6);
  --blur: blur(20px) saturate(180%);

  /* Elevation */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
  --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  --shadow-glow: 0 0 20px var(--accent-glow);

  /* Shape */
  --radius-md: 0.75rem;
  --radius-lg: 1.25rem;
  --radius-xl: 2rem;

  /* Layout */
  --container-width: 1400px;
}

/* Base Reset & Typography */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(at 0% 0%, rgba(0, 220, 130, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(0, 71, 225, 0.05) 0px, transparent 50%);
  background-attachment: fixed;
  position: relative;
}

/* Tactile Grain Texture Layer */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3%3Cfilter id='noiseFilter'%3%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3%3C/filter%3%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3%3C/svg%3");
  opacity: 0.04;
  pointer-events: none;
  z-index: 9999;
}

h1,
h2,
h3,
h4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--primary);
  line-height: 1.1;
}

/* Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.grid {
  display: grid;
  gap: 2.5rem;
}

.grid-cols-3 {
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
}

.flex {
  display: flex;
}

.justify-between {
  justify-content: space-between;
}

.items-center {
  align-items: center;
}

.gap-4 {
  gap: 1rem;
}

.mt-4 {
  margin-top: 1.5rem;
}

.mb-8 {
  margin-bottom: 3rem;
}

.hidden {
  display: none;
}

@media(min-width: 768px) {
  .hidden.md\:flex {
    display: flex;
  }
}

/* UI Components */

/* Ultra-Premium Glass Header 3.0 */
.site-header {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 3rem);
  max-width: 1200px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px) saturate(200%);
  -webkit-backdrop-filter: blur(16px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2rem;
  padding: 0.75rem 2.5rem;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-header:hover {
  background: rgba(255, 255, 255, 0.8);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transform: translateX(-50%) translateY(-3px);
}

.logo {
  position: relative;
  letter-spacing: -0.05em;
  font-weight: 900;
  transition: all 0.3s;
}

.logo:hover {
  letter-spacing: -0.02em;
}

/* Interactive Navigation Links */
.nav-link {
  position: relative;
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.95rem;
  padding: 0.6rem 1.2rem;
  border-radius: 99px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent), #36e4da);
  opacity: 0;
  border-radius: 99px;
  transition: opacity 0.3s;
  z-index: -1;
}

.nav-link:hover {
  color: white;
  transform: translateY(-2px);
}

.nav-link:hover::before {
  opacity: 1;
}

/* Buttons with Glow */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 2rem;
  border-radius: 99px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  letter-spacing: -0.01em;
}

.btn-primary {
  background: var(--text-main);
  color: white;
  position: relative;
  overflow: hidden;
  will-change: transform;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.5);
}

/* Magnetic effect (lightweight, GPU-accelerated) */
@media (hover: hover) and (pointer: fine) {
  .btn-primary {
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-100%);
  transition: 0.5s;
}

.btn-primary:hover::after {
  transform: translateX(100%);
}

/* Modern Cards */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(255, 255, 255, 0.5);
  /* Subtle border */
  display: flex;
  flex-direction: column;
  position: relative;
  height: 100%;
}

.card a,
.card a:visited,
.card a:focus,
.card a:hover,
.card a:active {
  color: inherit;
  text-decoration: none;
}

.card h3 a {
  color: inherit;
  text-decoration: none;
}

.card:hover {
  transform: translateY(-10px) scale(1.01);
  box-shadow: var(--shadow-lg);
  z-index: 10;
}

/* 3D Card Tilt Effect */
.card {
  transform-style: preserve-3d;
  perspective: 1000px;
}

.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  border-radius: var(--radius-lg);
}

.card:hover::after {
  opacity: 1;
}

.card-image-wrapper {
  overflow: hidden;
  height: 280px;
  /* Taller images */
  position: relative;
}

.swimlane .card-image-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.45) 0%, rgba(15, 23, 42, 0.05) 60%, transparent 100%);
  pointer-events: none;
}

.card-image {
  height: 100%;
  width: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card:hover .card-image {
  transform: scale(1.1);
}

.card-content {
  padding: 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  /* Standard property */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 0.5rem 1.2rem;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  z-index: 20;
}

/* Immersive Hero */
.hero {
  position: relative;
  min-height: 85vh;
  /* Taller hero */
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  overflow: hidden;
  margin-bottom: 5rem;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('https://cdn.dakour.net/2020/03/dakour_reunion.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.6;
  transform: scale(1);
  animation: slowZoom 20s infinite alternate;
}

@keyframes slowZoom {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.1);
  }
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  color: white;
  max-width: 900px;
  padding: 2rem;
}

.hero-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: #ffffff !important;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  font-weight: 600;
  font-optical-sizing: auto;
}

.hero-subtitle {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  opacity: 0.95;
  margin-bottom: 3rem;
  font-weight: 500;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  letter-spacing: 0.01em;
}

.section-title {
  font-size: 3rem;
  margin-bottom: 4rem;
  text-align: center;
}

.section-title span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Ambient Glow Effects */
.ambient-glow {
  position: relative;
}

.ambient-glow::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 220, 130, 0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

/* Bento Grid Layout */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.bento-large {
  grid-column: span 2;
  grid-row: span 2;
}

.bento-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-height: 280px;
}

.bento-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.55) 0%, rgba(15, 23, 42, 0.1) 60%, transparent 100%);
  pointer-events: none;
}

.bento-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.bento-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.bento-card:hover img {
  transform: scale(1.1);
}

.bento-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
  color: white;
}

.bento-overlay h3,
.bento-overlay h4,
.bento-overlay p,
.bento-overlay span {
  color: #ffffff;
  text-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
}

.bento-overlay p {
  opacity: 0.9;
}

.bento-large .bento-overlay {
  padding: 3rem;
}

/* Scroll Reveal Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

.reveal-delay-1 {
  animation-delay: 0.1s;
}

.reveal-delay-2 {
  animation-delay: 0.2s;
}

.reveal-delay-3 {
  animation-delay: 0.3s;
}

/* Detail Page */
.prose {
  font-size: 1.1rem;
  color: var(--text-main);
}

.sidebar-sticky {
  position: sticky;
  top: 100px;
}

.info-list li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.info-list i {
  font-size: 1.4rem;
  color: var(--accent);
}

/* UX POWER FEATURES */

/* Smart Filter Pills */
.filter-container {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
}

.filter-pill {
  padding: 0.6rem 1.5rem;
  border-radius: 99px;
  background: white;
  border: 2px solid #e2e8f0;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.filter-pill:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.filter-pill.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* Favorites Button */
.fav-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  transition: all 0.2s;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.fav-btn:hover {
  transform: scale(1.1);
  background: white;
}

.fav-btn.active {
  color: #ef4444;
}

.fav-btn i {
  transition: all 0.2s;
}

#fav-counter {
  position: fixed;
  top: 1.5rem;
  right: 2rem;
  background: var(--accent);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  z-index: 101;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Swimlanes */
.swimlane {
  position: relative;
  margin-bottom: 3rem;
}

.swimlane-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--primary);
}

.swimlane-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 1rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.swimlane-track::-webkit-scrollbar {
  display: none;
}

.swimlane-track .card {
  min-width: 320px;
  flex-shrink: 0;
}

.swimlane-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
  opacity: 0;
}

.swimlane-nav:hover {
  background: white;
  transform: translateY(-50%) scale(1.1);
}

.swimlane-nav.prev {
  left: -24px;
}

.swimlane-nav.next {
  right: -24px;
}

/* Reading Progress */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
  width: 0%;
  z-index: 1000;
  transition: width 0.1s;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Ultra-Premium Architectural Footer 3.0 */
footer {
  background: linear-gradient(to bottom, #0a0e17 0%, #050810 100%);
  color: #8b96a8;
  padding: 8rem 0 4rem;
  margin-top: 8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 220, 130, 0.3), transparent);
}

footer h4 {
  color: #ffffff !important;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.9;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: inherit;
  padding: 0.5rem 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.footer-links a::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s;
}

.footer-links a:hover {
  color: #ffffff;
  padding-left: 0.5rem;
}

.footer-links a:hover::before {
  width: 100%;
}

.footer-links a i {
  font-size: 0.75rem;
  opacity: 0.5;
  transition: opacity 0.3s;
}

.footer-links a:hover i {
  opacity: 1;
  color: var(--accent);
}

.footer-bottom {
  margin-top: 6rem;
  padding-top: 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  opacity: 0.6;
}

.footer-bottom a {
  color: inherit;
  transition: all 0.2s;
}

.footer-bottom a:hover {
  color: var(--accent);
  opacity: 1;
}

/* Detail Page Layout Fixes */
.page-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}

@media(min-width: 1024px) {
  .detail-grid {
    grid-template-columns: 2fr 1fr;
  }
}

/* ===== MAGIC ENGINE ADVANCED UX ===== */
.magic-loading-wrap {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--primary);
}

.magic-sphere {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 2rem;
}

.sphere-core {
  position: absolute;
  inset: 20px;
  background: var(--accent-gradient);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

.sphere-orbit {
  position: absolute;
  inset: 0;
  border: 2px dashed var(--accent);
  border-radius: 50%;
  animation: rotate 3s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0);
  }

  to {
    transform: rotate(360deg);
  }
}

.magic-entry-anim {
  animation: slideUp 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.magic-master-card.premium {
  position: relative;
  border: 1px solid rgba(0, 220, 130, 0.2);
  transition: all 0.3s ease;
  overflow: hidden;
  border-radius: 1.5rem;
}

.card-glow {
  position: absolute;
  inset: 0;
  box-shadow: 0 0 40px var(--accent-glow);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.magic-master-card.premium:hover .card-glow {
  opacity: 1;
}

.magic-persisted-banner {
  background: white;
  margin-top: -3rem !important;
  position: relative;
  z-index: 10;
  border-radius: 3rem 3rem 0 0;
  box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.05);
}

.magic-grid-v3 {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  margin-top: 2rem;
}

.pick-link {
  text-decoration: none;
  display: block;
}

.pick-img-wrap {
  position: relative;
  height: 500px;
  border-radius: 2rem;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
}

.pick-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0, 0.2, 1);
}

.pick-link:hover img {
  transform: scale(1.05);
}

.pick-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.2) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 3rem;
  color: white;
}

.magic-sub-picks {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sub-pick-card {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  text-decoration: none;
  color: inherit;
  background: var(--bg-main);
  padding: 1.2rem;
  border-radius: 1.5rem;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.sub-pick-card:hover {
  transform: translateX(10px);
  background: white;
  box-shadow: var(--shadow-md);
  border-color: var(--accent-glow);
}

.sub-pick-card img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 1rem;
}

.magic-header-mini {
  text-align: center;
  margin-bottom: 3rem;
}

.magic-label {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--accent-glow);
  color: var(--accent);
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

@media (max-width: 1024px) {
  .magic-grid-v3 {
    grid-template-columns: 1fr;
  }

  .pick-img-wrap {
    height: 400px;
  }
}