/* Dedicated Article Stylesheet for Anastasiia Mossur Travel Guides */

/* Article Page Container Width on Desktop */
.bio-wrapper.article-page-wrapper {
  max-width: 100%;
  margin: 0 auto;
  transition: max-width 0.3s ease;
}

@media (min-width: 768px) {
  .bio-wrapper.article-page-wrapper {
    max-width: 800px !important;
  }
}

@media (min-width: 1580px) {
  .bio-wrapper.article-page-wrapper {
    max-width: 900px !important;
  }
}

/* Navigation Header Bar on Articles */
.article-page-wrapper .nav-header {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  padding: 24px 24px 12px 24px;
  display: block;
  z-index: 10;
}

/* Zero Top Gap for Mobile & Desktop Article Hero Headers */
body.is-article-page {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

body.is-article-page .bio-wrapper.article-page-wrapper {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Article Hero Header */
.article-hero-header {
  position: relative !important;
  width: 100%;
  max-height: 440px;
  border-radius: 0 0 24px 24px !important;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  margin-top: 0 !important;
  padding-top: 0 !important;
  top: 0 !important;
  margin-bottom: 24px;
}

/* Floating Glass Overlay for Back Button over Hero Cover Image */
.hero-back-overlay {
  position: absolute !important;
  top: 20px !important;
  left: 20px !important;
  z-index: 50 !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
  width: auto !important;
  height: auto !important;
}

.back-btn-glass {
  background: rgba(15, 5, 4, 0.68) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 220, 200, 0.25) !important;
  color: #ffffff !important;
  padding: 10px 18px !important;
  border-radius: 30px !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.02em !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  text-decoration: none !important;
}

.back-btn-glass:hover {
  background: rgba(212, 175, 55, 0.95) !important;
  color: #1a0804 !important;
  border-color: var(--accent-gold) !important;
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 12px 30px rgba(212, 175, 55, 0.4) !important;
}

.article-hero-image {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: cover;
}

.article-header-title {
  padding: 24px 20px 16px 20px;
  text-align: center;
}

.article-title-heading {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  line-height: 1.35;
  color: #ffffff;
  max-width: 800px;
  margin: 0 auto 12px auto;
  text-transform: lowercase;
}

.article-title-heading::first-letter {
  text-transform: uppercase;
}

@media (min-width: 768px) {
  .article-title-heading {
    font-size: 2.2rem;
  }
}

/* Article Content Container & Paragraph Spacing */
.article-card-container {
  background: transparent;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  border-radius: 0;
  padding: 0 !important;
  margin: 0 16px 28px 16px;
}

@media (min-width: 768px) {
  .article-card-container {
    padding: 0 !important;
    margin: 0 24px 36px 24px;
  }
}

/* Article Content Typography & Spacing */
.article-content {
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.8;
  color: #e8dad4;
}

.article-content::after {
  content: "";
  display: table;
  clear: both;
}

@media (min-width: 768px) {
  .article-content {
    font-size: 1.08rem;
    line-height: 1.85;
  }
}

.article-content p {
  margin-bottom: 1.4rem;
  line-height: 1.8;
  color: #e8dad4;
}

.article-content p::after {
  content: "";
  display: table;
  clear: both;
}

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

/* Inline Article Images - Floated Side-by-Side (Image | Text) */
.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  margin: 16px 0;
  border: 1px solid rgba(255, 220, 200, 0.18);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
  display: block;
  cursor: pointer !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

@media (min-width: 640px) {
  /* Default: Float Left so text & lists flow alongside on desktop */
  .article-content img {
    float: left;
    max-width: 44%;
    margin: 6px 24px 18px 0;
  }

  /* Float Right option if image alt text contains "right" */
  .article-content img[alt*="right"],
  .article-content img.float-right {
    float: right;
    margin: 6px 0 18px 24px;
  }

  /* Full Width option if image alt text contains "full" */
  .article-content img[alt*="full"],
  .article-content img.full-width {
    float: none;
    max-width: 100%;
    margin: 24px 0;
  }
}

.article-content img:hover {
  transform: scale(1.025);
  box-shadow: 0 16px 40px rgba(212, 175, 55, 0.35);
}

/* 2-Column Grid Tight Fit - Zero Extra Gap Between Image and Text */
.article-content .article-grid-2 {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin: 24px 0;
  clear: both;
}

/* Tightly shrinkwrap image wrapper to image width */
.article-content .article-grid-2 > p,
.article-content .article-grid-2 > figure {
  display: block !important;
  width: fit-content !important;
  max-width: 55% !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

.article-content .article-grid-2 img {
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  max-height: 380px !important;
  height: auto !important;
  margin: 0 !important;
  float: none !important;
}

/* Text / List column starts immediately after image */
.article-content .article-grid-2 > div {
  flex: 1 1 0%;
  min-width: 0;
}

.article-content .article-grid-2 ul,
.article-content .article-grid-2 ol {
  margin: 0;
  padding-left: 20px;
}

@media (max-width: 640px) {
  .article-content .article-grid-2 {
    flex-direction: column;
  }
  .article-content .article-grid-2 > p {
    max-width: 100% !important;
    width: 100% !important;
  }
}

/* Clean & Robust Image Lightbox Modal */
.lightbox-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(8, 2, 1, 0.93) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  z-index: 999999 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  flex-direction: column !important;
  padding: 24px !important;
  transition: opacity 0.2s ease;
}

.lightbox-modal[aria-hidden="true"] {
  display: none !important;
}

.lightbox-content {
  max-width: 90vw !important;
  max-height: 85vh !important;
  width: auto !important;
  height: auto !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9) !important;
  border: 1px solid rgba(255, 220, 200, 0.25) !important;
  object-fit: contain !important;
}

.lightbox-close {
  position: absolute !important;
  top: 24px !important;
  right: 24px !important;
  background: rgba(255, 255, 255, 0.15) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
  font-size: 1.8rem !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  transition: all 0.2s ease !important;
  z-index: 1000000 !important;
}

.lightbox-close:hover {
  background: var(--accent-gold) !important;
  color: #1a0804 !important;
  border-color: var(--accent-gold) !important;
  transform: scale(1.08) !important;
}

.article-content strong, 
.article-content b {
  color: #ffffff;
  font-weight: 700;
}

.article-content em, 
.article-content i {
  color: var(--accent-gold);
  font-style: italic;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
  font-family: var(--font-heading);
  color: #ffffff;
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.35;
  clear: both;
}

.article-content h2 {
  font-size: 1.4rem;
  padding-bottom: 4px;
}

.article-content h3 {
  font-size: 1.2rem;
  color: var(--accent-gold);
}

.article-content ul,
.article-content ol {
  padding-left: 24px;
  margin-bottom: 1.5rem;
}

.article-content li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.article-content blockquote {
  border-left: 4px solid var(--accent-gold);
  background: rgba(212, 175, 55, 0.08);
  padding: 16px 20px;
  border-radius: 0 14px 14px 0;
  margin: 20px 0;
  font-style: italic;
  color: #ffffff;
  clear: both;
}

/* Tip Box, Booking & SafetyWing Cards */
.article-tip-card {
  background: rgba(212, 175, 55, 0.08);
  border-left: 4px solid var(--accent-gold);
  border-radius: 16px;
  padding: 18px 22px;
  margin: 0 16px 24px 16px;
}

@media (min-width: 768px) {
  .article-tip-card {
    margin: 0 24px 28px 24px;
  }
}

.article-booking-card {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(22, 9, 7, 0.85));
  border: 1px solid var(--accent-gold);
  border-radius: 20px;
  padding: 24px 20px;
  text-align: center;
  margin: 24px 16px;
}

@media (min-width: 768px) {
  .article-booking-card {
    margin: 32px 24px;
    padding: 32px 28px;
  }
}

.article-safetywing-card {
  background: rgba(42, 157, 143, 0.15);
  border: 1px solid var(--accent-emerald);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0 16px 32px 16px;
}

@media (min-width: 768px) {
  .article-safetywing-card {
    margin: 0 24px 36px 24px;
  }
}