/* ============================================================
   ranking.css — Styles specific to the main ranking page
   Best Antarctica Cruise Companies
   ============================================================ */

/* --- Hero Block --- */
.ranking-hero {
  color: #fff;
  padding: 72px 0 60px;
  position: relative;
  overflow: hidden;
  min-height: 360px;
  display: flex;
  align-items: center;
}

.ranking-hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/hero-antarctica-ship.jpg');
  background-size: cover;
  background-position: center 40%;
  z-index: 0;
}

.ranking-hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(11,46,92,.82) 0%, rgba(27,79,138,.72) 50%, rgba(11,158,152,.55) 100%);
}

.ranking-hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
}

.ranking-hero h1 {
  color: #fff;
  font-size: clamp(1.65rem, 4.5vw, 2.6rem);
  margin-bottom: .75rem;
  max-width: 780px;
  line-height: 1.2;
}

.ranking-hero__subtitle {
  font-size: clamp(.95rem, 2.2vw, 1.15rem);
  color: rgba(255,255,255,.85);
  max-width: 640px;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.ranking-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.meta-chip {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.92);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

/* --- Methodology Banner --- */
.methodology-banner {
  background: var(--color-surface-alt);
  border-left: 4px solid var(--color-accent);
  padding: 20px 24px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 0 0 28px;
}

.methodology-banner p {
  font-size: .9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: .4rem;
}

.methodology-banner p:last-child {
  margin-bottom: 0;
}

.methodology-banner a {
  color: var(--color-accent-dark);
  font-weight: 500;
}

/* --- Comparison Table --- */
.table-section {
  margin: 0 0 48px;
}

.table-section h2 {
  margin-bottom: 1rem;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.comparison-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: #fff;
  font-size: .875rem;
}

.comparison-table thead {
  background: var(--color-primary);
  color: #fff;
}

.comparison-table thead th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
}

.comparison-table thead th:first-child {
  border-radius: var(--radius-lg) 0 0 0;
  width: 36px;
  min-width: 36px;
}

/* Operator column */
.comparison-table thead th:nth-child(2) {
  min-width: 160px;
}

/* Ship(s) column */
.comparison-table thead th:nth-child(3) {
  min-width: 130px;
}

.comparison-table thead th:last-child {
  border-radius: 0 var(--radius-lg) 0 0;
}

.comparison-table tbody tr {
  border-bottom: 1px solid var(--color-border);
  transition: background .12s;
}

.comparison-table tbody tr:last-child {
  border-bottom: none;
}

.comparison-table tbody tr:hover {
  background: var(--color-surface);
}

.comparison-table tbody tr.row-featured {
  background: #EEF6F5;
}

.comparison-table tbody tr.row-featured:hover {
  background: #E3F0EF;
}

.comparison-table td {
  padding: 12px 14px;
  vertical-align: top;
  line-height: 1.45;
}

.table-rank {
  font-weight: 700;
  color: var(--color-rank);
  font-size: 1rem;
  white-space: nowrap;
}

.table-operator {
  font-weight: 600;
  color: var(--color-text);
}

.table-ships {
  color: var(--color-text-muted);
  font-size: .82rem;
}

.tier-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}

.tier-entry      { background: #E8F4FD; color: #1A6FA8; }
.tier-mid        { background: #EBF5EB; color: #2E7D32; }
.tier-mid-prem   { background: #EEF3FA; color: #1B4F8A; }
.tier-premium    { background: #F3EEF9; color: #6B3BAA; }
.tier-ultra      { background: #FFF3E0; color: #BF6E00; }

/* --- Layout wrapper --- */
.ranking-layout-wrap {
  padding-top: 40px;
  padding-bottom: 56px;
}

/* --- Sidebar Layout --- */
.ranking-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 36px;
  align-items: start;
}

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

/* --- Operator card images --- */
.operator-card__image {
  margin: -28px -28px 20px -28px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  aspect-ratio: 820 / 320;
}

.operator-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}

.operator-card:hover .operator-card__image img {
  transform: scale(1.03);
}

/* Wildlife section image */
.wildlife-section__image {
  margin: 0 0 16px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.wildlife-section__image img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

/* Sidebar */
.ranking-sidebar {
  position: sticky;
  top: 84px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.sidebar-title {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-list li {
  margin-bottom: 0;
  border-bottom: 1px solid var(--color-border);
}

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

.sidebar-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: .83rem;
  color: var(--color-text);
  text-decoration: none;
  transition: color .12s;
}

.sidebar-list a:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.sidebar-rank {
  font-size: .75rem;
  font-weight: 700;
  color: var(--color-rank);
  min-width: 20px;
}

/* --- Operator Cards --- */
.operator-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-card);
  position: relative;
  scroll-margin-top: 84px;
}

.operator-card--featured {
  border-color: var(--color-accent);
  border-width: 2px;
  box-shadow: 0 4px 20px rgba(11,158,152,.12);
}

.operator-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.operator-card__rank-wrap {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1;
}

.operator-rank-num {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--color-rank);
  line-height: 1;
  min-width: 48px;
  opacity: .85;
}

.operator-card--featured .operator-rank-num {
  opacity: 1;
  color: var(--color-accent);
}

.operator-card__title-block h2 {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  margin-bottom: .25rem;
  line-height: 1.3;
}

.best-for-badge {
  display: inline-flex;
  align-items: flex-start;
  gap: 4px;
  background: var(--color-badge-bg);
  color: var(--color-badge-text);
  font-size: .78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

.best-for-badge::before {
  content: '✓';
  font-size: .75rem;
}

/* Specs grid */
.operator-specs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px 16px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 16px 0;
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.spec-label {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-text-light);
}

.spec-value {
  font-size: .875rem;
  font-weight: 600;
  color: var(--color-text);
}

/* Body text */
.operator-card__body p {
  font-size: .9375rem;
  color: #2A3A4E;
  line-height: 1.7;
  margin-bottom: .85rem;
}

.operator-card__body p:last-child {
  margin-bottom: 0;
}

/* Footer row */
.operator-card__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

/* --- Buyer's Guide --- */
.guide-section {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 28px;
}

.guide-section h2 {
  margin-bottom: 1.25rem;
}

.guide-section h3 {
  font-size: 1.05rem;
  color: var(--color-primary);
  margin-top: 1.5rem;
  margin-bottom: .5rem;
}

.guide-section h3:first-of-type {
  margin-top: .75rem;
}

.guide-section p {
  font-size: .9375rem;
  color: #2A3A4E;
  line-height: 1.7;
  margin-bottom: .85rem;
}

.guide-section ul {
  font-size: .9375rem;
  color: #2A3A4E;
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* --- Wildlife block --- */
.wildlife-section {
  border-left: 4px solid var(--color-accent);
  padding: 24px 24px 24px 28px;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  background: #F0FAF9;
  margin-bottom: 28px;
}

.wildlife-section h2 {
  color: var(--color-accent-dark);
  margin-bottom: .75rem;
}

.wildlife-section p {
  font-size: .9375rem;
  line-height: 1.7;
  color: #1E3A36;
}

/* --- FAQ --- */
.faq-section {
  margin-bottom: 28px;
}

.faq-section h2 {
  margin-bottom: 1.25rem;
}

details.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  overflow: hidden;
  background: #fff;
}

details.faq-item[open] {
  border-color: var(--color-accent);
  box-shadow: 0 2px 8px rgba(11,158,152,.08);
}

details.faq-item summary {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: .9375rem;
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
  user-select: none;
  transition: background .12s;
}

details.faq-item summary::-webkit-details-marker {
  display: none;
}

details.faq-item summary::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--color-accent);
  line-height: 1;
  flex-shrink: 0;
  transition: transform .2s;
}

details.faq-item[open] summary::after {
  content: '−';
}

details.faq-item summary:hover {
  background: var(--color-surface);
}

.faq-body {
  padding: 0 20px 20px;
  font-size: .9rem;
  color: #2A3A4E;
  line-height: 1.7;
}

.faq-body p { margin-bottom: .75rem; }
.faq-body p:last-child { margin-bottom: 0; }
.faq-body ul { margin-bottom: .75rem; }

/* --- Bottom CTA Banner --- */
.cta-banner {
  background: linear-gradient(135deg, #0B2E5C 0%, #1B4F8A 100%);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  text-align: center;
  color: #fff;
  margin-bottom: 28px;
}

.cta-banner h2 {
  color: #fff;
  margin-bottom: .5rem;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
}

.cta-banner p {
  color: rgba(255,255,255,.82);
  font-size: .95rem;
  margin-bottom: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta-banner .btn {
  font-size: .95rem;
  padding: 12px 28px;
}

/* --- Responsive overrides --- */
@media (max-width: 768px) {
  .ranking-layout {
    grid-template-columns: 1fr;
  }

  .ranking-sidebar {
    display: none;
  }

  .operator-card {
    padding: 20px 16px;
  }

  .operator-card__image {
    margin: -20px -16px 16px -16px;
  }

  .operator-card__header {
    flex-direction: column;
    gap: 10px;
  }

  .operator-specs {
    grid-template-columns: 1fr 1fr;
  }

  .guide-section {
    padding: 24px 18px;
  }

  .methodology-banner {
    padding: 16px 18px;
  }

  .cta-banner {
    padding: 28px 20px;
  }

  .ranking-hero {
    padding: 40px 0 36px;
  }

  .ranking-hero h1 {
    font-size: 1.65rem;
  }
}

@media (max-width: 480px) {
  .ranking-hero {
    padding: 28px 0 24px;
    min-height: auto;
  }

  .ranking-hero h1 {
    font-size: 1.4rem;
  }

  .ranking-hero__subtitle {
    font-size: .9rem;
  }

  .meta-chip {
    font-size: .72rem;
    padding: 4px 8px;
  }

  .operator-card {
    padding: 16px 14px;
    margin-bottom: 20px;
  }

  .operator-card__image {
    margin: -16px -14px 14px -14px;
  }

  .operator-rank-num {
    font-size: 1.75rem;
    min-width: 36px;
  }

  .operator-card__rank-wrap {
    gap: 10px;
  }

  .operator-card__title-block h2 {
    font-size: 1rem;
  }

  .operator-specs {
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
    padding: 12px 12px;
  }

  .guide-section {
    padding: 18px 14px;
  }

  .wildlife-section {
    padding: 18px 16px 18px 20px;
  }

  .cta-banner {
    padding: 22px 16px;
  }

  .methodology-banner {
    padding: 14px 14px;
  }

  .table-section h2 {
    font-size: 1.1rem;
  }

  .ranking-layout-wrap {
    padding-top: 24px;
    padding-bottom: 40px;
  }
}
