/* ============================================
   Slana Website - Enhanced Features
   Inspired by Cultural Peace and Pacha design patterns
   ============================================ */

/* === Reading Progress Bar === */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--gradient-highlight);
  z-index: 9999;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(233, 69, 96, 0.5);
}

/* === Skip Link for Accessibility === */
.skip-link {
  position: fixed;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-highlight);
  color: var(--color-text-inverse);
  padding: 12px 24px;
  text-decoration: none;
  font-weight: 600;
  z-index: 999999;
  border-radius: 0 0 8px 8px;
  transition: top var(--transition-fast);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  color: var(--color-text-inverse);
}

/* === Back to Top Button === */
.back-to-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--gradient-highlight);
  color: var(--color-text-inverse);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-lg);
  z-index: 9999;
}

.back-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow), var(--shadow-xl);
}

.back-to-top-btn:focus {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.back-to-top-btn:active {
  transform: translateY(-1px);
}

.back-to-top-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* === Scroll Indicator === */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  animation: scrollBounce 1.5s ease-in-out infinite;
  cursor: pointer;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.scroll-indicator:hover {
  opacity: 1;
}

.scroll-indicator svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: white;
  stroke-width: 2;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

@keyframes scrollBounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(8px);
  }
}

/* === Enhanced Header Scroll Effects === */
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.site-header.scrolled .site-logo img {
  transform: scale(0.85);
  transition: transform var(--transition-base);
}

.site-logo img {
  transition: transform var(--transition-base);
}

/* === Enhanced Navigation Styling === */
.nav-menu a {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-menu a:hover {
  transform: translateY(-2px);
  color: var(--color-highlight);
}

/* Pill button for last nav item (Contact) */
.nav-menu a:last-child {
  padding: 10px 20px;
  margin-left: 8px;
  border: 2px solid var(--color-highlight);
  border-radius: 300px;
  background: transparent;
  transition: all 0.3s ease;
}

.nav-menu a:last-child::after {
  display: none;
}

.nav-menu a:last-child:hover {
  background: var(--gradient-highlight);
  border-color: transparent;
  color: var(--color-text-inverse);
  box-shadow: 0 4px 20px rgba(233, 69, 96, 0.4);
  transform: translateY(-2px);
}

/* === Drop Caps for First Paragraphs === */
.intro__content > p:first-of-type::first-letter,
section:not(.hero) .container > p:first-of-type::first-letter {
  float: left;
  font-size: 3.5em;
  line-height: 0.8;
  padding-right: 10px;
  padding-top: 6px;
  color: var(--color-highlight);
  font-weight: bold;
  font-family: var(--font-secondary);
}

/* === Enhanced Focus States for Accessibility === */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-highlight);
  outline-offset: 3px;
}

/* Remove default focus for mouse users, keep for keyboard */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

/* === Enhanced Blockquote Styling === */
.quote-block blockquote {
  position: relative;
  padding-left: 60px;
}

.quote-block blockquote::before {
  content: "\201C";
  position: absolute;
  top: -20px;
  left: 0;
  font-size: 72px;
  font-family: Georgia, serif;
  color: rgba(255, 255, 255, 0.3);
  line-height: 1;
}

/* === Hero Text Animation Enhancement === */
.hero__title {
  animation: fadeInUp 1s ease-out;
}

@keyframes heroGlow {
  0%, 100% {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  }
  50% {
    text-shadow: 0 4px 30px rgba(233, 69, 96, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);
  }
}

.hero__title:hover {
  animation: heroGlow 2s ease-in-out infinite;
}

/* === Article Card Enhancements === */
/* Card hover transform and image transition defined in main.css (source of truth) */

/* === Enhanced Button Styling === */
/* position, overflow, transition defined in main.css (source of truth) */

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::after {
  width: 300px;
  height: 300px;
}

/* === Section Dividers === */
section::after {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border), transparent);
  margin-top: 0;
}

section:last-of-type::after {
  display: none;
}

/* === Social Icons Enhancement === */
.site-footer a:hover {
  transform: scale(1.1);
  transition: transform 0.2s ease;
}

/* === Responsive Improvements === */
@media screen and (max-width: 768px) {
  .back-to-top-btn {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }

  .reading-progress {
    height: 2px;
  }

  .scroll-indicator {
    bottom: 20px;
  }

  .scroll-indicator svg {
    width: 24px;
    height: 24px;
  }

  .nav-menu a:last-child {
    padding: 12px 16px;
    margin-left: 0;
    display: block;
    text-align: center;
    margin-top: 10px;
  }

  .intro__content > p:first-of-type::first-letter {
    font-size: 2.5em;
  }

  .quote-block blockquote {
    padding-left: 30px;
  }
}

/* === Reduced Motion Support === */
@media (prefers-reduced-motion: reduce) {
  .scroll-indicator {
    animation: none;
  }

  .back-to-top-btn,
  .site-header,
  .site-logo img,
  .article-card,
  .btn {
    transition: none !important;
  }

  .hero__title {
    animation: none;
  }

  @keyframes fadeInUp {
    from, to {
      opacity: 1;
      transform: none;
    }
  }
}

/* === Print Stylesheet === */
@media print {
  /* Hide non-essential elements */
  .site-header,
  .site-footer,
  .mobile-nav-toggle,
  .back-to-top-btn,
  .reading-progress,
  .skip-link,
  .scroll-indicator,
  iframe,
  video {
    display: none !important;
  }

  /* Page setup */
  @page {
    size: letter;
    margin: 0.75in;
  }

  /* Reset body styles */
  body {
    background: white !important;
    color: black !important;
    font-size: 12pt !important;
    line-height: 1.5 !important;
  }

  /* Main content */
  main,
  .container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Typography */
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
    page-break-inside: avoid;
    color: black !important;
  }

  p, blockquote, li {
    orphans: 3;
    widows: 3;
  }

  /* Images */
  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }

  /* Links - show URL after link text */
  a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }

  /* Don't show URL for internal links */
  a[href^="#"]:after,
  a[href^="/"]:after {
    content: "";
  }

  /* Remove shadows and backgrounds */
  * {
    box-shadow: none !important;
    text-shadow: none !important;
  }

  /* Hero section adjustments */
  .hero {
    min-height: auto !important;
    background: none !important;
  }

  .hero__overlay {
    display: none !important;
  }

  .hero__title {
    color: black !important;
  }

  /* Quote blocks */
  .quote-block {
    background: #f5f5f5 !important;
    color: black !important;
  }
}
