/* ============================================
   Hagia Sophia Website - Main Styles
   ============================================ */

/* Mobile Menu */
.mobile-menu-hidden {
  display: none;
}

/* Text Truncation */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Article Content Styling */
.article-content {
  font-size: 1.125rem;
  line-height: 1.875;
  color: hsl(var(--foreground));
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.article-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  color: hsl(var(--primary));
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.article-content h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  color: hsl(var(--primary));
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.article-content h3 {
  font-size: 1.625rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: hsl(var(--primary));
  line-height: 1.4;
}

.article-content h4 {
  font-size: 1.375rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.875rem;
  color: hsl(var(--primary));
  line-height: 1.5;
}

.article-content h5 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: hsl(var(--primary));
  line-height: 1.5;
}

.article-content h6 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.625rem;
  color: hsl(var(--primary));
  line-height: 1.6;
}

.article-content p {
  margin-bottom: 1.75rem;
  line-height: 1.875;
  color: hsl(var(--foreground));
  text-align: justify;
  hyphens: auto;
}

.article-content p:first-of-type {
  font-size: 1.25rem;
  line-height: 1.8;
  color: hsl(var(--muted-foreground));
  margin-bottom: 2rem;
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.75rem;
  padding-left: 2rem;
  color: hsl(var(--foreground));
  line-height: 1.875;
}

.article-content ul {
  list-style-type: disc;
}

.article-content ol {
  list-style-type: decimal;
}

.article-content li {
  margin-bottom: 0.875rem;
  line-height: 1.875;
  padding-left: 0.5rem;
}

.article-content li::marker {
  color: hsl(var(--secondary));
  font-weight: 600;
}

.article-content ul ul,
.article-content ol ol,
.article-content ul ol,
.article-content ol ul {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.article-content strong,
.article-content b {
  font-weight: 600;
  color: hsl(var(--primary));
}

.article-content em,
.article-content i {
  font-style: italic;
}

.article-content a {
  color: hsl(var(--secondary));
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: all 0.2s ease;
  font-weight: 500;
}

.article-content a:hover {
  color: hsl(var(--secondary));
  opacity: 0.8;
  text-decoration-thickness: 2px;
}

.article-content blockquote {
  border-left: 4px solid hsl(var(--secondary));
  padding: 1.25rem 1.75rem;
  margin: 2.5rem 0;
  background: linear-gradient(to right, hsl(var(--secondary) / 0.05), transparent);
  font-style: italic;
  color: hsl(var(--muted-foreground));
  border-radius: 0.5rem;
  position: relative;
}

.article-content blockquote::before {
  content: '"';
  font-size: 4rem;
  color: hsl(var(--secondary) / 0.2);
  position: absolute;
  left: 0.5rem;
  top: -0.5rem;
  font-family: Georgia, serif;
  line-height: 1;
}

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

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
  margin: 2.5rem auto;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.15);
  display: block;
}

.article-content figure {
  margin: 2.5rem 0;
}

.article-content figcaption {
  text-align: center;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.75rem;
  font-style: italic;
}

.article-content hr {
  border: none;
  border-top: 2px solid hsl(var(--border));
  margin: 3rem 0;
  position: relative;
}

.article-content hr::after {
  content: '✦';
  position: absolute;
  left: 50%;
  top: -0.625rem;
  transform: translateX(-50%);
  background: hsl(var(--card));
  padding: 0 1rem;
  color: hsl(var(--secondary));
  font-size: 1.25rem;
}

.article-content code {
  background-color: hsl(var(--secondary) / 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Dank Mono', 'Courier New', monospace;
  font-size: 0.875em;
  color: hsl(var(--secondary));
  font-weight: 500;
  border: 1px solid hsl(var(--secondary) / 0.2);
}

.article-content pre {
  background: linear-gradient(135deg, hsl(var(--primary) / 0.03) 0%, hsl(var(--secondary) / 0.03) 100%);
  padding: 1.5rem;
  border-radius: 0.75rem;
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid hsl(var(--border));
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.article-content pre code {
  background-color: transparent;
  padding: 0;
  color: hsl(var(--foreground));
  border: none;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.article-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 2.5rem 0;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.article-content table th,
.article-content table td {
  padding: 1rem 1.25rem;
  border: 1px solid hsl(var(--border));
  text-align: left;
}

.article-content table th {
  background: linear-gradient(135deg, hsl(var(--secondary) / 0.15), hsl(var(--secondary) / 0.05));
  font-weight: 600;
  color: hsl(var(--primary));
  font-size: 0.9375rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.article-content table tr:nth-child(even) {
  background-color: hsl(var(--muted) / 0.3);
}

.article-content table tr:hover {
  background-color: hsl(var(--secondary) / 0.05);
  transition: background-color 0.2s ease;
}

/* Inline elements */
.article-content mark {
  background-color: hsl(var(--secondary) / 0.2);
  color: hsl(var(--primary));
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
}

.article-content kbd {
  background-color: hsl(var(--primary));
  color: white;
  padding: 0.125rem 0.5rem;
  border-radius: 0.375rem;
  font-family: 'SF Mono', monospace;
  font-size: 0.875em;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.article-content abbr {
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  cursor: help;
}

/* Raw HTML embeds (like GetYourGuide widgets) */
.article-content .raw-html-embed {
  margin: 2.5rem 0;
  padding: 2rem;
  background: linear-gradient(135deg, hsl(var(--secondary) / 0.05), hsl(var(--secondary) / 0.02));
  border-radius: 1rem;
  border: 1px solid hsl(var(--border));
}

/* First paragraph drop cap effect */
.article-content > p:first-of-type::first-letter {
  font-size: 4rem;
  font-weight: 700;
  line-height: 0.9;
  float: left;
  margin-right: 0.75rem;
  margin-top: 0.25rem;
  margin-bottom: -0.25rem;
  color: hsl(var(--secondary));
  font-family: Georgia, serif;
}

/* Reading experience improvements */
.article-content {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.article-content p + p {
  text-indent: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .article-content {
    font-size: 1rem;
    line-height: 1.75;
  }
  
  .article-content h1 {
    font-size: 2rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
  }
  
  .article-content h2 {
    font-size: 1.75rem;
    margin-top: 1.75rem;
    margin-bottom: 1rem;
  }
  
  .article-content h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
  }
  
  .article-content p:first-of-type {
    font-size: 1.125rem;
  }
  
  .article-content > p:first-of-type::first-letter {
    font-size: 3rem;
    margin-right: 0.5rem;
  }
  
  .article-content blockquote {
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
  }
  
  .article-content pre {
    padding: 1rem;
    font-size: 0.875rem;
  }
  
  .article-content table {
    font-size: 0.875rem;
  }
  
  .article-content table th,
  .article-content table td {
    padding: 0.75rem;
  }
}

/* Floating CTA Button */
.floating-cta-button {
  position: fixed;
  z-index: 9999;
  padding: 16px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  animation: floating-pulse 2s ease-in-out infinite;
}

.floating-cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.35);
}

.floating-cta-button:active {
  transform: translateY(-1px);
}

/* Position variants */
.floating-cta-button.bottom-right {
  bottom: 30px;
  right: 30px;
}

.floating-cta-button.bottom-left {
  bottom: 30px;
  left: 30px;
}

.floating-cta-button.top-right {
  top: 100px;
  right: 30px;
}

.floating-cta-button.top-left {
  top: 100px;
  left: 30px;
}

/* Pulse animation */
@keyframes floating-pulse {
  0%, 100% {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  }
  50% {
    box-shadow: 0 4px 25px rgba(212, 175, 55, 0.5);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .floating-cta-button {
    padding: 7px 10px;
    font-size: 14px;
  }
  
  .floating-cta-button.bottom-right,
  .floating-cta-button.bottom-left {
    bottom: 20px;
  }
  
  .floating-cta-button.bottom-right,
  .floating-cta-button.top-right {
    right: 20px;
  }
  
  .floating-cta-button.bottom-left,
  .floating-cta-button.top-left {
    left: 20px;
  }
  
  .floating-cta-button.top-right,
  .floating-cta-button.top-left {
    top: 80px;
  }
}

/* Hide on scroll down, show on scroll up (optional feature) */
.floating-cta-button.hidden {
  transform: translateY(150px);
  opacity: 0;
  pointer-events: none;
}
