/* =============================================
   SINGLE POST PAGE STYLES
   Color Palette: Purple Gradient Theme
   Primary: #667eea | Secondary: #764ba2
   ============================================= */

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* =============================================
   HERO SECTION
   ============================================= */
.single-hero {
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.single-hero--no-image {
  min-height: 400px;
}

/* Hero Image */
.single-hero__image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.single-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.single-hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(102, 126, 234, 0.3) 0%,
    rgba(118, 75, 162, 0.7) 50%,
    rgba(26, 32, 44, 0.95) 100%
  );
}

/* Hero Gradient (No Image) */
.single-hero__gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  z-index: 1;
}

.single-hero__gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

/* Hero Content */
.single-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 60px 0;
}

.single-hero__container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Breadcrumb */
.single-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  animation: single-fadeInUp 0.5s ease-out;
}

.single-breadcrumb__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.single-breadcrumb__link:hover {
  color: #ffffff;
}

.single-breadcrumb__separator {
  color: rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
}

.single-breadcrumb__current {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

/* Hero Title */
.single-hero__title {
  margin: 0 0 32px 0;
  font-size: 3rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  letter-spacing: -1px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  animation: single-fadeInUp 0.5s ease-out 0.1s backwards;
}

/* Hero Meta */
.single-hero__meta {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  animation: single-fadeInUp 0.5s ease-out 0.2s backwards;
}

.single-meta__item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.9);
}

.single-meta__item svg {
  color: rgba(255, 255, 255, 0.7);
}

.single-meta__avatar {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.single-meta__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.single-meta__label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.single-meta__value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
}

.single-meta__divider {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
}

/* =============================================
   MAIN CONTENT
   ============================================= */
.single-main {
  background: linear-gradient(180deg, #f8f9fc 0%, #ffffff 100%);
  padding: 60px 0 80px;
}

.single-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Article */
.single-article {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 
    0 4px 6px rgba(102, 126, 234, 0.05),
    0 20px 60px rgba(102, 126, 234, 0.1);
  border: 1px solid rgba(102, 126, 234, 0.08);
  overflow: hidden;
  margin-top: -100px;
  position: relative;
  z-index: 10;
  animation: single-fadeInUp 0.6s ease-out 0.3s backwards;
}

/* Article Content */
.single-content {
  padding: 50px;
  font-size: 1.125rem;
  line-height: 1.9;
  color: #2d3748;
}

.single-content h1,
.single-content h2,
.single-content h3,
.single-content h4,
.single-content h5,
.single-content h6 {
  color: #1a202c;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 2em;
  margin-bottom: 0.75em;
}

.single-content h2 {
  font-size: 1.75rem;
  padding-bottom: 0.5em;
  border-bottom: 2px solid rgba(102, 126, 234, 0.1);
}

.single-content h3 {
  font-size: 1.4rem;
}

.single-content h4 {
  font-size: 1.2rem;
}

.single-content p {
  margin-bottom: 1.5em;
}

.single-content a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
}

.single-content a:hover {
  color: #764ba2;
  border-bottom-color: #764ba2;
}

.single-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 2em 0;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.single-content blockquote {
  margin: 2em 0;
  padding: 24px 30px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
  border-left: 4px solid #667eea;
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: #4a5568;
}

.single-content blockquote p:last-child {
  margin-bottom: 0;
}

.single-content ul,
.single-content ol {
  margin: 1.5em 0;
  padding-left: 1.5em;
}

.single-content li {
  margin-bottom: 0.75em;
}

.single-content code {
  background: rgba(102, 126, 234, 0.1);
  color: #764ba2;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'Fira Code', 'Consolas', monospace;
}

.single-content pre {
  background: #1a202c;
  color: #e2e8f0;
  padding: 24px;
  border-radius: 12px;
  overflow-x: auto;
  margin: 2em 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.single-content pre code {
  background: none;
  color: inherit;
  padding: 0;
}

.single-content hr {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.3), transparent);
  margin: 3em 0;
}

.single-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: 0.95rem;
}

.single-content th,
.single-content td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.single-content th {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  font-weight: 600;
  color: #1a202c;
}

.single-content tr:hover td {
  background: rgba(102, 126, 234, 0.03);
}

/* =============================================
   ARTICLE FOOTER
   ============================================= */
.single-footer {
  padding: 40px 50px 50px;
  border-top: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #fafbfc 0%, #ffffff 100%);
}

/* Share Section */
.single-share {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid #e2e8f0;
}

.single-share__label {
  font-size: 1rem;
  font-weight: 600;
  color: #4a5568;
}

.single-share__buttons {
  display: flex;
  gap: 12px;
}

.single-share__btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
}

.single-share__btn--twitter {
  background: #1da1f2;
  color: #ffffff;
}

.single-share__btn--twitter:hover {
  background: #0d8ecf;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(29, 161, 242, 0.4);
}

.single-share__btn--facebook {
  background: #1877f2;
  color: #ffffff;
}

.single-share__btn--facebook:hover {
  background: #0d65d9;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(24, 119, 242, 0.4);
}

.single-share__btn--linkedin {
  background: #0a66c2;
  color: #ffffff;
}

.single-share__btn--linkedin:hover {
  background: #0852a1;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(10, 102, 194, 0.4);
}

.single-share__btn--copy {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
}

.single-share__btn--copy:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.single-share__btn--copy.copied {
  background: #48bb78;
}

/* Author Box */
.single-author-box {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 30px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
  border-radius: 16px;
  margin-bottom: 40px;
}

.single-author-box__avatar {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 2rem;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.single-author-box__info {
  flex: 1;
}

.single-author-box__label {
  display: block;
  font-size: 0.8rem;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.single-author-box__name {
  margin: 0 0 8px 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a202c;
}

.single-author-box__bio {
  margin: 0;
  font-size: 0.95rem;
  color: #4a5568;
  line-height: 1.6;
}

/* Navigation */
.single-nav {
  display: flex;
  justify-content: center;
}

.single-nav__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.single-nav__btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
  gap: 14px;
}

.single-nav__btn svg {
  transition: transform 0.3s ease;
}

.single-nav__btn:hover svg {
  transform: translateX(-3px);
}

/* =============================================
   NOT FOUND STATE
   ============================================= */
.single-not-found {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 40px 20px;
}

.single-not-found__container {
  text-align: center;
  max-width: 500px;
  padding: 60px 50px;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  animation: single-fadeInUp 0.6s ease-out;
}

.single-not-found__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border-radius: 50%;
  margin-bottom: 30px;
  color: #667eea;
}

.single-not-found__title {
  margin: 0 0 16px 0;
  font-size: 2rem;
  font-weight: 700;
  color: #1a202c;
}

.single-not-found__text {
  margin: 0 0 32px 0;
  font-size: 1.1rem;
  color: #718096;
  line-height: 1.6;
}

.single-not-found__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.single-not-found__btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes single-fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */
@media (max-width: 768px) {
  .single-hero {
    min-height: 400px;
  }

  .single-hero--no-image {
    min-height: 350px;
  }

  .single-hero__content {
    padding: 40px 0;
  }

  .single-hero__title {
    font-size: 2rem;
    margin-bottom: 24px;
  }

  .single-hero__meta {
    gap: 16px;
  }

  .single-meta__divider {
    display: none;
  }

  .single-meta__item {
    width: 100%;
  }

  .single-main {
    padding: 40px 0 60px;
  }

  .single-container {
    padding: 0 16px;
  }

  .single-article {
    margin-top: -60px;
    border-radius: 16px;
  }

  .single-content {
    padding: 30px 24px;
    font-size: 1rem;
  }

  .single-content h2 {
    font-size: 1.5rem;
  }

  .single-content h3 {
    font-size: 1.25rem;
  }

  .single-footer {
    padding: 30px 24px;
  }

  .single-share {
    flex-direction: column;
    align-items: flex-start;
  }

  .single-author-box {
    flex-direction: column;
    text-align: center;
    padding: 24px;
  }

  .single-author-box__avatar {
    width: 70px;
    height: 70px;
    font-size: 1.75rem;
  }

  .single-nav__btn {
    width: 100%;
    justify-content: center;
  }

  .single-not-found__container {
    padding: 40px 30px;
    margin: 20px;
  }

  .single-not-found__icon {
    width: 120px;
    height: 120px;
  }

  .single-not-found__icon svg {
    width: 60px;
    height: 60px;
  }

  .single-not-found__title {
    font-size: 1.6rem;
  }
}

@media (max-width: 480px) {
  .single-hero {
    min-height: 350px;
  }

  .single-hero__title {
    font-size: 1.6rem;
  }

  .single-breadcrumb {
    font-size: 0.8rem;
  }

  .single-meta__avatar {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .single-content {
    padding: 24px 20px;
  }

  .single-content blockquote {
    padding: 20px;
  }

  .single-share__buttons {
    width: 100%;
    justify-content: space-between;
  }

  .single-share__btn {
    width: 48px;
    height: 48px;
  }

  .single-author-box__name {
    font-size: 1.1rem;
  }

  .single-nav__btn {
    padding: 14px 24px;
    font-size: 0.9rem;
  }
}

/* =============================================
   DARK MODE SUPPORT
   ============================================= */
@media (prefers-color-scheme: dark) {
  .single-main {
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
  }

  .single-article {
    background: #1e2746;
    border-color: rgba(102, 126, 234, 0.2);
  }

  .single-content {
    color: #cbd5e0;
  }

  .single-content h1,
  .single-content h2,
  .single-content h3,
  .single-content h4,
  .single-content h5,
  .single-content h6 {
    color: #f0f0f0;
  }

  .single-content h2 {
    border-bottom-color: rgba(102, 126, 234, 0.2);
  }

  .single-content blockquote {
    background: rgba(102, 126, 234, 0.1);
    color: #a0aec0;
  }

  .single-content code {
    background: rgba(102, 126, 234, 0.2);
  }

  .single-content th,
  .single-content td {
    border-bottom-color: #2d3748;
  }

  .single-content th {
    background: rgba(102, 126, 234, 0.15);
    color: #f0f0f0;
  }

  .single-footer {
    background: linear-gradient(180deg, #1a1a2e 0%, #1e2746 100%);
    border-top-color: #2d3748;
  }

  .single-share {
    border-bottom-color: #2d3748;
  }

  .single-share__label {
    color: #a0aec0;
  }

  .single-author-box {
    background: rgba(102, 126, 234, 0.1);
  }

  .single-author-box__name {
    color: #f0f0f0;
  }

  .single-author-box__bio {
    color: #a0aec0;
  }
}

/* =============================================
   PRINT STYLES
   ============================================= */
@media print {
  .single-hero__image,
  .single-hero__gradient,
  .single-breadcrumb,
  .single-share,
  .single-nav {
    display: none !important;
  }

  .single-hero {
    min-height: auto;
    background: none;
  }

  .single-hero__title {
    color: #000;
    text-shadow: none;
  }

  .single-article {
    box-shadow: none;
    border: none;
    margin-top: 0;
  }

  .single-content a {
    color: #000;
    text-decoration: underline;
  }
}