/* ============================================
   POOLPRO ARTICLE STYLES
   Blog article page styling framework
   ============================================ */

/* ============================================
   CSS VARIABLES
   ============================================ */
.pp-article {
  --pp-ocean-deep: #0c4a6e;
  --pp-ocean-mid: #0369a1;
  --pp-ocean-light: #0ea5e9;
  --pp-cyan-glow: #22d3ee;
  --pp-pink-hot: #DE2666;
  --pp-slate-50: #f8fafc;
  --pp-slate-100: #f1f5f9;
  --pp-slate-200: #e2e8f0;
  --pp-slate-600: #475569;
  --pp-slate-700: #334155;
  --pp-slate-800: #1e293b;
  --pp-slate-900: #0f172a;

  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.pp-article *, .pp-article *::before, .pp-article *::after {
  box-sizing: border-box;
}

/* ============================================
   ARTICLE HERO SECTION
   ============================================ */
.article-hero {
  position: relative;
  background: #0c4a6e;
  background-image: linear-gradient(135deg, #0c4a6e 0%, #0369a1 50%, #0ea5e9 100%);
  padding: 50px 24px 90px;
  text-align: center;
  overflow: hidden;
}

.article-hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
}

/* Breadcrumbs */
.article-breadcrumbs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
}

.article-breadcrumbs a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.2s ease;
}

.article-breadcrumbs a:hover {
  color: #fff;
}

.article-breadcrumbs span.separator {
  color: rgba(255, 255, 255, 0.5);
}

.article-breadcrumbs span.current {
  color: #fff;
  font-weight: 500;
}

/* Article Title */
.article-title {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 16px 0;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Article Meta (date, reading time, category) */
.article-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
}

.article-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.article-meta svg {
  width: 16px;
  height: 16px;
  opacity: 0.8;
}

.article-category-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

/* Wave Divider */
.article-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.article-wave svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 50px;
}

/* ============================================
   CATEGORY NAVIGATION
   ============================================ */
.article-category-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 24px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.article-category-nav a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  transition: all 0.2s ease;
}

.article-category-nav a:hover {
  background: #0369a1;
  border-color: #0369a1;
  color: #fff;
}

.article-category-nav a.active {
  background: #0c4a6e;
  border-color: #0c4a6e;
  color: #fff;
}

/* ============================================
   ARTICLE CONTENT - TYPOGRAPHY
   ============================================ */
.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px;
  font-size: 1rem;
  line-height: 1.7;
  color: #334155;
}

/* Headings */
.article-content h2 {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: #0c4a6e;
  margin: 48px 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid #e2e8f0;
  line-height: 1.3;
}

.article-content h2:first-child {
  margin-top: 0;
}

.article-content h3 {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: #1e293b;
  margin: 32px 0 16px 0;
  line-height: 1.3;
}

.article-content h4 {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: #334155;
  margin: 24px 0 12px 0;
  line-height: 1.4;
}

/* Paragraphs */
.article-content p {
  margin: 0 0 20px 0;
}

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

/* Links */
.article-content a {
  color: #0369a1;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.article-content a:hover {
  color: #0c4a6e;
}

/* Lists */
.article-content ul,
.article-content ol {
  margin: 0 0 24px 0;
  padding-left: 24px;
}

.article-content li {
  margin-bottom: 10px;
  padding-left: 8px;
}

.article-content ul li::marker {
  color: #0369a1;
}

.article-content ol li::marker {
  color: #0369a1;
  font-weight: 600;
}

/* Blockquotes / Callouts */
.article-content blockquote {
  margin: 24px 0;
  padding: 20px 24px;
  background: #f1f5f9;
  border-left: 4px solid #0369a1;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #475569;
}

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

/* Images */
.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 24px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.article-content figure {
  margin: 32px 0;
}

.article-content figcaption {
  text-align: center;
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 8px;
  font-style: italic;
}

/* Tables */
.article-content .table-wrapper {
  overflow-x: auto;
  margin: 24px 0;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.article-content thead {
  background: #f8fafc;
}

.article-content th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #1e293b;
  border-bottom: 2px solid #e2e8f0;
}

.article-content td {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.article-content tbody tr:last-child td {
  border-bottom: none;
}

.article-content tbody tr:nth-child(even) {
  background: #f8fafc;
}

/* Code */
.article-content code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.875em;
  color: #0c4a6e;
}

.article-content pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 24px 0;
}

.article-content pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

/* ============================================
   CALLOUT BOXES
   ============================================ */
.article-tip,
.article-warning,
.article-note,
.article-info {
  margin: 24px 0;
  padding: 20px 24px;
  border-radius: 8px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.article-tip::before,
.article-warning::before,
.article-note::before,
.article-info::before {
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* Tip - Green */
.article-tip {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
}

.article-tip::before {
  content: '\2714';
  color: #22c55e;
}

/* Warning - Orange */
.article-warning {
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
}

.article-warning::before {
  content: '\26A0';
  color: #f97316;
}

/* Note - Gray */
.article-note {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #475569;
}

.article-note::before {
  content: '\270E';
  color: #64748b;
}

/* Info - Blue */
.article-info {
  background: #eff6ff;
  border: 1px solid #93c5fd;
  color: #1e40af;
}

.article-info::before {
  content: '\2139';
  color: #3b82f6;
}

/* ============================================
   TABLE OF CONTENTS (for long articles)
   ============================================ */
.article-toc {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 24px;
  margin: 0 0 32px 0;
}

.article-toc-title {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-toc-title svg {
  width: 18px;
  height: 18px;
  color: #0369a1;
}

.article-toc ol {
  margin: 0;
  padding-left: 20px;
  counter-reset: toc-counter;
}

.article-toc li {
  margin-bottom: 8px;
  padding-left: 4px;
  counter-increment: toc-counter;
}

.article-toc li::marker {
  content: counter(toc-counter) ". ";
  color: #0369a1;
  font-weight: 500;
}

.article-toc a {
  color: #475569;
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.2s ease;
}

.article-toc a:hover {
  color: #0369a1;
  text-decoration: underline;
}

/* ============================================
   SHARE BUTTONS
   ============================================ */
.article-share {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 24px;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  margin: 48px 0 0 0;
}

.article-share-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
}

.article-share a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #475569;
  text-decoration: none;
  font-size: 1.125rem;
  transition: all 0.2s ease;
}

.article-share a:hover {
  background: #0369a1;
  border-color: #0369a1;
  color: #fff;
  transform: translateY(-2px);
}

.article-share a svg {
  width: 18px;
  height: 18px;
}

/* ============================================
   POPULAR GUIDES SECTION
   ============================================ */
.article-popular-guides {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px;
}

.article-popular-guides h3 {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 20px 0;
  text-align: center;
}

.article-popular-guides ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.article-popular-guides li {
  margin: 0;
  padding: 0;
}

.article-popular-guides a {
  display: block;
  padding: 16px 20px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #334155;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.article-popular-guides a:hover {
  background: #f0f9ff;
  border-color: #0369a1;
  color: #0369a1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(3, 105, 161, 0.1);
}

.article-popular-guides a::before {
  content: '\2192';
  margin-right: 8px;
  color: #0369a1;
}

/* ============================================
   ARTICLE CTA BLOCK
   ============================================ */
.article-cta {
  background: linear-gradient(135deg, #0c4a6e 0%, #0369a1 100%);
  padding: 48px 24px;
  text-align: center;
  margin-top: 0;
}

.article-cta-content {
  max-width: 600px;
  margin: 0 auto;
}

.article-cta p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.125rem;
  margin: 0 0 24px 0;
}

.article-cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.article-cta .btn-primary,
.article-cta .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.article-cta .btn-primary {
  background: #fff;
  color: #0c4a6e;
}

.article-cta .btn-primary:hover {
  background: #f0f9ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.article-cta .btn-secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.article-cta .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */
@media (max-width: 768px) {
  .article-hero {
    padding: 40px 20px 70px;
  }

  .article-title {
    font-size: 1.75rem;
  }

  .article-meta {
    gap: 12px;
  }

  .article-category-nav {
    gap: 8px;
    padding: 16px;
  }

  .article-category-nav a {
    padding: 6px 12px;
    font-size: 0.8125rem;
  }

  .article-content {
    padding: 32px 20px;
  }

  .article-content h2 {
    font-size: 1.5rem;
    margin-top: 36px;
  }

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

  .article-share {
    flex-direction: column;
    gap: 12px;
  }

  .article-popular-guides {
    padding: 32px 20px;
  }

  .article-popular-guides ul {
    grid-template-columns: 1fr;
  }

  .article-cta {
    padding: 32px 20px;
  }

  .article-cta-buttons {
    flex-direction: column;
    align-items: center;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .article-hero {
    background: #fff !important;
    color: #000 !important;
    padding: 20px 0;
  }

  .article-title {
    color: #000 !important;
    text-shadow: none !important;
  }

  .article-category-nav,
  .article-share,
  .article-cta,
  .article-wave {
    display: none !important;
  }

  .article-content {
    max-width: 100%;
    padding: 20px 0;
  }

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

  .article-content a::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.article-text-center { text-align: center; }
.article-text-small { font-size: 0.875rem; }
.article-mt-0 { margin-top: 0 !important; }
.article-mb-0 { margin-bottom: 0 !important; }
.article-hidden { display: none !important; }

/* ============================================
   ARTICLE SIDEBAR LAYOUT
   ============================================ */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px;
}

.article-main {
  min-width: 0;
}

.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 24px;
  align-self: start;
}

.article-layout .article-content {
  padding: 0;
  max-width: none;
}

/* Sidebar Cards */
.sidebar-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}

.sidebar-card-header {
  background: linear-gradient(135deg, #0c4a6e 0%, #0369a1 100%);
  color: #fff;
  padding: 14px 20px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.9375rem;
}

.sidebar-card-body {
  padding: 16px 20px;
}

/* Delivery Banner - Green success style */
.sidebar-delivery {
  background: #059669;
  color: #fff;
  padding: 16px 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.sidebar-delivery-icon {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-delivery-icon svg {
  width: 24px;
  height: 24px;
}

.sidebar-delivery-text {
  flex: 1;
}

.sidebar-delivery-title {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.9375rem;
  margin-bottom: 2px;
}

.sidebar-delivery-subtitle {
  font-size: 0.8125rem;
  opacity: 0.9;
}

/* Click & Collect Banner - Same style as PDP */
.sidebar-collect {
  background: #0c4a6e;
  color: #fff;
  padding: 16px 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.sidebar-collect-icon {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-collect-icon svg {
  width: 24px;
  height: 24px;
}

.sidebar-collect-text {
  flex: 1;
}

.sidebar-collect-title {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.9375rem;
  margin-bottom: 2px;
}

.sidebar-collect-subtitle {
  font-size: 0.8125rem;
  opacity: 0.9;
}

/* Category Links in Sidebar */
.sidebar-categories {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-categories li {
  margin: 0;
  padding: 0;
}

.sidebar-categories a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  color: #334155;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  border-bottom: 1px solid #f1f5f9;
  transition: color 0.2s ease;
}

.sidebar-categories li:last-child a {
  border-bottom: none;
}

.sidebar-categories a:hover {
  color: #0369a1;
}

.sidebar-categories .cat-icon {
  width: 36px;
  height: 36px;
  background: #f0f9ff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0369a1;
  flex-shrink: 0;
}

.sidebar-categories .cat-icon svg {
  width: 18px;
  height: 18px;
}

/* Shop CTA Button */
.sidebar-shop-btn {
  display: block;
  background: #DE2666;
  color: #fff;
  text-align: center;
  padding: 14px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.sidebar-shop-btn:hover {
  background: #c21f58;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(222, 38, 102, 0.3);
}

/* Responsive - Hide sidebar on tablet/mobile */
@media (max-width: 968px) {
  .article-layout {
    grid-template-columns: 1fr;
    padding: 32px 20px;
  }
  
  .article-sidebar {
    display: none;
  }
}
