/* Egyptian Creativity Blog Details - Enhanced Image Gallery */

/* CSS Variables */
:root {
  --royal-dark-blue: #052077;
  --rich-blue: #2b2b90;
  --medium-blue-violet: #3535ab;
  --royal-orange: #e06427;
  --soft-yellow: #e5bbcb;
  --soft-gold: #cb8a58;
  --beige-gold: #dfbe8c;
  --dark-golden-brown: #ba8249;
  
  /* Additional Egyptian colors */
  --pyramid-gold: #FFD700;
  --desert-sand: #F4E4BC;
  --papyrus: #F7F3E3;
  --ancient-bronze: #CD7F32;
  
  /* Text colors */
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-light: #ffffff;
  --text-gold: var(--soft-gold);
  
  /* Shadows and effects */
  --shadow-primary: 0 10px 30px rgba(5, 32, 119, 0.3);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.1);
  --shadow-gold: 0 0 30px rgba(203, 138, 88, 0.5);
  
  /* Typography */
  --font-primary: 'Cinzel', serif;
  --font-secondary: 'Cormorant Garamond', serif;
  
  /* Transitions */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-secondary);
  line-height: 1.6;
  color: var(--text-primary);
  background: #f8f9fa;
}

/* ANIMATED BACKGROUND (Same as Index Page) */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(135deg, var(--rich-blue) 0%, var(--medium-blue-violet) 50%, var(--royal-dark-blue) 100%);
}

.pyramid-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  background: linear-gradient(45deg, transparent 50%, rgba(212, 175, 55, 0.05) 50%);
  animation: pyramidRotate 20s linear infinite;
}

@keyframes pyramidRotate {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.sand-particles {
  position: absolute;
  width: 100%;
  height: 100%;
}

.sand-particles::before,
.sand-particles::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--pyramid-gold);
  border-radius: 50%;
  animation: sandFloat 15s linear infinite;
}

.sand-particles::before {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.sand-particles::after {
  top: 60%;
  right: 15%;
  animation-delay: 5s;
}

@keyframes sandFloat {
  0%, 100% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10%, 90% {
    opacity: 1;
  }
  50% {
    transform: translateY(-100px) translateX(50px);
  }
}

.hieroglyph-symbols {
  position: absolute;
  width: 100%;
  height: 100%;
}

.symbol {
  position: absolute;
  font-size: 2rem;
  color: rgba(212, 175, 55, 0.1);
  animation: symbolFloat 20s ease-in-out infinite;
}

.symbol:nth-child(1) { top: 10%; left: 5%; animation-delay: 0s; }
.symbol:nth-child(2) { top: 20%; right: 10%; animation-delay: 3s; }
.symbol:nth-child(3) { bottom: 30%; left: 15%; animation-delay: 6s; }
.symbol:nth-child(4) { bottom: 20%; right: 20%; animation-delay: 9s; }
.symbol:nth-child(5) { top: 50%; left: 8%; animation-delay: 12s; }
.symbol:nth-child(6) { top: 70%; right: 5%; animation-delay: 15s; }

@keyframes symbolFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.1;
  }
  50% {
    transform: translateY(-20px) rotate(10deg);
    opacity: 0.3;
  }
}

.golden-rays {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: conic-gradient(from 0deg, transparent, rgba(212, 175, 55, 0.1), transparent, rgba(212, 175, 55, 0.05), transparent);
  animation: raysRotate 30s linear infinite;
}

@keyframes raysRotate {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.floating-artifacts {
  position: absolute;
  width: 100%;
  height: 100%;
}

.artifact {
  position: absolute;
  font-size: 3rem;
  color: rgba(212, 175, 55, 0.2);
  animation: artifactFloat 15s ease-in-out infinite;
}

.artifact-1 { top: 10%; left: 10%; animation-delay: 0s; }
.artifact-2 { top: 20%; right: 15%; animation-delay: 4s; }
.artifact-3 { bottom: 30%; left: 20%; animation-delay: 8s; }
.artifact-4 { bottom: 20%; right: 10%; animation-delay: 12s; }

@keyframes artifactFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.2;
  }
  50% {
    transform: translateY(-30px) rotate(180deg);
    opacity: 0.4;
  }
}

/* Main Layout */
.blog-details-main {
  min-height: 100vh;
  padding: 140px 0 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.container {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

/* Blog Article Card */
.blog-article-card {
  background: #ffffff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
  position: relative;
  animation: slideInUp 0.8s ease-out;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.blog-article-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Blog Header */
.blog-article-header {
  padding: 40px 50px 30px;
  background: #ffffff;
}

.blog-meta-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.blog-category-badge {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: #1a1a1a;
  padding: 8px 20px;
  border-radius: 20px;
  font-family: var(--font-secondary);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
  transition: var(--transition-smooth);
}

.blog-category-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 215, 0, 0.4);
}

.blog-date-display {
  color: #666;
  font-family: var(--font-secondary);
  font-size: 14px;
  font-weight: 500;
  position: relative;
  padding-left: 24px;
}

.blog-date-display::before {
  content: "📅";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
}

.blog-main-title {
  font-family: var(--font-primary);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--royal-dark-blue);
  margin: 0;
  text-shadow: 0 2px 4px rgba(5, 32, 119, 0.1);
  position: relative;
}

.blog-main-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #FFD700, #FFA500);
  border-radius: 2px;
}

/* Enhanced Image Gallery */
.blog-image-gallery {
  background: #ffffff;
  padding: 0;
}

/* Main Image Container */
.main-image-container {
  position: relative;
  background: #000;
  overflow: hidden;
}

.main-image-wrapper {
  position: relative;
  width: 100%;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.main-image {
  width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: contain;
  object-position: center;
  filter: brightness(1.05) contrast(1.1);
  transition: var(--transition-smooth);
  cursor: pointer;
}

.main-image:hover {
  transform: scale(1.02);
}

.image-overlay {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}

.image-action-btn {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: none;
  padding: 12px;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition-smooth);
  color: var(--royal-dark-blue);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.image-action-btn:hover {
  background: white;
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.image-counter {
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  backdrop-filter: blur(10px);
}

.blog-brand-overlay {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  display: none; /* Hide the brand overlay */
}

.brand-logo-overlay {
  height: 40px;
  width: auto;
  object-fit: contain;
}

/* Thumbnail Gallery */
.thumbnail-gallery {
  padding: 20px;
  background: #f8f9fa;
}

.thumbnail-scroll-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
}

.thumbnail-nav {
  background: white;
  border: 2px solid #e5e5e5;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  color: var(--royal-dark-blue);
  flex-shrink: 0;
}

.thumbnail-nav:hover {
  background: var(--royal-dark-blue);
  border-color: var(--royal-dark-blue);
  color: white;
  transform: scale(1.1);
}

.thumbnail-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.thumbnail-container {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 8px 0;
  flex: 1;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.thumbnail-container::-webkit-scrollbar {
  display: none;
}

.thumbnail-item {
  position: relative;
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 3px solid transparent;
  background: white;
}

.thumbnail-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.thumbnail-item.active {
  border-color: var(--pyramid-gold);
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

.thumbnail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: var(--transition-smooth);
}

.thumbnail-item:hover .thumbnail-image {
  transform: scale(1.1);
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
}

.lightbox-modal.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
}

.lightbox-container {
  position: relative;
  width: 90%;
  height: 90%;
  max-width: 1200px;
  max-height: 800px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  padding: 12px;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition-smooth);
  z-index: 10001;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  padding: 16px;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition-smooth);
  z-index: 10001;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev {
  left: -70px;
}

.lightbox-nav.next {
  right: -70px;
}

.lightbox-image-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.lightbox-info {
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  text-align: center;
}

.lightbox-counter {
  background: rgba(0, 0, 0, 0.5);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  backdrop-filter: blur(10px);
}

/* Blog Content */
.blog-content-section {
  padding: 50px;
  background: #ffffff;
}

.blog-excerpt {
  font-family: var(--font-secondary);
  font-size: 18px;
  line-height: 1.7;
  color: #555;
  margin-bottom: 40px;
  font-style: italic;
  padding: 30px;
  background: #f8f9fa;
  border-radius: 16px;
  border-left: 4px solid #FFD700;
  position: relative;
}

.blog-excerpt::before {
  content: '"';
  position: absolute;
  top: 10px;
  left: 15px;
  font-size: 48px;
  color: #FFD700;
  font-family: var(--font-primary);
  opacity: 0.3;
}

.blog-full-content {
  font-family: var(--font-secondary);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-primary);
}

.blog-full-content p {
  margin-bottom: 24px;
}

.blog-full-content h2,
.blog-full-content h3 {
  font-family: var(--font-primary);
  color: var(--royal-dark-blue);
  margin: 32px 0 16px;
}

.blog-full-content ul,
.blog-full-content ol {
  margin: 20px 0;
  padding-left: 24px;
}

.blog-full-content li {
  margin-bottom: 8px;
}

/* Blog Actions Footer */
.blog-actions-footer {
  display: flex;
  gap: 20px;
  padding: 40px 50px;
  background: #ffffff;
  border-top: 1px solid #f0f0f0;
}

.btn-back-to-blog,
.btn-share-article {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 32px;
  border-radius: 12px;
  font-family: var(--font-secondary);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition-smooth);
  text-decoration: none;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn-back-to-blog {
  background: transparent;
  border: 2px solid var(--royal-dark-blue);
  color: var(--royal-dark-blue);
}

.btn-back-to-blog:hover {
  background: var(--royal-dark-blue);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(5, 32, 119, 0.3);
}

.btn-share-article {
  background: linear-gradient(135deg, #e06427 0%, #ff7043 100%);
  color: white;
  border: none;
}

.btn-share-article:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(224, 100, 39, 0.4);
  background: linear-gradient(135deg, #d55722 0%, #ff5722 100%);
}

.btn-back-to-blog::before,
.btn-share-article::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-back-to-blog:hover::before,
.btn-share-article:hover::before {
  left: 100%;
}

/* Blog Not Found */
.blog-not-found-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.blog-not-found {
  text-align: center;
  padding: 60px 40px;
  background: white;
  border-radius: 24px;
  box-shadow: var(--shadow-card);
  max-width: 500px;
}

.blog-not-found h2 {
  font-family: var(--font-primary);
  color: var(--royal-dark-blue);
  font-size: 2.5rem;
  margin-bottom: 20px;
  font-weight: 700;
}

.blog-not-found p {
  color: #666;
  font-size: 18px;
  margin-bottom: 32px;
  font-style: italic;
}

.blog-not-found .btn-back-to-blog {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: #1a1a1a;
  border: none;
  display: inline-flex;
}

.blog-not-found .btn-back-to-blog:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 215, 0, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
  .blog-details-main {
    padding: 120px 0 60px;
  }
  
  .container {
    padding: 0 15px;
  }
  
  .blog-article-header {
    padding: 30px 25px 20px;
  }
  
  .blog-content-section {
    padding: 35px 25px;
  }
  
  .blog-actions-footer {
    flex-direction: column;
    padding: 30px 25px;
    gap: 16px;
  }
  
  .blog-meta-info {
    justify-content: flex-start;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .main-image-wrapper {
    min-height: 350px;
  }
  
  .main-image {
    max-height: 400px;
  }
  
  .blog-excerpt {
    padding: 20px;
    font-size: 16px;
  }
  
  .blog-brand-overlay {
    bottom: 15px;
    right: 15px;
    padding: 8px;
  }
  
  .brand-logo-overlay {
    height: 32px;
  }
  
  .thumbnail-gallery {
    padding: 15px;
  }
  
  .thumbnail-item {
    width: 80px;
    height: 80px;
  }
  
  .thumbnail-nav {
    width: 40px;
    height: 40px;
  }
  
  .lightbox-nav {
    padding: 12px;
  }
  
  .lightbox-nav.prev {
    left: -50px;
  }
  
  .lightbox-nav.next {
    right: -50px;
  }
  
  .lightbox-container {
    width: 95%;
    height: 85%;
  }
}

@media (max-width: 480px) {
  .blog-details-main {
    padding: 100px 0 40px;
  }
  
  .container {
    padding: 0 10px;
  }
  
  .blog-article-header {
    padding: 25px 20px 15px;
  }
  
  .blog-content-section {
    padding: 25px 20px;
  }
  
  .blog-actions-footer {
    padding: 25px 20px;
  }
  
  .blog-main-title {
    font-size: 2rem;
  }
  
  .blog-main-title::after {
    width: 60px;
    height: 3px;
  }
  
  .main-image-wrapper {
    min-height: 300px;
  }
  
  .main-image {
    max-height: 350px;
  }
  
  .blog-excerpt {
    padding: 16px;
    font-size: 15px;
    margin-bottom: 30px;
  }
  
  .blog-category-badge {
    padding: 6px 16px;
    font-size: 11px;
  }
  
  .blog-date-display {
    font-size: 13px;
    padding-left: 20px;
  }
  
  .btn-back-to-blog,
  .btn-share-article {
    padding: 14px 24px;
    font-size: 13px;
  }
  
  .thumbnail-scroll-container {
    gap: 8px;
  }
  
  .thumbnail-item {
    width: 70px;
    height: 70px;
  }
  
  .thumbnail-nav {
    width: 36px;
    height: 36px;
  }
  
  .lightbox-nav.prev {
    left: 10px;
  }
  
  .lightbox-nav.next {
    right: 10px;
  }
  
  .lightbox-close {
    top: 10px;
    right: 10px;
  }
  
  .lightbox-info {
    bottom: 10px;
  }
}

/* Enhanced Animations */
.blog-article-card {
  animation: slideInUp 0.8s ease-out;
}

.blog-category-badge {
  animation: pulse 3s infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
  }
  50% {
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.5);
  }
}

/* Loading State */
.blog-article-card.loading {
  opacity: 0.7;
  pointer-events: none;
}

.blog-article-card.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 3px solid #FFD700;
  border-top: 3px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}