/**
 * Olimaq Blog System - Main Stylesheet
 * Brand: Olimaq (olimaqorlandia.com.br)
 * Aligned with design.md and skill.md design tokens
 * WCAG 2.2 AA Accessible
 */

:root {
  /* Typography Tokens */
  --olimaq-font-primary: 'Roboto Slab', serif;
  --olimaq-font-body: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --olimaq-font-weight-regular: 400;
  --olimaq-font-weight-medium: 600;
  --olimaq-font-weight-bold: 700;
  --olimaq-font-weight-black: 700; /* Refined from 900 for cleaner typography */
  --olimaq-font-size-xs: 13px;
  --olimaq-font-size-sm: 15px;
  --olimaq-font-size-md: 17px;
  --olimaq-font-size-lg: 20px;
  --olimaq-font-size-xl: 24px;
  --olimaq-font-size-2xl: 30px;
  --olimaq-font-size-3xl: 34px;
  --olimaq-font-size-4xl: 42px;
  --olimaq-line-height-base: 1.6;
  --olimaq-line-height-loose: 1.75;

  /* Color Tokens */
  --olimaq-color-text-primary: #ffffff;
  --olimaq-color-text-secondary: #0074db;
  --olimaq-color-text-tertiary: #130c4f;
  --olimaq-color-text-inverse: #334155;
  --olimaq-color-surface-base: #000000;
  --olimaq-color-surface-muted: #f8fafc;
  --olimaq-color-surface-raised: #02d128;

  /* Extended Brand Tokens */
  --olimaq-color-yellow: #feb519;
  --olimaq-color-yellow-hover: #e09e0a;
  --olimaq-color-navy-dark: #0a062f;
  --olimaq-color-green-whatsapp: #56dd3b;
  --olimaq-color-border: #e2e8f0;
  --olimaq-color-card-bg: #ffffff;
  --olimaq-color-bg-light: #f8fafc;
  --olimaq-color-meta: #64748b;

  /* Spacing Tokens */
  --olimaq-space-1: 4px;
  --olimaq-space-2: 8px;
  --olimaq-space-3: 16px;
  --olimaq-space-4: 32px;
  --olimaq-space-5: 64px;

  /* Radius Tokens */
  --olimaq-radius-xs: 50px;
  --olimaq-radius-sm: 6px;
  --olimaq-radius-md: 10px;
  --olimaq-radius-lg: 14px;

  /* Subtle Modern Elevation (No exaggerated drop shadows) */
  --olimaq-shadow-1: 0 1px 3px rgba(0, 0, 0, 0.04);
  --olimaq-shadow-2: 0 4px 12px rgba(0, 0, 0, 0.06);
  --olimaq-shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04);
  --olimaq-shadow-hover: 0 6px 16px rgba(0, 0, 0, 0.06);

  /* Motion Tokens */
  --olimaq-motion-instant: 250ms ease;
}

/* ==========================================================================
   Base & Accessibility
   ========================================================================== */
.olimaq-blog-wrapper {
  font-family: var(--olimaq-font-body);
  color: var(--olimaq-color-text-inverse);
  line-height: var(--olimaq-line-height-base);
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.olimaq-blog-wrapper *,
.olimaq-blog-wrapper *::before,
.olimaq-blog-wrapper *::after {
  box-sizing: border-box;
}

/* Accessible focus visible */
.olimaq-blog-wrapper :focus-visible {
  outline: 2px solid var(--olimaq-color-text-secondary);
  outline-offset: 2px;
}

.olimaq-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.olimaq-blog-hero {
  position: relative;
  background: linear-gradient(135deg, var(--olimaq-color-navy-dark) 0%, var(--olimaq-color-text-tertiary) 100%);
  color: var(--olimaq-color-text-primary);
  padding: 70px 20px;
  overflow: hidden;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.olimaq-blog-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(rgba(254, 181, 25, 0.1) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.6;
  pointer-events: none;
}

.olimaq-hero-inner {
  position: relative;
  max-width: 1140px;
  margin: 0 auto;
  z-index: 2;
}

.olimaq-breadcrumbs {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 18px;
  font-family: var(--olimaq-font-body);
}

.olimaq-breadcrumbs a {
  color: var(--olimaq-color-yellow);
  text-decoration: none;
  transition: color var(--olimaq-motion-instant);
}

.olimaq-breadcrumbs a:hover {
  color: var(--olimaq-color-text-primary);
  text-decoration: underline;
}

.olimaq-breadcrumbs .sep {
  opacity: 0.4;
}

.olimaq-hero-badge {
  display: inline-flex;
  align-items: center;
  background-color: rgba(254, 181, 25, 0.15);
  color: var(--olimaq-color-yellow);
  border: 1px solid rgba(254, 181, 25, 0.4);
  padding: 5px 16px;
  border-radius: var(--olimaq-radius-xs);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.olimaq-hero-title {
  font-family: var(--olimaq-font-primary);
  font-size: 38px;
  font-weight: 700;
  color: var(--olimaq-color-text-primary);
  margin: 0 0 14px 0;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.olimaq-hero-subtitle {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ==========================================================================
   Filter & Search Bar (Clean transition section)
   ========================================================================== */
.olimaq-filter-container {
  background-color: #ffffff;
  border-bottom: 1px solid var(--olimaq-color-border);
  padding: 18px 20px;
  position: sticky;
  top: 65px;
  z-index: 10;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.olimaq-filter-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.olimaq-categories-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.olimaq-cat-btn {
  display: inline-block;
  background-color: #ffffff;
  color: var(--olimaq-color-text-tertiary);
  border: 1px solid #dcdce6;
  border-radius: var(--olimaq-radius-xs);
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--olimaq-motion-instant);
}

.olimaq-cat-btn:hover {
  background-color: var(--olimaq-color-text-tertiary);
  color: var(--olimaq-color-text-primary);
  border-color: var(--olimaq-color-text-tertiary);
  transform: translateY(-1px);
}

.olimaq-cat-btn.is-active {
  background-color: var(--olimaq-color-text-tertiary);
  color: var(--olimaq-color-yellow);
  border-color: var(--olimaq-color-text-tertiary);
  font-weight: 600;
}

.olimaq-search-form {
  position: relative;
  min-width: 260px;
}

.olimaq-search-input {
  width: 100%;
  padding: 9px 40px 9px 14px;
  border: 1px solid var(--olimaq-color-border);
  border-radius: var(--olimaq-radius-xs);
  font-size: 13px;
  font-family: var(--olimaq-font-body);
  background-color: #f8fafc;
  color: var(--olimaq-color-text-inverse);
  transition: border-color var(--olimaq-motion-instant), background-color var(--olimaq-motion-instant);
}

.olimaq-search-input:focus {
  outline: none;
  background-color: #ffffff;
  border-color: var(--olimaq-color-text-secondary);
  box-shadow: 0 0 0 2px rgba(0, 116, 219, 0.12);
}

.olimaq-search-submit {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--olimaq-color-meta);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.olimaq-search-submit:hover {
  color: var(--olimaq-color-text-secondary);
}

/* ==========================================================================
   Main Content Container
   ========================================================================== */
.olimaq-blog-content-area {
  max-width: 1140px;
  margin: 0 auto;
  padding: 48px 20px 80px 20px;
}

/* ==========================================================================
   Featured Article Card (Destaque)
   ========================================================================== */
.olimaq-featured-card {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background-color: var(--olimaq-color-card-bg);
  border-radius: var(--olimaq-radius-md);
  overflow: hidden;
  box-shadow: var(--olimaq-shadow-card);
  margin-bottom: 48px;
  border: 1px solid var(--olimaq-color-border);
  transition: transform var(--olimaq-motion-instant), box-shadow var(--olimaq-motion-instant), border-color var(--olimaq-motion-instant);
}

.olimaq-featured-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: var(--olimaq-shadow-hover);
}

.olimaq-featured-thumb-wrap {
  position: relative;
  overflow: hidden;
  min-height: 340px;
  background-color: #f1f5f9;
}

.olimaq-featured-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 400ms ease;
}

.olimaq-featured-card:hover .olimaq-featured-thumb-wrap img {
  transform: scale(1.03);
}

.olimaq-featured-pill {
  position: absolute;
  top: 16px;
  left: 16px;
  background-color: var(--olimaq-color-yellow);
  color: var(--olimaq-color-navy-dark);
  font-family: var(--olimaq-font-primary);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.olimaq-featured-body {
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.olimaq-post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--olimaq-color-meta);
  margin-bottom: 12px;
}

.olimaq-post-meta .olimaq-cat-tag {
  color: var(--olimaq-color-text-secondary);
  font-weight: 600;
  text-decoration: none;
}

.olimaq-post-meta .olimaq-dot {
  color: #cbd5e1;
}

.olimaq-featured-title {
  font-family: var(--olimaq-font-primary);
  font-size: 26px;
  font-weight: 700;
  color: var(--olimaq-color-text-tertiary);
  margin: 0 0 14px 0;
  line-height: 1.3;
}

.olimaq-featured-title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--olimaq-motion-instant);
}

.olimaq-featured-title a:hover {
  color: var(--olimaq-color-text-secondary);
}

.olimaq-featured-excerpt {
  font-size: 14px;
  color: var(--olimaq-color-text-inverse);
  line-height: 1.6;
  margin-bottom: 24px;
}

.olimaq-featured-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border-top: 1px solid var(--olimaq-color-border);
  padding-top: 18px;
}

/* ==========================================================================
   Post Grid System
   ========================================================================== */
.olimaq-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 50px;
}

.olimaq-post-card {
  display: flex;
  flex-direction: column;
  background-color: var(--olimaq-color-card-bg);
  border-radius: var(--olimaq-radius-md);
  overflow: hidden;
  border: 1px solid var(--olimaq-color-border);
  box-shadow: var(--olimaq-shadow-card);
  transition: transform var(--olimaq-motion-instant), box-shadow var(--olimaq-motion-instant), border-color var(--olimaq-motion-instant);
}

.olimaq-post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--olimaq-shadow-hover);
  border-color: #cbd5e1;
}

.olimaq-card-thumb-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background-color: #f1f5f9;
}

.olimaq-card-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 400ms ease;
}

.olimaq-post-card:hover .olimaq-card-thumb-wrap img {
  transform: scale(1.03);
}

.olimaq-card-cat-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: var(--olimaq-color-text-tertiary);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color var(--olimaq-motion-instant);
}

.olimaq-card-cat-badge:hover {
  background-color: var(--olimaq-color-yellow);
  color: var(--olimaq-color-navy-dark);
}

.olimaq-card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.olimaq-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--olimaq-color-meta);
  margin-bottom: 10px;
  font-weight: 500;
}

.olimaq-card-meta .olimaq-dot {
  color: #cbd5e1;
}

.olimaq-card-title {
  font-family: var(--olimaq-font-primary);
  font-size: 18px;
  font-weight: 700;
  color: var(--olimaq-color-text-tertiary);
  margin: 0 0 10px 0;
  line-height: 1.35;
}

.olimaq-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--olimaq-motion-instant);
}

.olimaq-card-title a:hover {
  color: var(--olimaq-color-text-secondary);
}

.olimaq-card-excerpt {
  font-size: 13.5px;
  color: var(--olimaq-color-text-inverse);
  line-height: 1.6;
  margin-bottom: 18px;
  flex-grow: 1;
}

.olimaq-card-footer {
  border-top: 1px solid var(--olimaq-color-border);
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* Olimaq Action Buttons */
.olimaq-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--olimaq-font-primary);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: var(--olimaq-radius-xs);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--olimaq-motion-instant);
  border: none;
}

.olimaq-btn-primary {
  background-color: var(--olimaq-color-text-tertiary);
  color: var(--olimaq-color-text-primary);
}

.olimaq-btn-primary:hover {
  background-color: var(--olimaq-color-navy-dark);
  color: var(--olimaq-color-yellow);
  transform: translateY(-1px);
}

.olimaq-btn-yellow {
  background-color: var(--olimaq-color-yellow);
  color: var(--olimaq-color-navy-dark);
}

.olimaq-btn-yellow:hover {
  background-color: var(--olimaq-color-yellow-hover);
  transform: translateY(-1px);
}

.olimaq-btn-link {
  font-family: var(--olimaq-font-primary);
  font-size: 13px;
  font-weight: 600;
  color: var(--olimaq-color-text-secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--olimaq-motion-instant), color var(--olimaq-motion-instant);
}

.olimaq-btn-link:hover {
  color: var(--olimaq-color-text-tertiary);
  gap: 8px;
}

/* ==========================================================================
   Accessible Pagination
   ========================================================================== */
.olimaq-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.olimaq-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--olimaq-radius-xs);
  background-color: #ffffff;
  border: 1px solid var(--olimaq-color-border);
  color: var(--olimaq-color-text-tertiary);
  font-family: var(--olimaq-font-primary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--olimaq-motion-instant);
}

.olimaq-pagination .page-numbers:hover {
  background-color: var(--olimaq-color-text-tertiary);
  color: #ffffff;
  border-color: var(--olimaq-color-text-tertiary);
}

.olimaq-pagination .page-numbers.current {
  background-color: var(--olimaq-color-text-tertiary);
  color: var(--olimaq-color-yellow);
  border-color: var(--olimaq-color-text-tertiary);
}

/* ==========================================================================
   Empty State
   ========================================================================== */
.olimaq-empty-state {
  text-align: center;
  padding: 50px 20px;
  background-color: #ffffff;
  border-radius: var(--olimaq-radius-md);
  border: 1px dashed var(--olimaq-color-border);
}

.olimaq-empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px auto;
  color: var(--olimaq-color-yellow);
}

.olimaq-empty-title {
  font-family: var(--olimaq-font-primary);
  font-size: 20px;
  color: var(--olimaq-color-text-tertiary);
  margin-bottom: 8px;
}

.olimaq-empty-desc {
  font-size: 14px;
  color: var(--olimaq-color-text-inverse);
  max-width: 440px;
  margin: 0 auto 20px auto;
}

/* ==========================================================================
   Call To Action Banner (WhatsApp & Orçamento)
   ========================================================================== */
.olimaq-cta-section {
  background: linear-gradient(135deg, var(--olimaq-color-navy-dark) 0%, var(--olimaq-color-text-tertiary) 100%);
  color: #ffffff;
  border-radius: var(--olimaq-radius-lg);
  padding: 44px 36px;
  margin-top: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  box-shadow: 0 4px 16px rgba(19, 12, 79, 0.08);
}

.olimaq-cta-content h3 {
  font-family: var(--olimaq-font-primary);
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: var(--olimaq-color-yellow);
}

.olimaq-cta-content p {
  font-size: 15px;
  margin: 0;
  opacity: 0.9;
  line-height: 1.5;
}

.olimaq-cta-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.olimaq-btn-whatsapp {
  background-color: var(--olimaq-color-green-whatsapp);
  color: #ffffff;
  font-weight: 600;
}

.olimaq-btn-whatsapp:hover {
  background-color: #48c430;
  color: #ffffff;
  transform: translateY(-1px);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .olimaq-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .olimaq-featured-card {
    grid-template-columns: 1fr;
  }

  .olimaq-featured-thumb-wrap {
    min-height: 260px;
  }
}

@media (max-width: 768px) {
  .olimaq-blog-hero {
    padding: 44px 20px;
  }

  .olimaq-hero-title {
    font-size: 28px;
  }

  .olimaq-filter-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .olimaq-categories-list {
    overflow-x: auto;
    padding-bottom: 8px;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .olimaq-cat-btn {
    white-space: nowrap;
  }

  .olimaq-posts-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .olimaq-cta-section {
    flex-direction: column;
    text-align: center;
    padding: 32px 20px;
  }

  .olimaq-cta-actions {
    flex-direction: column;
    width: 100%;
  }

  .olimaq-cta-actions .olimaq-btn {
    width: 100%;
  }
}
