/**
 * Mediaholic Theme - SEO and Content Management Styles
 */

/* Breadcrumb Navigation */
.breadcrumb-navigation {
  background-color: #f8f9fa;
  padding: 10px 0;
  font-size: 0.9rem;
  border-bottom: 1px solid #e9ecef;
}

.breadcrumb-navigation ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1rem;
}

.breadcrumb-navigation li {
  display: flex;
  align-items: center;
  margin-right: 5px;
}

.breadcrumb-navigation li:not(:last-child)::after {
  content: ">";
  margin-left: 5px;
  color: #6c757d;
}

.breadcrumb-navigation a {
  color: #007bff;
  text-decoration: none;
}

.breadcrumb-navigation a:hover {
  text-decoration: underline;
}

.breadcrumb-navigation span {
  color: #6c757d;
}

/* Comparison Table */
.comparison-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 2rem 0;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.comparison-table thead {
  background-color: #f8f9fa;
}

.comparison-table th,
.comparison-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #dee2e6;
}

.comparison-table th {
  font-weight: 600;
  background-color: #e9ecef;
}

.comparison-table tbody tr:hover {
  background-color: #f8f9fa;
}

.comparison-table td:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
}
.comparison-table .product-thumbnail {
  height: 36px;
  width: auto;
  max-width: none;
  margin: 0;
  vertical-align: middle;
  object-fit: contain;
}

.comparison-table .product-title {
  font-weight: 500;
}

.comparison-table .rating-display {
  color: #ffc107;
  font-size: 1.2rem;
}

.comparison-table .annual-fee {
  font-size: 0.9rem;
  color: #6c757d;
}

.comparison-table .button {
  display: inline-block;
  padding: 8px 16px;
  background-color: rgb(var(--primary-color-rgb, 11,94,215));
  color: var(--primary-contrast, #fff) !important; /* override global link color rules */
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: filter 0.2s;
  border: 1px solid rgba(0,0,0,0.05);
  text-shadow: 0 1px 0 rgba(0,0,0,0.15);
}

.comparison-table .button:hover,
.comparison-table .button:focus {
  filter: brightness(0.92);
  outline: none;
}

/* Responsive styles */
@media (max-width: 768px) {
  .comparison-table th,
  .comparison-table td {
    padding: 8px 10px;
    font-size: 0.9rem;
  }
  
  .comparison-table .product-thumbnail { height: 28px; }
}

/* Stack comparison rows on narrow screens */
@media (max-width: 600px) {
  .comparison-table {
    border: 0;
  }
  .comparison-table thead {
    display: none;
  }
  .comparison-table tbody tr {
    display: block;
    margin: 0 0 12px 0;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    overflow: hidden;
  }
  .comparison-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border: 0;
    border-bottom: 1px solid #f1f3f5;
  }
  .comparison-table td:last-child {
    border-bottom: 0;
  }
  .comparison-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #6c757d;
    flex: 0 0 40%;
    max-width: 45%;
  }
  .comparison-table td[data-label] > * {
    max-width: 55%;
  }
  .comparison-table td:nth-child(1) {
    align-items: center;
  }
  .comparison-table .product-thumbnail {
    height: 28px;
  }
  .comparison-table .product-title {
    display: inline-block;
    font-weight: 600;
    word-break: break-word;
  }
  /* Hide the empty Details column on mobile (3rd column) */
  .comparison-table td:nth-child(3) {
    display: none;
  }
  /* Make the CTA button full-width for easy tap */
  .comparison-table .button {
    width: 100%;
    text-align: center;
  }
}

/* Comparison Cards (modern layout) */
.comparison-cards {
  display: grid;
  gap: 16px;
  margin: 24px 0;
}

/*
 * Premium global table system
 * - Shared desktop/tablet baseline for Gutenberg and server-side wrappers
 * - Mobile stacks only server-annotated two-column tables
 * - Wide tables remain horizontally scrollable
 */
figure.wp-block-table,
.mh-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 32px 0;
  border: 1px solid rgba(190, 108, 50, 0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(247, 242, 234, 0.6), rgba(255, 255, 255, 0.96));
  scrollbar-width: thin;
  scrollbar-color: rgba(190, 108, 50, 0.42) rgba(190, 108, 50, 0.08);
}

figure.wp-block-table table,
.mh-table-scroll > table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
  background: #fffdfb;
}

figure.wp-block-table thead th,
.mh-table-scroll thead th,
figure.wp-block-table tbody th,
.mh-table-scroll tbody th {
  background: #f7f2ea;
  color: #241f1a;
  font-weight: 700;
}

figure.wp-block-table th,
figure.wp-block-table td,
.mh-table-scroll th,
.mh-table-scroll td {
  padding: 16px 18px;
  border-right: 1px solid rgba(190, 108, 50, 0.1);
  border-bottom: 1px solid rgba(190, 108, 50, 0.1);
  text-align: left;
  vertical-align: top;
  color: #2f2a25;
  line-height: 1.65;
  background: transparent;
}

figure.wp-block-table tr > *:last-child,
.mh-table-scroll tr > *:last-child {
  border-right: 0;
}

figure.wp-block-table tbody tr:last-child > *,
.mh-table-scroll tbody tr:last-child > * {
  border-bottom: 0;
}

.mh-table-scroll::-webkit-scrollbar,
figure.wp-block-table::-webkit-scrollbar {
  height: 8px;
}

.mh-table-scroll::-webkit-scrollbar-track,
figure.wp-block-table::-webkit-scrollbar-track {
  background: rgba(190, 108, 50, 0.08);
  border-radius: 999px;
}

.mh-table-scroll::-webkit-scrollbar-thumb,
figure.wp-block-table::-webkit-scrollbar-thumb {
  background: rgba(190, 108, 50, 0.42);
  border-radius: 999px;
}

@media (max-width: 700px) {
  .mh-table-scroll table[data-mh-columns="2"] {
    width: 100%;
    min-width: 0;
    display: block;
    background: transparent;
  }

  /*
   * Keep thead in the accessibility tree so screen readers still announce
   * column headers. `display: none` would drop the header associations, and
   * ::before content is not surfaced as a table header by assistive tech.
   */
  .mh-table-scroll table[data-mh-columns="2"] thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  .mh-table-scroll table[data-mh-columns="2"] tbody,
  .mh-table-scroll table[data-mh-columns="2"] tr,
  .mh-table-scroll table[data-mh-columns="2"] td,
  .mh-table-scroll table[data-mh-columns="2"] th {
    display: block;
    width: 100%;
  }

  .mh-table-scroll table[data-mh-columns="2"] tr {
    margin: 0 0 16px;
    border: 1px solid rgba(190, 108, 50, 0.12);
    border-radius: 16px;
    background: rgba(255, 253, 251, 0.98);
    overflow: hidden;
  }

  .mh-table-scroll table[data-mh-columns="2"] td,
  .mh-table-scroll table[data-mh-columns="2"] th {
    border-right: 0;
    border-bottom: 1px solid rgba(190, 108, 50, 0.08);
    padding: 14px 16px 16px;
  }

  .mh-table-scroll table[data-mh-columns="2"] tr > *:last-child {
    border-bottom: 0;
  }

  .mh-table-scroll table[data-mh-columns="2"] td::before,
  .mh-table-scroll table[data-mh-columns="2"] th::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgb(var(--primary-color-rgb, 190, 108, 50));
  }

  .mh-table-scroll table:not([data-mh-columns="2"]) th,
  .mh-table-scroll table:not([data-mh-columns="2"]) td,
  figure.wp-block-table th,
  figure.wp-block-table td {
    padding: 12px 14px;
    font-size: 0.96rem;
    line-height: 1.55;
    white-space: normal;
  }
}

.compare-card {
  display: grid;
  grid-template-columns: 120px 1fr 260px;
  align-items: center;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  padding: 16px;
}
.compare-card .cc-left { display:flex; align-items:center; justify-content:center; }
.compare-card .card-logo { width: 120px; height: 76px; object-fit: contain; border-radius: 8px; background: #f5f7fa; }
.compare-card .card-logo.placeholder { background: #f0f2f5; }
.compare-card .cc-main { padding: 0 16px; }
.compare-card .cc-title { margin: 0 0 6px 0; font-size: 1.1rem; }
.compare-card .cc-badge { display:inline-block; font-size: 12px; background: rgba(var(--primary-color-rgb, 11,94,215), 0.12); color: rgb(var(--primary-color-rgb, 11,94,215)); padding:2px 6px; border-radius:6px; }
.compare-card .cc-bullets { margin: 8px 0 0 0; padding-left: 18px; }
.compare-card .cc-bullets li { margin: 2px 0; }
.compare-card .cc-right { display:flex; flex-direction:column; align-items:flex-end; gap:6px; }
.compare-card .cc-stars { color:#f5a623; letter-spacing: 1px; }
.compare-card .cc-score { margin-left:8px; font-weight:600; }
.compare-card .cc-editor-note { color:#6c757d; font-size:12px; margin-top:2px; }
.compare-card .cc-cta {
  background: rgb(var(--primary-color-rgb, 11,94,215));
  color: var(--primary-contrast, #fff) !important; /* ensure readable text on themed background */
  text-shadow: 0 1px 0 rgba(0,0,0,0.15);
  padding:10px 14px;
  border-radius:8px;
  text-decoration:none;
  display:inline-block;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
  /* Normalize font size so translations don’t inflate CTAs */
  font-size: 0.95rem;
  line-height: 1.2;
}
.compare-card .cc-cta:hover,
.compare-card .cc-cta:focus { filter: brightness(0.92); outline: none; }
.compare-card .cc-details { font-size:12px; color: rgb(var(--primary-color-rgb, 11,94,215)); text-decoration:none; }
.compare-card .cc-disclaimer { font-size:11px; color:#98a2b3; }

@media (max-width: 900px) {
  .compare-card { grid-template-columns: 110px 1fr 220px; }
  .compare-card .card-logo { width: 110px; height: 70px; }
}
@media (max-width: 700px) {
  .compare-card { grid-template-columns: 96px 1fr; grid-template-rows: auto auto; }
  .compare-card .card-logo { width: 96px; height: 64px; }
  .compare-card .cc-right { grid-column: 1 / -1; align-items:flex-start; margin-top: 10px; }
  .compare-card .cc-cta { width:100%; text-align:center; font-size: 1rem; }
}
