/* Ahamed Shafeek - Enhanced SEO & Performance Styles
   Additional CSS for enterprise-grade SEO optimization */

/* =============================
   Critical CSS for Above-the-Fold
============================= */

/* Preload font-face to prevent FOIT */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Inter Regular'), local('Inter-Regular');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: local('Inter SemiBold'), local('Inter-SemiBold');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local('Inter Bold'), local('Inter-Bold');
}

/* =============================
   SEO-Optimized Breadcrumbs
============================= */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
  font-size: 14px;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color var(--transition);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb span[aria-current="page"] {
  color: var(--text);
  font-weight: 500;
}

.breadcrumb-separator {
  color: var(--border);
}

/* =============================
   Schema-Friendly Author Cards
============================= */
.author-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.author-card[itemscope] {
  /* Visual indicator for structured data */
}

.author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 24px;
  flex-shrink: 0;
}

.author-info h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.author-info p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* =============================
   FAQ Section (Schema-Optimized)
============================= */
.faq-section {
  margin: 48px 0;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::after {
  content: '+';
  font-size: 24px;
  color: var(--primary);
  transition: transform var(--transition);
}

.faq-item.open .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  color: var(--muted);
  line-height: 1.7;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 500px;
}

/* =============================
   Rich Snippet Optimized Cards
============================= */
.product-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
}

.product-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.product-card .price {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}

.product-card .price-currency {
  font-size: 16px;
  font-weight: 400;
}

.product-card .rating {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #F59E0B;
}

/* =============================
   Article Schema Styling
============================= */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--muted);
}

.article-meta time {
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-meta time::before {
  content: '📅';
}

.article-meta .read-time::before {
  content: '⏱️';
  margin-right: 6px;
}

.article-meta .category {
  background: var(--primary);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 500;
}

/* =============================
   LocalBusiness Schema Card
============================= */
.business-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.business-card .business-name {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.business-card .business-type {
  color: var(--muted);
  margin-bottom: 16px;
}

.business-card .business-address,
.business-card .business-hours,
.business-card .business-contact {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 14px;
}

/* =============================
   Enhanced Link Styling for SEO
============================= */
/* Internal links - only apply to content areas (main, article, section text) */
main p a,
article p a,
.post-body a,
.blog-post-content a:not(.btn) {
  color: var(--secondary);
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color var(--transition);
}

main p a:hover,
article p a:hover,
.post-body a:hover,
.blog-post-content a:not(.btn):hover {
  text-decoration-color: var(--secondary);
}

/* External links indicator - only in content areas */
main p a[target="_blank"]::after,
article p a[target="_blank"]::after,
.post-body a[target="_blank"]::after {
  content: ' ↗';
  font-size: 0.8em;
  opacity: 0.7;
}

/* =============================
   Image SEO Optimization
============================= */
img {
  max-width: 100%;
  height: auto;
  /* Prevent layout shift */
  aspect-ratio: attr(width) / attr(height);
}

/* Lazy loaded images */
img[loading="lazy"] {
  background: var(--bg-alt);
}

/* Image with caption (figure) */
figure {
  margin: 32px 0;
}

figure img {
  border-radius: var(--radius-lg);
}

figcaption {
  margin-top: 12px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
}

/* =============================
   Table of Contents (for long content)
============================= */
.toc {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 32px 0;
}

.toc h3 {
  margin: 0 0 16px;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}

.toc ol {
  margin: 0;
  padding-left: 20px;
}

.toc li {
  margin-bottom: 8px;
}

.toc a {
  color: var(--text);
  text-decoration: none;
}

.toc a:hover {
  color: var(--primary);
}

/* =============================
   Print Styles for SEO
============================= */
@media print {
  /* Hide non-essential elements */
  .nav-wrapper,
  .footer,
  .cta-section,
  .share-buttons,
  .sidebar,
  .burger {
    display: none !important;
  }
  
  /* Show URLs for links */
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 12px;
    color: #666;
  }
  
  /* Page breaks */
  h1, h2, h3 {
    page-break-after: avoid;
  }
  
  article, section {
    page-break-inside: avoid;
  }
  
  /* Print-friendly colors */
  body {
    background: white;
    color: black;
  }
}

/* =============================
   Reduced Motion (Accessibility)
============================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =============================
   High Contrast Mode
============================= */
@media (prefers-contrast: high) {
  :root {
    --border: #000;
    --muted: #333;
  }
  
  .btn-outline {
    border-width: 2px;
  }
}

/* =============================
   Dark Mode - Disabled to maintain consistent light theme
   Uncomment below if you want automatic dark mode support
============================= */
/*
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0D0D0D;
    --bg-alt: #1A1A1A;
    --text: #F5F5F5;
    --muted: #9CA3AF;
    --border: #2D2D2D;
    --hover-bg: #262626;
  }
  
  img {
    opacity: 0.9;
  }
}
*/
